imageNamaste FPGA
image
TCL Automation2 min read

Vivado don't compile XDC dependencies automatically.

When we work with Tcl, whenever we add new files to different Vivado filesets, such as Design Sources or Simulation Sources, we need to update the compile order.

Whether we add a single file or multiple files, Vivado analyzes the sources to identify the hierarchy, understand how different Verilog modules are connected, and determine the appropriate compilation order.

For example, if we use half adders to build a full adder, the half adders are child components, while the full adder is their parent. When we call update_compile_order, Vivado automatically identifies this hierarchy and updates the source compilation order. This command updates the order; it does not perform compilation itself.

Vivado handles this automatic detection of component hierarchy for both design and simulation sources. However, dependencies between constraint files need to be managed by the developer.

If we have multiple design or testbench files that depend on one another, Vivado analyzes their relationships to determine the appropriate compilation order. The top-level module represents the parent of the child components in the hierarchy.

Hence, we can call update_compile_order after adding sources to the respective design or simulation filesets. However, constraint files are handled differently.

Usually, we expect a single constraint file for an entire system of moderate complexity. However, we can have multiple constraint files for different peripherals to keep them organized. These files may be independent, but sometimes one constraint depends on another. For example, a generated clock constraint may depend on a primary clock defined in another XDC file. In such cases, the primary clock definition must be processed before the constraint that references it.

Vivado does not use update_compile_order to automatically resolve dependencies between XDC files. We need to manage their processing order when multiple constraint files depend on one another. Therefore, we call update_compile_order after adding design or testbench sources, but we do not use it to arrange XDC files. We need to specify the processing order of XDC files manually when their dependencies require it.

image
image
5038 views