6.4.9 FFTRealIP
Description
FFTRealIP performs an in-place Fast Fourier Transform (FFT) on a real-valued source vector. It utilizes an efficient algorithm that computes the FFT of a 2N-point real vector by leveraging an N-point complex FFT, supplemented with additional operations known as split functions.
Prototype
fractcomplex* FFTRealIP (int log2N, fractional* srcV, fractcomplex* twidFactors);
Arguments
Parameters |
Description |
---|---|
log2N |
Base 2 logarithm of N (number of complex elements in source vector) |
srcV |
Pointer to the real source vector |
twidFactors |
Pointer to the complex twiddle factors |
Return
Pointer to the base address of the complex destination sample.
Remarks
N must be an integer power of 2.
The elements in the source complex vector are expected in a natural order, and the resultant vector, likewise, returned in a natural order. The resulting transform is a complex vector of size N/2 + 1 stored in the same location as that of the source vector. Since the second half of the resulting transform is a conjugate of first half, only N/2 complex elements are returned.
This function operates in-place. srcV must be a non-complex vector with N elements. The additional space of two words must be allocated to srcV to hold the (N/2)th element of the destination complex vector.
The srcV 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.
This function internally utilizes the BitReversal function.
The twiddle factors must be initialized with the conjFlag set to zero.
Output is scaled by the factor of N.
Source File
- rfft_aa.s
Function Profile
Program Words |
PIC32A |
115 + program word counts of BitReversalComplex function |
Cycle count |
Transform Size (N) |
PIC32A | |
Cycles if Twiddle Factors in X-mem |
Cycles if Twiddle Factors in P-mem | ||
32 |
1,198 |
1,692 | |
64 |
2,551 |
3,726 | |
128 |
5,559 |
8,328 | |
256 |
12,122 |
18,587 | |
512 |
26,418 |
40,824 | |
1024 |
57,319 |
89,418 | |
2048 |
123,684 |
194,600 |
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
- Plus resources used by the BitReversalComplex function