You are on page 1of 26

Wordlength Optimization with Complexity-and-Distortion Measure and Its Application to Broadband Wireless Demodulator Design

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

Fixed-point digital hardware


Lower area Lower power Lower per unit production cost

Implementation Level

Code Generation Target System

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

All variables have to be annotated manually


Avoid overflow Minimize quantization effects Find optimum wordlength

Manual process supported by simulation


Time-consuming Error prone

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 ) ,

Wordlength range for kth wordlength


wk wk w k k = 2 n ,...,

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

Wordlength optimization problem


min{c(w ) | p (w ) Preq , w w w} n
wI

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

Sequential Search [K. Han et al. 2001]


Greedy search based on sensitivity information (gradient) w w = w + s Example
2

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

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. Han et al. 2001]


Minimize distortion d(w) subject to constraint on complexity c(w) Update direction uses distortion sensitivity information
w0 w1 wn

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

Optimization problem min{ f (w ) | d (w ) Dreq , c(w ) C , w w w} n Update direction


= [ c(w ) + (2 ) d (w )]
9

ESPL

Case Study

Broadband Wireless Access (IEEE 802.16a) Demodulator


Data Source Encoder OFDM Modulator Channel Estimator w2 Bit error rate tester Decoder Channel Equalizer w2 w2 OFDM Demodulator Wireless Channel Model w2

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

Required application performance


Bit error rate of 1.5 x 10-3 (without error correcting codes)

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}

Minimum wordlength vector is {5,4,4,4}

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

Complexity and Number of Iterations


Method Distortion Only Complexity-Distortion Complexity Only Full Search 0 0.5 1 n/a w {10,9,4,10} {7,10,4,6} {7,7,4,6} {7,7,4,6} Complexity 10781 7702 7699 7699 Iterations 16 15 69 210

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

Future extensions for wordlength optimization


Automate selection of wordlength range Combine simulation-based and analytical approaches Employ genetic algorithms

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

Full Search [W. Sung and K. Kum 1995]


Exhaustive search of all possible wordlengths Advantages
Does not miss optimum points Simple algorithm
w
2

w
2 d w 2

o p t

2 2 2 2 2 2 2 2

Disadvantage
Many trials (=experiments)

d w 2 2

Distance d = dw2+ dw2 + ... + dwN Expected number of iterations


N E FS (d ) =

(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

256 Tap FFT cost


Cost FFT 22 2 = log 222 2 2 = 22 22
Back

ESPL

18

Measures

Complexity Measure [W.Sung and K.Kum 1995]


Uses complexity sensitivity information as direction to search for optimum wordlength Advantage: minimizes complexity Disadvantage: demands large number of iterations
Objective function Optimization problem Update direction

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

Broadband Wireless Access Demodulator Simulation

ESPL

21

Case Study

Top-Level Simulation

ESPL

Back

22

Introduction

Tools for Fixed-Point Simulation


gFix (Seoul National University)
Using C++, operator overloading
float a; float b; float c; c = a + b; gFix a(12,1); gFix b(12,1); gFix c(13,2); c = a + b;

Simulink (Mathworks)
Fixed-point block set 4.0

SPW (Cadence)
Hardware design system

CoCentric (Synopsys)
Fixed-point designer

Wordlengths determined manually Wordlength optimization tool needed ESPL


23

Background

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

ESPL

24

Search Methods

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] 1999]

Simulated annealing search [P.D. Fiore and L. Lee


ESPL
25

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

1. Find minimum wordlengths 1. Iterative search

ESPL

26

You might also like