Appendix B. Bit and Byte Ordering
B-5
Little-Endian Mode
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.
Contents
‘l’
‘l’
‘e’
‘h’
Address
03
02
01
00
Contents
‘w’
‘ ’
‘,’
‘o’
Address
07
06
05
04
Contents
‘d’
‘l’
‘r’
‘o’
Address
0B
0A
09
08
Contents
34
12
0x55
0x00
Address
0F
0E
0D
0C
Contents
0x98
0xBA
0xDC
0xFE
Address
13
12
11
10
Contents
Address
17
16
15
14
Summary of Contents for MPC8240
Page 1: ...MPC8240UM D Rev 1 1 2001 MPC8240 Integrated Processor User s Manual ...
Page 38: ...xviii MPC8240 Integrated Processor User s Manual TABLES Table Number Title Page Number ...
Page 48: ...xlviii MPC8240 Integrated Processor User s Manual Acronyms and Abbreviations ...
Page 312: ...6 94 MPC8240 Integrated Processor User s Manual ROM Flash Interface Operation ...
Page 348: ...7 36 MPC8240 Integrated Processor User s Manual PCI Host and Agent Modes ...
Page 372: ...8 24 MPC8240 Integrated Processor User s Manual DMA Register Descriptions ...
Page 394: ...9 22 MPC8240 Integrated Processor User s Manual I2O Interface ...
Page 412: ...10 18 MPC8240 Integrated Processor User s Manual Programming Guidelines ...
Page 454: ...12 14 MPC8240 Integrated Processor User s Manual Internal Arbitration ...
Page 466: ...13 12 MPC8240 Integrated Processor User s Manual Exception Latencies ...
Page 516: ...16 14 Watchpoint Trigger Applications ...
Page 538: ...B 16 MPC8240 Integrated Processor User s Manual Setting the Endian Mode of Operation ...
Page 546: ...C 8 MPC8240 Integrated Processor User s Manual ...
Page 640: ...INDEX Index 16 MPC8240 Integrated Processor User s Manual ...