XDC constraints are a combination of industry standard Synopsys Design Constraints (SDC version 1.9) and AMD proprietary physical constraints.
XDC constraints have the following properties:
- They are not simple strings, but are commands that follow the Tcl semantic.
- They can be interpreted like any other Tcl command by the Vivado Tcl interpreter.
- They are read in and parsed sequentially the same as other Tcl commands.
You can enter XDC constraints in several ways, at different points in the flow.
- Store the constraints in one or more XDC files.
To load the XDC file in memory, do one of the following:
- Use the
read_xdc
command. - Add it to one of your project constraints sets. XDC files only accept the
set
,list
, andexpr
built-in Tcl commands. See Supported XDC and SDC Commands for a complete list of supported commands.
- Use the
- Generate the constraints with an unmanaged Tcl script.
To execute the Tcl script, do one of the following:
- Run the source command.
- Non-Project Mode:
- Use the
read_xdc -unmanaged
command.
- Use the
- Project Mode: Add the Tcl script to one of your project constraints
sets:
- Add the file to the project
- Set the file property to be Tcl
- Add_files -fileset constrs_me timing.xdc
set_property file_type Tcl [get_files -of [get_filesets constrs_me] timing.xdc]
read_xdc
. The constraints imported with the source command are not saved
in the checkpoint in the same order as they are imported. The constraints imported with
read_xdc
are saved first and then those imported
with source. To save all the constraints in the same order as they are applied to the
design, use read_xdc -unmanaged
instead of
source.To validate the syntax or impact of a particular constraint after loading your design in memory, use the Tcl Console and the Vivado Design Suite reporting features. This is particularly powerful for analyzing and debugging timing constraints and physical constraints.