Optimal read bias voltage determination method, flash memory correction method, flash memory controller, flash memory storage device and computer program product

By using ECC error correction capability in flash memory storage devices to determine the bit inversion threshold and temperature compensation, the read process is optimized, solving the problem of inefficient optimal read offset voltage iteration in existing technologies, and achieving efficient and reliable data reading.

CN122889026BActive Publication Date: 2026-11-24BIWIN STORAGE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611380775.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-24
Estimated Expiration
2046-09-07

AI Technical Summary

Technical Problem

Existing technologies employ inefficient and costly iterative decision-making logic when searching for the optimal read offset voltage in flash memory storage devices. This also prevents the effective utilization of ECC error correction capabilities, resulting in insufficient read reliability and performance.

Method used

By using a reference offset voltage, a first candidate offset voltage, and a second candidate offset voltage to read the original data, the bit inversion threshold is determined using ECC error correction capability, the iteration direction is dynamically adjusted, and the iteration process is optimized by combining temperature compensation and read retesting to achieve low-overhead and high-efficiency reading.

Benefits of technology

It significantly improves the read reliability and performance of flash memory storage devices, reduces the number of iterations and read latency, and increases the data read success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122889026B_ABST
    Figure CN122889026B_ABST
Patent Text Reader

Abstract

This application discloses an optimal read offset voltage determination method, a flash memory error correction method, a flash memory controller, a flash memory storage device, and a computer program product, belonging to the field of data storage technology. It includes: reading the original data of a target physical page using a reference offset voltage, a first candidate offset voltage, and a second candidate offset voltage, respectively; obtaining the first bit inversion number of the reference offset voltage relative to the first candidate offset voltage and the second bit inversion number of the second candidate offset voltage relative to the reference offset voltage; responding to the fact that both the first bit inversion number and the second bit inversion number are less than a preset bit inversion number threshold, determining the reference offset voltage as the optimal read offset voltage; wherein, the bit inversion number threshold is determined based on the ECC error correction capability of the flash memory storage device. This application can significantly reduce read retry overhead and improve read retry reliability and read retry efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to data storage technology, and more particularly to a method for determining the optimal read offset voltage, a flash memory error correction method, a flash memory controller, a flash memory storage device, and a computer program product. Background Technology

[0002] After data is stored in the NAND flash memory storage medium, the charge may shift due to factors such as temperature, wear and tear, and data retention time. This can lead to failures when reading data using the default read voltage. In such cases, it is necessary to find the optimal read offset voltage for the storage cell to compensate for the offset charge and read the data correctly.

[0003] Existing technologies generally seek mathematically optimal solutions in the iterative decision logic for finding the best read offset voltage, which is costly and inefficient. Summary of the Invention

[0004] This application provides a method for determining the optimal read offset voltage, a flash memory error correction method, a flash memory controller, a flash memory storage device, and a computer program product, so as to find the optimal read offset voltage in a low-overhead and high-efficiency manner under various operating conditions, thereby significantly improving the read reliability and performance of the device.

[0005] In a first aspect, embodiments of this application provide a method for determining an optimal read offset voltage, applied to a flash memory storage device, the method comprising: The original data of the target physical page is read using the reference offset voltage, the first candidate offset voltage, and the second candidate offset voltage, respectively, to obtain the first bit inversion number of the reference offset voltage relative to the first candidate offset voltage and the second bit inversion number of the second candidate offset voltage relative to the reference offset voltage. In response to the fact that both the first bit inversion number and the second bit inversion number are less than a preset bit inversion number threshold, the reference offset voltage is determined as the optimal read offset voltage. The preset bit inversion number threshold is determined based on the ECC error correction capability of the flash memory storage device. In response to the fact that the first bit inversion number and the second bit inversion number are not both less than the preset bit inversion number threshold, the candidate offset voltage with a bit inversion number less than the bit inversion number threshold is preferentially selected from the first candidate offset voltage and the second candidate offset voltage as the re-determined reference offset voltage; After updating the first candidate offset voltage and the second candidate offset voltage based on the reference offset voltage, the above steps are executed iteratively.

[0006] In at least one possible implementation, the step of preferentially selecting, between the first candidate offset voltage and the second candidate offset voltage, the one with a bit inversion number less than the bit inversion number threshold as the re-determined reference offset voltage specifically includes: If the first bit-inversion number is less than the bit-inversion number threshold and the second bit-inversion number is greater than or equal to the bit-inversion number threshold, then the first candidate offset voltage is used as the reference offset voltage for the next iteration. If the second bit-inversion number is less than the bit-inversion number threshold and the first bit-inversion number is greater than or equal to the bit-inversion number threshold, then the second candidate offset voltage is used as the reference offset voltage for the next iteration.

[0007] In at least one possible implementation, the step of preferentially selecting, between the first candidate offset voltage and the second candidate offset voltage, the one with a bit inversion number less than the bit inversion number threshold as the re-determined reference offset voltage further includes: If both the first bit reversal number and the second bit reversal number are greater than or equal to the bit reversal number threshold, then the one with the smaller bit reversal number is selected as the redefined reference offset voltage.

[0008] In at least one possible implementation, after determining the reference offset voltage as the optimal read offset voltage, the method further includes: The correlation parameters between the optimal read offset voltage and the current operating condition are stored in a preset read retest table; The associated parameters include at least one of the following: current read temperature, number of wear cycles of the storage block, and data retention time.

