VLSI Arithmetic Lect 3

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 30

VLSI Arithmetic

Adders & Multipliers

Prof. Vojin G. Oklobdzija


University of California

http://www.ece.ucdavis.edu/acsel
Introduction
• Digital Computer Arithmetic belongs to
Computer Architecture, however, it is also an
aspect of logic design.
• The objective of Computer Arithmetic is to
develop appropriate algorithms that are
utilizing available hardware in the most
efficient way.
• Ultimately, speed, power and chip area are
the most often used measures, making a
strong link between the algorithms and
technology of implementation.
Oklobdzija 2004 Computer Arithmetic 2
Basic Operations

• Addition
• Multiplication
• Multiply-Add
• Division

• Evaluation of Functions
• Multi-Media

Oklobdzija 2004 Computer Arithmetic 3


Addition of Binary Numbers
Addition of Binary Numbers
Full Adder. The full adder is the fundamental building block
of most arithmetic circuits:  
ai bi

Cout Full Cin


Adder
si
The sum and carry outputs are described as:
si  ai bi ci  ai bi ci  ai bi ci  ai bi ci
ci 1  ai bi ci  ai bi ci  ai bi ci  ai bi ci  ai bi  ai ci  bi ci
Oklobdzija 2004 Computer Arithmetic 5
Addition of Binary Numbers
Inputs Outputs
ci ai bi si ci+1
0 0 0 0 0
0 0 1 1 0
Propagate
0 1 0 1 0
0 1 1 0 1 Generate
1 0 0 1 0
1 0 1 0 1
Propagate
1 1 0 0 1
1 1 1 1 1 Generate
Oklobdzija 2004 Computer Arithmetic 6
Full-Adder Implementation
Full Adder operations is defined by equations:
si  ai bi ci  ai bi ci  ai bi ci  ai bi ci  ai  bi  ci  pi  ci
ci 1  ai bi ci  ai bi ci  ai bi  g i  pi ci ai b i

Carry-Propagate: pi  ai  bi
and Carry-Generate gi

g i  a i  bi
c out
c in
One-bit adder could be
implemented as shown

si
Oklobdzija 2004 Computer Arithmetic 7
High-Speed Addition
ci 1  g i  pi ci

a i b i
g i  ai  bi pi  ai  bi

0
c out
s 1 c in

One-bit adder could be


implemented more efficiently si  pi  ci
because MUX is faster si

Oklobdzija 2004 Computer Arithmetic 8


The Ripple-Carry Adder

Oklobdzija 2004 Computer Arithmetic 9


The Ripple-Carry Adder
A0 B0 A1 B1 A2 B2 A3 B3

Ci,0 Co,0 C o,1 Co,2 Co,3


FA FA FA FA
(= C i,1)

S0 S1 S2 S3

Worst case delay linear with the number of bits


td = O(N)

tadder   N – 1 tcarry + tsum

Goal: Make the fastest possible carry path circuit


From Rabaey
Oklobdzija 2004 Computer Arithmetic 10
Inversion Property

A B A B

Ci FA Co Ci FA Co

S S

S  A B C i  = S  A B  Ci 

C o  A B C i  = Co  A B  Ci 

From Rabaey
Oklobdzija 2004 Computer Arithmetic 11
Minimize Critical Path by Reducing Inverting
Stages

Even Cell Odd Cell

A1 B1 A3 B3
A0 B0 A2 B2

Ci,0 C o,0 Co,1 C o,2 C o,3


FA’ FA’ FA’ FA’

S0 S2
S1 S3

Exploit Inversion Property

From Rabaey Note: need 2 different types of cells


Oklobdzija 2004 Computer Arithmetic 12
Ripple Carry Adder
Carry-Chain of an RCA implemented using multiplexer from the
a i + 2 library:
standard cell b i+ 2 a i+ 1 b i+ 1 ai bi

Critical Path
c i+ 1 ci
c out c in

Oklobdzija, ISCAS’88
s i+ 2 s i+ 1 si

Oklobdzija 2004 Computer Arithmetic 13


Manchester Carry-Chain
Realization of the Carry Path
• Simple and very popular scheme for implementation of
carry signal path

V dd
V dd
V dd
V dd
V dd
V dd
V dd
V dd

Generate
device
Carry out Carry in

+ + + + + + + + Propagate
devic e

Predis charge
& kill devic e

Oklobdzija 2004 Computer Arithmetic 14


Original Design
T. Kilburn, D. B. G. Edwards, D. Aspinall, "Parallel Addition in Digital Computers:
A New Fast "Carry" Circuit", Proceedings of IEE, Vol. 106, pt. B, p. 464, September 1959.

Oklobdzija 2004 Computer Arithmetic 15


Manchester Carry Chain (CMOS)
•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
VDD


P0 P1 P2 P3 P4

