CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 4.

Slides:



Advertisements
Similar presentations
Introduction So far, we have studied the basic skills of designing combinational and sequential logic using schematic and Verilog-HDL Now, we are going.
Advertisements

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
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5.
CSE-221 Digital Logic Design (DLD)
1 CS 140 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris.
Arithmetic II CPSC 321 E. J. Kim. Today’s Menu Arithmetic-Logic Units Logic Design Revisited Faster Addition Multiplication (if time permits)
08/07/041 CSE-221 Digital Logic Design (DLD) Lecture-8:
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 4: Adders.
Spring 07, Mar 8 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2007 Timing Verification and Optimization Vishwani D.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
© Yohai Devir 2007 Fast Arithmetics. © Yohai Devir 2007 Full Adder Cout AiAi BiBi SiSi Cin.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 4.
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
ENGIN112 L12: Circuit Analysis Procedure September 29, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 12 Circuit Analysis Procedure.
4-bit adder, multiplexer, timing diagrams, propagation delays
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
ENGG 1203 Tutorial Combinational Logic (I) 1 Feb Learning Objectives
 Arithmetic circuit  Addition  Subtraction  Division  Multiplication.
Boolean Algebra Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Binary Numbers.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
ECE2030 Introduction to Computer Engineering Lecture 12: Building Blocks for Combinational Logic (3) Adders/Subtractors, Parity Checkers Prof. Hsien-Hsin.
Chapter 6-1 ALU, Adder and Subtractor
Digital Electronics Lecture 6 Combinational Logic Circuit Design.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
DIGITAL CIRCUITS David Kauchak CS52 – Fall 2015.
IT253: Computer Organization Lecture 7: Logic and Gates: Digital Design Tonga Institute of Higher Education.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Spring C:160/55:132 Page 1 Lecture 19 - Computer Arithmetic March 30, 2004 Sukumar Ghosh.
Abdullah Said Alkalbani University of Buraimi
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
Universal college of engineering & technology. .By Harsh Patel)
CSE 20: Lecture 7 Boolean Algebra CK Cheng
Lecture 4 Introduction to Boolean Algebra. Binary Operators In the following descriptions, we will let A and B be Boolean variables and define a set of.
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
Computer Architecture
CPEN Digital System Design
CSE477 VLSI Digital Circuits Fall 2002 Lecture 20: Adder Design
CSE 311 Foundations of Computing I Lecture 25 Circuits for FSMs, Carry-Look-Ahead Adders Autumn 2011 CSE 3111.
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.
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
Number Representation (Part 2) Computer Architecture (Fall 2006)
How does a Computer Add ? Logic Gates within chips: AND Gate A B Output OR Gate A B Output A B A B
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Full Adder Truth Table Conjugate Symmetry A B C CARRY SUM
1 CSE370, Lecture 4 Lecture 4 u Logistics n HW1 due now n HW2 posted now and is due one week from today n Lab1 going on this week n Feedback on lectures,
Combinational Circuits
Logic Gates and Boolean Algebra
Boolean Algebra.
Conditional-Sum Adders Parallel Prefix Network Adders
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.
CSE Winter 2001 – Arithmetic Unit - 1
CSE 370 – Winter Combinational Logic - 1
Instructor: Prof. Chung-Kuan Cheng
Instructor: Prof. Chung-Kuan Cheng
CSE 140L Discussion 3 CK Cheng and Thomas Weng
CS 140 Lecture 14 Standard Combinational Modules
Part III The Arithmetic/Logic Unit
CSE 140 Lecture 14 Standard Combinational Modules
Combinational Circuits
Lecture 4 Logistics Last lecture --- Boolean algebra Today’s lecture
XOR Function Logic Symbol  Description  Truth Table 
Presentation transcript:

CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 4

CSE 2462 Topics:  Adders Synchronous v.s. Asynchronous AND/OR gate v.s. Circuit Logic angle Graph angle (Prefix Adder)

CSE 2463 Prefix Computation  FSM example: Given:  initial state S 0 =A  A sequence of inputs: ( ) Derive the sequence of outputs ABC 0/01/0 0/0 1/0 0/0 1/1 PSNextState X=0X=1 ABA BBC CBA State table BC BB BA X=0 NSPS M0M0 AC CB AA X=1 NSPS M1M1 Input Sequence: 0 1 … Compute N ’ s: N 1 =M 0 N 2 =M 0 M 0 N 3 =M 1 M 0 M 0 N 4 =M 1 M 1 M 0 M 0 … PSNS 12 AB BB CB PSNS 13 AC BC CC PSNS 14 AA BA CA

CSE 2464 Graph Based Approach  Consider the (g p) chain break the long paths C4C4 g3g3 g2g2 g1g1 p3p3 p2p2 p1p1 C1C1

