Clarity on the issue of restarts
See original GitHub issueI need to find clarity on the question of whether cocotb supports the Questa restart -f
command or restart commands in any simulator.
As a definition: restart -f
brings a simulation back to time zero without reelaborating the design. One would like to modify a cocotb testbench and press the GUI restart button, or type restart -f
and run the simulation from the start with a modified testbench.
It’s unclear in various conversations whether cocotb intends to support this functionality. The situation is confused by the fact that cocotb works with some simulators on restart and not others.
I can see three options:
-
cocotb is not expected to support restart on any simulator. If it works in a given simulator that is a happy accident.
-
cocotb supports restart in simulators where someone has done the work to make it support restart.
-
cocotb is intended to support restart in all simulators, but there is a bug with regards to Questa.
Which of the three is the correct answer? We (Siemens) need to know so we can support our customer properly.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hi James,
Let’s assume - Questa can detect that the current simulation (being restarted) has a CocoTb testbench. Would it be sufficient to force execute callbacks meant for “End of Simulation”, and then go to the “Start of Simulation” callbacks ? I see that the start of simulation callbacks are looking to trigger the function “embed_sim_init” - which initializes Python. During restart, we check for “pEventFn” and is found. It implies that the python interface has been initialized. However, there is some break in the flow where the rest of the python testbench does not gets executed.
Has your question been resolved? If so please close this issue. If it has not been resolved, you may need to provide more information. If no more activity on this issue occurs in 7 days, it will be closed.