Entering XDC Constraints - Entering XDC Constraints - 2026.1 English - UG903

Vivado Design Suite User Guide: Using Constraints (UG903)

Document ID
UG903
Release Date
2026-07-01
Version
2026.1 English
  1. Decide how to provide constraints:
    • Store the constraints in one or more XDC files.
    • Generate the constraints with an unmanaged Tcl script.
  2. Follow these steps to store constraints in XDC files:
    1. Create or update the .xdc file.
    2. Load the .xdc file into memory using one of these methods:
      • Run the read_xdc command.
      • Add the file to one of your project constraints sets.
  3. Follow these steps to generate constraints with an unmanaged Tcl script:
    1. Create a .tcl script.
      • You can use any common Tcl command for selecting design objects and defining design constraints, including conditional and looping control structures.
    2. Execute the script using one of these methods:
      • Run the source command.
      • In non-project mode, run read_xdc -unmanaged.
      • In project mode, do the following:
        1. Add the Tcl script to a project constraints set.
        2. Add the file to the project.
        3. Set the file property to Tcl.
      Following is an example:
      add_files -fileset constrs_me timing.xdc
      set_property file_type Tcl [get_files -of [get_filesets constrs_me] timing.xdc]
      
Tip: Unlike XDC files, unmanaged Tcl scripts can use any Tcl command for selecting objects and defining constraints, including conditional or looping structures.
Important: You can mix XDC files and Tcl scripts in the same constraints set. Keep these limits in mind:
  • Vivado saves modified constraints back to their original location only if they originally came from an XDC file.
  • The tool does not manage constraints from unmanaged Tcl scripts, and you cannot modify them interactively.
For more information, refer to Constraints Methodology.

Note on source vs. read_xdc

For XDC constraints, source and read_xdc behave differently:

  1. Constraints imported with source are not saved in the checkpoint in the same order as they are imported.
  2. Constraints imported with read_xdc are saved first, then those imported with source.
  3. To save all constraints in the same order as they are applied to the design, use read_xdc -unmanaged instead of source.

Validating Constraints

After you load your design in memory, use the Tcl Console and Vivado reports to analyze and debug timing and physical constraints.