Tree and Array 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

Multioperand Addition Lecture 6. Required Reading Chapter 8, Multioperand Addition Note errata at:
Lecture Adders Half adder.
Figure5.2 Half-adder.
Basic Adders and Counters Implementation of Adders in FPGAs ECE 645: Lecture 3.
Lecture 10 Fast Dividers.
ECE 645 – Computer Arithmetic Lecture 7: Tree and Array Multipliers ECE 645—Computer Arithmetic 3/18/08.
Number Representation Part 1 Fixed-Radix Unsigned Representations ECE 645: Lecture 1.
Sequential Multipliers Lecture 9. Required Reading Chapter 9, Basic Multiplication Scheme Chapter 10, High-Radix Multipliers Chapter 12.3, Bit-Serial.
High Performance Circuit Design By Prof. V. Kamakoti Department of Computer Science and Engineering Indian Institute of Technology, Madras Chennai – 600.
Lecture 4 Multiplier using FPGA 2007/09/28 Prof. C.M. Kyung.
Fast Adders: Parallel Prefix Network Adders, Conditional-Sum Adders, & Carry-Skip Adders ECE 645: Lecture 5.
IT253: Computer Organization
C-H1 Lecture Adders Half adder. C-H2 Full Adder si is the modulo- 2 sum of ci, xi, yi.
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
George Mason University Class Exercise 1B. 2ECE 448 – FPGA and ASIC Design with VHDL Rules If you believe that you know a correct answer, please raise.
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:
Carry-Lookahead & Carry-Select Adders
Somet things you should know about digital arithmetic:
Array multiplier TU/e Processor Design 5Z032.
Lecture Adders Half adder.
Conditional-Sum Adders Parallel Prefix Network Adders
Morgan Kaufmann Publishers
CSCI206 - Computer Organization & Programming
Sequential Multipliers
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Number Representation
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
Lecture 12 Modular Design Topics Adder and Subtractor Design
Basic Adders and Counters
CSE 575 Computer Arithmetic Spring 2002 Mary Jane Irwin (www. cse. psu
Radix 2 Sequential Multipliers
Tree and Array Multipliers
CSE Winter 2001 – Arithmetic Unit - 1
Instructor: Alexander Stoytchev
Lecture 8 Addendum Booth Multipliers.
Instructor: Alexander Stoytchev
A Theoretical Analysis of Square versus Rectangular Component Multipliers in Recursive Multiplication Behrooz Parhami Department of Electrical and Computer.
Integer Multipliers.
12/7/
ECE 448 Lecture 13 Multipliers Timing Parameters
Topics Multipliers..
FPGA Implementation of Multipliers
CS 140 Lecture 14 Standard Combinational Modules
Chapter 5 – Number Representation and Arithmetic Circuits
Basic Adders and Counters Implementation of Adders
Chapter 5 -Part 3.
Digital System Design Combinational Logic
Part III The Arithmetic/Logic Unit
Multioperand Addition
CSE 140 Lecture 14 Standard Combinational Modules
ECE 434 Advanced Digital System L11
UNIVERSITY OF MASSACHUSETTS Dept
Booth's Algorithm for 2's Complement Multiplication
UNIVERSITY OF MASSACHUSETTS Dept
Instructor: Alexander Stoytchev
Lecture 9 Digital VLSI System Design Laboratory
Sequential Multipliers
Carry-Lookahead, Carry-Select, & Hybrid Adders
UNIVERSITY OF MASSACHUSETTS Dept
Carry-Lookahead, Carry-Select, & Hybrid Adders
Pipelined Array Multiplier Aldec Active-HDL Design Flow
Arithmetic Circuits.
Lecture 9 Basic Dividers.
Carry-Lookahead & Carry-Select Adders
UNIVERSITY OF MASSACHUSETTS Dept
Conditional-Sum Adders Parallel Prefix Network Adders
Lecture 2 Adders Half adder.
Presentation transcript:

Tree and Array Multipliers Lecture 7 Tree and Array Multipliers

Required Reading Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design Chapter 11, Tree and Array Multipliers Chapter 12.5, The special case of squaring Note errata at: http://www.ece.ucsb.edu/~parhami/text_comp_arit_1ed.htm#errors

Required Reading J-P. Deschamps, G. Bioul, G. Sutter, Synthesis of Arithmetic Circuits: FPGA, ASIC and Embedded Systems Chapter 12.1.7 FPGA Implementation of multipliers (handout distributed in class)

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

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

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

Unsigned Multiplication a4 a3 a2 a1 a0 x x4 x3 x2 x1 x0 ax0 20 a4x0 a3x0 a2x0 a1x0 a0x0 ax1 21 a4x1 a3x1 a2x1 a1x1 a0x1 + ax2 22 a4x2 a3x2 a2x2 a1x2 a0x2 ax3 23 a4x3 a3x3 a2x3 a1x3 a0x3 ax4 24 a4x4 a3x4 a2x4 a1x4 a0x4 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0

Full tree multiplier - general structure

7 x 7 tree multiplier

A slice of a balanced-delay tree for 11 inputs

with a more regular structure Tree multiplier with a more regular structure

Layout of a multiplier based on 4-to-2 reduction modules

2’s Complement Multiplication (1) -24 23 22 21 20 a4 a3 a2 a1 a0 x x4 x3 x2 x1 x0  24 23 22 21 20 -a4 a3 a2 a1 a0 x -x4 x3 x2 x1 x0

2’s Complement Multiplication (2) -a4 a3 a2 a1 a0 x -x4 x3 x2 x1 x0 -a4x0 a3x0 a2x0 a1x0 a0x0 -a4x1 a3x1 a2x1 a1x1 a0x1 + -a4x2 a3x2 a2x2 a1x2 a0x2 -a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 -a3x4 -a2x4 -a1x4 -a0x4 -p9 p8 p7 p6 p5 p4 p3 p2 p1 p0 29 28 27 26 25 24 23 22 21 20

2’s Complement Multiplication (3) 29 28 27 26 25 24 23 22 21 20  p9 p8 p7 p6 p5 p4 p3 p2 p1 p0 -29 28 27 26 25 24 23 22 21 20

2’s Complement Multiplication (4) z = 1 - z z = 1 - z - aj xi = - aj (1 - xi) = aj xi - aj = aj xi + aj - 2 aj - aj xi = - (1- aj ) xi = aj xi - xi = aj xi + xi - 2 xi - aj xi = - (1- aj xi) = aj xi - 1 = aj xi + 1 - 2 -aj = - (1 - aj) = aj - 1 = aj + 1 - 2 -xi = - (1 - xi) = xi - 1 = xi + 1 - 2

+ -a4x0 -a4x1 -a4x2 -a4x3 -a4 a4x0 -a4 a4x1 a4 -a4 a4x2 a4 -a4 a4x3 a4 -1 a4

+ -a3x4 -a2x4 -a1x4 -a0x4 -x4 a0x4 -x4 a1x4 x4 -x4 a2x4 x4 -x4 a3x4 x4 -1 x4

29 28 27 26 25 24 a4 a4x3 a4x2 a4x1 a4x0 -1 a4 x4 a3x4 a2x4 a1x4 a0x4 -1 x4 -1 a4 a4x3 a4x2 a4x1 a4x0 x4 a3x4 a2x4 a1x4 a0x4 a4 x4 1 a4 a4x3 a4x2 a4x1 a4x0 x4 a3x4 a2x4 a1x4 a0x4 a4 -29 x4

Baugh-Wooley 2’s Complement Multiplier -a4 a3 a2 a1 a0 x -x4 x3 x2 x1 x0 a4x0 a3x0 a2x0 a1x0 a0x0 a4x1 a3x1 a2x1 a1x1 a0x1 + a4x2 a3x2 a2x2 a1x2 a0x2 a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 a3x4 a2x4 a1x4 a0x4 a4 a4 1 x4 x4 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0 -29 28 27 26 25 24 23 22 21 20

+ -a4x0 -a4x1 -a4x2 -a4x3 -1 a4x0 -1 a4x1 1 -1 a4x2 1 -1 a4x3 1 1 a4x3

+ -a3x4 -a2x4 -a1x4 -a0x4 -1 a0x4 -1 a1x4 1 -1 a2x4 1 -1 a3x4 1 1 a3x4

29 28 27 26 25 24 a4x3 a4x2 a4x1 a4x0 -1 1 a3x4 a2x4 a1x4 a0x4 -1 1 a4x3 a4x2 a4x1 a4x0 a3x4 a2x4 a1x4 a0x4 -1 1 a4x3 a4x2 a4x1 a4x0 a3x4 a2x4 a1x4 a0x4 1 1 -29

Modified Baugh-Wooley Multiplier -a4 a3 a2 a1 a0 x -x4 x3 x2 x1 x0 a4x0 a3x0 a2x0 a1x0 a0x0 a4x1 a3x1 a2x1 a1x1 a0x1 + a4x2 a3x2 a2x2 a1x2 a0x2 a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 a3x4 a2x4 a1x4 a0x4 1 1 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0 -29 28 27 26 25 24 23 22 21 20

Basic array multiplier

5 x 5 Array Multiplier

Array Multiplier - Basic Cell cin x y FA cout s

Baugh-Wooley 2’s Complement Multiplier -a4 a3 a2 a1 a0 x -x4 x3 x2 x1 x0 a4x0 a3x0 a2x0 a1x0 a0x0 a4x1 a3x1 a2x1 a1x1 a0x1 + a4x2 a3x2 a2x2 a1x2 a0x2 a4x3 a3x3 a2x3 a1x3 a0x3 a4x4 a3x4 a2x4 a1x4 a0x4 a4 a4 1 x4 x4 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0 -29 28 27 26 25 24 23 22 21 20

Modifications in a 5 x 5 multiplier

Array Multiplier – Modified Basic Cell am ci si-1 xn FA ci+1 si

5 x 5 Array Multiplier with modified cells

Pipelined 5 x 5 Multiplier

Xilinx FPGA Implementation Equations Z = (2xn-1+xn-2)  Y  2n-2 + … + (2xi+1+xi)  Y  2i + … + +(2x3+x2)  Y  22 + (2x1+x0)  Y  20 (2xi+1+xi)  Y = cm+1pimpi(m-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

Optimizations for Squaring (1)

Optimizations for Squaring (2) xi xj xi xj + xi xj = 2 xi xj xj xi xi xj xi xi = xi xi xj xi xj + xi = 2 xi xj - xi xj + xi = = 2 xi xj + xi (1-xj) = = 2 xi xj + xi xj xi xi xj xi xj

Squaring Using Look-Up Tables for relatively small values k input=a output=a2 1 1 2 4 3 9 4 16 2k words 2k-bit each . . . i i2 . . . 2k-1 (2k-1)2

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