docs/simulator: improve explanation for resetting the simulation.
This commit is contained in:
parent
6a2e789333
commit
86fdaba2db
2 changed files with 13 additions and 5 deletions
|
|
@ -88,6 +88,17 @@ The captured data is saved to a :abbr:`VCD` file :file:`example1.vcd`, which can
|
|||
]
|
||||
}
|
||||
|
||||
The :meth:`Simulator.reset` method reverts the simulation to its initial state. It can be used to speed up tests by capturing the waveforms only when the simulation is known to encounter an error:
|
||||
|
||||
.. testcode::
|
||||
|
||||
try:
|
||||
sim.run()
|
||||
except:
|
||||
sim.reset()
|
||||
with sim.write_vcd("example1_error.vcd"):
|
||||
sim.run()
|
||||
|
||||
|
||||
Testing synchronous circuits
|
||||
++++++++++++++++++++++++++++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue