Tree and Array Multipliers Lecture 8. Required Reading Chapter 11, Tree and Array Multipliers Chapter 12.5, The special case of squaring Note errata at:

Slides:



Advertisements
Similar presentations
Multioperand Addition Lecture 6. Required Reading Chapter 8, Multioperand Addition Note errata at:
Advertisements

Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5.
1 CS 140 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris.
Figure5.2 Half-adder.
EECS Components and Design Techniques for Digital Systems Lec 18 – Arithmetic II (Multiplication) David Culler Electrical Engineering and Computer.
Chapter 6 Arithmetic. Addition Carry in Carry out
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
ECE 301 – Digital Electronics
Overview Iterative combinational circuits Binary adders
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Basic Adders and Counters Implementation of Adders in FPGAs ECE 645: Lecture 3.
Lecture 10 Fast Dividers.
Programmable Logic Circuits: Multipliers Dr. Eng. Amr T. Abdel-Hamid ELECT 90X Fall 2009 Slides based on slides prepared by: B. Parhami, Computer Arithmetic:
ECE 645 – Computer Arithmetic Lecture 7: Tree and Array Multipliers ECE 645—Computer Arithmetic 3/18/08.
Sequential Multipliers Lecture 9. Required Reading Chapter 9, Basic Multiplication Scheme Chapter 10, High-Radix Multipliers Chapter 12.3, Bit-Serial.
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.
EECS Components and Design Techniques for Digital Systems Lec 16 – Arithmetic II (Multiplication) David Culler Electrical Engineering and Computer.
Lecture 4 Multiplier using FPGA 2007/09/28 Prof. C.M. Kyung.
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.
Fast Adders: Parallel Prefix Network Adders, Conditional-Sum Adders, & Carry-Skip Adders ECE 645: Lecture 5.
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
Spring C:160/55:132 Page 1 Lecture 19 - Computer Arithmetic March 30, 2004 Sukumar Ghosh.
ECE 645 – Computer Arithmetic Lecture 6: Multi-Operand Addition ECE 645—Computer Arithmetic 3/5/08.
IT253: Computer Organization
Basic Dividers Lecture 10. Required Reading Chapter 13, Basic Division Schemes 13.1, Shift/Subtract Division Algorithms 13.3, Restoring Hardware Dividers.
Conditional-Sum Adders Parallel Prefix Network Adders
CPEN Digital System Design
Addition, Subtraction, Logic Operations and ALU Design
1 Basic Dividers Lecture 9. Required Reading Chapter 13, Basic Division Schemes 13.1, Shift/Subtract Division Algorithms 13.3, Restoring Hardware Dividers.
High-Radix Sequential Multipliers Bit-Serial Multipliers Modular Multipliers Lecture 9.
Multioperand Addition
Chapter 8 Computer Arithmetic. 8.1 Unsigned Notation Non-negative notation  It treats every number as either zero or a positive value  Range: 0 to 2.
Carry-Lookahead, Carry-Select, & Hybrid Adders ECE 645: Lecture 2.
1. Copyright  2005 by Oxford University Press, Inc. Computer Architecture Parhami2 Figure 11.1 Multiplication of 4-bit numbers in dot notation.
Full Adder Truth Table Conjugate Symmetry A B C CARRY SUM
Lecture 18: Datapath Functional Units. CMOS VLSI DesignCMOS VLSI Design 4th Ed. 18: Datapath Functional Units2 Outline  Multipliers.
1 Computer Architecture & Assembly Language Spring 2009 Dr. Richard Spillman Lecture 11 – ALU Design.
Array multiplier TU/e Processor Design 5Z032.
Conditional-Sum Adders Parallel Prefix Network Adders
Morgan Kaufmann Publishers
CSCI206 - Computer Organization & Programming
Sequential Multipliers
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
Basic Adders and Counters
Lecture 9 Basic Dividers.
Radix 2 Sequential Multipliers
Digital Building Blocks
Lecture 5 Multiplication and Division
Tree and Array Multipliers
Unsigned Multiplication
Computer Organization and Design
Multiplier-less Multiplication by Constants
A Theoretical Analysis of Square versus Rectangular Component Multipliers in Recursive Multiplication Behrooz Parhami Department of Electrical and Computer.
12/7/
FPGA Implementation of Multipliers
Basic Adders and Counters Implementation of Adders
Chapter 5 -Part 3.
Multioperand Addition
Chapter 6: Computer Arithmetic
UNIVERSITY OF MASSACHUSETTS Dept
Booth's Algorithm for 2's Complement Multiplication
Tree and Array Multipliers
UNIVERSITY OF MASSACHUSETTS Dept
Sequential Multipliers
UNIVERSITY OF MASSACHUSETTS Dept
Pipelined Array Multiplier Aldec Active-HDL Design Flow
Lecture 9 Basic Dividers.
UNIVERSITY OF MASSACHUSETTS Dept
Presentation transcript:

Tree and Array Multipliers Lecture 8

Required Reading Chapter 11, Tree and Array Multipliers Chapter 12.5, The special case of squaring Note errata at: Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design

Notation a Multiplicand a k-1 a k-2... a 1 a 0 x Multiplier x k-1 x k-2... x 1 x 0 p Product (a  x) p 2k-1 p 2k-2... p 2 p 1 p 0

Multiplication of two 4-bit unsigned binary numbers in dot notation

Basic Multiplication Equations x =  x i  2 i i=0 k-1 p = a  x p = a  x =  a  x i  2 i = = x 0 a2 0 + x 1 a2 1 + x 2 a2 2 + … + x k-1 a2 k-1 i=0 k-1

Unsigned Multiplication a 4 a 3 a 2 a 1 a 0 x 4 x 3 x 2 x 1 x 0 x a 4 x 0 a 3 x 0 a 2 x 0 a 1 x 0 a 0 x 0 a 4 x 1 a 3 x 1 a 2 x 1 a 1 x 1 a 0 x 1 a 4 x 2 a 3 x 2 a 2 x 2 a 1 x 2 a 0 x 2 a 4 x 3 a 3 x 3 a 2 x 3 a 1 x 3 a 0 x 3 a 4 x 4 a 3 x 4 a 2 x 4 a 1 x 4 a 0 x 4 p0p0 p1p1 p9p9 p2p2 p3p3 p4p4 p5p5 p6p6 p7p7 p8p8 + ax ax ax ax ax 4 2 4

Full tree multiplier - general structure

7 x 7 tree multiplier

A slice of a balanced-delay tree for 11 inputs

Tree multiplier with a more regular structure

12 Unsigned vs. Signed Multiplication 1111 x x x x 1 UnsignedSigned

2’s Complement Multiplication (1) a 4 a 3 a 2 a 1 a 0 x 4 x 3 x 2 x 1 x 0 x a 4 a 3 a 2 a 1 a 0 -x 4 x 3 x 2 x 1 x 0 x 

-a 4 a 3 a 2 a 1 a 0 -x 4 x 3 x 2 x 1 x 0 x -a 4 x 0 a 3 x 0 a 2 x 0 a 1 x 0 a 0 x 0 -a 4 x 1 a 3 x 1 a 2 x 1 a 1 x 1 a 0 x 1 -a 4 x 2 a 3 x 2 a 2 x 2 a 1 x 2 a 0 x 2 -a 4 x 3 a 3 x 3 a 2 x 3 a 1 x 3 a 0 x 3 -a 0 x 4 p0p0 p1p1 -p 9 p2p2 p3p3 p4p4 p5p5 p6p6 p7p7 p8p8 + 2’s Complement Multiplication (2) -a 1 x 4 -a 2 x 4 -a 3 x 4 a4x4a4x

2’s Complement Multiplication (3) p0p0 p1p1 -p 9 p2p2 p3p3 p4p4 p5p5 p6p6 p7p7 p8p  p0p0 p1p1 p9p9 p2p2 p3p3 p4p4 p5p5 p6p6 p7p7 p8p

- a j x i = - a j (1 - x i ) = a j x i - a j = a j x i + a j - 2 a j z = 1 - z 2’s Complement Multiplication (4) z = 1 - z - a j x i = - (1- a j ) x i = a j x i - x i = a j x i + x i - 2 x i - a j x i = - (1- a j x i ) = a j x i - 1 = a j x i a j = - (1 - a j ) = a j - 1 = a j x i = - (1 - x i ) = x i - 1 = x i

-a 4 x 0 -a 4 x 1 -a 4 x 2 -a 4 x 3 + a4x0a4x0 a4a4 -a 4 a4x1a4x1 a4a4 a4x2a4x2 a4a4 a4x3a4x3 a4a4 a4x0a4x0 a4a4 a4x2a4x2 a4x1a4x1 a4x3a4x3 a4a4

