Method for accessing flash memory module and related flash memory controller and electronic device

By sorting and sorting multiple read retry tables in the flash memory controller, and choosing tables with high decoding success rate are preferred for reading, the system performance reduction caused by high bit error rate in the prior art is solved and The problem of decoding failure improves the overall performance of the system.

CN119068954APending Publication Date: 2024-12-03SILICON MOTION INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410026014.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-06-01
Filing Date
2024-01-08
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When the bit error quantity/bit error rate of the existing flash memory controller is high, the processing speed of the error correction code circuit decreases, resulting in a decrease in system performance. Due to the state of the flash memory module, the preset read retry table is read. Not suitable, resulting in decoding failure and affecting performance.

Method used

Use multiple read retry tables to classify them into different groups, establish a classification sorting table, and give priority to the read retry table with high decoding success rate for reading, ensuring that the appropriate read gear is found as soon as possible when decoding fails. Improve system performance.

Benefits of technology

The classification sorting table is preferred to try to decode the read retry table with a high success rate, reduce the number of invalid read attempts, improve system performance, and avoid performance reduction caused by multiple decoding failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068954A_ABST
    Figure CN119068954A_ABST
Patent Text Reader

Abstract

The invention discloses a method for accessing a flash memory module, a related flash memory controller and an electronic device. The method includes: classifying a plurality of read retry tables into at least one first group and a second group to establish a classification sorting table, where the plurality of read retry tables respectively record at least one read voltage, and any two read retry tables do not have the same read voltage; selecting a first read retry table from the first group to read a page of a block of the flash memory module to generate first read data; and when the decoder cannot successfully decode the first read data, preferentially selecting a second read retry table from the first group to read the data page of the block of the flash memory module so as to generate second read data for the decoder to decode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a flash memory, and more particularly to a method for accessing a flash memory module and a related flash memory controller and electronic device. Background Art

[0002] With the development of low-density parity-check code (LDPC), the error correction code (ECC) circuit in the flash memory controller can correct errors of data with higher bit error amount / bit error rate to successfully decode the data. However, although the decoding capability of the error correction code circuit is improved, when the bit error amount / bit error rate is higher than a critical value, the processing speed of the error correction code circuit will drop significantly, for example, to about 20 million bytes per second (20MB / s), thereby seriously affecting the system performance.

[0003] In order to solve the above-mentioned problem of too high bit error amount / bit error rate causing system performance degradation or even failure to decode successfully, the flash memory controller uses different read voltages to read the flash memory module according to multiple read retry tables to obtain suitable data (that is, data that can be successfully decoded or data with a lower bit error amount / bit error rate). In the operation of the prior art, when the flash memory controller uses a preset read retry table to read the flash memory module, if the read data cannot be successfully decoded, the flash memory controller will sequentially select other read retry tables to read the flash memory module until the read data can be successfully decoded.

[0004] However, since the state of the flash memory module will change with the storage time of the data, the current temperature, the temperature when the data is written, the number of times the block is erased, the number of times the block is read, etc., the read retry table suitable for reading the flash memory module will also change accordingly, thereby causing the flash memory controller to frequently adjust the preset read retry table for use. In addition, since some of the multiple read retry tables may be suitable for reading the flash memory module only in very special circumstances, if the flash memory controller sequentially selects these read retry tables to read the flash memory module, it will usually only cause subsequent decoding failures, thereby affecting the overall performance. Summary of the invention

[0005] Therefore, one of the purposes of the present invention is to provide a method for accessing a flash memory module and a related flash memory controller and electronic device, which can classify and sort multiple read retry tables so that the flash memory controller can give priority to trying a read retry table with a higher decoding success rate when decoding fails, thereby solving the problems described in the prior art.

[0006] In one embodiment of the present invention, a flash memory controller is disclosed, wherein the flash memory controller is used to access a flash memory module, and the flash memory controller includes a read-only memory, a microprocessor, a decoder, and a buffer memory. The read-only memory is used to store a program code, and the microprocessor is used to execute the program code to control the access to the flash memory module. The buffer memory is used to store a plurality of read retry tables, wherein the plurality of read retry tables respectively record at least one read voltage, and any two read retry tables do not have exactly the same read voltage. The microprocessor classifies the multiple read retry tables into at least a first group and a second group to establish a classification sorting table, wherein the first group includes read retry tables whose read data obtained after being used to read the flash memory module can be successfully decoded by the decoder; and the second group includes read retry tables whose read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and a symptom or a symptom weight generated during the decoding process of the decoder meets a first condition; and the microprocessor selects a first read retry table from the first group to read a data page of a block of the flash memory module to generate a first read data, and when the decoder cannot successfully decode the first read data, the microprocessor preferentially selects a second read retry table from the first group to read the data page of the block of the flash memory module to generate a second read data for decoding by the decoder.

