
4-8
Caches
Copyright 2000–2001 by LSI Logic Corporation. All rights reserved.
causes the cache line to be updated. But the cache line is not marked
as dirty, because the data store is also written to external memory
(through the write buffer). This action keeps external memory consistent
with the cache. In both WB and WT modes, a store that misses in the
cache is sent to the write buffer. When a line fetch causes a cache line
to be evicted from the D-cache, the dirty bit for each half of the line is
read, and, if the half line contains valid and dirty data, it is written back
to the write buffer before the line fill replaces it.
4.3.2.1 Cd Bit - Cache Loads and Stores
The Cd bit determines whether data being read must be placed in the
D-cache and used for subsequent reads. Typically, main memory is
marked as cacheable to reduce memory access time and therefore
increase system performance. It is usual to mark input/output space as
noncacheable. For example, if a processor is polling a memory-mapped
register in input/output space, it is important that the processor is forced
to read data direct from the peripheral, and not a copy of initial data held
in the D-cache.
If the cache hits on a load, data is returned to the cache if the Cd bit
is 1. If the cache read misses, the Cd bit is examined.
Table 4.2
shows
the function of the Cd bit.
Stores that hit in the cache update the cache line if the Cd bit is 1. Stores
that miss the cache use the Cd and Bd bits to determine whether the
write is buffered. A write miss is not loaded into the cache as a result of
that miss.
Table 4.2
Cd Bit Function
Cd Bit Value
Function
1
Cacheable data area and protection unit enabled. A line fill of
eight words is performed, and the data is written into a
randomly chosen segment of the D-cache.
0
A single or multiple external access is performed and the
cache is not updated.