How does CLA (carry look-ahead adder) work?

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

1 ECE 4436ECE 5367 Computer Arithmetic I-II. 2 ECE 4436ECE 5367 Addition concepts 1 bit adder –2 inputs for the operands. –Third input – carry in from.
Introduction So far, we have studied the basic skills of designing combinational and sequential logic using schematic and Verilog-HDL Now, we are going.
Class Exercise 1A.
1 Lecture 12: Hardware for Arithmetic Today’s topics:  Designing an ALU  Carry-lookahead adder Reminder: Assignment 5 will be posted in a couple of days.
Comparator.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 7 Arithmetic Logic Unit February 19,
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.
ECE 331 – Digital System Design
1 Lecture 4: Arithmetic for Computers (Part 3) CS 447 Jason Bakos.
1 EE457 Discussion Fall 2006 Final Review Brandon Franzke, Maryam Soltan, USC2006 and Wei-Jen Hsu, USC 2005.
Fall 2008EE VLSI Design I - © Kia Bazargan 1 EE 5323 – VLSI Design I Kia Bazargan University of Minnesota Adders.
ECE 301 – Digital Electronics
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Digital Arithmetic and Arithmetic Circuits
Copyright 1995 by Coherence LTD., all rights reserved (Revised: Oct 97 by Rafi Lohev, Oct 99 by Yair Wiseman, Sep 04 Oren Kapah) IBM י ב מ 10-1 The ALU.
Nov 10, 2008ECE 561 Lecture 151 Adders. Nov 10, 2008ECE 561 Lecture 152 Adders Basic Ripple Adders Faster Adders Sequential Adders.
How does CLA (carry look- ahead adder) work? Wei-jen Hsu TA for EE457 at USC, fall 2004 Modified fall 2005.
COE 202: Digital Logic Design Combinational Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.
Morgan Kaufmann Publishers
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
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.
COMP541 Arithmetic Circuits
MIPS ALU. Building from the adder to ALU ALU – Arithmetic Logic Unit, does the major calculations in the computer, including – Add – And – Or – Sub –
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
How does a Computer Add ? Logic Gates within chips: AND Gate A B Output OR Gate A B Output A B A B
1 The ALU l ALU includes combinational logic. –Combinational logic  a change in inputs directly causes a change in output, after a characteristic delay.
Explain Half Adder and Full Adder with Truth Table.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
PRESENTATION Carry Look Ahead Adder.
Lecture 3 ALU and Carry Generator using FPGA 2007/09/21 Prof. C.M. Kyung.
1 Arithmetic Building Blocks Today: Signed ArithmeticFirst Hour: Signed Arithmetic –Section 5.1 of Katz’s Textbook –In-class Activity #1 Second Hour: Adder.
Combinational circuits
Combinational Circuits
Somet things you should know about digital arithmetic:
Lecture 12 Logistics Last lecture Today HW4 due today Timing diagrams
CS2100 Computer Organisation
CSE241A VLSI Digital Circuits Winter 2003 Recitation 2
Addition and multiplication
Space vs. Speed: Binary Adders
CS231: Computer Architecture I
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Digital Fundamentals Floyd Chapter 6 Tenth Edition
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.
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
ECE/CS 552: Carry Lookahead
Combinational Circuits
ECE 331 – Digital System Design
CSE Winter 2001 – Arithmetic Unit - 1
Unsigned Multiplication
VLSI Arithmetic Adders & Multipliers
Lecture 14 Logistics Last lecture Today
Week 7: Gates and Circuits: PART II
Digital Logic.
CSE 140L Discussion 3 CK Cheng and Thomas Weng
Instructor: Mozafar Bag-Mohammadi University of Ilam
Lecture 14 Logistics Last lecture Today
ECE 352 Digital System Fundamentals
CMSC250 Fall 2018 Circuits 1 1.
Combinational Circuits
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
CS231: Computer Architecture I
XOR Function Logic Symbol  Description  Truth Table 
Arithmetic Circuits.
Adder Circuits By: Asst Lec. Basma Nazar
Number Representation
Lecture 3 Combinational units. Adders
Presentation transcript:

How does CLA (carry look-ahead adder) work?

A simple one-bit full adder (+) A B Cin S Cout It takes A, B, and Cin as input and generates S and Cout in 2 gate delays (SOP)

4-bit RCA (+) (+) (+) (+) A3 B3 A2 B2 A1 B1 A0 B0 Carry propagation forms a long sequential wait chain, hence RCA Is slow!! C3 C2 C1 C4 C0 S3 S2 S1 S0 Work from lowest bit to highest bit sequentially. With A0, B0, and C0, the lowest bit adder generates S0 and C1 in 2 gate delay. With A1, B1, and C1 ready, the second bit adder generates S1 and C2 in 2 gate delay. Each bit adder has to wait for the lower bit adder to propagate the carry.

