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:
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 .
This example compiles all Verilog UniSim libraries into the current directory:
compxlib -s vcsi -f all:u -o .
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
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: