Retry threshold table generation method and device, and storage medium
By generating and sorting threshold points on a coordinate system and optimizing the retry threshold table, the bit error rate problem caused by threshold voltage changes was solved, and the data read success rate and flash memory performance were improved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- YEESTOR MICROELECTRONICS CO LTD
- Filing Date
- 2024-12-30
- Publication Date
- 2026-06-18
AI Technical Summary
Existing technologies cannot effectively address the changes in bit error rate caused by variations in threshold voltage over time, temperature, and environmental factors when generating retry threshold tables, leading to an increase in the number of retries and accelerated wear and tear on flash memory hardware.
By obtaining the target threshold voltage range, multiple threshold points are generated on a preset coordinate system. The target average threshold under the data holding time is determined as the first threshold point, and the points are sorted from largest to smallest distance to generate a retry threshold table. The sorting of threshold points is optimized to reduce unnecessary attempts.
It improves the accuracy and success rate of data reading, reduces performance loss caused by multiple attempts at inappropriate thresholds, and optimizes the overall performance of flash memory.
Smart Images

Figure CN2024143893_18062026_PF_FP_ABST
Abstract
Description
Method, equipment and storage medium for generating retry threshold table
[0001] This application claims priority to Chinese patent application No. 202411841767.7, filed on December 13, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of memory technology, and in particular to a method, apparatus and storage medium for generating a retry threshold table. Background Technology
[0003] During long-term use, flash memory storage systems experience a gradual change in their threshold voltage due to the cumulative effects of programming and erasing, as well as charge leakage over time, leading to data read failures. When a data read fails, the flash controller attempts to retry the read according to the retry threshold recorded in the retry threshold table.
[0004] Currently, when generating retry threshold tables, thresholds are typically sorted by bit error rate (BER) from low to high, and the corresponding thresholds are listed within each BER range. However, threshold voltages change with time, temperature, and other environmental factors. Deviations in threshold voltage can cause changes in the BER of read data. Therefore, the BER corresponding to a certain threshold determined during testing may differ in practical applications. This leads to an increase in the number of retries and accelerates the wear and tear on flash memory hardware.
[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Technical issues
[0006] The main objective of this application is to provide a method, device, and storage medium for generating a retry threshold table, aiming to solve the technical problem of how to generate a retry threshold table that meets the requirements of the read retry mechanism and has a low number of retries. Technical solutions
[0007] To achieve the above objectives, this application proposes a method for generating a retry threshold table, the method comprising:
[0008] Obtain the target threshold voltage range, and generate multiple threshold points on a preset coordinate system based on the target threshold voltage range;
[0009] The threshold point corresponding to the target average threshold under the data retention time is determined as the first threshold point, and at least one second threshold point is determined among multiple threshold points, wherein the second threshold point is the threshold point that was not determined as the first threshold point;
[0010] Obtain the distance from each threshold point to the origin, and sort the first threshold points in descending order of distance, then sort the second threshold points.
[0011] Based on the sorting results, a retry threshold table is generated.
[0012] In one embodiment, before the steps of obtaining the target threshold voltage range and generating multiple threshold points on a preset coordinate system based on the target threshold voltage range, the method further includes:
[0013] Perform extreme usage scenario tests on flash memory devices;
[0014] Obtain the threshold voltage range and corresponding performance parameters in extreme usage scenario testing;
[0015] Determine the target threshold voltage range based on performance parameters.
[0016] In one embodiment, the steps of obtaining the threshold voltage range and corresponding performance parameters in extreme usage scenario testing include:
[0017] Once the flash memory device has reached the preset number of erase / write cycles, the test data is acquired and written to the flash memory device.
[0018] 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.
[0019] The target threshold voltage range is determined based on the read success rate.
[0020] In one embodiment, the step of obtaining a target threshold voltage range and generating multiple threshold points on a preset coordinate system based on the target threshold voltage range includes:
[0021] Construct a planar coordinate system and convert the target threshold voltage range into coordinate points on the planar coordinate system;
[0022] The minimum convex polygon containing all the coordinate points is determined using the convex hull algorithm to obtain the threshold voltage convex hull.
[0023] Multiple threshold points are generated within the threshold voltage convex hull.
[0024] In one embodiment, the step of generating a plurality of threshold points within the threshold voltage convex hull includes:
[0025] The threshold voltage convex hull is divided into multiple annular regions;
[0026] Obtain the effective threshold voltage range of the flash memory device;
[0027] Based on the radius of the annular region and the effective threshold voltage range, calculate the number of threshold points to be generated in each annular region;
[0028] Threshold points are generated based on the quantity.
[0029] In one embodiment, the step of calculating the number of threshold points to be generated in each annular region based on the radius of the annular region and the effective threshold voltage range includes:
[0030] The density function is determined based on the radius of the annular region;
[0031] The weighting factor is determined based on the radius of the annular region and the effective threshold voltage range;
[0032] The number of threshold points in each of the annular regions is determined based on the density function and weighting factor.
[0033] In one embodiment, the step of determining a threshold point corresponding to a target average threshold during the data retention time as a first threshold point, and determining at least one second threshold point among a plurality of threshold points, includes:
[0034] Determine the target average threshold for the data retention period;
[0035] Using the direction of movement of the target average threshold as the main axis, a fan-shaped area is formed with the main axis as the center and according to a preset angle.
[0036] The threshold points within the sector area are determined as the first threshold points, and the threshold points outside the sector area are determined as the second threshold points.
[0037] In one embodiment, the step of forming a fan-shaped region with the moving direction of the target average threshold as the main axis and the main axis as the center according to a preset angle includes:
[0038] Data holding time and the corresponding target average threshold are fitted to obtain a linear relationship between data holding time and the target average threshold.
[0039] Using the linear relationship as the main axis, and centering on the main axis, the fan-shaped region is formed according to a preset angle.
[0040] In addition, to achieve the above objectives, this application also proposes a retry threshold table generation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the retry threshold table generation method described above.
[0041] In addition, to achieve the above objectives, this application also proposes a storage medium that is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the retry threshold table generation method described above. Beneficial effects
[0042] This 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 based on this range. By determining the target threshold voltage range, it is ensured that the subsequently generated threshold points are all located within a region where data can be stably read, thereby improving the accuracy of data reading. Generating multiple threshold points on the coordinate system can cover a wider voltage range to cope with threshold voltage variations of different flash memory cells under different states. Second, 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 points. By determining the average optimal threshold corresponding to the data retention time, it is 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 retrying, thereby improving the success rate of data recovery. Finally, the distance from each threshold point to the origin of the coordinate system is obtained, and the first threshold points are sorted first, and then the second threshold points are sorted in descending order of distance. Based on the sorting results, a retry threshold table is generated. By sorting and trying the first threshold points first, effective threshold points can be found more quickly, reducing unnecessary attempts and improving reading efficiency. The generated retry threshold table contains optimized and sorted threshold points, which can provide an effective retry scheme when data read fails, reduce performance loss caused by multiple attempts at inappropriate thresholds, and enable flash memory to recover data in the shortest possible time, thereby optimizing its overall performance. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0044] 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 is a flowchart of the retry threshold table generation method provided in Embodiment 1 of this application;
[0046] Figure 2 is a flowchart of the retry threshold table generation method provided in Embodiment 2 of this application;
[0047] Figure 3 is a flowchart of the retry threshold table generation method provided in Embodiment 3 of this application;
[0048] Figure 4 is another flowchart provided in Embodiment 3 of the retry threshold table generation method of this application;
[0049] Figure 5 is a flowchart of the retry threshold table generation method provided in Embodiment 4 of this application;
[0050] Figure 6 is a schematic diagram of the device structure of the hardware operating environment involved in the retry threshold table generation method in this application embodiment. Embodiments of the present invention
[0051] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0052] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0053] The main solution of this application embodiment is as follows: 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 holding 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 the threshold point that was not determined as the first threshold point; obtain the distance from each threshold point to the origin of the coordinate system, and sort the first threshold points first and then sort the second threshold points in descending order of distance; generate a retry threshold table according to the sorting result.
[0054] Currently, when generating retry threshold tables, thresholds are typically sorted by bit error rate (BER) from low to high, and the corresponding thresholds are listed within each BER range. However, threshold voltages change with time, temperature, and other environmental factors. Deviations in threshold voltage can cause changes in the BER of read data. Therefore, the BER corresponding to a certain threshold determined during testing may differ in practical applications. This leads to an increase in the number of retries and accelerates the wear and tear on flash memory hardware.
[0055] To address the aforementioned issues, this application provides a method for generating a retry threshold table. This method involves first obtaining a target threshold voltage range and generating multiple threshold points on a preset coordinate system based on this range. By determining the target threshold voltage range, it ensures that subsequently generated threshold points are located within a region where data can be stably read, thereby improving the accuracy of data reading. Generating multiple threshold points on the coordinate system covers a wider voltage range to accommodate threshold voltage variations in different flash memory cells under 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 points. By determining the average optimal threshold corresponding to the data retention time, it ensures that when data reading fails, the retry mechanism can use the threshold closest to the optimal threshold under the current data retention time for retrying, thereby improving the success rate of data recovery. Finally, the distance from each threshold point to the origin of the coordinate system is obtained, and the first threshold points are sorted in descending order of distance, followed by the second threshold points. Based on the sorting results, a retry threshold table is generated. By sorting and trying the first threshold points, valid threshold points can be found more quickly, reducing unnecessary attempts and improving read efficiency. The generated retry threshold table contains optimized sorted threshold points, providing an effective retry scheme when data reads fail. This reduces performance loss caused by repeatedly trying inappropriate thresholds, enabling flash memory to recover data in the shortest possible time, thereby optimizing its overall performance.
[0056] It should be noted that the executing entity in this embodiment can be a computing service device with network communication and program execution functions, such as a tablet computer, personal computer, mobile phone, Nandflash and its corresponding controller, SSD (Solid State Drive) and its corresponding controller, or any electronic device or apparatus capable of performing the above functions. The following description uses a flash memory storage device as an example to illustrate this embodiment and the subsequent embodiments.
[0057] Based on this, this application provides a method for generating a retry threshold table. Referring to Figure 1, Figure 1 is a flowchart of the first embodiment of the method for generating a retry threshold table.
[0058] In this embodiment, the retry threshold table generation method may include steps S100~S400:
[0059] Step S100: Obtain the target threshold voltage range, and generate multiple threshold points on a preset coordinate system based on the target threshold voltage range.
[0060] It's important to note that the Retry Threshold Table (RRT) is a mechanism or data structure in flash memory storage devices used to optimize read operations. The RRT typically contains a set of preset threshold voltages used to adjust the read-aware voltage during the read process to attempt to correct data errors caused by voltage offsets or other reasons. When the flash controller first attempts to read a flash cell, if the read result is not as expected (e.g., ECC (Error Correction Coding) check fails), it adjusts the read-aware voltage to the next threshold specified in the RRT and attempts 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 are crucial for improving the performance and reliability of flash memory storage devices. An effective RRT can significantly reduce the probability of read failures, lower the bit error rate, and reduce latency and data loss caused by read errors.
[0061] In this application, the target threshold voltage range can be the optimal threshold voltage range, which refers to the voltage threshold range at which the flash memory cell can stably read data, and this threshold range statistically exhibits the best performance.
[0062] In this embodiment, a target threshold voltage range determined through testing experiments is obtained, and multiple threshold points are generated within the target threshold voltage range on a preset coordinate system. These threshold points represent different threshold voltage values that may be used in subsequent reading operations.
[0063] Step S200: 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 multiple threshold points, wherein the second threshold point is a threshold point that was not determined as the first threshold point;
[0064] It's important to note that data retention time, or retention period, refers to the length of time that data written to flash memory can remain valid under specific conditions. This duration is a crucial indicator of flash memory performance, reflecting the stability and reliability of data stored in flash memory.
[0065] Additionally, it should be noted that the target average threshold can be the average optimal threshold, which refers to the average threshold voltage at which a flash memory cell can read data most accurately and reliably under specific conditions (such as high P / E cycles, high retention time, specific read / write modes, etc.), representing the optimal read point of the flash memory cell under those conditions.
[0066] In this embodiment, a first threshold point is determined from the threshold points corresponding to different data retention times and the average optimal threshold for that data retention time. The remaining threshold points are then 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 acquired, and the average optimal threshold is calculated based on this 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 threshold closest to the optimal threshold for the current data retention time for retrying, thereby improving the success rate of data recovery.
[0067] Step S300: Obtain the distance from each threshold point to the origin of the coordinate system, and sort the first threshold points in descending order of distance, and then sort the second threshold points.
[0068] In this embodiment, the distance from each threshold point to the origin is calculated, and the first threshold points are sorted in descending order of distance, followed by the second threshold points.
[0069] 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 operating states under different data retention time conditions. Prioritizing and considering the points within the sector area allows for a faster identification of the threshold voltage that performs well in terms of data retention time. This reduces performance loss caused by repeatedly trying inappropriate thresholds, enabling the flash memory to recover data in the shortest possible time, thereby optimizing its overall performance.
[0070] Step S400: Generate a retry threshold table based on the sorting results.
[0071] In this embodiment, a table is created to store the sorted points. The columns of the table can include metrics such as point coordinates, distance, and read / write performance as needed. First, the sorted points within the sector area are filled into the table in sequence. Then, the remaining sorted points are filled into the table in sequence to obtain a retry threshold table. The retry threshold table lists all threshold points in priority order. When reading data, the flash controller can try different threshold voltages in the order of the table until it finds a threshold voltage that can correctly read the data.
[0072] In this embodiment, the retry threshold table generated based on the sorted point set contains threshold points that have been optimized and sorted. It can provide an effective retry scheme 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.
[0073] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, referring to Figure 2, step S100, obtaining the target threshold voltage range, and generating multiple threshold points on a preset coordinate system according to the target threshold voltage range, may further include steps S110~S130:
[0074] Step S110: Construct a planar coordinate system and convert the target threshold voltage range into coordinate points on the planar coordinate system.
[0075] Step S120: Determine the smallest convex polygon containing all coordinate points according to the convex hull algorithm to obtain the threshold voltage convex hull.
[0076] Step S130: Generate multiple threshold points within the threshold voltage convex hull.
[0077] It should be noted that the convex hull is 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 set of points connected by line segments, forming a polygon without any indentations, and this polygon can enclose all the points in the set of points.
[0078] In this implementation, firstly, a planar coordinate system is defined, and each optimal threshold voltage is converted into a coordinate point on this 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 ensures that all points are on or inside the polygon's edges, and that the polygon has the fewest edges. 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 within the threshold voltage convex hull.
[0079] In one embodiment, the convex hull is constructed using the Graham scan method. The Graham scan method is an algorithm that finds the lowest point in the point set; if multiple points are collinear, the leftmost point is chosen as the starting point. The points are then sorted by their polar angles, and a stack is used to maintain the vertices of the convex hull. First, the point with the smallest y-coordinate is found. If multiple points have the same y-coordinate, the point with the smallest x-coordinate is selected as the starting point P0. Using P0 as the polar point, the remaining points are sorted according to the angle between the line connecting them to P0 and the positive x-axis. If the angles are the same, they are sorted according to their distance from P0. Next, the convex hull is constructed. An empty stack is initialized, and P0 and the next sorted point P1 are pushed onto the stack. Starting from P2, the sorted point set is traversed, and the top element of the stack is popped until the stack is empty or the current top element forms a leftward rotation with the newly examined point (i.e., the cross product of the vectors formed by the two top points and the new point is positive). After traversal, the points in the stack are the vertices of the convex hull. Connecting them according to the stack's order (last-in, first-out) yields the convex hull.
[0080] In one embodiment, the convex hull is constructed according to Andrew's monotone chain algorithm. Andrew's monotone chain algorithm, also known as the roll-wrap algorithm, divides the point set into two chains, constructs the convex hulls of each chain separately, and finally merges the two convex hulls. First, the point set is sorted according to the x-coordinate; if the x-coordinates are the same, they are sorted according to the y-coordinate. Second, the lower convex hull is constructed, and an empty stack is initialized. The sorted point set is traversed. 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), the top element of the stack is popped, and P is pushed onto the stack. Next, the upper convex hull is constructed. Since the point set is already sorted by x-coordinate, it can be traversed directly from the last point backwards (i.e., the reverse of the original traversal). For each point P, it is traversed from back to front, performing the same checks as when constructing 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), the top element of the stack is popped. At this point, the stack already contains points corresponding to the lower convex hull, so there's no need to push P back onto the stack. Then, merge the convex hulls and use the points in the stack to connect them.
[0081] In this embodiment, a convex hull is generated on a two-dimensional plane based on the optimal threshold under extreme usage scenarios. This convex hull provides boundary conditions for subsequent point generation. This ensures that the points in the retry threshold table cover all critical threshold regions while avoiding wasting resources in unnecessary areas.
[0082] In one feasible implementation, referring to Figure 2, step S200, taking the moving direction of the average optimal threshold under the data holding time as the main axis, and forming a fan-shaped region with the main axis as the center according to a preset angle, may further include steps S210~S230:
[0083] Step S210: Determine the target average threshold for the data retention time.
[0084] Step S220: Using the direction of movement of the target average threshold as the main axis, a fan-shaped area is formed with the main axis as the center and according to a preset angle.
[0085] Step S230: The threshold points within the sector area are determined as the first threshold points, and the threshold points outside the sector area are determined as the second threshold points.
[0086] In this embodiment, the direction of movement of the average value of the optimal threshold under the data retention time is taken as the principal axis. Starting from the origin of the coordinate system, the direction is determined along the trend line of this optimal threshold change. After determining the principal axis, a fan-shaped area is formed around the principal axis according to a preset angle. The preset angle is a small angle not exceeding 15°, which can be either 15° or 10°.
[0087] In this embodiment, the data distribution of the average optimal threshold is often not linear. Even after using the direction of movement of the average optimal threshold over the data retention time as the principal axis, a large number of data points will still be distributed on both sides of the principal axis, not on it. By setting a small angle and forming a fan-shaped region with that angle and the principal axis, and using the points within the fan-shaped region as the first threshold points, the points corresponding to the average optimal threshold that are not on the principal axis can be used as the first threshold points, thus improving the accuracy of the data.
[0088] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter. Based on this, please refer to Figure 3, step S130 may further include steps S131 to S134:
[0089] Step S131: Divide the interior of the threshold voltage convex hull into multiple annular regions.
[0090] In this embodiment, the origin of the coordinate system is selected as the reference point, and the interior of the convex hull is divided into multiple annular regions based on the distance from the origin. When dividing the interior of the threshold voltage convex hull into multiple annular regions based on the distance from the origin, the annular regions can be equidistant, or the radius increment of each annular region can be determined according to an exponential function or a logarithmic function.
[0091] For example, when using an exponential function to divide regions, a base radius r0 and a growth factor k are defined, and the radius rn of the nth annular region is given by rn = r0 * kn. Here, n is an integer starting from 0, representing the index of the annular region.
[0092] Step S132: Obtain the effective threshold voltage range of the flash memory device.
[0093] It should be noted that the effective threshold voltage range refers to the threshold voltage range within a flash memory device that allows for stable data reading without errors.
[0094] When generating threshold points, the point density can be dynamically adjusted according to the size of the effective threshold voltage range. At the edge of the effective threshold voltage range, where performance is less stable and the region is close to the error threshold, the point density is increased; while within the effective threshold voltage range, the point density is appropriately reduced.
[0095] Step S133: Calculate the number of threshold points to be generated in each annular region based on the radius of the annular region and the effective threshold voltage range.
[0096] In this embodiment, when calculating the number of points within each annular region, both the radius of the annular region and the effective threshold voltage range are considered. First, a density function D(r) can be defined, where r is the distance (i.e., radius) from the center point of the annular region to the origin. The density function can be a linear function, a nonlinear function, or an exponential function based on distance. The density function simulates how the density of the threshold voltage gradually increases with distance from the origin. For example, the density function is an exponential function, D(r) = c * exp(dr), where c and d are constants, and exp is an exponential function. Second, a weighting factor W(r) can be defined, which adjusts the density based on the relative position of the annular region and the effective threshold voltage range. If the annular region is entirely within the effective threshold voltage range, w(r) can be a large value; if the annular region only partially overlaps with the effective threshold voltage range, w(r) will decrease accordingly. Finally, the number of threshold points, N(r), can be calculated using 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) = π(router² - rinner²), where 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 weighting 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. The floor() function is used to round to integers, ensuring that the calculated number of points is an integer.
[0097] Step S134: Generate threshold points based on the quantity.
[0098] In this embodiment, threshold points are randomly generated based on the calculated number. A rejection sampling method is used; after generating a point, it is immediately checked whether it is inside the convex hull. If not, a new point is generated until the condition is met. The above steps are repeated until all annular regions have been traversed.
[0099] In this embodiment, RRT points are generated inside the convex hull, following the rule of "the farther away, the denser the points," while also considering the size of the effective window as a basis for density adjustment. Through reasonable point generation and density adjustment, higher accuracy and coverage of RRT in critical areas are ensured, while reducing unnecessary retries.
[0100] In a feasible implementation, referring to Figure 4, step S220, taking the movement direction of the target average threshold as the main axis, and forming a fan-shaped region with the main axis as the center according to a preset angle, may further include steps S221~S222:
[0101] Step S221: Perform data fitting on the data holding time and the corresponding target average threshold to obtain a linear relationship between the data holding time and the target average threshold.
[0102] Step S222: Using the linear relationship as the main axis, a fan-shaped area is formed with the main axis as the center and according to a preset angle.
[0103] In this embodiment, threshold voltage distribution data of flash memory devices under different data retention times are collected, and the optimal threshold for different data retention times is calculated. The optimal threshold refers to the threshold voltage that maximizes read / write performance or minimizes the error rate under a given data retention time. In a coordinate system, with data retention time as the abscissa and threshold voltage as the ordinate, the average optimal threshold under different data retention times is considered as a point, and the line containing this point is the principal axis. When fitting data to the data retention time and the corresponding average optimal threshold, the data retention time is used as the independent variable X, and the corresponding average optimal threshold is used as the dependent variable Y. Linear fitting is chosen 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 principal axis.
[0104] In this embodiment, a linear relationship between data retention time and the average value of the optimal threshold is obtained through data fitting. Using this linear relationship as the principal axis, a fan-shaped region is formed centered on the principal axis for visualization. Furthermore, by establishing a linear relationship model between data retention time and the average optimal threshold, the corresponding average optimal threshold can be predicted based on the data retention time, providing support for future decision-making.
[0105] Based on the first embodiment of this application, in the fourth embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter. Based on this, please refer to Figure 5; before step S100, steps S01~S03 are also included:
[0106] Step S01: Perform extreme usage scenario testing on the flash memory device.
[0107] Step S02: Obtain the threshold voltage range and corresponding performance parameters in the extreme usage scenario test.
[0108] Step S03: Determine the target threshold voltage range based on the performance parameters.
[0109] It should be noted that flash memory, also known as flash storage or read-only memory, is a type of non-volatile electronic memory. It can retain stored data without external power and features high information density, high read / write speeds, and short random access times. Flash memory achieves data reading and writing by controlling the gate voltage to change the charge state in the floating gate.
[0110] It's important to note that in flash memory, program / erase (P / E) operations refer to programming and erasing operations. A programming operation (P, Program), also known as a write operation, refers to the process of writing data into a flash memory cell. An erasing operation (E, Erase) refers to the process of clearing the data from a flash memory cell, restoring it to its initial state. The number of write / erase cycles refers to the number of programming, writing, and erasing operations each memory cell undergoes before its performance significantly degrades, eventually rendering it unable to reliably store data. This is due to the physical characteristics of flash memory; each write / erase operation causes some wear and tear on the memory cell. In flash memory, the smallest unit of an erase operation is typically a block or sector. The smallest unit of a write operation is typically a page. A complete process of programming and erasing a flash memory cell constitutes one P / E cycle.
[0111] In one feasible implementation, the step of obtaining the threshold voltage range and corresponding performance parameters in the extreme usage scenario test may further include the following steps:
[0112] Once the flash memory device has completed the preset number of erase / write cycles, the test data is acquired and written to the flash memory device.
[0113] 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.
[0114] The target threshold voltage range is determined based on the read success rate.
[0115] In this embodiment, the extreme usage scenario test can simulate the decline in data retention after a large number of program / erase cycles in a flash memory block. First, a P / E cycle test is performed, involving programming and erasing operations on the flash memory device. The number of cycles is set according to the test requirements, ranging from thousands to tens of thousands. After each P / E cycle, the device's performance parameters, such as read speed, write speed, and error rate, are recorded to monitor performance changes. After completing a certain number of P / E cycles, the P / E operation is stopped, and a set of test data is written to the flash memory device, simulating a long-term data retention state. The retention time should be long enough to observe the decline in data retention. The retention time is set according to the test requirements, such as several hours, days, or weeks. After the retention time expires, a specific test method (such as Read Retry technology) is used to attempt to read the data from 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. The relationship between threshold voltage and read success rate was analyzed to determine the target threshold voltage range for flash memory devices given retention time and number of P / E cycles.
[0116] For example, the flash memory device undergoes repeated programming and erasing operations for 5000 P / E cycles. After each P / E cycle, a set of test data is written to the flash memory device, and the device is placed at 85°C for 1000 hours to accelerate the degradation of data retention. After the retention period ends, a read retry technique is used to attempt to read the data, adjusting the read threshold voltage to try to recover erroneous data. At an initial threshold voltage of 2.0V, the read success rate is 80%, and as the threshold voltage is gradually reduced to 1.8V, the read success rate reaches 95%. Given a retention time and the number of P / E cycles, the optimal threshold voltage for the flash memory device is likely between 1.8V and 1.9V.
[0117] In another feasible implementation, extreme use case testing can simulate scenarios with frequent writes but few reads or with few writes but frequent reads to determine the optimal threshold under different workloads.
[0118] In this embodiment, tests are performed by setting a ratio of write operations to read operations. During the test, device performance parameters are recorded, including but 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 tests with frequent writes but few reads, the ratio of write operations to read operations is higher; for example, a ratio of 10:1. In tests with low writes and high reads, the ratio of write operations to read operations is lower; for example, a ratio of 1:10.
[0119] In this embodiment, by testing the flash memory under different extreme usage scenarios and using the test results as the basis for generating the RRT, it can be ensured that the threshold voltage can cover various extreme situations that the flash memory may encounter in practical applications, thereby improving the applicability and reliability of the RRT.
[0120] This application provides a flash memory storage device. The retry threshold table generation device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the retry threshold table generation method in the above embodiment 1.
[0121] Referring now to Figure 6, a schematic diagram of a retry threshold table generation device suitable for implementing embodiments of this application is shown. The retry threshold table generation device in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The retry threshold table generation device shown in Figure 6 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of this application.
[0122] As shown in Figure 6, the retry threshold table generation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the retry threshold table generation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the retry threshold table generation device to communicate wirelessly or wiredly with other devices to exchange data. Although a retry threshold table generation device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0123] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0124] The retry threshold table generation device provided in this application, employing the retry threshold table generation method in the above embodiments, 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 low number of retries. Compared with the prior art, the beneficial effects of the retry threshold table generation device provided in this application are the same as those of the retry threshold table generation method provided in the above embodiments, and other technical features in this retry threshold table generation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0125] It should be understood that the various parts disclosed in this application can be implemented using 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 suitable manner in one or more embodiments or examples.
[0126] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0127] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the retry threshold table generation method in the above embodiments.
[0128] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. 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 conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0129] The aforementioned computer-readable storage medium may be included in the retry threshold table generation device; or it may exist independently and not assembled into the retry threshold table generation device.
[0130] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a retry threshold table generation device, the flash memory storage device: acquires a target threshold voltage range and generates multiple threshold points on a preset coordinate system based on the target threshold voltage range; determines the threshold point corresponding to the target average threshold during the data retention time as a 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 was not determined as a first threshold point; acquires the distance from each threshold point to the origin of the coordinate system, and sorts the first threshold points first and then the second threshold points according to the order of the distance from largest to smallest; and generates a retry threshold table based on the sorting result.
[0131] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0133] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0134] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the retry threshold table generation method described above. This solves the technical problem of how to generate a retry threshold table that meets the requirements of a read retry mechanism and has a low number of retries. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the retry threshold table generation method provided in the above embodiments, and will not be repeated here.
[0135] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for generating a retry threshold table, wherein, The method includes: Obtain the target threshold voltage range, and generate multiple threshold points on a preset coordinate system based on the target threshold voltage range; The threshold point corresponding to the target average threshold under the data retention time is determined as the first threshold point, and at least one second threshold point is determined among the plurality of threshold points, wherein the second threshold point is a threshold point that was not determined as the first threshold point; Obtain the distance from each threshold point to the origin of the coordinate system, and sort the first threshold points first, and then sort the second threshold points according to the order of the distance from largest to smallest. Based on the sorting results, a retry threshold table is generated.
2. The retry threshold table generation method as described in claim 1, wherein, Before the steps of obtaining the target threshold voltage range and generating multiple threshold points on a preset coordinate system based on the target threshold voltage range, the method further includes: Perform extreme usage scenario tests on flash memory devices; Obtain the threshold voltage range and corresponding performance parameters in the extreme usage scenario test; The target threshold voltage range is determined based on the performance parameters.
3. The retry threshold table generation method as described in claim 2, wherein, The steps for obtaining the threshold voltage range and corresponding performance parameters in the extreme usage scenario test include: Once the number of erase / write cycles of the flash memory device reaches the preset number, the test data is acquired and written to the flash memory device. 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. The target threshold voltage range is confirmed based on the read success rate.
4. The retry threshold table generation method as described in claim 1, wherein, The step of obtaining the target threshold voltage range and generating multiple threshold points on a preset coordinate system based on the target threshold voltage range includes: Construct a planar coordinate system and convert the target threshold voltage range into coordinate points on the planar coordinate system; The minimum convex polygon containing all the coordinate points is determined using the convex hull algorithm to obtain the threshold voltage convex hull. Multiple threshold points are generated within the threshold voltage convex hull.
5. The retry threshold table generation method as described in claim 4, wherein, The step of generating multiple threshold points within the threshold voltage convex hull includes: The threshold voltage convex hull is divided into multiple annular regions; Obtain the effective threshold voltage range of the flash memory device; Based on the radius of the annular region and the effective threshold voltage range, calculate the number of threshold points to be generated in each annular region; The threshold points are generated based on the stated quantity.
6. The retry threshold table generation method as described in claim 5, wherein, The step of calculating the number of threshold points to be generated in each of the annular regions based on the radius of the annular region and the effective threshold voltage range includes: The density function is determined based on the radius of the annular region; The weighting factor is determined based on the radius of the annular region and the effective threshold voltage range; The number of threshold points in each of the annular regions is determined based on the density function and the weighting factor.
7. The method of claim 1, wherein, The step of determining the threshold point corresponding to the target average threshold under the data retention time as the first threshold point, and determining at least one second threshold point among the plurality of threshold points, includes: Determine the target average threshold for the data retention time; Using the direction of movement of the target average threshold as the main axis, a fan-shaped region is formed with the main axis as the center and according to a preset angle. The threshold point within the sector area is determined as the first threshold point, and the threshold point outside the sector area is determined as the second threshold point.
8. The retry threshold table generation method as described in claim 7, wherein, The step of taking the direction of movement of the target average threshold as the main axis and forming a fan-shaped region with the main axis as the center according to a preset angle includes: By performing data fitting on the data retention time and the corresponding target average threshold, a linear relationship between the data retention time and the target average threshold is obtained; Using the linear relationship as the main axis, and centering on the main axis, the fan-shaped region is formed according to the preset angle.
9. A retry threshold table generation device, wherein, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the retry threshold table generation method as described in any one of claims 1 to 8.
10. A storage medium, wherein, 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, it implements the steps of the retry threshold table generation method as described in any one of claims 1 to 8.