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# 57387

Vivado - Path locations are different when the location is entered into a tcl.pre or tcl.post Tcl file


I am using the TCL pre/post capability for a Vivado process. In the script, I point to source files using relative path names (e.g., ../<filename>).

From the Tcl console, the commands will work and the files are correctly found. However, when the scripts are run as a tcl.pre or tcl.post Tcl file, the files are not found.


Vivado processes (Synthesis, Implementation, etc.) are run in there own "runs" directory (e.g., runs/synth1). When a Tcl script is run as a tcl.pre or tcl.post script, they are run as if part of the process and will be run from the same directory as the process.

The Vivado Tcl command User Guide (UG894) contains the following note regarding this issue.

Relative paths within the tcl.pre and tcl.post scripts are relative to the appropriate run directory of the project they are applied to: <project>/<project.runs>/<run_name>. You can use the DIRECTORY property of the current project or the current run to define the relative paths in your Tcl hook scripts:

get_property DIRECTORY [current_project]

get_property DIRECTORY [current_run]

AR# 57387
Date 09/09/2013
Status Active
Type General Article
  • Vivado Design Suite
Page Bookmarked