Initializing Tcl Scripts - 2022.1 English

Vivado Design Suite User Guide: Using Tcl Scripting (UG894)

Document ID
Release Date
2022.1 English

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.

Note: Starting with 2017.1, the startup script for the Vivado Design Suite has been renamed Vivado_init.tcl. In the earlier versions it was called init.tcl. If Vivado_init.tcl does not exist but init.tcl is present, the Vivado tools source the init.tcl and issue a deprecation message.

When you start the Vivado tools, it looks for a Tcl initialization script in several locations with the following precedence:

  1. In the software installation: < installdir >/Vivado/<VivadoVersion>/scripts/Vivado_init.tcl

    Where < installdir > is the installation directory where the Vivado Design Suite is installed.

  2. 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

  3. 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

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.

Note: Vivado_init.tcl follows the naming convention < program >_init.tcl. Other supported program names are xsim and vivado_lab. For instance, Vivado simulator looks for xsim_init.tcl at startup.