3-64
MPC7400 RISC Microprocessor Users Manual
L2 Cache Interface
¥
A
dcbf
instruction is issued to the L2 cache after being processed by the L1 data
cache. If a
dcbf
hits in the L2 cache, it invalidates the block. If the
dcbf
requires a
cache block push from the L1 data cache, the push is forwarded to the system
interface. If the
dcbf
does not require a cache block push from the L1 data cache,
and hits on a block marked modiTed in the L2 cache, the L2 pushes the data to the
system interface. In either case, if the cache block existed in the L2, it is marked
invalid. If the
dcbf
is marked global, it is forwarded to the system interface.
¥
A
dcbst
instruction is issued to the L2 cache after being processed by the L1 data
cache. If the
dcbst
requires a cache block push in the L1 data cache, this data is
written to the L2, the cache block is marked exclusive, and the push is forwarded to
the system interface. If the
dcbst
does not require a cache block push from the L1
data cache, and the cache block is modiTed in the L2 cache, the L2 pushes the data
to the system interface and marks the cache block exclusive. If the
dcbst
misses in
the L2 cache and is marked global, it is forwarded to the system interface.
¥
A
dcbi
instruction is always issued to the L2 cache, and causes the cache block to
be invalidated in the L2 in case of a hit. A
dcbi
instruction is also issued to the system
interface if they are marked global.
¥
The
icbi
instruction never affects the L2 cache. All
icbi
instructions are passed to the
system interface.
¥
sync
,
eieio
,
eciwx
,
ecowx
,
tlbi
, and
tlbsync
instructions bypass the L2 cache, and
are forwarded to the system interface for further processing.
3.7.5.1 L2 Cache Allocation on Cache Misses
The L2 cache is a victim cache for the L1 data cache. The L2 cache allocates new entries
for data accesses only when blocks are cast out of the L1 data cache. When a block is
queued up as a data cache castout and the L2 cache is enabled, the L2 cache allocates a new
tag for the castout in the L2 cache if it misses and the C bit is set. If the C bit is cleared and
the block misses in the L2 cache, the L2 cache does not allocate a tag. Instead, it passes the
castout to the system interface if the cache block is marked modiTed. If the data cache
castout hits in the L2 cache, the castout data is written to the L2 cache regardless of the state
of the C bit.
If the L2 cache is disabled, then the block replaced from the L1 data cache is cast out to the
system interface if the cache block is marked modiTed.
3.7.5.2 L2 Cache Replacement Selection
L2 cache victims are selected based on the FIFO replacement bit (F-bit) in the cache tags.
When an L1 data cache castout or L1 instruction cache reload allocates a new tag in the L2
cache, the F bit is updated to point to the other cache way. L2 cache victim selection is
performed at reload time, not at demand-miss time.