[myhdl-list] About multiple simulations without leaving the interpreter
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2008-02-26 17:03:16
|
Hello: There is some new functionality available since 0.6dev6 that I still have to document. It's relatively advanced, and depending on your usage patterns you may never need it. So if the following doesn't ring a bell, you can safely ignore the info. In a recent project I defined the internal signals "globally" in a separate module. This way, I could define lookup functions to make it easier to define top-level netlists and test benches (and keep them up to date.) Also, running my test plan meant that I did multiple simulations without leaving the interpreter. This usage pattern implies that after the first simulation, the *same* (in terms of object identity) Signals are reused in the second one. This led to problems. For example, at the end of a simulation Signals were not "reset" to their initial value, leading to "unexpected" values at the start of the next simulation. In general, the Simulation and Signal data structures were not cleaned up systematically at the end of a simulation. This is now solved: at the end of a simulation, things are cleaned up so that a subsequent simulation in the *same* interpreter gives the expected results: the same behavior as if the new simulation would run in a *new* interpreter. Best regards, Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Kaboutermansstraat 97, B-3000 Leuven, Belgium From Python to silicon: http://myhdl.jandecaluwe.com |