CS122A-Fall Quarter, 1998


Lab 9: FPGA Implementation of a Calculator

Prof. Frank Vahid

Purpose

The purpose of this lab is to download the calculator design of the previous lab onto an FPGA and test it.

Assignment
The topography of the FPGA demoboard and the pin numbers of the input and output switches that you may use is attached.
You can display your result in decimal format using the seven-segment displays on the board(U7, U8). In order to to this you might have to include a binary to seven-segment decoder as another component in your design and let its outputs drive the corresponding LED segment.
The flag register containing bits indicating errors like divide-by-zero, overflow, negative results etc. can be diaplayed on the LEDs D9 through D16.

Conclusion:
You are to demonstrate your implementations to the TA.

Topography and Functionality

Section 2. Topography and Functionality
 

This document includes explanation of the following components of the demonstration board.

The Demonstration Board
 



Devices and Device Interface
 
1.    J9     +5 V Power Connector  A regulated +5 volts and ground connected to the FPGA Demonstration Board through connector J9.  Pin 1 (square pad) is +5 V and pin 2 is ground. The power supply should provide at least 250 mA of current to drive the LED displays.

2.    J12     Unregulated Power Input (J12)  The unregulated power input provides a way to power the FPGA Demonstration Board from an unregulated source, such as a 9 V battery or an a.c. adapter. Typically, the input should be 7VDC - 12VDC at 250 mA.  The J12 unregulated power input provides two holes to connect the unregulated power source. The hole with the square pad, marked with a "+" is the positive input. The other hole, marked with a "-" is circuit ground.

3.    SW1    Configuration Switches (SW1).  The following sections describe each of the SW1 switches.

4.    SW2    Configuration Switches (SW2).  The following sections describe each of the SW2 switches.
 
Where X stands for a pin of XC4010E chip and Y a pin of XC3020A chip, e.g. X56 means the pin 56 of XC4010E and Y46 the pin 46 of XC3020A.  An underscore connects a jumper and its specific pin, e.g. J2_#8 means the no. 8 pin of jumper 2.
 
5.    SW3    Eight General-Purpose Input Switches (SW3)     Eight switches connect to eight general-purpose inputs on both the XC3020A and the XC4010E FPGAs. These switches provide logic input to the FPGAs. An FPGA input pin is set to a logic "1" when a switch is on, and a logic "0" when a switch is off.

6.    SW4    RESET Pushbutton (SW4)    Depending on how the Reset signal routing is configured the RESET pushbutton switch can apply an active-Low Reset signal to the FPGAs and configuration PROMs. Reset is normally pulled High through a pull-up resistor.

7.    SW5    SPARE Pushbutton (SW5)    The SPARE pushbutton applies an active-Low signal to the XC3020A on pin 16, and to the XC4010E on pin 18.  The SPARE signal is pulled High through a pull-up resistor.

8.    SW6    PROG Pushbutton (SW6)    The PROG pushbutton applies an active-Low signal to the DONE/PROGRAM input on the XC3020A FPGA socket at pin 45 and to the PROGRAM input on the XC4010E FPGA socket at pin 55. The PROG signal is normally pulled High through a pull-up resistor.

9.    7-Segment Displays (U6, U7, U8)    Three 7-segment displays, are included with the leftmost display (U6) connect to the XC3020A FPGA, and the right two displays (U7 and U8) connect to the XC4010E. Each LED segment is turned on by driving the corresponding FPGA pin 'LOW' with a logic '0.' The decimal point on U8 connects to the INIT pin of the XC4010E (pin 41), and serves as a programming error indicator. The decimal point should be on while the FPGA is in its internal clearing state, then it should remain off during configuration. If the decimal point comes back on, a programming error has occurred.
The decimal points on U6 and U7 are tied to the LDC (Low during configuration) pins of the XC3020A and XC4010E, respectively. The decimal points are on while the FPGAs wait to be configured.

10.    LED Indicators (D1-D8, D9-D16)    Eight LEDs are connected to the I/O pins of each FPGA. D1 through D8 connect to the XC3020A, and D9 through D16 connect to the XC4010E. You can turn on an LED by driving its corresponding FPGA pin Low with a logic "0."