[0009] In at least one possible implementation, the initial value of the reference offset voltage is determined by the read / write temperature difference of the target physical page; and / or The first candidate offset voltage and the second candidate offset voltage are obtained by shifting the reference offset voltage forward and backward by a preset step size, respectively.

[0010] In at least one possible implementation, the initial value of the reference offset voltage is determined by the read / write temperature difference of the target physical page, specifically including: In response to a physical page read error, a pre-defined read retry table is consulted to obtain the reference offset voltage corresponding to the read / write temperature difference of that physical page; or After obtaining the read / write temperature difference of the physical page, a linear fit is performed on the read / write temperature difference to obtain the corresponding reference offset voltage.

[0011] In at least one possible implementation, the bit-inversion threshold is equal to the maximum number of error-correctable bits per physical page for ECC in soft decoding mode multiplied by a preset security factor, wherein the security factor is greater than 0 and less than or equal to 1.

[0012] In at least one possible implementation, it also includes: If the redefined reference offset voltage exceeds the preset offset voltage search range, it is determined that an effective optimal read offset voltage cannot be found, and the iteration is terminated.

[0013] In at least one possible implementation, after determining the reference offset voltage for reading the target physical page, the following is included: Obtain the confidence level of the reference offset voltage; If the confidence level is higher than the preset confidence threshold, then the reference offset voltage is directly used as the optimal read offset voltage.

[0014] In at least one possible implementation, the method is triggered upon failure of the default read voltage; the failure of the default read voltage is triggered by any of the following: ECC verification failure, data decoding failure, or bit error rate exceeding a preset threshold.

[0015] In at least one possible implementation, the raw data refers to the raw bit sequence directly sensed from the flash memory storage cell without error checking and correction processing; the bit inversion number is obtained by comparing two adjacent sets of raw data bit by bit and counting the number of bit inversions.

[0016] Secondly, embodiments of this application provide a flash memory error correction method applied to a flash memory storage device, which uses an optimal read offset voltage determined by the optimal read offset voltage determination method as described in the first aspect to retry reading failed physical pages.

[0017] Thirdly, embodiments of this application provide a flash memory controller, including a processing unit and a storage unit. The storage unit is used to store computer program code, which includes computer instructions. The processing unit reads the computer instructions from the storage unit to cause the processing unit to perform steps in the optimal read offset voltage determination method as described in the first aspect or the flash memory error correction method as described in the second aspect.

[0018] Fourthly, embodiments of this application provide a flash memory storage device, including a flash memory controller as described in the third aspect.

[0019] Fifthly, embodiments of this application provide a computer program product, the computer program product comprising: computer program code, which, when executed on a computer, causes the computer to perform steps in the optimal read offset voltage determination method as described in the first aspect or the flash memory error correction method as described in the second aspect.

[0020] The beneficial effects of this application are: This application's embodiment introduces a bit-flip number threshold determined based on Error Checking and Correcting (ECC) capabilities. It employs three levels of reading the original data and compares the bit-flip number between two adjacent offset voltage sets with the preset bit-flip number threshold. When both sides are below the threshold, the iteration stops immediately; otherwise, the threshold is used as a directional anchor point to prioritize the side falling within the ECC error correction capability range and continue approaching. This proactively advances the ECC error correction capability, which was originally only used for final verification, to the iterative search, thereby minimizing the number of iterations and reading latency while ensuring a high reading success rate, achieving a balance between efficiency and reliability. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating an optimal read offset voltage determination method according to an embodiment of this application.

[0023] Figure 2 This is a schematic diagram of the process for re-determining the reference offset voltage iteration direction in an optimal read offset voltage determination method according to an embodiment of this application.

[0024] Figure 3 This is a flowchart illustrating another optimal read offset voltage determination method according to an embodiment of this application.

[0025] Figure 4 This is a schematic diagram of the structure of the flash memory controller according to an embodiment of this application.

[0026] Figure 5 This is a schematic diagram of the structure of a flash memory storage device according to an embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0028] It should be noted that: throughout the accompanying drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions; in the description of this application, the terms "center," "longitudinal," "lateral," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this application; in the description of this application, "first," "second," etc., are only used to distinguish each other, and do not indicate their degree of importance or order, etc.

[0029] In the description of this application, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linkage" should be interpreted broadly. For example, they can refer to fixed connections, movable connections, or detachable connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; they can refer to the internal communication between two components, etc. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0030] NAND flash memory, as the mainstream non-volatile storage medium, is widely used in solid-state drives, memory cards, embedded storage devices, and other fields. NAND flash memory stores data by injecting charge into the storage cells. During reading, a reference voltage is applied to the storage cell and compared with a threshold voltage to determine whether the stored data is 0 or 1.

[0031] However, in actual use, the threshold voltage distribution of storage cells can shift due to various factors such as temperature changes, wear and tear cycles (P / E cycles), data retention time, and read interference, leading to data read failures at the default read voltage. As storage devices are used for longer periods, storage cells may age, and the cumulative effects of charge loss or programming / erase cycles will increase, thus raising the probability of read errors.

[0032] In existing technologies, when searching for the optimal read offset voltage after a read failure, the search target is generally set as a mathematical optimum. For example, error rate information at different offset voltages is read, and the relative magnitude of the error rate values ​​between different offset points is compared to determine the iteration direction. Iteration is continued until the error rate drops to a level where further optimization is impossible or a preset upper limit for the number of iterations is reached, thus obtaining an offset voltage corresponding to the lowest possible error rate. This strategy of excessively pursuing the optimum largely leads to unnecessary iterations and read latency, resulting in high overhead and low search efficiency. Furthermore, the decision on the iteration direction relies entirely on the comparison of error rate values. This purely numerical comparison strategy is prone to decision oscillations or getting trapped in local optima when facing curve noise or flat regions.

