VLSI Arithmetic. Multiplication A = a n-1 a n-2 … a 1 a 0 B = b n-1 b n-2 … b 1 b 0  eg) 1 1 0 0 1 1 1 0 1 0 0 1  1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 Shift.

Slides:



Advertisements
Similar presentations
Lecture 3: Parallel Algorithm Design
Advertisements

Grade School Again: A Parallel Perspective Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 17Mar 16, 2004Carnegie.
CENG536 Computer Engineering Department Çankaya University.
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
Overview Iterative combinational circuits Binary adders
CSE621/JKim Lec4.1 9/20/99 CSE621 Parallel Algorithms Lecture 4 Matrix Operation September 20, 1999.
EECS Components and Design Techniques for Digital Systems Lec 18 – Arithmetic II (Multiplication) David Culler Electrical Engineering and Computer.
L10 – Multiplication Division 1 Comp 411 – Fall /19/2009 Binary Multipliers ×
UNIVERSITY OF MASSACHUSETTS Dept
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
1 Lecture 24: Parallel Algorithms I Topics: sort and matrix algorithms.
Overview Iterative combinational circuits Binary adders
1 ECE369 Chapter 3. 2 ECE369 Multiplication More complicated than addition –Accomplished via shifting and addition More time and more area.
Overview Iterative combinational circuits Binary adders
COE 308: Computer Architecture (T041) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Computer Arithmetic Integers: signed / unsigned (can overflow) Fixed point (can overflow) Floating point (can overflow, underflow) (Boolean / Character)
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 4 – Arithmetic Functions Logic and Computer.
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Great Theoretical Ideas in Computer Science.
MA/CSSE 473 Day 03 Asymptotics A Closer Look at Arithmetic With another student, try to write a precise, formal definition of “t(n) is in O(g(n))”
Chapter 3: The Fundamentals: Algorithms, the Integers, and Matrices
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Digital Kommunikationselektronik TNE027 Lecture 2 1 FA x n –1 c n c n1- y n1– s n1– FA x 1 c 2 y 1 s 1 c 1 x 0 y 0 s 0 c 0 MSB positionLSB position Ripple-Carry.
1 Chapter 7 Computer Arithmetic Smruti Ranjan Sarangi Computer Organisation and Architecture PowerPoint Slides PROPRIETARY MATERIAL. © 2014 The McGraw-Hill.
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
EECS Components and Design Techniques for Digital Systems Lec 16 – Arithmetic II (Multiplication) David Culler Electrical Engineering and Computer.
Advanced Algebraic Algorithms on Integers and Polynomials Prepared by John Reif, Ph.D. Analysis of Algorithms.
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.
Complexity 20-1 Complexity Andrei Bulatov Parallel Arithmetic.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
1 CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits 4-1,2: Iterative Combinational Circuits and Binary Adders.
Universal college of engineering & technology. .By Harsh Patel)
COMP541 Arithmetic Circuits
CEC 220 Digital Circuit Design Binary Arithmetic & Negative Numbers Monday, January 13 CEC 220 Digital Circuit Design Slide 1 of 14.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
COE 308: Computer Architecture (T032) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
CPEN Digital System Design
Addition, Subtraction, Logic Operations and ALU Design
CSE 8351 Computer Arithmetic Fall 2005 Instructors: Peter-Michael Seidel.
Grade School Again: A Parallel Perspective CS Lecture 7.
CS151 Introduction to Digital Design Chapter 4: Arithmetic Functions and HDLs 4-1: Iterative Combinational Circuits 4-2: Binary Adders 1Created by: Ms.Amany.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
Full Adder Truth Table Conjugate Symmetry A B C CARRY SUM
William Stallings Computer Organization and Architecture 8th Edition
More Binary Arithmetic - Multiplication
Multiplication
Lecture 3: Parallel Algorithm Design
Integer Multiplication and Division
Multiplication
Multipliers Multipliers play an important role in today’s digital signal processing and various other applications. The common multiplication method is.
UNIVERSITY OF MASSACHUSETTS Dept
Exercise: Add these two single precision IEEE 754 numbers: … …0 Left number: 1.101x24 Right number: 1.011x 22= x24.
Algorithms with numbers (1) CISC4080, Computer Algorithms
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
Lecture 16: Parallel Algorithms I
University of Maryland
ECEG-3202 Computer Architecture and Organization
Number Systems and Circuits for Addition
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
Reading: Study Chapter (including Booth coding)
Montek Singh Mon, Mar 28, 2011 Lecture 11
UNIVERSITY OF MASSACHUSETTS Dept
UNIVERSITY OF MASSACHUSETTS Dept
Presentation transcript:

VLSI Arithmetic

Multiplication A = a n-1 a n-2 … a 1 a 0 B = b n-1 b n-2 … b 1 b 0  eg)  Shift and addArea O(N) Time O(NlogN) Too slow

a n-1 a n-2 … a 1 a 0 b n-1 b n-2 … b 1 b 0 a n-1 a n-2 … a 1 a 0  b 0 = B 0  b 1 = B 1  b 2 = B 2  b n-1 = B n-1 a n-1 a n-2 … a 1 a 0 Sum

b0b0 b1b1 b n-1 2n bit processors Algorithm1. Broadcast A to n processors (log n time) 2. Compute B i (i=0, …, n-1) simultaneous 3. Compute sum (using redundant binary number) TimeO(logn) SpaceO(N 2 )

3M - multiplication (Why not 4M - multiplication?) P = X Y U = (X 1 +X 0 ) (Y 1 +Y 0 ) V = (X 1 Y 1 ) W = (X 0 Y 0 ) P = (X Y) = V 2 N + (U-V-W) 2 N/2 + W A = O(N 2 ) T = O(log N) Y Input distribution (X 1 + X 0 ) (Y 1 + Y 0 )X 1 Y 1 X 0 Y 0 X (X 1 + X 0 )(Y 1 + Y 0 ) Routing Adder (n) Output network recursively

Area, Time, Period Complexity, and Optimality Virsion Lower bound 4M 3M 2M, LABC Area N 2 N 2 log 2 N N 2 MN logN Time log N Period 1 AP 2 N 2 N 2 log 2 N N 2 MN logN AP 2 T 2 N 2 log 2 N N 2 log 4 N N 2 log 2 N MN log 3 N Remark -- Time-optimal Time, AP 2, and AP 2 T 2 optimal Time-optimal and regular layout

Redundant Binary Number (Signed Digit) where a i  {0, 1,  1} Example = Binary number is a redundant binary number 2. Note that 1 = Redundant binary number  Binary Number by subtraction (in log n time)

Example = = 15 Example addition (5) (38) 10 + S = (sum)

Addition (Subtraction): carry propagation is limited to one bit left Type Augend a i Augend b i Carry 1 1 if there is carry 1 from lower end 0 otherwise 0 no carry 1, if there is a carry 1 from lower end 0, otherwise 1

SD addition rule table ai ai bi bi Next lower position a i-1, b i-1 if (1,0), (0,1), (1,1) else if (1,0), (0,1), (1,1) else ci ci si si

Hardware for multiplication Mesh of Trees R0R0 R1R1 R2R2 R3R3 C3C3 C2C2 C1C1 C0C0 A A1 A2 A3 Number of PEs = O(n*n) Area  (n 2 log 2 n) Multiplication A*B R i  A shift i bit if b i  0 Column C i add logn bits Use redundant binary, add these numbers

Example of multiplication on mesh of trees with augmented mesh edges A=0111 B=1011 Consider only last 4 bits 1 0 R0R0 R1R1 R2R2 R3R3 C3C3 C2C2 C1C1 C0C0 A A1 A2 A

Example of multiplication on mesh of trees C i contains the sum at most logn bits long Note that C i starts from i-th bit. So the k-th bit of C i is pipelined to the row i+k Each bit c i is computed at (i,i) The pipelined value will be added one by one using Redundant binary system in a constant step. Then the number is converted to a binary number Total: 2logn: R i 2logn : add to (i,i) location 2logn : covert to binary 1 0 R0R0 R1R1 R2R2 R3R3 C 3 =10 C 2 =10 C 1 = 10 C 0 =1 A A1 A2 A

Integer Division Not as easy O(logn) algorithm exist with table look up Hardware circuit exist? => open question

Newton Rapson Method To solve f(x) = 0, To find, let Newton Rapson Method converges quadratically, That is,  i+1 =  i 2

Eg. When D = 4 set x 0 = 0.4 x 1 = 0.16 x 2 = x 3 =  0 = 0.15  1 = 0.09  2 =  3 = To get n precision reciprocal of D, we need logn iterations. 1st iteration: 1 digit correct 2nd iteration: 2didit correct 3rd iteration: 4 digit correct logn iterations: n digit correct

Proof that Newton Rapson Method converges quadratically. Let X be the solution of f(x) = 0. But where Since f(X) = 0, we have Thus, Since f”(  ) is bounded and f’(x i ) is bounded, |  i+1 | = c |  i | 2, for some c For is bounded if D  0

Complexity Each *: O(logn) time to obtain n digit precision, O(logn) iteration => O(log 2 n) complexity A/D => A * (1/D) Question: logn algorithm for division?