Getting Started with PYNQ on ZYBO

ZYBO

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.

MicroSD Setup

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.

Required programs:

How to write the image to a microSD card:

  1. Download the image file from the repository.

  2. Write the image file to the microSD card with the Win32DiskImager program.

How to boot the board:

  1. 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.

  2. 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

  3. 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.

How to turn off the board:

Run this command.

sudo shutdown -h now

Ethernet Connection

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

Hardware Design

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.

Upload Design Files

To upload files, such as bitstreams, from the laptop to the board, you can use FileZilla via the Ethernet connection.

Required programs:

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.

Python Program

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.

References

Last updated