XDC constraints are a combination of:
- Industry standard Synopsys Design Constraints (SDC version 1.9)
- Xilinx proprietary physical constraints
XDC constraints files do not act the same as TCL scripts run through a TCL parser.
Only a subset of Tcl commands are valid in an XDC file.
For this reason, for loops will not function correctly and are not supported in XDC files.
To apply constraints in the form of for loops, generate the constraints with a Tcl script and have it executed in any of the following ways:
- Run the source command to explicitly source the Tcl script at any point in the flow.
- Add the Tcl scripts to one of your project constraint sets.
The Vivado Design Suite allows you to mix XDC files and Tcl scripts in the same constraints set.
Tcl scripts and XDC files are loaded in the same sequence as displayed in the Vivado IDE (if they belong to the same PROCESSING_ORDER group) or as reported by the command report_compile_order -constraints.
Note that modified constraints are saved back to their original location only if they originally came from an XDC file, and not from a Tcl script.
A constraint generated by a Tcl script cannot be interactively modified.
- Define Tcl Hook Scripts by setting the tcl.pre or tcl.post option, which allows the custom Tcl script to be run prior to or after synthesis or implementation design runs.