(User-written application) Export a script and associated data files (if any) for driving standalone simulation using the specified simulator.
Syntax
export_simulation [‑simulator <arg>] [‑of_objects <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] [‑32bit] [‑force] [‑quiet] [‑verbose]
Returns
None
Usage
Name | Description |
---|---|
[-simulator]
|
Simulator for which the simulation script will be created (value=all|xsim|modelsim|questa|ies|xceliu m|vcs|riviera|activehdl) Default: all |
[-of_objects]
|
Export simulation script for the specified object Default: None |
[-ip_user_files_dir]
|
Directory path to the exported IP/BD (Block Design) user files (for static, dynamic and data 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, then please follow the instructions in the generated script header to manually provide the simulation library mapping information. Default: Empty |
[-script_name]
|
Output script filename. If not specified, then a 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]
|
Run simulation for this time (default:full simulation run or until a logical break or finish condition) Default: Empty |
[-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 |
[-use_ip_compiled_libs]
|
Reference pre-compiled IP static library during compilation. This switch requires -ip_user_files_dir and -ipstatic_source_dir switches as well for generating scripts using pre-compiled IP library. |
[-absolute_path]
|
Make all file paths absolute |
[-export_source_files]
|
Copy IP/BD design files to output directory |
[-generate_hier_access]
|
Extract path for hierarchical access simulation |
[-32bit]
|
Perform 32bit compilation |
[-force]
|
Overwrite previous files |
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
Categories
Description
Export a simulation script file for the target simulator. Currently the Cadence Incisive Enterprise Simulator (ies
) and the Synopsys VCS MX simulator (vcs_mx
) are supported. 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 text file with the compiler commands and default options for the target simulator. The specified object can be either a simulation fileset or an IP. If the object is not specified, then the export_simulation
command will generate the script for the 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 "reference_dir" variable that is defined in the generated script. To make these paths absolute, specify the -absolute_path
option.
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 "glbl.v" from the software installation path to the output directory.
A default ".do" file will be created in the output directory for the target simulator that will be referred in the compiler commands in the script.
compile_simlib
command, with the compiled library directory path specified, when generating this script. The generated simulation script will automatically include the setup files for the target simulator from the compiled library directory.This command returns nothing.
Arguments
-of_objects
<arg> - (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 core. If this option is not specified then the command will generate simulation scripts for the current simulation fileset.
-of_objects
option requires objects to be specified using the get_*
commands, such as get_cells
or get_pins
, rather than specifying objects by name. In addition, -of_objects
cannot be used with a search <pattern>.
-lib_map_path
<arg> - (Optional) Specify the pre-compiled simulation library directory path where the Xilinx simulation libraries are compiled. Please see the header section in the generated script for more information.
-script_name
<arg> - (Optional) Specify the name of the shell script. If this option is not specified then the filename will be generated based on the object type selected with -of_objects
switch, with the following form:
- <simulation_top_name>_sim_<simulator>.sh
- <ip_name>_sim_<simulator>.sh
-absolute_path
- (Optional) Specify this option to make source and include directory paths used in the script absolute. By default, all paths are written as relative to the directory path that is specified with the -dir
option. A "reference_dir" variable will be set in the simulation script to the directory path that is specified with the -directory
option.
-32bit
- (Optional) Specify this option to perform 32-bit simulation. If this option is not specified then by default a 64-bit option will be added to the simulation command line.
-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.
-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.
-dir
<arg> - (Required) Specify the directory path where the simulation files will be exported.
-simulator [ ies | vcs_mx ]
- (Required) Specify the target simulator name for the simulation script. The valid simulators are ies
and vcs_mx
.
Examples
export_simulation -simulator ies -directory .
export_simulation -force -simulator ies -directory .
export_simulation -simulator ies -directory ./test_sim \
-script_name test_ies.sh
export_simulation -simulator ies -directory ./test_sim
export_simulation -of_objects [get_files accum_0.xci] \
-simulator ies -directory test_sim
export_simulation -of_objects [get_ips accum_0] -simulator vcs_mx \
-directory test_sim
export_simulation -of_objects [get_filesets sim_fifo_test] \
-simulator ies -directory test_sim
export_simulation -force -32bit -simulator vcs_mx -directory test_bft_vcs_mx
export_simulation -lib_map_path "/sim_libs/ius/lin64/lib" \
-simulator ies -directory "test_sim"
export_simulation -lib_map_path "/sim_libs/vcs/lin64/lib" \
-simulator vcs_mx -directory "test_sim"
export_simulation -lib_map_path "/sim_libs/ies/lin64/lib" \
-simulator ies -directory "./test_sim/ies"
cd test_sim/ies
./top_tb_sim_ies.sh
export_simulation -lib_map_path "/sim_libs/vcs/lin64/lib" \
-simulator vcs_mx -directory "./test_sim/vcs_mx"
cd test_sim/vcs_mx
./top_tb_sim_vcs_mx.sh