[0033] Therefore, this application provides an optimal read offset voltage determination method applied to flash memory storage devices. The aim is to achieve fast, accurate, and convergent closed-loop iterative adjustment of the offset voltage with low overhead and high efficiency. Please refer to [link to relevant documentation]. Figure 1 The optimal read offset voltage determination method in this application embodiment mainly includes the following steps: In step S100, a reference offset voltage for reading the target physical page is determined, and a first candidate offset voltage and a second candidate offset voltage are obtained by shifting the reference offset voltage forward and backward by a preset step size, respectively.

[0034] The initial offset value of the reference offset voltage in this application embodiment can be a value calculated by temperature compensation, a value obtained from the read retest table, or a default offset value (such as zero offset); the first candidate offset voltage is equal to the reference offset voltage minus the preset step size, and the second candidate offset voltage is equal to the reference offset voltage plus the preset step size.

[0035] In step S200, the original data of the target physical page is read using the reference offset voltage, the first candidate offset voltage, and the second candidate offset voltage, respectively, to obtain the first bit inversion number and the second bit inversion number of the reference offset voltage relative to the first candidate offset voltage and the second candidate offset voltage.

[0036] The raw data in this application embodiment refers to the raw bit sequence directly sensed from the flash memory storage cell without ECC (Error Checking and Correcting) processing. The raw data read using the first candidate offset voltage is compared bit-by-bit with the raw data read using the reference offset voltage, and the number of bits whose bit values ​​are reversed is counted as the first bit reversal number; the raw data read using the reference offset voltage is compared bit-by-bit with the raw data read using the second candidate offset voltage, and the number of bits whose bit values ​​are reversed is counted as the second bit reversal number.

[0037] In step S300, if both the first bit inversion number and the second bit inversion number are less than a preset bit inversion number threshold, then the reference offset voltage is determined as the optimal read offset voltage; otherwise, between the first candidate offset voltage and the second candidate offset voltage, the one with a bit inversion number less than the bit inversion number threshold is preferentially selected as the re-determined reference offset voltage, and the above steps are iteratively executed. The bit inversion threshold is determined based on the ECC error correction capability of the flash memory storage device.

[0038] In modern NAND flash memory storage systems, ECC error correction is crucial for ensuring data reliability. ECC has a certain error correction capability, capable of correcting a certain number of erroneous bits in read data.

[0039] In the iterative search for the optimal offset voltage value in existing technologies, ECC error correction capability is completely absent. It neither participates in the determination of stopping the iteration nor in the decision of the direction, and is only used as a passive verification tool after the iteration ends. This makes the iterative search lack a clear engineering convergence target: it does not know how low is low enough, nor does it know which direction can reach low enough faster. It can only pursue mathematical improvement until it can no longer be improved.

[0040] The core of this application's embodiment lies in dynamically linking the bit-inversion number threshold Kmin with the ECC's error correction capability. The convergence threshold is dynamically set based on the ECC's actual error correction capability, achieving adaptive convergence that senses the ECC's error correction capability and avoiding performance waste caused by over-optimization of the optimal offset voltage value. When the ECC's error correction capability is strong, i.e., the maximum correctable bit number C is large, Kmin can be set larger. The iteration terminates early before the bit-inversion number reaches the theoretical minimum but can be corrected by the ECC, thereby significantly reducing the number of reads and read latency. When the ECC's error correction capability is weak, i.e., the maximum correctable bit number C is small, Kmin can be set smaller. The iteration needs to be closer to the optimal offset voltage to terminate, ensuring successful ECC error correction.

[0041] This application uses low-precision raw data (hard bits), which can be obtained with only a single sensing operation, resulting in extremely low read costs. In NAND flash memory, read operations determine the state of the memory cell by applying a reference voltage to the selected word line and sensing changes in current or voltage on the bit line. The raw data is output to the flash memory controller via the chip's I / O interface. The raw data obtained by sensing is a sequence of bits read directly from the memory cell without ECC error correction processing, i.e., hard bits.

[0042] The bit-reversal count is obtained by comparing each bit of adjacent sets of original data bit by bit and counting the number of bit reversals that occur. During reading, each bit of adjacent sets of original data (e.g., data read using the first candidate offset voltage and data read using the reference offset voltage) is compared bit by bit. If the bit values ​​at the same position are different (one is 0 and the other is 1), it is counted as one bit reversal. The total number of bit reversals is the bit-reversal count.

[0043] In NAND flash memory, the bit flip number exhibits an approximately V-shaped distribution as the read offset voltage changes: the bit flip number increases when the read offset voltage deviates from the optimal value; and decreases when the read offset voltage approaches the optimal value. In this embodiment, the reference offset voltage is used as the center. Three adjacent offset voltages—the reference offset voltage, the first candidate offset voltage (reference offset voltage minus a preset step size), and the second candidate offset voltage (reference offset voltage plus a preset step size)—are used to read the original data, and the bit flip numbers (k0 and k1) between adjacent groups are counted. By comparing the relationship between the bit flip numbers k0 and k1 and the bit flip number threshold Kmin, the direction of the current position relative to the optimal offset voltage is determined, thereby deciding the direction of movement for the next iteration.

