Getting started with the EP2C5 Cyclone II Mini Board

These cheap FPGA boards are widely available from several Ebay suppliers for around $26, and are ideal as a first step into the world of FPGAs. You will also need a USB Blaster, and these are available from the same suppliers. I bought my Mini Board here:

http://cgi.ebay.co.uk/Altera-CycloneII-EP2C5T144-FPGA-Mini-Development-Board-/190501210627?pt=LH_DefaultDomain_0&hash=item2c5ac1ca03

I already had a USB Blaster. Here is one from the same supplier:

http://cgi.ebay.co.uk/Altera-USB-Blaster-Programmer-CPLD-FPGA-JTAG-ship-/200528004660?pt=LH_DefaultDomain_0&hash=item2eb0668634

Many offer a package deal including the two items. Also required is a 5V supply with a suitable connector, I use a Stontronics 5V 2.5A switcher, but nothing like as much current as that is required – 1A should be plenty. Pads are provided for a two pin header, which might be more convenient for some people. A double-sided PCB is used, which keeps the cost down, but means that the unit isn't suitable for high-performance applications.

The Altera EP2C5T144C8 Cyclone II FPGA that the board comes with is an older device, but is still widely used, and is capable of some advanced applications. It has 4068 logic elements, 26 4k RAM blocks giving a total of 119,898 bits, 13 multipliers, two PLLs, and 89 I/Os. Maximum clock frequency is 300 MHz.

The easiest and cheapest way to develop designs for the Cyclone II used on this board is to download the free Quartus II 11.0 Web Edition software from the Altera web site: it's a large download:

http://www.altera.com/products/software/sfw-index.jsp

The board is fitted with a EPCS4 flash configuration memory chip, and a 50 MHz oscillator. Most of the I/Os are brought out to four 2x14 way headers, which may be connected to external circuitry via wire jumpers, or PCBs fitted with matching sockets. Three LEDs are connected to pins 3, 7 and 9, and a push-button is connected to pin 144. You might be puzzled by the lack of a pull-up resistor, but it is possible to enable a weak pull-up on any pin used as an input. The board has two 10-way headers, one for JTAG and one for Advanced Serial programming, to which the USB Blaster can be connected. The documentation supplied is quite minimal – just the schematic and PCB layout:

http://www.leonheller.com/FPGA/EP2C5T144mini.pdf

Don't get excited by the RAM, it isn't included on the board. I think it's provided as an example of how to interface it.

Apply power to the board. The power LED should come on, and the three LEDs should flash at 1 Hz. A simple design has been saved in the configuration flash memory, and is loaded into the FPGA when power is applied. Typically, designs are loaded directly into the FPGA during development vi\a JTAG, and only saved to configuration memory when they are working properly, using Advanced Serial programming.

Assuming you have downloaded and installed the Altera Quartus II 11.0 software, you now need to learn how to use it. Two Hardware Description Languages (HDLs) are commonly used for FPGA design – VHDL and Verilog. The former is based on Ada and the latter is based on C. I prefer VHDL. Altera has a useful tutorial that can be accessed via Quartus Help. Spend some time working through the tutorial, and you should have a good understanding of the basics of creating an FPGA design using VHDL. You needn't type in all the VHDL code; select the text, copy it, and paste it into the Quartus II editor. You might need to edit out some of the extraneous stuff.

Here is a simple VHDL tutorial:

http://courses.cit.cornell.edu/ee475/tutorial/VHDLTut.htm

This is a more comprehensive tutorial:

http://esd.cs.ucr.edu/labs/tutorial/

Try entering the code into Quartus II and simulating it.