FPG, Eh?

March 04, 2014

The specs are impressive: A dual core Cortex A9 CPU that can run at 1GHZ

Some time ago, my friends at Xilinx sent me a ZedBoard to evaluate. This board has a dual core ARM processor on it along with a lot of interesting peripherals. However, the big attraction is that the processor also has FPGA onboard and an integrated suite of software to let you combine software with IP cores to build various functions.

The specs are impressive: A dual core Cortex A9 CPU that can run at 1GHZ. 512MB of DDR3 RAM, 256 Mb of flash, gigabit networking, a USB host port and a USB serial port for a console. There’s even a tiny OLED display along with provisions for driving VGA or HDMI and a capable audio codec.

Of course, that FPGA fabric eats a bit of power. The power brick on this board is quite hefty. A prepopulated SDCARD has a small Linux image on it and — once you figure out which connector is the USB serial port — it boots right up to a prompt.

There are Linux devices for many of the onboard resources. For example, the write_led command will set a decimal number on the discrete LEDs. If you dump the script, you can see that like many Linux systems, it exposes the LEDs as a gpio device:


if [ $value -ge 0 ]; then
        for i in 0 1 2 3 4 5 6 7;
                echo $(($value&0x01)) > /sys/class/gpio/gpio$led/value;

Of course, that’s not the attraction. The real power would be using the FPGA to build exotic DSP functions, PWM generators, and similar hardware I/O devices.

Unfortunately, I’m not there yet. I did get the Xilinx Vivado suite loaded on my 64-bit Linux workstation. It did take two tries to download and bypass the horrible Java download manager that kept trying to help me, but I did get it running.

What I couldn’t do was get the Digilent USB to JTAG cable working. Oddly, I’ve made it work before (and perhaps that’s why it won’t work now), but I have tried a lot of gyrations to make it work. The system sees the device (using lsusb) but the Digilent software simply won’t find the cable. There are no useful error messages either, so it promises to be a tough problem to debug. The other alternative is to connect the board to my real Xilinx USB cable (not that it sometimes isn’t finicky under Linux). Unfortunately, that’s going to take some cable adapters that I don’t have, but that may wind up being my best option.

I’ve complained before about the sad state of Linux support for developer tools, so I won’t belabor it again. It does seem funny that a board that boots up out of the box in Linux has problems supporting a Linux host. I have a feeling that once I get it all installed and working, it will be great, but for now I can only imagine.

I’ve said in the past that some people use FPGAs as sophisticated I/O devices for an onboard or external CPU. This seems to be the natural evolution of that idea. I’d promise to tell you more next time, but you may have to wait for me to get the tools running, so I’ll just promise to continue the story sometime soon.