Space vs. Speed: Binary Adders

Slides:



Advertisements
Similar presentations
L23 – Adder Architectures. Adders  Carry Lookahead adder  Carry select adder (staged)  Carry Multiplexed Adder  Ref: text Unit 15 9/2/2012 – ECE 3561.
Advertisements

Introduction So far, we have studied the basic skills of designing combinational and sequential logic using schematic and Verilog-HDL Now, we are going.
Chapter 4 -- Modular Combinational Logic. Decoders.
Fast Adders See: P&H Chapter 3.1-3, C Goals: serial to parallel conversion time vs. space tradeoffs design choices.
Fast Adders See: P&H Chapter 3.1-3, C Goals: serial to parallel conversion time vs. space tradeoffs design choices.
Space vs. Speed: Binary Adders 11.3 Space vs. Speed.
ECE 301 – Digital Electronics
Adders.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
 Arithmetic circuit  Addition  Subtraction  Division  Multiplication.
Digital Arithmetic and Arithmetic Circuits
Nov 10, 2008ECE 561 Lecture 151 Adders. Nov 10, 2008ECE 561 Lecture 152 Adders Basic Ripple Adders Faster Adders Sequential Adders.
Carry look ahead adder P (I) = a(I) xor b(I); G(I) = a(I) and b(I); S(I) = p(I) xor c(I); Carry(I+1) = c(I)p(I) + g(I)
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
COE 202: Digital Logic Design Combinational Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.
1 Lecture 12 Time/space trade offs Adders. 2 Time vs. speed: Linear chain 8-input OR function with 2-input gates Gates: 7 Max delay: 7.
Lecture #20 Page 1 ECE 4110– Digital Logic Design Lecture #21 Agenda 1.MSI: Carry Look-Ahead Adders Announcements 1.N/A.
Building a Faster Adder
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 5: Arithmetic Circuits Chapter 5 (minus 5.3.4)
1 Carry Lookahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here.
C-H1 Lecture Adders Half adder. C-H2 Full Adder si is the modulo- 2 sum of ci, xi, yi.
Electrical Engineering Engineering the Future Digital Circuits Fundamentals Hands-on Full-Adder Simulation (afternoon)
Presented by A. Maleki Fall Semester, 2010
CDA3101 Recitation Section 5
Carry-Lookahead & Carry-Select Adders
Combinational Circuits
Somet things you should know about digital arithmetic:
Lecture 12 Logistics Last lecture Today HW4 due today Timing diagrams
Chapter 4 -- Modular Combinational Logic
Lecture Adders Half adder.
Addition and multiplication
ENG6530 Reconfigurable Computing Systems
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
ECE/CS 552: Carry Lookahead
Combinational Circuits
ECE 331 – Digital System Design
CSE Winter 2001 – Arithmetic Unit - 1
VLSI Arithmetic Adders & Multipliers
Lecture 14 Logistics Last lecture Today
Arithmetic Functions & Circuits
Instructor: Alexander Stoytchev
Arithmetic Circuits (Part I) Randy H
Instructor: Alexander Stoytchev
Lecture 15 Logistics Last lecture Today HW4 is due today
Instructor: Alexander Stoytchev
CS 140 Lecture 14 Standard Combinational Modules
Chapter 5 – Number Representation and Arithmetic Circuits
Digital System Design Combinational Logic
Part III The Arithmetic/Logic Unit
CSE 140 Lecture 14 Standard Combinational Modules
Addition and multiplication
Instructor: Alexander Stoytchev
Lecture 14 Logistics Last lecture Today
Addition and multiplication
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Combinational Circuits
ECE 352 Digital System Fundamentals
74LS283 4-Bit Binary Adder with Fast Carry
Carry-Lookahead, Carry-Select, & Hybrid Adders
Description and Analysis of MULTIPLIERS using LAVA
Carry-Lookahead, Carry-Select, & Hybrid Adders
Arithmetic Circuits.
Number Representation
Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU.
Lecture 3 Combinational units. Adders
Lecture 2 Adders Half adder.
EEL4712 Digital Design (Lab 1)
Presentation transcript:

