Recently I met a problem when using DSPF_sp_fftSPXSP() multi-pass function for OMAP-L138.
When I use the single-pass DSPF_sp_fftSPXSP(), the FFT output is correct. While I use DSPF_sp_fftSPXSP() multi-pass implementation , the result is
definitely wrong. Can anybody help me figure it out? or is there any other limits for input variables in this function? thanks a million!
BTW:
The dsplib version is: dsplib_c674x_3_4_0_0
CCS version is : 5.5.0.00077
Part of the code is as follows:
#define N 1024
#pragma DATA_ALIGN(x_ref, 8);
float x_ref[2*N];
#pragma DATA_ALIGN(x_sp, 8);
float x_sp[2*N];
#pragma DATA_ALIGN(w_sp, 8);
float w_sp[2*N];
#pragma DATA_ALIGN(y_sp, 8);
float y_sp[2*N];
unsigned char brev[64] = {
0x0, 0x20, 0x10, 0x30, 0x8, 0x28, 0x18, 0x38,
0x4, 0x24, 0x14, 0x34, 0xc, 0x2c, 0x1c, 0x3c,
0x2, 0x22, 0x12, 0x32, 0xa, 0x2a, 0x1a, 0x3a,
0x6, 0x26, 0x16, 0x36, 0xe, 0x2e, 0x1e, 0x3e,
0x1, 0x21, 0x11, 0x31, 0x9, 0x29, 0x19, 0x39,
0x5, 0x25, 0x15, 0x35, 0xd, 0x2d, 0x1d, 0x3d,
0x3, 0x23, 0x13, 0x33, 0xb, 0x2b, 0x1b, 0x3b,
0x7, 0x27, 0x17, 0x37, 0xf, 0x2f, 0x1f, 0x3f
};
/* Generate complex signal,saved in x_sp */
SigGenerator();
/* Generate twiddle factors, stored in w_sp */
gen_twiddle_fft_sp(w_sp, N);
/* first stage */
DSPF_sp_fftSPxSP(N, &x_sp[0], &w_sp[0], &y_sp[0], brev, N/4, 0, N);
/* second stage */
/* y_sp is the array for FFT output */
DSPF_sp_fftSPxSP(N/4, &x_sp[2*3*N/4], &w_sp[2*3*N/4], &y_sp[0], brev, 4, 3*N/4, N);
DSPF_sp_fftSPxSP(N/4, &x_sp[2*2*N/4], &w_sp[2*3*N/4], &y_sp[0], brev, 4, 2*N/4, N);
DSPF_sp_fftSPxSP(N/4, &x_sp[2*N/4], &w_sp[2*3*N/4], &y_sp[0], brev, 4, N/4, N);
Thanks again
Yours,
James