Digital Signal Processing Reference
In-Depth Information
Preparing for Downloading
Make sure that you have assigned the correct
Device Name
for the DE2. The
DE2 contains a
EP2C35F672C6
Cyclone II FGPA. When you change the
device type you will also need to redo the pin assignments. Make sure that you
have also assigned the correct pin numbers for the DE2 board. PB1 is pin
N23
,
PB2 is pin
P23
and the LED is pin
AE23
. (refer to section 1.1 for help)
Whenever you change the Device or pin assignments, if is necessary to
recompile before downloading.
After checking to make sure that the cables and jumpers are hooked up
properly, you are ready to download the compiled circuit to the DE2 board.
Select
To o l s
Programmer
. Click on
Hardware Setup
, select the proper
hardware, a
USB-Blaster
. (If a window comes up that displays, "
No
Hardware"
to the right of the Hardware Setup button, use the Hardware Setup
button to change currently selected hardware from "
No Hardware"
to "
USB-
Blaster"
. If a red JTAG error message appears or the start button is not
working, close down the Programmer window and reopen it. If this still
doesn't correct the problem, then there is something else wrong with the setup
or cable connection. Go back to the beginning of this section and check each
step and connection carefully.)
Final Steps to Download
The filename orgate.sof should be displayed in the programmer window. The
*.sof file contains the FPGA's configuration (programming) data for your
design. To the right of the filename in the Program/Configure column, check
the
Program/Configure
box. To start downloading your design to the board,
click on the
Start
button. Just a few seconds are required to download. If
download is successful, a green info message displays in the system window
notifying you the programming was successful.
Testing Your Design
On the DE2 board, the middle two pushbuttons are used in the design and one
of the LEDs to the left just above them. The locations of PB1, PB2, and the
decimal LED are in the lower right corner of the board as seen in Figure 1.16.
After downloading your program to the DE2 board, the LED in the lower right
corner should turn off whenever a pushbutton is hit. Since the output of the OR
gate is driving the LED signal, it should be on when no pushbuttons are hit.
Since the buttons are active low, and the
BNOR2
gate also has active low
inputs and output, hitting either button should turn off the LED.