I have variables similar to the following defined in an XDC file:
However, in the Implemented design, when I use the above variable in a Tcl command (for example, report_timing), the following error is given:
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.