Retry threshold table generation method and device and storage medium

By generating multiple threshold points in the flash memory system and sorting, the problem of increasing retry times caused by changes in the threshold voltage in the prior art is solved, and more efficient data reading and longer flash hardware life are achieved.

CN119649882APending Publication Date: 2025-03-18YEESTOR MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411841767.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When generating a retry threshold table, the prior art cannot effectively deal with the threshold voltage changes caused by time, temperature and environmental factors, resulting in an increase in the number of retry times and accelerated wear of flash hardware.

Method used

By obtaining the target threshold voltage range, multiple threshold points are generated on the preset coordinate system, the target average threshold points and other threshold points under the data holding time are determined, and the retry threshold table is generated by sorting from large to small distance.

Benefits of technology

Improves the accuracy and efficiency of data reading, reduces the number of retry times, and extends the service life of flash memory hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649882A_ABST
    Figure CN119649882A_ABST
Patent Text Reader

Abstract

The invention discloses a retry threshold table generation method and device and a storage medium, and relates to the technical field of memorizers, and the method comprises the steps: obtaining a target threshold voltage range, and generating a plurality of threshold points on a preset coordinate system according to the target threshold voltage range; determining a threshold point corresponding to the target average threshold under the data retention time as a first threshold point, and determining at least one second threshold point in the plurality of threshold points, the second threshold point being a threshold point which is not determined as the first threshold point; obtaining the distance from each threshold point to the origin of the coordinates, and according to the sequence of the distances from large to small, sorting the first threshold points, and then sorting the second threshold points; and generating a retry threshold table according to a sorting result. According to the method and the device, the retry threshold table which meets the requirement of a read retry mechanism and has fewer retry times can be generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of memory technology, and in particular to a method, device and storage medium for generating a retry threshold table. Background Art

[0002] During long-term use of the flash storage system, due to the cumulative effect of programming and erasing and charge leakage caused by the passage of time, its threshold voltage will gradually change, resulting in data read failure. When data read fails, the flash controller will try to retry reading according to the retry read threshold recorded in the retry threshold table.

[0003] At present, when generating a retry threshold table, the thresholds are usually sorted from low to high according to the bit error rate, and the corresponding thresholds are listed in each bit error rate range. However, the threshold voltage will change with the change of time, temperature and other environmental factors. The offset of the threshold voltage may cause the bit error rate of the read data to change. Therefore, the bit error rate corresponding to a certain threshold determined in the test phase will change in actual application. This leads to an increase in the number of retries and accelerated wear of the flash memory hardware.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present application is to provide a retry threshold table generation method, device and storage medium, aiming to solve the technical problem of how to generate a retry threshold table that meets the requirements of a read retry mechanism and has a small number of retries.

[0006] To achieve the above objectives, the present application proposes a method for generating a retry threshold table, the method comprising:

[0007] Acquire a target threshold voltage range, and generate a plurality of threshold points on a preset coordinate system according to the target threshold voltage range;

[0008] Determine a threshold point corresponding to the target average threshold value under the data retention time as a first threshold point, and determine at least one second threshold point from the plurality of threshold points, wherein the second threshold point is a threshold point that is not determined as the first threshold point;

[0009] Obtain the distance from each threshold point to the coordinate origin, and sort the first threshold points first and then the second threshold points in descending order of distance;

[0010] A retry threshold table is generated based on the sorting results.

[0011] In one embodiment, before the step of obtaining the target threshold voltage range and generating a plurality of threshold points on a preset coordinate system according to the target threshold voltage range, the step further includes:

[0012] Perform extreme usage scenario tests on flash memory devices;

[0013] Obtain the threshold voltage range and corresponding performance parameters in the extreme usage scenario test;

[0014] The target threshold voltage range is determined based on the performance parameters.

[0015] In one embodiment, the step of obtaining the threshold voltage range and the corresponding performance parameters in the extreme usage scenario test includes:

[0016] When the number of erase and write cycles of the flash memory device reaches a preset number, acquiring and writing the test data into the flash memory device;

[0017] Read the test data according to a preset time series, and obtain the threshold voltage and read success rate used in the reading process;

[0018] Confirm the target threshold voltage range based on the read success rate.

[0019] In one embodiment, the steps of obtaining a target threshold voltage range and generating a plurality of threshold points on a preset coordinate system according to the target threshold voltage range include:

[0020] Constructing a plane coordinate system, and converting the target threshold voltage range into coordinate points on the plane coordinate system;

[0021] Determine the minimum convex polygon containing all the coordinate points according to the convex hull algorithm to obtain the threshold voltage convex hull;

