[myhdl-list] Style based on decorators
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2005-11-24 08:21:07
|
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. Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium From Python to silicon: http://myhdl.jandecaluwe.com |