Getting Started with PYNQ on ZYBO
Last updated
Last updated
The ZYBO (ZYnq BOard) is a feature-rich, ready-to-use, entry-level embedded software and digital circuit development platform built around the smallest member of the Xilinx Zynq-7000 family. There are at least three major versions of the ZYBO board:
Retired ZYBO (with VGA port) use the XC7Z010-1CLG400C
ZYBO Z7-10 use the XC7Z010-1CLG400C
ZYBO Z7-20 use the XC7Z020-1CLG400C
In this tutorial, I want to show you how to install Linux OS with a PYNQ image on the ZYBO.
The ZYBO is not officially supported by PYNQ. Thankfully, someone has already built the PYNQ image for this board. So, I just use the PYNQ image from this repository.
Win32DiskImager (https://win32diskimager.org/)
PuTTY (https://www.putty.org/)
Download the image file from the repository.
Write the image file to the microSD card with the Win32DiskImager program.
Insert the microSD card into the board, change the jumper setting to microSD, connect the micro USB cable to the PC, and power on the board.
Open the PuTTY program and set up a serial connection. Select the appropriate COM port by looking at Device Manager (Windows).
Baud rate = 115200
Data bits = 8
Stop bits = 1
Flow control = None
Parity = None
The system is automatically logged in, but if you want to connect to the board from an SSH terminal, then we have to enter the username and password.
Username: xilinx
Password: xilinx
Important
If you want to turn off the board, you should shutdown it; don't immediately remove the power supply. This is done to avoid corrupted microSD, which can cause boot failure.
Run this command.
The easiest way to connect to the Jupyter Notebook is by using an Ethernet connection. The connection can be made either directly to the host PC or via a Wi-Fi router (in case your PC doesn't have an Ethernet port).
If you are using a direct Ethernet connection to the host PC, then you have to configure your host PC's IP address to any address in the range 192.168.2.xxx. After that, open a web browser and go to this address:
URL: 192.168.2.99:9090
Password: xilinx
If you are using a Wi-Fi router, then usually the router will assign the IP address automatically (DHCP). So, you just need to know your board's IP address (using ifconfig
command), go to a web browser, and go to the address:
URL: 192.168.1.122:9090
Password: xilinx
Now that we have configured the board, the next step is to try to create a basic hardware design. My hardware design consists of an AXI GPIO and an AXI DMA. The AXI GPIO is connected to 4 LEDs. The AXI DMA is connected to a looped-back AXIS FIFO.
The following figure shows the Zynq IP high-performance port configuration. The S AXI HP0 and S AXI HP2 interfaces are enabled.
The following figure shows the AXI DMA IP configuration.
The following figure shows the AXI GPIO IP configuration.
To upload files, such as bitstreams, from the laptop to the board, you can use FileZilla via the Ethernet connection.
Required programs:
FileZilla (https://filezilla-project.org/)
The connections required are:
Host: 192.168.1.99
Username: xilinx
Password: xilinx
Port: 22
To upload the hardware design to PYNQ, you need to upload three files: .bit
, .tcl
, and .hwh
.
The following notebook is used to test the hardware design. It consists of a Python program to test the AXI GPIO and the AXI DMA.
The following image shows the result. The LED is turned on according to the value we set in the Python program.
Zybo Z7 Migration Guide, https://digilent.com/reference/programmable-logic/zybo-z7/migration-guide
PYNQ 3.0.1 for Digilent Zybo (2023 update), https://github.com/nick-petrovsky/PYNQ-ZYBO
Tutorial: PYNQ DMA (Part 1: Hardware design), https://discuss.pynq.io/t/tutorial-pynq-dma-part-1-hardware-design/3133
Tutorial: PYNQ DMA (Part 2: Using the DMA from PYNQ), https://discuss.pynq.io/t/tutorial-pynq-dma-part-2-using-the-dma-from-pynq/3134