Hello,
i use TMDXEVM6678L Eval Board in order to evaluate the FFT performance for an 2D FFT. First I tried to load the FFt example from C:\TI\dsplib_c66x_3_1_0_0\examples\FFT_Example_66_LE_COFF. The Code Composer Studio told me that this project uses old format Version 3 and need to be convert to Version >V4. I clicked yes. It converts the projects and it apears in the project explorer view. When I try to open any source it apears an error message:
Could not open the editor: Must specify a URI scheme:EXT_ROOT__FFT_EXAMPLE_66_LE_COFF/fft_example.c
I also cannot build the project: gmake: *** No rule to make target `C:/TI/ccsv5/eclipse/EXT_ROOT__FFT_EXAMPLE_66_LE_COFF/fft_example.c', needed by `fft_example.obj
I adding the source code from this project to my one. The FFT results looks good.
After that I modify tha sample code a little bit (see attached file).
The code store a perfect sinus signal with amplitude 1000 in Buffer x_32x32 (Frequency = sampling frequency/4).
[0] int 1000
[1] int 0
[2] int 0
[3] int 1000
[4] int -1000
[5] int 0
[6] int 0
[7] int -1000
[8] int 1000
[9] int 0
[10] int 0
[11] int 1000
[12] int -1000
[13] int 0
[14] int 0
[15] int -1000
and so on
When I call the 32x32 FFT function I expect that that Value y_32x32[128] =256000 --> 1000*N. All others are Zero. That works. Changing N to 32 I expect y_32x32[16] =32000. This works too. In the FFT example the input amplitude is scaled down with the FFT Length. I want scaled down the twiddle factors and leave the input signal unscaled. So I change the function call from
gen_twiddle_fft32x32(w_32x32, N, 2147483647.5);
to
gen_twiddle_fft32x32(w_32x32, N, (2147483647.5/((float)N)));
I expect that y_32x32[N/2] == 1000. But for N=256 y_32x32[128] == 256000 and for N=32 y_32x32[16] ==32 (not 32000).
Do you have any idea what goes wrong?
Can I scale the FFT result with scaling the twiddle factors?
I use dsplib.ae66. The soucre code is compiled with the following options
cl6x -g -k -q -ss -mv6600 -pds232 -fr obj -fs asm -ft obj --gen_func_subsections -dLARGE_MODEL -i"source\interface_description" -i"source\EXPRO" -i"source\HAL\C667x\Base" -dACTIVE_CPU=5 -dACTIVE_SW_TYPE=3 -d_DEBUG source\Detektion\FFT\C66\fft_example.c
Best regards
Jens