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.

4k fft on 6727

Hi.

I am having trouble with DSF_sp_fftSPxSP with a 4k vector on the 6727. I seem to be able to do a 1k and 2k just fine but the 4k always sputters NANs, though it does not crash.

Here is the call:                 DSPF_sp_fftSPxSP(n_max, &buf[0], &w[0], fftend, brev, n_min, offset, n_max);
n_max = 4096

buf is 8192 floats long

w is 8192 floats

fftend is an array of 8182 floats

brev is the bit-reverse table

n_min is 2

offset is 0

All the arrays are aligned with the DATA_ALIGN pragma as in this example: #pragma DATA_ALIGN (buf, 8);

 

The only difference between the failing call and the ones that work is the size of the fft- 4096. This does not fit in the cache but it should not fail, should it?

Thanks,

Don

  • Don,

    Are you maybe running out of stack space? Can you please try increasing it (I'm assuming double would suffice) to see if that eliminates failures?

  • This is an interesting thought and certainly worth trying.

    I re-wrote everything to use the 2k version with downsample to get the resolution I want at the lower frequencies, but I will try this at my first opportunity.

    Thank you,

    Don

  • Hi,

    I'm having the same problem with a DSPF_sp_fftSPxSP with a 4K window, using a TSM320C6726;

    The problem is that it seems to work but the result is uncorrect.

    The code I'm using is

        DSPF_sp_fftSPxSP(N, in , w , out , brev ,n_min ,0 ,N);

        DSPF_sp_ifftSPxSP (N, out , w , in , brev , n_min ,0 ,N);

     

    N = 4096;

    n_min = 4;

    in, out, w are 8192 float buffers, aligned to double word;

    brev is from brev_table.h in the fft support directory;

     

    The code works perfectly with smaller processing windows.

    I tried to change the stack size but it doesn't change anything, and from the Kernel/object view seems that the routine doen't use the stack.

    Do you have any suggestion?

    thank you,

    Matteo