B.4 Little-Endian Mode - Motorola MPC8240 User Manual

Integrated host processor with integrated pci
Table of Contents

Advertisement

If the data is stored to the PCI memory space, it appears as shown in Figure B-3.
Figure B-3. Big-Endian Memory Image in Big-Endian PCI Memory Space
Note that the string 'hello, world' starts at address 0x000. The other data is stored to the
desired location with big-endian byte ordering.

B.4 Little-Endian Mode

When the processor core is operating in little-endian mode, its internal BIU modifies each
address. This modification is called munging. The processor munges the address by
exclusive-ORing (XOR) the three low-order address bits with a three-bit value that depends
on the length of the operand (1, 2, 4, or 8 bytes), as shown in Table B-2.
'l'
'l'
Contents
Address
03
02
'w'
' '
Contents
Address
07
06
'd'
'l'
Contents
Address
0B
0A
34
12
Contents
Address
0F
0E
0x98
0xBA
Contents
Address
13
12
Contents
Address
17
16
Appendix B. Bit and Byte Ordering
'e'
'h'
01
00
','
'o'
05
04
'r'
'o'
09
08
0x55
0x00
0D
0C
0xDC
0xFE
11
10
15
14
Little-Endian Mode
B-5

Advertisement

Table of Contents
loading

Table of Contents