FFTs with Fixed-Point Interface - 9.1 English

PG109 Fast Fourier Transform LogiCORE IP Product Guide

Document ID
PG109
Release Date
2022-05-04
Version
9.1 English

1. Input data is an array of complex double-precision floating-point data, but the FFT core being modeled requires data in signed two's-complement, fixed-point format with precision given by C_INPUT_WIDTH. The data has a sign bit, then the binary point, then (C_INPUT_WIDTH - 1) fractional bits. The FFT MEX function checks the input data to see if it fits within this format and precision. If not, it prints a warning, and internally rounds it using convergent rounding (halfway values are rounded to the nearest even number) to the required precision. To accurately model the FFT core, pre-quantize the input data to this required precision before passing it to the model. This can be done using the MATLAB software built-in quantize function.

Type help quantizer/quantize or doc quantize on the MATLAB software command line for more information.

2. Output data has the correct precision to model the FFT:

a. If the FFT is scaled or has block floating-point (that is, C_HAS_SCALING = 1, C_HAS_BFP = 0 or 1, respectively), output data is all in the range
-1.0 £ data < +1.0, the precision is C_INPUT_WIDTH bits, with C_INPUT_WIDTH-1 fractional bits. For example, if C_INPUT_WIDTH = 8, output data is precise to 2-7 = 0.0078125 and is in the range -1.0 to +0.9921875, and the binary representation of the output data has the format s.fffffff, where s is the sign bit and f is a fractional bit.

b. If the FFT is unscaled (C_HAS_SCALING = 0), output data grows beyond ± 1.0, such that the binary point remains in the same place and there are still (C_INPUT_WIDTH - 1) fractional bits after the binary point. In total, the output precision is (C_INPUT_WIDTH + C_NFFT_MAX + 1) bits. For example, if C_INPUT_WIDTH = 8 and C_NFFT_MAX = 3, output data is precise to 2-7 = 0.0078125 and is in the range -16.0 to +15.9921875, and the binary representation of the output data has the format siiii.fffffff, where s is the sign bit, i is an integer bit, and f is a fractional bit.

3. blk_exp is the integer block exponent. It is only valid (and non-zero) if block floating-point is used (that is, C_HAS_SCALING = 1 and C_HAS_BFP = 1). It indicates the total number of bits that intermediate values were shifted right during the FFT processing. For example, if blk_exp = 5, the output data has been divided by 32 relative to the magnitude of the input data.

4. overflow indicates if overflow occurred during the FFT processing. It is only valid (and non-zero) if fixed scaling is used (that is, C_HAS_SCALING = 1 and C_HAS_BFP = 0). A value of 0 indicates that overflow did not occur; a value of 1 indicates that overflow occurred at some stage in the FFT processing. To avoid overflow, increase the scaling at one or more stages in the scaling schedule ( scaling_sch input).

5. If overflow occurred with the Pipelined, Streaming I/O architecture (C_ARCH = 3) due to differences between the FFT core and the model in the order of operations within the processing stage, the output data might not match the XK_RE and XK_IM outputs of the FFT core. The output data must be ignored if the overflow output is 1. This is the only case where the model is not entirely bit accurate to the core.