[0044] Please refer to Figure 2 In at least one possible implementation, the step of preferentially selecting candidate offset voltages with a bit inversion number less than a bit inversion number threshold as the re-determined reference offset voltage specifically includes: In step S301, it is determined whether the first bit inversion number is less than the bit inversion number threshold and whether the second bit inversion number is greater than or equal to the bit inversion number threshold. If so, the first candidate offset voltage is used as the reference offset voltage for the next iteration, and it is determined to iterate in the direction of decreasing voltage.

[0045] In step S302, it is determined whether the second bit-inversion number is less than the bit-inversion number threshold and whether the first bit-inversion number is greater than or equal to the bit-inversion number threshold. If so, the second candidate offset voltage is used as the reference offset voltage for the next iteration, and it is determined to iterate in the direction of increasing voltage.

[0046] In at least one possible implementation, the optimal read offset voltage determination method further includes: In response to the fact that the first bit inversion number and the second bit inversion number are not both less than the preset bit inversion number threshold, the candidate offset voltage with a bit inversion number less than the bit inversion number threshold is preferentially selected from the first candidate offset voltage and the second candidate offset voltage as the re-determined reference offset voltage; After updating the first candidate offset voltage and the second candidate offset voltage based on the reference offset voltage, the above steps are executed iteratively.

[0047] During the iteration process, the following two core scenarios may occur: Scenario 1: The first bit inversion number k0 is less than the bit inversion number threshold Kmin, while the second bit inversion number k1 is greater than or equal to the bit inversion number threshold Kmin, i.e., k0 < Kmin ≤ k1. This means that the bit inversion number after shifting towards the direction of decreasing voltage is already less than the acceptable threshold (i.e., the left side has been corrected by ECC), while the right side of the current position has not yet reached the acceptable threshold. This indicates that the current position is on the right side of the "V" shaped trough (because the left side has entered the acceptable zone, while the right side has not), therefore it should iterate in the direction of decreasing voltage (i.e., the left side).

[0048] Scenario 2: The second bit reversal number k1 is less than the bit reversal number threshold Kmin, while the first bit reversal number k0 is greater than or equal to the bit reversal number threshold Kmin, i.e., k1 < Kmin ≤ k0. This means that the bit reversal number after shifting towards the direction of increasing voltage is already less than the acceptable threshold (i.e., the right side has been corrected by ECC), while the left side has not yet reached the acceptable threshold. This indicates that the current position is on the left side of the "V" shaped trough (because the right side has entered the acceptable zone, while the left side has not), therefore it should iterate in the direction of increasing voltage (i.e., the right side).

[0049] The core of this application's embodiment lies in introducing a bit-inversion number threshold Kmin as a convergence condition for stopping the iteration. Based on this, the bit-inversion number threshold Kmin is further set as the directional anchor point for determining which side the current position is on relative to the trough (e.g., if k0 < Kmin ≤ k1, it is determined to be to the left; if k1 < Kmin ≤ k0, it is determined to be to the right). When the bit-inversion number on one side is less than the bit-inversion number threshold Kmin, it means that the side can be corrected by ECC. If the other side cannot be corrected by ECC, it means that the current position is close to the side that can be corrected by ECC and should move towards the side that can be corrected by ECC.

[0050] This application embodiment accelerates iteration convergence and reduces the number of reads required by determining that when one side can be corrected by ECC while the other side cannot, it iterates towards the side that can be corrected by ECC without comparing the size of the first inversion number k0 and the second inversion number k1.

[0051] Please continue to refer to this. Figure 2 In at least one possible implementation, the preferred selection of a bit-inversion number less than a bit-inversion number threshold as the redefined reference offset voltage further includes: In step S303, it is determined whether the first bit inversion number and the second bit inversion number are both greater than or equal to the bit inversion number threshold. If so, the magnitudes of the first bit inversion number and the second bit inversion number are compared, and the candidate offset voltage corresponding to the one with the smaller bit inversion number is selected as the redefined reference offset voltage, and it is determined to iterate in the direction corresponding to the one with the smaller bit inversion number.

[0052] During the iteration process, the following situations may also occur: Scenario 3: The bit inversion numbers on both sides are greater than or equal to the threshold Kmin, i.e., k0 ≥ Kmin and k1 ≥ Kmin. This means that neither side can be corrected by ECC: the current position is far from the trough, and both sides are still in the range that cannot be corrected by ECC. In this case, the bit inversion number threshold Kmin cannot provide directional information, so we revert to the conventional size comparison strategy: compare the bit inversion numbers k0 and k1, and iterate in the direction corresponding to the smaller value (i.e., move towards the direction closer to the trough). If k0 < k1, it means that the left side (the direction of decreasing voltage) is closer to the trough, and we should iterate in the direction of decreasing voltage; if k1 < k0, it means that the right side (the direction of increasing voltage) is closer to the trough, and we should iterate in the direction of increasing voltage.

[0053] This application constructs a complete, hierarchical direction determination system: it prioritizes the use of the bit-inversion threshold Kmin to quickly anchor the direction, and only reverts to numerical comparison when the bit-inversion threshold Kmin cannot provide direction information. This threshold-first, comparison-as-last hierarchical design allows this application to quickly determine the direction with minimal computation (only two threshold comparisons) in most cases (one side can be corrected by ECC, and the other side cannot be corrected by ECC), and only requires numerical comparison when neither side can be corrected by ECC.

