I am having an issue with the DSP_ifft16x16 function that I'm hoping someone can please help me with. I am using the C6455 in little endian, C64x+ dsplib version 3.0.0.8.
I'm trying to do a simple 256 point FFT/IFFT test to basically get back the original data. The input data is all real values with no imaginary component. It has the first 64 values equal to 32+0j, (ie. x_16x16 = [32 0 32 0 32 0...etc] and the rest is zero padded.
Twiddle factors for the FFT and IFFT are generated with:
gen_twiddle_fft16x16(wfft_16x16, FFT_SIZE);
gen_twiddle_ifft16x16(wifft_16x16, FFT_SIZE);
The FFT function works as expected. FFT is called and the results are the same as Matlab:
DSP_fft16x16(wfft_16x16, FFT_SIZE, x_16x16, y_16x16);
IFFT is then called with:
DSP_ifft16x16(wifft_16x16, FFT_SIZE, y_16x16, xout_16x16);
The values of xout is about 4 times greater than x (ie. x = 32, xout = ~1024), which is expected due to the scaling. However, instead of getting 64 real values of ~1024, I get some values that are negated. (ie. real(xout) = 1023, 1028, -1022, 1030, 1026, -1023, etc)
Does anyone know why I would get negative values instead of the expected positive 64 real values? I'm using separate twiddle factors for the IFFT and I don't think I'm having a scaling issue here. Thank you very much in advance for any help provided.