AnsweredAssumed Answered

CFFTF bug with N>=512 in CCES2.6.0 and SC584

Question asked by Jhon on Jul 29, 2017
Latest reply on Aug 24, 2017 by Kader.M

Hi all,

I migraged my ADSP-SC584 project to CCES 2.6.0 in recent days, and I found the cfftf function works not properly. This is my test code with core1 (sharc):

#include <sys/platform.h>
#include <sys/adi_core.h>
#include "adi_initialize.h"
#include "testfft_Core1.h"

#include <filter.h>
#include <string.h>


#define FFT_SIZE 1024

#pragma align FFT_SIZE
static float dm fft_buf_r[FFT_SIZE];
#pragma align FFT_SIZE
static float pm fft_buf_i[FFT_SIZE];

float dm twid_r[FFT_SIZE];
float pm twid_i[FFT_SIZE];

float dm temp_r[FFT_SIZE];
float pm temp_i[FFT_SIZE+1];


void test_fft(void)
    int n;

    memset(fft_buf_r, 0, FFT_SIZE*sizeof(float));
    memset(fft_buf_i, 0, FFT_SIZE*sizeof(float));

    for (n=0; n<FFT_SIZE/2; n++)



    twidfftf(twid_r, twid_i, FFT_SIZE);

    cfftf(fft_buf_r, fft_buf_i, temp_r, temp_i, twid_r, twid_i, FFT_SIZE);

* If you want to use command program arguments, then place them in the following string.
char __argv_string[] = "";

int main(int argc, char *argv[])
* Initialize managed drivers and/or services that have been added to
* the project.
* @return zero on success

/* Begin adding your custom code here */


    return 0;

If FFT_SIZE is 512 or more, the results is not correct. If FFT_SIZE is 256 or less, it works fine.

The result should be a pulse in fft_buf_r[] and fft_buf_i[], but is seems to be filled with huge numbers, see the attached figure.

I also attched the test project. The version of CCES is 2.6.0. In older version, It seems works fine.