Lecture #20 Page 1 ECE 4110– Digital Logic Design Lecture #21 Agenda 1.MSI: Carry Look-Ahead Adders Announcements 1.N/A.

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.
Comparator.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 7 Arithmetic Logic Unit February 19,
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
ECE 331 – Digital System Design
EECS Components and Design Techniques for Digital Systems Lec 17 – Addition, Subtraction, and Negative Numbers David Culler Electrical Engineering.
CSE-221 Digital Logic Design (DLD)
Space vs. Speed: Binary Adders 11.3 Space vs. Speed.
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Lecture 8 Arithmetic Logic Circuits
1 COMP541 Arithmetic Circuits Montek Singh Mar 20, 2007.
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
Spring 2002EECS150 - Lec10-cl1 Page 1 EECS150 - Digital Design Lecture 10 - Combinational Logic Circuits Part 1 Feburary 26, 2002 John Wawrzynek.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Lec 17 : ADDERS ece407/507.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 4 – Arithmetic Functions Logic and Computer.
ECE 4110– Sequential Logic Design
Chapter 6-2 Multiplier Multiplier Next Lecture Divider
3-1 Chapter 3 - Arithmetic Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer Architecture.
Digital Arithmetic and Arithmetic Circuits
IKI a-Combinatorial Components Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture Notes.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Fall 2004EE 3563 Digital Systems Design EE 3563 Comparators  Comparators determine if two binary inputs are equal  Some will signal greater than/less.
WEEK #10 FUNCTIONS OF COMBINATIONAL LOGIC (ADDERS)
Chapter 6-1 ALU, Adder and Subtractor
Arithmetic Building Blocks
Nov 10, 2008ECE 561 Lecture 151 Adders. Nov 10, 2008ECE 561 Lecture 152 Adders Basic Ripple Adders Faster Adders Sequential Adders.
Computing Systems Designing a basic ALU.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
CHAPTER 4 Combinational Logic Design- Arithmetic Operation (Section 4.6&4.9)
COE 202: Digital Logic Design Combinational Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.
ES 244: Digital Logic Design Chapter 4 Chapter 4: Combinational Logic Uchechukwu Ofoegbu Temple University.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Digital Logic Design.
Spring C:160/55:132 Page 1 Lecture 19 - Computer Arithmetic March 30, 2004 Sukumar Ghosh.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Universal college of engineering & technology. .By Harsh Patel)
Logic and computers 2/6/12. Binary Arithmetic /6/ Only two digits: the bits 0 and 1 (Think: 0 = F, 1.
Combinational Circuits
CS221: Digital Logic Design Combinational Circuits
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 10 Multiplexers MUX: –Selects binary information from one of many input lines and.
Computer Architecture Lecture 16 Fasih ur Rehman.
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
Lecture #18 Page 1 ECE 4110– Sequential Logic Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements 1.HW.
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 5: Arithmetic Circuits Chapter 5 (minus 5.3.4)
1 IKI20210 Pengantar Organisasi Komputer Kuliah No. 23: Aritmatika 18 Desember 2002 Bobby Nazief Johny Moningka
Copied with Permission from prof. Mark PSU ECE
CPEN Digital System Design
Addition, Subtraction, Logic Operations and ALU Design
1 Fundamentals of Computer Science Combinational Circuits.
Lecture #8 Page 1 Lecture #8 Agenda 1.VHDL : Operators 2.VHDL : Signal Assignments Announcements 1.HW #4 assigned ECE 4110– Sequential Logic Design.
Addition and multiplication Arithmetic is the most basic thing you can do with a computer, but it’s not as easy as you might expect! These next few lectures.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Addition and multiplication1 Arithmetic is the most basic thing you can do with a computer, but it’s not as easy as you might expect! These next few lectures.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Lecture 3 ALU and Carry Generator using FPGA 2007/09/21 Prof. C.M. Kyung.
Space vs. Speed: Binary Adders
ECE 331 – Digital System Design
CSE Winter 2001 – Arithmetic Unit - 1
King Fahd University of Petroleum and Minerals
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
Presentation transcript:

Lecture #20 Page 1 ECE 4110– Digital Logic Design Lecture #21 Agenda 1.MSI: Carry Look-Ahead Adders Announcements 1.N/A.

Lecture #20 Page 2 Carry Look Ahead Adders Addition – Carry Look Ahead Adder - We've seen a Ripple Carry Adder topology (RCA) - this is good for simplicity and design-reuse - however, the delay increases linearly with the number of bits t RCA = n·t Full-Adder - different topologies within the full-adder to reduce delay (Δt) will have a n·Δt effect - the linear increase in delay comes from waiting for the Carry to Ripple through

Lecture #20 Page 3 Carry Look Ahead Adders Addition – Carry Look Ahead Adder - to avoid the ripple, we can build a Carry Look-Ahead Adder (CLA) - this circuit calculates the carry for all Full-Adders at the same time - we define the following intermediate stages of a CLA: Generate"g", an adder (i) generates a carry out (C i+1 )under input conditions A i and B i independent of A i-1, B i-1, or Carry In (C i ) A i B i C i we can say that:g i = A i ·B i remember, g does NOT consider carry in (C i )

Lecture #20 Page 4 Carry Look Ahead Adders Addition – Carry Look Ahead Adder Propagate"p", an adder (i) will propagate (or pass through) a carry in (C i ) depending on input conditions A i and B i, : C i A i B i C i p i is defined when there is a carry in, so we ignore the row entries where C i = if we only look at the C i =1 rows we can say that: p i = (A i +B i )·C i

Lecture #20 Page 5 Carry Look Ahead Adders Addition – Carry Look Ahead Adder - said another way, Adder(i) will "Generate" a Carry Out (C i+1 ) if: g i = A i ·B i and it will "Propagate" a Carry In (C i ) when p i = (A i +B i )·C i - a full expression for the Carry Out (C i+1 ) in terms of p and g is given by: C i+1 = g i +p i ·C i - this is good, but we still generate Carry's dependant on previous stages (i-1) of the iterative circuit

Lecture #20 Page 6 Carry Look Ahead Adders Addition – Carry Look Ahead Adder - We can eliminate this dependence by recursively expanding each Carry Equation ex) 4 bit Carry Look Ahead Logic C 1 = g 0 +p 0 ·C 0 (2-Level Product-of-Sums) C 2 = g 1 +p 1 ·C 1 C 2 = g 1 +p 1 ·(g 0 +p 0 ·C 0 ) C 2 = g 1 +p 1 ·g 0 +p 1 ·p 0 ·C 0 (2-Level Product-of-Sums) C 3 = g 2 +p 2 ·C 2 C 3 = g 2 +p 2 ·(g 1 +p 1 ·g 0 +p 1 ·p 0 ·C 0 ) C 3 = g 2 +p 2 ·g 1 +p 2 ·p 1 ·g 0 +p 2 ·p 1 ·p 0 ·C 0 (2-Level Product-of-Sums) C 4 = g 3 +p 3 ·C 3 C 4 = g 3 +p 3 ·(g 2 +p 2 ·g 1 +p 2 ·p 1 ·g 0 +p 2 ·p 1 ·p 0 ·C 0 ) C 4 = g 3 +p 3 ·g 2 +p 3 ·p 2 ·g 1 +p 3 ·p 2 ·p 1 ·g 0 +p 3 ·p 2 ·p 1 ·p 0 ·C 0 (2-Level Product-of-Sums) - this gives us logic expressions that can generate a next stage carry based upon ONLY the inputs to the adder and the original carry in (C 0 )

Lecture #20 Page 7 Carry Look Ahead Adders Addition – Carry Look Ahead Adder - the Carry Look Ahead logic has 3 levels 1) g and p logic 2) product terms in the C i equations 3) sum terms in the C i equations - the Sum bits require 2 levels of Logic 1) A i  B i  C i NOTE:A Full Adder made up of 2 Half Adders has 3 levels. But the 3rd level is used in the creation of the Carry Out bit. Since we do not use it in a CLA, we can ignore that level. - So a CLA will have a total of 5 levels of Logic

Lecture #20 Page 8 Carry Look Ahead Adders Addition – Carry Look Ahead Adder - the 5 levels of logic are fixed no matter how many bits the adder is (really?) - In reality, the most significant Carry equation will have i+1 inputs into its largest sum/product term - this means that Fan-In becomes a problem since real gates tend to not have more than 4-6 inputs - When the number of inputs gets larger than the Fan-In, the logic needs to be broken into another level ex) A+B+C+D+E = (A+B+C+D)+E - In the worst case, the logic Fan-In would be 2. Even in this case, the delay associated with the Carry Look Ahead logic would be proportional to log 2 (n) - Area and Power are also concerns with CLA's. Typically CLA's are used in computationally intense applications where performance outweighs Power and Area.

Lecture #20 Page 9 Carry Look Ahead Adders Adders in VHDL - (+) and (-) are not defined for STD_LOGIC_VECTOR - The Package STD_LOGIC_ARITH gives two data types: UNSIGNED (3 downto 0) := "1111"; SIGNED (3 downto 0) := "1111"; these are still resolved types (STD_LOGIC), but the equality and arithmetic operations are slightly different depending on whether you are using Signed vs. Unsigned Considerations - when adding signed and unsigned numbers, the type of the result will dictate how the operands are handled/converted - if assigning to an n-bit, SIGNED result, an n-1 UNSIGNED operand will automatically be converted to signed by extending its vector length by 1 and filling it with a sign bit (0)

Lecture #20 Page 10 Carry Look Ahead Adders Adders in VHDL ex)A,B: inUNSIGNED (7 downto 0); C: inSIGNED (7 downto 0); D: inSTD_LOGIC_VECTOR (7 downto 0); S: outUNSIGNED (8 downto 0); T: outSIGNED (8 downto 0); U: outSIGNED (7 downto 0); S(7 downto 0) <= A + B;-- 8-bit UNSIGNED addition, not considering Carry S <= ('0' & A) + ('0' & B);-- manually increasing size of A and B to include Carry. Carry will be kept in S(9) T <= A + C;-- T is SIGNED, so A's UNSIGNED vector size is increased by 1 and filled with '0' as a sign bit U <= C + SIGNED(D);-- D is converted (considered) to SIGNED, not increased in size U <= C + UNSIGNED(D);-- D is converted (considered) to UNSIGNED, not increased in size