How to restart ModelSim simulation after each iteration from MATLAB script co-simulation?
Ältere Kommentare anzeigen
I am working on a vhdl model that is simulated using hdl cosimulator app from simulink. The control and initialization steps are described as MATLAB script. The data is sent from matlab to simulink using from workspace blocks, then simulink fed the hdl function (Modelsim) using shared memory. After simulation process in Modelsim the data sent back to MATLAB. Currently I am facing the problem of timing, in the first iteration the ModelSim output is fine but in the 2nd and on, they delayed by a specific timing.
What I would like to do is how to restart simulation in modelsim from matlab script or from simulink after each iteration process ?
2 Kommentare
Marc Erickson
am 2 Jun. 2023
Within the HDL simulator, one can invoke a simulator restart which will reset all simulator state and reload the application that communicates with Simulink.
Unfortunately, there is no way to invoke this restart from within our application because doing so will hang the HDL simulator.
For each run of Simulink, it is safest to reinvoke the HDL simulator. For non-interactive use, using the "-c" option to vsim will ensure a faster startup and run time.
Bilal MEJMAA
am 7 Jun. 2023
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB Cosimulation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!