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# 21062

CompXLib - How can I pass an environment variable to the "modelsim.ini" file as an output directory?


When running CompXLib, is it possible to pass an environment variable to the "modelsim.ini" file as the output directory, rather than having the output directory path explicitly specified in the ".ini" file?


This can be done by editing the default CFG file.

More information is available in Chapter 6 of the Synthesis and Verification Design Guide:


An example of how this can be done is described below:

1. Open a command prompt window, and type:

set OUT_DIR=C:\temp\test_dir

2. Then, type:

compxlib -cfg

3. Edit the following line in the "compxlib.cfg":

# compile library in the directory specified by the environment variable if the

# -dir option is not specified


4. Go back to the command window, and type:

compxlib -s mti_pe -arch

virtex -l verilog -w

5. The -dir switch is not being passed as the tools will automatically use the OUT_DIR environment variable.

6. Once CompXLib is completed, look at the ".ini" file:

7. SIMPRIMS_VER = $OUT_DIR\simprims_ver

UNISIMS_VER = $OUT_DIR\XilinxCoreLib_ver


This can be particularly useful if you want to simulate different versions of ISE installations.

AR# 21062
Date Created 09/04/2007
Last Updated 12/15/2012
Status Active
Type General Article