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.

  • TI Thinks Resolved

RTOS/AM5728: FFTLIB from Processor SDK

Prodigy 70 points

Replies: 15

Views: 691

Part Number: AM5728

Tool/software: TI-RTOS

I am trying to use the DSPs via OpenCL to do an IFFT. I've had success using DSPLIB but I need to do a non-power of two FFT now (50 elements to be exact). I read that FFTLIB has non-power of two FFTs and indeed the fftlib_c66x_2_0_0_2 provides the following documentation (I've only included a short extract to give some context):

int ifft_sp_1d_c2r_batch_direct ( fft_param_u  u,
void *  edmaState  
)

Parameters:

N  = IFFT size
M  = Power of 2 IFFT size, if Bluestein algorithm is used

Assumptions:Batch size is at least 4.
N is a positive value.

Looks great, but there was no ae66 library for the whole project, but I did find fftlib_3_1_0_0 in ti-processor-sdk-linux-am57xx-evm-05.01.00.11 which seemed great because it's much more recent and included the library. Problem is, the function documentation explains that non-power of two is more or less not supported, suggesting a rollback in features? Here is another documentation extract from fftlib_3_1_0_0:

void ifft_sp_plan_1d_c2r_batch ( int  N,
int  mode,
fft_callout_t  fxns,
fft_plan_t *  p,
float *  in,
float *  out,
float *  tw,
float *  work 
)

Parameters

N = IFFT size

Assumptions:

Batch size is at least 8.
N is a positive value.
N is multiple of 8.

So my concern is: did the IFFT in 2_0_0_2 version not work for non-powers of 2? Or was there a feature rollback?

  • In reply to Omid MDB:

    Omid,

    It appears that fftlib that was released in 2014 was validated on C66x and K2H platforms.

    For AM572x FFTLIB is only supported from Processor SDK Linux where the FFTLIB functionality can be offloaded to the DSP from ARM Linux using OpenCL as mentioned here:
    wiki.tiprocessors.com/.../Processor_SDK_Libraries

    the version of FFTLIB for DSP has been upgraded to 3.1.0.0 and should have the required EDMA porting done for the DSP on AM572x.

    Regards,
    Rahul

    --------------------------------------------------------------------------------------------------------------------------------------
    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.
    --------------------------------------------------------------------------------------------------------------------------------------

     

  • In reply to Rahul Prabhu:

    Hi Rahul,

    Thank you for your reply. I will do so.

    Best regards, Omid
  • In reply to Omid MDB:

    Hi Rahul,

    Thank you very much for your fast response.

    I have tried to use FFTlib  3.1.0.0. Now that problem solved.

    However now I have new issue "[core 0] Memory allocation error!".

    when I tracked the issue inside "fft_omp_sp_2d_r2c_ecpy" function, it allocates memory for "data_wLocal, workbuf_wLocal, workbuf_tLocal" by calling "lib_smem_falloc" function. Please see below

    data_wLocal = (float*)lib_smem_falloc (fft_mem_handle, 4*N*FFT_OMP_SP_2D_R2C_NUMOFLINEBUFS*sizeof(float), 8);
    workbuf_wLocal = (float*)lib_smem_falloc (fft_mem_handle, 4*N*FFT_OMP_SP_2D_R2C_NUMOFLINEBUFS*sizeof(float), 8);
    workbuf_tLocal = (float*)lib_smem_falloc (fft_mem_handle, 2*N*FFT_OMP_SP_2D_R2C_NUMOFLINEBUFS*sizeof(float), 8);
    but it really did not and they are all NULL.
    I would greatly appreciate your help!
    Thank you!
    Best regards,
    Parian Golchin
  • In reply to Parian Golchin:

    Parian,

    The issue with memory allocation is a known issue which has been reported here:
    e2e.ti.com/.../768577

    It appears when the BIOS and EDMA and dependent components were updated the memory requirement for the FFTLIB were increased so you are running into issue that we are tracking in our bug system. This library is in maintenance so please expect some delays.

    I will post a response if I get an intermediate fix in the interim so you don`t need to wait for a new release.

    Regards.
    Rahul

    --------------------------------------------------------------------------------------------------------------------------------------
    Please click the
    This resolved my issue button on this post if the responses on this E2E thread answers your question.
    --------------------------------------------------------------------------------------------------------------------------------------

     

  • In reply to Rahul Prabhu:

    Hi Rahul,

    Thanks for your reply.

    I will wait for an intermediate fix.

    Best regards,

    Parian

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.