Re: [myhdl-list] Example of MyHDL for Python Developers Documentation
Brought to you by:
jandecaluwe
From: Oscar D. <osc...@gm...> - 2012-05-17 10:22:25
|
2012/5/16 Christopher Lozinski <loz...@fr...>: > 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. Well, keep in mind that developing software comes with a price in terms of performance, if you compare it with a pure hardware implementation; I mean a processor, as a general-purpose hardware, is slower, bigger and more power hungry that a custom hardware. On the other hand, designing hardware is more complex than writing software. Here you need to find a compromise between performance and complexity. I'm telling you this because, for some applications you just need to design for top performance (and of course, you have to deal with the added complexity). > 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. I understand your motivation, and I think is a valid idea. But, as I said it comes with a price: when you develop a digital design with OOHDL, you're imposing a particular way to model its modules, i.e. the way you declare ports, or how the relationships between modules are made. However, don't be discouraged, IMHO for an OO approach it is necessary to define a class hierarchy and some sort of an API for interoperability between its objects. The really hard part is to come with such library that satisfy most of the design needs. The "price" I mentioned before is unavoidable, but at least we should find a way to "lower that price" as much as possible. > > That would make this into a much more vibrant community. > > Regards > Chris L. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list -- Oscar Díaz Key Fingerprint = 904B 306C C3C2 7487 650B BFAC EDA2 B702 90E9 9964 gpg --keyserver subkeys.pgp.net --recv-keys 90E99964 I recommend using OpenDocument Format for daily use and exchange of documents. http://www.fsf.org/campaigns/opendocument |