[0054] Please continue to refer to this. Figure 2 In at least one possible implementation, after determining the optimal read offset voltage, the method further includes storing the correlation parameters between the optimal read offset voltage and the current operating condition into a preset read retest table. In step S400, the associated parameters of the current operating condition are obtained, and the correspondence between the optimal read offset voltage and the associated parameters of the current operating condition is stored in a preset read retest table.

[0055] The associated parameters include at least one of the following: current read temperature, number of wear cycles of the storage block, and data retention time.

[0056] During the long-term use of NAND flash memory, under the same operating conditions, such as the same read temperature, similar wear levels, and similar data retention times, the optimal read offset voltage often exhibits a certain degree of repetition. This application's embodiments associate and store each successfully found optimal read offset voltage with its corresponding operating condition parameters, forming a dynamically updated read retry table. When encountering the same or similar operating conditions again, the offset voltage can be directly retrieved from the read retry table, skipping the iterative fine-tuning process, thereby further reducing read latency.

[0057] As the wear and tear on the memory blocks increases, the optimal offset voltage may change. By continuously recording and updating the read retest table, it is ensured that the records in the read retest table always reflect the latest media condition, and it can adaptively track the drift of media characteristics.

[0058] The read repetition test table in this embodiment is dynamically generated and continuously updated. Each time the optimal offset voltage is successfully found, the result is fed back into the read repetition test table, forming a complete closed loop of "optimization → use → feedback → update". This self-learning mechanism enables the read repetition test table to be continuously optimized with the accumulation of usage experience, becoming more and more accurate with use.

[0059] Furthermore, the associated parameters in this application embodiment include not only temperature, but also wear count and data retention time, covering the main factors affecting NAND threshold voltage offset, thus making the read test table hit rate higher.

[0060] Once the optimal offset voltage is successfully found, the flash controller creates a key-value pair with the current associated parameters and the optimal offset voltage and writes it to the read retry table. If the key already exists, the old value is overwritten; otherwise, a new record is inserted.

[0061] In at least one possible implementation, the initial value of the reference offset voltage is determined by the read / write temperature difference of the target physical page.

[0062] The threshold voltage of NAND flash memory is significantly affected by temperature: the difference between the temperature during writing and the temperature during reading causes the threshold voltage to shift. This application utilizes this physical principle to determine the initial value of the reference offset voltage by the difference between the write temperature of the target physical page and the current read temperature.

[0063] Specifically, the flash memory controller records the temperature at the time of writing data to the physical page (write temperature); obtains the current temperature when reading the physical page (read temperature); calculates the difference between the two (read-write temperature difference); and determines an initial offset voltage as a reference offset voltage based on the temperature difference.

[0064] This application uses temperature compensation as a way to obtain the initial offset voltage, which can quickly obtain a reasonable initial offset value using temperature information, thereby reducing the number of subsequent iterations.

[0065] Unlike the open-loop schemes in the prior art that rely solely on temperature compensation, the temperature compensation in this embodiment is only used to provide an initial value, and subsequent fine-tuning is still performed through closed-loop iteration, thus combining the speed of temperature compensation with the accuracy of closed-loop iteration.

[0066] The flash memory controller is equipped with a temperature sensor to acquire the ambient temperature. When writing data, the controller stores the current temperature as metadata along with the data (e.g., in a spare area of ​​the physical page). When reading, the controller reads this metadata to obtain the write temperature, and simultaneously obtains the current read temperature from the temperature sensor, calculating the temperature difference.

[0067] Methods for determining the initial offset voltage based on the temperature difference may include: looking up the value in a preset temperature-offset correspondence table, or calculating it using a linear fitting formula.

[0068] In at least one possible implementation, the initial value of the reference offset voltage is determined by the read / write temperature difference of the target physical page in the following two specific ways: Method 1: In response to a physical page read error, look up the preset read retry table to obtain the reference offset voltage corresponding to the read / write temperature difference of the physical page.

[0069] Method 2: After obtaining the read / write temperature difference of the physical page, perform linear fitting on the read / write temperature difference to obtain the corresponding reference offset voltage.

[0070] This application provides two specific temperature compensation implementation methods, which can flexibly adapt to different system configurations and accuracy requirements. The lookup table method is simple and fast; the linear fitting method has higher accuracy and does not require storing a large table.

[0071] Regardless of the method used to obtain the initial offset voltage, the subsequent closed-loop iterative fine-tuning mechanism functions correctly, further correcting any potential errors in temperature compensation. This two-step architecture of "temperature coarse adjustment + closed-loop fine adjustment" combines efficiency and accuracy.

[0072] The two methods above can be selected or combined depending on the actual situation. For example, when storage resources are sufficient, the lookup table method (fast) can be used, while when higher precision is required, the linear fitting method (high accuracy) can be used.

[0073] In at least one possible implementation, the bit-inversion threshold of this application embodiment is equal to the maximum number of error-correctable bits of a single physical page for the ECC in soft decoding mode multiplied by a preset security factor, wherein the security factor is greater than 0 and less than or equal to 1.

[0074] The safety factor θ (0 < θ ≤ 1) provides a safety margin to prevent ECC from failing to correct errors when the actual bit flip number is slightly higher than the bit flip number threshold Kmin due to measurement errors or changes in operating conditions. The safety factor θ can be adjusted according to system reliability requirements.

[0075] In actual operation, before triggering a read error, the flash controller first reads the maximum correctable bit width C and the security factor θ, calculates Kmin = C × θ, and uses Kmin as the preset bit flip threshold. If the ECC supports multiple decoding modes, the maximum correctable bit width C can be the error correction capability value corresponding to the currently used decoding mode.

[0076] In at least one possible implementation, embodiments of this application further include: In step S500, during the iteration process, it is determined whether the newly determined reference offset voltage exceeds the preset offset voltage search range. If so, it is determined that a valid optimal read offset voltage cannot be found, and the iteration is terminated.

[0077] NAND flash memory has a physically reasonable read offset voltage range. If the offset voltage is too large, it may cause the read operation to exceed the voltage range supported by the chip, or even render the read data completely unusable. Therefore, a safe search range needs to be preset. During the iteration process, if the candidate offset voltage exceeds this range, it means that under the current physical page state, an offset voltage that reduces the bit flip number to below the bit flip number threshold Kmin cannot be found within a reasonable offset voltage range. At this point, continuing the iteration is meaningless, and the iteration can be terminated and a read failure reported, handing the case over to higher layers, such as more advanced error correction mechanisms or data recovery processes.

[0078] Please refer to Figure 3 In at least one possible implementation, the embodiments of this application further include a confidence level determination step after determining the reference offset voltage and before performing three-level readings: In step S101, the confidence level of the reference offset voltage is obtained.

[0079] In step S102, it is determined whether the confidence level is higher than a preset confidence threshold. If so, the reference offset voltage is directly used as the optimal read offset voltage, without the need for three-level reading and iteration.

[0080] In the embodiments of this application, the reference offset voltage can be obtained in various ways. The reliability (confidence level) of the reference offset voltage varies depending on the source. For example, if the reference offset voltage is obtained from a read repetition table, it indicates that it has been successful under the same operating conditions, and its confidence level is high; if the reference offset voltage is calculated from a temperature compensation model, its confidence level is moderate due to potential errors in the model; if the reference offset voltage is a default value, its confidence level is the lowest.

[0081] This application embodiment judges the confidence level of the reference offset voltage: when the confidence level of the reference offset voltage is higher than the preset confidence threshold, it means that the reference offset voltage is reliable enough and there is no need to perform three-level iterative fine-tuning. It can be used directly, avoiding unnecessary iteration overhead and further improving reading efficiency.

[0082] This application's embodiment adds a pre-judgment step before the iterative fine-tuning process; high-confidence steps proceed directly, while low-confidence steps enter the fine-tuning process. This adaptive process control allows the method to dynamically adjust the processing path based on the reliability of the initial offset while ensuring accuracy, thus maximizing efficiency.

[0083] In at least one possible implementation, the embodiments of this application are triggered upon failure of the default read voltage. The failure of the default read voltage is triggered by any of the following: ECC verification failure, data decoding failure, or bit error rate exceeding a preset threshold.

[0084] In the normal read process, the flash memory controller first performs a read operation using the default read voltage. The read data undergoes ECC verification. If the ECC verification passes, the read is successful and the data is returned directly; if the ECC verification fails (or data decoding fails, or the bit error rate exceeds a preset threshold), it indicates that the number of data errors under the default read voltage exceeds the error correction capability of the ECC. In this case, the embodiments of this application need to be triggered to find a better read offset voltage to reduce the bit flip number so that the data can be corrected by the ECC.

[0085] The bit error rate threshold can be set to a certain percentage of the ECC error correction capability (e.g., 80%). When the bit error rate exceeds this threshold, it is triggered in advance, even if the ECC has not completely failed. This "early warning" mechanism further improves the read success rate.

[0086] This application embodiment, by combining a unique "threshold anchoring direction judgment logic" (e.g., left when k0 < Kmin≤ k1, right when k1 < Kmin≤ k0), can still guarantee fast and reliable convergence to the engineering optimal solution even when using only low-precision hard bit information.

[0087] Based on the same concept as the above embodiments, this application also provides a flash memory error correction method applied to a flash memory storage device. The flash memory error correction method of this application uses the optimal read offset voltage determined by the optimal read offset voltage determination method described in any of the foregoing embodiments to retry reading failed physical pages.

[0088] Flash memory error correction methods are upper-level processes in NAND flash memory storage systems, responsible for error correction when data read failures occur. This application embeds the optimal read offset voltage determination method provided in the aforementioned embodiments into the flash memory error correction process. When reading a physical page fails (ECC check failure), the optimal read offset voltage determination method is invoked to determine the optimal read offset voltage. The physical page is then reread using this optimal offset voltage (i.e., read retry). After successful reading, the data undergoes ECC check and is returned, thus achieving data error correction.

[0089] Please refer to Figure 4 Based on the same concept as the above embodiments, this application also provides a flash memory controller, including a processing unit 101 and a storage unit 102. The storage unit 102 is used to store computer program code, which includes computer instructions. The processing unit 101 reads the computer instructions from the storage unit 102, so that the processing unit 101 executes the steps of the optimal read offset voltage determination method or the flash memory error correction method in any possible implementation of any of the foregoing embodiments.

[0090] The flash memory controller 100 is the core component of the NAND flash memory storage device, responsible for managing data writing, reading, erasing and other operations on the NAND storage medium 200.

[0091] The processing unit 101 (such as a CPU, MCU, or dedicated processor) is the core of the flash memory controller 100 and is responsible for executing firmware instructions. The storage unit 102 (such as ROM, SRAM, or embedded Flash) is used to store firmware code and data.

[0092] Please refer to Figure 5 Based on the same concept as the above embodiments, this application also provides a flash memory storage device, including two main parts: a flash memory controller 100 as described in any of the foregoing embodiments and a NAND storage medium 200. The flash memory controller in this application is the same as the flash memory controller 100 described in any of the foregoing embodiments. The flash memory controller 100 is electrically connected to the NAND storage medium 200 via a NAND interface (such as an ONFI or Toggle interface) to send commands and addresses and transmit data.

[0093] Flash storage devices can be various forms of storage products such as solid-state drives (SSDs), SD cards, microSD cards, eMMC devices, and UFS devices. The connection between the flash controller and the NAND storage medium 200 can be a multi-channel parallel connection to improve data transfer bandwidth. The NAND storage medium 200 can be an SLC, MLC, TLC, or QLC type NAND flash memory chip.

[0094] Hereinafter, the reference offset voltage determined based on temperature and raw data is taken as an example to describe in detail the specific implementation flow of the optimal read offset voltage determination method of the present application.

[0095] When using a data block, record the write data temperature T1 of the data block; When reading data of the data block, if reading fails with a default read voltage, a read offset voltage needs to be set to enable successful data reading, and record the read temperature T2 at this time; Through multiple linear regression fitting formulas, a reference voltage offset value Level1 is obtained, which is quickly fitted with the read-write temperature difference T2-T1 as an input parameter; The above reference voltage offset value Level1 only considers the difference between read and write temperatures. To obtain a more accurate voltage offset value, a method of comparing read raw data is further used to determine the voltage offset value. Set the voltage offset step size to m, and respectively adopt voltage offset values: a first candidate offset voltage Level1 - m, the reference offset voltage Level1, and a second candidate offset voltage Level1+ m to read raw data data0, data1 and data2 of the physical page. The number of raw data bit flips of data0 and data1 is marked as k0, and the number of raw data bit flips of data1 and data2 is marked as k1; Compare k0 and k1 with a minimum flip number threshold Kmin acceptable by ECC: If k0<Kmin and k1<Kmin, then Level1 is the optimal read offset voltage that can be found; If k1>Kmin>k0 or k1>k0>Kmin, set the offset voltage Level1-m as a new reference offset voltage Level2; If k0>Kmin>k1 or k1>k0>Kmin, set Level1+m as a new reference offset voltage Level2; According to the new reference offset voltage Level2, set a new first candidate offset voltage Level2-m and a new second candidate offset voltage Level2+m; Continue offset iteration using iterative voltages Level2-m, Level2, Level2+m until a reference offset voltage meeting conditions is obtained; If the reference offset voltage Level1+m meeting the conditions > Level_max, it indicates that no optimal read offset voltage can be found for the state of the physical page; Otherwise, the reference offset voltage that meets the conditions is determined as the optimal read offset voltage. The optimal read offset voltage and its corresponding read / write temperature difference are recorded in the read retest table. If the default read voltage fails to read again, the optimal offset read voltage can be obtained by directly looking up the read retest table based on the temperature difference. If the temperature difference parameter is not in the read retest table, the above steps can be repeated to find the optimal read offset voltage.

[0096] The method for quickly determining the optimal read offset voltage based on temperature and raw data provided in this example has at least the following advantages: By recording the temperature T1 when writing the data block and the reading temperature T2 when the default read fails, and using the temperature difference ΔT=T2-T1 as the input parameter, a reference offset voltage value Level1 is quickly obtained through linear regression fitting. Thus, a reasonable initial offset benchmark is established using temperature information before the iteration begins, which greatly shortens the convergence path of subsequent iterations and significantly improves the overall search efficiency.

[0097] Based on the coarse temperature adjustment, a closed-loop iterative mechanism of reading and comparing the original data is further adopted for fine adjustment: the original data is read by three offset voltages: the first candidate offset voltage Level1 - m, the reference offset voltage Level1, and the second candidate offset voltage Level1 + m, and the bit inversion numbers k0 and k1 between two adjacent sets of data are counted. The bit inversion numbers are compared with the minimum inversion number threshold Kmin that ECC can accept. According to the different situations of the comparison results, the iteration direction (towards the direction of voltage decrease or increase) is directly determined. Only when neither side can be corrected by ECC will it fall back to the comparison of numerical magnitude. This realizes a hierarchical decision-making strategy based on the threshold priority and comparison fallback of ECC error correction capability, which effectively avoids excessive iteration caused by blindly pursuing mathematical optimality.

[0098] In this example, the bit inversion number threshold Kmin is set according to the error correction capability of ECC, which moves the ECC error correction capability forward to the active decision-making basis of iterative search. Once the bit inversion number k0 and the bit inversion number k1 are both less than the bit inversion number threshold Kmin, the iteration stops immediately. This ensures the success rate of reading while minimizing the number of iterations and reading latency, achieving a balance between efficiency and reliability.

[0099] Furthermore, after successfully finding the optimal read offset voltage each time, the optimal read offset voltage and its corresponding read / write temperature difference are recorded in the read retry table, forming a dynamic self-learning closed-loop feedback mechanism. Subsequent read scenarios with the same or similar temperature differences can directly look up the offset voltage in the table without re-iteration, further improving read performance in long-term use; for cases where the temperature difference is not matched, the above process is repeated, ensuring the integrity and universality of the solution.

[0100] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the steps in the optimal read offset voltage determination method or flash memory error correction method of any possible implementation of any of the foregoing embodiments.

[0101] The optimal read offset voltage determination method, flash memory error correction method, flash memory controller, flash memory storage device, and computer program product provided in this application can be widely applied to various devices that use NAND flash memory as the storage medium, including but not limited to solid-state drives, memory cards, embedded storage devices, mobile terminals, and IoT devices. This invention can significantly improve the read reliability and performance of NAND flash memory under various operating conditions and has broad industrial practical value.

[0102] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0103] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for determining the optimal read offset voltage, applied to flash memory storage devices, characterized in that, The method for determining the optimal read offset voltage includes: The original data of the target physical page is read using the reference offset voltage, the first candidate offset voltage, and the second candidate offset voltage, respectively, to obtain the first bit inversion number of the reference offset voltage relative to the first candidate offset voltage and the second bit inversion number of the second candidate offset voltage relative to the reference offset voltage. In response to the fact that both the first bit inversion number and the second bit inversion number are less than a preset bit inversion number threshold, the reference offset voltage is determined as the optimal read offset voltage. The preset bit inversion number threshold is determined based on the ECC error correction capability of the flash memory storage device. If the first bit-inversion number is less than the bit-inversion number threshold and the second bit-inversion number is greater than or equal to the bit-inversion number threshold, then the first candidate offset voltage is used as the reference offset voltage for the next iteration. If the second bit-inversion number is less than the bit-inversion number threshold and the first bit-inversion number is greater than or equal to the bit-inversion number threshold, then the second candidate offset voltage is used as the reference offset voltage for the next iteration. If both the first bit inversion number and the second bit inversion number are greater than or equal to the bit inversion number threshold, then the one with the smaller bit inversion number is selected as the redefined reference offset voltage. After updating the first candidate offset voltage and the second candidate offset voltage based on the reference offset voltage, the above steps are executed iteratively.

2. The method for determining the optimal read offset voltage according to claim 1, characterized in that, After determining the reference offset voltage as the optimal read offset voltage, the method further includes: The correlation parameters between the optimal read offset voltage and the current operating condition are stored in a preset read retest table. The correlation parameters include at least one of the following: current read temperature, number of wear cycles of the storage block, and data retention time.

3. The method for determining the optimal read offset voltage according to claim 1, characterized in that, Also includes: If the redefined reference offset voltage exceeds the preset offset voltage search range, it is determined that an effective optimal read offset voltage cannot be found, and the iteration is terminated.

4. The method for determining the optimal read offset voltage according to claim 3, characterized in that, The initial value of the reference offset voltage is determined by the read / write temperature difference of the target physical page.

5. The method for determining the optimal read offset voltage according to claim 4, characterized in that, The initial value of the reference offset voltage is determined by the read / write temperature difference of the target physical page, specifically including: In response to a physical page read error, a preset read retry table is consulted to obtain the reference offset voltage corresponding to the read / write temperature difference of that physical page.

6. The method for determining the optimal read offset voltage according to claim 4, characterized in that, The initial value of the reference offset voltage is determined by the read / write temperature difference of the target physical page, specifically including: After obtaining the read / write temperature difference of the physical page, a linear fit is performed on the read / write temperature difference to obtain the corresponding reference offset voltage.

7. The method for determining the optimal read offset voltage according to claim 1, characterized in that, The first candidate offset voltage and the second candidate offset voltage are obtained by shifting the reference offset voltage forward and backward by a preset step size, respectively.

8. The method for determining the optimal read offset voltage according to claim 1, characterized in that, The bit-inversion threshold is equal to the maximum number of error-correctable bits per physical page in ECC soft decoding mode multiplied by a preset security factor, wherein the security factor is greater than 0 and less than or equal to 1.

9. The method for determining the optimal read offset voltage according to claim 1, characterized in that, After determining the reference offset voltage of the target physical page, the following is included: Obtain the confidence level of the reference offset voltage; If the confidence level is higher than the preset confidence threshold, then the reference offset voltage is directly used as the optimal read offset voltage.

10. The method for determining the optimal read offset voltage according to claim 1, characterized in that, The method is triggered upon failure of the default read voltage; the failure of the default read voltage is triggered by any of the following situations: ECC verification failure, data decoding failure, or bit error rate exceeding a preset threshold.

11. The method for determining the optimal read offset voltage according to claim 1, characterized in that, The raw data refers to the raw bit sequence directly sensed from the flash memory storage unit without error checking and correction processing; the bit inversion number is obtained by comparing each bit of two adjacent sets of raw data and counting the number of bit inversions.

12. A flash memory error correction method, applied to a flash memory storage device, characterized in that, The optimal read offset voltage determined by the optimal read offset voltage determination method as described in any one of claims 1-11 is used to retry reading the failed physical page.

13. A flash memory controller, characterized in that, It includes a processing unit and a storage unit, the storage unit being used to store computer program code, the computer program code including computer instructions, the processing unit reading the computer instructions from the storage unit to cause the processing unit to perform the steps in the optimal read offset voltage determination method as described in any one of claims 1-11 or the flash memory error correction method as described in claim 12.

14. A flash memory storage device, characterized in that, It includes the flash memory controller as described in claim 13.

15. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the steps of the optimal read offset voltage determination method as described in any one of claims 1-11 or the flash memory error correction method as described in claim 12.

Citation Information

Patent Citations

  • Gear shifting method and system for NAND rereading gear, and related assembly

    CN114049910A

  • Read algorithm for memory device

    US20210398581A1