| Motorola DSP Developer's Kit |
| Motorola DSP Developer's Kit |
| Motorola DSP Developer's Kit | ![]() |
Y = mot###_fft( X )
Input/Output
Input: Vector Xe (even index input data, located in X memory), and vector Xo (odd index input data, located in Y memory)
Output: Complex Vector Y (includes real output data of vector Yr, and imaginary data output of vector Yi)
Algorithm
First, use algorithm in FFT-C.ASM to calculate length/2 complex data FFT.
Then use split algorithm to calculate final result.
No scaling is required for the input data. The output data should be scaled up by 2^(r2+1).
For example, to get true FFT values, after the FFT is done and r2=7, every output item has to be shifted left 8 bits.
The split algorithm is described below:
for (k =0; k < size/2 -1; k++)
{
H1r = (Xr[k] + Xr[size-k]) / 2;
H1i = (Xi[k] - Xi[size-k]) / 2;
H2r = (Xi[k] + Xi[size-k]) / 2;
H2i = (Xr[size-k] - Xr[k]) / 2;
Yr[k] = H1r + (C2r[k]*H2r - C2i[k]*H2i);
Yr[size-k] = H1r - (C2r[k]*H2r - C2r[k]*H2i);
Yi[k] = H1i + (C2i[k]*H2r- C2r[k]*H2i);
Yi[size-k] = -(H1i) + (C2i[k]*H2r - C2r[k]*H2i);
}
Memory & Register
Status Register
The assembly function fft-r.asm does not set any status registers/bits during the function execution.
Data Size Limit
The length of vector X can't be larger than the continuous available data memory size.
Data Range Limit
The value of input vector X must be between -1.0 and +1.0.
| diff-c.asm | fft-c.asm | |