ECE645 Lecture6 Multiadd
ECE645 Lecture6 Multiadd
Multioperand Addition
Required Reading
Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design
Recommended Reading
J-P. Deschamps, G. Bioul, G. Sutter, Synthesis of Arithmetic Circuits: FPGA, ASIC and Embedded Systems Chapter 11.1.12 Multioperand Adders
Multiplication p=ax s=
Inner product
n-1
n-1
S=
x(i)
i=0
n-1
x(i) [0..2k-1]
Smin = 0
Smax = n (2k-1) =
log2 n 2k =
a2 b2 FA
a1 b1 c2
FA
a0 b0 c1
FA c0
sn-1
s2
s1
s0
a2 b2 c2
FA
a1 b1 c1
FA
a0 b0 c0
FA
cn
sn-1 cn-1
s3 c3
s2 c2
s1 c1
s0
Example
24 23 22 21 20
x y z
0 1 0 1 0 1 1 0 1 1 1 0 1 1 1
0 0 1 1 0 s c 1 1 0 1 1
x+y+z = s + c
c4
s3
c3
s2
c2
s1
c1
s0
c4
s3
c3
s2
c2
s1
c1
s 0
y
4
4
z
4
CSA
c s
CSA
c CPA S
CSA tree
Tree height for n operands Component Adders CSA CPA Widths k .. k + log2 n k + log2 n typically close to k bits
( )
( )
3 h 2
h(n) = 1 + h h(2) = 0
2 n 3
h(n) log 3
2
( )
n 2
Wallace Tree
Dadda Tree
a b c d e
0 1 1 1 1
1 1 0 0 1
0 0 1 1 1
1 1 1 1 1
0 1 1 1 1
0 1 1 1 0 s0 0 1 1 0 0 s1 s2 1 0 0 1 1
a+b+c+d+e = s0+s1+s2
Implementation of 1-bit of 5-to-3 parallel counter using single CLB slice of a Virtex FPGA
S2
d c b a
LUT G 0
S1
d c b a
LUT F
S0
CSA
s2
PC
s1 s0
CSA
CSA CPA
w
CSA
CPA
w y=a+b+c+d+e mod 2w
y=a+b+c+d+e mod 2w
Fig. 8.17 Dot notation for a (5, 5; 4)-counter and the use of such counters for reducing five numbers to two numbers.