How to restart ModelSim simulation after each iteration from MATLAB script co-simulation?
Afficher commentaires plus anciens
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 commentaires
Marc Erickson
le 2 Juin 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
le 7 Juin 2023
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB Cosimulation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!