Re: [myhdl-list] Style based on decorators
Brought to you by:
jandecaluwe
From: Matt E. <ma...@et...> - 2005-12-02 06:14:04
|
Jan Decaluwe wrote: > Hi: > > I have decided to proceed with the introduction of decorators > to create local generators in 0.5. > > In addition, I would like to make this the default coding style. > In particular, I would change all documentation and examples to > use decorators, including in tutorials. Note that 3 decorators > are introduced: @always, @always_comb, and @instance. > > Also, the possibility to use a parametrizable generator directly > would be de-emphasized (but possible, of course). The equivalent > in VHDL/Verilog would be a process/always block with a port > interface, something which doesn't exist. Therefore, this > can be confusing to new users. Instead, one would use a function > that returns a single generator (as many of you do already). > This makes the overall style more consistent: structure is > always specified using a plain function, behavior using > a local generator (created with a decorator). > > Note that all of this has no impact on backwards compatibility. > > As always, let me know if you disagree. I don't see the advantage of pushing everyone towards the decorators. Am I correct in my understanding that complex cases may still need the old syntax? Also, I love Python and understand the desire to be Pythonic, but making things as different as possible from preexisting HDLs doesn't seem to buy anything but a steep learning curve. Matt |