[0007] In one embodiment of the present invention, an electronic device is disclosed, which includes a flash memory module and a flash memory controller, wherein the flash memory controller is used to access the flash memory module and includes a decoder, wherein the flash memory controller stores a plurality of read retry tables, wherein the plurality of read retry tables respectively record at least one read voltage, and any two read retry tables do not have exactly the same read voltage. The flash memory controller classifies the multiple read retry tables into at least a first group and a second group to establish a classification sorting table, wherein the first group includes read retry tables whose read data obtained after being used to read the flash memory module can be successfully decoded by the decoder; and the second group includes read retry tables whose read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and a symptom or a symptom weight generated during the decoding process of the decoder meets a first condition; and the flash memory controller selects a first read retry table from the first group to read a data page of a block of the flash memory module to generate a first read data, and when the decoder cannot successfully decode the first read data, the flash memory controller preferentially selects a second read retry table from the first group to read the data page of the block of the flash memory module to generate a second read data for decoding by the decoder.

[0008] In one embodiment of the present invention, a method for accessing a flash memory module is disclosed, which includes the following steps: classifying a plurality of read retry tables into at least a first group and a second group to establish a classification sorting table, wherein the plurality of read retry tables respectively record at least one read voltage, and any two read retry tables do not have exactly the same read voltage; the first group includes read retry tables whose read data obtained after being used to read the flash memory module can be successfully decoded by a decoder; and the second group includes read retry tables whose read data obtained after being used to read the flash memory module can be successfully decoded by a decoder; The invention relates to a method for preparing a read retry table in which the read data obtained after the decoder fails to be successfully decoded by the decoder, and a symptom or a symptom weight generated during the decoding process of the decoder meets a first condition; selecting a first read retry table from the first group to read a data page of a block of the flash memory module to generate a first read data; and when the decoder fails to successfully decode the first read data, preferentially selecting a second read retry table from the first group to read the data page of the block of the flash memory module to generate a second read data for decoding by the decoder. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 FIG. 4 is a schematic diagram of a memory device according to an embodiment of the present invention.

[0010] Figure 2 FIG. 4 is a schematic diagram of a block in a flash memory according to an embodiment of the present invention.

[0011] Figure 3 FIG. 4 is a schematic diagram of multiple write voltage levels and multiple threshold voltages in a data page.

[0012] Figure 4 FIG. 4 is a schematic diagram of a classification sorting table according to an embodiment of the present invention.

[0013] Figures 5 to 8 FIG. 4 is a flow chart of a method for accessing a flash memory module according to an embodiment of the present invention.

[0014]

Explanation of symbols

[0015] 100: Memory device

[0016] 110: Flash memory controller

[0017] 112: Microprocessor

[0018] 112C: Programming code

[0019] 112M: Read-only memory

[0020] 114: Control Logic

[0021] 116: Buffer memory

[0022] 118: Interface Logic

[0023] 120: Flash memory module

[0024] 130: Main device

[0025] 132: Encoder

[0026] 134:Decoder

[0027] 142: Read retry table

[0028] 144: Read the success record table

[0029] 200: Block

[0030] 202: Floating Gate Transistor

[0031] 410: First Group

[0032] 420: Second Group

[0033] 430: The third group

[0034] 500~570: Steps

[0035] RRT1~RRT30: Read retry table

[0036] BL1, BL2, BL3: bit lines

[0037] WL0~WL2,WL4~WL6: word line

[0038] L1~L8: Write voltage level

[0039] Vt1~Vt7: read voltage DETAILED DESCRIPTION

[0040] Figure 1 1 is a schematic diagram of a memory device 100 according to an embodiment of the present invention. The memory device 100 includes a flash memory module 120 and a flash memory controller 110, and the flash memory controller 110 is used to access the flash memory module 120. According to this embodiment, the flash memory controller 110 includes a microprocessor 112, a read only memory (ROM) 112M, a control logic 114, a buffer memory 116, and an interface logic 118. The ROM 112M is used to store a program code 112C, and the microprocessor 112 is used to execute the program code 112C to control the access to the flash memory module 120. The control logic 114 includes an encoder 132 and a decoder 134, wherein the encoder 132 is used to encode the data written into the flash memory module 120 to generate a corresponding check code (or error correction code (ECC)), and the decoder 134 is used to decode the data read from the flash memory module 120.

