Simulation Step Control Constructs for ModelSim and Questa Advanced Simulator - 2022.1 English

Vivado Design Suite User Guide: Logic Simulation (UG900)

Document ID
UG900
Release Date
2022-04-21
Version
2022.1 English

The following table outlines the constructs used for controlling the step execution based on the do file format:

Native do file
This is a default do file format. In this format, the compile and elaborate shell scripts calls source <tb>_compile/elaborate.do. For example:
source bft_tb_compile.do 2>&1 | tee -a compile.log
The simulate script calls vsim -64 -c -do do {<tb>_simulate.do}. For example:
$bin_path/vsim -64 -c -do do {bft_tb_simulate.do} -l simulate.log
Classic do file
Classic do file format is different from the native do file in compile and elaborate shell scripts. There is no change in the simulate script. In compile and elaborate shell scripts, it calls vsim -c -do do {<tb>_compile/elaborate.do}. For example,
$bin_path/vsim -64 -c -do do {bft_tb_compile.do} -l compile.log
To get this, set project.writeNativeScriptForUnifiedSimulation to 0 by invoking set_param project.writeNativeScriptForUnifiedSimulation 0 on Tcl console command.

This file format is useful for a shared project as the path for Questa Advanced Simulator/ModelSim utility is hard-coded inside the shell scripts.

Table 1. Simulation Step Control Construct Parameters
Parameter Description Default
project.writeNativeScriptForUnifiedSimulation Write a pure .do file with simulator command only (no Tcl or Shell constructs). 0 (false)
simulator.quitOnSimulationComplete Quit simulator on simulator completion for ModelSim/Questa Advanced Simulator simulation. To disable quit, set this parameter to false. 1 (true)
simulator.modelsimNoQuitOnError Do not quit on error or break by default for ModelSim/Questa Advanced Simulator simulation. To quit simulation on error or break, set this parameter to false. 1 (true)

Explanation

simulator.quitOnSimulationComplete
By default, the generated simulate.do has quit -force. When the simulation is complete in the specified time, the simulator exits. If you do not want the simulator to exit, set simulator.quitOnSimulationComplete to 0 by invoking set_peram simulator.quitOnSimulationComplete 0.
simulator.modelsimNoQuitOnError
By default, on error or break, simulator does not exit. If you want to exit the simulator, set the following parameter:
set_param simulator.modelsimNoQuitOnError 0
This adds the following two lines in <tb>_simulate.do.
onbreak {quit -f}
onerror {quit -f}