Re: [myhdl-list] Re: syntax sugar?
Brought to you by:
jandecaluwe
From: Haitao Z. <ha...@gm...> - 2005-08-01 21:19:54
|
On 8/1/05, Jan Decaluwe <ja...@ja...> wrote: Jan, I generally agree with your comments against "syntax sugar" so I won't argue about it. Also thanks for pointing out a less verbose way to keep track. On the following point I want to point out a drawback: when you group all assignments you are making all the assignments sensitive to all signals on the RHS, and therefore whenever an event happens every single assignment will be evaluated. That may or may not be acceptable in terms of simulation efficiency, but it is not equivalent to multiple concurrent assignment blocks. Or maybe I don't understand what instances() and always_comb() do? Haitao > It is true that MyHDL is more verbose and more explicit. But I think > you are a little pessimistic. You could group all assigns in a single > function, and use always_comb() and instances(), like so: >=20 > ... > def assignments(): > a.next =3D b > c.next =3D d > ... > assignments_inst =3D always_comb(assignments) > .... > return instances() >=20 > That=B4s not too bad, I think. > |