[0041] In a typical case, the flash memory module 120 includes a plurality of flash memory chips, each of which includes a plurality of blocks, and the flash memory controller 110 performs an erase operation on the flash memory module 120 in units of blocks. In addition, a block can record a specific number of data pages, and the flash memory controller 110 performs a write operation on the flash memory module 120 in units of data pages. In the present embodiment, the flash memory module 120 is a 3D NAND-type flash module.

[0042] In practice, the flash memory controller 110, which executes the program code 112C through the microprocessor 112, can use its own internal components to perform a variety of control operations, such as using the control logic 114 to control the access operation of the flash memory module 120, using the buffer memory 116 to perform the required buffering processing, and using the interface logic 118 to communicate with a host device 130. The buffer memory 116 is implemented as a random access memory (Random Access Memory, RAM). For example, the buffer memory 116 can be a static random access memory (Static RAM, SRAM), but the present invention is not limited to this.

[0043] In one embodiment, the memory device 100 may be a portable memory device (e.g., a memory card that complies with SD / MMC, CF, MS, or XD standards), and the host device 130 is an electronic device that can be connected to the memory device, such as a mobile phone, a notebook computer, a desktop computer, etc. In another embodiment, the memory device 100 may be a solid-state drive (SSD) or an embedded storage device that complies with the Universal Flash Storage (UFS) or Embedded Multi Media Card (EMMC) specifications, and is disposed in an electronic device, such as a mobile phone, a notebook computer, or a desktop computer, and the host device 130 may be a processor of the electronic device.

[0044] Figure 2 FIG. 2 is a schematic diagram of a block 200 in a flash memory module 120 according to an embodiment of the present invention, wherein the flash memory module 120 is a three-dimensional NAND flash memory. Figure 2 As shown, block 200 includes a plurality of memory cells (such as the floating gate transistor 202 shown in the figure or other charge trap elements), which form a three-dimensional NAND flash memory architecture through a plurality of bit lines (only BL1 to BL3 are shown in the figure) and a plurality of word lines (such as WL0 to WL2, WL4 to WL6 shown in the figure). Figure 2In the example of the top plane, all floating gate transistors on word line WL0 constitute at least one data page, all floating gate transistors on word line WL1 constitute at least another data page, and all floating gate transistors on word line WL2 constitute at least another data page... and so on. In addition, depending on the different writing methods of the flash memory, the definition between the word line WL0 and the data page (logical data page) will also be different. Specifically, when writing using the single-level cell (SLC) method, all floating gate transistors on the word line WL0 only correspond to a single logical data page; when writing using the multi-level cell (MLC) method, all floating gate transistors on the word line WL0 correspond to two logical data pages; when writing using the triple-level cell (TLC) method, all floating gate transistors on the word line WL0 correspond to three logical data pages; and when writing using the quad-level cell (QLC) method, all floating gate transistors on the word line WL0 correspond to four logical data pages. Since those with ordinary knowledge in the art should be able to understand the structure of the three-dimensional NAND flash memory and the relationship between the word line and the data page, the relevant details are not repeated here.

[0045] Figure 3 Schematic diagram of multiple write voltage levels L1-L8 and multiple read voltages Vt1-Vt7 when a three-layer storage block is used as the block 200, wherein the read voltages Vt1-Vt7 may also be referred to as threshold voltages in the art. Figure 3As shown, each floating gate transistor 202 can be programmed to have a voltage level L1 (i.e., (MSB, CSB, LSB) = (1, 1, 1)), a voltage level L2 (i.e., (MSB, CSB, LSB) = (1, 1, 0)), a voltage level L3 (i.e., (MSB, CSB, LSB) = (1, 0, 0)), a voltage level L4 (i.e., (MSB, CSB, LSB) = (0, 0, 0)), a voltage level L5 (i.e., (MSB, CSB, LSB) = (0, 0, 0)), and a voltage level L6 (i.e., (MSB, CSB, LSB) = (0, 0, 0)). When the flash memory controller 110 needs to read the least significant bit (LSB) of the floating gate transistor 202, the flash memory controller 110 uses the read voltages Vt1 and Vt5 to read the floating gate transistor 202. The floating gate transistor 202 is used to generate "1" or "0" according to the conduction state of the floating gate transistor 202 (whether current is generated). Similarly, when the flash memory controller 110 needs to read the middle valid bit (CSB) in the floating gate transistor 202, the flash memory controller 110 uses the read voltages Vt2, Vt4 and Vt6 to read the floating gate transistor 202, and generates "1" or "0" according to the conduction state of the floating gate transistor 202 (whether current is generated) for decoding by the decoder 134. Similarly, when the flash memory controller 110 needs to read the most significant bit (MSB) in the floating gate transistor 202, the flash memory controller 110 uses the read voltages Vt3 and Vt7 to read the floating gate transistor 202, and determines whether the most significant bit is "1" or "0" according to the conduction state of the floating gate transistor 202 (whether current is generated), so as to be decoded by the decoder 134. In this embodiment, when the floating gate transistor 202 has a voltage level L1, it can be referred to as having an erase state, and when the floating gate transistor 202 has any of the voltage levels L2 to L8, it can be referred to as having a program state.

[0046] It should be noted that Figure 3 The example shown is only used to illustrate the process of the flash memory controller 110 reading the floating gate transistor 202, and its implementation is not a limitation of the present invention. Specifically, the least significant bit, the middle significant bit, and the most significant bit can have different encoding methods, and the flash memory controller 110 can also use an additional auxiliary voltage to read the floating gate transistor 202 to provide more information to the decoder 134 for decoding. In addition, since those with ordinary knowledge in the art can read the above Figure 3 After reading the relevant contents, you will understand how to apply the above embodiments to single-layer storage blocks, double-layer storage blocks and four-layer storage blocks, and the relevant details will not be repeated here.

[0047] Since the flash memory module 120 may cause the write voltage levels L1-L8 to drift due to data retention, write status, environmental factors, etc., so that the original read voltages Vt1-Vt7 cannot correctly read the flash memory module 120, the manufacturer of the flash memory module 120 usually provides a plurality of read retry tables 142, wherein each read retry table 142 records at least one read voltage, and any two read levels do not have exactly the same read voltage. The flash memory controller 110 can load the read retry table 142 into the buffer memory 116 when booting up, so as to control the flash memory module 120 to use different read voltages Vt1-Vt7 to read the flash memory module 120, so as to obtain data with better quality and that can be successfully decoded.

[0048] As described in the prior art, since the flash memory controller 110 includes a plurality of read retry tables 142, when the flash memory module is in different environments or states and the write voltage levels L1-L8 drift, if the flash memory module 120 is read sequentially using the plurality of read retry tables 142 in the prior art, it is often necessary to try a plurality of invalid read positions before the appropriate data can be read. Therefore, the present invention particularly proposes to establish a classification and sorting table 144 in the buffer memory 116, which is used to classify and sort the plurality of read retry tables 142, so that the flash memory controller 110 can preferentially try a read retry table with a higher decoding success rate when it is necessary to change the read retry table to read the flash memory module 120, so that the flash memory controller 110 can quickly find a suitable read position to improve system performance.

[0049] Figure 4 FIG. 1 is a schematic diagram of a classification and sorting table 144 according to an embodiment of the present invention. Figure 4As shown, assuming that the plurality of read retry tables 142 include 30 read retry tables, respectively represented by read retry tables RRT1-RRT30, and the flash memory controller 110 classifies the read retry tables RRT1-RRT30 into a first group 410, a second group 420, or a third group 430 according to the decoding results of the data obtained after using the read retry tables RRT1-RRT30 to read the flash memory module 120. In this embodiment, the first group 410 includes the read retry tables whose data obtained after being used to read the flash memory module 120 can be hard decoded successfully. For example, assuming that the read retry tables RRT1, RRT4, and RRT7 have been used to read the flash memory module 120 before, and the read data can be successfully decoded by the decoder 134 using a hard decoding method, the read retry tables RRT1, RRT4, and RRT7 can be classified into the first group 410. The second group 420 includes read retry tables that were previously used to read the flash memory module 120, and the data obtained cannot be successfully hard-decoded, but a syndrome or a syndrome weight generated during the hard decoding process meets a first condition. For example, assuming that the read retry tables RRT2, RRT3, and RRT5 were previously used to read the flash memory module 120, and the read data cannot be successfully decoded by the decoder 134 using a hard decoding method, but the syndrome weight generated during the hard decoding process is lower than a threshold value, the read retry tables RRT2, RRT3, and RRT5 can be classified into the second group 420. The third group 430 includes read retry tables that were previously used to read the flash memory module 120, and the data obtained cannot be successfully hard-decoded, but a syndrome or a syndrome weight generated during the hard decoding process meets a second condition. For example, assuming that the read retry tables RRT20 and RRT27 have been used to read the flash memory module 120 before, the read data cannot be successfully decoded by the decoder 134 using hard decoding, and the symptom weight generated during the hard decoding process is higher than the critical value, then the read retry tables RRT20 and RRT27 can be classified into the third group 430. It should be noted that the symptom weights described above can be used to reflect the quality of the data, wherein the smaller the value of the symptom weight, the better the quality of the data. In addition, since the contents and calculation methods of the above-mentioned symptoms and symptom weights are already well known to those with general knowledge in the art, such as U.S. Patent Application Publication No. US20190158115 and Taiwan Patent Announcement No. TWI718060, the relevant calculation details are not repeated here.

[0050] In one embodiment, the read retry tables included in the first group 410 can be further sorted, for example, according to the number of error bits of a read data that each read retry table is used to read the flash memory module 120, and the read retry table corresponding to the fewer error bits has a higher priority sequence number. In detail, when the flash memory controller 110 uses a read retry table to read a data page of the flash memory module 120, the read data will obtain an error bit number of the read data during the process of being successfully decoded by the decoder 134, and the error bit number is used as the corresponding error bit number of the read retry table. It should be noted that the corresponding error bit number of the read retry table is constantly updated, that is, the corresponding error bit number of the read retry table is generated when the read retry table is most recently used to read the flash memory module 120.

[0051] In one embodiment, the read retry tables included in the second group 420 can be further sorted, for example, according to a syndrome weight of a read data used by each read retry table to read the flash memory module 120, and the read retry table corresponding to the lower syndrome weight has a higher priority sequence number. In detail, when the flash memory controller 110 uses a read retry table to read a data page of the flash memory module 120, the read data will obtain a syndrome weight during the process of decoding failure through the decoder 134, and the syndrome weight is used as the corresponding syndrome weight of the read retry table. It should be noted that the corresponding syndrome weight of the read retry table is constantly updated, that is, the corresponding syndrome weight of the read retry table is generated when the read retry table is most recently used to read the flash memory module 120.

[0052] In one embodiment, the number of read retry tables in the first group 410, the second group 420, and the third group 430 may change with the operation of the memory device 100, and each read retry table may also be classified into different groups with the operation of the memory device 100. For example, when any read retry table in the first group 410 is used to read the flash memory module 120, but the number of times that its read data cannot be successfully hard-decoded by the decoder 120 reaches A times, the read retry table will be classified into the second group 420 or the third group 430 according to the corresponding syndrome weight, where A can be any suitable positive integer, such as 1, 2, 3, etc. In one embodiment, when any read retry table in the second group 420 or the third group 430 is used to read the flash memory module 120, and its read data can be successfully hard-decoded by the decoder 120, the read retry table will be classified into the first group 410. In one embodiment, when any read retry table in the second group 420 is used to read the flash memory module 120, but its read data cannot be successfully hard-decoded by the decoder 120, and the corresponding syndrome weight is not lower than the threshold value, the read retry table is classified into the third group 410. In one embodiment, when any read retry table in the third group 430 is used to read the flash memory module 120, but its read data cannot be successfully hard-decoded by the decoder 120, and the corresponding syndrome weight is lower than the threshold value, the read retry table is classified into the second group 420.

[0053] By classifying the read retry table into a plurality of groups and using the classification sorting table 144 to record the read retry tables in the first group 410, the second group 420, and the third group 430, the flash memory controller 110 can select a better read retry table to perform subsequent read operations when the decoder 134 fails to decode, so as to avoid using too many invalid read retry tables and reducing the overall performance. Specifically, assuming that the flash memory controller 110 uses the read retry table RRT1 to read the flash memory module 120, and if the decoder 134 cannot successfully hard decode the read data at a certain moment, the flash memory controller 110 will first try from the read retry table in the first group 410, that is, first use the read retry table RRT4 to read the flash memory module 120 again. If the read data generated by reading the flash memory module 120 again using the read retry table RRT4 can be successfully decoded by the decoder 134, the flash memory controller 110 uses the read retry table RRT4 for subsequent reading; if the read data generated by reading the flash memory module 120 again using the read retry table RRT4 cannot be successfully decoded by the decoder 134, the flash memory controller 110 will continue to try from the read retry tables in the first group 410. In addition, if the read data generated by all the read retry tables in the first group 410 cannot be successfully decoded by the decoder 134, the flash memory controller 110 will continue to select the read retry tables in the second group 420 in sequence, or continue to select the read retry tables in the second group 430 in sequence until the obtained read data can be successfully decoded by the decoder 134.

