- From the Flow Navigator, or from the File menu, select Add Sources.
The Add Sources wizard opens.
- Select Add or create constraints, and click Next.
- In the Add or Create Constraints page, click Create File.
- In the Create Constraints File
dialog box, fill in the constraints file information, as shown in the figure below:
- File type
- XDC
- File name
-
uart_top_ooc.xdc
- File location
- <Local to Project>
- Click OK.
Tip: For Xilinx-delivered IP, the out-of-context XDC file has _ooc appended to the filename; however, it is the USED_IN property of the file that determines if it is an OOC XDC file, not the filename. - Click Finish to complete the
Add Sources
wizard.
The Vivado® tools create a new XDC file in the project and displays the file under the Constraints section in the Hierarchy view of the Sources window.
You now move the
create_clock
constraints from the XDC file of the original design (uart_top.xdc) into the OOC XDC file (uart_top_ooc.xdc). - In the Sources window, open the new OOC XDC file (uart_top_ooc.xdc) by double-clicking the file. The file is empty.
- Cut and paste the
create_clock
constraints, from lines 1 and 2 of the IP XDC file (uart_top.xdc) into the empty OOC XDC file.The OOC XDC file contains only the two
create_clock
constraints.
- Right-click in the text area and select Save All
Files.
This saves both XDC files that are currently open.
- Check
to be sure that the create_clock commands are removed from the IP XDC file
(uart_top.xdc), and save the
file.
The
create_clock
constraints are not necessary because parent design defines the clocks. The IP XDC file should now only contain the constraints, as shown in the following figure. The OOC XDC file defines the clocks needed for standalone processing.
- Close the two open XDC files.
With the OOC and IP XDC files defined, you must set the USED_IN and PROCESSING_ORDER properties on the XDC files so that the Vivado tools processes the constraint files for the IP correctly.
- In the Hierarchy
view of the Sources
window, select the OOC XDC file (uart_top_ooc.xdc) listed under the Constraints section.
The Source File Properties window displays the file properties automatically.
- In the Properties
view of the Source File
Properties window, scroll down to find the
Used In selection,
shown in the figure below.
The Make Selection dialog box opens.
- Select out_of_context in the unused
values and select the Move Right button
,
to add the value to the USED_IN property, shown in the following figure.
- (Optional) You can adjust the USED_IN property in the Tcl Console. To set
the USED_IN property of the OOC XDC file to include the “out_of_context” using
the following Tcl command:
set_property USED_IN {synthesis implementation out_of_context}\ [get_files uart_top_ooc.xdc]
- When the USED_IN property includes the out_of_context setting, the XDC file
is only used for synthesis or implementation in out-of-context (OOC) runs
(
-mode out_of_context
).Important: The USED_IN property for an OOC XDC file should be{synthesis implementation out_of_context}
. If it is just OOC, it is not used during synthesis or implementation.