Texas Instruments TMS320C64X User Manual

Page 131

Advertising
background image

DSP_fft

4-103

C64x+ DSPLIB Reference

xl1 = x0i − x2i;

xl20 = x1r − x3r;

xl21 = x1i − x3i;

xt0 = xh0 + xh20;

yt0 = xh1 + xh21;

xt1 = xl0 + xl21;

yt1 = xl1 − xl20;

xt2 = xh0 − xh20;

yt2 = xh1 − xh21;

xt3 = xl0 − xl21;

yt3 = xl1 + xl20;

/*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/

/* Perform twiddle factor multiplies of three terms,top */

/* term does not have any multiplies. Note the twiddle */

/* factors for a normal FFT are C + j (−S). Since the */

/* factors that are stored are C + j S, this is */

/* corrected for in the multiplies. */

/* */

/* Y1 = (xt1 + jyt1) (c + js) = (xc + ys) + (yc −xs) */

/*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/

y0r = xt0;

y0i = yt0;

y1r = (xt1 * w1c + yt1 * w1s) >> 15;

y1i = (yt1 * w1c − xt1 * w1s) >> 15;

y2r = (xt2 * w2c + yt2 * w2s) >> 15;

y2i = (yt2 * w2c − xt2 * w2s) >> 15;

y3r = (xt3 * w3c + yt3 * w3s) >> 15;

y3i = (yt3 * w3c − xt3 * w3s) >> 15;

/* −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− */

/* Store the final results back to the input array. */

/* −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− */

x[2*(i+j+k ) + 0] = y0r; x[2*(i+j+k ) + 1] = y0i;

x[2*(i+j+k + s) + 0] = y1r; x[2*(i+j+k + s) + 1] = y1i;

x[2*(i+j+k + 2*s) + 0] = y2r; x[2*(i+j+k + 2*s) + 1] = y2i;

x[2*(i+j+k + 3*s) + 0] = y3r; x[2*(i+j+k + 3*s) + 1] = y3i;

}

}

}

Advertising