Re: [myhdl-list] MEP : Signal Containers
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2012-06-04 12:40:36
|
On 6/2/2012 4:57 PM, G. Andrew Stone wrote: > ok great! I would have no intention to drop all the work on someone else's > lap :-) and I agree that OO additions should not be done quickly. This > actually fits my own schedule anyway as I might be freeing up a bit in a > month or so. But at the same time, I have no intention to evangelize these > ideas -- I mean if there's no spark of interest in the community I do not > have the time to create the "mind-share" (as VCs say). Or I was thinking > that maybe someone has already shown that the current conversion code is > somehow inimical to OO... > > You said: > "I think it is a stretch to say you can describe synthesizable hardware in > the same manner as you write OO software (yet to be proven)." > > I think that you are correct and that is not the point. I think that you > just said something like, "I think it is a stretch to say you can pry the > lid off this paint can in the same manner as you drive screws". You can't > do it in the same manner, but the question is can we use the same tools? No, we have made the point that the tool, "OO", is used. The issues being discussed are the "how". > <snip> > > WRT inheritance, perhaps a simple but valuable use would be to extend IP > while maintaining backwards compatibility. For example you have the > wishbone bus as an example in the MEP. What about using inheritance to > define a Wishbone16 that is clearly (because it inherits from the prev gen) > 100% backwards compatible with the standard Wishbone but offers 16bit data > transfers. If you instantiate Wishbone16, you can give it to old IP blocks > that take a "Wishbone" bus without having to modify that old code. But > this example still uses the "classic" formulation of a class essentially as > a concrete entity as typified by your car example... but there are more > advanced uses of classes that may have hardware analogues... > I don't think this is a good example for HW or SW. I don't believe a simple attribute change justifies a new class. In this case, it is more eloquently handled by simply passing the correct Signal object during instantiation (and people say MyHDL isn't OO). Regards, Chris |