Electronic – Using SVN with Xilinx Vivado

fpgaxilinx

I just stated using Vivado in a new project and would like to put the project files under SVN.

Vivado seems to create all the project files under the project name (say proj1):

/<path to the project>/proj1/
                            proj1.xpr
                            proj1.srcs/
                                       constrs_1/
                                                new/
                                                    const1.xdc
                            proj1.runs/
                            proj1.data/
                            proj1.cache/

My question is what are the files I need to put under SVN other than the XDC and the XPR file?

Best Answer

Xilinx create a YouTube video (sigh) to deal with this. Here is the link to the video

http://www.xilinx.com/training/vivado/vivado-version-control-overview.htm

Here is my summary of the video (8 minutes)

Before you start

If you really like full control, Xilinx suggests that you forgo the GUI entirely and do everything on the command line, and then you know what is source and what is not.

Otherwise, Xilinx realizes that Vivado projects are not designed for version control. DON'T CHECK IN THE ENTIRE PROJECT. But read on for hints...

Baseline

Of course, anything you write outside of the Vivado tool should be checked in.

Check in the the following files

*.v, *.vh, *.vhdl, *.edif  - HDL and Netlist
*.xdc - Constraints
*.xci - IP Core
*.bd  - IP Integrator Block Diagram
*.xmp - Embedded Subsystem
*.sgp - System Generator Subsystem
*.bmm
*.cdc - Chipscope
*.elf
*.mem

IP blocks

If you use IP blocks, generate the IP in a unique folder, and check in everything.

Checkpoints

If you want to be able to rerun parts of the flow without running everything, check in the checkpoint files.

*.dcp - Design Checkpoints

My Addendum

If Xilinx tools were efficient, I wouldn't recommend checking in the dcp files, but they take so many hours to run, it might be worthwhile at the cost of an ugly version control system.

The video doesn't say squat about the Vivado project files (*.xpr) so here is my suggestion:

*.xpr
*.data/*/fileset.xml
*.data/*/runs.xml

The alternative that Xilinx recommends (which is really a hack, not suitable for version control) is to run the File -> Write Project Tcl command each time you want to commit, and then commit that TCL file to version control. When you update your local folder, you need to rerun that TCL file to create all of the project files. Yuck.