
MOTOROLA
Chapter 4. Instruction and Data Cache Operation
For More Information On This Product,
Go to: www.freescale.com
4-1
Chapter 4
Instruction and Data Cache Operation
The G2 core provides two 16-Kbyte, four-way set-associative caches to allow the registers
and execution units rapid access to instructions and data. Both the instruction and data
caches are tightly coupled to the G2 core bus interface unit (BIU) to allow efficient access
to the system memory controller and other bus masters. The G2 core load/store unit (LSU)
is also directly coupled to the data cache to allow the efficient movement of data to and
from the general-purpose and floating-point registers.
This chapter describes the organization of the cache, cache coherency protocols, cache
control instructions, and various cache operations. It describes the interaction between the
caches, the load/store unit, the instruction unit, and the memory subsystem. It also describes
the cache way-locking features provided in the G2 core.
Note that in this chapter, the term multiprocessor is used in the context of maintaining cache
coherency. These multiprocessor devices could be actual processors or other devices that
can access system memory, maintain their own caches, and function as bus masters
requiring cache coherency.
4.1
Overview
Both the instruction and data caches have 32-byte blocks, and data cache blocks can be
snooped or cast out when the cache block is reloaded. The data cache is designed to adhere
to a write-back policy, but the G2 core allows control of cacheability, write-back policy, and
memory coherency at the page and block level. Both caches use a least recently used (LRU)
replacement policy. Burst fill operations to the caches result from cache misses, or in the
case of the data cache, cache block write-back operations to memory. Note that in the
PowerPC architecture, the term ‘cache block,’ or simply ‘block’ when used in the context
of cache implementations, refers to the unit of memory at which coherency is maintained.
For the G2 core, the block size is equivalent to the eight-word cache line. This value may
be different for other implementations that support the PowerPC architecture.
The data cache is configured as 128 sets of 4 blocks. Each block consists of 32 bytes, 2 state
bits, and an address tag. The two state bits implement the three-state MEI (modified/
exclusive/invalid) protocol, a coherent subset of the standard four-state MESI protocol.
Cache coherency is enforced by on-chip bus snooping logic. Since the G2 core data cache
F
Freescale Semiconductor, Inc.
n
.