One of the biggest advantages of FPGAs is that we can change it (reprogram it) many times. In most cases, we do it using either an onboard programmer (many development boards have them) or an external one. The most popular programmer is Platform Cable USB II from Xilinx (a lot of clones are available) and JTAG-HS2 (HS3) Programming Cable from Digilent. The price varies from 59 to 225 USD. But these programmers require to be connected directly to PC with programming software. And what if the board is in a place hard to get?Remote Access
Well, we can program it remotely – with programmer attached to the ethernet via cable. An example of such a programmer is SmartLynq Data Cable. So as far as we have either a PC connected via cable or network access then we can do things remotely. Its main disadvantage for some might be the price – 495 USD.Jtag Pi
That way we’ve made a programmer based on Raspberry Pi 3 B+. We choose that model due to the WiFi module onboard + 1Gbit Ethernet port. Also, it’s very popular – many engineers and hobbyists already have them on their desks. With additional board Jtag Pi attached to raspberry Pi and software app running on it we have a cheap remote programmer.How To
After sticking Jtag Pi on top of the Raspberry Pi we need to copy the Xilinx Virtual Cable for Raspberry Pi application onto board. I copied it into my home directory via SSH. Then just enter into that directory and run:
Yo will see the compilation output:
cc -std=gnu99 -O3 -c -o xvcpi.o xvcpi.c cc -o xvcpi xvc
After that we have a compiled app. Run it by:
Done! You have a programmer running! :-)
Now we can give it a try.Programming
To present you possibilities we will do a simple programming of MiniZED using Jtag Pi.
Pin Vcc is connected to Vref of the FPGA board. It's used to do voltage shifiting of signals (the voltage depends on the board).
First we run Xilinx Vivado. Then from the main menu we choose Open Hardware Manager.
In Hardware Manager we will have Hardware tab where we open target using the connector icon.
After that we will be connected to localhost hw_server.
Now right-click on localhost and choose Add Xilinx Virtual Cable (XVC). Now in pop-up window enter your Raspberry Pi IP (either WiFi or Ethernet network – depends on which you use).
After connecting you will see some recognized devices – in our case we see xc7z007s (Zynq 7007s – MiniZED).
Now we can pick bit file for FPGA and program it remotely.
As you can see it took 5 seconds to program MiniZed (bitstream length for Zynq 7z007s is ~17Mb). You can also read XADC values or do debugging if the bitstream has debug cores in it.
For more information about possibiliites and availability of that board please don’t hesitate to contact me. :-)