[0054] Figures 5 to 8 Flow chart of a method for accessing a flash memory module 120 according to an embodiment of the present invention. In step 500, the process starts, and the microprocessor 112 has classified a plurality of read retry tables 142, and the classification and sorting table 144 has included the read retry tables of the first group 410, the second group 420 and the third group 430, respectively. The classification and sorting table 144 at this time can be a preset classification and sorting table, or a classification and sorting table generated by a previous operation. In step 502, the microprocessor 112 selects a read retry table from the first group 410, such as Figure 4The read retry table RRT1 is shown, wherein the read retry table RRT1 is the read retry table used by the microprocessor 112 to read the flash memory module 120 last time, and the read data can be successfully decoded by the decoder 134. In step 504, the microprocessor 112 uses the selected read retry table RRT1 to read a data page of a block in the flash memory module 120 to obtain a read data. In step 506, the decoder 134 hard decodes the read data. If the decoding is successful, the process returns to step 504 to continue to use the read retry table RRT1 to read the next data page of the block; if the decoding fails, the process enters step 508. In step 508, the microprocessor 112 determines whether the number of consecutive decoding failures of the read retry table RRT1 is greater than a threshold value TH1. If not, the process enters step 510; if so, the process enters step 512. In this embodiment, "continuous decoding failure" means that the read data cannot be successfully decoded when the read retry table RRT1 is used to read another data page of the flash memory module last time, but the reading time does not have to be continuous; in addition, the threshold value TH1 can be any suitable positive integer, such as 1, 2 or 3. In step 510, the microprocessor 112 retains the selected read retry table RRT1 in the first group 410. In step 512, the microprocessor 112 determines whether the syndrome weight of the decoder 134 in the process of decoding the read data is less than a threshold value TH2. If so, the process enters step 514; if not, the process enters step 516. In step 514, the microprocessor 112 moves the read retry table RRT1 from the first group 410 to the second group 420. In step 516, the microprocessor 112 moves the read retry table RRT1 from the first group 410 to the third group 430. In step 518 , the microprocessor 112 determines whether all read retry tables in the first group 410 have been used to read the data page of the block in the flash memory module 120 . If not, the process proceeds to step 520 ; if so, the process proceeds to step 538 .

[0055] In step 520, the microprocessor 112 selects the next read retry table from the first group 410, such as Figure 4The read retry table RRT4 shown. In step 522, the microprocessor 112 uses the selected read retry table RRT4 to read the data page of the block in the flash memory module 120 to obtain a read data, wherein the data page read in step 522 and step 504 is the same. In step 524, the decoder 134 hard decodes the read data. If the decoding is successful, the process proceeds to step 526; if the decoding fails, the process proceeds to step 528. In step 526, the microprocessor 122 locks the selected read retry table RRT4, and the process returns to step 504 to continue to use the read retry table RRT4 to read the subsequent data page in the flash memory module 120. In step 528, the microprocessor 112 determines whether the number of consecutive decoding failures of the read retry table RRT4 is greater than the threshold value TH1. If not, the process proceeds to step 530; if so, the process proceeds to step 532. In this embodiment, "continuous decoding failure" means that the read data cannot be successfully decoded when the read retry table RRT4 is used to read another data page of the flash memory module last time, but the reading time does not have to be continuous. In step 530, the microprocessor 112 retains the selected read retry table RRT4 in the first group 410. In step 532, the microprocessor 112 determines whether the symptom weight of the decoder 134 in the process of decoding the read data is less than the threshold value TH2. If so, the process enters step 534; if not, the process enters step 536. In step 534, the microprocessor 112 moves the read retry table RRT4 from the first group 410 to the second group 420. In step 536, the microprocessor 112 moves the read retry table RRT4 from the first group 410 to the third group 430. Then, the process returns to step 518.

[0056] In step 538, the microprocessor 112 selects a read retry table from the second group 420, such as Figure 4In step 540, the microprocessor 112 uses the selected read retry table RRT2 to read the data page of the block in the flash memory module 120 to obtain a read data, wherein the data page read in step 540 and step 504 is the same. In step 542, the decoder 134 hard decodes the read data. If the decoding is successful, the process proceeds to step 544; if the decoding fails, the process proceeds to step 546. In step 544, the microprocessor 122 locks the selected read retry table RRT2, and the process returns to step 504 to continue to use the read retry table RRT2 to read the subsequent data page in the flash memory module 120, and the selected read retry table RRT2 is moved from the second group 420 to the first group 410. In step 546, the microprocessor 112 determines whether the syndrome weight of the decoder 134 in the process of decoding the read data is less than the threshold value TH2. If so, the process proceeds to step 548; if not, the process proceeds to step 550. In step 548, the microprocessor 112 retains the read retry table RRT2 in the second group 420. In step 550, the microprocessor 112 moves the read retry table RRT2 from the second group 420 to the third group 430. In step 522, the microprocessor 112 determines whether all the read retry tables in the second group 420 have been used to read the data page of the block in the flash memory module 120. If not, the process proceeds to step 554; if so, the process returns to step 538.

