Claims
- 1. A method of correcting an error in information stored in a cache memory of a data processing system, comprising the steps of:
detecting a correctable error in data read from a location of the cache memory; correcting the correctable error in the data; inverting the corrected data as it is written back to the location of the cache memory; and setting an inversion bit to indicate that the data as currently stored at the location is inverted.
- 2. The method of claim 1, further comprising the step of reading the inverted, corrected data from the location of the cache memory using the polarity of the data as indicated by the inversion bit.
- 3. The method of claim 1 wherein said detecting step includes the step of applying the data to an error correction code (ECC) matrix to yield an error detection syndrome.
- 4. The method of claim 3 wherein said correcting step includes the step of resolving the error detection syndrome to indicate a single-bit error at a particular data bit.
- 5. The method of claim 3 wherein the data has a number of bits N and the ECC matrix has a plurality of rows and columns wherein a given column corresponds to a respective one of the data bits, and further comprising the step of selectively setting bits in the ECC matrix along each column and each row such that encoding for the ECC matrix allows N-bit error correction and (N−1)-bit error detection.
- 6. The method of claim 5 wherein the inversion bit is part of the data and one of the columns in the ECC matrix corresponds to the inversion bit, and further comprising the step of setting each bit in the column of the ECC matrix which corresponds to the inversion bit.
- 7. The method of claim 5 further comprising the step of selectively setting the bits in the ECC matrix such that an odd number of bits are set in each row thereof.
- 8. A cache memory for a data processing system, comprising:
an array of data values; an error checker which detects an error in data read from a location in said array; a decoder which corrects the error in the data and inverts corrected data as it is written back to said location of said array; and means for indicating that the data as currently stored at said location is inverted.
- 9. The cache memory of claim 8 wherein:
said array of data values is a cache directory; and the data includes an address tag.
- 10. The cache memory of claim 8 wherein said indicating means includes an inversion bit which provides a relative polarity of the stored data.
- 11. The cache memory of claim 10 wherein the error checker includes an error correction code (ECC) matrix.
- 12. The cache memory of claim 11 wherein:
the data has a number of bits N; and said ECC matrix has a plurality of rows and columns wherein a given column corresponds to a respective one of the data bits, selected bits being set in said ECC matrix along each column and each row such that encoding for said ECC matrix allows N-bit error correction and (N−1)−bit error detection.
- 13. The cache memory of claim 12 wherein:
said inversion bit is part of the data; and one of said columns in said ECC matrix corresponds to said inversion bit, each bit in said one column being set.
- 14. The cache memory of claim 12 wherein an odd number of bits are set in each row of said ECC matrix.
- 15. A computer system comprising:
at least one processing unit; a main memory device; and a cache memory connected to said processing unit and said main memory device,
wherein said cache memory handles an error in data read therefrom by correcting the error, inverting corrected data as it is written back to an array in said cache memory, and providing an indication that the data as currently stored in said array is inverted.
- 16. The computer system of claim 15 wherein:
said array is a cache directory; and the data includes an address tag.
- 17. The computer system of claim 15 wherein said cache memory sets an inversion bit which provides a relative polarity of the stored data.
- 18. The computer system of claim 15 wherein said cache memory includes:
an error checker which detects an error in the data; and a decoder which corrects the error in the data.
- 19. The computer system of claim 18 wherein:
said error checker detects the error in the data using an error correction code (ECC) matrix which yields an error detection syndrome; and said decoder corrects the error by resolving the error detection syndrome.
- 20. The computer system of claim 19 wherein:
the data has a number of bits N; and said ECC matrix has a plurality of rows and columns wherein a given column corresponds to a respective one of the data bits, selected bits being set in said ECC matrix along each column and each row such that encoding for said ECC matrix allows N-bit error correction and (N−1)−bit error detection.
- 21. The computer system of claim 20 wherein an odd number of bits are set in each row of said ECC matrix.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] The present application is related to copending U.S. Patent Application No. 10/______ entitled “APPLICATION OF SPECIAL ECC MATRIX FOR SOLVING STUCK BIT FAULTS IN AN ECC PROTECTED MECHANISM” filed contemporaneously herewith on or about Apr. 8, 2003, attorney docket number AUS920030120US1.