4

I have a vivado project directory that I want to check into git. I have all my VHDL source files one directory up from the "vivado project" directory under "../hdl/".

My guess is that I only need to check in:

git add ./hdl/*.vhd
git add ./hdl/*.xdc
git add ./vivado_project/vivado_project.xpr
git add ./vivado_project/vivado_project.srcs/

The reset of the files generated by vivado doing compile are output garbage that can be recreated again by running the compile on the checked in git files?

Is this correct???

That basically mean that the following vivado directories are output garabage that can be thrown away and deleted, because they will be recreated again when recompiling fresh from a git checkout:

So basically "rm -rf" and ".gitignore" the following vivado project file:

 *.cache/
 *.runs/
 *.sim/
 *.hw/
 *.ip_user_files/    
 *.jou
 *.log
 *.str
pico
  • 1,660
  • 4
  • 22
  • 52
  • I’ll had some luck with above method, but some times the ip and block files under srcs directory become corrupted and it builds ok... except nothing works... so then you need to delete srcs directory as well and recreate it... gives Vivado tool a bad name I think... – pico Aug 08 '19 at 12:12

1 Answers1

5

No, you would need to version control a lot more of the project files. Many of them are binary.

The recommended approach for version controlling Vivado projects is to not version control any of the project files. Instead, you export a project TCL file from Vivado, and version control just that TCL file, and your source code.

Vivado can recreate the entire project from the TCL file, and TCL is a text file, so it supports diff, merge, and so on.

There are more details here: http://www.fpgadeveloper.com/2014/08/version-control-for-vivado-projects.html

Timmy Brolin
  • 1,101
  • 1
  • 8
  • 18