Embedded Design Handbook

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

6.5.4. Running Simulation in the ModelSim Simulator Using Nios II SBT for Eclipse

After you have launched the ModelSim simulator from the Nios® II SBT for Eclipse, ModelSim automatically compiles the required device libraries and system design files, and elaborates and loads the top-level design. The msim_setup.tcl script creates alias commands for each of the steps. These commands are listed in the table below.

Table 53.   Nios® II Alias Commands
Macros Description
dev_com Compiles device library files.
com Compiles the design files in correct order.
elab Elaborates the top-level design.
elab_debug Elaborates the top-level design with the novopt option.
ld Compiles all the design files and elaborates the top-level design.
ld_debug Compiles all the design files and elaborates the top-level design with the novopt option.

Run the simulation in the ModelSim simulator by performing the following steps:

  1. In the ModelSim software, on the File menu, click Load. Browse to <your project directory>/ an351_design and select wave.do. This step opens a waveform viewer with all the JTAG UART signals.
  2. In the Transcript window, type run 2 ms. This step starts the simulation for two milliseconds.