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!

Page Bookmarked

AR# 59158

Vivado - Variables defined in XDC, with the "set" command do not work in Implemented Design - " can't read '<var_name>': no such variable "


I have variables similar to the following defined in an XDC file:

set variable1 test_model/clockdriver/fdre_comp

However, in the Implemented design, when I use the above variable in a Tcl command (for example, report_timing), the following error is given:

can't read ' variable1 ': no such variable

This behavior is seen only in the Implemented design, not in the Synthesized design. 

What is the cause of this problem?


This is an intended behavior. 

Upon opening a synthesized run, DCP is read first, and then the project XDC is read and applied on the netlist. 

Because the project XDC contains Tcl variables, you can use them. 

However, upon opening an implemented run, only the DCP is read (where the DCP contains both a netlist and XDC).

The XDC in the DCP file does not contain any variables because they all have been resolved.

In an implemented design, variables need to be defined in the Tcl console before they can be used in any command line.

To use predefined variables in an implemented design, put the "set" command in a Tcl script file and specify this file in the tcl.pre option in the Implementation settings.

AR# 59158
Date 02/23/2017
Status Active
Type General Article
  • Vivado Design Suite