[0022] A plurality of threshold points are generated within the threshold voltage convex hull.

[0023] In one embodiment, the step of generating a plurality of threshold points in the threshold voltage convex hull comprises:

[0024] Divide the interior of the threshold voltage convex hull into multiple annular regions;

[0025] Get the effective threshold voltage range of the flash memory device;

[0026] Calculate the number of threshold points to be generated in each annular area according to the radius of the annular area and the effective threshold voltage range;

[0027] Generate threshold points based on quantity.

[0028] In one embodiment, the step of calculating the number of threshold points to be generated in each annular region according to the radius of the annular region and the effective threshold voltage range includes:

[0029] Determine the density function based on the radius of the annular region;

[0030] Determine a weight factor according to the radius of the annular area and the effective threshold voltage range;

[0031] The number of the threshold points in each of the annular regions is determined according to the density function and the weight factor.

[0032] In one embodiment, the step of determining a threshold point corresponding to a target average threshold value under a data retention time as a first threshold point, and determining at least one second threshold point from a plurality of threshold points comprises:

[0033] Determine a target average threshold value under data retention time;

[0034] The moving direction of the target average threshold is used as the main axis, and a fan-shaped area is formed according to a preset angle with the main axis as the center;

[0035] The threshold point within the sector-shaped area is determined as a first threshold point, and the threshold point outside the sector-shaped area is determined as a second threshold point.

[0036] In one embodiment, the moving direction of the target average threshold is used as the main axis, and the step of forming a sector-shaped area according to a preset angle with the main axis as the center includes:

[0037] Performing data fitting on the data holding time and the corresponding target average threshold value to obtain a linear relationship between the data holding time and the target average threshold value;

[0038] The linear relationship is used as the main axis, and the fan-shaped area is formed according to a preset angle with the main axis as the center.

