How to call vivado from matlab for cosimulation

조회 수: 22 (최근 30일)
Bilal MEJMAA
Bilal MEJMAA 2023년 9월 18일
댓글: Bilal MEJMAA 2023년 9월 25일
Hello !
I am working on cosimulation of a specific project between Matlab and ModelSim as HDL simulator. Matlab script, and simulink model communicate using from workspace blocks.
Inside Matlab script I use the following command to lunch ModelSim on batch mode:
tclcmd = { ...
'vsimulink top_tsr -t 1ns -voptargs=+acc ;', ...
'add wave top_tsr/*;', ...
};
vsim('tclstart',tclcmd,'runmode','Batch')
And the following cmd to lunch simulink cosimulation:
Sim_out = sim('TSR_CoSim');
What I want to do now is to implement the same module using cosimulation with Vivado instead of ModelSim.
I have generated the .slx model that contains vivado block.
i just need to call vivado from matlab to make it ready for Cosimulation.
Thank you

채택된 답변

Marc Erickson
Marc Erickson 2023년 9월 21일
The Vivado Simulator cosimulation process is different than that for ModelSim. For Vivado, a shared library containing the Vivado simulation kernel is created that is run in the context of the Simulink model--there is no other Vivado process to launch during the cosimulation.
Running the "Getting Started" example will probably best help you understand the process: https://www.mathworks.com/help/hdlverifier/ug/get-started-simulink-cosimulation-hdl.html
The example covers ModelSim, Xcelium, and Vivado Simulator so be sure to follow the instructions for Vivado Simulator.

추가 답변 (0개)

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by