Digital Design Laboratory
 

Full Adder Lab

Introduction to the Xilinx Foundation System -
Schematic entry,  Functional Simulation and Implementation


Purpose:

The purpose of this lab is:

  1. To design and simulate a Full Adder circuit.
  2. To implement the circuit in a FPGA
  3. To test the full adder circuit


Background:

The Half Adder of the previous lab adds two bits and generates a Sum and Carry-out output. However, to be useful for adding binary words, one needs a Full Adder (FA) which has three inputs: the augend, the addend,  and a Carry-in. The following example illustrates the addition of two 4-bit words A(A3A2A1A0) and B(B3B2B1B0).


Figure 1: Addition of binary numbers

The addition can be split-up in bit slices. Each slice performs the addition of the bits Ai, Bi and the Carry-in bit Ci (= Carry-out bit of the previous slice). Each slice consists of a full adder, illustrated below.


Figure 2: Block diagram of a full adder (FA)

A circuit that implements a full adder is given in Figure 3 below.


Figure 3: Logic diagram of a Full Adder

The circuit consists of two XOR gates, two AND gates and one OR gate. The XOR=AÅB, also called exclusive OR, is defined by the following truth table.
 
 
 

INPUTS
Out
A
B
XOR
0
0
0
0
1
1
1
0
1
1
1
0

Pre-lab assignment:

Before coming to the lab read the pre-lab section and answer all the questions. Write the derivations down in your lab notebook. See guidelines on keeping a notebook. Failing to do the pre-lab in advance will make it impossible to finish the actual lab on time.

  1. Read
    1. Section on "Design Implementation" (part a on Implementation).
    2. Section on "Downloading the design to the FPGA" - digilab board
    3. Description of the "Digilab board".
  2. Reviewing: if you have not read the following sections, read them now
    1. Section on "Design Flow Overview" , :Devices" and "Projecct Manager" of the tutorial "Getting started with the Xilinx Foundation Tools".
    2. Section on "Entering a Schematic design"
    3. Section on "Functional Simulation"
  3. Pre-lab Questions (answers need to be submitted on Blackboard)
      1. A full adder can be defined by its truth table. Fill out the following truth table for the Sum S and Carry-out Co signal.
       
    Inputs Outputs
    A B C Sum Co
    0 0 0 . .
    0 0 1 . .
    0 1 0 . .
    0 1 1 . .
    1 0 0 . .
    1 0 1 . .
    1 1 0 . .
    1 1 1 . .

     
      2. Write down the logic expression of a Sum and Carry-out bits, based on the logic diagram of Figure 3. Use the Å symbol for the XOR operator (note: when entering your answer in Blackboard, use the $ symbol for the XOR gate).

      3. Verify that the expressions for S and Co derived above correspond to the outputs defined in the truth table of question 1. Check for the 8 possible combintations of the input signals and write down the corresponding outputs S and Co.

      Various questions on the sections "Design Implementation", "Downloading" and the "Digilab board".  Read these sections before answering the Prelab questions on Blackboard.

      4. List the different steps of the implementation process of a FPGA.

      5. During what step of the implementation process can part of the logic be removed (“trimmed”)?

      6. What does NGD stand for?

      7. When downloading a design onto a FPGA using the Digilab board, what type of communication is used?

      8. What type of FPGA device (give the device family)  is on the Digilab board?

      9. Suppose you would like to use the General Purpose Switches, SW6, SW7 and SW8 of the Digilab board to apply the inputs A, B and C, respectively. What pin numbers on the FPGA should you connect the inputs to?

      10. To display the outputs S and Co on the LEDs 7 and 8, respectively, of the Digilab board, what pin numbers should you use of the signals S and Co?

      11. The parallel port on the Digilab Board can be used for two purposes: (1) Programming the FPGA and (2) Parallel data communication. Which switch determines the mode of the parallel port. Give the switch number.

      12. What is the power supply needed for the Spartan and the Spartan XL FPGA family of devices?


In-lab assignment:
 

A. Parts and Equipment:

B. Experiments
 

Read the instructions carefully before doing  the lab

You will enter the schematic and simulate the Sum and Carry-out function on the Xilinx Foundation Tools. This will be done by following the procedure explained in the tutorial webpages. Instead of doing the example in the tutorial you will be implementing the S and Co function in one schematic.

If you have problems with any of the above tasks, see the instructor, TA or one of the consultants during the scheduled lab times.

Hand-in (at the start of next lab)

You have to hand in a short lab report that contains the following (see also Guidelines of Lab Report):

  1. Course Title, Lab no, Lab title, your names and date
  2. Since the Pre-lab has been submitted online, there is no need to repeat it here.
  3. Section on the lab experiment:
    1. Brief description of the lab experiment including the goals and discussion on the theory of operation (if applicable).
    2. Schematics of the circuit (insert the screen capture of your schematic - make sure your names is on it)
    3. Simulation waveform (use the screen shot of the timing waveforms with your names on it)
    4. Review of the results indicating that the circuit function properly. You can for instance give a truth table and indicate that for each entry the logic simulator give the right results. Feel free to label the waveforms to indicate the proper operation.
  4. Conclusion or discussion (if appropriate).
The lab report is an important part of the laboratory. Write it carefully, be clear and well organized. It is the only way to convey that you did a great job in the lab. It is preferred (but not necessary) that you type the lab report. The report is due at the start of the next lab session.


Back to ESE201 homepage
Created by Jan Van der Spiegel; September 12, 1997; Updated by J. Van der Spiegel, September 9, 2004.
Copyright, J. Van der Spiegel, 2004