[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a retry threshold table generating device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the retry threshold table generating method as described above.

[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the retry threshold table generation method as described above are implemented.

[0041] The present application provides a method for generating a retry threshold table. First, a target threshold voltage range is obtained, and multiple threshold points are generated on a preset coordinate system according to the target threshold voltage range. By determining the target threshold voltage range, it can be ensured that the threshold points generated subsequently are all located in an area where data can be stably read, thereby improving the accuracy of data reading. By generating multiple threshold points on a coordinate system, a wider voltage range can be covered to cope with the threshold voltage changes of different flash memory cells in different states. Secondly, the threshold point corresponding to the target average threshold under the data retention time is determined as the first threshold point, and the remaining threshold points are determined as the second threshold point; by determining the average optimal threshold corresponding to the data retention time, it can be ensured that when data reading fails, the retry mechanism can use the threshold closest to the optimal threshold under the current data retention time for retry, thereby improving the success rate of data recovery. Finally, the distance from each threshold point to the origin of the coordinate is obtained, and the first threshold point is sorted first and then the second threshold point is sorted in order of distance from large to small, and a retry threshold table is generated according to the sorting result. By sorting and trying the first threshold point first, a valid threshold point can be found faster, the number of unnecessary attempts can be reduced, and the reading efficiency can be improved. The generated retry threshold table contains threshold points that are optimized and sorted, which can provide an effective retry solution when data reading fails, reduce performance loss caused by multiple attempts at inappropriate thresholds, and enable the flash memory to recover data in the shortest possible time, thereby optimizing its overall performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 A flowchart of the first embodiment of the method for generating a retry threshold table of the present application is provided;

[0045] Figure 2 A flowchart of the second embodiment of the method for generating a retry threshold table of the present application is provided;

[0046] Figure 3 A flowchart of the third embodiment of the method for generating a retry threshold table of the present application is provided;

[0047] Figure 4 Another flowchart diagram provided for the third embodiment of the method for generating a retry threshold table of the present application;

[0048] Figure 5 A flowchart diagram of a fourth embodiment of the method for generating a retry threshold table of the present application is provided;

[0049] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the retry threshold table generation method in the embodiment of the present application. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0052] The main solution of the embodiment of the present application is: obtain the target threshold voltage range, and generate multiple threshold points on a preset coordinate system according to the target threshold voltage range; determine the threshold point corresponding to the target average threshold under the data retention time as the first threshold point, and determine at least one second threshold point among the multiple threshold points, wherein the second threshold point is a threshold point that has not been determined as the first threshold point; obtain the distance from each threshold point to the coordinate origin, and sort the first threshold points first and then sort the second threshold points in order of distance from large to small; generate a retry threshold table according to the sorting result.

[0053] At present, when generating a retry threshold table, the thresholds are usually sorted from low to high according to the bit error rate, and the corresponding thresholds are listed in each bit error rate range. However, the threshold voltage will change with the change of time, temperature and other environmental factors. The offset of the threshold voltage may cause the bit error rate of the read data to change. Therefore, the bit error rate corresponding to a certain threshold determined in the test phase will change in actual application. This leads to an increase in the number of retries and accelerated wear of the flash memory hardware.

[0054] In order to solve the above problems, the present application provides a method for generating a retry threshold table. The present application provides a method for generating a retry threshold table. First, a target threshold voltage range is obtained, and multiple threshold points are generated on a preset coordinate system according to the target threshold voltage range. By determining the target threshold voltage range, it can be ensured that the threshold points generated subsequently are all located in an area where data can be stably read, thereby improving the accuracy of data reading. Generating multiple threshold points on a coordinate system can cover a wider voltage range to cope with the threshold voltage changes of different flash memory cells in different states. Secondly, the threshold point corresponding to the target average threshold under the data retention time is determined as the first threshold point, and the remaining threshold points are determined as the second threshold point; by determining the average optimal threshold corresponding to the data retention time, it can be ensured that when data reading fails, the retry mechanism can use the optimal threshold closest to the current data retention time for retry, thereby improving the success rate of data recovery. Finally, the distance from each threshold point to the coordinate origin is obtained, and the first threshold point is sorted first and then the second threshold point in order of distance from large to small, and a retry threshold table is generated according to the sorting result. By sorting and trying the first threshold points first, effective threshold points can be found more quickly, reducing the number of unnecessary attempts and improving reading efficiency. The generated retry threshold table contains threshold points that have been optimized and sorted, which can provide an effective retry solution when data reading fails, reduce performance loss caused by multiple attempts at inappropriate thresholds, and enable the flash memory to recover data in the shortest possible time, thereby optimizing its overall performance.

[0055] It should be noted that the execution subject of this embodiment can be a computing service device with network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, Nandflash and its corresponding controller, SSD (Solid State Drive, solid state drive) and its corresponding controller, etc., or an electronic device or device capable of realizing the above functions. The following takes a flash memory storage device as an example to illustrate this embodiment and the following embodiments.

[0056] Based on this, the embodiment of the present application provides a method for generating a retry threshold table, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for generating a retry threshold table of the present application.

[0057] In this embodiment, the method for generating a retry threshold table may include steps S100 to S400:

[0058] Step S100 , obtaining a target threshold voltage range, and generating a plurality of threshold points on a preset coordinate system according to the target threshold voltage range.

[0059] It should be noted that the Retry Threshold Table (RRT) is a mechanism or data structure used in flash storage devices to optimize read operations. The Retry Threshold Table usually contains a set of preset threshold voltages that are used to adjust the read sense voltage during the read process to try to correct data errors caused by voltage offsets and other reasons. When the flash controller attempts to read a flash cell for the first time, if the read result is not as expected (for example, ECC (Error Correction Coding) verification fails), it adjusts the read sense voltage to the next threshold specified in the RRT and tries to read the data again. This process may be repeated multiple times until the correct data is found or the maximum number of retries is reached. The design and optimization of the RRT is critical to improving the performance and reliability of flash storage devices. An effective RRT can significantly reduce the probability of read failures, reduce bit error rates, and reduce delays and data loss caused by read errors.

[0060] In the present application, the target threshold voltage range may be an optimal threshold voltage range, which refers to a voltage threshold range corresponding to when the flash memory cell can stably read data, and this threshold range statistically exhibits optimal performance.

[0061] In this embodiment, a target threshold voltage range determined by a test experiment is obtained, and multiple threshold points are generated within the target threshold voltage range on a preset coordinate system. The threshold points represent different threshold voltage values ​​that may be used in subsequent read operations.

[0062] Step S200, determining a threshold point corresponding to a target average threshold value under a data retention time as a first threshold point, and determining at least one second threshold point from a plurality of threshold points, wherein the second threshold point is a threshold point that is not determined as the first threshold point;

[0063] It should be noted that data retention time refers to the length of time that data written to the flash memory can remain valid under certain conditions. This length of time is an important indicator of flash memory performance, which reflects the stability and reliability of flash memory storage data.

[0064] In addition, it should be noted that the target average threshold can be an average optimal threshold, which refers to the average value of the threshold voltage corresponding to the flash memory cell being able to read data most accurately and reliably under specific conditions (such as high P / E cycles, high retention time, specific read and write modes, etc.), representing the optimal reading point of the flash memory cell under these conditions.

[0065] In this embodiment, a first threshold point corresponding to different data retention times and the average optimal threshold value of the data retention time is determined from the threshold points, and the remaining threshold points are determined as second threshold points. When determining the first threshold point, the optimal threshold data range corresponding to different data retention times obtained through experiments is obtained, and the average optimal threshold is calculated based on the optimal threshold data range. By determining the average optimal threshold corresponding to different data retention times, it can be ensured that when data reading fails, the retry mechanism can use the optimal threshold value closest to the current data retention time for retry, thereby improving the success rate of data recovery.

[0066] Step S300, obtaining the distance from each threshold point to the coordinate origin, and sorting the first threshold points first and then the second threshold points in descending order of distance.

[0067] In this embodiment, the distance from each threshold point to the coordinate origin is calculated, and the first threshold points are sorted first, and then the second threshold points are sorted in descending order of distance.

[0068] In this embodiment, the points within the sector area are sorted first, and then the points outside the area are sorted. The points within the sector area represent the optimal or near-optimal working state under different data retention time conditions. Prioritizing and considering the points within the sector area can more quickly find a threshold voltage that performs well in terms of data retention time. Reducing performance loss caused by multiple attempts at inappropriate thresholds enables the flash memory to recover data in the shortest possible time, thereby optimizing its overall performance.

[0069] Step S400: Generate a retry threshold table according to the sorting result.

[0070] In this embodiment, a table is created to store the sorted points. The columns of the table can contain the coordinates, distances, read / write performance and other indicators of the points as needed. First, the sorted points in the sector area are filled into the table in order. Then, the remaining sorted points are filled into the table in order to obtain a retry threshold table. The retry threshold table lists all threshold points in order of priority, and the flash memory controller can try different threshold voltages in the order in the table when reading data until a threshold voltage that can correctly read the data is found.

[0071] In this embodiment, based on the sorted point set, the generated retry threshold table contains threshold points with optimized sorting, which can provide an effective retry solution when data reading fails, reduce the performance loss caused by multiple attempts at inappropriate thresholds, and enable the flash memory to recover data in the shortest possible time, thereby optimizing its overall performance.

[0072] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S100, obtaining a target threshold voltage range, and generating a plurality of threshold points on a preset coordinate system according to the target threshold voltage range may also include steps S110 to S130:

[0073] Step S110 , constructing a plane coordinate system, and converting the target threshold voltage range into coordinate points on the plane coordinate system.

[0074] Step S120 , determining the minimum convex polygon containing all coordinate points according to the convex hull algorithm to obtain the threshold voltage convex hull.

[0075] Step S130 , generating a plurality of threshold points in the threshold voltage convex hull.

[0076] It should be noted that the convex hull refers to the smallest convex polygon that contains all the points in a set of points. In a two-dimensional plane, the convex hull consists of one or more points in the point set, which are connected by line segments to form a polygon without concave parts, and the polygon can enclose all the points in the point set.

[0077] In this implementation, first, a plane coordinate system is defined, and each optimal threshold voltage is converted into a coordinate point on the plane coordinate system. Each coordinate point represents the optimal threshold voltage under specific conditions. Secondly, a convex hull algorithm is used to find the smallest convex polygon containing all coordinate points. The convex hull algorithm can ensure that all points are on or inside the edge of the polygon, and the number of edges of the polygon is the smallest. The threshold voltage convex hull represents the distribution range of the optimal threshold voltage under different conditions. Finally, multiple threshold points are generated as needed inside the threshold voltage convex hull.

[0078] Optionally, the convex hull is constructed according to the Graham scan method. The Graham scan method is an algorithm that finds the bottom point in the point set, takes the leftmost point as the starting point if there are multiple points on the same line, and then sorts them by polar angles, and maintains the convex hull vertices through a stack. First, find the point with the smallest y coordinate. If there are multiple points with the same y coordinate, select the point with the smallest x coordinate as the starting point P0. Take P0 as the pole and sort the remaining points according to the angle between their line connecting P0 and the positive direction of the x-axis. If the angles are the same, sort them according to their distance from P0. Secondly, construct the convex hull, initialize an empty stack, and push P0 and the next point P1 after sorting into the stack. Starting from P2, traverse the sorted point set and pop the top element of the stack until the stack is empty or the current top element of the stack and the newly examined point form a direction to turn left (that is, the vector cross product formed by the two top points of the stack and the new point is positive). After the traversal is completed, the points in the stack are the vertices of the convex hull, and the convex hull can be obtained by connecting them in the order of the stack (first in, last out).

[0079] Optionally, the convex hull is constructed according to Andrew's monotone chain algorithm. Andrew's monotone chain algorithm, also known as the wrapping algorithm, divides the point set into two chains, upper and lower, and then constructs the convex hulls of the two chains respectively, and finally merges the two convex hulls. First, sort the point set by x coordinates. If the x coordinates are the same, sort them by y coordinates. Second, construct the lower convex hull and initialize an empty stack. Traverse the sorted point set. For each point P, if there are at least two points in the stack and the vector formed by point P and the first two stack vertices is counterclockwise (the cross product is negative), pop the top element of the stack and push P into the stack. Second, construct the upper convex hull. Since the point set is already sorted by x coordinates, you can directly start from the last point and traverse forward (that is, the reverse order of the original traversal). For each point P, traverse from back to front and perform the same checks as building the lower convex hull. If there are at least two points in the stack and the vector formed by point P and the first two stack vertices is clockwise (the cross product is positive), pop the top element of the stack. At this point, the stack already has the points of the lower convex hull, so there is no need to push P back into the stack. Then, merge the convex hulls and use the points in the stack to connect the convex hulls.

[0080] In this implementation, a convex hull is generated on a two-dimensional plane according to the optimal threshold value in the extreme usage scenario, and the convex hull provides boundary conditions for subsequent point generation, thereby ensuring that the points in the retry threshold table can cover all key threshold areas while avoiding wasting resources in unnecessary areas.

[0081] In one possible implementation, please refer to Figure 2 Step S200, taking the moving direction of the average optimal threshold value under the data retention time as the main axis, taking the main axis as the center, forming a fan-shaped area according to a preset angle, and can also include steps S210 to S230:

[0082] Step S210, determining a target average threshold value under data retention time.

[0083] Step S220, taking the moving direction of the target average threshold as the main axis, and taking the main axis as the center, forming a fan-shaped area according to a preset angle.

[0084] Step S230: determine the threshold point within the sector-shaped area as the first threshold point, and determine the threshold point outside the sector-shaped area as the second threshold point.

[0085] In this embodiment, the moving direction of the average value of the optimal threshold value under the data retention time is used as the main axis. Starting from the coordinate origin, the direction is determined along the trend line of the optimal threshold value change. After the main axis is determined, the main axis is used as the center. A fan-shaped area is formed according to a preset angle. The preset angle is a smaller angle not exceeding 15°, which can be 15° or 10°.

[0086] In this embodiment, since the data distribution of the average optimal threshold is often not linear, after the moving direction of the average optimal threshold under the data retention time is used as the main axis, there will still be a large number of data points distributed on both sides of the main axis, not on the main axis. By setting a smaller angle, and forming a fan-shaped area with the angle and the main axis, and taking the points in the fan-shaped area as the first threshold point, the point corresponding to the average optimal threshold that is not on the main axis can be used as the first threshold point, thereby improving the accuracy of the data.

[0087] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S130 may further include steps S131 to S134:

[0088] Step S131 , dividing the interior of the threshold voltage convex hull into a plurality of annular regions.

[0089] In this implementation, the coordinate origin is selected as a reference point, and the interior of the convex hull is divided into a plurality of annular regions according to the distance from the origin. Optionally, when the interior of the threshold voltage convex hull is divided into a plurality of annular regions according to the distance from the origin, the annular regions may be equidistant, and the radius increment of each annular region may also be determined according to an exponential function or a logarithmic function.

[0090] For example, when using an exponential function to divide the region, a basic radius r0 and a growth factor k are defined, and the radius rn of the nth annular region is rn=r0*kn, where n is an integer starting from 0 and represents the index of the annular region.

[0091] Step S132, obtaining a valid threshold voltage range of the flash memory device.

[0092] It should be noted that the effective threshold voltage range refers to a threshold voltage range within which data can be stably read without generating errors in a flash memory device.

[0093] When generating threshold points, the density of the points can be dynamically adjusted according to the size of the effective threshold voltage range. At the edge of the effective threshold voltage range, the density of the points is increased because the performance is relatively unstable and close to the error threshold; while within the effective threshold voltage range, the density of the points is appropriately reduced.

[0094] Step S133, calculating the number of threshold points to be generated in each annular area according to the radius of the annular area and the effective threshold voltage range.

[0095] In this embodiment, when calculating the number of points in each annular area, the radius of the annular area and the effective threshold voltage range are comprehensively considered. First, a density function D(r) can be defined, where r is the distance from the center point of the annular area to the origin (i.e., the radius). The density function can be a linear function, a nonlinear function, or an exponential function based on the distance. The density function is used to simulate the gradual increase in the density of the threshold voltage as the distance from the origin increases. Exemplarily, the density function is an exponential function, D(r) = c*exp(dr), where c and d are constants and exp is an exponential function. Secondly, a weight factor W(r) can be defined, which adjusts the density according to the relative position of the annular area and the effective threshold voltage range. If the annular area is completely within the effective threshold voltage range, w(r) can be a larger value; if the annular area only partially overlaps the effective threshold voltage range, w(r) will decrease accordingly. Finally, calculate the number of threshold points. The number of threshold points N(r) that should be generated can be given by the following formula: N(r) = floor[(A(r)*D(r)*W(r)) / Sp], where A(r) is the area of ​​the annular region, A(r) = π(router2-rinner2), router is the outer radius of the annular region, and rinner is the inner radius of the annular region. D(r) is the density function, and W(r) is a weight factor adjusted according to the effective threshold voltage range. Sp is the average area occupied by a single point. The smaller Sp is, the denser the points are. The floor() function is used to take integers, which can ensure that the number of points calculated is an integer.

[0096] Step S134, generating a threshold point according to the quantity.

[0097] In this implementation, a threshold point is randomly generated based on the calculated number. A rejection sampling method is used to check whether the point is within the convex hull immediately after it is generated. If not, it is regenerated until the condition is met. The above steps are repeated until all annular areas are traversed.

[0098] In this implementation, the points of RRT generated inside the convex hull follow the rule of "the farther, the denser", and the size of the effective window is considered as the basis for density adjustment. Through reasonable point generation and density adjustment, RRT is ensured to have higher accuracy and coverage in key areas, while reducing unnecessary retries.

[0099] In one possible implementation, please refer to Figure 4 Step S220, taking the moving direction of the target average threshold as the main axis, taking the main axis as the center, and forming a fan-shaped area according to a preset angle may also include steps S221 to S222:

[0100] Step S221 , performing data fitting on the data retention time and the corresponding target average threshold value to obtain a linear relationship between the data retention time and the target average threshold value.

[0101] Step S222: Taking the linear relationship as the main axis and centering on the main axis, a fan-shaped area is formed according to a preset angle.

[0102] In this embodiment, the threshold voltage distribution data of the flash memory device under different data retention times are collected, and the optimal threshold value under different data retention times is calculated. The optimal threshold value refers to the threshold voltage that can maximize the read and write performance or minimize the error rate under the data retention time. In the coordinate system, the data retention time is used as the horizontal coordinate and the threshold voltage is used as the vertical coordinate. The average optimal threshold value under the data retention time is regarded as a point, and the straight line where the point is located is the main axis. When performing data fitting on the data retention time and the corresponding average optimal threshold value, the data retention time is used as the independent variable X, and the corresponding average optimal threshold value is used as the dependent variable Y. Linear fitting is selected as the data fitting method, and a linear model Y=A+B*X is established, where A is the intercept term and B is the slope term. The least squares method is used to estimate the parameters A and B of the linear model to obtain the main axis.

[0103] In this embodiment, a linear relationship between the data retention time and the average value of the optimal threshold is obtained through data fitting. The linear relationship is used as the main axis, and a fan-shaped area is formed with the main axis as the center, so as to achieve visual presentation. In addition, by establishing a linear relationship model between the data retention time and the average optimal threshold, the corresponding average optimal threshold can also be predicted according to the data retention time, so as to provide support for future decision-making.

[0104] Based on the first embodiment of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 5 , before step S100, steps S01 to S03 are also included:

[0105] Step S01, performing an extreme usage scenario test on a flash memory device.

[0106] Step S02, obtaining a threshold voltage range and corresponding performance parameters in an extreme usage scenario test.

[0107] Step S03, determining a target threshold voltage range according to the performance parameters.

[0108] It should be noted that Flash Memory, also known as flash memory or read-only memory, is a non-volatile electronic memory. It can maintain stored data without external power supply, and has the characteristics of high information density, large-scale reading and writing, and short random access time. Flash memory changes the charge state in the floating gate by controlling the gate voltage, thereby realizing data reading and writing.

[0109] It should be noted that in flash memory, the erase operation (P / E) refers to the programming operation and the erase operation. The programming operation (P, Program), also known as the write operation, refers to the process of writing data into a flash memory cell. The erase operation (E, Erase) operation refers to the process of clearing the data in the flash memory cell and restoring it to its initial state. The number of erases refers to the fact that after each storage cell has undergone a certain number of programming, writing and erasing operations, its performance will be significantly reduced, and it may even no longer be able to reliably store data. This is due to the physical properties of flash memory, and each erase operation will cause certain wear and tear on the storage cell. In flash memory, the smallest unit of the erase operation is usually a block (Block) or a sector (Sector). The smallest unit of the write operation is usually a page (Page). The complete process of a flash memory cell undergoing one programming and one erasing is called a P / E cycle.

[0110] In a feasible implementation manner, the step of obtaining the threshold voltage range in the extreme usage scenario test and the corresponding performance parameters may also include the following steps:

[0111] When the number of erase and write cycles of the flash memory device reaches a preset number, the test data is acquired and written into the flash memory device.

[0112] The test data is read according to a preset time series, and the threshold voltage and read success rate used in the reading process are obtained.

[0113] Confirm the target threshold voltage range based on the read success rate.

[0114] In this embodiment, the extreme usage scenario test can be to simulate the situation where the data retention capability (Retention) of the flash memory block decreases after a large number of program / erase cycles. First, a P / E cycle test is performed to program (Program) and erase (Erase) operations on the flash memory device. The number of cycles is set according to the test requirements, such as thousands to tens of thousands of times. After each P / E cycle, the performance parameters of the device, such as read speed, write speed, error rate, etc., are recorded to monitor performance changes. After a certain number of P / E cycles are completed, the P / E operation is stopped, a set of test data is written to the flash memory device, and a long-term data retention state (Retention) is simulated. The Retention time should be long enough to observe the decrease in data retention capability. According to the test requirements, the Retention time is set, such as several hours, several days or several weeks. After the Retention time ends, a specific test method (such as Read Retry technology) is used to try to read the data in the flash memory device. During the Read Retry process, the threshold voltage used for each read attempt and the corresponding read success rate are recorded. Analyze the relationship between threshold voltage and read success rate, and determine the target threshold voltage range of the flash memory device under a given retention time and P / E cycle number.

[0115] Exemplarily, the flash memory device is repeatedly programmed and erased for 5000 P / E cycles. After the P / E cycle is completed, a set of test data is selected to be written into the flash memory device, and the device is placed at 85°C for 1000 hours to accelerate the degradation of data retention capability. After the retention time is over, the Read Retry technology is used to try to read the data, and the read threshold voltage is adjusted to try to recover the erroneous data. The read success rate is 80% at the initial threshold voltage of 2.0V, and the threshold voltage is gradually reduced to 1.8V, and the read success rate is 95%. Given the retention time and number of P / E cycles, the optimal threshold voltage of the flash memory device may be between 1.8V and 1.9V.

[0116] In another feasible implementation, the extreme usage scenario test may simulate a scenario of frequent writing but few readings or few writing but frequent readings, so as to determine the optimal threshold under different workloads.

[0117] In this embodiment, the test is performed by setting the ratio of write operations and read operations. During the test, the performance parameters of the device are recorded, and the performance parameters include but are not limited to write speed, read speed, response time and error rate. The optimal threshold voltage is determined by gradually adjusting the threshold voltage and recording the corresponding performance changes. In the test with frequent writing but less reading, the ratio of write operations to read operations in the test scheme is higher, and illustratively, the ratio of write operations to read operations is 10:1. In the test with low writing and high reading, the ratio of write operations to read operations in the test scheme is lower, and illustratively, the ratio of write operations to read operations is 1:10.

[0118] In this embodiment, by testing the flash memory under different extreme usage scenarios and using the test results as basic data for subsequent generation of RRT, it can be ensured that the threshold voltage can cover various extreme conditions that the flash memory may encounter in actual applications, thereby improving the applicability and reliability of RRT.

[0119] The present application provides a flash memory storage device, and the retry threshold table generating device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the retry threshold table generating method in the above-mentioned embodiment one.

[0120] Reference below Figure 6 , which shows a schematic diagram of the structure of a retry threshold table generating device suitable for implementing the embodiment of the present application. The retry threshold table generating device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The retry threshold table generating device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0121] like Figure 6As shown, the retry threshold table generating device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the retry threshold table generating device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the retry threshold table generation device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a retry threshold table generation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0122] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0123] The retry threshold table generation device provided by the present application adopts the retry threshold table generation method in the above embodiment, which can solve the technical problem of how to generate a retry threshold table that meets the requirements of the read retry mechanism and has a small number of retries. Compared with the prior art, the beneficial effects of the retry threshold table generation device provided by the present application are the same as the beneficial effects of the retry threshold table generation method provided by the above embodiment, and the other technical features in the retry threshold table generation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0124] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0125] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0126] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the retry threshold table generation method in the above-mentioned embodiment.