[0057] In step 554, the microprocessor 112 selects a read retry table from the third group 430, such as Figure 4The read retry table RRT20 shown. In step 556, the microprocessor 112 uses the selected read retry table RRT20 to read the data page of the block in the flash memory module 120 to obtain a read data, wherein the data page read in step 556 and step 504 is the same. In step 558, the decoder 134 hard decodes the read data. If the decoding is successful, the process proceeds to step 560; if the decoding fails, the process proceeds to step 562. In step 560, the microprocessor 122 locks the selected read retry table RRT20, and the process returns to step 504 to continue using the read retry table RRT20 to read the subsequent data pages in the flash memory module 120, and the selected read retry table RRT20 is moved from the third group 430 to the first group 410. In step 562, the microprocessor 112 determines whether the syndrome weight of the decoder 134 in the process of decoding the read data is less than the threshold value TH2. If so, the process proceeds to step 564; if not, the process proceeds to step 566. In step 564, the microprocessor 112 moves the read retry table RRT20 from the third group 430 to the second group 420. In step 566, the microprocessor 112 retains the read retry table RRT20 in the third group 430. In step 568, the microprocessor 112 determines whether all the read retry tables in the third group 430 have been used to read the data page of the block in the flash memory module 120. If not, the process proceeds to step 570; if so, the process returns to step 554. In step 570 , since all read data of the read retry table cannot be decoded successfully through hard decoding, the decoder 134 starts soft decoding operation, that is, uses other auxiliary read voltages to read the data page of the block to obtain channel information for LDPC soft decoding operation.

[0058] As described in the above embodiment, by classifying the plurality of read retry tables into the first group 410, the second group 420 and the third group 430, the flash memory controller 110 can select a read retry table from the first group 410, the second group 420 and the third group 430 in sequence to perform subsequent read operations when the decoder 134 fails to decode. Since the flash memory controller 110 will preferentially select a better read retry table, it is possible to avoid using too many invalid read retry tables and reducing the overall performance.

[0059] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A flash memory controller, wherein the flash memory controller is used to access a flash memory module, and the flash memory controller comprises: A read-only memory for storing a program code; a microprocessor, used to execute the program code to control access to the flash memory module; a decoder; as well as A buffer memory for storing a plurality of read retry tables, wherein the plurality of read retry tables respectively record at least one read voltage, and any two read retry tables do not have exactly the same read voltage; wherein the microprocessor classifies the plurality of read retry tables into at least a first group and a second group to establish a classification and sorting table, wherein the first group includes the read retry tables whose read data obtained after being previously used to read the flash memory module can be successfully decoded by the decoder; and the second group includes a read retry table in which the read data obtained after being previously used to read the flash memory module cannot be successfully decoded by the decoder, and a syndrome or a syndrome weight generated during the decoding process of the decoder meets a first condition; The microprocessor selects a first read retry table from the first group to read a data page of a block of the flash memory module to generate a first read data, and when the decoder cannot successfully decode the first read data, the microprocessor preferentially selects a second read retry table from the first group to read the data page of the block of the flash memory module to generate a second read data for decoding by the decoder.

2. The flash memory controller according to claim 1, It is characterized in that The microprocessor classifies the multiple read retry tables into the first group, the second group and a third group to establish the classification sorting table, wherein the third group includes the read retry tables whose read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and the symptom or the symptom weight generated during the decoding process of the decoder meets a second condition.

3. The flash memory controller as claimed in claim 2, It is characterized in that The second group includes a read retry table for which the read data obtained after being previously used to read the flash memory module cannot be successfully decoded by the decoder, and the syndrome weight generated during the decoding process of the decoder is lower than a threshold value; The third group includes a read retry table in which the read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and the syndrome weight generated during the decoding process of the decoder is not less than the critical value.

