Page 304 - DSP Integrated Circuits
P. 304
7.3 FFT Processor, Cont. 289
Second Alternative
In the second alternative, we execute p andp + N s/2 concurrently in the first stage
while p and p + N s are executed concurrently in the following stages, as shown in
Box 7.4. The integers k\ and k2 become
--Fast Fourier Transform - Sande-Tukey, ALTERNATIVE #2
-Filename: FFT_ST2.VHD
architecture beh_ST2 of ent_FFT is
begin
Main: process(x_in)
variable Ns, Stage, m, kl, k2, klNs, k2Ns, p : integer;
variable Wcos, Wsin : real;
variable x_tmp : complexArr;
begin
Ns := N;
for Stage in 1 to M loop
Ns := Ns/2; —index distance between a dual node pair
for m in 0 to ((N/4) - 1) loop
kl := 4 * Ns * (m/Ns) + m mod(Ns);
if (stage = 1) then
k2 := kl + Ns/2;
else
k2 := kl + Ns * 2;
end if;
p := kl*2**(Stage - 1) mod(N/2);
Wcos := cos(TwoPiN*real(p));—W to the power of p
Wsin := -sin(TwoPiN*real(p));--W = exp(-j2pi/N)
klNs := kl + Ns;
k2Ns := k2 + Ns;
Butterfly(x_tmp, kl, klNs, Wcos, Wsin); —Concurrent
if (Stage = l)then
Butterfly(x_tmp, k2, k2Ns, Wsin, -Wcos); -Butterflies
else
Butterfly(x_tmp, k2, k2Ns, Wcos, Wsin);
end if;
end loop;- --for loop
end loop; -for loop
Unscramble(x_tmp);
x_ut <= x_tmp; —output signal
end process Main;
end beh_ST2;
Box 7.4 Alternative 2
In both alternatives the two concurrent butterflies will use coefficients that
either are identical or can easily be computed from each other, as just discussed.
One of the butterflies must be able to switch the real and imaginary parts of the