6.4.5 FFTComplex

Description

FFTComplex computes the Fast Fourier Transform of a source complex vector and stores the results in the destination complex vector.

Prototype

fractcomplex* FFTComplex(int log2N, fractcomplex* dstCV, fractcomplex* srcCV, fractcomplex* twidFactors);

Arguments

Parameters

Description

log2N

Base 2 logarithm of N (number of complex elements in source vector)

dstCV

Pointer to the destination vector

srcCV

Pointer to the source vector

twidFactors

Pointer to twiddle factors

Return

Pointer to the base address of the destination sample.

Remarks

N must be an integer power of 2.

This function internally calls VectorCopy, FFTComplexIP and BitReversal functions.

This function operates out of place. A complex vector, large enough to receive the results of the operation, must already have been allocated and assigned to dstCV.

The elements in the source complex vector are expected in a natural order, and the resulting transform in the destination vector is stored back in a natural order.

The dstCV vector must be allocated in the Y-Data space with address alignment to a modulo of N.

To avoid saturation (overflow) during computation, the values of the source vector should be in the range [-0.5, 0.5].

Only the first N/2 twiddle factors are needed.

The twiddle factors must be initialized with the conjFlag set to zero.

The output is scaled by the factor of N.

Source File

  • fftoop_aa.s

Function Profile

Program Words

9

Cycle Count

36

Note:
  1. The above-mentioned program word and cycle counts pertain solely to FFTComplex. However, as this function inherently utilizes VectorCopy, FFTComplexIP and BitReversalComplex, the respective counts for these functions must also be considered.
  2. In the description of VectorCopy, FFTComplexIP and BitReversalComplex, the number of cycles reported includes four cycles of C-function call overhead. Thus, the number of actual cycles from these function to add to FFTComplex is 3x4 less than whatever number is reported for a stand-alone FFTComplex.

System resource usage

The below system resource usages exclude that of VectorCopy, FFTComplexIP and BitReversalComplex.

  • W0…W4 - used, not restored
  • REPEAT instruction usage - None