Re: [myhdl-list] Re: syntax sugar?
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2005-08-02 20:24:59
|
(I think something went wrong with gmane yesterday, and the following message from Haitao Zhang didn=B4t show up in gmane. So I repost it -- Jan Decaluwe) Haitao Zhang wrote: > 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. >=20 > 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? >=20 > Haitao >=20 >=20 >>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: >> >> ... >> def assignments(): >> a.next =3D b >> c.next =3D d >> ... >> assignments_inst =3D always_comb(assignments) >> .... >> return instances() >> >>That=B4s not too bad, I think. >> >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list >=20 --=20 Jan Decaluwe - Resources bvba - http://jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium Using Python as a hardware description language: http://jandecaluwe.com/Tools/MyHDL/Overview.html |