Re: [myhdl-list] Module uses globals
Brought to you by:
jandecaluwe
From: Christopher F. <chr...@gm...> - 2015-04-19 15:42:41
|
<snip> > > Chris: > > The need for multiple simulator instances is to have the simulation time > be different across them. Then be able to pause one, advance the other, > compare model A at time t=t1 versus model B at time t=t2, etc. Fair enough, but I am not 100% convinced this can't be done in a single Simulator: design1 = design_foo(...) design2 = design_bar(...) Simulation((design1, design2,)).run() But it would be a little awkward because you would need to create you own controls. The issue with supporting concurrent simulations is making sure there are no collision (i.e. generators that existing in both simulations). > There is > no pausing/resuming in the current library, but I'm running the > simulations in separate processes and I have them wait on given events > for permission to continue sent from the controlling process. > Yes, there is no `PauseSimulation` (possibly a reasonable enhancement). The current mechanism to start and stop (pause) is to run a specific number of simulation cycles: sim = Simulation(...) sim.run(100) # simulator is paused, now continue sim.run(100) Regards, Chris |