Re: Examples of using classes?

Christopher Felton <[email protected]>
Newsgroups gmane.comp.python.myhdl
Message-ID <[email protected]>
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




------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.