Re: [myhdl-list] Convertible records
Brought to you by:
jandecaluwe
From: Jan L. <jan...@et...> - 2011-09-02 18:45:11
|
Hi all, Am 02.09.2011 um 18:06 schrieb Christopher Felton: > How the conversion analyzer works now, it looks at free variables (not > sure what a free variable is) and checks the type. If the type were > to > be any class (object) the converter has to do more work to determine > if > appropriate signals exist in the class. If the converter can check > for > a particular type (base class) then it knows it has signals and can > extract. Make sense? Maybe the AST easily supports this and the base > class is not needed. maybe it would be a good idea to let the converter "ask" the class how it wants to be converted. In a very simple case something like: class SignalStruct: def __signals__(self): return self.a,self.b Jan -- Jan Langer Professorship Circuit and System Design Chemnitz University of Technology, Reichenhainer Str. 70, 09126 Chemnitz Phone: +49 37209 688001, Fax: +49 371 531-833158, Mobile: +49 162 9847325 http://www.tu-chemnitz.de/etit/sse |