Function Descriptions
3.7 Inverse Complex Fast Fourier Transform
Description:
This module computes a 32-bit floating-point Inverse complex FFT . This version of the
function requires input buffer memory alignment.
Header File:
FPU.h
Declaration:
void ICFFT_f32 (CFFT_F32_STRUCT
*
)
Usage:
A pointer to the following structure is passed to the CFFT_f32 function:
typedef struct {
float32
*
InPtr;
float32
*
OutPtr;
float32
*
CoefPtr;
float32
*
CurrentInPtr;
float32
*
CurrentOutPtr;
Uint16 Stages;
Uint16 FFTSize;
} CFFT_F32_STRUCT;
Table 3.2 describes each element.
Alignment Requirements:
The input buffer must be aligned to a multiple of the 2*FFTSize*sizeof(float) i.e. 4*FFTSize.
For example, if the FFTSize is 256 you must align the buffer corresponding to InPtr to 4*256 =
1024. A smaller alignment will not work for a 256 IFFT.
To align the input buffer, use the DATA_SECTION pragma to assign the buffer to a code section
and then align the buffer to the proper offset in the linker command file. In this code example
the buffer is assigned to the INBUF section.
#define CFFT_STAGES 8
#define CFFT_SIZE (1 << CFFT_STAGES)
// FFT input data buffer, alignment require
// Output of ICFFT overwrites input if
// CFFT_STAGES is ODD
#pragma DATA_SECTION(CFFTin1Buff,"CFFTdata1")
float32 CFFTin1Buff[CFFT_SIZE
*
2];
In the project’s linker command file, the INBUF section is then aligned to a multiple of the
FFTSize as shown below:
CFFTdata1 : > RAML4, PAGE = 1, ALIGN(1024)
The buffers referenced by InPtr and OutPtr are used in ping-pong fashion. At the first stage
of the IFFT InPtr and CurrentInPtr both point to the input buffer and OutPtr and CurrentOutPtr
point to the same output buffer. After bit reversing the input and computing the stage 1 but-
terflies the output is stored at the location pointed to be cfft.CurrentOutPtr. The next step is
Sep 10, 2012 25