© 2004 Microchip Technology Inc. DS70050C-page 3-17
Section 3. Data Memory
Data Memory
3
Example 3-5: XB Address Calculation
When XB<14:0> = 0x0008, the bit-reversed buffer size will be 16 words. Bits 1-4 of the W
register will be subject to bit-reversed address correction, but bits 5-15 (outside the pivot point)
will not be modified by the bit-reverse hardware. Bit 0 is not modified because the bit-reverse
hardware only operates on word addresses.
The XB modifier controls the ‘pivot point’ for the bit-reverse address modification. Bits outside of
the pivot point will not be subject to bit-reversed address corrections.
Figure 3-8: Bit-Reversed Address Modification for 16-Word Buffer
0000 0000 0000 0000 Wn points to word 0
+1 0000 Wn = Wn + XB
0000 0000 0001 0000 Wn points to word 8
+1 0000 Wn = Wn + XB
0000 0000 0000 1000 Wn points to word 4
+1 0000 Wn = Wn + XB
0000 0000 0001 1000 Wn points to word 12
+1 0000 Wn = Wn + XB
0000 0000 0000 0100 Wn points to word 2
+1 0000 Wn = Wn + XB
0000 0000 0001 0100 Wn points to word 10
Bit-Reversed Result
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
XB<14:0> =
0x0008
Bits 1-4 of address
Pivot Point
are modified.