Hello to all,
I am trying to perform a simple radix 2 IFFT followed by an FFT using CCS v5.
Since TI is saying that it's better to conjugate the input to the FFT function aswell as the output sequences to get the result of IFFT instead of just conjugating the twiddle factors following the spra884a guide, I assumed that once i do that and follow it by the same FFT routine I get the original signal which wasn't the case for me,i put some of the code I am using so you can see how I proceeded, I can't get a hold of what I did wrong ..I thought of bit reversing the results after each FFT routine but it didn't work after all. I am using the TMS320C6416 and the release mode in CCS if it ever matters.
Any help would be very appreciated.
#define N (128)
#pragma DATA_ALIGN (x, 8)
#pragma DATA_ALIGN (xx, 8)
#pragma DATA_ALIGN (y, 8)
#pragma DATA_ALIGN (w, 8)
short x[2*N];
short xx[2*N];
short w[2*N];
void main ()
{
/*The main routine*/
gen_twiddle(w, N, scale);
/* ==================================================================== */
/* Conjugate the input to perform IFFT. */
/* ==================================================================== */
for(i=0; i<N; i++)
{
x[2*i+1] = -x[2*i+1];
}
/* ==================================================================== */
/* Perform Radix2 FFT */
/* ==================================================================== */
radix2(N, x, w);
/* ==================================================================== */
/* Conjugate the output to to get the results of the IFFT. */
/* ==================================================================== */
for(i=0; i<2*N; i++)
{
if(i<N) x[2*i+1] = -x[2*i+1];
}
/* ==================================================================== */
/* Perform Radix2 FFT */
/* ==================================================================== */
radix2(N, x, w);
}