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

Modelsim - Error: can't read "env(XILINX)": no such variable


I generated a Serial RapidIO v5.5 through the Core Generator.

When Irun the functional simulation of the example design using ModelSim, the following error occurs:

# ** Error: can't read "env(XILINX)": no such variable
# Error in macro ./simulate_mti.do line 11
# can't read "env(XILINX)": no such variable
# while executing
# "vlog -mfcu $env(XILINX)/verilog/src/glbl.v"

What is wrong? How do I resolve it?


This error is caused by unrecognized environment variable XILINX. Since this variable is not defined, Modelsim can't find the specified path for glbl.v.

You can verify whetherthe variable is set by running the following command in ModelsimTranscript.

>echo $env(XILINX)

The simulation script assumes that you have built XILINX environment prior to running simualtion.

To resolve the error, perform either of the following operation.

1) A Windows user can launch the "ISE Design Suite Command Prompt" utility, located in the Accessories folder within the Xilinx ISE Design Suite 12.x Start Menu program folder, and start Modelsim in that prompt.

A Linux user can run "source <ISE 12.x installation path>/settings32.csh" (or settings32.sh depending on your shell), and then launch Modelsim GUI.

2) Modify the simulate_mit.do and replace $env(XILINX) with the full pathname on your machine.

AR# 39673
Date 12/15/2012
Status Active
Type General Article
  • ISE Design Suite - 12.1
  • ISE Design Suite - 12.2
  • ISE Design Suite - 12.3
  • Serial RapidIO
Page Bookmarked