Re: [myhdl-list] Convertible records
Brought to you by:
jandecaluwe
From: Sébastien B. <seb...@mi...> - 2011-09-02 15:38:47
|
On 09/02/2011 04:24 PM, Christopher Felton wrote: > My basic thought would be to create a type in MyHDL, SignalStruct, and > then create long unique variable names in the converted HDL. > > Example: > > class MyBus(SignalStruct): > def __init__(self): > self.addr = Signal(intbv(0)[16:]) > self.data = Signal(intbv(0)[8:]) > # ... I'm not sure having the base "SignalStruct" would be even necessary. A regular object should be enough (and potentially more flexible), no? i.e. "class MyBus():" could just work as well.. |