Recently I got hold of a PYNQ-Z1 board and accessories kit from Digilent via the Xilinx University Program. This nifty piece of kit supposedly lets you program an FPGA (the Xilinx ZYNQ) using a Jupyter notebook.
What’s in the Box?
Here’s a picture of what’s inside:
I’m following the PYNQ Guide to Getting Started, which provides this handy diagram:
Don’t be fooled – the numbers on the diagram don’t actually match up with the set-up steps described on the web page.
Ok, Step 1:
Set the boot jumper (labelled JP4 on the board) to the SD position by placing the jumper over the top two pins of JP4 as shown in the image. (This sets the board to boot from the Micro-SD card)
Well that was easy. My board came with this already done.
…and, Step 2:
To power the PYNQ-Z1 from the micro USB cable, set the power jumper (JP5) to the USB position by placing the jumper over the top two pins of JP5 as shown in the image. (You can also power the board from an external 12V power regulator by setting the jumper to REG.)
It took me a minute to identify the “JP5” label. (Hint: it’s next to the power switch) However, the USB setting is the bottom two pins of JP5, not the top two. Or at least that’s what the label on the board says.
…and, Step 3:
Insert the Micro SD card loaded with the PYNQ-Z1 image into the board. (The Micro SD slot is underneath the board)
That was straight forward enough. My Digilent kit came with a Micro SD adaptor, but you don’t seem to need it.
…and, Step 4:
Connect the USB cable to your PC/Laptop, and to the PROG/UART (J14) on the board
You only really need to do this if you’re planning to run power to the board through your own computer; however, since the Digilent kit only comes with a US or European plug adaptor for the power supply that’s certainly my plan. (Also it was raining and I couldn’t be bothered to go to the shops to buy an extra adaptor)
…and, Step 5&6:
Connect the Ethernet cable into your board and see the step below for connecting to a computer or network.
The last step is to power on the board. You should follow the steps below to connect to the board before powering on.
I’m going to treat steps 5&6 together because, well, Step 6 is pretty simple and Step 5 involves a bunch of other stuff.
The Final Step
Well, I said Step 6 would be easy… but it’s also easy to forget. I spent a good ten minutes wondering why it wasn’t working before I realised that I hadn’t turned it on.
Here’s the finished article:
if the power is connected then the lights will come on.
Connecting to a Network
This was probably the bit of the setup that took the longest for me. I’ve connected up the board in my office at work, not on my home router. The network here only assigns IP addresses to registered MAC addresses. So, first things first: the MAC address for the board is on a sticker on the back. There are two stickers, it’s the longer number.
Once the MAC address was registered I got an IP address (ipa.ddr.e.ss but in numbers). To access the board you have to use a browser and go to: http://ipa.ddr.e.ss:9090.
You should then see a screen like this:
The password is xilinx.
You can also do this directly from the terminal using SSH:
HOME$ ssh email@example.com firstname.lastname@example.org's password: Welcome to Ubuntu 15.10 (GNU/Linux 3.17.0-xilinx armv7l) * Documentation: https://help.ubuntu.com/ Last login: Thu Jan 1 00:00:19 1970 xilinx@pynq:~$ pwd /home/xilinx xilinx@pynq:~$ ls docs jupyter_notebooks pynq REVISION scripts xilinx@pynq:~$
And that’s it, you’re up and running.