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

Tcl - When I add files using Tcl, I cannot control the compile order for XST

Description


When I add files using Tcl, I cannot control the compile order for XST. Some of my HDL files have dependencies and need to be compiled in a certain order. Even if I change the order of my xfile add commands in my Tcl script, the compile order does not change. The following XST error occurs:

"ERROR:HDLParsers:3014 - "/work/mytests/tcl_file_order/my_design.vhd" Line 101. Library unit types_pkg is not available in library work."

Solution


When adding source files to an ISE project, the compile order ID does not change when each consecutive file is added:

xfile add "config.vhd" -lib_vhdl work
xfile add "my_design.vhd" -lib_vhdl work
xfile add "wrappers.v" -lib_vhdl work
xfile add "ctrl_module.v" -lib_vhdl work
project set top "video_top"

In ISE Design Suite 12.1 or later, to force the compile order ID to change when each file is added, use the -include_global switch, then the order in which the files are added will be the order in which they are compiled:

xfile add "config.vhd" -lib_vhdl work -include_global
xfile add "my_design.vhd" -lib_vhdl work -include_global
xfile add "wrappers.v" -lib_vhdl work -include_global
xfile add "ctrl_module.v" -lib_vhdl work -include_global
project set top "video_top"

If you run into this problem in ISE Design Suite 11, you can use the "Manual Implementation Compile Order" option set to "true", then the order the files are added with xfile add will also be the order in which the files are compiled.
AR# 35791
Date Created 07/23/2010
Last Updated 03/01/2011
Status Active
Type General Article