2.5. Memory formats

The processor views memory as a linear collection of bytes numbered in ascending order from 0. For example:

The processor can access data words in memory in little-endian format or big-endian format. It always accesses code in little-endian format.

Note

Little-endian is the default memory format for ARM processors.

In little-endian format, the byte with the lowest address in a word is the least-significant byte of the word. The byte with the highest address in a word is the most significant. The byte at address 0 of the memory system connects to data lines 7-0.

In big-endian format, the byte with the lowest address in a word is the most significant byte of the word. The byte with the highest address in a word is the least significant. The byte at address 0 of the memory system connects to data lines 31-24.

Figure 2.5 shows the difference between little-endian and big-endian memory formats.

The processor contains a configuration pin, BIGEND, that enables you to select either the little-endian or BE-8 big-endian format. This configuration pin is sampled on reset. You cannot change endianness when out of reset.

Note

  • Accesses to System Control Space (SCS) are always little endian.

  • Attempts to change endianness while not in reset are ignored.

  • Private Peripheral Bus (PPB) space is little-endian, irrespective of the setting of BIGEND.

Figure 2.5. Little-endian and big-endian memory formats

Copyright © 2005, 2006 ARM Limited. All rights reserved.ARM DDI 0337E
Non-Confidential