Texas Instruments TMS320C67 DSP Series Programmer's Reference Manual page 50

Library
Hide thumbs Also See for TMS320C67 DSP Series:
Table of Contents

Advertisement

Description
The benchmark performs a mixed radix forwards ifft using a special sequece
of coefficients generated in the following way:
/*generate vector of twiddle factors for optimized algorithm*/
void tw_gen(float * w, int N)
{
int j, k;
double x_t, y_t, theta1, theta2, theta3;
const double PI = 3.141592654;
for (j=1, k=0; j <= N>>2; j = j<<2)
{
for (i=0; i < N>>2; i+=j)
{
theta1 = 2*PI*i/N;
x_t = cos(theta1);
y_t = sin(theta1);
w[k] = (float)x_t;
w[k+1] = (float)y_t;
theta2 = 4*PI*i/N;
x_t = cos(theta2);
y_t = sin(theta2);
w[k+2] = (float)x_t;
w[k+3] = (float)y_t;
theta3 = 6*PI*i/N;
x_t = cos(theta3);
y_t = sin(theta3);
w[k+4] = (float)x_t;
w[k+5] = (float)y_t;
k+=6;
}
}
}
This redundant set of twiddle factors is size 2*N float samples. The function
is accurate to about 130dB of signal to noise ratio to the IDFT function below:
void idft(int n, float x[], float y[])
{
int k,i, index;
const float PI = 3.14159654;
float * p_x;
float arg, fx_0, fx_1, fy_0, fy_1, co, si;
for(k = 0; k<n; k++)
{
p_x = x;
fy_0 = 0;
fy_1 = 0;
for(i=0; i<n; i++)
{
fx_0 = p_x[0];
fx_1 = p_x[1];
p_x += 2;
index = (i*k) % n;
arg = 2*PI*index/n;
co = cos(arg);
si = sin(arg);
DSPF_sp_ifftSPxSP
DSPLIB Reference
4-25

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?

Questions and answers

Table of Contents