First steps with an FPGA!

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 samkerr

I'm an eclectic person. I like to dabble in a multitude of things. I'm sure you'll find my blog reflects that.
This entry was posted in Code, FPGA and tagged , , . Bookmark the permalink.

7 Responses to First steps with an FPGA!

  1. JimmyBean says:

    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

  2. RobD says:

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

  3. BloggerDude says:

    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….

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

  5. Pingback: Ever want to build your own computer? | Rants, Rambles, and Rhinos

  6. Pingback: One architecture to rule them all… Or at least rule my free time | Rants, Rambles, and Rhinos

  7. ccalc says:

    FPGAs are fun… one development board i like are made by DLP. they have about 40 i/o pins and a USB interface, which makes for easy interaction with a PC, should that interest you. check it out:

Leave a Reply

Your email address will not be published. Required fields are marked *