Performing Standard Hardware Co-Simulation - 2020.2 English

Model Composer and System Generator User Guide (UG1483)

Document ID
UG1483
Release Date
2020-11-18
Version
2020.2 English

If you are performing the standard (non-burst mode) hardware co-simulation, your Simulink model will contain a JTAG or Point-to-Point Ethernet hardware co-simulation block. This block was created automatically when System Generator finished compiling your design into an FPGA bitstream (see Compiling a Model for Hardware Co-Simulation). The block is stored in a Simulink library with this file name:

<design_name>_hwcosim_lib.slx

The hardware co-simulation block was moved into your Simulink model at the end of the compilation procedure. In the following procedure, you will have to wire up this block in your Simulink model to perform hardware co-simulation.

Note: If your board contains a Zynq® SoC device, you must install the Vitis™ unified software platform with the Vivado® Design Suite to perform hardware co-simulation.
Figure 1. Hardware Co-Simulation Block

To perform the standard hardware co-simulation:

  1. Connect the hardware co-simulation block to the Simulink blocks that supply its inputs and receive its outputs.
    Figure 2. Connect to Simulink Blocks
  2. Double-click the hardware co-simulation block to display the properties dialog box for the block.
    Note: There are different block properties for JTAG hardware co-simulation and for Point-to-Point Ethernet hardware co-simulation.
    Figure 3. Hardware Co-Simulation Library Block Properties
  3. Fill out the block parameters in the properties dialog box.

    The properties are described in Block Parameters for the JTAG Hardware Co-Simulation Block or Block Parameters for the Ethernet Hardware Co-Simulation Block.

  4. Set up the board for performing hardware co-simulation.
  5. If you are performing Point-to-Point Ethernet hardware co-simulation:
    1. Set up the Local Area Network on the PC to allow you to perform hardware co-simulation.

      This procedure is described in Setting Up the Local Area Network on the PC.

    2. If your PC is operating behind a firewall, disable the firewall while the hardware co-simulation runs.
    3. Optionally, disable any virus protection program running on the PC while the hardware co-simulation runs.
  6. In the Simulink model, simulate the model and the hardware by selecting Simulation > Run or clicking the Run simulation button.
    Figure 4. Run Button

    Running the simulation will simulate both the System Generator design (or subsystem) in your Simulink model and the Xilinx device on your target board. You can then examine the results of the two simulations and compare the results to determine if the design implemented in hardware will operate as expected.