ece 368 lab project 1

18
LAB PROJECT 1 NAME: LAKSHMI YASASWI KAMIREDDY UIN: 651771619 Problem Description: The aim of the project is to design 16 bit adders using different adders and design styles and to understand how these parameters effect the gate count, propagation delay and the RTL view of the design. The components designed are a Full Adder (gate level), a RCA 16-bit adder, a 2’s compliment adder/subtractor (gate level and behavioral level) and a Linear Carry Select Adder. Full Adder – Gate Level Design The functionality of a Full Adder is to calculate sum and carry when a sum of two input bits and a carry in is performed. Truth Table: Schematic: RTL View: The RTL View shows that the Full adder design matches the Schematic.

Upload: lakshmi-yasaswi-kamireddy

Post on 13-Apr-2017

109 views

Category:

Engineering


4 download

TRANSCRIPT

Page 1: ECE 368 Lab Project 1

LAB PROJECT 1NAME: LAKSHMI YASASWI KAMIREDDYUIN: 651771619

Problem Description:The aim of the project is to design 16 bit adders using different adders and design styles and to understand how these parameters effect the gate count, propagation delay and the RTL view of the design. The components designed are a Full Adder (gate level), a RCA 16-bit adder, a 2’s compliment adder/subtractor (gate level and behavioral level) and a Linear Carry Select Adder.

Full Adder – Gate Level DesignThe functionality of a Full Adder is to calculate sum and carry when a sum of two input bits and a carry in is performed.

Truth Table:

Schematic:

RTL View:The RTL View shows that the Full adder design matches the Schematic.

Page 2: ECE 368 Lab Project 1

Code:

16 bit RCA:

It is designed by connecting 16 full adders as shown in the schematic. A and B are 16 bit input vectors, Cin is the carry in, Sum is the 16 bit output vector and Cout is the carry out. This adder will have large delay because of its worst case path (shown in the schematic) going through all the full adders which will be 16*delay of FA.

Schematic:

Code:

Gate Level Description

Page 3: ECE 368 Lab Project 1

Test Bench:

RTL View:

Page 4: ECE 368 Lab Project 1

RTL Simulation Waveform:The waveform shows the functionality of the RCA.

Gate Level Simulation Waveform in slow model (with a sample delay):

Number of combinational functions:

Page 5: ECE 368 Lab Project 1

Maximum propagation delay:

2’s compliment Adder/Subtractor:

Using the RCA built an adder/subtractor is designed as shown in the Schematic. An XOR is for the input B and Add/Sub bit because when subtraction has to be done 2’compliment needs to be calculated. The XOR with 1 gives the 1’s compliment and through Cin which is the add/sub input, a 1 is added with gives the 2’compliment result. Worst case delay will be delay of the RCA + 2*XOR delay. Schematic:

Page 6: ECE 368 Lab Project 1

Code:

Test Bench:

Page 7: ECE 368 Lab Project 1

RTL View:

RTL Simulation Waveform Unsigned:

To check if the B is negative and perform 2’s compliment

Page 8: ECE 368 Lab Project 1

RTL Simulation Signed:

Gate Level Simulation Slow mode Unsigned:

Gate Level Simulation Slow mode signed:

Page 9: ECE 368 Lab Project 1

Number of combinational functions:

Maximum Propagation Delay:

Page 10: ECE 368 Lab Project 1

Adder/Subtractor Behavioral

In this case if the add/sub bit is 1 i.e, Cin=1 then we do X-Y else we do X+Y using behavioral statements.

Code:

Testbench

Behavioral statements

Page 11: ECE 368 Lab Project 1

RTL View

RTL Simulation - Unsigned

Page 12: ECE 368 Lab Project 1

RTL Simulation – Signed

Gate Level Simulation - Unsigned

Gate Level Simulation - Signed

Number of combinational functions:

Page 13: ECE 368 Lab Project 1

Maximum Propagation delay:

Linear Carry Select Adder:Schematic:

Code:Carry select 4 bit

Note that the delay decreased when compared to the gate level model but the number of combinational functions increased.

Page 14: ECE 368 Lab Project 1

Carry Select 16 bit

Test Bench:

Behavioral

Structural

Page 15: ECE 368 Lab Project 1

RTL View:CSA 4 bit

CSA 16 bit

Page 16: ECE 368 Lab Project 1

RTL Simulation

Gate Level Simulation

Number of Combinational functions:

Page 17: ECE 368 Lab Project 1

Maximum Propagation Delay

Design Number of Combinational

Functions

Maximum Propagation delay

RCA 16 bit gate level 38 18.968Adder/Subtractor

RCA gate level33 23.185

Adder/Subtractor behavioral

34 14.642

Carry Select Adder 60 16.996

The table above shows that if an efficient gate level design can be done then we can reduce the number of combinational functions but a behavioral design is very efficient in reducing the delay. It can also be seen that CSA performs better in terms of delay but has a high number of combinational functions. Higher the number of combinational functional higher will be the number of gates in the circuit.

Propagation delay reduces as compared to RCA but the number of combinational functions almost doubles.

Both cases Delay decreases

Huge increase in number means CSA has very high area

Almost equal