EasyManuals Logo

Texas Instruments C28 Series User Manual

Texas Instruments C28 Series
76 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #35 background imageLoading...
Page #35 background image
Function Descriptions
Example:
The following sample code obtains the FFT of the real input.
#include "FPU.h"
#define RFFT_STAGES 9
#define RFFT_SIZE (1 << RFFT_STAGES)
RFFT_ADC_F32_STRUCT rfft_adc;
RFFT_F32_STRUCT rfft;
/
*
RFFTin1Buff section to 2
*
FFT_SIZE in the linker file
*
/
#pragma DATA_SECTION(RFFTin1Buff,"RFFTdata1");
float32 RFFTin1Buff[RFFT_SIZE];
#pragma DATA_SECTION(RFFToutBuff,"RFFTdata2");
float32 RFFToutBuff[RFFT_SIZE];
#pragma DATA_SECTION(RFFTmagBuff,"RFFTdata3");
float32 RFFTmagBuff[RFFT_SIZE/2+1];
#pragma DATA_SECTION(RFFTF32Coef,"RFFTdata4");
float32 RFFTF32Coef[RFFT_SIZE];
main()
{
rfft_adc.Tail = &rfft.OutBuf; /
*
Tail is passed to OutBuf
*
/
rfft.FFTSize = RFFT_SIZE; /
*
FFT size
*
/
rfft.FFTStages = RFFT_STAGES; /
*
FFT stages
*
/
rfft_adc.InBuf = &RFFTin1Buff[0]; /
*
Input buffer 12-bit ADC input
*
/
rfft.OutBuf = &RFFToutBuff[0]; /
*
Output buffer
*
/
rfft.CosSinBuf = &RFFTF32Coef[0]; /
*
Twiddle factor
*
/
rfft.MagBuf = &RFFTmagBuff[0]; /
*
Magnitude output buffer
*
/
... ...
RFFT_f32_sincostable(&rfft) /
*
Initialize twiddle buffer
*
/
RFFT_adc_f32(&rfft); /
*
Calculate output
*
/
}
Benchmark Information:
The following table provides benchmark numbers for the function:
FFTSize C-Callable ASM (Cycle Count)
32 628
64 1290
128 2764
256 6054
512 13360
1024 29466
2048 64709
Table 3.16: Benchmark Information
Sep 10, 2012 35

Table of Contents

Other manuals for Texas Instruments C28 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C28 Series and is the answer not in the manual?

Texas Instruments C28 Series Specifications

General IconGeneral
BrandTexas Instruments
ModelC28 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals