Intel
®
81341 and 81342 I/O Processors
December 2007
Developer’s Manual
Order Number: 315037-002US
615
DDR SDRAM Memory Controller—Intel
®
81341 and 81342
7.3.4.4
Scrubbing
Fixing the data error in memory is called scrubbing. The 81341 and 81342 relies on
Intel XScale
®
microarchitecture software to perform the scrubbing. When the DMCU
detects an error during a read, the DMCU logs the address where the error occurred
and interrupts the core. The core decides how to fix the error through an interrupt
handler. Software could decide to perform the scrubbing on:
• the data location that failed
• the entire row of the data that failed
• the entire memory
For single-bit errors reported on a write transaction scrubbing is not required, since the
DMCU scrubs data during RMW operation. For single-bit errors, the error is fixed by
reading the failed location and writing back the data after the ECC hardware fixed it.
The scrubbing routine should read either DWORD of the 64-bit memory space (QWORD
aligned location) using a
ld
instruction and write the data back with a
st
instruction.
Software should isolate activity on the memory location to insure animosity.
Note:
When scrubbing reads the failed location to fix the single-bit error, a second error is
reported. Therefore, software disables single-bit ECC reporting (ECCR[0]) during
routine scrubbing. Also, the scrubbing routine maintains partial writes automatically
scrub the QWORD aligned location, when it contains a single-bit ECC error.
Multi-bit errors cannot be fixed by the H-Matrix.
7.3.4.4.1 DDR ECC Example Using H-Matrix
When the core writes 1234 5678 9ABC DEF0H to SDRAM memory. The North Internal
bus port decoder decodes the address and determines the write being sent to NIBPTQ.
NIBPTQ latches the transaction with data 1234 5678 9ABC DEF0H on
AD[63:0]
.
During the next NIBPTQ tenure, this transaction is processes and the DDR SDRAM
Control Block receives the data and must calculate the ECC code.
, the DDR SDRAM Control Block creates each check bit by
XORing the appropriate bits in the row. Using 1234 5678 9ABC DEF0H, the ECC code
generated is D2H. This code is written with the data to the SDRAM devices on
CB[7:0]
.
Assuming bit 17 was corrupted in the array, it has then been inverted from 0 to 1.
At some later point in time, the core wishes to read from the same address. The core
issues a read transaction which is latched by the NIBPTQ after the North Internal Bus
Address Decoder decodes the address and determines the read targets the DDR
SDRAM address space. Upon the receipt of 1234
5
678 9AB
E
DEF0H on
DQ[63:0]
, the
DDR SDRAM Control Block calculates the syndrome with the G-Matrix in
DDR SDRAM Control Block calculates a syndrome of 52H.
Note:
During a memory write, ECC code is created by XORing the appropriate data bits
indicated by the G-Matrix. The syndrome is created during a memory read by XORing
the 8-bit value generated by XORing appropriate data bits (
DQ[63:0]
) indicated by the
G-Matrix with the check bits (
CB[7:0]
)
.
In
, when the syndrome is non-zero and matches an H-Matrix value, there is a
fixable single-bit error. A syndrome of 52H matches an H-Matrix value (
) which
indicates bit 17 has an error. The DDR SDRAM Control Block inverts bit 17 prior to
returning corrected data on
AD[63:0]
. DMCU returns 1234 5678 9ABC DEF0H on
AD[63:0]
.
Assuming this was the first error, the DMCU records the address where the error occurred
in ECAR0 and error type in ELOG0. When error reporting is enabled in the ECCR, the DMCU
writes a 1 to DMCISR[0] which generates an interrupt to the core. A software interrupt
handler scrubs the array and fixes error in bit 17. Unless more errors occur, future reads
from this location do not result in an error.