Dit Fft Subroutine - Analog Devices adsp-2100 Manual

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

.INIT
inplaceimag: <inputimag.dat>;
.INIT
groups: N_div_2;
.INIT
bflys_per_group: 2;
.INIT
node_space: 2;
.INIT
blk_exponent: 0;
.INIT
padding: 0,0,0,0;
.GLOBAL
twid_real, twid_imag;
.GLOBAL
inplacereal, inplaceimag;
.GLOBAL
inputreal, inputimag;
.GLOBAL
groups, bflys_per_group, node_space, blk_exponent;
.EXTERNAL
scramble, fft_strt;
CALL scramble;
CALL fft_strt;
TRAP;
.ENDMOD;
Listing 14.5 Main Module, Radix-2 DIT FFT
14.7.2

DIT FFT Subroutine

The radix-2 DIT FFT routine is shown in Listing 14.6. The constants N and
log2N are the number of points and the number of stages in the FFT,
respectively. To change the number of points in the FFT, you modify these
constants.
The first and last stages of the FFT are performed outside of the loop that
executes all the other stages. Treating the first and last stages individually
allows them to be executed faster. In the first stage, there is only one
butterfly per group, so the butterfly loop is unnecessary, and the twiddle
factors are all either 1 or 0, so no multiplications are necessary. In the last
stage, there is only one group, so the group loop is unnecessary, as are the
Software Examples
{Zeros after inplaceimag}
{subroutine calls}
{halt program}
14
14 – 13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents