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

Vivado - Is there an automated way to sync up the source files in my project with files in the original source directory?

Description

If I add source files to a Vivado project with the Add Sources process, I have the option to check Copy sources into project. This copies my source files to a directory under the Vivado project directory. At this point, any change to the source files in the original location will have no affect on the Vivado project.

Is there a command to update all of the source files copied into Vivado project with newer files from my original source location?

Solution

In the Vivado integrated design environment (IDE), a user can right-click on a single source file and select "Replace File"; this replaces the local project copy of this file with the new file from the original location.

This method must be performed for each file that needs to be updated.

In the Tcl console or in a Tcl script, the reimport_files command can be used to re-import all of the source files when they are found to be out-of-date

Syntax: 
reimport_files  [-force] [-quiet] [-verbose] [<files>...]

Returns:
list of file objects that were imported

Usage:
  Name        Description
  -----------------------
  [-force]    Force a reimport to happen even when the local files may be 
              newer
  [-quiet]    Ignore command errors
  [-verbose]  Suspend message limits during command execution
  [<files>]   List of files to reimport. If no files are specified, all files in the project that are out-of-date, will be reimported

Description:

  Reimports project files. This updates the local project files from the original referenced source files.

NOTE: Using reimport_files has the potential of overwriting user changes that are local to the project. The "Replace File" process walks the user through an explicit step of confirmation to verify they really want to overwrite a file.

AR# 56411
Date Created 06/14/2013
Last Updated 06/14/2013
Status Active
Type General Article
Tools
  • Vivado Design Suite