![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_170.png)
Data Cache
MOTOROLA
MPC801 USER’S MANUAL
10-7
10
10.3.3.4 DATA CACHE DATA REGISTER
When reading from the data cache data (DC_DAT) register, the 21 bits of the tag and related
information that is selected by the DC_ADR are placed in the targeted general-purpose
register. The following table illustrates the DC_DAT register’s bit layout when reading a tag.
Writing to DC_DAT is illegal. A write to DC_DAT results in an undefined data cache state.
10.4 OPERATING THE DATA CACHE
The data cache is a three-state design. Two bits are included in each cache line to maintain
the line’s state information. The status bits keep track of whether or not the line is valid or if
it has been modified relative to memory. These states are invalid, modified-valid, and
unmodified-valid.
10.4.1 Data Cache Read
The cache read operation consists of the following items:
Read Hit—On a cache hit, the requested word is immediately transferred to the
load/store unit and the LRU state of the set is updated. No state transition occurs and
the access time is 1 clock.
Read Miss—A line in the cache is selected to hold the data that will be fetched from
memory. The selection algorithm gives first priority to invalid lines and if both lines are
invalid, way “zero” line is selected first. If neither of the two candidate lines in the
selected set is invalid, then one of the lines is selected by the LRU algorithm for
replacement. If the selected line is valid-modified (dirty), then it is kept in a special buffer
to be written out (flushed) to memory or a later time.
Subsequently, the address of the missed entry is sent to the system interface unit with
a request to retrieve the cache line. The system interface unit arbitrates for the bus and
initiates a 4-word burst transfer read request. The transfer begins with the aligned word
containing the missed data, followed by the remaining word in the line, then by the word
at the beginning of the line (wraparound). As the missed word is received from the bus,
it is delivered (forwarded) directly to the load/store unit. When the line has been fully
received, it is written into the cache. The data cache supports further requests as long
as they hit in the cache immediately after the arrival of the critical word.
After the line with the requested data has been brought from memory, the dirty line kept
in the buffer is sent to the system interface unit to be written out (flushed) to memory. If
a bus error is detected during the fetch of the missed “critical word”, a machine check
interrupt is generated. If a bus error occurs on any other word in the line transfer, the
line is marked invalid.
Table 10-2. DC_DAT Bit Layout For Reading a Tag
0-22
23
24
25
26
27-31
Tag Value
0 - Not Locked
1 - Locked
LRU Bit of this Set
0 - Clean
1 - Dirty
0 - Not Valid
1 - Valid
Reserved