Re: [myhdl-list] Reset functionality "synthesis"
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2012-06-27 04:10:19
|
<snip> >>> >>> Feedback welcome! >>> >> >> Haven't thought this fully through but would it be better >> to have the /reset/ properties passes as arguments to the >> decorator or properties of the Signal? Example if properties >> used: >> >> reset = Signal(False) >> reset.level = 0 >> reset.async = True >> >> @always_ff(clock.posedge, reset=reset) >> >> The property defaults would be the same as you stated. > > Seems a very good idea. Perhaps even introduce a > Signal subclass, ResetSignal, to set the properties > at construction time and allow type checking in the > always_ff decorator: > > reset = ResetSignal(0, active=0, async=True) # defaults shown That seems very reasonable, I like it. This should be a pretty cool addition! Regards, Chris |