1. Field of the Invention
The present invention relates to a flash memory device with an ECC (error correcting code) unit, and more particularly to a flash memory device with a rectifiable redundancy generated by the ECC unit.
2. Description of the Related Art
Compared with other storage materials, flash memory has several advantages, such as anti-shock, nonvolatile, and high density. Flash memory is very widely applied to flash memory devices, such as thumb drives, solid state drives (SSD), compact flash cards (CF), secure digital cards (SD), and multi media cards (MMC).
Basically, flash memory can be categorized to two types, SLC (single level cell) flash memory and MLC (multi level cell) flash memory. In SLC flash memory, each one memory cell can store only one bit of data; but in MLC flash memory, each one memory cell can store more than one bit of data.
The characteristics of SLC flash memory can be listed as: (I) Each page in SLC flash memory is multi-write and data can be written to any page in SLC flash memory. (II) The reliability and maintainability of SLC flash memory is relative high, so as a relative complicate ECC is not needed. (III) The life time of SLC flash memory is relative long and each memory cell can be written about 100 thousands times. (IV) The block erasing time and the page programming time of SLC flash memory is relative short. (V) The price of SLC flash memory is relative high.
The characteristics of the MLC flash memory can be listed as: (I) Each page in MLC flash memory is single-write and data must be written to pages sequentially from low page number to high page number. (II) The reliability and maintainability of MLC flash memory is relative low, so as a relative complicate ECC is needed. (III) The life time of MLC flash memory is relative short and each memory cell can only be written about five thousands times. (IV) The block erasing time and the page programming time of MLC flash memory is relative long. (V) The price of MLC flash memory is relative low but the density of MLC flash memory is relative high.
Because the price of MLC flash memory is much lower than that of SLC flash memory, most flash memory devices in market adopt the MLC flash memories. As mentioned above, each memory cell in MLC flash memories can only be written about five thousands times. Once a portion of memory cells is written and erased too many times and data errors in the portion is then occurred. That is to say, the portion of the memory cells (or the whole block) is determined to be damaged (or bad) memory cells. Therefore some mechanisms, for enhancing the reliability and maintainability (or life time) of MLC flash memories, are developed. The followings are three well-known mechanisms can be adopted to enhance the reliability and maintainability of MLC flash memories.
(I) Bad block management: data will not be store in a block which is damaged and labeled to a bad block, so as the risk of occurring data error is reduced.
(II) Wear leveling: data is evenly assigned to blocks in the MLC flash memory, so as every block in the MLC flash memory has an even life time.
(III) ECC: data errors, generated by the damaged blocks, can be corrected by the ECC, so as the reliability and maintainability of MLC flash memory is enhanced.
When data is ready to be written to the flash memory 16 from the host 30, a redundancy is first generated by the ECC unit 14 based on the data. The redundancy is used to correct the data errors and enable reconstruction of the original data. After the redundancy is generated, a write command is issued to the flash memory 16 from the control circuit 12 and then both the data and the redundancy are together written to the flash memory 16 via the internal bus 18.
As mentioned above, the reliability and maintainability of the flash memory 16 can be enhanced by the redundancy generated by the ECC unit 14. That is, even data errors are occurred in the data 42 due to the flash memory 16 is damaged, the data 42 with data errors can be corrected by the redundancy 44, so as the reliability and maintainability (or life time) of the flash memory 16 is extended. However, the redundancy 44 has a fixed data length and once the data errors are beyond the ability the redundancy 44 can deal with, the reliability and maintainability (or life time) of the flash memory 16 cannot be maintained anymore.
Therefore, the present invention relates to a flash memory device with a rectifiable redundancy capable of prolonging reliability and maintainability (or life time) of the flash memory.
The present invention provides a flash memory device connected to a host comprising: a flash memory; and a control circuit comprising a first error correcting code unit and a second error correcting code unit. The data length of a redundancy generated by the second error correcting code unit is longer than the data length of a redundancy generated by the first error correcting code unit. The first error correcting code unit is adopted to process with a data transmitted to the flash memory from the host when a damage risk of the flash memory is lower than a specific value; and the second error correcting code unit is adopted to process with the data transmitted to the flash memory from the host when the damage risk of the flash memory is higher than the specific value.
The present invention provides a control method of a flash memory device with an error correcting code mechanism, comprising steps of: adopting a first error correcting code unit to process with a data transmitted to the flash memory device if a damage risk of a flash memory in the flash memory device is lower than a specific value; and adopting a second error correcting code unit to process with the data if the damage risk of the flash memory is higher than the specific value; wherein the data length of a redundancy generated by the second error correcting code unit is longer than the data length of a redundancy generated by the first error correcting code unit.
The above objects and advantages of the present invention will become more readily apparent to those ordinarily skilled in the art after reviewing the following detailed description and accompanying drawings, in which:
As depicted in
According to the embodiment of the present invention, a signal (not shown), for informing the ECC unit 54 to employ the first ECC unit, is issued to the ECC unit 54 from the control circuit 52 if the damage risk of the flash memory 56 is determined to be lower than a specific value. The first ECC unit is adopted to process with the data transmitted to the flash memory device 50.
With the number of bad blocks (or the number of the wear leveling) of the flash memory 56 getting higher under a constant operation, the damage risk of the flash memory 56 is getting higher. Once the damage risk of the flash memory 56 is determined to be higher than the specific value, a signal, for informing the ECC unit 54 to employ the second ECC unit, is issued to the ECC unit 54 from the control circuit 52. The second ECC unit is adopted to process with the data transmitted to the flash memory device 50.
According to another embodiment of the present invention, a signal (not shown), for informing the ECC unit 54 to employ the first ECC unit, is issued to the ECC unit 54 from the control circuit 52 if the damage risk of the flash memory 56 is determined to be lower than a specific value. The first ECC unit is adopted to process with the data transmitted to the flash memory device 50.
With the number of bad blocks (or the number of the wear leveling) of the flash memory 56 getting higher under a constant operation, the damage risk of the flash memory 56 is getting higher. Once the damage risk of the flash memory 56 is determined to be higher than the specific value, a signal, for informing the ECC unit 54 to additionally employ the second ECC unit, is issued to the ECC unit 54 from the control circuit 52. The second ECC unit is also adopted to process with the data transmitted to the flash memory device 50.
The length of the redundancy generated by the first ECC unit is less than that of the redundancy generated by the second ECC unit. The errors of data block 100 comprising the redundancies can be corrected by first ECC unit and/or second ECC unit. Therefore, the reliability and maintainability (or life time) of the flash memory 56 is enhanced by combining the redundancies generated by first and second ECC units.
In the embodiments of
To sum up, if a damage risk of a flash memory is lower than a specific value when a count number of damaged blocks (or, a count number of wear leveling) in the flash memory is lower than a specific value, a first ECC unit with a shorter redundancy is adopted to process with the data transmitted to the flash memory device. However, once the damage risk of the flash memory is higher than a specific value under a constant operation and the first ECC unit with a shorter redundancy may fail to correct the data errors, a second ECC unit with a longer redundancy is adopted to process with the data transmitted to the flash memory device, so as the reliability and maintainability of the flash memory is enhanced and the life time of the flash memory is extended.
Moreover, it is to be understood that the present invention needs not be limited to the MLC flash memory. The present invention can be also applied to other types of flash memory, such as SLC flash memory.
Moreover, it is to be understood that the present invention needs not be limited to adopt the BCH code. Other types of ECC, such as Hamming code, Reed-Solomon code or other linear block codes, can be adopted in the present invention. Or, the first ECC unit and the second ECC unit can use the same encoding code but with different encoding length.
Moreover, it is to be understood that the damage risk needs not be limited to determine by the count number of damaged blocks or the count number of the wear leveling in the flash memory. Other determining mechanisms can be adopted in the present invention.
While the invention has been described in terms of what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention needs not be limited to the disclosed embodiment. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims which are to be accorded with the broadest interpretation so as to encompass all such modifications and similar structures.
Number | Date | Country | Kind |
---|---|---|---|
200910137993.6 | May 2009 | CN | national |
This is a continuation-in-part application of U.S. application Ser. No. 12/761,526, filed Apr. 16, 2010, the contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 12761526 | Apr 2010 | US |
Child | 13658972 | US |