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

2013.4 Vivado - write_project_tcl generated Tcl script contains an absolute path and improperly handles user IP and unmanaged Tcl files

Description

My team is using a revision control system for our Vivado project. 

We use the write_project_tcl Tcl command to generate a Tcl script to be able to recreate the project.

We've noticed the following three issues with the generated tcl script from write_project_tcl.

1. The write_project_tcl output script contains the following absolute path.
set orig_proj_dir "absolute path"
This works fine as long as one user uses the system and always uses the same repository location when retrieving the controlled files. 

If the controlled files are retrieved to a new location (e.g. by another user) then the absolute path does not apply and the script will fail.

The script can be edited to use a relative path or the new absolute path but this will need to be repeated each time the write_project_tcl command is run. 

Is there a way to generate a script with a relative path with the write_project_tcl command?

2. If the project contains user IP cores, write_project_tcl adds project IP core XCI files to a project before any user repository path is set. 

Therefore, Vivado will not be able to recognize the user IP when the IP core is added, resulting in "Locked" IP core(s) which a user will not be able to generate or regenerate.

3. If a project has unmanaged Tcl files, write_project_tcl incorrectly sets the path to these files in the generated Tcl file.

Solution

The absolute path was placed in the generated Tcl script in order to establish an anchor point or reference directory. 

This anchor point enables the other paths to be referenced relative this directory. 

The absolute path was used because, when the script is written, there is no way to determine where the control files will be retrieved from or what location the script will be run from.

In cases where multiple users are checking the files out to different locations, they will need to edit the script file in one of the following ways:
  • Change the set orig_proj_dir to relative path and use the revision control systems merge option to maintain the orig_proj_dir value while changing other parts of the file.
  • Have each user edit the orig_proj_dir value before sourcing the generated script.

The attached patch (ar59239_Vivado_2013_4_preliminary_rev2.zip) is available for Vivado 2013.4 

With the attached patch installed, the script written by the write_project_tcl process will set an "origin_dir" variable that is based on the current working directory (CWD) when the command is executed. 

if write_project_tcl is run with no option other than the name of the Tcl script to generate, the "origin_dir" will be set to "."

Paths inside the script will be made relative to "origin_dir".

In rare cases, if you do want to make the paths relative to some other "root" then you can specify that new "root" value via the "-paths_relative_to" switch.

This should be treated as an advanced user option and in most cases it should not be needed.

When you do specify -paths_relative_to, the value you pass via this switch will be captured verbatim in the origin_dir variable.  

If you specify an absolute path, that absolute path will be retained even though this may result in invalid paths at the time the .tcl file is created.

Attachments

Associated Attachments

Name File Size File Type
ar59239_Vivado_2013_4_preliminary_rev2.zip 4 MB ZIP
AR# 59239
Date Created 01/27/2014
Last Updated 04/22/2014
Status Active
Type Known Issues
Tools
  • Vivado Design Suite - 2013.4