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

13.2 ISIM Post-Route Simulation - Does testbench support package in VHDL?


I can run behavioral simulation properly using ISIM when using a user-defined package in VHDL testbench.

However, I receive the following error while running a Post-Translate, Post-Map or Post-Route simulation.

ERROR:HDLCompiler:104 - "testbench.vhd" Line 26: Cannot find <XXX> in library <work>. Please ensure that the library was compiled, and that a library and a use clause are present in the VHDL file.
The packageXXX is declared in define.vhd and the testbench file uses it as follows:
Library work;
use work.XXX.all;


In behavioral simulation, all RTL sources are used for compilation (including define.vhd), and as a result no such issue is seen.

However, in Post-Translate, Post-Map and Post-Route simulations, only the testbench and the simulation netlist (Blackjack_top_timesim.vhd) are used for compilation, so the package in define.vhd cannot be found.

Workaround #1:

1. Manually add the following line in testbench.prj under the project directory and change the path based on the location where define.vhd is.
vhdl work "../RTL/define.vhd" 

2. Edit the Simulate Post-Translate/Map/PAR Model process properties, tick "Use Custom Project File" and point to the edited testbench.prj file in the "Custom Project Filename" entry.

3. Run simulation as normal from Project Navigator.

Workaround #2:

1. Manually edit the testbench.prj file as in Workaround #1.

2. Run simulation from the command line.

fuse -o testbench_isim_par.exe -prj testbench_par.prj testbench 

3. Launch the ISIM GUI

testbench_isim_par.exe -gui; 

Workaround #3:

Change the package file association to be simulation and re-run the simulation from ISE.
AR# 34868
Date Created 03/15/2011
Last Updated 12/02/2014
Status Active
Type General Article
  • ISE Design Suite