“An Automated System for Floating- to Fixed-PointConversion of High Performance of MATLAB Algorithms in FPGAs and ASICs”
Authors: Eric Cigan and Robert Anderson, AccelChip, Inc.
Abstract
In general, designing DSP systems for FPGAs and ASICs is split between two roles in a design team: algorithm developers who select and optimize their algorithm using floating-point arithmetic, and hardware designers who convert designs to fixed-point arithmetic and hone the silicon implementation of the design. Lacking an integrated flow supporting automated conversion from floating-point to fixed-point representation, design teamscannot work in concert resulting in protracted development schedules, poor utilization of silicon resources and, all too frequently, last-minute efforts to meet specified performance requirements.
Design exploration is the process of evaluating candidate solutions and comparing alternative technical solutions using predictive methods such as simulation. When used in the context of DSP design, design exploration methods hold great promise to produce higher quality, better performing designs while accelerate design flows.
In the past, these issues were masked by the widespread use of general-purpose DSP chips capable of running algorithms developed in floating point. As applications in wireless communications, image processing, etc., increase the required performance beyond the abilities of general-purpose DSP processors, design teams are facing the challenge of developing designs for FPGAs and ASICs. High performance hardware realization of DSP algorithms requires implementations using fixed precision arithmetic because operations performed on the data-path use fixed wordlengths.
This leaves a gap between the floating-point domain and the finite precision domain. Typical manual methods employed are as follows.
- Ad-hoc methods such as rounding and truncation.
- Manual scaling to and from integer representations.
- Recoding the source code in a hardware description language and then verifying performance in the RTL code.
- Substitution of floating-point functions with fixed-point equivalents, such as in C fixed-point libraries.
Which methods are used depends on a variety of factors.
- Design methodology:the algorithm developer may avoid finite precision effects, deferring such design issues to solution by the hardware designer.
- Design language: In the case of C based algorithm development, one can substitute fixed-point libraries in for floating-point libraries.
- Time to market considerations: If there is great pressure to complete the design, there is a tendency to use a more expensive FPGA for the design rather than to optimize the design to reduce unit costs.
Once the floating- to fixed-point conversion has been completed, how does one ensure that the hardware implementation meets system performance requirements while minimizing the utilization of resources in silicon? While methods for automating floating- to fixed-point conversion have been developed in the past, these have not become available to mainstream DSP algorithm developers.
This paper describes a methodology to automate the conversion from floating-point into a fixed-point representation on MATLAB source. A set of heuristicsis used to perform floating- to fixed-point conversionthrough use of bit growth algorithms and stimulus vector inferring. These methods have been integrated with a software tool that performs synthesis of VHDL and Verilog to implement MATLAB algorithms in FPGAs and ASICs. The process described supports an iterative optimization process through design space exploration, resulting in superior quality of results (QoR) to traditional methods. This method eliminates the tedium associated with traditional methods for floating- to fixed-point conversion, allowing design teams to work more productively and expeditiously. The methodology will be validated using an example algorithm, and the resulting silicon implementation will be described.
References
C. Shi and R. W. Brodersen, “An Automated Floating-Point to Fixed-Point Conversion Methodology,” 2003 International Conference on Acoustics, Speech, and Signal Processing (ICASSP’03), April 2003
C. Shi and R. W. Brodersen, “Floating-Point to Fixed-Point Conversion with Decision Errors Due to Quantization,” 2004 International Conference on Acoustics, Speech, and Signal Processing (ICASSP’04), May 2004
C. Shi and R. W. Brodersen, “A Perturbation Theory on Statistical Quantization Effects in Fixed-Point DSP with Non-Stationary Inputs,” 2004 IEEE International Symposium on Circuits and Systems (ISCAS 2004), May 2004
P. Banerjee, D. Bagchi, M. Haldar, A. Nayak, V. Kim, R. Uribe, “Automatic Conversion of Floating Point MATLAB Programs into Fixed Point FPGA Based Hardware Design,” Proc. of the 11th Annual IEEE Symposium on Field-Programmable Custom Computing Machines (FCCM’03), April 2003
P. Banerjee, M. Haldar, A. Nayak, V. Kim, R. Anderson and R. Uribe, “AccelFPGA: A DSP Design Tool for Making Area-Delay Tradeoffs While Mapping MATLAB Programs onto FPGAs,” 2003 GSPx Conference, April 2003.
P. Banerjee, D. Bagchi, M. Haldar, A. Nayak, V. Kim, R. Uribe, “Automatic Conversion of Floating Point MATLAB Programs into Fixed Point FPGA Based Hardware Design,” Proc. of the 11th Annual IEEE Symposium on Field-Programmable Custom Computing Machines (FCCM’03), April 2003
C. Shi and R. W. Brodersen, “Floating-Point to Fixed-Point Conversion with Decision Errors Due to Quantization,” 2004 International Conference on Acoustics, Speech, and Signal Processing (ICASSP’04), May 2004
C. Shi and R. W. Brodersen, “A Perturbation Theory on Statistical Quantization Effects in Fixed-Point DSP with Non-Stationary Inputs,” 2004 IEEE International Symposium on Circuits and Systems (ISCAS 2004), May 2004
C. Shi and R. W. Brodersen, “An Automated Floating-Point to Fixed-Point Conversion Methodology,” 2003 International Conference on Acoustics, Speech, and Signal Processing (ICASSP’03), April 2003
Filter Design Toolbox User’s Manual (Version 6), The MathWorks, Inc., 2002