Block floating point scaling, Block floating point scaling -1 – Altera FFT MegaCore Function User Manual
Page 43

Block Floating Point Scaling
4
2014.12.15
UG-FFT
Block-floating-point (BFP) scaling is a trade-off between fixed-point and full floating-point FFTs.
In fixed-point FFTs, the data precision needs to be large enough to adequately represent all intermediate
values throughout the transform computation. For large FFT transform sizes, an FFT fixed-point
implementation that allows for word growth can make either the data width excessive or can lead to a loss
of precision.
Floating-point FFTs represents each number as a mantissa with an individual exponent. The improved
precision is offset by demand for increased device resources.
In a block-floating point FFT, all of the values have an independent mantissa but share a common
exponent in each data block. Data is input to the FFT function as fixed point complex numbers (even
though the exponent is effectively 0, you do not enter an exponent).
The block-floating point FFT ensures full use of the data width within the FFT function and throughout
the transform. After every pass through a radix-4 FFT, the data width may grow up to log
2
(42) = 2.5 bits.
The data scales according to a measure of the block dynamic range on the output of the previous pass. The
FFT accumulates the number of shifts and then outputs them as an exponent for the entire block. This
shifting ensures that the minimum of least significant bits (LSBs) are discarded prior to the rounding of
the post-multiplication output. In effect, the block-floating point representation is as a digital automatic
gain control. To yield uniform scaling across successive output blocks, you must scale the FFT function
output by the final exponent.
In comparing the block-floating point output of the Altera FFT MegaCore function to the output of a full
precision FFT from a tool like MATLAB, you must scale the output by 2 (–exponent_out) to account for
the discarded LSBs during the transform.
Unlike an FFT block that uses floating point arithmetic, a block-floating-point FFT block does not
provide an input for exponents. Internally, a complex value integer pair is represented with a single scale
factor that is typically shared among other complex value integer pairs. After each stage of the FFT, the
largest output value is detected and the intermediate result is scaled to improve the precision. The
exponent records the number of left or right shifts used to perform the scaling. As a result, the output
magnitude relative to the input level is:
output*2
-exponent
For example, if
exponent
= –3, the input samples are shifted right by three bits, and hence the magnitude
of the output is
output*2
3.
©
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at
www.altera.com/common/legal.html
. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134