A Parameterized Floating Point Library Applied to Multispectral Image Clustering . Xiaojun Wang Dr. Miriam Leeser Rapid Prototyping Laboratory Northeastern University. Outline. Project overview Library hardware modules Floating point divider and square root
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Xiaojun Wang
Dr. Miriam Leeser
Rapid Prototyping Laboratory
Northeastern University
P166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004
Fixed Point Multispectral Image Clustering
Limited range
Number of bits grows for more accurate results
Easy to implement in hardware
Floating Point
Dynamic range
Accurate results
More complex and higher cost to implement in hardware
Why Floating Point (FP) ?P166/MAPLD 2004
Biased Multispectral Image Clustering
exponent
Significand s=1.f
(the 1 is hidden)
Sign
+/
e+bias
f
32bits:
64bits:
8 bits, bias=127
11 bits, bias=1023
23+1 bits, IEEE singleprecision format
52+1 bits, IEEE doubleprecision format
Floating Point Representation(1)s * 1.f * 2eBIAS
P166/MAPLD 2004
P166/MAPLD 2004
High Performance Signal Processing Easy and Affordable in FPGAs
P166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004
2 denorm
+ 1 fp_add
+ 1 rnd_norm
= 1 IEEE single precision adder
P166/MAPLD 2004
(1) Multispectral Image Clustering s1 * 1.f1 * 2e1BIAS
(1)s2 * 1.f2 * 2e2BIAS
x
(1)s1 xor s2 * (1.f1*1.f2) * 2(e1+e2BIAS)BIAS
Another Example  Floating Point MultiplierP166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004
Dividend X and divisor Y are 2mbit fixedpoint number [1,2)
,where
Y is decomposed into higher order bit part and lower order bit part , which are defined as
,where
Division AlgorithmP166/MAPLD 2004
Using Taylor series [1,2)
Error less than ½ ulp
Two multipliersand one TableLookup are required
Division Algorithm – ContinueP166/MAPLD 2004
2m bits [1,2)
2m bits
Dividend X
Divisor Y
m bits
2m bits
Multiplier
Lookup Table
2m+2 bits
2m+2 bits
Multiplier
2m bits
Result
Division – Data FlowP166/MAPLD 2004
Y [1,2)
Reduction
A
00...00
A2
A3
A4
Evaluation
M
B=f(A)
Postprocessing
Multiplier
sqrt(Y)
Square Root – Data FlowReduce the input Y
to a very small number A
Compute first terms
of Taylor series
P166/MAPLD 2004
4k bits [1,2)
Y
(
k
)
Y
Y
k bits
k bits
M
R
Table
Table
^
4k bits
k+1 bits
R
Multiplier
^
M
4k bits
=

A
Y
R
1
A2
A3
A4
0...00
4k bits
Square Root – ReductionP166/MAPLD 2004
A [1,2)
4k bits
A2
A3
A4
0...00
A2
A3
A2
k bits
k bits
k bits
^2
Multiplier
A2
A2*A2
A2*A3
k bits
2k bits
Multiplier
A2*A2*A2
Multiple Operand
Signed Adder
B
4k bits
Square Root  EvaluationP166/MAPLD 2004
P166/MAPLD 2004
The last column is the IEEE single precision floating point format
P166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004
0 1 2 3 4 [1,2)
Image spectral data
Clustered image
pixel Xij
class 0
class 1
j = 0 to J
class 2
class 3
class 4
k = 0 to K
Every pixel Xij is assigned a class cj
spectral component ‘k’
i = 0 to I
Application : Kmeans Clustering for Multispectral Satellite ImagesP166/MAPLD 2004
P166/MAPLD 2004
Pixel
Data
Cluster
Centers
Pixel
Data
Memory
Acknowledge
DATAPATH
Pixel
Shift
Subtraction
Datapath
Validity
Abs. Value
Addition
Data
Valid
Cluster
Assignment
Accumulators
Comparison
Mean Update
Division
P166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004
P166/MAPLD 2004