Professional Documents
Culture Documents
Kyungtae Han and Brian L. Evans Embedded Signal Processing Laboratory Wireless Networking and Communications Group The University of Texas at Austin
ESPL
Introduction
Fixed-Point Design
Digital signal processing algorithms
Often developed in floating point Later mapped into fixed point for digital hardware realization
Idea Floating-Point Algorithm Algorithm Level Range Estimation Quantization Fixed-Point Algorithm
Implementation Level
ESPL
Introduction
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
ESPL
Background
Optimum Wordlength
Longer wordlength
May improve application performance Increases hardware cost
Distortion d(w) [1/performance] Optimum wordlength Cost c(w)
Shorter wordlength
May increase quantization errors and overflows Reduces hardware cost
Optimum wordlength
Maximize application performance or minimize quantization error Minimize hardware cost
Wordlength (w)
ESPL
Background
Wordlength Optimization
Express wordlengths in digital system as vector
w = ( w2, w2 w2, , wn ) ,
Cost function c
c : In R w I , c(w ) = ck ( wk )
n k =2 n
ESPL
Background
Wordlength Optimization
Application performance function p
p (w ) Preq
Iterative update equation ) w ( h +2 = w ( h ) + ( h ) Good choice of update direction can reduce number of iterations to find optimum wordlength ESPL
6
Search Methods
j +2
Minimum wordlengths {2,2} Direction of sequential search Optimum wordlengths {5,5} 12 iterations
wopt
2 dw2
wb
dw2 2
Advantage: Fewer trials Disadvantage: Could miss global optimum point ESPL
w2
Measures
Complexity
c( w) w
w0 w1 wn
Distortion
d ( w) w
8
ESPL
Measures
Complexity-and-Distortion Measure
Combine complexity measure with distortion measure by weighting w w factor (01) w Tradeoffs between measures by changing weighting factor Update direction uses both sources of sensitivity information
0 1
Complexity Distortion
Objective function
f (w ) = c(w ) + (2 ) d (w )
wI
ESPL
Case Study
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
ESPL
10
Case Study
Simulations
Assumptions
Internal wordlengths of blocks have been decided Complexity increases linearly as wordlength increases
Input FFT Equalizer (right) Estimator Equalizer (upper) Weight 1024 1 128 2
Simulation tool
LabVIEW 7.0
ESPL
11
Case Study
Minimum Wordlengths
Change one wordlength variable while keeping other variables at high precision
{1,16,16,16},{2,16,16,16},... {16,1,16,16},{16,2,16,16},... {16,16,16,15},{16,16,16,16}
ESPL
12
Case Study
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-byone until satisfying required application performance ESPL
13
Case Study
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
ESPL
14
Conclusion
Summary
Fixed-point conversion requires wordlength optimization Develop complexity-and-distortion measure Complexity-and-distortion method finds optimal solution in one-third the time that full search takes for case study
ESPL
15
Introduction
Fixed-Point Representation
Fixed point type
Wordlength Integer wordlength
Wordlength SystemC format www.systemc.org S X X X X X Wordlength Integer wordlength X X X X X
Quantization modes
Round Truncation
Overflow modes
Saturation Saturation to zero Wrap-around
Integer wordlength = 2
Back
16
ESPL
Search Methods
w
2 d w 2
o p t
2 2 2 2 2 2 2 2
Disadvantage
Many trials (=experiments)
d w 2 2
(d + N 2 d + 2 d + 2 )...( )( )d N!
Direction of full search: minimum wordlengths {2,2} optimum wordlengths = {5,5} d=6 trials = 24
Back
17
ESPL
FFT Cost
N Tap FFT cost
Cost FFT N = log 2N 2
ESPL
18
Measures
f (w ) = c(w )
min{ f (w ) | d (w ) Dmax , w w w} n
wI
= c(w )
Back
19
ESPL
Measures
Distortion Measure
[K. Han et al. 2001]
Applies the application performance information to search for the optimum wordlengths Advantage: Fewer number of iterations Disadvantage: Not guaranteed to yield optimum wordlength for complexity
Objective function Optimization problem Update direction
f (w ) = d (w )
min{ f (w ) | d (w ) Dmax , c(w ) Cmax , w w w} n
wI
= d (w )
Back
20
ESPL
Case Study
ESPL
21
Case Study
Top-Level Simulation
ESPL
Back
22
Introduction
Simulink (Mathworks)
Fixed-point block set 4.0
SPW (Cadence)
Hardware design system
CoCentric (Synopsys)
Fixed-point designer
Background
Simulation-based approach
Wordlengths chosen while observing error criteria Repeated until wordlengths converge Long simulation time
ESPL
24
Search Methods
Case Study
Procedure
1. Range estimation
Find maximum and minimum values for each Defines starting wordlength values to use Increase/decrease wordlengths one-by-one until meeting specification using one of the measures
ESPL
26