Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

3.7.10.2.1. Set Up the Simulation Environment

This tutorial includes test program files that you can use with the Platform Designer-generated testbench and ModelSim simulation script. To learn more about Platform Designer 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 Platform Designer-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 Platform Designer-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 Platform Designer-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 Platform Designer 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.