Re: [myhdl-list] Global state and multiple instances
Brought to you by:
jandecaluwe
From: Juan P. C. <jp...@gm...> - 2015-05-07 14:41:59
|
Henry, do you have a minimal working example? Thanks, JP On Thu, May 7, 2015 at 10:33 AM, Henry Gomersall <he...@ca...> wrote: > On 07/05/15 15:10, Henry Gomersall wrote: > > The other problem is the state on a Signal object is not being handled > > properly. I tried to implement the solution for this (currently > > commented out in _simulator.py) in which on each context switch, the > > signals are stashed (using _Signal._stash_state) to the context that is > > being departed, and then the signal state is reloaded when it is > > reentered (susing _Signal._recall_state). The tests begin to work and > > then one gets into an infinite loop because some waiter or other is > > missing. I'm not sure quite what I've missed. This is hard to bug > > isolate because the tests all run in isolation or indeed, in their > > respective test classes. > > I was wrong, all the tests actually seem to run with no error. The > problem is that the overhead when the signal list becomes large is huge > and really affects the simulation time. > > This can be dealt with with a bit of thought I'm sure. Most of the time, > nothing is changed, so the Signal does not need to be stashed. > > I've pushed the changes with the full code. > > Oh, btw, it _should_ be thread safe, due to using thread local storage, > but I haven't verified this. > > Cheers, > > Henry > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > myhdl-list mailing list > myh...@li... > https://lists.sourceforge.net/lists/listinfo/myhdl-list > |