Ci,0
G0 G1 G2 G3 G4

Kilburn, et al, IEE Proc, 1959.


Oklobdzija 2004 Computer Arithmetic 16
Pass-Transistor Realization in DPL
C C
V C C
S
A
A
B
B
S

X O R /X N O R M U L T IP L E X E R B U FFER

A N D /N A N D
V C C

A
A C C
B V C C
C
B O

V C C

A C O
A
B M U L T IP L E X E R B U FFER
B

O R /N O R

Oklobdzija 2004 Computer Arithmetic 17


Carry-Skip Adder
MacSorley, Proc IRE 1/61
Lehman, Burla, IRE Trans on Comp, 12/61

Oklobdzija 2004 Computer Arithmetic 18


Carry-Skip Adder
P0 G1 P0 G1 P2 G2 P3 G3

Ci,0 C o,0 C o,1 Co,2 Co,3


FA FA FA FA

P0 G1 P0 G1 P2 G2 P3 G3
BP=P oP1 P2 P3
Ci,0 C o,0 Co,1 C o,2
FA FA FA FA

Multiplexer
Co,3

Bypass
Idea: If (P0 and P1 and P2 and P3 = 1)
From Rabaey
then C o3 = C 0, else “kill” or “generate”.

Oklobdzija 2004 Computer Arithmetic 19


Carry-Skip Adder:
N-bits, k-bits/group, r=N/k groups

a b (r-1 )k a a b a0 b
a a
N - 1 b N - 1 N - k - 1b N - k - 1 (r-1 )k (r-1 )kb (r-1 )k a 2 k -1
b 2 k -1
ak bk k -1 k -1 0

... ... ... ...


O R O R O R O R
C out + G + G r- ... + G + G o
C in
r 1
1
... ... ... ... ... ... ... ...

S S S S S S S S
N -1 N -k -1 (r-1 )k -1 (r-2 )k 2 k -1 k k -1 0

P r-1
P r-2 P 1 P 0
...
AND AND AND AN D
c r it ic a l p a t h , d e la y  = 2 ( k - 1 ) + ( N / 2 - 2 )

Oklobdzija 2004 Computer Arithmetic 20


Carry-Skip Adder

tp
ripple adder

bypass adder

N 
t d  2 k  1 t RCA    2 t SKIP
 2k 
4..8
N
Oklobdzija 2004 Computer Arithmetic 21
Variable Block Adder
(Oklobdzija, Barnes: IBM 1985)

Oklobdzija 2004 Computer Arithmetic 22


Carry-chain of a 32-bit Variable Block Adder
(Oklobdzija, Barnes: IBM 1985)

a b ajb a b a0 b
N -1 N -1 j i i 0
..
.. ... ... ... ..
.
C out
G G G G 2 G 1 G C in
m m -1 m -2 0

S S S S 0
N -1 j i

P m P m -1 P m -2 P 2 P 1
P 0

G m
G m -1
G m -2
... G 2
G 1
G 0
s k ip in g
...
C ou
C in
t
C a r r y s ig n a l p a th
r ip p lin g

Oklobdzija 2004 Computer Arithmetic 23


Carry-chain of a 32-bit Variable Block Adder
(Oklobdzija, Barnes: IBM 1985)

6
5 5
4 4
1 3 =9 3 1

Any-point-to-any-point delay = 9 
as compared to 12  for CSKA

Oklobdzija 2004 Computer Arithmetic 24


Carry-chain block size determination for a
32-bit Variable Block Adder
(Oklobdzija, Barnes: IBM 1985)

Oklobdzija 2004 Computer Arithmetic 25


Delay Calculation for Variable Block Adder
(Oklobdzija, Barnes: IBM 1985)

P0 P1 P2 P3 BP
Ci,0 Co,3
G0 G1 G2 G3

BP

Delay model:

Oklobdzija 2004 Computer Arithmetic 26


Variable Block Adder
(Oklobdzija, Barnes: IBM 1985)

Variable Group Length

t d  c1  c2 N  c3

Oklobdzija, Barnes, Arith’85

Oklobdzija 2004 Computer Arithmetic 27


Carry-chain of a 32-bit Variable Block Adder
(Oklobdzija, Barnes: IBM 1985)

Variable Block Lengths

• No closed form solution for delay


• It is a dynamic programming problem

Oklobdzija 2004 Computer Arithmetic 28


Delay Comparison: Variable Block Adder
(Oklobdzija, Barnes: IBM 1985)

Oklobdzija 2004 Computer Arithmetic 29


Delay Comparison: Variable Block Adder

Delay 16

14 VBA
12

CLA
10

8
VBA- Multi-Level
6

0
4 11 18 25 32 39 46 53 60
Size N

Oklobdzija 2004 Computer Arithmetic 30

You might also like