[0127] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0128] The computer-readable storage medium may be included in the retry threshold table generating device; or may exist independently without being assembled into the retry threshold table generating device.

[0129] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the retry threshold table generating device, the flash memory storage device: obtains the target threshold voltage range, and generates multiple threshold points on a preset coordinate system according to the target threshold voltage range; determines the threshold point corresponding to the target average threshold under the data retention time as the first threshold point, and determines at least one second threshold point among the multiple threshold points, wherein the second threshold point is a threshold point that has not been determined as the first threshold point; obtains the distance from each threshold point to the coordinate origin, and sorts the first threshold point first and then sorts the second threshold point in order of the distance from large to small; generates a retry threshold table according to the sorting result.

[0130] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0131] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0132] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0133] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned retry threshold table generation method, and can solve the technical problem of how to generate a retry threshold table that meets the requirements of the read retry mechanism and has a small number of retries. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the retry threshold table generation method provided by the above-mentioned embodiment, and will not be repeated here.

[0134] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. All equivalent structural changes made by using the contents of the present application specification and drawings under the technical concept of the present application, or directly / indirectly used in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for generating a retry threshold table, characterized in that: The method comprises: Acquiring a target threshold voltage range, and generating a plurality of threshold points on a preset coordinate system according to the target threshold voltage range; Determine a threshold point corresponding to a target average threshold value under a data retention time as a first threshold point, and determine at least one second threshold point among the plurality of threshold points, wherein the second threshold point is a threshold point that is not determined as the first threshold point; Obtaining the distance between each of the threshold points and the coordinate origin, and sorting the first threshold points first and then sorting the second threshold points in descending order of the distances; A retry threshold table is generated based on the sorting results.