CSE 2465 Graph Based Approach  Generating g 32 and p 32 C4C4 g3g3 g2g2 g1g1 p3p3 p2p2 p1p1 C1C1 g3g3 p3p3 g2g2 p2p2 g 32 p 32

CSE 2466 Graph Based Approach  Generating g 10 and p 10 C4C4 g3g3 g2g2 g1g1 p3p3 p2p2 p1p1 c in g1g1 p1p1 g 10 p 10

CSE 2467 Graph Based Approach  Generating g 30 and p 30 g 32 p 32 g 10 p 10 g 30 p 30 g3g3 p3p3 g2g2 p2p2 g 32 p 32 g1g1 p1p1 c in g 10 p 10

CSE 2468 Boolean Approach g 4 + p 4 ( g 3 + p 3 ( g 2 + p 2 ( g 1 + p 1 ( g 0 + p 0 c in ) ) ) ) g 4, p 4 g 3, p 3 g 2, p 2 g 1, p 1 g 0, p 0 c in g 4 +p 4 g 3, p 4 p 3 g 2 +p 2 g 1, p 2 p 1 g 0, p 0 c in g 4 +p 4 g 3 +p 4 p 3 (g 2 +p 2 g 1 ), p 4 p 3 p 2 p 1 g 0, p 0 c in g 4 +p 4 g 3 +p 4 p 3 (g 2 +p 2 g 1 )+(p 4 p 3 p 2 p 1 )g 0, (p 4 p 3 p 2 p 1 ) p 0 c in

CSE 2469 Prefix Adder  Given: n inputs (g i, p i ) An operation o  Compute: y i = (g i, p i ) o … o (g 1, p 1 ) ( 1 <= i <= n)  Associativity (A o B) o C = A o ( B o C)  (g ’’, p ’’ ) o (g ’, p ’ ) = (g, p)  g=g ’’ + p ’’ g ’  p=p ’’ p ’ gi=pi=gi=pi= a, i=1 a i b i, otherwise 1, i=1 a i xor b i, otherwise

CSE Prefix Adder: Graph Representation  Example: Ripple Carry Adder a i b i (g i, p i ) x y x o y

CSE Prefix Adders: Conditional Sum Adder

CSE Prefix Adders: Conditional Sum Adder  For output y i, there is an alphabetical tree covering inputs (x i, x i-1, …, x 1 )  alphabetical tree:  Binary tree  Edges do not cross

CSE Prefix Adders: Conditional Sum Adder  From input x 1, there is a tree covering all outputs (y i, y i-1, …, y 1 )  The nodes in this tree can be reduced to (g, p) o c = g+pc

CSE Prefix Adders: size and depth  Objective: Minimize # of nodes, s c(n). Minimize depth, d c(n)  Ripple Carry Adder: s c(8) = 7 d c(8) = 7 total = 14  Conditional Sum Adder: s c(8) = 12 d c(8) = 3 total = 15

CSE Prefix Adders: size and depth  Theorem:s c(n) +d n c(n) >= s c(n) +d n c(n) >= 2n-2 d n c(n) means the depth of the last output  Proof: Alphabetical tree of y n 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-(d n c(n) +1) extra nodes s c(n) >=n-1+(n – (d n c(n) +1))=2n-2-d n c(n) s c(n) + d n c(n) >= 2n-2

CSE Prefix Adders: Brent – Kung Adder s c(16) = 26 d c(16) = 6 total = 32

CSE Carry Skip Adder A0A0 a 3,0 b 3,0 c in c4c p 3,0 A1A1 a 7,4 b 7,4 c8c p 7,4 c4c4 A2A2 a 11,8 b 11,8 c p 11,8 c8c8 c 12 If p 3,0 =p 3 p 2 p 1 p 0 = 1, then x = c in x

CSE Carry Propagation Paths  A 2 <- MUX <- MUX <- c in  A 2 <- MUX <- A 1  A 2 <- MUX <- MUX <- A 0  c 12 <- MUX <- A 2  c 12 <- MUX <- MUX <- A 1  c 12 <- MUX <- MUX <- MUX <- A 0  c 12 <- MUX <- MUX <- MUX <- MUX <- c in

CSE False Path  A 1 <- MUX <- A 0 <- c in is a false path If carry is from cin, then block must have p 3 p 2 p 1 p 0 = 1 Since p 3,0 = 1, g 3,0 must be 0 The carry is not generated from A 0 The carry needs not to propagate via A 0, it will go from the MUX

CSE Label Algorithm  Problem: Given a digraph, a set of false paths Derive the longest path of the graph  Algorithm: Color the edges on each false path a label The length of the walk of the same labels are accumulated Otherwise, change to no label