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

Vivado Design Suite User Guide: Logic Simulation (UG900)

Document ID
Release Date
2023.2 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 script calls source <tb>_compile/ For example:
source 2>&1 | tee -a compile.log
The simulate script calls vsim -64 -c -do do {<tb>}. For example:
$bin_path/vsim -64 -c -do 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 simulat script. In compile and elaborate shell scripts, it calls vsim -c -do do {<tb>_compile/}. For example,
$bin_path/vsim -64 -c -do 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 the 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)


By default, the generated 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.
By default, on error or break, the 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>
onbreak {quit -f}
onerror {quit -f}