CHAPTER 3 SYSTEM CONTROLLER
Preliminary User’s Manual S15543EJ1V0UM 227

Figure 3-1. Bit and Byte Order of Endian Modes

BYTE0 BYTE1 BYTE2 BYTE3

BYTE4 BYTE5 BYTE6 BYTE7

40
MSB LSB

31 0

MSB = Most Significant Byte
LSB = Least Significant Byte
Big-Endian
Big End Little End

BYTE3 BYTE2 BYTE1 BYTE0

BYTE7 BYTE6 BYTE5 BYTE4

40
MSB LSB

31 0

Little-Endian
Big End Little End

If the access type matches the data item type, no swapping of data sub-items is necessary. Thus, when making

half-word accesses into a data array consisting of half-word data, no byte swapping takes place. In this case, data

item bit order is retained between the two endian modes. The code that sequentially accesses the half-word data

array would be identical, regardless of the endian mode of its VR4120A. The code would be endian-independent.

Figure 3-2. Half-word Data Array Example

A
HW3
Halfword
Data Array

Big-Endian

Data extraction using sequential halfword access

B C D
E F G H
I J K L
M N O P
HW2
HW1
HW0
LSHW
MSHW
LSHW
MSHW A
HW3

Little-Endian

BCD
E F G H
I J K L
M N O P
HW2
HW1
HW0
LSHW
MSHW
LSHW
MSHW
A B C D
E F G H
I J K L
M N O P
A B C D
E F G H
I J K L
M N O P
Order Retained

Data extraction using sequential halfword access

A B C D E F G H
I J K L M N O P
A B C DE F G H
I J K LM N O P
Order Lost