MAX+plusII Tutorial
Author: Frank Honoré - January 23, 2004
This tutorial will walk you through all the steps
to turn your kit into an adding machine. The 4-bit adder takes 2 4-bit vectors and
a carry-in and produces a 4-bit sum and a carry-out. This tutorial
assumes you are working on a Lab PC.
The first step is to create a folder for your work and download
the following 2 verilog files into this directory.
- full_adder.v
- full_adder_4bit.v
- full_adder_4bit.acf
Start MAX+plusII and open full_adder_4bit.v.
Click the File menu and select Open. Browse to the folder where the files are located and choose full_adder_4bit.v.
Now set your project to the current file.
Click the File menu. Click Project and select Set
Project to Current File. You have now started your project.
Now you have to configure the device. Select Device... from
the Assign menu. A small window will pop up that will allow you
to choose the chip you are programming. Select FLEX 10K from the device pull-down
menu. Select EPF10K10LC84-3 from the Devices scroll menu. Now click on Device
Options. From the pull-down menu next to Configuration select EPC2LC20.
Click OK. Click OK again to get rid of the configuration window.
Save the project at this time.
You should now compile the project. Select the Compiler from the
MAX+plus II menu. Press Start.
You may optionally simulate the adder at this point.
The pinout has already been assigned for you in the full_adder_4bit.acf
file. You can view this file or full_adder_4bit.pin
to see this pinout so you can wire your kit. It is a good idea to verify
the .pin file before programming the device. The .acf file may be edited by
hand if desired.
The first time you use a new (to you) FPGA board program both FPGAs
(EPC2s). This is to ensure that all pins are tristated before you try to
use them. The files to use are available in /mit/6.111/altera/tristate/blank10K*0.pof.
Or you can download them here.
- blank10K10.pof
- blank10K70.pof
You are now ready to program. Set up your kit. Plug in the programming
cable on the left hand side for the FLEX10K10 and turn on the power. Make sure that the programming cable is not
plugged in backwards. The red stripe should be on the left with the front
of the kit towards you.
Open the programmer by selecting the Programmer from the MAX+plus
II menu. Two menus pop up.
Under Hardware Setup choose ByteBlaster.
Now select Multi-Device JTAG Chain from the JTAG menu.
If a pop-up window does not appear then select Multi-Device JTAG Chain
Setup...JTAG menu.
In the pop-up window, select EPC2 from the Device Name pull-down
menu and the click Select Programming File... Choose the file called
full_adder_4bit.pof. Click Add. Click OK.
Click Program from the programmer window. Programming will take
a few minutes. Be patient.
If you haven't already do so, repeat these steps to program blank10k70.pof on the righthand side.
Now you have to prepare your kit for testing. Wire toggle switches
to all the input signals a[0..3], b[0..3], and cin to match the .pin file. For example, wire AD3(cin) to S24, AD4(a3)->S23, AD5(a2)->S22, AD6(a1)->S21, AD7(a0)->S20, AD8(b3)->S19, AD9(b2)->S18, AD10(b1)->S17, AD11(b0)->S16. The a input will be displayed in the 2nd hex led, the b input in the 3rd hex lead and the output will be displayed in the 4th hex display.
Wire the kit's clock /CLK to the /HHEX and /LHEX inputs on the Nubus and be sure that NUHEX is wired to ground.
You will have to turn the power to your kit off and on to get the
new program to load into the FPGA.
Congratulations your kit can now add 2 numbers!
Last modified: Fri Jan 23 17:10:05 EST 2004