Re: [myhdl-list] How to make MyHDL Object-Oriented
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2012-05-04 10:05:26
|
On 05/04/2012 01:45 AM, Christopher Lozinski wrote: > Thanks enormously to Andy Stone for pointing out that MyHDL, while in > Python is not object-oriented. There is no hardware module class, just > a generator, and decorator which are functional approaches. How can you even say this, when the manual has a section about object-oriented modeling, which has a Queue class, which you have just been struggling with? Perhaps this stuff really is too hard for the "general python developer", though I still don't understand why. One more attempt: MyHDL, the modeling language, is very general: as long as you feed it a number of generators communicating through signals, it is happy. It doesn't matter whether these are created by functions, classes, subclasses, mixin classes, multiple inheritance, whatever. MyHDL is therefore what you want it to be - functional, applicative, procedural, object-oriented, aspect oriented, whatever. It is only when you need conversion that restrictions drop in, but identifying MyHDL with conversion or synthesis restrictions is a sign of basic misunderstanding. I understand that this may not have been clear enough in the past: but this should be fixed now with the What MyHDL is not page, and when I separate synthesizable/non-synthesizable chapters in the manual. > No wonder I was not able to 'get' MyHDL. I very much think in > object-oriented terms. Many years ago I wrote object-oriented > manufacturing simulations of NCR's ASIC manufacturing plant. It was a > roaring success. > > The difference in mind-set is just enormous between a functional model, > and an object-oriented model. But I certainly do not want to get into a > fight over it. > > So here is my proposal for what I need to do. > > http://wiki.myhdlclass.com:8080/OOHDL Coupling a sensitivity list to a module makes no sense. -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |