Export a simulation script file for the target simulator. The generated script will contain simulator commands for compiling, elaborating and simulating the design.
export_simulation
can be used in place of launch_simulation -scripts_only
to generate scripts
file.export_simulation [-simulator <arg>] [-of_objects <arg>]
[-step <arg>] [-ip_user_files_dir <arg>] [-
ipstatic_source_dir <arg>]
[-lib_map_path <arg>] [-script_name <arg>]
[-directory <arg>] [-runtime <arg>] [-define <arg>]
[-generic <arg>] [-include <arg>] [-use_ip_compiled_libs]
[-absolute_path] [-export_source_files]
[-generate_hier_access] [-force] [-quiet]
[-verbose][-gcc_install_path <arg>] [-more_options <arg>]
Usage
Name | Description | |
---|---|---|
[-simulator]
|
Simulator for which the simulation script will be created. Allowed values are all, xsim, modelsim, questa, vcs, xcelium, riviera, and activehdl. Default: all |
|
[-of_objects]
|
Export simulation script for the specified object. Default: None |
|
[-step]
|
Name of the step for which the simulation script needs to be generated. Default: None |
|
[-ip_user_files_dir]
|
Directory path to exported IP/BD user files (for static, dynamic and data files). For a managed-IP project, the default path is ip_user_files. Default: Empty |
|
[-ipstatic_source_dir]
|
Directory path to the exported IP/BD static files. Default: Empty |
|
[-lib_map_path]
|
Precompiled simulation library directory path. If not specified, follow the instructions in the generated script header to manually provide the simulation library mapping information. Default: Empty |
|
[-gcc_install_path]
|
GNU compiler installation directory path for the g++/gcc
executables. If not specified, tool will attempt to find based on
simulator install path settings. Default: Empty |
|
[-script_name]
|
Output shell script filename. If not specified, then file with a default name will be created. Default: top_module.sh |
|
[-directory]
|
Directory where the simulation script will be generated. Default: export_sim |
|
[-runtime]
|
Simulation run time. Default: full simulation run or until a logical break or finish condition |
|
[-define]
|
Read Verilog defines from the list specified with this switch. Default: Empty |
|
[-generic]
|
Read VHDL generics from the list specified with this switch. Default: Empty |
|
[-include]
|
Read include directory paths from the list specified with this switch. Default: Empty |
|
[-more_options]
|
Pass specified options to the simulator tool. Default: Empty |
|
[-use_ip_compiled_libs]
|
Reference pre-compiled IP static library during compilation. This
switch also works with -ip_user_files_dir and -ipstatic_source_dir switches also for generating
scripts using pre-compiled IP library. |
|
[-absolute_path]
|
Make all file paths absolute with respect to the reference directory. | |
[-export_source_files]
|
Copy IP/BD design files to output directory. | |
[-generate_hier_access]
|
Extract path for hierarchical access simulation | |
[-force]
|
Overwrite previous files. | |
[-quiet]
|
Ignore command errors. | |
[-verbose]
|
Suspend message limits during command execution. |
Description
Export a simulation script file for the target simulator (please see the list of supported simulators below). The generated script will contain simulator commands for compiling, elaborating and simulating the design.
The command will retrieve the simulation compile order of specified objects, and export this information in a shell script with the compiler commands and default options for the target simulator. The specified object can be either a simulation fileset, IP or a BD (block design).
If the object is not specified, then this command will generate the
script for the active simulation top
. Any Verilog
include directories or file paths for the files containing Verilog define statements
will be added to the compiler command line.
By default, the design source file and include directory paths in the
compiler command line will be set relative to the ref_dir
variable that is set in the generated script. To make these
paths absolute, specify the -absolute_path
switch.
The command will also copy data files (if any) from the fileset, or from an IP, to the output directory. If the design contains Verilog sources, then the generated script will also copy the glbl.v file from the software installation path to the output directory.
A default .do file that is used in the compiler commands in the simulation script for the target simulator, will be written to the output directory.
compile_simlib
Tcl command. The compiled library
directory path must be specified when generating this script. The generated script
will automatically include the setup files for the target simulator from the
compiled library directory.Supported Simulators
- Vivado simulator (xsim)
- ModelSim Simulator (modelsim)
- Questa Advanced Simulator (questa)
- Verilog Compiler Simulator (vcs)
- Riviera-PRO Simulator (riviera)
- Active-HDL Simulator (activehdl)
- Cadence Xcelium Parallel Simulator (xcelium)
Arguments
-
-of_objects
- (Optional) Specify the target object for which the simulation script file needs to be generated. The target object can be either a simulation fileset (simset) or an IP. If this option is not specified then this command will generate file for the current simulation fileset.
-
-step
- (Optional) Specify the name of the step for which the simulation script needs to be generated. The valid step values are : compile, elaborate, simulate. If this is not specified, the script will execute all the steps applicable.
-
-ip_user_files_dir
- (Optional) Specify the directory path to the extracted design files for the generated IP/BD source. For a managed-IP project, the default path is ip_user_files. If this is not specified, the extracted design files will be picked from the default directory path that is set by the "ip.user_files_dir" project property.
-
-ipstatic_source_dir
- (Optional) specify the directory path to the exported IP/BD generated static source files. For a managed-IP project, the default path is ip_user_files/ipstatic. If this option is not specified, the extracted design file will be picked from the default directory path that is set by the "sim.ipstatic.source_dir" project property.
-
-lib_map_path
- (Optional) Specify path to the Xilinx pre-compiled
simulation library for the selected simulator. The simulation library is
compiled using
compile_simlib
. See the header section in the generated script for more information. If this switch is not specified, then the generated script will not reference the pre-compiled simulation library and the static IP files will be locally compiled. -
-gcc_install_path
- (Optional) Specify the directory path to the GNU executable for the target simulator. This option is required for designs that contain SystemC, C++ or C source. If this option is not specified, the tool will attempt to calculate the path to the GNU executagble based ont eh simulator install path settings.
-
-script_name
- (Optional) Specify name of the generated script. Default
name is
<simulation_top>.sh
. If the -of_objects switch is specified, then the default syntax of the script will be as follows:-of_objects [current_fileset -simset] .sh -of_objects [get_ips ] .sh -of_objects [get_files .xci] .sh -of_objects [get_files .bd] .sh
-
-absolute_path
- (Optional) Specify this option to make source and include
directory paths absolute. By default, all paths are set relative to the
output directory specified with the
-directory
switch. -
-force
- (Optional) Overwrite an existing script file of the same name. If the script
file already exists, the tool returns an error unless the
-force
argument is specified. -
-directory
- (Required) Specify the directory path where the script file will be exported.
-
-simulator
- (Required) Specify the target simulator name for the
simulation script. The valid simulators names are
xsim
,modelsim
,questa
, andvcs
(orvcs_mx
). -
-quiet
- (Optional) Execute the command quietly, ignoring any command line errors and returning no messages. 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.
-
-generate_hier_access
- (Optional) Extract path for hierarchical access simulation.
-
-runtime
- (Optional) Specify simulation run-time. If not specified, then simulation will run until finding a logic break or finish delcaration. Alternatively, run time can be specified using the "<simulator>.simulate.runtime" fileset property
-
-define
- (Optional) Specify the list of verilog defines used in the design. Alternatively, defines can be specified using the "verilog_defines" fileset property.
-
-generic
- (Optional) Specify the list of VHDL generics used in the design. Alternatively, can be specified using the "vhdl_generic" fileset property.
-
-include
- (Optional) Specify the list of include directory paths for verilog include files in the design. Alternativiely, can be specified using the "include_dirs" fileset property.
-
-export_source_files
- (Optional) Specify this option to copy the IP design files to the generated
script directory in a sub-directory named
srcs
. The generated script will reference the design files from this srcs directory.