Re: [myhdl-list] [RFC/PATCH] constant driver support
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2011-09-12 04:40:17
|
On 9/10/11 9:05 AM, Sébastien Bourdeauducq wrote: > Hi, > > the patch below implements constant driver support. A constant driver > generator yields None. > > * Generic waiter object: block on None clauses > * New InfiniteWaiter object > * inferWaiter: create InfiniteWaiter when generator yields None > * always_comb decorator: yield None on empty sensitivity list > * conversion/analyze: return empty sensitivity list for generators that > yield None > * Verilog/VHDL conversion: wait forever on empty sensitivity list > <snip code patch> I haven't had time to review your code, so I don't have any specific feedback on the code but a couple general comments. Jan Decaluwe created a page outlining the process to contribute changes, http://www.myhdl.org/doku.php/dev:patches. Have a look at this page, it is very useful. You might want to create an hg bundle, in addition, to expedite any patches that might be accepted. If I recall, from the conversation it sounded like constant drivers are supported but not from a generator. Something like this works, currently: def testc(y): x = Signal(intbv(5)[8:]) @always_comb def rtl(): y.next = x return rtl The above will generate a constant driver (e.g. assign x = 5 in Verilog). But your patch proposes an alternative method to create constant drivers, correct? Your proposed changes would support something like: def testc(y): @always_comb def rtl(): y.next = 5 return rtl My question would be: Are there any error cases that might be missed now (that were previously caught)? Regards, Chris Felton |