Qsys System Design Tutorial

ID 683378
Date 5/04/2015
Public
Document Table of Contents

1.10.2.1. Set Up the Simulation Environment

This tutorial includes test program files that you can use with the Qsys-generated testbench and ModelSim simulation script. To learn more about Qsys simulation support, open and review the simulation script, \simulation_tutorial\load_sim.tcl. After your review of the script, close the script without making changes.

The load_sim.tcl script sets simulation variables to set up the correct hierarchical paths in the Qsys-generated simulation model and ModelSim script. Additionally, the script identifies the top-level instance name for the simulation and provides the path to the location of the Qsys-generated files. Some functions, such as memory initialization, rely on correct hierarchical paths names in the simulation model.

The load_sim.tcl script performs the following actions:

  • Sources the Qsys-generated ModelSim simulation script, msim_setup.tcl.
  • Uses the command aliases defined in the msim_setup.tcl script to compile and elaborate the files for the Qsys testbench simulation model.
  • Compiles and elaborates the extra simulation files for the tutorial—the test program and top-level simulation file that instantiates the test program.
  • Loads the wave.do file that provides signals for the ModelSim waveform view.