Function Descriptions
to switch the pointer cfft.CurrentInPtr with cfft.CurrentOutPtr so that the output from the n
th
stage becomes the input to the n + 1
th
stage while the previous (n
th
) stage’s input buffer will
be used as the output for the n + 1
th
stage. In this manner the CurrentInPtr and CurrentOutPtr
are switched successively for each IFFT stage.Therefore, If the number of stages is odd then
at the end of all the coputation we get:
currentInPtr=InPtr, currentOutPtr=OutPtr.
If number of stages is even then,
currentInPtr=OutPtr, currentOutPtr=InPtr.
Stage3 Stage4 Stage5 ... Stage N
N = odd N = even
InPtr (Buf1) CurrentInPtr CurrentOutPtr CurrentInPtr ... CurrentInPtr CurrentOutPtr
OutPtr (Buf2) CurrentOutPtr CurrentInPtr CurrentOutPtr ... CurrentOutPtr CurrentInPtr
Result Buf Buf1 Buf2 Buf1 ... Buf1 Buf2
Table 3.9: Input and Output Buffer Pointer Allocations
Notes:
1. This function is not re-entrant as it uses global variables to store arguments; these
will be overwritten if the function is invoked while it is currently processing.
2. If the input buffer is not properly aligned, then the output will be unpredictable.
3. All buffers and stack are placed in internal memory (zero-wait states in data space).
Sep 10, 2012 26