The Vivado Design Suite can automatically load Tcl scripts defined in Vivado_init.tcl file. This approach is useful when you have written Tcl procedures that define new commands that you want to make available in all your Vivado sessions.
When you start the Vivado tools, it looks for a Tcl initialization script in several locations with the following precedence:
- In the software installation: <
installdir
>/Vivado/<VivadoVersion>/scripts/Vivado_init.tcl
Where
<
installdir
>
is the installation directory where the Vivado Design Suite is installed. - In the local user directory (Vivado tools version dependent):
- For Windows 7: %APPDATA%/Xilinx/Vivado/<VivadoVersion>/Vivado_init.tcl
For example: %APPDATA%/Xilinx/Vivado/2017.1/Vivado_init.tcl
- For Linux: $HOME/.Xilinx/Vivado/<VivadoVersion>/Vivado_init.tcl
For example: $HOME/.Xilinx/Vivado/2017.1/Vivado_init.tcl
- In the local user directory (Vivado tools version independent):
- For Windows 7: %APPDATA%/Xilinx/Vivado/Vivado_init.tcl
- For Linux: $HOME/.Xilinx/Vivado/Vivado_init.tcl
- In the local run directory where the Vivado tools is started with the command line option
-init
. With this command line argument, Vivado can load a fourth initialization file with the expected file name vivado.tcl instead of Vivado_init.tcl.For example: <WORKING_DIRECTORY>/vivado.tcl
If Vivado_init.tcl exists in several locations, the Vivado tool sources the file following the precedence explained above.
The Vivado_init.tcl file in the installation directory allows a company or design group to support a common initialization script for all users. Anyone starting the Vivado tools from that software installation sources the enterprise Vivado_init.tcl script.
The Vivado_init.tcl file in the home directory allows each user to specify additional commands, or to override commands from the software installation to meet their specific design requirements.
The Vivado_init.tcl file is a standard Tcl script file that can contain any
valid Tcl command supported by the Vivado tools. You can even source
another Tcl script file from within Vivado_init.tcl by adding the
source
command.
xsim_init.tcl
at
startup.