Observations The critical component each bit adder waits for is the carry input. Instead of generating and propagating carry bit-by-bit, can we generate all of them in parallel and break the sequential chain? This is exactly the idea of CLA (carry look-ahead adder).

Carry Look Ahead Logic Now even before the carry in (Cin) is available, based on the inputs (A,B) only, can we say anything about the carry out? Under what condition will the bit propagate an outgoing carry (Cout), if there is an incoming carry (Cin)? Under what condition will the bit generate an outgoing carry (Cout), regardless of whether there is an incoming carry (Cin)?

1-bit CLA adder (+) A B Cin S p g Instead of Cout, an 1-bit CLA adder block takes A, B inputs and generates p,g p=propagator =>I will propagate the Cin to the next bit. p = A+B (If either A or B is 1, Cin=1 causes Cout=1) g=generator =>I will generate a Cout independent of what Cin is. g = AB (If both A and B are 1, Cout=1 for sure) p,g are generated in 1 gate delay after we have A,B. Note that Cin is not needed to generate p,g. S is generated in 2 gate delay after we get Cin (SOP).

CLL (carry look-ahead logic) 4-bit CLA A B A B A B A B (+) (+) (+) (+) C3 C2 C1 C0 p g p g p g p g CLL (carry look-ahead logic) C4 The CLL takes p,g from all 4 bits and C0 as input to generate all Cs in 2 gate delay. C1=g0+p0C0, C2=g1+p1g0+p1p0C0, C3=g2+p2g1+p2p1g0+p2p1p0c0, C4=g3+p3g2+p3p2g1+p3p2p1g0+p3p2p1p0c0 (Note: this C4 is too complicated to generate in 2-level SOP representation)

CLL (carry look-ahead logic) 4-bit CLA A3 B3 A2 B2 A1 B1 A0 B0 (+) (+) (+) (+) C1 C2 C3 Given all p,g’s, all C’s are generated in 2 gate delay in parallel. C0 S3 S2 S1 S0 Given all C’s, all S’s are generated in 2 gate delay in parallel. p0 g0 p1 g1 p2 g2 p3 g3 Given A,B’s, all p,g’s are generated in 1 gate delay in parallel. CLL (carry look-ahead logic) Key virtue of CLA: sequential operation in RCA is broken into parallel operation!!

Observation The CLL block cannot be made too big (at most 4 bits) because if the equations for C’s are too long it cannot be evaluated in 2 gate delay. So how about long operands, say 16 bits? We add another layer of CLL and make a multi-level CLA.

16-bit CLA With all C’s in place, S’s are calculated in 2 gate delay With the seed C’s as input, the first-tier CLLs use Cin and p,g’s to generate C’s in 2 gate delay The second-tier CLL takes the P,G’s from first-tier CLLs and C0 to generate “seed C’s” for first-tier CLLs in 2 gate delay. (note that the logic for generating “seed C’s” from P,G’s is exactly the same to generating C’s from p,g’s!) Same as before, p,g’s are generated in parallel in 1 gate delay Now, without input carry, the first-tier CLL cannot generate C’s…… Instead they generate P,G’s (group propagator and group generator) in 2 gate delay P => This group will propagate the input carry to the group P=p0p1p2p3 G => This group will generate a output carry G=g3+p3g2+p3p2g1+p3p2p1g0 Therefore, totally 1+2+2+2+2=9 gate delay to finish the whole thing!!

Now, how about 64-bit CLA? You can visualize that in mind by yourself now, I guess.

CLL (carry look-ahead logic) A bit more details A3 B3 A2 B2 A1 B1 A0 B0 (+) (+) (+) (+) C3 C2 C1 C0 S3 S2 S1 S0 p0 g0 p1 g1 p2 g2 p3 g3 CLL (carry look-ahead logic) C4 Do all these 4 S’s (S3, S2, S1, S0) come together? Actually no! Since C0 is available from the beginning, S0 can be calculated in 2 gate delays (using original SOP expression for S bit in a single bit adder) (before S3,S2,S1)

A bit more details (Cont’d) Again, actually not all the S’s come together! C0 is readily available, so S0 can be calculated in 2 gate delays. Since C0 is readily available, the lowest first-tier CLL can generate C1, C2, C3 independent of the second-tier CLL. Since C1, C2, C3 are done earlier, so is S1, S2, S3. (in 5 gate delays. 1 for (p,g), 2 for (C1,C2,C3), 2 for S) When we get C4, C8, C12, we can start to calculate S4, S8, S12 and get them in 2 more gate delays. That is the same time when we get the other C’s (purple guys) at 7 gate delays. Timing for items generated (in terms of gate delay): black=already available (and special case for S0=4), orange=1, green=3, blue=5, purple=7, brown=9

Thanks!!