PYNQ is an open source software framework based on Linux and Ubuntu as well as Python language, mainly providing a development platform based on Python for Xilinx's Zynq-7000 SoC, Zynq UltraScale+ MPSoC devices and the Alveo series of data acceleration card from Xilinx. PYNQ stands for “Python Productivity for Zynq”, as the name implies, PYNQ simplifies the process of creating embedded applications using Zynq devices with the help of the most popular Python programming language, it is a wonderful tools for embedded developers.
With the PYNQ platform, designers can use Python, an productive programming language, to develop processor applications and improve development efficiency; at the same time, based on Hardware Overlay and API in PYNQ and xfOpenCV hardware acceleration library provided by Xilinx, hardware acceleration can be achieved by making full use of (Programmable Logic) resources in Zynq-7000 and Zynq UltraScale+ MPSoC.
PYNQ can be viewed as a multi-layer stack, extending from the lower layer hardware to the middle layer of operating system (including the software drivers and API) and then to the high layer of software applications. It provides a set of integrated software and hardware components so that developer not only use existing components directly, but also adjust and extend functionality as needed. In summary, PYNQ accelerates the hardware/software co-design of embedded systems based on Zynq and improves the development productivity.
Which devices and development boards are supported by PYNQ
PYNQ mainly supports Zynq-7000 SoC series, Zynq UltraScale+ MPSoC series devices and Xilinx Alveo series of accelerator cards of Xilinx.
- PYNQ was first developed by Xilinx Research Lab and Xilinx University Program (XUP). At present, some third parties have joined the development of PYNQ to generate PYNQ image files and provide continuous upgrade for some general development boards based on Zynq-7000 and Zynq UltraScale+ MPSoC (such as Pynq-Z1, Pynq-Z2, Xilinx ZCU104, ZCU111 and Avnet Ultra96). Designers can download the latest PYNQ image files of these development boards from www.pynq.io.
- The latest version of PYNQ can also support Xilinx Alveo accelerator cards
- Users may also use the source code and build steps provided through github.com/Xilinx/pynq to generate PYNQ image for their own Zynq-7000 and Zynq UltraScale+ MPSoC boards.
The PYNQ Image
The PYNQ Image is mainly composed of three parts, as shown in the following figure:
- Ubuntu Root FS + Python 3.x Package + Jupyter Notebook
- The supported Ubuntu root file system can be Ubuntu 16.04 and 18.04
- Interpreter and Python Library of Python 3.x
- Jupyter Notebook is an interactive notebook based on Web applications that can be used to create and run Python code
- The part of the Linux Image, generated by the Xilinx Petalinux tool, is related to the configuration of the device or development board.
- Using Xilinx Petalinux tools and process to generate Linux Image (based on BSP of Zynq-7000 and Zynq UltraScale+ MPSoC. This process is suitable for general development boards, which are provided with complete BSP)
- The user may also use the .hdf file exported from Xilinx development tool Vivado to generate BSP, then generate the Linux Image (this process is suitable for user-customized development boards and does not require the designer to provide BSP, instead the designer may directly use the .hdf files exported by the Vivado project.)
- PYNQ Python Module and Class provided by Xilinx
- Hardware Overlay API
- Libraries for peripherals and PS-PL interfaces such as GPIO, DMA, Interrupt...
Running the PYNQ Image
You can download PYNQ Image for the development board from www.pynq.io or generate your own PYNQ Image, the Image is a disk image file (.iso), you may use a burning tool (such as Win32 Disk Imager or Etcher) to burn the .iso file to the SD card and set the device to boot from SD card.
Running the PYNQ Image is equivalent to launching a GUI of Desktop Linux-Ubuntu and run the Jupyter Notebook application in system. With the help of Jupyter Notebook and Python interpreter and library within the image, users can edit and run their own applications and documents in Python.
Xilinx PYNQ
PYNQ is an open-source project from Xilinx
Learn MoreLet's Talk
Connect with Avnet's Xilinx experts to find the right solution for your business
Learn More