Re: [myhdl-list] emulate always_seq decorator
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2013-12-27 17:01:53
|
On 12/27/2013 09:01 AM, Marcel Hellwig wrote: > Hi everyone, > > one of my devices is using yield a lot (state machine), but the > decorators don't support generator functions. The @instance decorator does. Why not simply use that? Also, dynamic sensitivity lists are not supported in conversion. Jan So I looked up in the > source and wrote my own 'always_seq' decorator. > >> @instance >> def genFunction(): >> #we emulate a @always_seq(clk.posedge) >> senslist = [clk.posedge] >> >> if reset.async: >> if reset.active: >> senslist.append(reset.posedge) >> else: >> senslist.append(reset.negedge) >> >> while True: >> yield senslist >> >> if reset == reset.active: >> presetSignals() >> state.next = tState.FETCH >> else: >> yield logic() > > > the problem is, that toVHDL is now complaining about a lof ot things > >> myhdl.ConversionError: in file /home/marcel/studium/WISE1314/Projekt/hardware/cpu.py, line 254: >> Not supported: list > this is the senslist = [clk.posedge] line. And also >> myhdl.ConversionError: in file /home/marcel/studium/WISE1314/Projekt/hardware/cpu.py, line 266: >> Unsupported attribute: active > > (if reset == reset.active). > > How do I tell myhdl that he should translate this as usual?! Or tell me > a different method to use yield inside a always_seq decorated function. > > Greetings, > Marcel > > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > > > > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |