Radix 2 Sequential Multipliers

Slides:



Advertisements
Similar presentations
ECE2030 Introduction to Computer Engineering Lecture 13: Building Blocks for Combinational Logic (4) Shifters, Multipliers Prof. Hsien-Hsin Sean Lee School.
Advertisements

Distributed Arithmetic
Multiplication Schemes Continued
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5.
Chapter 6 Arithmetic. Addition Carry in Carry out
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
1 Lecture 4: Arithmetic for Computers (Part 4) CS 447 Jason Bakos.
Multiplication.
ECE 645 – Computer Arithmetic Lecture 10: Fast Dividers ECE 645—Computer Arithmetic 4/15/08.
Lecture 10 Fast Dividers.
ECE 645 – Computer Arithmetic Lecture 9: Basic Dividers ECE 645—Computer Arithmetic 4/1/08.
Multiplication CPSC 252 Computer Organization Ellen Walker, Hiram College.
ECE 4110– Sequential Logic Design
Chapter 6-2 Multiplier Multiplier Next Lecture Divider
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.
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
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.
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.
05/03/2009CA&O Lecture 8,9,10 By Engr. Umbreen sabir1 Computer Arithmetic Computer Engineering Department.
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
Basic Dividers Lecture 10. Required Reading Chapter 13, Basic Division Schemes 13.1, Shift/Subtract Division Algorithms 13.3, Restoring Hardware Dividers.
Arithmetic Operations
Other Arithmetic Functions Section 4-5
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.
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:
Arithmetic for Computers Chapter 3 1. Arithmetic for Computers  Operations on integers  Addition and subtraction  Multiplication and division  Dealing.
Computer System Design Lecture 3
More Binary Arithmetic - Multiplication
Integer Multiplication and Division
Conditional-Sum Adders Parallel Prefix Network Adders
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Morgan Kaufmann Publishers
CSCI206 - Computer Organization & Programming
Sequential Multipliers
Number Representation
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
Morgan Kaufmann Publishers
Reconfigurable Computing - Options in Circuit Design
Lecture 8: Binary Multiplication & Division
Basic Adders and Counters
Lecture 9 Basic Dividers.
CDA 3101 Spring 2016 Introduction to Computer Organization
CprE 583 – Reconfigurable Computing
Tree and Array Multipliers
Unsigned Multiplication
CDA 3101 Summer 2007 Introduction to Computer Organization
ECE/CS 552: Integer Multipliers
Computer Organization and Design
Lecture 8 Addendum Booth Multipliers.
12/7/
FPGA Implementation of Multipliers
Basic Adders and Counters Implementation of Adders
Converting from Base b to Base c
Multioperand Addition
ECE 434 Advanced Digital System L11
Montek Singh Mon, Mar 28, 2011 Lecture 11
UNIVERSITY OF MASSACHUSETTS Dept
Booth's Algorithm for 2's Complement Multiplication
Tree and Array Multipliers
Sequential Multipliers
UNIVERSITY OF MASSACHUSETTS Dept
Arithmetic Logic Unit A.R. Hurson Electrical and Computer Engineering Missouri University of Science & Technology A.R. Hurson.
Pipelined Array Multiplier Aldec Active-HDL Design Flow
Booth Recoding: Advantages and Disadvantages
Lecture 9 Basic Dividers.
Conditional-Sum Adders Parallel Prefix Network Adders
Presentation transcript:

Radix 2 Sequential Multipliers Lecture 8 FPGA Multipliers Radix 2 Sequential Multipliers

Required Reading Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design Chapter 9, Basic Multiplication Scheme Chapter 10, High-Radix Multipliers Chapter 12.3, Bit-Serial Multipliers Chapter 12.4, Modular Multipliers

FPGA Multipliers

Y Multiplicand Yk-1Yk-2 . . . Y1 Y0 X Multiplier xm-1xm-2 . . . x1 x0 Notation Y Multiplicand Yk-1Yk-2 . . . Y1 Y0 X Multiplier xm-1xm-2 . . . x1 x0 P Product (Y  X ) pm+k-1pm+k-2 . . . p2 p1 p0 If multiplicand and multiplier are of different sizes, usually multiplier has the smaller size

Xilinx FPGA Implementation Equations Z = (2xm-1+xm-2)  Y  2m-2 + … + (2xi+1+xi)  Y  2i + … + +(2x3+x2)  Y  22 + (2x1+x0)  Y  20 (2xi+1+xi)  Y = pi(k+1)pikpi(k-1)…pi2pi1pi0 pij = xiyj xor xi+1yj-1 xor cj cj+1 = (xiyj)(xi+1yj-1) + (xiyj)cj + (xi+1yj-1)cj c0 = c1 = 0

Xilinx FPGA Implementation Modified Basic Cell Xilinx FPGA Implementation xi+1 xi cj+1 yj yj-1 FA pij cj

Xilinx FPGA Implementation Modified Basic Cell Xilinx FPGA Implementation LUT: xiyj xor xi+1yj-1 cj+1 xi yi xi+1 LUT 1 yi-1 pij cj pij = xiyj xor xi+1yj-1 xor cj cj+1 = (xiyj)(xi+1yj-1) + (xiyj)cj + (xi+1yj-1)cj

Xilinx FPGA Multiplier

Sequential Multipliers Radix 2 Sequential Multipliers

a Multiplicand ak-1ak-2 . . . a1 a0 x Multiplier xk-1xk-2 . . . x1 x0 Notation a Multiplicand ak-1ak-2 . . . a1 a0 x Multiplier xk-1xk-2 . . . x1 x0 p Product (a  x) p2k-1p2k-2 . . . p2 p1 p0 If multiplicand and multiplier are of different sizes, usually multiplier has the smaller size

Multiplication of two 4-bit unsigned binary numbers in dot notation Partial Product 0 Partial Product 1 Partial Product 2 Partial Product 3 Number of partial products = number of bits in multiplier x Bit-width of each partial product = bit-width of multiplicand a

Basic Multiplication Equations k-1 x =  xi  2i p = a  x i=0 k-1 p = a  x =  a  xi  2i = = x0a20 + x1a21 + x2a22 + … + xk-1a2k-1 i=0

Shift/Add Algorithm Right-shift version

Right-shift algorithm Shift/Add Algorithms Right-shift algorithm p = a  x = x0a20 + x1a21 + x2a22 + … + xk-1a2k-1 = = (...((0 + x0a2k)/2 + x1a2k)/2 + ... + xk-1a2k)/2 = k times p(0) = 0 p(j+1) = (p(j) + xj a 2k) / 2 j=0..k-1 p = p(k)

Sequential shift-and-add multiplier for right-shift algorithm

Right-shift multiplication algorithm: Example

Area optimization for the sequential shift-and-add multiplier with the right-shift algorithm

Right-shift algorithm: multiply-add Shift/Add Algorithms Right-shift algorithm: multiply-add p(0) = y2k p(j+1) = (p(j) + xj a 2k) / 2 j=0..k-1 p = p(k) = (...((y2k + x0a2k)/2 + x1a2k)/2 + ... + xk-1a2k)/2 = k times = y + x0a20 + x1a21 + x2a22 + … + xk-1a2k-1 = y + a  x

Signed Multiplication Previous sequential multipliers are for unsigned multiplication For signed multiplication: assume sign-extended operation for p(j) + xja if 2's complement multiplier is POSITIVE right-shift sequential algorithms (shift-add) will work directly if 2's complement multiplier is NEGATIVE than we must use "negative weight” for xk-1 and subtract xk-1a in the last cycle Slight increase in area due to control and one-bit sign extension on inputs of adder Unsigned: k bit number + k bit number  k+1 bit number Signed: k+1 bit sign extended number + k+1 bit sign extended number  k+1 bit number

(positive multiplier) Sequential multiplication of 2’s-complement numbers with right shifts (positive multiplier)

(negative multiplier) Sequential multiplication of 2’s-complement numbers with right shifts (negative multiplier)

Shift/Add Algorithm Left-shift version

Shift/Add Algorithms Left-shift algorithm p = a  x = x0a20 + x1a21 + x2a22 + … + xk-1a2k-1 = = (...((02 + xk-1a)2 + xk-2a)2 + ... + x1a)2 + x0a= k times p(0) = 0 p(j+1) = (p(j) 2 + xk-1-ja) j=0..k-1 p = p(k)

Sequential shift-and-add multiplier for left-shift algorithm Left shifts are not as efficient for two's complement because must sign extend multiplicand by k bits

Left-shift multiplication algorithm: Example

Left-shift algorithm: multiply-add Shift/Add Algorithms Left-shift algorithm: multiply-add p(0) = y2-k p(j+1) = (p(j) 2 + xk-(j+1)a) j=0..k-1 p = p(k) = (...((y2-k 2 + xk-1a)2 + xk-2a)2 + ... + x1a)2 + x0a = k times = y + xk-1a2k-1 + xk-2a2k-2 + … + x1a21 + x0a = y + a  x

Shift/Add Algorithm Right-shift version with Carry-Save Adder

Sequential shift-and-add multiplier with a carry save adder