Post on 06-Apr-2018
8/2/2019 WordlengthOptICASSP2004Slides
1/26
ESPL 1
Wordlength Optimization with
Complexity-and-Distortion Measure and
Its Application to Broadband Wireless
Demodulator Design
Kyungtae Han and Brian L. Evans
Embedded Signal Processing LaboratoryWireless Networking and Communications Group
The University of Texas at Austin
8/2/2019 WordlengthOptICASSP2004Slides
2/26
ESPL 2
Fixed-Point Design
Digital signal processing
algorithms
Often developed in floating point
Later mapped into fixed point fordigital hardware realization
Fixed-point digital hardware
Lower area
Lower power
Lower per unit production cost
Idea
Floating-Point Algorithm
Quantization
Fixed-Point Algorithm
Code Generation
Target System
Alg
orithmLevel
Implementation
Level
Range Estimation
Introduction
8/2/2019 WordlengthOptICASSP2004Slides
3/26
ESPL 3
Fixed-Point Design
Float-to-fixed point conversion required to target
ASIC and fixed-point digital signal processor core
FPGA and fixed-point microprocessor core
All variables have to be annotated manually Avoid overflow
Minimize quantization effects
Find optimum wordlength
Manual process supported by simulation
Time-consuming
Error prone
Introduction
8/2/2019 WordlengthOptICASSP2004Slides
4/26
ESPL 4
Optimum Wordlength
Longer wordlength May improve application
performance
Increases hardware cost
Shorter wordlength May increase quantization errors
and overflows Reduces hardware cost
Optimum wordlength Maximize application performanceor minimize quantization error
Minimize hardware cost
Wordlength (w)
Cost c(w)Distortion d(w)
[1/performance]
Optimum
wordlength
Background
8/2/2019 WordlengthOptICASSP2004Slides
5/26
ESPL 5
Wordlength Optimization
Express wordlengths in digital system as vector
Wordlength range for kth wordlength
Cost function c
),,,,(222 nwwww =w
nkwww kkk ,...,2=
RI nc :
=
=n
k
kk
nwcc
2
)()(, wIw
Background
8/2/2019 WordlengthOptICASSP2004Slides
6/26
ESPL 6
Wordlength Optimization
Application performance functionp
Wordlength optimization problem
Iterative update equation
Good choice of update direction can reduce
number of iterations to find optimum wordlength
reqPp )(w
},)(|)({min wwPpc reqIn
wwww
)()()2( hhh+=
+ww
Background
8/2/2019 WordlengthOptICASSP2004Slides
7/26ESPL7
Sequential Search [K. Han et al. 2001]
Greedy search based on sensitivity information
(gradient)
Example
Minimum wordlengths {2,2}
Direction of sequential search
Optimum wordlengths {5,5}
12 iterations
Advantage: Fewer trials
Disadvantage: Could miss global optimum point
jjj sww
+=+2
wopt
wb
w2
w2
dw2
dw2
2
2
Search Methods
8/2/2019 WordlengthOptICASSP2004Slides
8/26ESPL 8
Measures for Optimum Wordlength
Complexity measure method[W.Sung and K.Kum 1995] Minimize complexity c(w) subject to constraint on distortion
d(w)
Update direction uses complexity sensitivity information
Distortion measure[K. Hanet al. 2001] Minimize distortion d(w) subject to constraint on complexity
c(w)
Update direction uses distortion sensitivity information
?w0w1
wn
Complexity
w
wc
)(?
w0w1
wn
Distortion
w
wd
)(
Measures
8/2/2019 WordlengthOptICASSP2004Slides
9/26ESPL 9
Combine complexity measure withdistortion measure by weightingfactor (01)
Tradeoffs between measuresby changing weighting factor
Update direction uses both sourcesof sensitivity information
Complexity-and-Distortion Measure
)()2()()( www dcf +=
)]()2()([ ww dc +=
},)(,)(|)({min wwCcDdf reqIn
wwwww
Update direction
Objective function
Optimization problem
?
w0
w1
wn
Complexity
Distortion
Measures
8/2/2019 WordlengthOptICASSP2004Slides
10/26ESPL 10
Broadband Wireless Access
(IEEE 802.16a) Demodulator
w0: Input wordlength of orthogonal frequency division multiplex (OFDM)demodulator which performs a fast Fourier transform (FFT)
w1: Input wordlength of equalizer
w2: Input wordlength of channel estimator
w3: Output wordlength of channel estimator
EncoderOFDM
Modulator
Wireless
Channel
Model
OFDM
Demodulator
Channel
Estimator
Decoder
Bit error
rate
tester
Data
Source
Channel
Equalizer
w2
w2
w2w
2
Case Study
8/2/2019 WordlengthOptICASSP2004Slides
11/26ESPL 11
Simulations
Assumptions
Internal wordlengths of blocks have been
decided
Complexity increases linearly aswordlength increases
Required application performance
Bit error rate of 1.5 x 10-3 (without error
correcting codes) Simulation tool
LabVIEW 7.0
Case Study
Input Weight
FFT 1024
Equalizer
(right)
1
Estimator 128
Equalizer(upper)
2
8/2/2019 WordlengthOptICASSP2004Slides
12/26ESPL 12
Minimum Wordlengths
Change one wordlengthvariable while keepingother variables at highprecision{1,16,16,16},{2,16,16,16},...
{16,1,16,16},{16,2,16,16},...
{16,16,16,15},{16,16,16,16}
Minimum wordlengthvector is {5,4,4,4}
Case Study
8/2/2019 WordlengthOptICASSP2004Slides
13/26ESPL 13
Number of Trials
Start at {5,4,4,4} wordlength
Next wordlength
combination for complexity
measure ( = 1.0)
{5,4,4,4},
{5,5,4,4},
Increase wordlength one-by-one until satisfying required
application performance
Case Study
8/2/2019 WordlengthOptICASSP2004Slides
14/26ESPL 14
Complexity and Number of Iterations
Each iteration computes complexity & distortion measures
Distortion measure: high cost, low iterations
Complexity-distortion: medium cost, fewer iterations
Complexity measure: low cost, more iterations
Full search: low cost, more iterations
Method w Complexity Iterations
Distortion Only
Complexity-Distortion
Complexity Only
Full Search
0
0.5
1
n/a
{10,9,4,10}
{7,10,4,6}
{7,7,4,6}
{7,7,4,6}
10781
7702
7699
7699
16
15
69
210
Case Study
8/2/2019 WordlengthOptICASSP2004Slides
15/26ESPL 15
Conclusion
Summary
Fixed-point conversion requires wordlength optimization
Develop complexity-and-distortion measure
Complexity-and-distortion method finds optimal solution inone-third the time that full search takes for case study
Future extensions for wordlength optimization
Automate selection of wordlength range
Combine simulation-based and analytical approaches
Employ genetic algorithms
8/2/2019 WordlengthOptICASSP2004Slides
16/26
ESPL 16
Fixed-Point Representation
Fixed point type
Wordlength
Integer wordlength
Quantization modes
Round
Truncation
Overflow modes
Saturation
Saturation to zero
Wrap-around
S X X X X X
Wordlength
Integer wordlength
SystemC format
www.systemc.org
Introduction
X X X X X
Wordlength
Integer wordlength = 2
Back
8/2/2019 WordlengthOptICASSP2004Slides
17/26
ESPL 17
Full Search [W. Sung and K. Kum 1995]
Exhaustive search of all possiblewordlengths
Advantages
Does not miss optimum points
Simple algorithm Disadvantage
Many trials (=experiments)
Distance
Expected number of iterations
wb
wo p t
w2
w2
d w2
d w2
2 2
2 2
2 2
2 2
2
2
Direction of full search:
minimum wordlengths {2,2}
optimum wordlengths = {5,5}
d = 6
trials = 24
!
)2)(2)...(2()(
N
dddNddE
N
FS
+++=
Ndwdwdwd +++= ...22
Search Methods
Back
8/2/2019 WordlengthOptICASSP2004Slides
18/26
ESPL 18
FFT Cost
2222
222log
2
222Cost
2FFT
=
=
NTap FFT cost
256 Tap FFT cost
NN
2FFT log2
Cost =
Back
8/2/2019 WordlengthOptICASSP2004Slides
19/26
ESPL 19
Uses complexity sensitivity information as
direction to search for optimum wordlength
Advantage: minimizes complexity
Disadvantage: demands large number of iterations
Complexity Measure [W.Sung and K.Kum 1995]
)()( ww cf =
)(wc=
},)(|)({min max wwDdfnI www
w
Update direction
Objective function
Optimization problem
Measures
Back
8/2/2019 WordlengthOptICASSP2004Slides
20/26
ESPL 20
Applies the application performance information
to search for the optimum wordlengths
Advantage: Fewer number of iterations
Disadvantage: Not guaranteed to yield optimumwordlength for complexity
Distortion Measure[K. Han et al. 2001]
)()( ww df =
)(wd=
},)(,)(|)({min maxmax wwCcDdfnI
wwwww
Update direction
Objective function
Optimization problem
Measures
Back
C S d
8/2/2019 WordlengthOptICASSP2004Slides
21/26
ESPL 21
Broadband Wireless Access Demodulator
Simulation
Case Study
C S d
8/2/2019 WordlengthOptICASSP2004Slides
22/26
ESPL 22
Top-Level Simulation
Case Study
Back
I d i
8/2/2019 WordlengthOptICASSP2004Slides
23/26
ESPL 23
Tools for Fixed-Point Simulation
gFix (Seoul National University)
Using C++, operator overloading
Simulink (Mathworks)
Fixed-point block set 4.0
SPW (Cadence)
Hardware design system
CoCentric (Synopsys)
Fixed-point designer
gFix a(12,1);
gFix b(12,1);
gFix c(13,2);
c = a + b;
float a;
float b;
float c;
c = a + b;
Introduction
Wordlengths determined manually
Wordlength optimization tool needed
B k d
8/2/2019 WordlengthOptICASSP2004Slides
24/26
ESPL 24
Wordlength Optimization Methods
Analytical approach
Quantization error model
Overestimates signal wordlength
For feedback systems, instability and limit cycles can occur Difficult to develop analytical quantization error model of
adaptive or non-linear systems
Simulation-based approach
Wordlengths chosen while observing error criteria
Repeated until wordlengths converge
Long simulation time
Background
S h M th d
8/2/2019 WordlengthOptICASSP2004Slides
25/26
ESPL 25
Optimum Wordlength Search Methods
Full search [W. Sung and K. Kum 1995] Min + b bit search [W. Sung and K. Kum 1995] Max b bit search [M. Cantin et al. 2002]
Hybrid search [M. Cantin et al. 2002] Sequential search [K. Han et al. 2001] Preplanned search [K. Han et al. 2001] Branch and bound search [H. Choi and W.P.Burleson
1994]
Simulated annealing search [P.D. Fiore and L. Lee1999]
Search Methods
C St d
8/2/2019 WordlengthOptICASSP2004Slides
26/26
ESPL 26
Procedure
1. Range estimation Find maximum and minimum values for each
1. Find minimum wordlengths
Defines starting wordlength values to use1. Iterative search
Increase/decrease wordlengths one-by-one until meeting
specification using one of the measures
Case Study