compile_simlib - 2024.2 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2024-11-13
Version
2024.2 English

Compile simulation libraries

Syntax

compile_simlib [‑directory <arg>] [‑family <arg>] [‑force]
    [‑language <arg>] [‑library <arg>] [‑print_library_info <arg>]
    ‑simulator <arg> [‑simulator_exec_path <arg>] [‑gcc_exec_path <arg>]
    [‑source_library_path <arg>] [‑no_ip_compile] [‑no_systemc_compile]
    [‑skip_libraries <args>] [‑quiet] [‑verbose]

Usage

Name Description
[-directory] Directory path for saving the compiled results Default: .
[-family] Select device architecture Default: all
[-force] Overwrite the pre-compiled libraries
[-language] Compile libraries for this language Default: all
[-library] Select library to compile Default: all
[-print_library_info] Print Pre-Compiled library information
-simulator Compile libraries for this simulator
[-simulator_exec_path] Use simulator executables from this directory
[-gcc_exec_path] Use GNU executables from this directory
[-source_library_path] If specified, this directory will be searched for the library source files before searching the default path(s) found in environment variable XILINX_VIVADO for Vivado
[-no_ip_compile] Do not compile IP static files from repository
[-no_systemc_compile] Do not compile models for system simulation
[-skip_libraries] Name of the libraries to skip for compilation
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution

Categories

Description

Compile simulation libraries for the cells and IP used in the current project, or from a specified directory for use in multiple design projects.

The AMD Vivado™ Design Suite provides simulation models as a set of files and libraries that contain the behavioral and timing models for use by the Vivado simulator. Thecompile_simlib command compiles these libraries for use by third-party simulators prior to design simulation. Libraries must generally be compiled or recompiled with a new software release to update simulation models and to support a new version of a simulator.

Important: Ensure to rerun the compile_simlib command any time a new third-party simulator is used, or a new Vivado Design Suite version or update is installed.

When this command is run from a current project, the tool uses the device family, target language, and library settings specified by the project as the default values, rather than the default settings of the command defined below. The default settings can be overridden by specifying the necessary options when the command is run.

The compile_simlib command uses simulator compilation directives when compiling the simulation libraries. You can edit the default configuration settings using the config_compile_simlib command.

The command returns information related to the compiled libraries, or an error if it fails.

Arguments

-directory <arg> - (Optional) Directory path for saving the compiled library results.

Note: By default, the libraries are saved in the current working directory in Non-Project mode, and the libraries are saved in <project>/<project>.cache/compile_simlib directory in Project mode. Refer to the Vivado Design Suite User Guide: Design Flows Overview (UG892) for more information on Project and Non-Project modes.

-family <arg> - (Optional) Compile simulation libraries for the specified device family. If this switch is not specified, the libraries for all families are compiled. The following values are supported for this <arg>:

  • all (generate libraries for all device families, the default)
  • kintex7 - AMD Kintex™ 7 family
  • virtex7 - AMD Virtex™ 7 family
  • artix7 - AMD Artix™ 7 family
  • spartan7 - Spartan™-7 family
  • zynq - AMD Zynq™ 7000 family
  • kintexu - AMD Kintex™ UltraScale™ family
  • kintexuplus - AMD Kintex™ UltraScale+™ family
  • virtexu - AMD Virtex™ UltraScale™ family
  • virtexuplus - AMD Virtex™ UltraScale+ family
  • artixuplus - AMD Artix™ UltraScale+™ family
  • zynquplus - AMD Zynq™ UltraScale+™ family
  • zynquplusrfsoc - AMD Zynq™ UltraScale+™ RFSoC family
  • versal - AMD Versal™ Adaptive SoC family

-force - (Optional) Overwrite the current pre-compiled libraries.

-language [ verilog | vhdl | all ] - (Optional) This option is only needed for use with -no_ip_compile, and will compile base simulation libraries for the specified language. If this option is not specified then the language will be set according to the simulator selected with -simulator. For multi-language simulators both Verilog and VHDL libraries will be compiled.

Tip: By default, compile_simlib compiles simulation libraries for IP, and compiles all languages for the IP.

-library <arg> - (Optional) Specify the simulation library to compile. As a default, the compile_simlib command will compile all simulation libraries. Valid values are:

  • all (the default)
  • unisim
  • simprim

To specify multiple libraries, repeat the -lib options for each library. For example:

.. -library unisim -library simprim ..

-print_library_info - (Optional) Print the library information for the compiled simulation library.

-simulator <arg> - (Required) Compile simulation libraries for the specified simulator. The following values are supported for this<arg>.

  • modelsim - ModelSim Simulator version 2024.1
  • questa - Questa Advanced Simulator version 2024.1
  • xcelium - (Linux only) Xcelium Parallel Simulator version 24.03.003
  • vcs - (Linux only) Verilog Compiler Simulator version V-2023.12-SP1
  • riviera - Riviera-PRO Simulator version 2024.04
  • activehdl - (Windows only) Active-HDL Simulator version 15.0

-simulator_exec_path <arg> - (Optional) Specify the directory to locate the third-party compiler and simulator executables. This option is required if the target simulator is not specified in the $PATH or %PATH% environment variable; or to override the path from the $PATH or %PATH% environment variable.

-gcc_exec_path <arg> - (Optional) Specify the directory to locate the third-party simulator GCC executables. If this switch is not specified, then the directory path will be determined from the path set by the GCC_SIM_EXE_PATH environment variable. If this variable is not set, then compile_simlib will automatically try to calculate the path from the simulator installation. If not able to determine, the path will be then searched from the $PATH (Linux) or %PATH% (Windows) environment variable.

Supported GCC versions.

  • questa - 7.4.0
  • xcelium - 9.3.0
  • vcs - 9.2.0
  • riviera - 9.3.0

-source_library_path <arg> - (Optional) If specified, this directory will be searched for the library source files before searching the default path(s) defined by the environment variables ($XILINX or $XILINX_VIVADO).

Note: Do not use this option unless explicitly instructed to by the Technical Support.
-skip_libraries <arg> - (Optional) Disables the compilation of specified libraries.
<arg>: [list <lib1> <lib2> ... <libn>]

-no_ip_compile - (Optional) Disables the compilation of simulation files for IP in the design or the specified repositories. By default, the compile_simlib command compiles the static simulation files for all IP in the IP catalog, including added user and third-party repositories. Use this option to disable that feature.

-no_systemc_compile - (Optional) Disables the compilation of Systemc/C++/C based IPs. If your design does not need to be verified for system simulation then you can specify this option.

-32bit - (Optional) Perform simulator compilation in 32-bit mode instead ofthe default 64-bit compilation.

-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.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.

Examples

The following example compile UNISIM and SIMPRIM libraries for ModelSim (VHDL) for a design using a Virtex 7 device:

compile_simlib -simulator modelsim -family virtex7 -library unisim \
   -library simprim -language vhdl