UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 15338

CompXLib - How do I compile simulation models for the Xilinx design tools?

Description


How do I compile simulation models for the Xilinx 6.1i and later, 5.2i, and 5.1i design tools?



NOTE: For MXE, do not manually compile the libraries. For MXE, download the latest available libraries from the download center.



Download center : http://www.xilinx.com/support/download/index.htm

Solution


Compiling libraries for any simulator other than MXE is done by CompXlib.



For instructions on running CompXlib in ISE 7.1i and above, please refer to the Synthesis and Simulation Design Guide in the Xilinx software manuals:

http://www.xilinx.com/support/software_manuals.htm


In the 6.1i design tools, CompXLib was added to the Project Navigator GUI. To compile simulation models, follow the applicable procedure below:



Running CompXLib from the Project Navigator GUI (6.1i)



1. Click the appropriate device (e.g., xcv50-6bg256) in the Sources in Project Window.

2. Right-click Compile HDL Simulation Libraries in the Processes for Source Window.

3. Select Properties.

4. Set the applicable Simulation Library Compiler Properties (click Help for a description of each property).

5. Click OK.

6. Double-click Compile HDL Simulation Libraries in the Processes for Source Window.



NOTE: Only the simulation libraries applicable to the selected device for your project are available for compilation. If you want to compile all Xilinx Simulation Libraries, run CompXLib from the command line (see below) and use the "-f all" option.



Running CompXLib from the Command Line (5.1i or later)



To obtain the usage information, type "compxlib" at a command prompt. Run "compxlib -help" for details.



Examples of using CompXLib with officially supported simulators are provided below. In all examples that do not use the -p option, it is assumed that the environment is set up for the desired simulator.



ModelSim PE (PC example)



This example compiles all of the libraries into the specified directory:

compxlib -s mti_pe -f all -l all -o c:\modeltech_5.6b\xilinx_libs



If multiple versions of ModelSim are installed, point to the desired executable directory:

compxlib -s mti_pe -f all -l all -o c:\modeltech_5.6b\xilinx_libs -p c:\Modeltech_5.6b\win32



ModelSim SE (UNIX example)



This example compiles all VHDL libraries used with Virtex devices into the specified directory:

compxlib -s mti_se -f virtex -l vhdl -o /products/modelsim/xilinx_libs/5_1



Synopsys VCS



This example compiles all Verilog libraries (assume that the -l switch is not needed for VCS) into the current directory:

compxlib -s vcs -f all -o .



Synopsys VCSi



This example compiles all Verilog UniSim libraries into the current directory:

compxlib -s vcsi -f all:u -o .



Cadence NC-Sim



This example compiles all the libraries into the specified directory. The executable path is an example of compiling the libraries without setting up the environment for the simulator:

compxlib -s ncsim -f all -l all -o /temp/xilinx_libs -p /products/ldv.ver3_4/tools.sunv4/bin



Synopsys Scirocco



NOTE: Scirocco cannot currently be used to run a back-end timing simulation with the 5.1i/5.2i design tools. In this release, SDF 3.0 is used, and Scirocco does not currently support the SDF 3.0 standard.



This example compiles all VHDL CORE Generator libraries into the current directory:

compxlib -s scirocco -f all:c -l vhdl -o .



Library Mapping in the ModelSim ".ini" File



CompXLib uses the ModelSim "vmap" command for library mapping. If the ModelSim environment variable is set, then the ".ini" file pointed to by the environment variable is modified. If the variable is not set, a local (in the directory in which CompXLib is run) "modelsim.ini" file contains the library mappings from the "vmap" command issued by CompXLib. If the "modelsim.ini" file is not writeable, the "vmap" command will make a local copy of the "modelsim.ini" file and write the library mappings to this file.



For more information, refer to the Synthesis and Simulation Design Guide in the Xilinx software manuals:

http://www.xilinx.com/support/software_manuals.htm



In the 6.1i release, CompXLib runs on Linux and compiles the libraries for NC-Sim on a PC.



In the 5.1i/5.2i release, CompXLib does not work on Linux and does not compile the libraries for NC-Sim on a PC.

- For ModelSim on Linux, see (Xilinx Answer 2561).

- For NC-Sim/NC-VHDL on Linux or PC, see (Xilinx Answer 9420).

- For NC-Sim/NC-Verilog on Linux or PC, see (Xilinx Answer 2554).

- For all other simulator/OS configurations, use CompXLib. See the examples above for more information.
AR# 15338
Date Created 09/03/2007
Last Updated 02/13/2012
Status Archive
Type General Article