He recommends this setup to get started:
git clone https://github.com/vvvverre/red-pitaya-tutorials.git cd red-pitaya-tutorials source /tools/Xilinx/Vivado/2024.2/settings64.sh cd blink-led cp src/bd/blinky.tcl blinky.tcl cp src/xdc/constraints.xdc constraints.xdcNote that I changed the path in the above to match where vivado is installed on my system. Also, I decided not to use a "vivado" working directory, but to just do things right in the blink-led directory. This means I had to do two edits in his mk_proj.tcl file:
edit: ../src/bd/blinky.tcl to blinky.tcl edit: ../src/xdc/constraints.xdc to constraints.xdcAmazingly pin F16 is also the LED I want to blink on the s9 board, so I don't need to edit the constraints file. Then we do this:
vivado -mode batch -source mk_proj.tclAnd to generate the bitstream we do:
vivado -mode batch -source build.tclMy file rearranging seems to work. It places all the "source" files in the top level directory. They are:
-rw-r--r-- 1 tom tom 609 Dec 18 20:49 mk_proj.tcl -rw-r--r-- 1 tom tom 1287 Dec 18 20:39 blinky.tcl -rw-r--r-- 1 tom tom 271 Dec 17 21:48 build.tcl -rw-r--r-- 1 tom tom 180 Dec 18 20:50 constraints.xdc -rw-r--r-- 1 tom tom 130 Dec 18 20:54 Makefile
That's it. The whole project is 4 files and a Makefile. Yes, I have a Makefile. It looks like this:
# Makefile for tcl vivado project all: @echo "Sorry, be more specific" project: vivado -mode batch -source mk_proj.tcl build: vivado -mode batch -source build.tclThese have been my rules for decades. Every project has its own directory. There is a Makefile in the top level. No confusing elaborate directory structure unless there is a really good reason.
The bitstream generation takes several minutes. There are lots of messages as the process continues. It finishes with:
# puts "Implementation done!" Implementation done!The bitstream is in the usual location:
Koala/blink-led/blink-led/blink-led.runs/impl_1/blinky_wrapper.bitYes, there is a blink-led directory inside of the top level project directory. We could change the name to "build" or whatever.
make project make buildThe first attempt at a build failed because the GPIO had 8 output ports and the constraint file only had definitions for 4. The fix is a quick edit in axi_gpio.tcl changing 8 to 4 and we repeat both make steps. That is quick and easy and much faster than fooling with a GUI.
Koala/axi-gpio/axi-gpio/axi-gpio.runs/impl_1/axi_gpio_wrapper.bitWe test this one, and it works just fine.
Tom's Computer Info / tom@mmto.org