
146 The u x 1 PM DFT Algorithms
list is carried out. In all the iterations, the vector whose index is the next
higher odd number and the vector whose index is the bit-reversal of the
odd number are swapped and 2-point DFTs computed.
Figure 6.10(e) shows the dit21Sl module. The term dit21 indicates
that the algorithm is the 2 x 1 PM DIT DFT algorithm. This is a three-
butterfly implementation, which is indicated by the number 3. The last
digit 1 indicates that each stage is implemented separately. Two general
and two special types of butterflies are used as presented in Section 6.2.
This flow chart should be followed with the SFG shown in Fig. 6.2. The
variable bs represents the span of a butterfly. The variable gs represents
the span of a group of butterflies. The variable hbs is equal to ^- Variable
inc represents the difference between two indices of the twiddle factors in
the look-up table for a particular stage. These variables are initialized for
first stage values. The loop steps through various stages. The butterfly
span in the last stage of the algorithm is maximum at ^, and therefore,
the value ^-
1S use
d to end the iteration. As the first butterfly in each group
is a special one, module b-flyl is invoked to process this type. This module
processes all the butterfly of this type in a loop as shown in Fig. 6.10(el).
The second special butterfly is required from Stage 2 onwards. The module,
b-fly2, is invoked and it processes all the butterflies of this type in a loop
as shown in Fig. 6.10(e2).
Two general type butterflies are used in the module called b-fly3, shown
in Fig. 6.10(e3). Unlike in the previous cases, the number of butterflies
in each group is more than one. Therefore, two loops are required for
implementation. Two butterflies of the general type are processed at the
same time. This reduces the fetching of the twiddle factors as the twiddle
factors are related in a trivial manner. For each pair of butterflies in the
first group, the indices of the nodes and the twiddle factors are set. The
inner loop steps through all the butterflies with the same twiddle factors in
all groups. The outer loop steps through each butterfly of the first group.
The values are updated and the iteration continues until all the butterflies
in a stage are processed. The ouLput module is shown in Fig. 6.10(f). In
each iteration of the first loop, a pair of values apr(i) and api(i) are printed.
In the second loop, a pair of values amr(i) and ami(i) are printed.