Re: [myhdl-list] MEP : Signal Containers
Brought to you by:
jandecaluwe
From: Oscar D. <osc...@gm...> - 2011-11-21 15:54:02
|
2011/11/21 Oscar Diaz <osc...@gm...>: > 2011/11/15 Christopher Felton <chr...@gm...>: >> The following is a *start* to a MEP that describes the conversion >> support for classes, lists, and dictionaries. This is just a start of >> the enhancement description and does not include some of the mechanical >> (code changes) items worth identifying in a MEP. > > Thanks for making this draft. I'm mostly agree this MEP, I'll just add > some thoughts: > > * Since a class could be more powerful than a list or a dict, > container classes should allow enhanced features i.e. custom naming > scheme. We can propose hidden methods to support that features, in a > similar way of the special methods from the python data model: > > http://docs.python.org/reference/datamodel.html#special-method-names > > Right now I'm thinking about Sorry, I press Enter too quick :p Right now I'm thinking about: * custom naming scheme: something like "_names_iter(self)" method that returns the desired names for each signal. * late signal creation: suppose that I need to calculate the width of a signal, but I already create the container object. A method that create (or update) the signal objects just before simulation or conversion can be defined. * classes with special method names: what happen if I define the __slot__ list? or if I define a custom __getattr__ or another methods? -- 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 |