To change the read order of an XDC file or unmanaged Tcl script in a constraints set:
- In the Sources window, select the XDC file or Tcl script you want to move.
- Drag and drop the file to the desired position in the constraints set.
For the example shown in Figure 1, the equivalent Tcl command is:
reorder_files -fileset constrs_1 -before [get_files wave_gen_timing.xdc] \ [get_files wave_gen_pins.xdc]
In Non-Project mode, the sequence of the read_xdc
or source commands determines the order the constraint files are
read.
If you use an IP core that comes with constraints, two groups of constraints are handled automatically as follows:
- Constraints that do not depend on clocks are grouped in an XDC file with PROCESSING_ORDER set to EARLY,
- Constraints that depend on clocks are grouped in an XDC file with PROCESSING_ORDER set to LATE.
By default, user XDC files belong to the PROCESSING_ORDER NORMAL group. They are loaded after EARLY XDC files and before LATE XDC files. For each PROCESSING_ORDER group, IP XDC files are loaded in the same sequence as how the IP cores are listed in the IP Sources window. For example, the following figure shows one of the project IP cores that comes with an XDC file.
When you open your design, the log file shows that the IP XDC file was loaded last:
Parsing XDC File [C:/project_wave_gen_hdl.srcs/sources_1/ip/clk_core/clk_core.xdc] for cell 'clk_gen_i0/clk_core_i0/inst'
Finished Parsing XDC File [C:/project_wave_gen_hdl.srcs/sources_1/ip/clk_core/clk_core.xdc] for cell 'clk_gen_i0/clk_core_i0/inst'
Parsing XDC File [C:/project_wave_gen_hdl.srcs/sources_1/ip/char_fifo/char_fifo/char_fifo.xdc] for cell 'char_fifo_i0/U0'
Finished Parsing XDC File [C:/project_wave_gen_hdl.srcs/sources_1/ip/char_fifo/char_fifo/char_fifo.xdc] for cell 'char_fifo_i0/U0'
Parsing XDC File [C:/project_wave_gen_hdl.srcs/constrs_1/imports/verilog/wave_gen_timing.xdc] Finished Parsing XDC File [C:/project_wave_gen_hdl.srcs/constrs_1/imports/verilog/wave_gen_timing.xdc] Parsing XDC File [C:/project_wave_gen_hdl.srcs/sources_1/ip/char_fifo/char_fifo/char_fifo_clocks.xdc
] for cell 'char_fifo_i0/U0'
Finished Parsing XDC File [C:/project_wave_gen_hdl.srcs/sources_1/ip/char_fifo/char_fifo/char_fifo_clocks.xdc
] for cell 'char_fifo_i0/U0' Completed Processing XDC Constraints
Unlike with the User XDC files, you cannot directly change the read order of the IP XDC files that belong to the same PROCESSING_ORDER group. If you must modify the order, do the following:
- Disable the corresponding IP XDC files (IS_ENABLED set to false).
- Copy their content.
- Paste the content into one of the XDC files included in your constraints set.
- Update the copied IP XDC commands with the full hierarchical netlist object path names wherever needed. Doing so is required because the IP XDC constraints are written in such a manner that they can be scoped to the IP instance.
- Review the get_ports queries that are processed in a special way for scoped constraints. For more information on XDC scoping, see Constraints Scoping.