Module 1

From Hamsterworks Wiki!

Jump to: navigation, search

This is the first part of my FPGA course. It may seem short, but it will take a while to complete.

Having problems with your code? Do I need to change something? Want a reference solution to the project? Email me at "", after removing the "nospam-" bit. I'll try to get back to you in a day or so.


Acquiring the EDA software tools

  • You'll need an Xilinx based FPGA board. Because of the low cost, eight slide switches and eight LEDs I recommend starting out with the Digilent Basys2 board from or a local distributor. When you outgrow it you will still use it for testing quick hacks. The "250 gate" model can also be programmed with a soft AVR processor, if desired...
  • Print out the board's reference manual (available on the same web page) and read through it.
  • You'll need a PC or laptop running either Linux or Windows XP, Vista or Windows 7
  • You'll need the Xilinx design tools available for download from Be warned - it is a very, very big download. You want the package called "Full Installer for Windows" or "Full Installer for Linux" - one of the install options is to user the "cut down" WebPack version.
  • You'll need the development board tools or plugin library from the vendor to allow you to programming the board - for the Basys2 you will need Adept 2 from
  • As Xilinx ship the software in a "UNIX" tar.gz file, on Windows will need something like "7-zip" to extract the installer software. It can be obtained from
  • You'll need to register with Xilinx for a license file, which your WebPack software will attempt to acquire during the install. The install process is very good at walking you through this, so don't fret over it.

If you don't have a FPGA development board you are still able to work your way through the modules, but it is not the same without seeing the design run in actual hardware.


Unpack and install all the software - the downloading hurts more than the installing! If working on Linux search the web to find any missing dependencies - I've only used the Altera tools on Linux and it was quite a challenge to get everything working correctly.

If desired, play with the preloaded self-test application that is loaded into your board.

Hints for Linux users

From Andrei Barbu:

Digilent's gui tool seems to segfault quite a bit, at least under Gentoo. The workaround is to use their commandline tool which is nicer anyway since it can be scripted.

djtgcfg prog -d Basys2 --index 0 --file module2.bit <<< "Y"

Ready to carry on?

Click here to carry on to the next module.

Personal tools