09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.10 Memory formats<br />

2.10.1 Byte-invariant big-endian format<br />

2.10.2 Little-endian format<br />

Programmers Model<br />

The processor views memory as a linear collection of bytes numbered in ascending order from<br />

zero. For example, bytes 0-3 in memory hold the first stored word, and bytes 4-7 hold the second<br />

stored word.<br />

The processor can treat words in memory as either:<br />

• Byte-invariant big-endian format<br />

• Little-endian format.<br />

Additionally, the processor supports mixed-endian and unaligned data accesses. See Chapter 4<br />

Unaligned Data and Mixed-endian Data Support for details.<br />

Note<br />

Instructions are always treated as little-endian.<br />

In byte-invariant big-endian format, the processor stores the most significant byte of a word at<br />

the lowest-numbered byte, and the least significant byte at the highest-numbered byte.<br />

Therefore, byte 0 of the memory system connects to data lines 31-24 as Figure 2-8 shows.<br />

Bit<br />

Higher address<br />

Lower address<br />

31 24 23 16 15 8 7 0 Word address<br />

Figure 2-8 Big-endian addresses of bytes within words<br />

In little-endian format, the lowest-numbered byte in a word is the least significant byte of the<br />

word and the highest-numbered byte is the most significant. Therefore, byte 0 of the memory<br />

system connects to data lines 7-0. This is shown in Figure 2-9.<br />

Bit<br />

Higher address<br />

Lower address<br />

8<br />

4<br />

0<br />

• Most significant byte is at lowest address<br />

• Word is addressed by byte address of most significant byte<br />

Figure 2-9 Little-endian addresses of bytes within words<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 2-15<br />

ID060510 Non-Confidential<br />

9<br />

5<br />

1<br />

10<br />

6<br />

2<br />

31 24 23 16 15 8 7 0 Word address<br />

11<br />

7<br />

3<br />

10<br />

6<br />

2<br />

• Least significant byte is at lowest address<br />

• Word is addressed by byte address of least significant byte<br />

9<br />

5<br />

1<br />

11<br />

7<br />

3<br />

8<br />

4<br />

0<br />

8<br />

4<br />

0<br />

8<br />

4<br />

0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!