Instructor: Prof. Chung-Kuan Cheng

Slides:



Advertisements
Similar presentations
UNIVERSITY OF MASSACHUSETTS Dept
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.
CPE 626 CPU Resources: Adders & Multipliers Aleksandar Milenkovic Web:
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.
Lecture Adders Half adder.
Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Chapter # 3: Multi-Level Combinational Logic 3.3 and Time Response.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 4: Adders.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 4.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 4.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Prof Chung-Kuan Cheng Lecture 3.
Chapter # 5: Arithmetic Circuits
High Performance Circuit Design By Prof. V. Kamakoti Department of Computer Science and Engineering Indian Institute of Technology, Madras Chennai – 600.
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)
Computing Systems Designing a basic ALU.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
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.
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.
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
Prof. An-Yeu Wu Undergraduate VLSI Course Updated: May 24, 2002
UNIVERSITY OF MASSACHUSETTS Dept
Lecture Adders Half adder.
Conditional-Sum Adders Parallel Prefix Network Adders
Lecture 2 Supplement Verilog-01
Addition and multiplication
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.
Basic Adders and Counters
Digital System Design Review.
Topics Number representation. Shifters. Adders and ALUs.
Combinational Circuits
ECE 331 – Digital System Design
CSE Winter 2001 – Arithmetic Unit - 1
Lecture 12: Adders, Sequential Circuits
VLSI Arithmetic Lecture 4
VLSI Arithmetic Adders & Multipliers
Lecture 14 Logistics Last lecture Today
Arithmetic Circuits (Part I) Randy H
Instructor: Prof. Chung-Kuan Cheng
Instructor: Alexander Stoytchev
CS 140 Lecture 14 Standard Combinational Modules
UNIVERSITY OF MASSACHUSETTS Dept
Review: Basic Building Blocks
Overview Part 1 – Design Procedure Part 2 – 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
74LS283 4-Bit Binary Adder with Fast Carry
Lecture 9 Digital VLSI System Design Laboratory
XOR Function Logic Symbol  Description  Truth Table 
Carry-Lookahead, Carry-Select, & Hybrid Adders
Prof. An-Yeu Wu Undergraduate VLSI Course Updated: May 24, 2002
Prof. An-Yeu Wu Undergraduate VLSI Course Updated: May 24, 2002
Carry-Lookahead, Carry-Select, & Hybrid Adders
Arithmetic Circuits.
Carry-Lookahead & Carry-Select Adders
Number Representation
Conditional-Sum Adders Parallel Prefix Network Adders
Lecture 2 Adders Half adder.
Presentation transcript:

Instructor: Prof. Chung-Kuan Cheng CSE246 Adder – Part I Instructor: Prof. Chung-Kuan Cheng

Framework Adder Design Specification Adder Design Optimization Half/Full adder Carry ripple adder Adder Design Optimization Circuit level – Asynchronous adder, Manchester adder Logic level – carry look adder, Ling’s adder, etc… Algorithm level – prefix adders Generic parallel prefix adder optimization using dynamic programming Zero-deficiency prefix adder Function level – carry skip adder Multi-operand Addition 2018/12/7

Half Adder Half Adder “half” means no carry-in Input: xi, yi Sum: si = xi⊕yi Carry out: ci+1 = xiyi Notation: ⊕ means logical XOR + means logical OR Juxtaposition means logical AND 2018/12/7

Full Adder Input: xi, yi and carry-in ci Output si = xi⊕yi⊕ci ci+1 = xiyi + ci(xi+yi) = xiyi + ci(xi⊕yi) 2018/12/7

Ripple Carry Adder . . . Overflow flag = cn⊕cn-1 x0 y0 c0/cin x1 y1 xn-1 yn-1 x1 y1 ci-1 . . . c1 c2 Cout/cn s1 s0 si-1 Overflow flag = cn⊕cn-1 2018/12/7

Understanding Carry Ripple Chain Carry generation signal gi = xiyi Carry propagation signal pi = xi⊕yi Carry annihilation signal ai = (xi+yi)’ Carry ripple in terms of p,g ci+1 = gi + pici In practice, we might use ti = xi+yi = pi+gi and ci+1=gi+tici 2018/12/7

Carry Ripple using (g,p) signals Consider the (g p) chain break the long paths C4 g3 g2 g1 p3 p2 p1 C1 2018/12/7

Circuit level optimization Manchester Adder – concept xiyi 00 01 10 11 gi 1 Pi ai VDD gi pi ci ai One and only one of gi, pi, and ai will be 1 2018/12/7

Circuit Level Optimization Manchester Adder – static logic implementation (gi)' ci+1 ci pi ai 2018/12/7

Circuit level optimization Manchester adder – dynamic logic implementation precharge in 1st half cycle Evaluation in second half cycle ci+1 ci pi ai CLK evaluation precharge Q Time  2018/12/7

Logic level optimization Carry look ahead adder Instead of generating carries bit-by-bit, try to look ahead to generate a group of consecutive carries simultaneously Use logic manipulation to save hardware Recursively unroll ci=gi-1+pi-1ci-1 ci=gi-1+pi-1gi-2+pi-1pi-2ci-2 ci=gi-1+pi-1gi-2+pi-1pi-2gi-3+pi-1pi-2pi-3gi-4+pi-1pi-2 pi-3pi-4ci-4 2018/12/7

Logic level optimization Ling’s adder Notice gi=gipi ci =pi-1(gi-1+gi-2+pi-2gi-3+pi-2pi-3gi-4+pi-2 pi-3pi-4ci-4) Use ti instead of pi ci=ti-1(gi-1+gi-2+ti-2gi-3+ti-2ti-3gi-4+ti-2ti-3ti-4ci-4) Define the expression in parenthesis to be hi ci =ti-1hi hi = gi-1+gi-2+ti-2gi-3+ti-2ti-3gi-4+ti-2ti-3ti-4ti-5hi-4 2018/12/7

Asynchronous Adder Carry completion detection ci bi Remark Not complete 1 Complete Don’t care 2018/12/7

Group (G,P) signals Generating g[3:2] and g[3:2] g3 p3 g2 p2 g1 p1 C4 2018/12/7

Group (G,P) signals Generating g[1:0] and p[1:0] g3 p3 g2 p2 g1 p1 C4 cin cin g[1:0] p[1:0] 2018/12/7

Group (G,P) signals Generating g[3:0] and p[3:0] p3 g2 p2 g3 G[3:2] cin p[1:0] g[1:0] p[3:0] p[1:0] 2018/12/7

Group (G,P) signals g4 + p4 ( g3 + p3 ( g2 + p2 ( g1 + p1 ( g0 + p0 cin ) ) ) ) g4 , p4 g3 , p3 g2 , p2 g1 , p1 g0 , p0 cin g4+p4g3 , p4p3 g2+p2g1 , p2p1 g0 , p0cin g4+p4g3+p4p3(g2+p2g1) , p4p3p2p1 g0 , p0cin g4+p4g3+p4p3(g2+p2g1)+(p4p3p2p1)g0 , (p4p3p2p1) p0cin g[4:3] p[4:3] g[2:1] p[2:1] g[4:1] p[4:1] cout=g[4:0] p[4:0] 2018/12/7

Parallel Prefix Adder What is parallel prefix problem? How binary addition is modeled as a parallel prefix problem? 2018/12/7

Parallel Prefix Problem (PPP) Given n inputs which can be either scalars or vectors, and an arbitrary associative operator •, compute the products for 2018/12/7

Parallel Prefix Problem Direct example is prefix sum problem • is simply natural addition yi = xi+xi-1+…+x1 for Partial sum s[i:j]=xi+xj-1+…+xj (n≥j≥i≥1) yn = s[n:1] = xn+xn-1+…+x1 yn-1= s[n-1:1] = xn-1+xn-1+…+x1 … y2 = s[2:1] = x2+x1 y1 = s[1:1] = x1 2018/12/7

Binary addition as a PPP Addends: Sum: Carry generation signals: Carry propagation signals: Carry bits: Sum bits: 2018/12/7

Binary Addition as a PPP Block carry generation signal Block carry propagation signal Introducing (P,G) operator The calculation of (P,G) pairs becomes a prefix problem 2018/12/7

Single bit (g,p) generator Parallel Prefix Adder The General Prefix Adder Structure Prefix Processing Pre-processing Post-processing Single bit (g,p) generator Feed through node Group (G,P) operator Final sum calculator 2018/12/7

Prefix Adder: Graph Representation strictly leveled directed acyclic graph (DAG) of n columns Size = number of computation (black) nodes Depth = level of the latest output Serial Prefix Circuit 2018/12/7

Prefix Adders: Conditional Sum Adder 8 7 6 5 4 3 2 1 2018/12/7

Prefix Adders: size and depth Objective: Minimize # of nodes, sc(n). Minimize depth, dc(n) Tradeoff between size and depth Ripple Carry Adder: sc(8) = 7 dc(8) = 7 total = 14 Conditional Sum Adder: sc(8) = 12 dc(8) = 3 total = 15 2018/12/7

Prefix Adders: size and depth Minimum size = n-1, achieved by prefix adder Minimum depth = ceil(log(n)), achieved by conditional sum adder Given depth constraint, what is the minimum size? 2018/12/7

Prefix Adders: Conditional Sum Adder 8 7 6 5 4 3 2 1 alphabetical tree: Binary tree Edges do not cross For output yi, there is an alphabetical tree covering inputs (xi, xi-1, …, x1) 2018/12/7

Prefix Adders: Conditional Sum Adder 8 7 6 5 4 3 2 1 The nodes in this tree can be reduced to (g, p) o c = g+pc From input x1, there is a tree covering all outputs (yi, yi-1, …, y1) 2018/12/7

Prefix Adders: size and depth Theorem:sc(n)+dnc(n) >= sc(n)+dnc(n) >= 2n-2 dnc(n) means the depth of the last output Proof: Alphabetical tree of yn contains n-1 internal nodes. For each column where the prefix is not ready, at lease one extra node is needed, therefore we need at least n-(dnc(n) +1) extra nodes sc(n) >=n-1+(n–(dnc(n)+1))=2n-2-dnc(n) sc(n) + dnc(n) >= 2n-2 2018/12/7

Prefix Adders: size and depth 2018/12/7

Zero-deficiency/depth-size optimal Define the deficiency of a prefix circuit is as def = size + depth – (2n – 2) A prefix circuit is said to be of zero-deficiency if its deficiency is zero A prefix circuit is said to be depth-size optimal if it achieves minimum size under given depth requirement depth-size optimal Zero-deficiency 2018/12/7

Zero-deficiency/depth-size optimal The big picture What is the minimum depth of zero-deficiency circuits for a given width? 2018/12/7

Prefix Adders: Brent – Kung Adder 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 sc(16) = 26 dc(16) = 6 total = 32 2018/12/7