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 Vivado IDE can automatically determine the best top module for the design and allows for manual specification of the compilation order.
so that theFrom 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.
See Vivado Design Suite User Guide: Design Flows Overview (UG892) for information about design flows.