2. The method for generating a retry threshold table according to claim 1, wherein: Before the step of obtaining the target threshold voltage range and generating a plurality of threshold points on a preset coordinate system according to the target threshold voltage range, the method further includes: Perform extreme usage scenario tests on flash memory devices; Obtaining a threshold voltage range and corresponding performance parameters in the extreme usage scenario test; The target threshold voltage range is determined according to the performance parameter.

3. The method for generating a retry threshold table according to claim 2, wherein: The step of obtaining the threshold voltage range and corresponding performance parameters in the extreme usage scenario test includes: When the number of erase and write cycles of the flash memory device reaches a preset number, acquiring and writing test data into the flash memory device; Reading the test data according to a preset time sequence, and obtaining a threshold voltage and a reading success rate used in the reading process; The target threshold voltage range is determined according to the read success rate.

4. The method for generating a retry threshold table according to claim 1, wherein: The step of obtaining a target threshold voltage range and generating a plurality of threshold points on a preset coordinate system according to the target threshold voltage range includes: Constructing a plane coordinate system, and converting the target threshold voltage range into coordinate points on the plane coordinate system; Determine the minimum convex polygon containing all the coordinate points according to the convex hull algorithm to obtain the threshold voltage convex hull; A plurality of the threshold points are generated within the threshold voltage convex hull.

