The Pynq Z2 board based on a Xilinx FPGA and aims to reduce development time on these processing beasts. SoC-based boards are gaining more and more popularity. And this is not surprising, because such a combination provides truly amazing opportunities compared to the "just" processor or "just" FPGA. On such SoCs, you can build systems that combine algorithmically complex tasks, support for network stacks, GUIs and other things that are easier to implement on the processor, and tasks that require hard real time, signal processing, image processing and other tasks that are convenient for implementation FPGA. Of course, for many tasks you can use simple FPGAs (possibly including the IP core of a processor like NIOS II or MicroBlaze in them), many tasks can be solved on a processor of sufficient power using real-time operating systems (such as RTEMS), but still, SoC are currently a very attractive option for solving many problems, both in professional fields and for hobbies.

Before the 1st workshop by Adam Taylor on 5th May, I scoured the pynq.io website for all the material I could find to get started.

Firstly, I installed all the required Softwares starting with updating my Vivado HLS Suite to the 2019.2 version, the newest one. However, I soon found myself at sea while reading the documentation or following use cases on the website. Therefore, I uninstalled Vivado and re-installed the 2019.1 version. This was really annoying given that the internet connection at home is not that great and I was busy with my college examinations. This took about a day or so.

 

After that I went onto install the Pynq-Z2 image and started experiment following the documentation available on the website which I believe is insufficient for a starter like me. However, I found ways to understand code and get things to compile. I also explored the possibility to run Jupyter notebooks online. This I found really interesting, though initially I did not know how to use it.

 

Armed with this basic knowledge I sat through the workshop  quite comfortably. The explanation was precise and I loved  the demonstration.

Session 1 of the workshop covered two overlays that are included in the standard PYNQ image - the Base overlay and the Logictools overlay.

We were given an example of using the pattern generator and trance analyzer to toggle a few pins and monitor what happens, but the example given just took some pin names and magically knew how to access them. This example for instance generated output on D0-D2 and monitored D17-D19:

PYNQ logic tools

The base overlay provides the ability to work with all of the hardware interfaces on the PYNQ board, including the HDMI, Audio, Pmod, RPI and Shield Connector.

The LogicTools overlay had some interesting functions but because of online examinations back at college(uhhh...my notorious profs!!!) I could not explore much.

The github repo of the Pynq-Z2 board was quite useful and I mostly copy-pasted code making every effort to understand it after the workshop.

This link here was particularly useful - https://rk.edu.pl/en/overview-pynq-project-offering-fpga-capabilities-python-and-data-engineers

 

Exploring further

Next, I decided to find a way to program the Arduino pins to attach a shield and do a basic datalogging example by interfacing with an SPI micro-SD card reader module. I learnt from the documentation that I needed to embed Microblaze into the overlay to get that running. Then, I found this post - Simple I/O control using PYNQ which gave me a lot of useful information(actually everything).  For the SPI integration I tried lots of fragments I found online but none of them seemed to be solving my purpose. Amen. I decided to keep it aside and work on it after my online examinations are over.

 

The Path Ahead

I am eagerly looking forward to the next few workshops and in the mean time take help from the community to upskill myself. I am very eager to implement a mask detector for public places project which I plan to submit for the Fighting Germs Contest.