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

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

Advertisement

/* generate real and imaginary twiddle
table of size n/2 complex numbers */
gen_w_r2(float* w, int n)
{
int i;
float pi = 4.0*atan(1.0);
float e = pi*2.0/n;
for(i=0; i < ( n>>1 ); i++)
{
w[2*i]
= cos(i*e);
w[2*i+1] = sin(i*e);
}
}
The follwoing C code is used to bit-reverse the coefficents:
bit_rev(float* x, int n)
{
int i, j, k;
float rtemp, itemp;
j = 0;
for(i=1; i < (n-1); i++)
{
k = n >> 1;
while(k <= j)
{
j -= k;
k >>= 1;
}
j += k;
if(i < j)
{
rtemp
= x[j*2];
x[j*2]
= x[i*2];
x[i*2]
= rtemp;
itemp
= x[j*2+1];
x[j*2+1] = x[i*2+1];
DSPF_sp_icfftr2_dif
DSPLIB Reference
4-35

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

Subscribe to Our Youtube Channel

Table of Contents