Cache geometry configuration

You can configure the processor with up to four levels of cache. The cache layout is not required to be symmetrical for each CPU in the processor, so the parameters listed in the following table are repeated in groups cpu0-cpu3 corresponding to the view for each core of the memory hierarchy.

Table 26. General cache configuration parameters

ParameterDescriptionDefault
cpu[n].cache-coherency_level1-based-Level of cache coherency. A value of 2 means that the L2 caches, and all subsequent levels, are coherent.2
cpu[n].cache-unification_level1-based-Level of cache unification. A value of 2 means that the L2 caches, and all subsequent levels, are unified.2
cpu[n].cache-outer_levelLevel at which outer cache attributes start to be used. L1 caches always uses inner attributes. A value of 2 means that the L2 caches, and all subsequent levels, use outer attributes.2

Each cache block in the system is configured using the parameters listed in the following table, which are repeated for groups cpu0-cpu3, and within each group in caches l1icache, l1dcache-l4icache, l4dcache.

The number and type of cache blocks are active depending on the unification level of each core. Before the unification level, caches are separate on the instruction and data sides, and both sets of parameters are used. After the unification level, the data and instruction sides are unified, and the single cache block is described using the data side parameters only.

Table 27. Cache block configuration parameters

ParameterDescriptionDefault
cpu[n].[cache]-size_bytesZero if the cache is not present, otherwise the total size in bytes of the cache. Must be divisible by the line length and associativity, and represent a number of cache sets not greater than 32768.32768
cpu[n].[cache]-linelength_bytesLength of each cache line. Must be 32 or 64.32
cpu[n].[cache]-associativityAssociativity of this cache. Must be between 1 and 1024.4
cpu[n].[cache]-read_allocateSupport allocate-on-read in this cachetrue
cpu[n].[cache]-write_allocate[a]Support allocate-on-write in this cachetrue
cpu[n].[cache]-write_back[a]Support write-back in this cachetrue
cpu[n].[cache]-write_through[a]Support write-through in this cachetrue
cpu[n].[cache]-treat_invalidate_as_clean[a]Always clean dirty cache lines before invalidating them.false
cpu[n].[cache]-shared_keyIf non-zero, mark this cache as being shared with other cores.0

[a] This parameter is not applicable to instruction-side caches.


The parameters for each core describe the view for that core of the memory hierarchy. If more than one core has access to the same cache unit, for example, a shared Level 2 cache, then:

You can describe non-legal cache layouts using the shared_key mechanism. Not all bad cases can be easily detected during initialization, so take care to ensure correct cache configuration. The model might behave erratically if the cache layout cannot be rationalized.

The following figures show examples of CPU-cache architecture configurations:

Figure 10. CPU-cache architecture configuration - Example 1

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


cpu0.cache-unification_level=2
cpu0.l2dcache-size_bytes=32768
cpu0.l2dcache-shared_key=1
cpu1.cache-unification_level=2
cpu1.l2dcache-size_bytes=32768
cpu1.l2dcache-shared_key=1

Figure 11. CPU-cache architecture configuration - Example 2

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.


cpu0.cache-unification_level=2
cpu0.l2dcache-size_bytes=32768
cpu0.l2dcache-shared_key=1
cpu0.l3dcache-size_bytes=65536
cpu0.l3dcache-shared_key=2
cpu1.cache-unification_level=1
cpu1.l2dcache-size_bytes=32768
cpu1.l2dcache-shared_key=1
cpu1.l3dcache-size_bytes=65536
cpu1.l3dcache-shared_key=2
cpu2.cache-unification_level=2
cpu2.l2dcache-size_bytes=65536
cpu2.l2dcache-shared_key=2

Note

In the view of CPU2, the shared cache block marked L3U$ is at Level 2 in the memory system hierarchy.

Show/hideSee also

Copyright © 2011-2012 ARM. All rights reserved.ARM DUI 0575D
Non-ConfidentialID051712