
Bit-Reversed Addressing
6-32
6.9
Bit-Reversed Addressing
The ’C4x can implement fast Fourier transforms (FFT) with bit-reversed ad-
dressing. If the data to be transformed is in the correct order, the final result
of the FFT is in bit-reversed order. To recover the frequency-domain data in
the correct order, certain memory locations must be swapped. The bit-rev-
ersed addressing mode makes swapping unnecessary. The next time data
must be accessed, it is accessed in a bit-reversed manner rather than sequen-
tially. In the ’C4x, this bit-reversed addressing can be implemented with both
the CPU and DMA.
For correct CPU (or DMA) bit-reverse operation, the base address of bit-re-
versed addressing must be located on a boundary of the size of the FFT table.
The CPU bit-reverse operation can be illustrated by assuming an FFT table
of size N = 2
n
. When real and imaginary data are stored in separate arrays,
the nLSBs of the base address must be zero, and IR0 must be equal to 2
n–1
(half of the FFT size). When real and imaginary data are stored in consecutive
memory locations (Re–Im–Re–Im) , the n + 1 LSBs of the base address must
be zero, and IR0 must be equal to 2
n
 (FFT size).
For CPU bit-reversing, one auxiliary register (AR2 in this case) points to the
physical location of a data value. When you add IR0 to this auxiliary register
by using bit-reversed addressing, addresses are generated in a bit-reversed
fashion (reverse carry propagation). The largest index for bit-reversed addres-
sing is 0008 0000h; this index is treated as an unsigned integer.
To illustrate bit reversed addressing, assume 8-bit auxiliary registers. Let AR2
contain the value 0110 0000
2
 (96
10
). This is the base address of the data in
memory. Let IR0 contain the value 0000 1000
2 
(8
10
). Example 6–23 shows a
sequence of modifications of AR2 and the resulting values of AR2.
Example 6–23. Bit-Reversed Addressing Example
*AR2++(IR0)B ;
*AR2++(IR0)B ;
*AR2++(IR0)B ;
*AR2++(IR0)B ;
*AR2++(IR0)B ;
*AR2++(IR0)B ;
*AR2++(IR0)B ;
*AR2
AR2=
AR2=
AR2=
AR2=
AR2=
AR2=
AR2=
AR2=
0110 0000 (0th value)
0110 1000 (1st value)
0110 0100 (2nd value)
0110 1100 (3rd value)
0110 0010 (4th value)
0110 1010 (5th value)
0110 0110 (6th value)
0110 1110 (7th value)
;