MEMORY APPARATUS AND DATA READING METHOD THEREOF
A memory apparatus and a data reading method thereof are provided. In the method, a plurality of memory cells of the memory apparatus are read to obtain read data, in which a threshold voltage of each memory cell is sensed and respectively compared with a first reference voltage and a second reference voltage to determine bit values. The first reference voltage and the second reference voltage are used to distinguish different states of the memory cell and the second reference voltage is larger than the first reference voltage. The bit values of the memory cells having the threshold voltage between the first reference voltage and the second reference voltage in the read data are gradually changed and syndromes of the changed read data are calculated. The read data is corrected according to values of the syndromes.
Latest Winbond Electronics Corp. Patents:
The invention relates to a memory apparatus and an operating method thereof, and in particular, to a memory apparatus and a data reading method thereof.
2. Description of Related ArtBecause memory apparatuses such as a flash memory and a Dynamic Random Access Memory (DRAM) are becoming more integrated year on year, component sizes are decreasing continuously, resulting in a higher bit error rate of a memory cell. Conventionally, a redundant memory may be used to remedy a memory cell having defects, or an error checking correction (ECC) circuit may be used to correct soft errors caused by the defects.
However, based on a reliability factor, after the memory apparatus is read or written for thousands or tens of thousands of times, a phenomenon of threshold voltage shift may occur on many memory cells. Referring to
Referring to
Referring to
However, if a double bit error occurs in the read data (for example in the last row in
A memory apparatus and a reading method thereof are provided in the invention, which can improve a correction limitation of the ECC algorithm.
The invention provides a data reading method, suitable for reading data of a memory, including: reading a plurality of memory cells in the memory to obtain read data, in which a threshold voltage of each memory cell is sensed, and the sensed threshold voltage is respectively compared with a first reference voltage and a second reference voltage to determine bit values, where the first reference voltage and the second reference voltage are used to distinguish different states of the memory cell and the second reference voltage is larger than the first reference voltage; gradually changing bit values of the memory cells having the threshold voltage between the first reference voltage and the second reference voltage in the read data to calculate syndromes of the changed read data; and correcting the read data according to values of the syndromes.
The invention provides a memory apparatus, including a memory and a processor. The memory includes a plurality of memory cells. The processor is coupled to the memory cells in the memory, and is configured to read the memory cells to obtain read data, including sensing a threshold voltage of each memory cell, and comparing the sensed threshold voltage respectively with a first reference voltage and a second reference voltage to determine bit values, where the first reference voltage and the second reference voltage are used to distinguish different states of the memory cell and the second reference voltage is larger than the first reference voltage. Then, the processor is configured to gradually change bit values of the memory cells having the threshold voltage between the first reference voltage and the second reference voltage in the read data to calculate syndromes of the changed read data, and correct the read data according to values of the syndromes.
Based on the foregoing, in the memory apparatus and the data reading method thereof of the invention, memory cells in which errors may occur are found out by using a dual sensing technology, and reverse error checking correction may be performed on memory cells to find out the memory cells in which errors occur and correct bit values, and the correct bit values are used to correct the read data. Therefore, the correction limitation of the ECC algorithm can be improved.
In the conventional ECC algorithm, each bit in read data is treated equally (that is, each bit is regarded as a possible error bit). However, in embodiments of the invention, it is presumed that not all bits have the same possibility of error to internal features of a memory, that is, memory cells having relatively weak features are more likely to cross reference voltages and have state changes in a cycle operation. Accordingly, embodiments of the invention correct corresponding bits of such memory cells. In addition, in the conventional ECC algorithm, a single reference voltage is set to distinguish different states of the memory cells. However, in the embodiments of the invention, two reference voltages are set to distinguish states of the memory cells, and in a sensing process, bits in the read data having sensed threshold voltages between the two reference voltages are set to suspected bits, and a plurality of logical combinations are used to change bit values of the suspected bits gradually to calculate syndromes of changed read data. Therefore, the read data may be corrected according to values of the calculated syndromes, so that the correction limitation of the ECC algorithm is improved.
For example, the memory 322 is composed of a plurality of memory cells arranged in a matrix shape, where the memory cell is a non-volatile memory component such as a NOR or NAND flash memory and an Electrically Erasable Programmable Read-Only Memory (EEPROM) or the like, or a volatile memory component such as a Dynamic Random Access Memory (DRAM) or a Static Random Access Memory (SRAM), which is not limited herein.
For example, the processor 324 is a host interface configured to implement data transmission with the host 310, a memory interface configured to implement data transmission with the memory 322, a Micro-Processing Unit (MPU) configured to control the data transmission, and a Read Only Memory (ROM) or a random access memory (RAM) configured to store operation programs or data, which is not limited herein. For example, the processor 324 controls an overall operation of the memory apparatus 320, including a programming operation, a read operation and an erase operation or the like on the memory cells in the memory 322, which is not limited herein.
In step S410, the processor 324 reads a plurality of memory cells in the memory 322 to obtain read data, including sensing a threshold voltage of each memory cell, and comparing the sensed threshold voltage respectively with a first reference voltage and a second reference voltage to determine bit values. The first reference voltage and the second reference voltage are used to distinguish different states of the memory cell and the second reference voltage is larger than the first reference voltage.
In an embodiment, the first reference voltage and the second reference voltage are determined according to distribution of the threshold voltages of the memory cells of the memory 322. For example, the first reference voltage and the second reference voltage are voltages obtained by respectively adding a preset value (or a preset ratio) to or subtracting a preset value (or a preset ratio) from an original reference voltage used to distinguish different states of the memory cells, where the first reference voltage is less than the original reference voltage and greater than a maximum voltage value of in a low threshold voltage region, and the second reference voltage is larger than the original reference voltage and less than a minimum voltage value in a high threshold voltage region. In other embodiments, the first reference voltage and the second reference voltage may also be two voltage values selected between the maximum voltage value in the low threshold voltage region and the minimum voltage value in the high threshold voltage region according to the distribution of the threshold voltages of the memory cells of the memory 322, which is not limited herein.
In step S411, the processor 324 compares the sensed threshold voltage with the first reference voltage to determine a first bit value of the memory cell.
In step S412, the processor 324 compares the sensed threshold voltage with the second reference voltage to determine a second bit value of the memory cell.
In step S413, the processor 324 judges whether the first bit value of each memory cell is equal to the second bit value of the memory cell. If the first bit value is equal to the second bit value, in step S414, the processor 324 determines that a bit value of the memory cell is the first bit value or the second bit value; on the contrary, if the first bit value is not equal to the second bit value, in step S415, the processor 324 sets the memory cell to a suspected bit.
The suspected bits are the foregoing bits corresponding to the memory cells likely to cross reference voltages and have state changes in a cycle operation. By correcting the bits corresponding to the memory cells, the correction limitation of the ECC algorithm can be improved.
Each memory cell in a memory is sensed respectively by using the reference voltages Ref1 and Ref2, and when a sensed result is larger than the reference voltages, a bit value is set to 0; when a sensed result is less than the reference voltages, the bit value is set to be 1. Accordingly, three results can be obtained: region S1, bit values of the dual sensing result is (1, 1); region S2, bit values of the dual sensing result is (0, 1); region S3, bit values of the dual sensing result is (0, 0).
If the bit values of the dual sensing result is (1, 1), the bit value of the memory cell may be determined as 1; if the bit values of the dual sensing result is (0, 0), the bit value of the memory cell may be determined as 0; and if the bit values of the dual sensing result is (0, 1), the bit value of the memory cell may fall into a dangerous region in which errors may occur, and the memory cell is regarded as the foregoing suspected bit.
Referring back to the process of
Furthermore, the processor 324 calculates new parity bits by using data bits in the changed read data, and compares the new parity bits with parity bits in the changed read data to calculate syndromes of the changed read data. Using the Error Checking Correction (ECC) algorithm that uses hamming codes as an example, for each read data having twelve bits, for example, the processor 324 selects the first eight bits in the changed read data as data bits to calculate new parity bits, and performs an XOR operation on the last four bits (that is, original parity bits) of the changed read data to obtain four syndromes. It should be noted that in other embodiments, the processor 324 may also use ECC algorithms of other types, for example Bose-Chaudhuri-Hocquenghem codes (BCH codes) and Reed-Solomon codes (RS codes) or the like, which is not limited herein.
Lastly, in step S430, the processor 324 corrects the read data according to values of the syndromes. Specifically, in the conventional ECC algorithm, a position of an error bit is determined through calculation with syndromes. However, in this embodiment, a reverse manner (or referred to as a reverse ECC algorithm), a try and error method is used to firstly guess values of the error bit, which are then imported into the ECC algorithm for verification. Therefore, not only the position of the error bit may be determined, but also correct bit values may be determined. That is, this embodiment guesses the bit values of the memory cells gradually for the foregoing memory cells (that is, the suspected bits) in which errors may occur, and the bit values are imported into the ECC algorithm for calculation; if values of the calculated syndromes are not all 0, it indicates that the guessed bit values have errors. In this case, the bit values may be changed again, and the calculation of the ECC algorithm is performed again, until the values of the calculated syndromes are all 0, and at this time, the guessed bit values may be presumed to be correct. In this case, the guessed bit values may be used to replace corresponding bits in the read data, and the correction of the read data is accomplished.
For example,
Four possible logical combinations of the suspected bits D[3] and P[2] in
It may be known from comparison between
Based on the foregoing, in the memory apparatus and the data reading method thereof of the invention, by setting two reference voltages to distinguish states of memory cells, bits in which errors may occur can be found out, and by gradually changing bit values of the bits and verifying with the ECC algorithm, positions of the error bits and the bit values can be determined. Therefore, regardless of the hamming codes, the BCH codes or the RS codes used by the ECC algorithm, the method of the invention can increase the number of correction bits of the algorithm.
The invention is disclosed by the embodiments above, but the invention is not limited by the embodiments. Various modifications and variations can be made by persons skilled in the art without departing from the scope or spirit of the invention. Therefore, the protection scope of the invention shall be subject to the appended claims.
Claims
1. A data reading method, suitable for reading data of a memory, comprising:
- reading a plurality of memory cells in the memory to obtain bit values of read data, wherein a threshold voltage of each of the memory cells is sensed and the sensed threshold voltage is respectively compared with a first reference voltage and a second reference voltage to determine the bit values, wherein the first reference voltage and the second reference voltage are used to distinguish different states of the memory cell and the second reference voltage is larger than the first reference voltage;
- determining a suspect bit value, among the bit values of the read data, that is obtained from a memory cell having the threshold voltage between the first reference voltage and the second reference voltage;
- gradually changing the suspect bit value in the bit values of the read data to generate changed read data;
- calculating syndromes of the changed read data; and
- correcting the read data according to values of the syndromes, wherein correcting the read data according to values of the syndromes comprises: judging whether the values of the calculated syndromes are all zero; and correcting the read data by using corresponding bit values of the changed memory cells in the changed read data when the values of the syndromes are all zero.
2. The method according to claim 1, wherein the step of respectively comparing the sensed threshold voltage with a first reference voltage and a second reference voltage to determine bit values comprises:
- comparing the sensed threshold voltage with the first reference voltage to determine a first bit value of the memory cell;
- comparing the sensed threshold voltage with the second reference voltage to determine a second bit value of the memory cell;
- confirming whether the bit value of the memory cell is the first bit value or the second bit value if the first bit value is equal to the second bit value; and
- setting the memory cell as a suspected bit if the first bit value is not equal to the second bit value.
3. The method according to claim 2, wherein the step of gradually changing bit values of the memory cells having the threshold voltage between the first reference voltage and the second reference voltage in the read data to calculate syndromes of the changed read data comprises:
- gradually changing a bit value of the suspected bit in the read data into one of a plurality of logical combinations to calculate syndromes of the changed read data after each change.
4. The method according to claim 1, wherein the step of calculating syndromes of the changed read data comprises:
- calculating new parity bits by using data bits in the changed read data and comparing the new parity bits with parity bits in the changed read data to calculate syndromes of the changed read data.
5. (canceled)
6. A memory apparatus, comprising:
- a memory, comprising a plurality of memory cells; and
- a processor, coupled to the memory cells in the memory, configured to: read the memory cells to obtain bit values of read data, which comprises sensing a threshold voltage of each of the memory cells and respectively comparing the threshold voltage with a first reference voltage and a second reference voltage to determine the bit values, wherein the first reference voltage and the second reference voltage are used to distinguish different states of the memory cell and the second reference voltage is larger than the first reference voltage; determine a suspect bit value, among the bit values of the read data, that is obtained from a memory cell having the threshold voltage between the first reference voltage and the second reference voltage; gradually change suspect bit value in the bit values of the read data to generate changed read data; calculate syndromes of the changed read data; and correct the read data according to values of the syndromes,
- wherein the processor is configured to judge whether the values of the calculated syndromes are all zero and correct the read data by using the corresponding bit values of the changed memory cells in the changed read data when the values of the calculated syndromes are all zero.
7. The memory apparatus according to claim 6, wherein the processor is configured to:
- compare the sensed threshold voltage with the first reference voltage to determine a first bit value of the memory cell; compare the sensed threshold voltage with the second reference voltage to determine a second bit value of the memory cell; confirm whether the bit value of the memory cell is the first bit value or the second bit value if the first bit value is equal to the second bit value; and set the memory cell as a suspected bit if the first bit value is not equal to the second bit value.
8. The memory apparatus according to claim 7, wherein the processor is configured to gradually change a bit value of the suspected bit in the read data into one of a plurality of logical combinations to calculate the syndromes of the changed read data after each change.
9. The memory apparatus according to claim 6, wherein the processor is configured to calculate new parity bits by using data bits in the changed read data, wherein the new parity bits are compared with parity bits in the changed read data to calculate the syndromes of the changed read data.
10. (canceled)
Type: Application
Filed: Apr 14, 2020
Publication Date: Oct 14, 2021
Applicant: Winbond Electronics Corp. (Taichung City)
Inventor: Wen-Chiao Ho (Taichung City)
Application Number: 16/847,676