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.

256K - points FFT on c64x+ using DSPLIB

Hi,

I'm trying to edit DSP_fft32x32_cn.c function of c64x+'s DSPLIB in order to perform 256K-points FFT . Function's decription and also spruec5.pdf say that, N has to be in 16<= N <= 32768 range while I need 256K points. Are there other restrictions except generating the "twiddle factors" for the 256K points FFT process?

Thanks.

Adem

  • Adem,

    The DSPLIB function is a very well-optimized library function that has been used for several years. It is optimized to work within the constraints that are set for it, with the tradeoff of filling the needs of a large number of application needs with the highest possible level of optimization.

    You can see in your case that there are applications that this library implementation does not fit, and we are sorry that is the case. But the C code is there for you to adapt to your application.

    My recommendation is to do the following, because I take things in very small steps in my development processes:

    1. Build one or all of the .c versions of this file and test those builds using N=2**14 so it does fit within the stated constraints. Get it working using the Debug configuration, then with Release and set the compilation switches to get the best possible level of optimization.

    2. Try it with N=2**16 which is outside of the constraint window and debug/evaluate the result of the Debug Configuration to see where this constraint may play a role.

    3. Make modifications to the routine to support your larger constraint window based on what you learned from #2.

    4. Search the web for recommendations for implementations that may work better for a large or very large FFT such as 256K points.

    The constraints may have to do with the size of memory where faster memory can be used. The constraints may have to do with the size of index variables or specialized instructions that need to be less than 2**16 in range or size. The constraints could have to do with the number of cycles required for an operation increasing too much with the size of the FFT, which would lead to a recommendation for another technique.

    Regards,
    RandyP

  • Hi RandyP,

    Thank you for the hints. I' m working on my requirements in the way ensuring a an adapted version of the orijinal code.

    According to manual spruec5.pdf, one, who uses DSP_fft32x32s functions, has to use a twiddle scale factor of 1073741823.5. Also fft input data has to be scaled by a factor calculated with scale=2^(log2(nx) − ceil[ log4(nx)−1]) formula. But, the directory of DSPLIB (C:\ti\dsplib_c64Px_3_1_1_1\components\ti\dsplib\src\DSP_fft32x32\c64P), contains a test function named DSP_fft32x32s_d.c. In this file twiddle scale factor is set to 2147483647.5. And also input data is not scaled.

    Could you please clarify these points? Which values are more suitable/correct?

    Thanks in advance.

    Adem.

  • Adem,

    The science and technique of the FFT are not things I can help you with;

    The two twiddle factors you cite seem to be approximately x and 2x, and both have a lot of 1's in the mantissa. I am not sure how that is used, but maybe it will help you.

    My guess on scaling is that your numbers will be more optimally sized if you use this scaling, but as long as you do not get overflow in the intermediate operations then it should not matter other than for a few bits of precision.

    Sorry that I do not have your answers. I can sit silent to see if someone else will join in with the answers, but you may be better off with a textbook on FFT design.

    Regards,
    RandyP