Re: [myhdl-list] When to use @always, @instance and @always_comb
Brought to you by:
jandecaluwe
From: Tom D. <td...@di...> - 2012-05-06 05:35:55
|
On 05/05/2012 02:59 PM, Christopher Lozinski wrote: > In the page on Atomic and Compound Hardware modules, I model ports as > public instance variables. And internal signals as private instance > variables. It is how experienced python developers expect to see > things. It is natural for us to think of ports as instance variables. > Then you can get inheritance of ports for free as Hardware Modules are > subclassed. The port methods automatically remove Children and Parents > from the instance variable list. With this design, one would not have > to list all the ports repeatedly in the generator function for each > subclass. They just get inherited. Brings us a step closer towards > rich libraries of hardware modules that can be subclassed. Cool! "Experienced python developer", what is that? I am not sure what that has to do with anything. There is nothing unnatural about MyHDL. Again, trying to draw somebody into a meaningless discussion. > > But there is a problem, as that is not how MyHDL models ports. It is > not just an implementation problem. It is a conflict between how > experienced Python developers see the world, and the functional approach > favored by experienced hardware engineers. MyHDL works fine. I fail to see a conflict at all. |