AR# 53678


How do I compile the simulation libraries for Vivado Design Suite?


Before I can simulate my design using a third party simulation tool, I need to compile the applicable libraries and map them to the simulator.

How can I compile Xilinx Vivado simulation libraries for third party simulators?


Libraries are typically compiled (or recompiled) any time a new simulator version is installed, when you update to a new version of Vivado, or when any library source files are modified (either by you or by a software patch). 

In Vivado tools, you can do this either in GUI or Tcl mode.

GUI Mode 
Starting in 2014.3, there is a feature in the GUI that allows you to generate the Xilinx simulation libraries for the target simulator.
  1. Open Vivado in GUI mode.
  2. Select Tools >Compile Simulation Libraries to open the "Compile Simulation Libraries" dialog box.
  3. Set the options you need and click the Compile button to start the compilation.
Dialog Box Options
  • Simulator: From the Simulator drop-down menu, select a simulator.
  • Language: Compiles libraries for the specified language.
    If this option is not specified, then the language is set to correspond with the selected simulator (above).
    For multi-language simulators, both Verilog and VHDL libraries are compiled.
  • Library: Specifies the simulation library to compile.
    By default, the compile_simlib command compiles all simulation libraries.
  • Family: Compiles selected libraries to the specified device family.
    All device families are generated by default.
  • Compiled library location: Directory path for saving the compiled library results.
    By default, the libraries are saved in the current working directory in Non-Project mode, and the libraries are saved in the <project>/<project>.cache/compile_simlib directory in Project mode.
  • Simulator executable path: Specifies the directory to locate the simulator executable.
    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.
  • Overwrite current pre-compiled libraries: Overwrites the current pre-compiled libraries.
  • Compile 32-bit libraries: Performs simulator compilation in 32-bit mode instead of the default 64-bit compilation.
  • Verbose: Temporarily overrides any message limits and return all messages from this command.
At the bottom of the Compile Simulation Libraries dialog box, there is a field labeled Command.

The value of the Command field changes is based on the options you select.

You can use the value of the Command field to generate a simulation library in Tcl/non-project mode.

Tcl Mode
Run the Tcl command "compile_simlib".
compile_simlib  [-directory <arg>] [-family <arg>] [-force] [-language <arg>]  
                [-library <arg>] [-print_library_info <arg>] -simulator <arg>  
                [-simulator_exec_path <arg>] [-source_library_path <arg>]      
                [-32bit] [-quiet] [-verbose]  

Tcl mode options:
Name Description
[-directory] Directory path for saving the compiled results.
[-family] Selects device architecture. Default: all
[-force] Overwrites the pre-compiled libraries
[-language] Compiles libraries for this language. Default: all
[-library] Selects library to compile. Default: all
[-print_library_info] Prints pre-compiled library information
[-simulator] Compiles libraries for this simulator
[-simulator_exec_path] Uses simulator executables from this directory
[-source_library_path] If specified, this directory is searched for the library source files before searching the default path(s) found in the environment variable XILINX_VIVADO for Vivado.
[-32bit] Performs the 32-bit compilation
[-quiet] Ignores command errors
[-verbose] Suspends message limits during command execution
For complete details on this command, type "compile_simlib -help" on the Tcl command line.

Note:  When this command is run with a project open, the tool will use 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 in the help manual.

The default settings can be overridden by specifying the necessary options when the command is run.

AR# 53678
日期 06/10/2015
状态 Active
Type 综合文章
People Also Viewed