Space vs. Speed: Binary Adders

Binary Adders VHDL Adder Carry Lookahead Adder

4-Bit Adder C 1 1 1 0 A 0 1 0 1 B 0 1 1 1 S 1 1 0 0

Adder in VHDL entity adder is port ( a: in STD_LOGIC_VECTOR (3 downto 0); b: in STD_LOGIC_VECTOR (3 downto 0); sum: out STD_LOGIC_VECTOR (3 downto 0); carry: out STD_LOGIC ); end adder;  

std_logic_arith.vhd

Ci AiBi 00 01 11 10 1 1 1 1 1 Ci+1 Ci+1 = Ai & Bi # Ci & Bi # Ci & Ai

std_logic_unsigned.vhd

adder.vhd

Binary Multiplier 2 bit by 2 bit Half Adders are Sufficient Since there is no Carry-in in addition to the two inputs to sum

Binary Multiplier 4 bit by 3 bit 4 bit by 3 bit yields 7 bit result

Binary Adders VHLD Adder Carry Lookahead Adder

Carry Lookahead Adder C2 = G1 + P1(G0 + P0C0) = G1 + P1G0 + P1P0C0 C3 = G2 + P2(G1 + P1 (G0 + P0C0)) = G2 + P2(G1 + P1 G0 + P0C0) = G2 + P2G1 + P2P1G0 + P2PlP0C0   G0-3 = G3 + P3G2 + P3P2G1 + P3P2PlG0 P0-3 = P3P2PlP0

Ripple Carry Adder (4-bit)

Typically, longest delay path through n-bit ripple carry adder is 2n + 2 Tends to be one of the largest delays in a typical computer design Counts as 2 gate delays 2 2 4 1 3 4 1

4 4 2 6 5 6 4

6 4 6 4 2 8 7 8 6

8 6 4 8 6 4 2 10 9 10 8

8 10 6 4 10 8 6 4 10 Gate Delays 16-bit Adder -- 34 Gate Delays 64-bit Adder -- 130 Gate Delays

Carry Lookahead Adder Uses Propogate and Generate signals to “lookahead” for incoming carry signals More complicated hardware configuration Substantial decrease in gate delays

Ripple Carry PFA: Partial Full Adders Carry Lookahead

Propagate. P = A xor B. If P = ‘1’ then the carry is “propagated” Propagate P = A xor B If P = ‘1’ then the carry is “propagated” through. If P = ‘0’ then the carry is not “propagated” through. Generate G = A and B If G = ‘1’ a carry is “generated” regardless of the carry bit.

For final carry determination, the Propagate signal is ANDed with the Carry Out and the Generate signal is ORed to the resulting signal. G P Cin Cout Cin A B 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Cout S 0 0 0 1 1 0 1 1 P G

Cin A B 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Cout S 0 0 0 1 1 0 1 1 P G Always Generate a Carry for A = 1, B =1 Cin A B 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Cout S 0 0 0 1 1 0 1 1 P G Propagate the Carry in

Cout

2 4 1 2 4 3 Cout

2 4 PFA For Bit # 1 1 2 4 1 3 4 2 2 3 2 3 1 4 2 1 2 Cout 3 2 3 1 4 2

Bit #2 Bit #1 2 2 4 6 1 1 4 Bit #4 Bit #3 2 2 6 6 1 4 4

Significant Delay Reduction 4 - bit Ripple: 10 Delays CLA: 6 Delays 1 CLA level: 1*4 + 2 = 6 16 - bit Ripple: 34 Delays CLA: 10 Delays 2 CLA levels: 2*4 + 2 = 10 64 - bit Ripple: 130 Delays CLA: 14 Delays 3 CLA levels: 3*4 + 2 = 14 But at the expense of a significant increase in the number of gates used by the circuit