Relocate HDL Cosimulation Design Support Files
To share a Simulink® model containing an HDL Cosimulation block, you need to relocate HDL Cosimulation design support files along with your Simulink model. Depending on the HDL simulator associated with your HDL Cosimulation block, you need to relocate different files.
In the following sections, the current directory
refers to the
location of your Simulink model containing the HDL Cosimulaton block. This folder is the
same location where you created the HDL Cosimulaton block using the Cosimulation Wizard. The new directory
refers to the
new location of your Simulink model.
Vivado Simulator
If your HDL Cosimulation block uses the Vivado® simulator and you do not need to change
the debug option for the HDL Cosimulation block at the new
directory
, copy these files from the current
directory
to the new directory
:
Simulink model file (
.slx
) containing the generated HDL Cosimulation blockxsim.dir
folder
If you need to change the debug option for the
HDL Cosimulation block at the new
directory
, follow these steps:
Copy these files from your
current directory
to thenew directory
:Simulink model file (
.slx
) containing the generated HDL Cosimulation blockHDL source files
Note
You do not need to copy the HDL source files if for example the source directories holding these files are on a shared disk that holds a repository of IP.
hdlverifier_compile.m
hdlverifier_compile.tcl
hdlverifier_gendll.tcl
hdlverifier_gendll_<DUT>.m
Open MATLAB® and set the
new directory
as the current folder for MATLAB. Then:If you have copied the HDL source files from their original location in the previous step, open
hdlverifier_compile.tcl
from the current folder. Under the sectionAdd source files to project
, set theSRCx
variables as the directories that contain the HDL source files. Save your changes and close the file.Open
hdlverifier_gendll.tcl
from the current folder. The debug option is specified inline 2
. You can change `-value {off}
` to `-value {waves}
` or `-value {all}
`. Save your changes and close the file.Run
hdlverifier_compile
in the MATLAB command window.Run
hdlverifier_gendll_<DUT>
in the MATLAB command window.
Now your model is ready for use in your new
directory
.
Questa Simulator
If your HDL Cosimulation block uses the Questa™ simulator, follow these steps:
Copy these files from your
current directory
to thenew directory
:Simulink model file (
.slx
) containing the generated HDL Cosimulation block and the corresponding cyan blocks labeled Compile HDL Design and Launch HDL SimulatorHDL source files
Note
You do not need to copy the HDL source files if for example the source directories holding these files are on a shared disk that holds a repository of IP.
compile_hdl_design_<DUT>.m
hdlverifier_compile_design.do
launch_hdl_simulator_<DUT>.m
parameter_<DUT>.cfg
If you have copied the HDL source files from their original location in the previous step, open
hdlverifier_compile_design.do
from the new directory. Under the sectionAdd source files to project
, set theSRCx
variables as the directories that contain the HDL source files. Save your changes and close the file.
Now your model is ready for use in your new
directory
.
Xcelium Simulator
If your HDL Cosimulation block uses the Xcelium™ simulator, follow these steps:
Copy these files from the
current directory
to thenew directory
:Simulink model file (
.slx
) containing the generated HDL Cosimulation block and the corresponding cyan blocks labeled Compile HDL Design and Launch HDL SimulatorHDL source files
Note
You do not need to copy the HDL source files if for example the source directories holding these files are on a shared disk that holds a repository of IP.
compile_hdl_design_<DUT>.m
hdlverifier_incisive_compile.sh
launch_hdl_simulator_<DUT>.m
parameter_<DUT>.cfg
If you have copied the HDL source files from their original location in the previous step, open
hdlverifier_incisive_compile.sh
from thenew directory
. Under the section "Define Source Folders", set theSRCx
variables as the directories that contain the HDL source files. Save your changes and close the file.
Now your model is ready for use in your new
directory
.