DSPF_sp_ifftSPxSP
4-26
fy_0 += ((fx_0 * co) - (fx_1 * si));
fy_1 += ((fx_1 * co) + (fx_0 * si));
}
y[2*k] = fy_0/n;
y[2*k+1] = fy_1/n;
}
}
The function takes the table and input data and calculates the ifft producing the
frequency domain data in the Y array. the output is scaled by a scaling factor
of 1/N. As the ifft allows every input point to effect every output point in a cache
based system such as the c6711, this causes cache thrashing. This is miti-
gated by allowing the main ifft of size N to be divided into several steps, allow-
ing as much data reuse as possible. For example the following function:
sp_ifftSPxSP_asm(1024, &x[0],&w[0],y,brev,4, 0,1024)
is equvalent to:
sp_ifftSPxSP(1024,&x[2*0],&w[0],y,brev,256,0,1024)
sp_ifftSPxSP(256,&x[2*0],&w[2*768],y,brev,4,0,1024)
sp_ifftSPxSP(256,&x[2*256],&w[2*768],y,brev,4,256,1024)
sp_ifftSPxSP(256,&x[2*512],&w[2*768],y,brev,4,512,1024)
sp_ifftSPxSP(256,&x[2*768],&w[2*768],y,brev,4,768,1024)
Notice how the first ifft function is called on the entire 1K data set it covers the
first pass of the ifft until the butterfly size is 256. The following 4 iffts do 256 pt
iffts 25% of the size. These continue down to the end when the buttefly is of
size 4. They use an index to the main twiddle factor array of 0.75*2*N. This is
because the twiddle factor array is composed of successively decimated ver-
sions of the main array. N not equal to a power of 4 can be used, i.e. 512. In
this case to decompose the ifft the following would be needed :
sp_ifftSPxSP_asm(512, &x[0],&w[0],y,brev,2, 0,512)
is equvalent to:
sp_ifftSPxSP(512, &x[2*0], &w[0] , y,brev,128, 0,512)
sp_ifftSPxSP(128, &x[2*0], &w[2*384],y,brev,4, 0,512)
sp_ifftSPxSP(128, &x[2*128],&w[2*384],y,brev,4, 128,512)
sp_ifftSPxSP(128, &x[2*256],&w[2*384],y,brev,4, 256,512)
sp_ifftSPxSP(128, &x[2*384],&w[2*384],y,brev,4, 384,512)
The twiddle factor array is composed of log4(N) sets of twiddle factors, (3/4)*N,
(3/16)*N, (3/64)*N, etc. The index into this array for each stage of the ifft is cal-
culated by summing these indices up appropriately. For multiple iffts they can
share the same table by calling the small iffts from further down in the twiddle
factor array. In the same way as the decomposition works for more data reuse.
Thus, the above decomposition can be summarized for a general N radix "rad"
as follows:
Need help?
Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?
Questions and answers