A sample revision controlled Vivado project for a simple adder on Digilent's Zybo Z7-20, based on workflows presented in Xilinx's revision control tutorial (UG1198).
rem Open command prompt to this README file's location.
rem Then, run the following:
scripts\env.bat
cd ws
make all
Vivado projects are typically not version-control friendly - project settings/config files typically use absolute path references to associate files and folders, which make it very difficult to export/share project resources with teammates/collaborators. Xilinx's UG1198 suggests an alternative to organizing and managing your project design/simulation/constraint/etc assets, and serves as the basis for this repo.
ws/
contains theMakefile
, which automates the build process. Essentially, theMakefile
calls various scripts inscripts/
to execute various components of the design and implementation workflow. For the most part, these executions takes place in this directory.scripts/
contains the aforementioned scripts:setup.tcl
: creates the Vivado project and adds design sources specified insrcs/
to the projecttest.tcl
: adds the simulation source fromsrcs/
to the Vivado project and executes behavioral simulationcreate_axi.tcl
: creates an AXI peripheral using Verilog sources for the peripheral fromsrcs/
, and adds the peripheral to the Vivado project IP librarycreate_bd.tcl
: creates a block diagram that ties together a Zynq Processing System, the AXI peripheral, and the top-level RTL design, then creates an HDL wrapper from the block diagramcompile.tcl
: run synthesis, implementation, and bitstream generation on the Vivado projectbootgen.tcl
: convert the generated bitstream file into a.bit.bin
file compatible with Petalinux 2017.4 on the Zybo Z7-20.
srcs/
contains your project sources- For projects with numerous design and simulation sources, subdirectories are suggested. The
tcl
command for adding files isadd_files
, and the-norecurse
flag should not be used when attempting to add files by directory. - The existing files are specific to the simple adder project:
simple_adder.v
: the simple adder design sourcetb_simple_adder.v
: the simple adder's testbench/simulation sourceaxi_dut_iface_v1_0.v
: the AXI peripheral wrapper design sourceaxi_dut_iface_v1_0_S00_AXI.v
: the AXI peripheral design sourcenot needed for this projectZybo-Z7.xdc
: constraint source for the Zybo Z7-20
- For projects with numerous design and simulation sources, subdirectories are suggested. The
- Replace the design, simulation, and constraint files under
srcs/
with yours- In
axi_dut_iface_v1_0.v
, portswrite_to_slv_reg6
andwrite_to_slv_reg7
are disabled. Consider re-enabling them in your design.
- In
- Update the
.tcl
scripts inscripts/
- The Vivado project name is
simple_adder
, so you'll want to replace all references to that in every.tcl
file.- Only
bootgen.tcl
is exempt from this.
- Only
setup.tcl
: replace the files listed in theadd_files
lines with your own- Consider removing the
–norecurse
flag to add sources by directory
- Consider removing the
test.tcl
: replace the file listed in theadd_files
line with your own
- The Vivado project name is
- Use
git
to commit and push your changes to your repo- Never used
git
before? Check out this tutorial
- Never used
- Xilinx Vivado (confirmed with v2017.4)
- Digilent's Vivado Board Files
- Petalinux 2017.4 on the Zybo Z7-20
- A driver file to interact with the programmable logic, such as
zybo-ui