5. The method for generating a retry threshold table according to claim 4, wherein: The step of generating a plurality of threshold points in the threshold voltage convex hull comprises: Dividing the interior of the threshold voltage convex hull into a plurality of annular regions; Obtaining a valid threshold voltage range of the flash memory device; Calculate the number of the threshold points to be generated in each of the annular regions according to the radius of the annular region and the effective threshold voltage range; The threshold point is generated according to the quantity.

6. The method for generating a retry threshold table according to claim 5, wherein: The step of calculating the number of the threshold points to be generated in each of the annular regions according to the radius of the annular region and the effective threshold voltage range comprises: Determining a density function according to the radius of the annular region; Determining a weight factor according to the radius of the annular area and the effective threshold voltage range; The number of the threshold points in each of the annular areas is determined according to the density function and the weight factor.

7. The method according to claim 1, characterized in that The step of determining a threshold point corresponding to a target average threshold value under the data retention time as a first threshold point, and determining at least one second threshold point from the plurality of threshold points comprises: determining the target average threshold value under the data retention time; Taking the moving direction of the target average threshold as the main axis, taking the main axis as the center, forming a fan-shaped area according to a preset angle; The threshold point within the fan-shaped area is determined as the first threshold point, and the threshold point outside the fan-shaped area is determined as the second threshold point.

8. The method for generating a retry threshold table according to claim 7, wherein: The step of taking the moving direction of the target average threshold as the main axis and taking the main axis as the center to form a fan-shaped area according to a preset angle includes: Performing data fitting on the data holding time and the corresponding target average threshold value to obtain a linear relationship between the data holding time and the target average threshold value; The linear relationship is used as the main axis, and the fan-shaped area is formed according to the preset angle with the main axis as the center.

9. A retry threshold table generating device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for generating a retry threshold table according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for generating a retry threshold table according to any one of claims 1 to 8 are implemented.