Controlling File Compilation Order - 2024.1 English

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2024-05-30
Version
2024.1 English

A specific compile order is necessary when one file has a declaration and another file depends upon that declaration. The Vivado IDE controls RTL source files compilation from the top of the graphical hierarchy shown in the Sources window Compile Order window to the bottom.

The Vivado tools automatically identify and set the best top-module candidate, and automatically manage the compile order. The top-module file and all sources that are under the active hierarchy are passed to synthesis and simulation in the correct order.

In the Sources window, a pop-up menu provides the Hierarchy Update command. The provided options specify to the Vivado IDE how to handle changes to the top module and to the source files in the design.

The default setting, Automatic Update and Compile Order, specifies that the tool manages the compilation order as shown in the Compilation Order window, and shows which modules are used and where they are in the hierarchy tree in the Hierarchy window.

The compilation order updates automatically as you change source files.

To modify the compile order before synthesis, select a file, and right-click Hierarchy Update > Automatic Update, Manual Compile Order so that the Vivado IDE can automatically determine the best top module for the design and allows for manual specification of the compilation order.

Manual Compile is off by default. If you select a file and move it in the Compile Order window, a popup menu asks if you want Manual Compile turned on, as shown in the following figure.

Figure 1. Move Sources Option

From the Sources window Compile order tab, drag, and drop files to arrange the compilation order, or use the menu Move Up or Move Down commands.

Other options are available from the Hierarchy Update context menu, as shown in the following figure.

Figure 2. Hierarchy Update Options

See Vivado Design Suite User Guide: Design Flows Overview (UG892) for information about design flows.