Data Cache Controller - IBM PPC440X5 CPU Core User Manual

Cpu core
Table of Contents

Advertisement

Preliminary
There are 10 parity bits stored in the RAM cells of each instruction cache line. Two of those bits hold the
parity for the tag information, and the remaining 8 bits hold the parity for each of the 8 32-bit instruction words
in the line. (There are two parity bits for the tag data because the parity is calculated for alternating bits of the
tag field, to guard against a single particle strike event that upsets two adjacent bits. The instruction data bits
are physically interleaved in such a way as to allow the use of a single parity bit per instruction word.) The
parity bits are calculated and stored as the line is filled into the cache. Usually parity is calculated as the even
parity for each set of bits to be protected, which the checking hardware expects. However, if any of the the
CCR1[ICTPEI] bits are set, the calculated parity for the corresponding bits of the tag are inverted and stored
as odd parity. Similarly, if any of the CCR1[ICDPEI] bits are set, the parity for the corresponding instruction
word is set to odd parity. Then, when the instructions stored with odd parity are fetched, they will cause a
Parity exception type Machine Check interrupt and exercise the interrupt handling software. The following
pseudo-code is an example of how to use the CCR1[ICDPEI] field to simulate a parity error on word 0 of a
target cache line:
; make sure all this code in the cache before execution
icbi <target line address>
msync
mtspr CCR1, 0x80000000
isync
icbt <target line address>
msync
mtspr CCR1, 0x0
isync
br <word 0 of target line>
Note that any instruction lines filled while bits are set in the CCR1[ICDPEI] or CCR1[ICTPEI] field will be
affected, so users must code carefully to affect only the intended addresses.
The CCR1[FCOM] (Force Cache Operation Miss) bit enables the simulation of a multi-hit parity error. When
set, it will cause an icbt to appear to be a miss, initiating a line fill, even if the line is really already in the
cache. Thus, this bit allows the same line to be filled to the cache multiple times, which will generate a multi-
hit parity error when an attempt is made to fetch an instruction from those cache lines. The following pseudo-
code is an example of how to use the CCR1[FCOM] field to simulate a multi-hit parity error in the instruction
cache:
; make sure all this code is cached and the "target line" is also
; in the cache before execution (use icbt as necessary)
mtspr CCR1, 0x00010000
isync
icbt <target line address>
msync
mtspr CCR1, 0x0
isync
br <word 0 of target line>

4.3 Data Cache Controller

The data cache controller (DCC) handles the execution of the storage access instructions, moving data
between memory, the data cache, and the PPC440x5 core GPR file. The DCC interfaces to the PLB using
two independent 128-bit interfaces, one for read operations and one for writes. Both of these PLB interfaces
cache.fm.
September 12, 2002
; get the target line out of the cache
; wait for the icbi
; Set CCR1[ICDPEI
]
0
; wait for the CCR1 context to update
; this line fills and sets odd parity for word 0
; wait for the fill to finish
; Reset CCR1[ICDPEI
]
0
; wait for the CCR1 context to update
; fetching the target of the branch causes interrupt
; Set CCR1[FCOM]
; wait for the CCR1 context to update
; this line fills a second copy of the target line
; wait for the fill to finish
; Reset CCR1[FCOM]
; wait for the CCR1 context to update
; fetching the target of the branch causes interrupt
User's Manual
PPC440x5 CPU Core
Page 115 of 589

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents