1 Using 2-opr adder Carry-save adder Wallace Tree Dadda Tree Parallel Counters Multi-Operand...
-
Upload
stewart-jones -
Category
Documents
-
view
222 -
download
9
Transcript of 1 Using 2-opr adder Carry-save adder Wallace Tree Dadda Tree Parallel Counters Multi-Operand...
1
• Using 2-opr adder
• Carry-save adder
• Wallace Tree
• Dadda Tree
• Parallel Counters
Multi-Operand Addition
2
• X1+X2+ …+Xk with n-bit each
• Sum= n +log2(k) bits
• Serial Addition Tadd= (k–1) (TAdder + TReg )
Aadd= AAdder + AReg
Two-Operand Adders
X i
n+log2(k)
Adder Reg.
3
• Serial Addition: Cascading Tadd=
Aadd= AAdder= bits adders
Two-Operand Adders(2)
Add
er
Add
er
Add
er
. . .
X1
X2X3
Xk
1
12 )log(
k
iin
1
12 )log(
k
iinT
4
• Parallel Addition: Binary tree
Tadd=
Aadd=
Two-Operand Adders(3)
Add
er
Add
er
Add
er
/
/
/
. . . /
X1
X2
X3
n+1Add
er
X4
n+2
n+log2K
k
iinT
2log
1)1(
k
i
i inAk2log
1)1()2/(
5
• Add more than two numbers (says n)
• Carry not added (Carry save)
• 3 # (3,2) 2#
Carry-Save Adder
FA
0 1 0 1
FA FA FA
1 0 0 10 1 1 1
1 0 1 10 1 0 1
6
• CPA in the last step
• 3 # (3,2) 2#;
• TCPA+log3/2kTFA
Carry-Save Adder(2)
Csa
veA
CSa
veA
CPA
X1X2
X3
CSa
veA CSa
veA
7
• 4# (4,2) 2#;
• TCPA+ 2 log2kTFA
Carry-Save Adder(3)
FA FA
FA FA
FA FA
FA FA
8
• 7# (7,3) 3#;
• TCPA+ 2 log7/3kTFA
Carry-Save Adder(4)
FA FA
FA
(7,3)-counter
FA
9
• Applying (3,2) FA & (2,2) HA with dot notation n=6&k=6 12 FA in 1st level
Carry-Save Adder(5-1)
10
• Applying (3,2) FA & (2,2) HA with dot notation n=6&k=6 5 FA & 2HA in 2nd level
Carry-Save Adder(5-2)
11
• Applying (3,2) FA & (2,2) HA with dot notation n=6&k=6 12HA in 2nd level 4 numbers (same)Not so good
Carry-Save Adder(5-2-1)
12
• Applying (3,2) FA & (2,2) HA with dot notation n=6&k=6 5 FA & 1HA in 3rd level7-bit CPA in last level
Carry-Save Adder(5-3)
13
• k-input Wallace Tree reduces to two (n+log2k –1)-bit outputs h(k)=1+h(2k/3)h(k): the smallest height of an k-input
Wallace tree
Wallace Tree
h(k)= 0 1 2 3 4 5 6
k= 2 3 4 6 9 13 19
14
• 7-input Wallace Tree reduces to two (n+log2k –1)=(n+2)-bit outputs
Wallace Tree(2)
csa csa
csa csa
csa
(n,1)(n-1,0)
(n+1,2)
(1) (0)
15
• Reduce the number to the next lower number
Dadda Tree
h(k)= 0 1 2 3 4 5 6
k= 2 3 4 6 9 13 19
h(k)= 7 8 9 10 11 12 13
k= 28 42 63 94 141 211 316
16
• Reduce the number to the next lower number
• Ex1: k=8 8 (2CSA)6 (2CSA)4 (1CSA)3(1CSA)2CPA
• Ex2: k=12 12 (3CSA)9 6 4 2
Dadda Tree(2)
h(k)= 0 1 2 3 4 5 6
k= 2 3 4 6 9 13 19
17
• One column(3,2) counter at most 3 1’s 2 bits (k,m) counter at most k 1’s
m=log2(k+1) bits
• How about multi-column?(k,k,m) counter: at most k 3’s
m=log2(3k+1) bits
Parallel Counters
18
• Ex: (5,5,m); m= log2(3*5+1)= 4 bitsOverlapped m/(# of col.) = 2 bits CPA at last stage too
Parallel Counters(2)
19
• Ex: (5,5,5,m); m= log2(7*5+1)= 6 bitsOverlapped m/(# of col.) = 2 bits CPA at last stage too
Parallel Counters(3)