Professional Documents
Culture Documents
Digital Integrated Circuits Adders
Digital Integrated Circuits Adders
Chih-Wei Liu VLSI Signal Processing LAB National Chiao Tung University cwliu@twins.ee.nctu.edu.tw
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Outline
Single-bit Addition Carry-Ripple Adder Carry-Skip Adder Carry-Lookahead Adder Carry-Select Adder Carry-Increment Adder Tree Adder
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Single-Bit Addition
A B
A B C S
Full Adder
Cout S
S= Cout =
Cout
Cout
A 0 0 0 0 1 1 1 1
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
Cout S
Single-Bit Addition
A B
A B C
Full Adder
Cout S
Cout
S 0 1 1 0
A 0 0 0 0 1 1 1 1
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
Cout S 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0 1
4
Remarks
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
PGK
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
PGK
For a full adder, define what happens to carries Generate: Cout = 1 independent of C G=AB Propagate: Cout = C P=AB Kill: Cout = 0 independent of C
K = A B = A + B
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Remarks
Cout = AB + AC + BC = AB + C ( A + B )
= AB + C ( A + B ) = ( A + B ) (C + A B ) = AB + C ( A + B ) = MAJ( A, B, C )
1. Q MAJ( A, B, C ) = AB + C ( A + B) MIN( A, B, C ) = AB + C ( A + B)
2. Cout = MAJ( A, B, C ) = AB + C ( A + B)
S = A B C Cout = MAJ ( A, B, C )
A A B B
32 transistors
C C
gate
A B C A B C MAJ B S Cout
A B B
Cout = A B + C ( A + B)
S A C B B A A B B
9
C C B A B
C C B
Cout
C A
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Factor S in terms of Cout S = ABC + (A + B + C)(~Cout) Critical path is usually C to Cout in ripple adder
MINORITY A B C Cout S S
28 transistors
10
Remarks
Feed the carry-in signal to the inner inputs Make all transistors in the sum logic whose gate signals are connected to the carry-in and carry logic minimum size (This will minimize the branching effort on the critical path) Build an asymmetric gate that reduces the logical effort from C to ~Cout at the expense of effort to S Use relatively large transistors on the critical path
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
11
Layout
Clever layout circumvents usual line of diffusion Use wide transistors on critical path Eliminate output inverters
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
12
CPL
Complementary Pass-transistor Logic Dual-rail form of pass transistor logic Avoids need for ratioed feedback Optional cross-coupling for rail-to-rail swing
S A S B S A S B L Y
13
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Complementary Pass Transistor Logic (CPL) Using transmission gate to form multiplexers and XORs Slightly faster, but more area
Cout = ABC + A BC + ABC + ABC = C ( AB + AB ) + AB = AB + C ( A B )
B B B B B B B C C C C
S = ( A B) C = P C
B B A B A B C S A Cout C C C A S
Cout
B DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
14
Dual-rail domino Very fast, but large and power hungry Used in very fast multipliers
C_h A_h B_h A_h B_h Cout _h C_l A_l B_l A_l B_l Cout _l
S_h
S = A B C Cout = MAJ ( A, B, C )
15
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
N-bit adder called CPA Each sum bit depends on all previous carries How do we compute all these carries quickly?
AN...1 BN...1 Cout Cin
Cout Cout
Cin
+ SN...1
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
16
Carry-Ripple Adder
Simplest design: cascade full adders Critical path goes from Cin to Cout Design full adder to have fast carry delay
A4 Cout S4
B4
A3 C3 S3
B3
A2 C2 S2
B2
A1 C1 S1
B1 Cin
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
17
Inversions
Built from minority + inverter Eliminate inverter and use inverting full adder
Because addition is a symmetric function, an inverting full adder receiving complementary inputs produces true outputs
A4 B4 A3 B3 A2 B2 A1 B1
Cout
C3 S4
C2
C1 S1
Cin
S3 cwliu@twins.ee.nctu.edu.tw S2 DIC-Lec11
18
Generate / Propagate
Equations often factored into G and P Generate and propagate for groups spanning i:j Gi: j =
Pi: j =
0:00:0 in
0 GC
Base case
Gi:i Gi = Pi:i Pi =
G0:0 G0 = P0:0 P0 =
Sum:
Si =
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw 19
For a full adder, Generate: Cout = 1 independent of C G=AB Propagate: Cout = C P=AB
A group of bits generates a carry if its carry-out is true independent of the carry-in A group of bits propagates a carry if its carry-out is true when there is a carry-in
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
20
Generate / Propagate
Equations often factored into G and P Generate and propagate for groups spanning i:j Gi: j = Gi:k + Pi:k Gk 1: j Step-3 0 GC P =P P
i: j i :k k 1: j
0:00:0 in
Base case
Gi:i Gi = Ai Bi Pi:i Pi = Ai Bi
Step-1
Sum:
Si = Pi Gi 1:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Step-2
21
PG Logic
A4 B4 A3 B3 A2 B2 A1 B1 Cin
1: Bitwise PG logic G4 P4 G3 P3 G2 P2 G1 P1 G0 P0
Routine steps
C4 Cout S4 S3 S2 S1
22
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Carry-Ripple Revisited
An extreme case
Gi:0 = Gi + Pi
One-bit group
A4
Gi 1:0
B4 A3 B3 A2
G4
P4
G3
P3
G2
P2
G1
P1
G0
P0
3 AND-OR gates
G3:0 C3
G2:0 C2
G1:0 C1
G0:0 C0
Carry-Ripple PG Diagram
Bit Position 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Delay
AND-OR gate
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
24
PG Diagram Notation
Black cell i:k k-1:j Gray cell i:k k-1:j Buffer i:j
i:j G i:j
i:j
G i:j P i:j
G i:j P i:j
P i:j
Gk 1: j
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
25
Carry-Skip Adder
Carry-ripple is slow through all N stages Carry-skip allows carry to skip over groups of n bits Decision based on n-bit propagate signal
4-bit group
A16:13 B16:13 P16:13 A12:9 B12:9 P12:9 C12 + S16:13 1 0 + C8 1 0 + S8:5 A8:5 B8:5 P8:5 C4 1 0 + S4:1 Cin A4:1 P4:1 B4:1
Cout
1 0
Carry-Skip PG Diagram
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
Remarks
The critical path begins with generating a carry from bit-1, and then propagating it through the remainder of the adder. The carry must ripple through the first n-bit group adder, but then may skip across the other n-bit group adder Finally, the carry must ripple through the final n-bit group adder to produce the sum. The final AND-OR and column 16 are not strictly necessary because Cout can be computed in parallel with the sum XORs
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
28
Carry-Skip PG Diagram
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
tskip = t pg + 2 ( n 1) + (k 1) t AO + txor
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Depend on the first and the last group and the number of groups
29
16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
Carry-Lookahead Adder
Carry-lookahead adder computes Gi:0 for many bits in parallel. Uses higher-valency cells with more than two inputs.
B4:1
Cin
S4:1
Tempt to replace the skip multiplexer with AND-OR gate to reduce delay
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw 31
CLA PG Diagram
higher-valency cells
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
32
Higher-Valency Cells
i:j
G i:j
P i:j
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
33
Carry-Select Adder
Precompute two possible outputs for X = 0, 1 Select proper output when X arrives For both possible carries into n-bit group
A16:13 B16:13 + 0 C12 1 1 A12:9 B12:9 + 0 C8 + 1 0 A8:5 + B8:5 0 C4 + A4:1 B4:1
Cout + 1 0 S16:13
+ 0 S12:9
Cin
S8:5
S4:1
34
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
Remarks
The two n-bit adders are redundant in that both contain the initial PG logic and final sum XOR.
A4 B4 A3 B3 A2 B2 A1 B1 Cin
1: Bitwise PG logic G4 P4 G3 P3 G2 P2 G1 P1 G0 P0
C4 Cout S4 S3 S2 S1
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
35
Carry-Increment Adder
5:4
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
tincrement = t pg + ( n 1) + (k 1) t AO + txor
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw 36
15
14
13
12
11
10
8:7
5:4 6:4
3:2
14:11 15:11
10:7
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
8:7
3:2 3:0
1:0
14:11 15:11
10:7
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
37
Tree Adder
The delay of passing the carry through the lookahead stages dominate the delay of carry-lookahead (or carry-skip, carry-select) adder
t adder t pg + (2 N )t AO + t xor
If lookahead is good, lookahead across lookahead! Recursive lookahead gives O(log N) delay
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
38
Brent-Kung
2-bit group
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15:14
13:12
11:10
9:8
7:6
5:4
3:2
1:0
15:12
11:8
7:4
3:0
15:8
7:0
11:0
13:0
9:0
5:0
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw 39
Sklansky
15
14
13
12
11
10
15:14
13:12
11:10
9:8
7:6
5:4
3:2
1:0
15:12 14:12
11:8 10:8
7:4
6:4
3:0
2:0
15:8
14:8
13:8
12:8
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
40
Kogge-Stone
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
9:8
8:7
7:6
6:5
5:4
4:3
3:2
2:1
1:0
12:9
11:8 10:7
9:6
8:5
7:4
6:3
5:2
4:1
3:0
2:0
15:8
14:7
13:6
12:5
11:4 10:3
9:2
8:1
7:0
6:0
5:0
4:0
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
41
Ideal N-bit tree adder would have L = log2 N logic levels Fanout never exceeding 2 No more than one wiring track between levels Describe adder with 3-D taxonomy (l, f, t) Logic levels: L+l Fanout: 2f + 1 Wiring tracks: 2t Known tree adders sit on plane defined by l + f + t = L-1
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw 42
1 (5)
1 (2)
2 (4)
3 (8)
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
t (W ire Tracks)
43
1 (5)
1 (2)
2 (4)
Kogge-Stone 3 (8)
t (W ire Tracks)
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
44
Han-Carlson
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15:14
13:12
11:10
9:8
7:6
5:4
3:2
1:0
15:12
13:10
11:8
9:6
7:4
5:2
3:0
15:8
13:6
11:4
9:2
7:0
5:0
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
45
Knowles [2, 1, 1, 1]
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
9:8
8:7
7:6
6:5
5:4
4:3
3:2
2:1
1:0
12:9
11:8 10:7
9:6
8:5
7:4
6:3
5:2
4:1
3:0
2:0
15:8
14:7
13:6
12:5
11:4 10:3
9:2
8:1
7:0
6:0
5:0
4:0
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
46
Ladner-Fischer
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15:14
13:12
11:10
9:8
7:6
5:4
3:2
1:0
15:12
11:8
7:4
3:0
15:8
13:8
7:0
5:0
15:8
13:0
11:0
9:0
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
47
Taxonomy Revisited
(f) Ladner-Fischer
(b) Sklansky
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15:14
15:14 13:12 11:10 9:8 7:6 5:4 3:2 1:0
1 5
1 4
1 3
1 2
1 1
1 0
13:12
11:10
9:8
7:6
5:4
3:2
1:0
15:12
15:12 14:12 11:8 10:8 7:4 6:4 3:0 2:0
11:8
7:4
3:0
15:8
14:8
13:8
12:8
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
LadnerFischer
LadnerFischer
15:8
13:0
11:0
9:0
2 (6)
(a) Brent-Kung
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 (5)
15:14 13:12 11:10 9:8 7:6 5:4 3:2 1:0
0 (4) 0 (1)
HanCarlson
15:12
11:8
7:4
3:0
15:8
7:0
9:8
8:7
7:6
6:5
5:4
4:3
3:2
2:1
1:0
12:9
11:8 10:7
9:6
8:5
7:4
6:3
5:2
4:1
3:0
2:0
Knowles [4,2,1,1]
11:0
13:0
15:8 14:7 13:6 12:5 11:4 10:3 9:2 8:1 7:0 6:0 5:0 4:0
9:0
5:0
1 (2)
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
HanCarlson
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
(d) Han-Carlson
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
(c) Kogge-Stone
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15:14
13:12
11:10
9:8
7:6
5:4
3:2
1:0
9:8
8:7
7:6
6:5
5:4
4:3
3:2
2:1
1:0
15:12
13:10
11:8
9:6
7:4
5:2
3:0
12:9
11:8 10:7
9:6
8:5
7:4
6:3
5:2
4:1
3:0
2:0
15:8
13:6
11:4
9:2
7:0
5:0
15:8
14:7
13:6
12:5
11:4 10:3
9:2
8:1
7:0
6:0
5:0
4:0
t (Wire Tracks)
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
48
Summary
Adder architectures offer area / power / delay tradeoffs. Choose the best one for your application.
Architecture Carry-Ripple Carry-Skip n=4 Carry-Inc. n=4 Brent-Kung Sklansky Kogge-Stone (L-1, 0, 0) (0, L-1, 0) (0, 0, L-1) Classification Logic Levels N-1 N/4 + 5 N/4 + 2 2log2N 1 log2N log2N Max Fanout 1 2 4 2 N/2 + 1 2 Tracks 1 1 1 1 1 N/2 Cells N 1.25N 2N 2N 0.5 Nlog2N Nlog2N
DIC-Lec11 cwliu@twins.ee.nctu.edu.tw
49