Re: [myhdl-list] Examples of using classes?
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2015-07-28 13:22:11
|
On 7/28/2015 4:52 AM, Jeremy Herbert wrote: > Hi everyone, > > I'm currently playing with myhdl, and I was wondering if anyone has > examples on using python classes to describe logic? more specifically, I am > looking for examples of class inheritance being used. > > I have looked on the myhdl website and here: > https://github.com/jandecaluwe/myhdl-examples > > but everything seems to be defined by functions in functions rather than in > a class. This question pops up every once in awhile from new users. I think most users don't use classes as the modules that contain the logic implementations. Classes are used for interfaces and objects that might have logic implementations (implemented in methods). You can use classes, you just need to provide the myhdl generators to the simulator and/or conversion tools. Can you elaborate how you want to use classes? Its not clear to me how inheritance can help logic implementations. Regards, Chris |