Main Content

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 block

  • xsim.dir folder

If you need to change the debug option for the HDL Cosimulation block at the new directory, follow these steps:

  1. Copy these files from your current directory to the new directory:

    • Simulink model file (.slx) containing the generated HDL Cosimulation block

    • HDL 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

  2. Open MATLAB® and set the new directory as the current folder for MATLAB. Then:

    1. 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 section Add source files to project, set the SRCx variables as the directories that contain the HDL source files. Save your changes and close the file.

    2. Open hdlverifier_gendll.tcl from the current folder. The debug option is specified in line 2. You can change `-value {off}` to `-value {waves}` or `-value {all}`. Save your changes and close the file.

    3. Run hdlverifier_compile in the MATLAB command window.

    4. 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:

  1. Copy these files from your current directory to the new directory:

    • Simulink model file (.slx) containing the generated HDL Cosimulation block and the corresponding cyan blocks labeled Compile HDL Design and Launch HDL Simulator

    • HDL 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

  2. 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 section Add source files to project, set the SRCx 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:

  1. Copy these files from the current directory to the new directory:

    • Simulink model file (.slx) containing the generated HDL Cosimulation block and the corresponding cyan blocks labeled Compile HDL Design and Launch HDL Simulator

    • HDL 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

  2. If you have copied the HDL source files from their original location in the previous step, open hdlverifier_incisive_compile.sh from the new directory. Under the section "Define Source Folders", set the SRCx 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.

See Also

|