Professional Documents
Culture Documents
Fast Adders
Ma d e w i t h Op e n Of f i c e . o r g
Carry Problem
Addition is primary mechanism in implementing arithmetic operations Slow addition directly affects the total performance of the computer Complex (and fast) addition schemes increase the cost of the final implementation The choice for adder structure must be tailormade to the potential applications
Ma d e w i t h Op e n Of f i c e . o r g
RCA
RCA Ripple Carry Adder
(Computer Architecture I)
Simplest, Smallest and Slowest (SSS), but ... Worst-case carry-propagation is (k)
k - digits
Ma d e w i t h Op e n Of f i c e . o r g
Bit-Serial RCA
VLSI implementation advantages:
small pin count reduced wire length high clock rate small space low power consumption
shift X Y
FA
X+Y shift
Ma d e w i t h Op e n Of f i c e . o r g
Adders Overview
1-bit adders
Half Adder HA Full Adder FA
Not complete
CPA
RCA
3-operand
multi-operand adders
Adder Tree 6
Asynchronous Adder
Based on RCA - detection of carry completion Average longest chain of propagation ~ log2k Not suitable for synchronous processing
ai+bi di+1 ai*bi ai+bi di carry (c, d) from previous stage ci ai*bi Complete from other bit positions (c,d) extended carry ----------------------------------(0,0) Carry not yet known (0,1) Carry 0 (1,0) Carry 1 7
ci+1
Ma d e w i t h Op e n Of f i c e . o r g
CLA
CLA Carry Lookahead Adder
Fast but Complex
(Computer Architecture I)
LA
LA
k - digits
Ma d e w i t h Op e n Of f i c e . o r g
Ma d e w i t h Op e n Of f i c e . o r g
One-Level CSLA
k1 k/2 RCA k1 k/2 RCA k/2 k/2 Mux 21 (k/2 buses) ck/2 k 1 k/2 k 0 k1 k/2 RCA 0 c0
k/2
c3k/4 ck
ck/4
Res. k-1...k
k-1...k
k-1...k
k-1...0
Ma d e w i t h Op e n Of f i c e . o r g
11
Two-Level CSLA
Block-carry propagation is fast, but design complex
k-1 k k/4 RCA 1 k/4 RCA 0 c3k/4 c3k/4 k-1 k k/4 RCA 1 k/4 RCA 0 k-1 k k/4 RCA 1 k/4 RCA 0 k-1 k/4 RCA 0 c0
ck/4
Ma d e w i t h Op e n Of f i c e . o r g
12
Propagation Chains
Carries can be generated, propagated or absorbed Propagation chains are evaluated in parallel How to speed up the worst-case propagation?
Ma d e w i t h Op e n Of f i c e . o r g
carry propagation 13
worst-case
FA
FA
FA
FA
ci
p = pi*pi+1*pi+2*pi+3
propagation condition
pi=ai+bi
Ma d e w i t h Op e n Of f i c e . o r g
CSKA
16-bit CSKA Adder
4-bit RCA p 4-bit RCA p 4-bit RCA p 4-bit RCA p
c16
Carry skip
c12
Carry skip
c8
Carry skip
c4
Carry skip
c0
15
c16
Carry skip
c12
Carry skip
c8
Carry skip
c4
Carry skip
c0
TfixCSKA= (b 1)
+ 0.5
(b=4, k=32)
16
Ma d e w i t h Op e n Of f i c e . o r g
e.g. 16-bit adder bopt 3, TfixCSKA 8 e.g. 32-bit adder bopt = 4, TfixCSKA= 12.5 e.g. 64-bit adder bopt 6, TfixCSKA 19
Ma d e w i t h Op e n Of f i c e . o r g
17
b+1
...
b+t/2-1
b+t/2-1
...
b+1
18
19
2.5
bopt 1 e.g. 16-bit adder topt = 8, TfixCSKA 5.5 e.g. 32-bit adder topt 12, TfixCSKA 9 e.g. 64-bit adder topt = 16, TfixCSKA 13.5
Ma d e w i t h Op e n Of f i c e . o r g
20
Multilevel CSKA
First-level skip blocks get propagate-condition signal from block adders Second-level skip blocks get propagate-condition signal from first-level skip blocks Carry can be propagated over group of skip blocks
Adder Skip Skip Skip Adder Skip Adder Skip Skip Adder Skip Adder Skip Skip Skip 21 Adder Skip Adder Skip Skip Adder Skip
Ma d e w i t h Op e n Of f i c e . o r g
Multilevel CSKA
Multilevel structures are results of complex optimizations and usually are not regular
adders first level skip blocks second level skip blocks
Ma d e w i t h Op e n Of f i c e . o r g
22
Ma d e w i t h Op e n Of f i c e . o r g
23
Example CSLA+CSKA+CLA
CL Logic
CSKA CSKA 0
CSKA CSKA 0
CSKA CSKA 0
CSKA
Ma d e w i t h Op e n Of f i c e . o r g
24
Multioperand Adders
Applications in multiplication, vector and matrix arithmetics and others
x y ------ -------------- x*y x y ------ -------------- x*y
Ma d e w i t h Op e n Of f i c e . o r g
25
Serial Implementation
Latency (n log k)
faster than linear dependence on number of operands logarithmic dependence for scaling the operand size
Partial sum
k+log n bits
n-operands k-bits
Shift register
Ma d e w i t h Op e n Of f i c e . o r g
26
RCA k+1
27
FA
FA
HA
FA
HA
Ma d e w i t h Op e n Of f i c e . o r g
28
CSA
29