This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6455 16bit FFT problem

hi,

I want to do FFT in DSP C6455. so i download the "dsplib_c64Px_3_1_0_0_Win32.exe",and installed it .

when i run the example in directory "C:\Program Files\Texas Instruments\dsplib_c64Px_3_1_0_0\examples", the result of   DSP_fft16x16(w_16x16, N, x_16x16, y_16x16) is wrong ,    but the result of DSP_fft16x32(w_16x32, N, x_16x32, y_16x32) and   DSP_fft32x32(w_32x32, N, x_32x32, y_32x32) is right。

I doubt  there is something wrong with the function  gen_twiddle_fft16x16(w_16x16, N)  or DSP_fft16x16(w_16x16, N, x_16x16, y_16x16).I can not  find the source code of DSP_fft32x32(w_32x32, N, x_32x32, y_32x32), Is anyone knew where is it or used it  successfully?

PS :the code of gen_twiddle_fft16x16(w_16x16, N) is follow:

int gen_twiddle_fft16x16(short *w, int n)
{
int i, j, k;
double M = 32767.5;

for (j = 1, k = 0; j < n >> 2; j = j << 2) {
for (i = 0; i < n >> 2; i += j << 1) {
w[k + 3] = d2s(M * cos(2.0 * PI * (i + j) / n));
w[k + 2] = d2s(M * sin(2.0 * PI * (i + j) / n));
w[k + 1] = d2s(M * cos(2.0 * PI * (i ) / n));
w[k + 0] = d2s(M * sin(2.0 * PI * (i ) / n));

k += 4;
}
}
w[k + 3] = w[k - 1];
w[k + 2] = w[k - 2];
w[k + 1] = w[k - 3];
w[k + 0] = w[k - 4];
k += 4;

return k;
}

  • Hi,

    I found the problem with the gen_twiddle functions under example directory. The correct gen_twiddle functions are in the source code directories. The source code of all functions can be found under "dsplib_c66x_3_1_0_0\packages\ti\dsplib\src". We will fix the problem in the next DSPLIB release. We appreciate your input and apologize for the inconvenience.

    regards,

    Yimin