Re: [myhdl-list] Example of MyHDL for Python Developers Documentation
Brought to you by:
jandecaluwe
From: Christopher L. <loz...@fr...> - 2012-05-16 14:02:46
|
First thank you for the comments on my hardware module proposal. I learned a lot. I always learn a lot from this group. On 5/16/12 6:58 AM, Oscar Diaz wrote: > And following with the previous discussion, Christopher has proposed a > particular abstraction through his Hardware Module Class. Although I > think it's a correct proposal, maybe it's not suitable in other cases. > Let me give you an example: So first I will admit I am extreme. There is always a spectrum between the functional approaches, and the object-oriented approaches. I strongly lean one way. The lesson from python is that to gain broad market adoption, both approaches must be supported. But there are reasons why I am extreme. One of my core beliefs is that software components should map directly to hardware components. It is just so much easier to understand. Then as the world changes, as the design evolves, the software component is more likely to evolve easily. So if you do not want to initially model ports, that is fine. But do still have a class that models your high level hardware module. Of course if you are working at even higher levels, no worries. Sure people can say this is just a software library. Let us call it OOHDL. For Object-Oriented HDL. But it is much more than that. It is a world view. You get some benefit from reusing libraries. You get a lot more benefit from having a certain world view. There are many benefits from this world view, but the primary one is for new users. Imagine the sales pitch. OOHDL is a library of objects for modeling, designing and simulating digital designs. Each class represents a real world hardware module like clocks, multiplexers, memory, and other devices. You use a graphical tool to assemble your design from software components, or even to design new components. You can click into each hardware module to see the hardware hierarchy. When you need to, you can even create new hardware modules in python, optionally reusing existing hardware modules. By retaining the MyHDL functional approach, you greatly loose the benefits of a pure OO approach, particularly the ability for new users to understand, learn and use the system. Let there be no doubt that I had and still do have huge difficulty understanding MyHDL. A class library matching to hardware modules and signal types would have been so much easier for me to understand, subclass and assemble. That would make this into a much more vibrant community. Regards Chris L. |