vlsi arithmetic - uc davis ece. v.g. oklobdzija vlsi arithmetic 2 addition of binary numbers full...

21
Prof. V.G. Oklobdzija VLSI Arithmetic 1 VLSI Arithmetic Adders & Multipliers Prof. Vojin G. Oklobdzija University of California http://www.ece.ucdavis.edu/acsel

Upload: trinhtram

Post on 22-Apr-2018

237 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 1

VLSI ArithmeticAdders & Multipliers

Prof. Vojin G. OklobdzijaUniversity of California

http://www.ece.ucdavis.edu/acsel

Page 2: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 2

Addition of Binary NumbersFull Adder. The full adder is the fundamental building block of most arithmetic circuits:

The sum and carry outputs are described as:

iiiiiiiiiiiiiiiiiii cbcabacbacbacbacbac ++=+++=+1

iiiiiiiiiiiii cbacbacbacbas +++=

FullAdder

CinCout

si

ai bi

Page 3: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 3

Addition of Binary Numbers

Propagate

Propagate

Generate

Generate

Inputs Outputs

ci ai bi si ci+1

0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1

Page 4: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 4

Full-Adder ImplementationFull Adder operations is defined by equations:

iiiiiiiiiiiiiiiiii cpcbacbacbacbacbas ⊕=⊕⊕=+++=

iiiiiiiiiiii cpgbacbacbac +=++=+1

One-bit adder could be implemented as shown

Carry-Propagate:and Carry-Generate gi

iii bap ⊕=

iii bag •=cout cin

si

ai bi

Page 5: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 5

High-Speed Addition

iii cps ⊕=

iiii cpgc +=+1

One-bit adder could be implemented more efficientlybecause MUX is faster

iii bap ⊕=iii bag •=

0

1s

biai

cout

si

cin

Page 6: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 6

The Ripple-Carry Adder

Page 7: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 7

The Ripple-Carry AdderA0 B0

S0

Co,0Ci,0

A1 B1

S1

Co,1

A2 B2

S2

Co,2

A3 B3

S3

Co,3

(= Ci,1)FA FA FA FA

Worst case delay linear with the number of bits

tadder N 1–( )tcarry tsum+≈

td = O(N)

Goal: Make the fastest possible carry path circuit

From Rabaey

Page 8: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 8

Inversion Property

A B

S

CoCi FA

A B

S

CoCi FA

From Rabaey

Page 9: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 9

Minimize Critical Path by Reducing Inverting Stages

A0 B0

S0

Co,0Ci,0

A1 B1

S1

Co,1

A2 B2

S2

Co,2 Co,3FA’ FA’ FA’ FA’

A3 B3

S3

Odd CellEven Cell

Exploit Inversion Property

Note: need 2 different types of cellsFrom Rabaey

Page 10: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 10

Manchester Carry-Chain Realization of the Carry Path

• Simple and very popular scheme for implementation of carry signal path

Vdd

Carry out Carry in

Propagatedevice

Predischarge& kill device

Generatedevice

++++++++

VddVddVddVddVddVddVdd

Page 11: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 11

Manchester Carry Chain

P0

Ci,0

P1

G0

P2

G1

P3

G2

P4

G3 G4

φ

φ

VDD

Kilburn, et al, IEE Proc, 1959.

•Implement P with pass-transistors•Implement G with pull-up, kill (delete) with pull-down•Use dynamic logic to reduce the complexity and speed up

Page 12: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 12

Ripple Carry AdderCarry-Chain of an RCA implemented using multiplexer from the standard cell library:

ai+1 bi+1 ai biai+2 bi+2

coutci+1 ci

sisi+1si+2

cin

Critical Path

Oklobdzija, ISCAS’88

Page 13: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 13

Carry-Lookahead Adder(Weinberger and Smith)

Weinberger and J. L. Smith, “A Logic for High-Speed Addition”, National Bureau of Standards, Circ. 591, p.3-12, 1958.

Page 14: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 14

Carry-Lookahead Adder(Weinberger and Smith)

1111

111

1112

)(cppgpg

cpgpgcpgc

iiiii

iiii

iiii

+++

++

++++

++=++=

+=

iiiiiiiiiiii cpgbacbacbac +=++=+1

iiiiiiiiii

iiiiiiii

iiii

cpppgppgpgcppgpgpg

cpgc

1212122

11122

2223

)(

+++++++

+++++

++++

+++=+++=

+=

Page 15: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 15

Carry-Lookahead Adder

jiiiiiiiiij cpppgppgpgG 123123233 +++++++++ +++=

iiiij ppppP 123 +++=

jiij cPGc 4)1(4 +=+

One gate delay ∆ to calculate p, g

One ∆ to calculateP and two for G

Three gate delaysTo calculate C4(j+1)

Compare that to 8 ∆ in RCA !

ai bi

Cin Cj

Gj Pj

ai+1 bi+1

gi+1pi+1 gi pi

ai+2 bi+2ai+3 bi+3

gi+1pi+1gi+1pi+1

C4(j+1)

C4j+1C4j+2C4j+3

P, G Group

Page 16: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 16

Carry-Lookahead Adder(Weinberger and Smith)

iiiiiiiiiij GPPPGPPGPG 123123233*G +++++++++ +++=

iiiij PPPPP 123*

+++=

jkkj cPGc 4)1(4 ** +=+

Pj

G* P*

C4j+1

GjPj+1Gj+1Pj+3Gj+3 Pj+2Gj+2

C4jC4(j+1)

C4j+2C4j+3

Additional two gate delaysC16 will take a total of 5∆ vs. 32∆ for RCA !

Page 17: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 17

32-bit Carry Lookahead Adder

Cin

Cout Cin

C4C8C12

Cout

C20C24C28

Cin

C16

aibi

individual addersgenerating: gi, pi,

and sum Si

Carry-lookahead blocks of4-bits generating:

Gi, Pi, and Cin for theadders

Carry-lookahead super- blocks of4-bits blocks generating:

G*i, P*i, and Cin for the 4-bitblocks

Group producing finalcarry Cout and C16

Critical path delay = 1∆ (for gi,pi)+2x2∆ (for G,P)+3x2∆ (for Cin)+1XOR-∆ (for Sum) = appx. 12∆ of delay

Page 18: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 18

Carry-Lookahead Adder(Weinberger and Smith: original derivation )

Page 19: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 19

Carry-Lookahead Adder(Weinberger and Smith: original derivation )

Page 20: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 20

Carry-Lookahead Adder (Weinberger and Smith)please notice the similarity with Parallel-Prefix Adders !

Page 21: VLSI Arithmetic - UC Davis ECE. V.G. Oklobdzija VLSI Arithmetic 2 Addition of Binary Numbers Full Adder.The full adder is the fundamental building block of most arithmetic circuits:

Prof. V.G. Oklobdzija VLSI Arithmetic 21

Carry-Lookahead Adder (Weinberger and Smith)please notice the similarity with Parallel-Prefix Adders !