ℹ️ For a tutorial on FPGA programming with Redpitaya-125-14 and PYNQ see FPGA Notes for Scientists.
This repository describes the generation of a PYNQ image for the Redpitaya STEMlab 125-14 board. The device tree has been simplified and the supported MIO peripherals are:
- SD 0
- UART 0
- ENET 0 (static MAC address, read from i2c EEPROM during boot)
- USB 0
- Pynq-Redpitaya-125-14-3.0.1.img
- Instructions on writing the SD card image
- Getting started with PYNQ
- Vivado Redpitaya-125-14 board files
- Redpitaya constraint file (.xdc)
- Base design (the corresponding overlay is included within the build image):
- Controlling the base design from a PYNQ Jupyer Notebook:
import time
import pynq
ol = pynq.Overlay("base.bit")
for i in range(8):
ol.axi_gpio_0.channel1.write(val=(1<<i), mask=0xff)
time.sleep(0.5)
We follow the steps outlined under PYNQ SD card:
-
Install a virtual machine running Ubuntu 18_04_4 LTS with more than 150 GB of storage space. Do not update Ubuntu since this will roll the version and make it incompatible with the Xilinx tools below.
-
Clone the PYNQ repository (for this build we used v3.0.1):
git clone https://github.com/Xilinx/PYNQ
- Install dependencies using the following script.
source <PYNQ repository>/sdbuild/scripts/setup_host.sh
-
Install the Xilinx tools (for this build we used v2022.1):
- Vitis (which includes Vivado)
- Petalinux
- Go for lunch! This will take a few hours...
-
Download the prebuilt board-agnostic (PYNQ rootfs arm v3.0.1) image from Pynq Development Boards and unzip it.
-
Download the PYNQ distribution tarball (pynq-3.0.1.tar.gz) from the PYNQ release repository. You will find the distribution tarball under a drop-down called Assets.
-
Place both files into /sdbuild/prebuilt/
- Clone this repository:
git clone https://github.com/dspsandbox/Pynq-Redpitaya-125
-
Copy the provided board directory <this repository>/Pynq/boards/Pynq-Redpitaya-125-14 to <PYNQ repository>/boards.
-
(OPTIONAL) Enable Wireguard VPN kernel driver. Open PYNQ/sdbuild/boot/meta-pynq/recipes-kernel/linux/linux-xlnx/pynq.cfg and append:
CONFIG_WIREGUARD=y
- Open a terminal and run the settings files for Vitis and Petalinux:
source <path-to-vivado>/2022.1/settings64.sh
source <path-to-vitis>2022.1/settings64.sh
source <path-to-petalinux>/2022.1/tool/settings.sh
- Navigate to
cd <PYNQ repository>/sdbuild
- Run the makefile (your password will be required a couple of times)
make BOARDS=Pynq-Redpitaya-125-14
- The generated PYNQ image will be located within <PYNQ repository>/sdbuild/output/Pynq-Redpitaya-125-14-3.0.1.img