
D-Cache
Copyright 2000–2001 by LSI Logic Corporation. All rights reserved.
4-7
4.3 D-Cache
The ARM946E-S has a direct mapped, 2-way, or 4-way set-associative
D-cache. You can choose the size of the D-cache from any of the
supported cache sizes. The D-cache uses the physical address
generated by the processor core. It uses an
allocate on read-miss
policy,
and is always reloaded one cache line (eight words) at a time, through
the external memory interface.
The Cacheable data (Cd) and Bufferable data (Bd) bits, which reside in
the Protection Unit, control the behavior of the D-cache. For this reason,
the Protection Unit must be enabled when the D-cache is enabled.
4.3.1 Enabling and Disabling the D-Cache
You can enable the D-cache by setting bit 2 of the CP15 control register.
The cache is only enabled if the Protection Unit is already enabled, or is
enabled simultaneously.
You can enable the D-cache and Protection Unit simultaneously with a
single write to the CP15 control register, although you must program at
least one protection region before you enable the protection unit.
To disable the D-cache, clear bit 2 of the CP15 control register.
The D-cache is automatically disabled and flushed on reset.
When the D-cache is disabled, cache searches are prevented. This
marks all data accesses as noncacheable, forcing the ARM946E-S to
perform external accesses. The write buffer control is still decoded from
the Bd and Cd bits. The Cd bit is forced to 0 (noncacheable).
4.3.2 D-Cache Operation
When the D-cache is enabled, it is searched when the processor
performs a load or store.
The D-cache supports both
write back
(WB) and
write through
(WT)
modes. For data stores that hit in the D-cache in WB mode, the cache
line is updated and the dirty bit is set for the associated cache half line.
Setting the dirty bit indicates that the cache version of the data differs
from external memory. In WT mode, a store that hits in the D-cache