
MOTOROLA
Chapter 4. Instruction and Data Cache Operation
For More Information On This Product,
Go to: www.freescale.com
4-5
Data Cache Organization and Control
4.2.3.2
Instruction Cache Disabling
The instruction cache may be disabled through the use of the instruction cache enable
control bit, HID0[ICE]. When the instruction cache is in the disabled state, the cache tag
state bits are ignored and all accesses are propagated to the bus as single-beat transactions.
The ICE bit is cleared during a power-on reset, causing the instruction cache to be disabled.
To prevent the cache from being enabled or disabled in the middle of a data access, an
isync
instruction should be issued before changing the value of ICE.
4.2.3.3
Instruction Cache Locking
The contents of instruction cache may be locked through the use of HID0[ILOCK]. A
locked instruction cache supplies instructions normally on a cache hit, but cache misses are
treated as cache-inhibited accesses. The cache-inhibited (core_ci) signal is asserted if a
cache access misses into a locked cache. The setting of the ILOCK bit must be preceded by
an
isync
instruction to prevent the instruction cache from being locked during an
instruction access.
Note that the G2 core also provides instruction cache way-locking in addition to entire
instruction cache locking as described in Section 4.12, “Cache Locking.”
4.3
Data Cache Organization and Control
The LSU transfers data between the data cache and the GPRs and FPRs and provides
buffers for load and store bus operations. The data cache also provides storage for the cache
tags required for memory coherency and performs the cache block replacement LRU
function.
4.3.1
Data Cache Organization
The organization of the data cache is shown in Figure 4-2. Each cache block contains eight
contiguous words from memory that are loaded from an eight-word boundary (that is, bits
A27–A31 of the effective addresses are zero); thus, a cache block never crosses a page
boundary. Misaligned accesses across a page boundary can incur a performance penalty.
Note that bits A20–A26 provide an index to select a set. Bits A27–A31 select a byte within
a block. The tags consists of bits PA0–PA19. Address translation occurs in parallel, such
that higher-order bits (the tag bits in the cache) are physical. Note that the replacement
algorithm is strictly an LRU algorithm; that is, the least-recently used block is filled with
new data on a cache miss.
F
Freescale Semiconductor, Inc.
n
.