+ a0x4a0x4 x4x4 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 a4x0a4x0 a4x1a4x1 a4x2a4x2 a4x3a4x a0x4a0x4 1 a2x4a2x4 a1x4a1x4 a3x4a3x4 a4x0a4x0 a4x1a4x1 a4x2a4x2 a4x3a4x3 a0x4a0x4 1 a2x4a2x4 a1x4a1x4 a3x4a3x4 1 a4x0a4x0 a4x1a4x1 a4x2a4x2 a4x3a4x3 -2 9

-a 4 a 3 a 2 a 1 a 0 -x 4 x 3 x 2 x 1 x 0 x a 4 x 0 a 3 x 0 a 2 x 0 a 1 x 0 a 0 x 0 a 4 x 1 a 3 x 1 a 2 x 1 a 1 x 1 a 0 x 1 a 4 x 2 a 3 x 2 a 2 x 2 a 1 x 2 a 0 x 2 a 4 x 3 a 3 x 3 a 2 x 3 a 1 x 3 a 0 x 3 a 0 x 4 p0p0 p1p1 p 9 p2p2 p3p3 p4p4 p5p5 p6p6 p7p7 p8p8 + Modified Baugh-Wooley Multiplier a 1 x 4 a 2 x 4 a 3 x 4 a4x4a4x

Basic array multiplier

5 x 5 Array Multiplier

Array Multiplier - Basic Cell x y c in c out s FA

-a 4 a 3 a 2 a 1 a 0 -x 4 x 3 x 2 x 1 x 0 x a 4 x 0 a 3 x 0 a 2 x 0 a 1 x 0 a 0 x 0 a 4 x 1 a 3 x 1 a 2 x 1 a 1 x 1 a 0 x 1 a 4 x 2 a 3 x 2 a 2 x 2 a 1 x 2 a 0 x 2 a 4 x 3 a 3 x 3 a 2 x 3 a 1 x 3 a 0 x 3 a 0 x 4 p0p0 p1p1 p9p9 p2p2 p3p3 p4p4 p5p5 p6p6 p7p7 p8p8 + Baugh-Wooley 2’s Complement Multiplier a 1 x 4 a 2 x 4 a 3 x 4 a4x4a4x x4x4 a4a4 x4x4 a4a4 1

Modifications in a 5 x 5 multiplier

Array Multiplier – Modified Basic Cell s i-1 cici c i+1 sisi FA xnxn amam

5 x 5 Array Multiplier with modified cells

Pipelined 5 x 5 Multiplier

Xilinx FPGA Implementation Equations Z = (2x m-1 +x m-2 )  Y  2 m-2 + … + (2x i+1 +x i )  Y  2 i + … + +(2x 3 +x 2 )  Y  (2x 1 +x 0 )  Y  2 0 (2x i+1 +x i )  Y = p i(k+1) p ik p i(k-1) …p i2 p i1 p i0 p ij = x i  y j xor x i+1  y j-1 xor c j c j+1 = (x i  y j )(x i+1  y j-1 ) + (x i  y j )  c j + (x i+1  y j-1 )  c j c 0 = c 1 = 0

Modified Basic Cell Xilinx FPGA Implementation c j+1 cjcj p ij FA yjyj xixi x i+1 y j-1

LUT 01 xixi yiyi c j+1 cjcj p ij x i+1 y i-1 Modified Basic Cell Xilinx FPGA Implementation LUT: x i  y j xor x i+1  y j-1 p ij = x i  y j xor x i+1  y j-1 xor c j c j+1 = (x i  y j )(x i+1  y j-1 ) + (x i  y j )  c j + (x i+1  y j-1 )  c j

Xilinx FPGA Multiplier

Optimizations for Squaring (1)

Optimizations for Squaring (2) x i x j x j x i x i x j xixi x i x j + x i x j = 2 x i x j x i x j + x i = 2 x i x j - x i x j + x i = = 2 x i x j + x i (1-x j ) = = 2 x i x j + x i x j x i x i = x i

Squaring Using Look-Up Tables for relatively small values k input=a output=a k (2 k -1) i i2i k words 2k-bit each

Multiplication Using Squaring a  x = (a+x) 2 - (a-x) 2 4