Re: [myhdl-list] What techniques can I use to avoid repeating myself in myhdl code?
Brought to you by:
jandecaluwe
From: Keerthan jai.c <jck...@gm...> - 2013-05-14 21:51:43
|
Thanks, that cleared my doubts about the current state of myhdl's implementation. Also, I took a look at MEP107 and myhdl's conversion code. I would like to help in implementing MEP107. This is what I'm thinking so far(note: I have never used ASTs before, so I might be completely off): 1) Create a ast.NodeTransformer class to resolve references 2) Create visit_Attribute and visit_Subscript functions in it 3) Create lists of reserved attributes and subscripts. (So far it is only .next I think) 4) Recursively resolve the references On Tue, May 14, 2013 at 9:17 AM, Christopher Felton <chr...@gm...>wrote: > On 5/14/2013 8:04 AM, Christopher Felton wrote: > > On 5/13/2013 5:33 PM, Keerthan jai.c wrote: > >> But what about your example above? > >> > > > > Here is a complete example, it is still an nonsensical > > example and incomplete. But it shows the different > > methods we were discussing, simulates (nothing to verify > > though, cause it doesn't do anything) and converts. > > > > https://gist.github.com/cfelton/5575659 > > > > I should note, only the first 30 lines are part of the > example we have been discussing. The reset is scaffolding > to create an example, albeit nonsensical. To create a > top-level that is closer to a real-world example, which > would be converted. > > Regards, > Chris > > > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > -- have a nice day -jck |