Title: Automated Floatingpoint to Fixedpoint Conversion FFC
1Automated Floating-point to Fixed-point
Conversion (FFC)
Changchun Shi and Prof. Bob Brodersen Berkeley
Wireless Research Center Department of
EECS University of California, Berkeley
2Related Number Systems
Algebraic Number
- Infinite precision
- Good for developing theory/algorithm
e.g. a ? b
Double/single precision Floating-point (flpt)
number
- Of high (practically infinite) precision
- Good for algorithm validation
Fixed-point (fxpt) number
Overflow-mode
Quant.-mode
- Finite precision, either high or low
- Often hardware efficient
?
0
0
1
1
0
1
0
0
0
1
Sign
WInt
WFr
3FFC Motivation
Sys. in high-precision arithmetic
- Tweak fxpt data-types
- Monte-Carlo Sim.
- Then, iterate!
-
- Time consuming
- Error-prone
Conventional industrial solution
E.g. Took 5 out of 8 design weeks for a freq.
Synch. unit of OFDM
Fixed-point VLSI/FPGA implementation
Need a systematic and automated flpt-to-fxpt
conversion (FFC)
Keding, Willems, Coors, and H. Meyr, FRIDGE,
Proc. DATE, 1998, pp. 429 435.
4Design and FFC Environment
High-precision implementation in Xilinx
System Generator
Hardware-cost estimator
For FFC
Once FFCed, go to Sys. Gen., BEE or
SSHAFT
Automatically generate VHDL for FPGA or ASIC
5FFC Formulation Optimization
Minimize hardware-cost fHW(WInt,1, WFr,1
WInt,2, WFr,2 overflow and quantization
modes) Subject to specs Sj(WInt,1,
WFr,1 WInt,2, WFr,2 o-q-modes) lt 0, ? j
- Most-significant-bit side try to avoid overflow
- Automatically insert and remove Range Detectors
(RD) - RDs collect signal statistics via a flpt sim.
- Set the Wints, and overflow-modes using the
stats.
From now on, concentrate on WFrs and q-modes
6Signals in an Flpt System
Logical signal Data-types are fixed
- Signals
- Logical and some others
- --with fixed data-type
- --untouched in FFC
- Arithmetic
- --precision to be determined
- --grouping helps
s?1
Some arithmetic signals may be grouped to have
same WFr
7A Good Spec for FFCMSE(flpt-fxpt)
Want
FFC Spec?
Fxpt sys. differs little from flpt sys.
How to measure?
How little?
Output mean squared error MSE( fxpt sys. output
- flpt sys. output ) A lt 0
A ltlt physical noise power
- Direct measuring the difference eases
requirement on estimation error - Many other specs are equivalent to MSE(
arithmetic signal ) - e.g. Decision-error rate
8A First Try on Analytical Constraints LTI Systems
Impulse response sim. provides the frequency
responses of noise
And, use trans. function and statistical noise
model to get MSE(flpt fxpt) sum of
integral freq. resp.2 2-2 WFr,i /12
- Preceding method can be automated
- Worked well for various LTI systems
Inside any probe
Q Yet, what about non-LTI system? A Need a new
theory
9General Systems Perturbation Theory
Quntization error inputs (0s for flpt sys.)
. . .
. . .
. . .
Q
output
. . .
. . .
output
const
Q
const
inputs
inputs
A fxpt system
An inf.-precision system
- Now, fxpt and flpt systems differ only in their
noise inputs
Expectation fxpt output at a time E
Unknown func f( all previous inputs all previous
quant. noises) E f( inputs over time all
0s) sum coefs (power of q-noises) E
flpt output at the same time sum Ecoefs
( q-noises stat.s)
Apply small and statistical quant.-noise
modelonly a few terms in the sum survive
10Application of Perturbation Theory in FFC
MSE(flpt sys. output fxpt sys. output) sum
of unknown coef.s (independent of fxpt
data-types) known functions of fxpt
data types
- Small noise model is justified in FFC
- Works for non-linear non-stationary system
- LTI result is a special case
- Use Monte-carlo simulations to estimate the
unknown coefs - Drastically reduces the complexity to
characterize MSE(flpt-fxpt)
11Analytical Objective Hardware-cost Function
- Fixing architecture and other params.
- fHW-cost(WFr1, WFr2, ) constant term
- linear terms coef. WFr1
- quadratic terms coef. WFr1 WFr2...
- Obtain coef.s
- - Xilinx Resource Estimation Tool estimates
hw-cost in seconds, given fxpt data-types - - Function fit in Matlab, based on systematic
estimations
A typical hardware-cost model comparison
- Validation
- Confirmed by various simulations
- Common linear model works poorly
12Optimization and Its Robustness
- FFC is reduced to a mathematical optimization
problem - Various optimization methods apply
.
Robust feasible region
- Robustness (see right)
- Feasible region shrinks moderately
- Accurate Hardware model is important
WFr2
Hardware-cost Contours
WFr1
13Automated FFC Design Flow Graph
Flpt. Sys. in SysGen Simulink
Placing Spec. Marker
Automated FFC
Copy into fxpt. prototype w/ Spec. Marker
Find WL-active blocks place Range Det.
Resolve WL-Blocks connectivity
WL-grouping and fixed signal identification
Ind. WFr
Area Estimation Data-fit
Simulations Data-fit
One Simulation Analysis remove Range Det.
H.W. Coefficients
Spec. Coefficients
Pre-programmed Optimization
WInt , o-modes
WFr
Final Fxpt. Sys.
14Applications
- Existing techniques would take weeks
- Optimal hardware-cost versus spec. tradeoff plot
(previously difficult) is fast now
System built by Dejan Markovic System
built by Mike Chen
15For More Information
For an FFC demo and more details, please go to my
poster
Related Publications
- C. Shi, and R. W. Brodersen, An automated
floating-point to fixed-point conversion
methodology, - Proc. IEEE ICASSP, Vol. 2, pp. 529-532, April
2003, Hongkong, China. - C. Shi, and R. W. Brodersen, A perturbation
theory on statistical quantization effects in
fixed-point DSP with non-stationary inputs,
Accepted, IEEE ISCAS, 2004, Vancouver, Canada. - C. Shi, and R. W. Brodersen, Floating-point to
fixed-point conversion with decision-errors due
to quantization, Accepted, IEEE ICASSP, 2004,
Montreal, Canada. - C. Shi, and R. W. Brodersen, Automated
Fixed-point Data-type Optimization Tool For
Signal Processing and Communication Systems,
Submitted to DAC 2004, San Diego, CA. - C. Shi, advised by Prof. R. W. Brodersen, M.S.
Thesis, UC Berkeley, May 2002, http//bwrc.eecs.be
rkeley.edu - In Preparations
- C. Shi, and R. W. Brodersen, Automated
floating-point to fixed-point conversion, IEEE
Transactions on Signal Processings. - C. Shi, and R. W. Brodersen, A perturbation
theory on quantization effects in digital signal
processings, IEEE Transactions on Circuits and
Systems II Analog and Digital Signal Processing - C. Shi, advised by Prof. R.W. Brodersen, Ph.D.
Thesis, UC Berkeley, May 2004 (expected)
16Conclusion
- Contributions
- FFC problem characterization efficiency and
robustness - Fast and accurate FPGA resource estimation tool
(collaboration with Xilinx System Generator) - FFC tool fully implemented
- Perturbation theory provides insight on
quantization effects
- Future possibilities
- Architectural exploration
- Other types of hardware-costs (needs estimation
tools)
- Acknowledgements
- Xilinx System Generator group
- Prof. David Tse and Prof. El Ghaoui for their
insights