Generate simulation scripts of the design and launch steps for the target simulator.
Syntax
launch_simulation [‑step <arg>] [‑simset <arg>] [‑mode <arg>] [‑type <arg>]
[‑scripts_only] [‑exec] [‑of_objects <args>] [‑absolute_path]
[‑install_path <arg>] [‑gcc_install_path <arg>] [‑noclean_dir] [‑quiet]
[‑verbose]
Usage
Name | Description |
---|---|
[-step]
|
Launch a simulation step. Values: all, compile, elaborate, simulate. Default:all (launch all steps). Default: all |
[-simset]
|
Name of the simulation fileset |
[-mode]
|
Simulation mode. Values: behavioral, post-synthesis, post-implementation Default: behavioral |
[-type]
|
Netlist type. Values: functional, timing. This is only applicable when mode is set to post-synthesis or post-implementation |
[-scripts_only]
|
Only generate scripts |
[-exec]
|
Execute existing script for the step specified with the -step switch |
[-of_objects]
|
Generate compile order file for this object (applicable with -scripts_only option only) |
[-absolute_path]
|
Make design source file paths in 'absolute' format |
[-install_path]
|
Custom installation directory path |
[-gcc_install_path]
|
Specify GNU compiler installation directory path for the g++/gcc executables |
[-noclean_dir]
|
Do not remove simulation run directory files |
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
Categories
Description
Launch a simulator to perform analysis and verification of a design.
The launch_simulation
command creates a script file for the target simulator and then executes this file in the simulation run directory. The simulation results are saved in the log files created in the run directory.
TARGET_SIMULATOR
property on the design project:
set_property TARGET_SIMULATOR <name>
[current_project]
The TARGET_SIMULATOR
property can have a value of XSim
,
ModelSim
, Xcelium
, VCS
,
Riviera
, or ActiveHDL
. The default value is
XSim
, the Vivado simulator.
launch_simulation
command uses a three-step process comprised of compile,
elaborate, and simulate steps. A script file for the target simulator is created for
each step in the process, (compile.bat,
elaborate.bat, simulate.bat), and
written to the simulation run directory. By default, launch_simulation
will run these script files in sequence to run the simulation. You can create the scripts without running them by using the -scripts_only
option.
This command returns a transcript of its process, or returns an error if it fails.
Arguments
-simset <arg>
- (Optional) The name of the simulation fileset containing the simulation test benches and sources to be used during simulation. If not specified, the current simulation fileset is used.
-mode [ behavioral | post-synthesis | post-implementation ]
- (Optional) Specifies either a behavioral simulation of the HDL design sources to verify syntax and confirm that the design performs as intended, a functional or timing simulation of the post-synthesis netlist, or a functional or timing simulation of the post implementation design to verify circuit operation after place and route. The default mode is behavioral.
-type [ functional | timing ]
- (Optional) Specifies functional simulation of just the netlist, or timing simulation of the netlist and SDF file. This option must be specified with -mode
for post-synthesis or post-implementation, but cannot be used with -mode behavioral
. Post-synthesis timing simulation uses SDF component delays from the synth_design
command. Post-implementation timing simulation uses SDF delays from the place_design
and route_design
commands.
-type
with -mode behavioral
, or the tool will return an error.
-scripts_only
- (Optional) Only generate the simulation scripts for the target simulator, rather than actually launching these scripts to start the "compile", "elaborate" and "simulate" steps. You can use the scripts to launch the simulation flow at a later time.
-of_objects <arg>
- (Optional) Run simulation for a single specified sub-design, or composite file. The sub-design must be specified as a design object as returned by the get_files
command, rather than simply specified by name.
-absolute_path
- (Optional) Specify this option to define the source and include paths used in the simulation scripts as absolute paths. By default, all paths are written as relative to the simulation run directory. Relative paths include an "origin_dir" variable that is set in the simulation script to the current run directory, but you can edit the $origin_dir variable to point to a path of your choice when relocating the design and simulation scripts.
-install_path <arg>
- (Optional) Specifies the directory containing simulator executables ( e.g. vlog.exe, ncvlog, vlogan). If this option is not specified, the target simulator will be looked for in the current $PATH
.
-gcc_install_path <arg>
- (Optional) Specifies the directory containing simulator GCC executables (e.g. gcc, g++). If this switch is not specified, then the directory path will be determined from the project property named "simulator.<name>_gcc_install_dir". If this property is not set, then the path set by the GCC_SIM_EXE_PATH
environment variable will be used. If this variable is not set, then launch_simulation will automatically try to calculate the path from the simulator installation. If not able to determine, the path will then be searched from the $PATH
(Linux) or %PATH%
(Windows) environment variable.
- questa - 5.3.0
- xcelium - 6.3
- vcs - 6.2.0
-noclean_dir
- (Optional) Do not remove files from the simulation run directory prior to launching the simulator. The default behavior is to remove files from the simulation run directory to create a clean start. With the -noclean_dir
option, existing files in the run directory are left in place. However, some of the files generated for use by the simulator will be overwritten or updated by re-launching the simulator.
-step
- (Optional) Specifies the simulation step to be launched. The valid steps
are: compile, elaborate, and simulate.
-exec
– (Optional) Execute script for the step specified with the
-step
switch. The script must be generated first and should be
present in the simulation run directory.
-step
only.-quiet
- (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
-verbose
- (Optional) Temporarily override any message limits and return all messages from this command.
set_msg_config
command.Examples
set_property target_simulator "XSim" [current_project]
launch_simulation
set_property target_simulator "ModelSim" [current_project]
launch_simulation -mode "post-synthesis" -type "functional"
set_property target_simulator "Xcelium" [current_project]
launch_simulation -mode "post-implementation" -type "functional"
set_property target_simulator "VCS" [current_project]
launch_simulation -mode "post-implementation" -type "timing"
launch_simulation -scripts_only
The following command will generate and execute compile step:
launch_simulation -step compile
The following command will execute elaborate step by executing the existing elaborate script in the simulation run directory:
launch_simulation -step elaborate -exec
my_simset
simulation fileset for the target simulator in the
simulation run directory:
launch_simulation -simset [get_filesets my_simset]
launch_simulation -noclean_dir -of_objects [get_files char_fifo.xci]
launch_simulation -absolute_path
launch_simulation -install_path /tools/ius/13.20.005/tools/bin
The following command will pick the Xcelium simulator tools from the specified installation path instead of from the PATH variable:
launch_simulation -install_path /tools/20.09.006/tools/xcelium/bin