I have variables defined in an XDC file.
set variable1 test_model/clockdriver/fdre_compHowever, in the Implemented design, when using the above variable in a Tcl command e.g. report_timing, the following error is given.
can't read ' variable1 ': no such variable
This is only seen in the Implemented design but not in the Synthesized design.
What is the 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 netlist and XDC.
The XDC in the DCP file does not contain any variables since they all have been resolved.
In 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 Implemented design, put the "set" command in a Tcl script file and specify this file in the tcl.pre option in the Implementation settings.