6.4.6 FFTComplexIP

Description

FFTComplexIP computes the Fast Fourier Transform of a source complex vector in place.

Prototype

fractcomplex* FFTComplexIP (int log2N, fractcomplex* srcCV, fractcomplex* twidFactors);

Arguments

Parameters

Description

log2N

Base 2 logarithm of N (number of complex elements in source 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.

The elements in the source complex vector are expected in a natural order. The resulting transform is stored in bit-reverse order.

The srcCV 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 conjFlag set to zero.

Output is scaled by the factor of N.

Source File

  • fft_aa.s

Function Profile

Program Words

PIC32A

46

Cycle count

Transform Size (N)

PIC32A

Cycles if Twiddle Factors in X-mem

Cycles if Twiddle Factors in P-mem

32

1,780

2,318

64

4,060

5,356

128

9,188

12,228

256

20,588

27,564

512

45,684

61,428

1024

100,476

135,548

2048

219,268

296,580

System resource usage

  • W0…W7 - used, not restored
  • W8…W14 - saved, used, restored
  • ACCA/ACCB - used, not restored
  • CORCON - saved, used, restored
  • REPEAT instruction(s) usage – 1