4. The flash memory controller as claimed in claim 2, It is characterized in that When the decoder cannot successfully decode the second read data and all read retry tables in the first group have been used to read the data page of the block of the flash memory module, the microprocessor preferentially selects a third read retry table from the second group to read the data page of the block of the flash memory module to generate a third read data for decoding by the decoder.

5. The flash memory controller as claimed in claim 4, It is characterized in that When the decoder successfully decodes the third read data, the microprocessor moves the third read retry table from the second group to the first group, and the microprocessor continues to use the third read retry table to read the next data page of the block of the flash memory module.

6. The flash memory controller as claimed in claim 4, It is characterized in that When the decoder cannot successfully decode the third read data and all read retry tables in the second group have been used to read the data page of the block of the flash memory module, the microprocessor will select a fourth read retry table from the third group to read the data page of the block of the flash memory module to generate a fourth read data for decoding by the decoder.

7. The flash memory controller as claimed in claim 6, It is characterized in that When the decoder successfully decodes the fourth read data, the microprocessor moves the fourth read retry table from the third group to the first group, and the microprocessor continues to use the fourth read retry table to read the next data page of the block of the flash memory module.

8. The flash memory controller as claimed in claim 1, It is characterized in that The microprocessor performs sorting according to an error bit number corresponding to each read retry table in the first group, wherein the read retry table corresponding to the smaller error bit number has a higher priority sequence number; The microprocessor performs sorting according to the syndrome weight corresponding to each read retry table in the first group, wherein the read retry table corresponding to the lower syndrome weight has a higher priority sequence number.

9. An electronic device comprising: a flash memory module; and a flash memory controller for accessing the flash memory module and comprising a decoder, wherein the flash memory controller stores a plurality of read retry tables, wherein the plurality of read retry tables respectively record at least one read voltage, and any two read retry tables do not have exactly the same read voltage; wherein the flash memory controller classifies the plurality of read retry tables into at least a first group and a second group to establish a classification and sorting table, wherein the first group includes read retry tables whose read data obtained after being previously used to read the flash memory module can be successfully decoded by the decoder; and the second group includes read retry tables whose read data obtained after being previously used to read the flash memory module cannot be successfully decoded by the decoder, and a syndrome or a syndrome weight generated during a decoding process of the decoder meets a first condition; The flash memory controller selects a first read retry table from the first group to read a data page of a block of the flash memory module to generate a first read data, and when the decoder cannot successfully decode the first read data, the flash memory controller preferentially selects a second read retry table from the first group to read the data page of the block of the flash memory module to generate a second read data for decoding by the decoder.

10. The electronic device according to claim 9, It is characterized in that The flash memory controller classifies the multiple read retry tables into the first group, the second group and a third group to establish the classification sorting table, wherein the third group includes the read retry tables whose read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and the symptom or the symptom weight generated during the decoding process of the decoder meets a second condition.

11. The electronic device according to claim 10, It is characterized in that The second group includes a read retry table for which the read data obtained after being previously used to read the flash memory module cannot be successfully decoded by the decoder, and the syndrome weight generated during the decoding process of the decoder is lower than a threshold value; The third group includes a read retry table in which the read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and the syndrome weight generated during the decoding process of the decoder is not less than the critical value.

12. A method for accessing a flash memory module, comprising: A plurality of read retry tables are classified into at least a first group and a second group to establish a classification sorting table, wherein the plurality of read retry tables respectively record at least one read voltage, and no two read retry tables have exactly the same read voltage; the first group includes read retry tables whose read data obtained after being used to read the flash memory module can be successfully decoded by a decoder ; and the second group includes a read retry table in which the read data obtained after being previously used to read the flash memory module cannot be successfully decoded by the decoder, and a syndrome or a syndrome weight generated during the decoding process of the decoder meets a first condition; Selecting a first read retry table from the first group to read a data page of a block of the flash memory module to generate a first read data; as well as When the decoder cannot successfully decode the first read data, a second read retry table is preferentially selected from the first group to read the data page of the block of the flash memory module to generate a second read data for decoding by the decoder.

13. The method of claim 12, It is characterized in that The multiple read retry tables are classified into the first group, the second group and a third group to establish the classification sorting table, wherein the third group includes the read retry tables in which the read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and the symptom or the symptom weight generated during the decoding process of the decoder meets a second condition.

14. The method of claim 12 , The second group includes a read retry table in which the read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and the syndrome weight generated during the decoding process of the decoder is lower than a critical value; The third group includes a read retry table in which the read data obtained after being used to read the flash memory module cannot be successfully decoded by the decoder, and the syndrome weight generated during the decoding process of the decoder is not less than the critical value.