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.

DSP_fft16x16 problem

Hi 

I'm using CCS 6.1.2, dsplib_c66x_3_4_0_0,  C6678

 I compiled and run example provided in  'C:\ti\dsplib_c66x_3_4_0_0\examples\fft_ex\fft_example.c'

The output is ok for  DSP_fft16x32 and DSP_fft32x32,  that is,  the output is the same as  C:\ti\dsplib_c66x_3_4_0_0\examples\fft_ex\refOutput.jpg

the output from DSP_fft16x16 function is not ok , i.e, the plotted graph is different  from reference output

Any idea?

Thanks

  • Hi Fabio,

    I will ask DSPLIB expert to comment here. Thank you for your patience.
  • Hi Fabio

    The way I see it, there are three possibilities:

    1. The code is incorrect

    2. The reference vector is incorrect

    3. The way you run your code has issues

    My suggestion first is to try and understand what is wrong.  Each DSPLIB function has a "golden model" representation that is a simple standard C code that is the model to the function.   The golden model comes with extension cn (for C natural) and in your case the function name is DSP_fft16x16_cn.c.  Try to replace this function with the optimized function (without the cn) and see if you still get the wrong results. Please report back to this posting what is your observation.

    Next you can try to run input with known output. For example a pure sin wave that generate a single frequency in the frequency domain or a delta function (1 in the first element, 0 in all other elements, the results should be a constant vector). Again, do the experiments and report back to the posting.

    Regards

    Ran

  • HI

    I did the following.
    1) Copy and paste your code from ''C:\ti\dsplib_c66x_3_4_0_0\examples\fft_ex\' into my prj
    2) change the name of the main function to 'testFFT'
    3) change costant NUM_SIN_WAVES from 4 to 2

    this will generate the input array (costant value + a sin, see function 'generateInput')

    4) call function 'testFFT' (your main)

    Result 32x32 (OK)

    Result 16x32 (OK)

    Result 16x16(?????????)

    Then I changed from 'DSP_fft16x16' to 'DSP_fft16x16_cn' and did the test again, results are the same

    Regards 

    Fabio

  • Fabio, this is very interesting

    At the first glance I thought that this might be truncation errors but then I realized the locations of the peaks and I agree with you, we need to understand what is going on.

    The good news is that since the cn file gives the same results, we can go through the source code of the cn and try to understand what is the problem.

    I will look at the issue soon. If you find the problem first, please report back

    Best Regards

    Ran