05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Application Level Memory Model<br />

A3.9.2 Memory hierarchy<br />

Memory close to a processor has very low latency, but is limited in size <strong>and</strong> expensive to implement. Further<br />

from the processor it is easier to implement larger blocks of memory but these have increased latency. To<br />

optimize overall performance, an <strong>ARM</strong>v7 memory system can include multiple levels of cache in a<br />

hierarchical memory system. Figure A3-5 shows such a system, in an <strong>ARM</strong>v7-A implementation of a<br />

VMSA, supporting virtual addressing.<br />

Virtual<br />

address<br />

CP15 configuration<br />

<strong>and</strong> control<br />

Processor<br />

R15<br />

.<br />

.<br />

.<br />

R0<br />

Figure A3-5 Multiple levels of cache in a memory hierarchy<br />

Note<br />

In this manual, in a hierarchical memory system, Level 1 refers to the level closest to the processor, as shown<br />

in Figure A3-5.<br />

A3.9.3 Implication of caches for the application programmer<br />

In normal operation, the caches are largely invisible to the application programmer. However they can<br />

become visible when there is a breakdown in the coherency of the caches. Such a breakdown can occur:<br />

when memory locations are updated by other agents in the system<br />

when memory updates made from the application code must be made visible to other agents in the<br />

system.<br />

For example:<br />

Address<br />

Translation<br />

Instruction<br />

Prefetch<br />

Load<br />

Store<br />

Level 1<br />

Cache<br />

Physical address<br />

Level 2<br />

Cache<br />

Level 3<br />

DRAM<br />

SRAM<br />

Flash<br />

ROM<br />

Level 4<br />

for example,<br />

CF card, disk<br />

In a system with a DMA controller that reads memory locations that are held in the data cache of a<br />

processor, a breakdown of coherency occurs when the processor has written new data in the data<br />

cache, but the DMA controller reads the old data held in memory.<br />

In a Harvard architecture of caches, where there are separate instruction <strong>and</strong> data caches, a<br />

breakdown of coherency occurs when new instruction data has been written into the data cache, but<br />

the instruction cache still contains the old instruction data.<br />

A3-52 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B

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

Saved successfully!

Ooh no, something went wrong!