A specific compile order is necessary when one file has a declaration and another file depends upon that declaration. 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 synthesis and simulation processes receive the top-module file and all sources under the active hierarchy 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 Automatic Update and Compile Order default setting, specifies that the tool manages the compilation order as shown in the Compilation Order window. It also displays the modules that are used and modules' location 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 . This lets Vivado IDE to automatically determine the best top module for the design and allows for manual specification of the compilation order.
Manual Compile option is off by default. On selecting and moving a file in the Compile Order window, a pop-up menu asks if you want Manual Compile turned on.
From the Sources window Compile order tab, drag and drop files to arrange the compilation order. You can also use the menu Move Up or Move Down commands.
Other options are available from the Hierarchy Update context menu.
See Vivado Design Suite User Guide: Design Flows Overview (UG892) for information about design flows.