Channels ▼

Al Williams

Dr. Dobb's Bloggers

FPG, Eh?

March 04, 2014

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:

#!/bin/sh
value=$(($1));

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

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.

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video