Claims
- 1. A system to detect and correct errors in a flash memory, comprising:
an error detection circuit coupled to the flash memory, the error detecting circuit determining if an error occurs in accessing data from a physical block number (PBN) from the flash memory; and an error correction cache coupled to the error detection circuit, the cache storing one or more PBN entries and error correction information for corresponding PBN entries.
- 2. The system of claim 1, wherein upon detecting an error, error correction information from a corresponding PBN entry is applied to correct the error.
- 3. The system of claim 1, wherein the error detection circuit generates a syndrome and the error correction information stores a previously determined syndrome.
- 4. The system of claim 3, wherein the syndrome from the error detection circuit is compared with the previously determined syndrome and if the syndromes match, the error is corrected using the previously determined syndrome and otherwise the error correction information is updated with the syndrome generated by the error detection circuit.
- 5. The system of claim 1, wherein the error detecting circuit further comprises at least three error detection circuits corresponding to three selectable error detection modes, the error detection circuits being adapted to detect an error based on a selected mode of error detection and correction.
- 6. The system of claim 1, wherein the flash memory comprises an extra storage area and wherein the three modes of error detection and correction further comprises a first mode to correct one error, a second mode to correct two errors including errors in the extra storage area, and a third mode to correct three errors including errors in the extra storage area.
- 7. The system of claim 1, wherein the first mode protects against any one symbol error.
- 8. The system of claim 1, wherein the second mode protects against any two symbol errors, including those in the extra storage area.
- 9. The system of claim 1, wherein the third mode protects against any three symbol errors, including those in the extra storage area.
- 10. The system of claim 1, wherein the first mode comprises a Smart Media compatible mode, the second mode further comprises a Reed-Solomon 52 (RS-52) mode, and the third mode further comprises an RS-73 mode.
- 11. A method to detect and correct errors in a flash memory using an error correction cache that provides error correction information, the method comprising:
accessing data from a physical block number (PBN) of the flash memory; and if a data error occurred, applying error correction information stored in the cache corresponding to the accessed PBN to correct the data error.
- 12. The method of claim 11, further comprising:
detecting in hardware an error based on one of three selectable mode of error detection and correction; and correcting the error by executing error correction software corresponding to the selected mode of error detection and correction.
- 13. The method of claim 11, wherein the flash memory comprises an extra storage area and wherein the three modes of error detection and correction further comprises a first mode to correct one error, a second mode to correct two errors including errors in the extra storage area, and a third mode to correct three errors including errors in the extra storage area.
- 14. The method of claim 13, wherein the first mode protects against any one symbol error, the second mode protects against any two symbol errors, including those in the extra storage area, and the third mode protects against any three symbol errors, including those in the extra storage area.
- 15. The method of claim 13, wherein the first mode comprises a Smart Media compatible mode, the second mode further comprises a Reed-Solomon 52 (RS-52) mode, and the third mode further comprises an RS-73 mode.
- 16. The method of claim 11, further comprising upon detecting an error, applying error correction information from a corresponding PBN entry to correct the error.
- 17. The method of claim 11, further comprising generating a syndrome for the data from the accessed PBN.
- 18. The method of claim 17, wherein the cache error correction information stores a previously determined syndrome, further comprising comparing the generated syndrome the previously determined syndrome and if the syndromes match, correcting the error using the previously determined syndrome and otherwise updating the error correction information with the generated syndrome.
- 19. A system to detect and correct errors in a flash memory, comprising:
a processor coupled to the flash memory, the processor adapted to access data from a physical block number (PBN) from the flash memory; an error detection circuit coupled to the flash memory and the processor, the error detecting circuit notifying the processor if an error occurs in the accessed PBN; and an error correction cache coupled to the processor, the cache storing one or more PBN entries and error correction information for corresponding PBN entries.
- 20. The system of claim 19, wherein upon detecting an error, the processor checks the cache for a matching PBN entry and if so, applies the error correction information from the matching PBN entry to correct the error.
CROSS REFERENCE TO OTHER APPLICATIONS
[0001] This application is related to co-pending, commonly owned application Ser. No. No. __/______ entitled “ERROR CORRECTION FOR FLASH MEMORY,” filed concurrently herewith, the content of which is incorporated-by-reference.