UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 53090

Vivado - Is it possible to run Tcl commands during initialization of the Vivado or PlanAhead tools?

Description

Is it possible to have self-written Tcl procedures that define new commands, or commands for configuration available in every Vivado or PlanAhead tool session?

Solution

The Vivado and PlanAhead tools can automatically load Tcl scripts during initialization.

When you start the Vivado or PlanAhead tools, they look for a Tcl initialization script in the following locations:

  • In the software installation: <installdir>/Vivado/version/scripts/init.tcl.
    (Where <installdir> is the installation directory where the Vivado Design Suite is installed.)
  • In the local user directory:
    a. For Windows 7: %APPDATA%/Xilinx/Vivado(PlanAhead)/init.tcl
    b. For Linux: $HOME/.Xilinx/Vivado(PlanAhead)/init.tcl

If init.tcl exists in both of these locations, the tool sources the file from the installation directory first, then from your home directory.

If the MYVIVADO environment variable is set, an init.tcl file found in %MYVIVADO%/scripts will be used in place of the script in the installation directory.

The 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 tool from that software installation sources the enterprise init.tcl script.

The 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 init.tcl file is a standard Tcl script file that can contain any valid Tcl command supported by the Vivado or PlanAhead tools. You can even source another Tcl script file from within init.tcl by adding the source command.

AR# 53090
Date Created 11/23/2012
Last Updated 11/27/2015
Status Active
Type General Article
Tools
  • Vivado Design Suite
  • PlanAhead