Appendix B. Bit and Byte Ordering
B-7
Little-Endian Mode
Starting with the same program as before:
store string (“hello, world”) at 0x000
store pointer (0xFEDCBA98) at 0x010
store half word (0d1234) at 0x00E
store byte (0x55) at 0x00D
If the data is stored to local memory in little-endian mode, the MPC8240 stores the data to
the munged addresses in local memory as shown in Figure B-4.
Figure B-4. Munged Memory Image in Local Memory
The image shown in Figure B-4 is not a true little-endian mapping. Note how munging has
changed the addresses of the data. The ‘h’ is now at address 0x007. Also note that the byte
ordering of the 4-byte pointer, 0xFEDCBA98, is big-endian; only the address has been
modified. However, since the processor core munges the address when accessing local
memory, the mapping appears little-endian to the processor core.
If the data is stored to the PCI memory space, or if a PCI agent reads from local memory,
the MPC8240 unmunges the addresses and reverses the byte-ordering before sending the
data out to the PCI bus. The data is stored to little-endian PCI memory space as shown in
Figure B-5.
4
DL[0–7]
3
AD[31–24]
5
DL[8–15]
2
AD[23–16]
6
DL[16–23]
1
AD[15–8]
7
DL[24–31]
0
AD[7–0]
Table B-4. Byte Lane Translation in Little-Endian Mode (Continued)
Processor
Byte Lane
Processor Data Bus
Signals
PCI Byte Lane
PCI Address/Data Bus
Signals During PCI Data
Phase
Contents
‘w’
‘ ’
‘,’
‘o’
‘l’
‘l’
‘e’
‘h’
Address
00
01
02
03
04
05
06
07
Contents
12
34
0x55
‘d’
‘l’
‘r’
‘o’
Address
08
09
0A
0B
0C
0D
0E
0F
Contents
0xFE
0xDC
0xBA
0x98
Address
10
11
12
13
14
15
16
17
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 ...