First steps with an FPGA!

21 09 2009

For my research group at Purdue, we’ve decided we want to do some work with FPGA (or Field Programmable Gate Arrays). These are essentially chips that you can use to program very complex, very fast circuits. They are superior to other sorts of chips, such as DIP integrated circuits, because they are smaller, relatively cheap for all the power they have (~$10-$20), fully customizable, and FAST.

This is Xilinix Spartan FPGA, the kind I'm using.

This is Xilinix Spartan FPGA, the kind I'm using.

This was my first foray into FPGAs and it drove me crazy getting my tools all set up properly. I thought I’d post some thoughts.

To get started with FPGAs, my research group purchased the Xilinx Spartan-3AN Starter Kit. We chose this kit because the board it comes with has all sorts of useful peripherals, such as USB, RS-232, Ethernet, VGA outputs and an LCD character screen. All these extras will really help to speed up development and make learning a lot easier.

Last spring, I had decided I wanted to give FPGAs a try, so I purchased a book called “FPGA Prototyping by Verilog Examples“. This book is actually really helpful now since it uses the exact same chip that my board comes with. It has tons of sample code and examples, and I think it’s really going to help me learn.

I was really excited when I first got this board, but that’s always when the problems start don’t they? Well, firstly, the software that came with the board (an IDE and Xilinx utilities) was version 9.1, but the current version is 11.1. Ok, I’m sure I won’t be able to really tell a difference anyways since I’m just starting out.

The software only runs on Windows XP and RHEL officially. I recently installed Windows 7 and Arch Linux on my computer, so this might cause problems. Well, it did. The software refused to install properly on Windows 7, so I tried it on Linux. The software installed fine on Linux, but I couldn’t get the drivers to connect tot he chip itself to work. I worked on this problem to no avail for about 10 hours, absolutely drove me crazy! But what good is software if it can’t talk to the board? Not much. As such, I’m now using Windows XP on my Mac through Boot Camp. Turns out when they say Windows XP and RHEL only, they really do mean only.

I can program a little Abel, but I’ve never actually used Verilog before. I’m pretty excited to learn a new language though, especially an HDL (Hardware Description Language) since it’s completely different from what I normally work with.

Maybe you’re asking, what did I do for hello world in a circuit? I did a simple 1 bit comparator! Basically, when 1 of 2 DIP switches is on, an LED is on. If both switches are off, the LED is off. This was actually kind of tricky to do since I had to find the correct pin numbers of the FPGA to communicate with. Luckily, there was a really good starter manual available that mapped all the LEDs to their corresponding pins.

I think starting to work with FPGAs will be a really exciting project and probably teach me a lot along the way. Once my research group moves a little farther along, I’ll post some updates about how we’re using the FPGA and how work is progressing.

About these ads

Actions

Information

4 responses

1 10 2009
JimmyBean

I don’t know If I said it already but …Great site…keep up the good work. :) I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your blog. Thanks, :)

A definite great read..Jim Bean

6 10 2009
RobD

what a great site and informative posts, I will add a backlink and bookmark your site. Keep up the good work! :)

8 10 2009
BloggerDude

I don’t know If I said it already but …I’m so glad I found this site…Keep up the good work I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog. Thanks, :)

A definite great read….

9 10 2009
Bill Bartmann

Generally I do not post on blogs, but I would like to say that this post really forced me to do so, Excellent post!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: