SPRACN4 August   2019 66AK2G12 , 66AK2H06 , 66AK2H12 , 66AK2H14 , OMAP-L132 , OMAP-L138 , TMS320C6452 , TMS320C6454 , TMS320C6455 , TMS320C6457 , TMS320C6652 , TMS320C6654 , TMS320C6655 , TMS320C6657 , TMS320C6672 , TMS320C6674 , TMS320C6678 , TMS320C6742 , TMS320C6743 , TMS320C6745 , TMS320C6746 , TMS320C6747 , TMS320C6748

 

  1.   Using DSPLIB FFT Implementation for Real Input and Without Data Scaling
    1.     Trademarks
    2. 1 Real Input Introduction
      1. 1.1 Prerequisites
      2. 1.2 Computing a Length N/2 Complex FFT From a Length N Real Input Sequence
      3. 1.3 Returning to a Length N Real Sequence Using a Length N/2 Complex IFFT
      4. 1.4 Benchmark of the Efficient Compute of FFT
    3. 2 Fixed Point FFT With No Data Scaling
      1. 2.1 Suggested Change
      2. 2.2 Example Application
    4. 3 Summary
    5. 4 References

Example Application

Find attached with this article an example that demonstrates the impact of the above suggested changes (fft_scaling_example.zip). The example should be unarchived at [DSPLIB_INSTALLATION_DIR]\dsplib_v210\example. Note the example assumes that the updated FFT and iFFT files are located at [DSPLIB_INSTALLATION_DIR]\dsplib_v210\src\DSP_fft16x16 and [DSPLIB_INSTALLATION_DIR] \dsplib_v210\src\DSP_ifft16x16. Following files are included:

  • fft_example.pjt: Test project that demonstrates the impact of above suggested changes
  • lnk.cmd: Linker command file
    • Generates input data that is summation of Sine wave data of various freqs. The complex input data is separated into real and imag components for easier visualization (xin_real_16x16 and xin_imag_16x16).
    • Generates twiddle factors for the FFT and iFFT kernels. Note that the two kernels use different twiddle factors. Two separate twiddle factor kernels are provided with the DSPLIB release. For the FFT kernel, use the function: [DSPLIB_INSTALLATION_FOLDER]\examples\fft_ex\DSP_fft16x16\gen_twiddle_fft16x16.c and for the iFFT kernel, use the functio: [DSPLIB_INSTALLATION_FOLDER]\examples\fft_ex\DSP_ifft16x16\gen_twiddle_ifft16x16.c.
    • Calls the FFT routine. The generated complex fft data is separated into real and imag components for easier visualization (y_real_16x16 and y_imag_16x16).
    • Calls the iFFT routine. The generated complex output is separated into real and imag components for easier visualization (xout_real_16x16 and xout_imag_16x16)
  • Images: The package includes images that help visualize the impact of the changes. Each image displays side by side three data buffers; xin_real_16x16, y_real_16x16 and xout_real_16x16. Three images are provided:
    • FFTOutput_bothKernelsApplyScaling.JPG: Helps visualize the case where both FFT and iFFT routines apply scaling. This is the default operation.
    • FFTOutput_onlyIFFTApplyScaling.JPG: Helps visualize the case where only iFFT routines apply scaling. This is the case where the FFT routine has been updated to not apply any scaling.
    • FFTOutput_noScaling.JPG: Helps visualize the case where no scaling is applied. This is the case where both the FFT routine and the iFFT routine have been updated to not apply any scaling.
FFTOutput-bothKernelsApplyScaling.gifFigure 1. Both Kernels Apply Scaling
FFTOutput-onlyIFFTApplyScaling.gifFigure 2. Only IFFT Apply Scaling
FFTOutput-noScaling.gifFigure 3. No Scaling