Booth-Encoded Multiplier - Access IC Lab (Prof. An...

33
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded Multiplier Booth-Encoded Multiplier For Advanced VLSI Design Fall 2002 台大電機系吳安宇教授

Transcript of Booth-Encoded Multiplier - Access IC Lab (Prof. An...

Page 1: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

Booth-Encoded MultiplierBooth-Encoded Multiplier

For Advanced VLSI DesignFall 2002

台大電機系吳安宇教授

Page 2: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

OutlineOutlineReview of Adders Array MultiplierCanonical Multiplier Recoding

Radix-2 SD RepresentationCanonical Recording AlgorithmAdvantage in performing multiplicationRadix-4 SD Representation

String Recording and Booth MultiplierString PropertyConverting to Radix-4 NotationOperation in high-speed Multiplier

Page 3: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Conventional Full AdderConventional Full Adder

MUX

ig ic

1+ic

ip MUX ci

ipip

is

FA

ix iy

ic1+ic

si

Multiplexer-based Manchester adder

⊕⊕=⊕⋅+⋅=+

iiii

iiiiii

cyxsyxcyxc )(1

Multiplexer-based Manchester adderiii yxg ⋅= iii yxp ⊕= XOR:⊕

+=⊕=⋅+=⋅+=+

iiiiiii

iiiiiiii

cpcpcpscpgpcpgc 1

Define:

(module A)

(module B)

module A module B

Page 4: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Page 5: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

2p 2g

3c

1p 1g

2c

0g0p

1c

8-bits multiplexer-based Manchester adder 8-bits multiplexer-based Manchester adder (Appendix E)(Appendix E)

Module B

Module A

Page 6: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Carry Look-ahead AddersCarry Look-ahead Adders

No carry prorogation delay)1c

⊕=⋅+=+

iii

iiii

cpscpgc 1

1112 cpgc ⋅+=11 cc =

111 cps ⊕=

222 cps ⊕=( 112 pgp ⋅+⊕=

2223 cpgc ⋅+=)( 11122 cpgpg ⋅+⋅+=

112122 cppgpg ⋅⋅+⋅+= Generate S2 without C2

C2

Page 7: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Carry-Select Adders (8x8 bits)Carry-Select Adders (8x8 bits)

29 Multiplexers

8 And gates

Critical path = 6tmux

Page 8: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Carry-Save Adders (ai+bi+Ci=2Ci+1+Si)Carry-Save Adders (ai+bi+Ci=2Ci+1+Si)

Page 9: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Carry-Save and Carry Propagate Adder (CSA/CPA)

Carry-Save and Carry Propagate Adder (CSA/CPA)

Page 10: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Multi-input Carry-Save AddersMulti-input Carry-Save Adders4-input CSA tree 5-input CSA tree 6-input CSA tree

Page 11: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

Array MultiplierArray Multiplier

Page 12: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Array MultiplierArray MultiplierNotation:

Product:

im

iixX 2

1

0•= ∑

=2

1

0

in

iiyY •= ∑

=

)()( 221

0

1

0

in

jj

im

ii yxYXP ∑∑

=

=

•=×=

( )21 1ji

m n

yx +− −

∑ ∑=0 0i j

ji= =

21

0

knm

kkP∑

−+

=

=

Page 13: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Array Multiplier (cont.)Array Multiplier (cont.)

Page 14: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

4x4 bits Array Multiplier Structure

Page 15: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Array Multiplier (cont.)Array Multiplier (cont.)nxn multiplier : n(n-2) Full adders

n Half addersAND gatesn2

Worst-case Delay :

where : worst-case adder delay

It can be drawn as a “Squared Array” for better full-custom layout

τ gn )12( +

τ g

Page 16: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Squared Version: for full custom LayoutSquared Version: for full custom Layout

Page 17: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Pipelined Serial/parallel multiplier

Extra delaySerial/parallel multiplier

Pipelined Serial/parallel multiplier

Serial Stream LSB first

X

Partial Sum In

Page 18: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

Canonical Multiplier RecodingCanonical Multiplier Recoding

Page 19: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Radix-2 SD RepresentationRadix-2 SD RepresentationSigned Digit (SD), Radix-2 allows }1,0,1{

Page 20: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Radix-2 SD Representation (cont.)Radix-2 SD Representation (cont.)A minimal SD vector that contains no adjacent nonzero digit is called a “Canonical Signed-Digit (CSD)” vector.

for

Reitwiesner shows that there is a unique CSD representation for any digit number with a fixed word-length n. ( criteria: a (n+1)-digit with a leading zero digit )

),,,,( 0121 DDDDD nn −−=

,01 =× −DD ii 11 −≤≤ ni

α

Page 21: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Canonical Recording AlgorithmCanonical Recording Algorithm

Page 22: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Canonical Recording AlgorithmCanonical Recording Algorithm

011104-111013011102011111-110110DiCi+1CiBiBi+1i

1

Di = Bi + Ci - 2Ci+1

e.g.B = (0 0 1 0 1 0 1 1 1)

D = (0 1 0 1 0 1 0 0 1)

D has weight of 4B has weight of 5

}1,0,1{}1,0{ −∈∵D∈B

0

Page 23: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Advantage in performing multiplication

Advantage in performing multiplication

Since Only the addition of the multiplicand of (A) or (-A) are required per each cycle.Zeros correspond to “shift” in multiplication33% fewer nonzero terms than conventional 2’s complement numbers

}1,0,1{−∈iD

Page 24: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

CSD MultiplicationCSD Multiplication

Page 25: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Radix-4 SD RepresentationRadix-4 SD RepresentationSince D must be canonical, Di x Di + 1 = 0,only five possible choices of the digit pair {Di+1,Di} are available.{10, 01, 00, 01, 10} {2,1,0,1,2}excluding {11,11,11,11}

note: 11=0111=0111=101

Non-canonicalrepresentation

Page 26: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Multiplier (B2) = (001010111)

Radix-4 SD Representation (cont.)Radix-4 SD Representation (cont.)

Radix-4CSD

D2 = (010101001)

D4 = (0 2 2 2 1 )

0, +/- A, +/- 2AMultiplier

(Radix-2)

Multiplicand (A)

Fast Recoded Multiplierwith “two-digits”Shifting Per cycle

(NEG, ZERO, TWO) control signals

in 5 cycles

(Radix-4)

Page 27: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

String Recording and Booth MultiplierString Recording and Booth MultiplierColumn position: …, i+k, i+k-1, i+k-2,… , i ,i-1

Bit Content: …, 0, 1 , 1 , …,1, 0

=> Bit Content: …, 1, 0 , 0,.. ,0,1, 0

k consecutive 1’s

Add(k-1) consecutive 0’s

and subtract

Page 28: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

String PropertyString Property222222 121 iikikiiki ++++=− +−+−++ …

e.g. 001000100 = 00111100

(4-1) 0’s 4 1’s

>

<

=

=

BBBBBB

Dii

ii

ii

i

if

if

if

1

1

1

,1

,1

,0

Page 29: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

String Property (cont.)String Property (cont.)

with Bn =B-1=0, B=Bn-1,Bn-2,…B1,B0

⇒ Binary Vector B=(0 0 1 0 1 0 1 0 1 0)2

To String vector D=(0 1 1 1 1 1 1 1 1 0)SD

(non-canonical)

Page 30: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Converting to Radix-4Converting to Radix-4

Radix-2:

⇒ Radix-4:

{ }01,11

01,00,

11

10,01),( 1

=+ DD ii

( ) { }2,1,0,1,2=F i

Page 31: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Operation in Multiplier (B)Operation in Multiplier (B)Shift right partial product, if Bi = Bi-1

Add “A”, then shift right, if Bi < Bi-1

Subtract “A”, then shift right, if Bi > Bi-1

>

<

=

=

BBBBBB

Dii

ii

ii

i

if

if

if

1

1

1

,1

,1

,0

Page 32: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Booth’s MultiplierBooth’s Multiplier

Page 33: Booth-Encoded Multiplier - Access IC Lab (Prof. An …access.ee.ntu.edu.tw/course/advanced_VLSI_91/course...ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Booth-Encoded

Advanced VLSI Graduate Institute of Electronics Engineering, NTU

Booth’s MultiplierBooth’s Multiplier