Method for acquiring optimal voltage, storage control chip and flash memory device
By performing data scanning and error bit count analysis on each word line group in the flash memory device, the optimal voltage is dynamically determined, solving the problem of insufficient read voltage management granularity in the prior art and improving data read success rate and device performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DAPUSTOR CORP
- Filing Date
- 2024-12-05
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies only manage read voltage granularity down to the flash block level in flash memory devices, which cannot adapt to the differences between word lines within a flash block. This results in a low first-read data success rate and increased read latency. Furthermore, the difference between laboratory and real-world environments leads to insufficient applicability of read voltage.
By scanning each word line group in each off-state flash memory block at preset intervals during flash memory operation, obtaining the number of error bits of several word lines, determining the optimal voltage of the word line group based on the number of error bits, and updating the voltage meter for read operation, dynamic adjustment of read voltage management granularity down to the word line group level is achieved.
It improves the success rate of reading data, reduces the probability of error correction failure due to differences between word lines, optimizes the read latency of flash memory devices, and improves the flexibility and applicability of read voltage management.
Smart Images

Figure CN122157733A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage device applications, and in particular to a method for obtaining optimal voltage, a storage control chip, and a flash memory device. Background Technology
[0002] Flash memory devices, such as solid-state drives (SSDs), are storage devices that use semiconductor flash memory (NAND flash) as their medium. Under the influence of voltage density, time, and various environmental factors, electrons within the storage cells of flash memory are prone to drift. When data is read based on the default voltage, read errors are likely to occur, requiring additional read recovery processing and increasing read latency.
[0003] Currently, to improve the success rate of data reading and reduce reading latency, small-batch tests are usually conducted in a laboratory environment based on the retry table provided by the NAND manufacturer. This simulates various factors that affect flash memory performance, and at the flash memory block level, the set of voltages that are more likely to read data correctly under different combinations of factors is determined and fixed into the firmware. Thus, when the device is running, the corresponding read voltage is found and applied according to the actual influencing factors to complete the data reading.
[0004] In the process of developing this application, the inventors discovered that the prior art has at least the following problems: This method only manages the read voltage at the level of flash memory blocks, but there are still differences between word lines within a flash memory block, which leads to a low success rate of the first read and increases read latency; furthermore, the laboratory environment differs from the actual operating environment, and the read voltage is an empirical value from small-batch laboratory tests, which is not representative enough. In the actual application of specific products, it cannot adapt to the actual condition of each flash memory block or word line in real time, resulting in poor flexibility and applicability. Summary of the Invention
[0005] This application provides a method for obtaining the optimal voltage, a storage control chip, and a flash memory device to improve the accuracy of the obtained optimal voltage, as well as the flexibility and applicability of voltage management, thereby increasing the success rate of the first data read and optimizing the read latency of the flash memory device.
[0006] The embodiments of this application provide the following technical solutions:
[0007] In a first aspect, embodiments of this application provide a method for obtaining an optimal voltage. This method for obtaining an optimal voltage is applied to a flash memory device. The flash memory device includes a flash memory block, the flash memory block includes a plurality of word line groups, each word line group includes a plurality of word lines, and the flash memory device is also used to store a voltmeter, the voltmeter being used to record the voltage value of the optimal voltage for each word line group.
[0008] The method for obtaining the optimal voltage includes:
[0009] When the flash memory device is running, at preset intervals, each word line group in each flash memory block that is in the off state is scanned sequentially to obtain the first error bit count of several word lines.
[0010] Determine the optimal voltage for the word line group based on the first number of error bits;
[0011] The optimal voltage value for each word line group is updated to the voltmeter so that, upon receiving a read command, the word lines within the word line group can be read based on the optimal voltage.
[0012] Secondly, embodiments of this application provide a storage control chip, comprising:
[0013] At least one processor; and,
[0014] A memory that is communicatively connected to at least one processor; wherein,
[0015] The memory stores instructions that can be executed by at least one processor to enable the at least one processor to perform a method such as the first aspect of obtaining the optimal voltage.
[0016] Thirdly, embodiments of this application provide a flash memory device, including:
[0017] Such as the storage control chip in the second aspect;
[0018] At least one flash memory medium is communicatively connected to the storage controller chip.
[0019] Fourthly, embodiments of this application also provide a non-volatile computer-readable storage medium storing computer-executable instructions for enabling a flash memory device to perform a method for obtaining an optimal voltage as described in the first aspect.
[0020] The beneficial effects of this application embodiment are as follows: Unlike the prior art, this application embodiment provides a method for obtaining an optimal voltage. This method is applied to a flash memory device, which includes flash memory blocks, each flash memory block including several word line groups, each word line group including several word lines. The flash memory device also stores a voltmeter, which records the voltage value of the optimal voltage for each word line group. The method for obtaining the optimal voltage includes: during flash memory device operation, at preset intervals, sequentially scanning each word line group in each flash memory block in a closed state to obtain a first error bit count for several word lines; determining the optimal voltage of the word line group based on the first error bit count; updating the voltage value of the optimal voltage for each word line group to the voltmeter, so that after obtaining a read command, a read operation is performed on the word lines within the word line group based on the optimal voltage.
[0021] By performing a data scan on each word line group in each off-state flash memory block at preset intervals during flash memory device operation to obtain the first error bit count of several word lines, and determining the optimal voltage of the word line group based on the first error bit count, and updating the voltage value of the optimal voltage of each word line group to a voltage meter, this application can refine the management granularity of read voltage to the word line group level, thereby reducing the probability of error correction failure caused by differences between different word lines within the flash memory block. Furthermore, by dynamically determining the optimal voltage based on the error bit count during flash memory device operation, the accuracy of the optimal voltage can be further improved. This reduces the probability of error bits occurring during subsequent read operations based on the optimal voltage, increases the success rate of the first read, and reduces the probability of entering additional read recovery processing, thus optimizing the read latency of the flash memory device.
[0022] On the other hand, the optimal voltage is dynamically determined based on the number of error bits during the actual operation of the flash memory device. It can adapt to the actual condition of the word lines in each flash memory device in real time, meet the needs of different flash memory devices, and thus improve the flexibility and applicability of read voltage management. Attached Figure Description
[0023] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0024] Figure 1 This is a flowchart illustrating a method for obtaining the optimal voltage according to an embodiment of this application;
[0025] Figure 2This is a schematic diagram of a process for sequentially scanning each word line group in each flash memory block that is in a closed state, provided by an embodiment of this application;
[0026] Figure 3 yes Figure 1 A detailed flowchart of step S102;
[0027] Figure 4 yes Figure 3 A detailed flowchart of step S124;
[0028] Figure 5 yes Figure 3 Another detailed flowchart of step S124;
[0029] Figure 6 This is a schematic diagram of a process for reading a word line to be read, provided in an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of the structure of a storage control chip provided in an embodiment of this application;
[0031] Figure 8 This is a schematic diagram of the structure of a flash memory device provided in an embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0033] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0034] The technical solution of this application will be described in detail below with reference to the accompanying drawings:
[0035] Flash memory devices, such as solid-state drives (SSDs), are storage devices that use semiconductor flash memory (NAND flash) as their medium. Flash memory stores data using different threshold voltages. With the continuous development of flash memory technology, it has evolved from early single-level cell flash (SLC flash) to quad-level cell flash (QLC flash). The increase in the number of bits in the storage cell makes the voltage distribution more dense.
[0036] However, as the voltage distribution density increases, adjacent voltage ranges are more prone to shifting or aliasing. Furthermore, under the influence of various factors, such as program / erase cycle (PE cycle), data retention time, temperature, and read disturbance, electrons within the flash memory cells are prone to drift. Therefore, when reading data programmed into the flash memory based on the default voltage, read errors are likely to occur, preventing correct data retrieval. In such cases, additional read recovery processing is required, increasing read latency and making it difficult to meet product performance requirements.
[0037] Currently, to improve data read success rates and reduce read latency, small-batch testing is typically conducted in a laboratory environment using a retry table provided by the NAND flash memory manufacturer. This involves simulating factors such as wear and tear, data retention time, temperature, and read interference, collecting a set of voltages that are more likely to correctly read data under various combinations of factors, using flash memory blocks as the basic granularity. This set of voltages is then hard-coded into the firmware. During flash memory device operation, the corresponding read voltage is determined based on the actual influencing factors, and data is read based on this voltage. It's understandable that the retry table provided by the NAND flash memory manufacturer usually contains multiple sets of read voltage values, and the voltage set obtained from small-batch testing in the laboratory environment is a subset of this retry table.
[0038] However, this approach has at least the following problems: Firstly, while it manages read voltage at the block level, differences still exist between word lines within a block. Therefore, the read voltage measured in this way is insufficient for effective error correction, leading to a low success rate for first-time data reads, increased susceptibility to read errors, and the need for additional read recovery processing, thus increasing read latency. Furthermore, setting the read voltage incurs additional overhead on the flash memory itself, which, if error correction is not achieved, can further increase read latency.
[0039] On the other hand, laboratory environments differ from actual operating environments. The read voltage measured in the laboratory is only an empirical value based on small-batch tests, and the test data is not representative enough. The laboratory-measured read voltage is only used when the operating flash memory blocks meet the combination of conditions measured in the laboratory. In the actual application of specific products, it is impossible to adapt to the actual condition of each flash memory block or word line in real time, lacking flexibility in dynamically adjusting the read voltage and having poor applicability.
[0040] Based on this, this application proposes a method for obtaining the optimal voltage. By refining the management granularity of the read voltage to the word line group level, the optimal voltage is dynamically determined based on the number of error bits during the operation of the flash memory device. This improves the accuracy of the obtained optimal voltage, as well as the flexibility and applicability of voltage management, thereby increasing the success rate of the first data read and optimizing the read latency of the flash memory device.
[0041] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for obtaining the optimal voltage according to an embodiment of this application;
[0042] The method for obtaining the optimal voltage is applied to a flash memory device, specifically, to at least one processor within the flash memory device. In this embodiment, the flash memory device includes a solid-state drive or other storage device that uses flash memory as the storage medium.
[0043] In this embodiment, the flash memory device includes a flash memory block, which includes a plurality of word line groups, each word line group including a plurality of word lines. The flash memory device is also used to store a voltmeter, which records the optimal voltage value for each word line group. The optimal voltage is the voltage that enables the most accurate and stable reading of data stored within a flash memory page, i.e., the read voltage that minimizes bit flipping.
[0044] Specifically, a flash memory chip includes several dies (DIEs) or logical units (LUNs). A DIE / LUN is the smallest unit for executing operation instructions within the flash memory chip. Each DIE includes several planes, each plane includes several blocks, each block contains several pages, and each page corresponds to a word line. In this embodiment, all word lines within each flash block are grouped to obtain several word line groups within each flash block, and each word line group consists of several word lines.
[0045] like Figure 1 As shown, the method for obtaining the optimal voltage includes:
[0046] Step S101: When the flash memory device is running, at preset intervals, each word line group in each flash memory block that is in the off state is scanned sequentially to obtain the first error bit count of several word lines.
[0047] In this context, a flash memory block in the off state refers to a flash memory block that has been filled with data. Data scanning refers to the process of obtaining the error bit count through read operations. The error bit count refers to the number of bits that do not match the actual data read after a read operation, when compared with the expected correct data. The first error bit count is the number of error bits obtained by reading sampled word lines when performing data scanning on a word line group; each sampled word line corresponds to one first error bit count.
[0048] The preset cycle refers to the inspection cycle for scanning data in the flash memory blocks that are in the off state. The preset cycle can be set by those skilled in the art based on the trend of the optimal voltage of the word line over time, the computing load of the processor during actual operation of the flash memory device, and the power consumption, and is not limited here. For example, the preset cycle is 24 hours.
[0049] Specifically, after the flash memory device is powered on, during operation, each flash memory block in the off state is inspected (i.e., data scanned) at preset intervals. The inspection granularity is each word line group within the flash memory block, that is, the sampling word lines of the word line group are read to obtain the first error bit number of each sampling word line.
[0050] In this embodiment of the application, before sequentially scanning each word line group in each flash memory block that is in a closed state, the method further includes: determining the word line groups contained in each flash memory block.
[0051] Specifically, the difference in the number of second error bits between any two word lines within each word line group is less than a first quantity threshold, and the difference in the optimal voltages corresponding to any two word lines within each word line group is less than a preset difference. The number of second error bits is the average of the number of error bits for the same word line obtained through multiple tests, with all word lines within the same flash memory block under the same data retention time and erase / write cycles during each test. The first quantity threshold is the maximum value of the difference in the number of second error bits between any two word lines within a word line group, and the preset difference is the maximum value of the difference in the optimal voltages between any two word lines within a word line group. The first quantity threshold and the preset difference can be set by those skilled in the art based on the changing trends of the number of second error bits and the read voltage with the word lines, respectively, and are not limited here.
[0052] In some embodiments, by conducting large-sample tests combined with big data analysis in a laboratory environment, word lines within a flash memory block are grouped to determine the word line groups contained in each flash memory block. The grouping information is then uploaded to the flash memory device by relevant personnel. Specifically, according to the NAND manufacturer and generation, NAND samples at different wear cycles are read, and the number of error bits for all word lines within the flash memory block at different read voltages is recorded for different data retention times. For each wear cycle, a first line graph and a second line graph are plotted for each flash memory block at various data retention times. The first line graph uses the word line number as the horizontal axis and the error bit number as the vertical axis to show the trend of error bit number with word line variation; the second line graph uses the word line number as the horizontal axis and the read voltage as the vertical axis to show the trend of read voltage variation with word line variation.
[0053] Based on big data analysis, word lines within a flash memory block are grouped according to a first line graph to obtain a first grouping result. For example, word lines within the same flash memory block whose difference in optimal voltage is less than a preset difference are grouped into the same word line group. Similarly, word lines within a flash memory block are grouped according to a second line graph to obtain a second grouping result. For example, word lines within the same flash memory block whose difference in second error bit count is less than a first quantity threshold are grouped into the same word line group. The first grouping result is the word line grouping result obtained based on the first line graph, and the second grouping result is the word line grouping result obtained based on the second line graph.
[0054] Considering the inclusion relationship between the first grouping results and the second grouping results, as well as the rising and falling trend of the line graph, if the number range of the character lines contained in the character line groups in the two grouping results is consistent, then the grouping is directly confirmed. If the number range of the character lines contained in the character line groups in the two grouping results is different, then the overlapping grouping results are merged and optimized based on the finer-grained grouping and the rising and falling trend of the line graph. For example: The first grouping results are: character line group 0 (character line 0-200), character line group 1 (character line 201-500), character line group 2 (character line 501-750), character line group 3 (character line 751-970), character line group 4 (character line 971-1100); The second grouping results are: character line group 0 (character line 0-200), character line group 1 (character line 201-440), character line group 2 (character line 441-650), character line group 3 (character line 651-780), character line group 4 (character line 781-880), character line group 5 (character line 881-980), character line group 6 (character line 981-1100).
[0055] The results of the first group and the second group are merged to refine the grouping of the overlapping parts, resulting in: character line group 0 (character line 0-200), character line group 1 (character line 201-440), character line group 2 (character line 441-500), character line group 3 (character line 501-650), character line group 4 (character line 651-750), character line group 5 (character line 751-780), character line group 6 (character line 781-880), character line group 7 (character line 881-970), character line group 8 (character line 971-980), and character line group 9 (character line 981-1100).
[0056] Then, the word line groups with similar trends are merged to obtain the final grouping results: Word line group 0 (word line 0-200), word line group 1 (word line 201-440), word line group 2 (word line 441-500), word line group 3 (word line 501-650), word line group 4 (word line 651-780), word line group 5 (word line 781-880), word line group 6 (word line 881-980), and word line group 7 (word line 981-1100).
[0057] In this embodiment of the application, before sequentially scanning each word line group in each flash memory block that is in a closed state, the method further includes: determining the voltage sampling group contained in each word line group and the sampling word line contained in each voltage sampling group.
[0058] Each word line group includes several voltage sampling groups, and each voltage sampling group includes several sampled word lines. The voltage sampling group is a subset of the word line group, and the sampled word lines are the word lines actually read when the word line group is scanned. During each data scan, several voltage sampling groups within the same word line group are polled and traversed in turn.
[0059] In some embodiments, the voltage sampling groups and the sampled word lines contained in each word line group are determined in a laboratory environment, and then the relevant personnel upload the information of the voltage sampling groups and sampled word lines to the flash memory device. Specifically, within each word line group, several word lines that can characterize the read voltage variation characteristics of the entire word line group are selected.
[0060] In this embodiment, since sampled word lines bear more read operations than non-sampled word lines, this application reduces read interference caused by frequently reading the same word lines by selecting multiple voltage sampling groups in each word line group and polling and traversing different voltage sampling groups during each scan. Simultaneously, selecting multiple sampled word lines in each voltage sampling group for read operations, compared to the low fault tolerance of reading a single word line, allows the word lines within the voltage sampling group in this application to more comprehensively characterize the read voltage characteristics of the entire word line group.
[0061] In some embodiments, the sampling word line includes a first sampling word line, a second sampling word line, and a third sampling word line. The first sampling word line is the word line with the smallest difference between the number of second error bits and the average number of error bits in a voltage sampling group. The average number of error bits is the average of the sum of the number of second error bits of each word line in a voltage sampling group. The second sampling word line is the word line with the largest number of second error bits in a voltage sampling group. The third sampling word line is the word line with the smallest number of second error bits in a voltage sampling group.
[0062] Please see Figure 2 , Figure 2 This is a schematic diagram of a process for sequentially scanning each word line group in each flash memory block that is in a closed state, provided by an embodiment of this application;
[0063] like Figure 2 As shown, the process of sequentially scanning each word line group in each flash memory block that is in the off state includes:
[0064] Step S201: Determine the flash memory blocks to be scanned;
[0065] Specifically, among several flash memory blocks that are in a closed state, select one flash memory block that has not been scanned for data.
[0066] Step S202: Select a word line group that has not undergone data scanning;
[0067] Specifically, select a word line group that has not been scanned for data within the flash memory block.
[0068] Step S203: Select a voltage sampling group and perform a data scan on the voltage sampling group;
[0069] This involves scanning the voltage sampling group, specifically reading each sampled word line in the group using its default voltage to obtain the first error bit count for each word line. The default voltage is the initial set voltage used to read the memory cell state, i.e., the standard read operation voltage that has not been dynamically adjusted.
[0070] Specifically, a voltage sampling group is selected within the word line group, and each sampling word line in that voltage sampling group is read to obtain the first error bit count for each sampling word line. During each data scan, a voltage sampling group is selected sequentially in a polling manner.
[0071] Step S204: Determine whether each word line group in the flash memory block has been scanned;
[0072] Specifically, if every word line group in the flash memory block has been scanned, proceed to step S205; if every word line group in the flash memory block has not been scanned, return to step S202 to scan the next word line group that has not yet been scanned.
[0073] That is, select the next word line group that has not been scanned in the flash memory block, select a voltage sampling group in the word line group, and perform a read operation on each sampling word line in the voltage sampling group until the first error bit number of each sampling word line in the flash memory block is obtained.
[0074] Step S205: Determine whether the scanning of each flash memory block in the off state has been completed;
[0075] Specifically, if the scanning of each flash memory block in the off state is completed, the process ends; if the scanning of each flash memory block in the off state is not completed, the process returns to step S201 to scan the data of the next flash memory block in the off state until the first error bit count of each sample word line in each flash memory block in the off state is obtained.
[0076] It is understandable that the inspection in step S101 is performed in ascending order of word line groups, flash memory blocks, and logic cells. For example, starting from flash memory block 0 of logic cell 0, each word line group in flash memory block 0 is traversed sequentially, for example, in the order of word line group 0, word line group 1, ...; then, for flash memory block 1 in logic cell 0, each word line group is traversed starting from word line group 0; ...; and so on. After traversing all flash memory blocks of logic cell 0, the above steps are repeated for logic cell 1 until all logic cells have been traversed.
[0077] Step S102: Determine the optimal voltage for the word line group based on the first number of error bits;
[0078] Specifically, for each word line group, the optimal voltage for that word line group is determined based on the first error bit count of each sampled word line in that word line group.
[0079] Please see Figure 3 , Figure 3 yes Figure 1 A detailed flowchart of step S102;
[0080] like Figure 3 As shown, step S102 includes:
[0081] Step S121: Sort the number of first error bits for each sampled word line in the word line group to determine the first quantity and the second quantity;
[0082] The first quantity is the maximum value of the first error bits of each sampled word line within a word line group, and the second quantity is the median of the first error bits of each sampled word line within a word line group.
[0083] Specifically, for each word line group that performs data scanning in step S101, after obtaining the first error bit count of each sampled word line in the word line group in step S203, these first error bit counts are sorted to determine the first quantity and the second quantity.
[0084] Step S122: Determine whether the first quantity is greater than the second quantity threshold;
[0085] Specifically, if the first quantity is greater than the second quantity threshold, the data cannot be read correctly based on the default voltage of the word line, triggering the background process to obtain the optimal voltage of the word line group, and proceeding to step S123; if the first quantity is less than or equal to the second quantity threshold, the data can be read correctly based on the default voltage of the word line, and it is not necessary to obtain the optimal voltage of the word line group, and the process ends.
[0086] The second quantity threshold is the maximum number of error bits that can be corrected when reading a word line based on its default voltage. This second quantity threshold can be set by those skilled in the art based on the maximum fault tolerance capability of the flash memory device's storage controller chip (master chip), and is not limited thereto. For example, the second quantity threshold is 90% of the maximum number of error bits that the master chip can correctly correct.
[0087] In this embodiment, by entering the process of obtaining the optimal voltage of the word line group when the first number is greater than the second number threshold, this application can obtain the optimal voltage only for word line groups where the number of error bits exceeds the threshold (i.e., the second number threshold), thereby reducing the additional overhead caused by applying read voltage to the entire disk on a large scale.
[0088] Step S123: Obtain the first reading voltage;
[0089] Specifically, when the first quantity exceeds the second quantity threshold, the process of obtaining the optimal voltage of the word line group is initiated, and the first read voltage is obtained. The first read voltage is the optimal voltage of the sampled word line corresponding to the second quantity.
[0090] The first reading voltage can be obtained using the optimal voltage acquisition technology provided by the NAND flash manufacturer. For example, by scanning the voltage distribution of the sampled word line, the first reading voltage can be determined by identifying the trough positions in the voltage distribution. It is understood that this optimal voltage acquisition technology is existing technology and will not be elaborated upon further here.
[0091] Step S124: Read the word line group based on the first read voltage to determine the optimal voltage for the word line group.
[0092] The optimal voltage includes a first optimal voltage or a second optimal voltage. The first optimal voltage is a unified read voltage that can meet the reading requirements of most word lines in a word line group (i.e., word lines whose third error bit number is less than or equal to the third quantity threshold). The second optimal voltage is a dedicated read voltage that is obtained separately for a specific word line (i.e., the first word line) that cannot be read correctly by the first optimal voltage.
[0093] Specifically, each word line in the word line group is read based on the first read voltage to obtain the third error bit count for each word line, and the number of first word lines is determined based on the magnitude of the third error bit count. When the number of first word lines is less than a preset number, the first read voltage is used as the first optimal voltage for the word line group. When the number of first word lines is at least one, a second read voltage is obtained based on the first word lines, and the second read voltage is used as the second optimal voltage for the word line group.
[0094] The third error bit count refers to the number of error bits in a word line when it is read based on the first read voltage. Based on the magnitude of the third error bit count, word lines in a word line group can be divided into word lines with a third error bit count greater than the third quantity threshold (i.e., the first word line, also known as a defective word line) and word lines with a third error bit count less than or equal to the third quantity threshold.
[0095] The third quantity threshold is the maximum number of error bits that can be corrected when reading word lines based on the first read voltage. This third quantity threshold can be set by those skilled in the art based on the maximum fault tolerance capability of the flash memory device's storage controller chip (master chip), and is not limited thereto. For example, the third quantity threshold is 90% of the maximum number of error bits that the master chip can correctly correct.
[0096] The preset quantity is the maximum number of first word lines that cannot be correctly read using the currently acquired first read voltage. When the number of first word lines is greater than or equal to the preset quantity, the currently acquired first read voltage is not applicable to most of the word lines in that word line group. The preset quantity can be set by those skilled in the art based on the number of word lines in the word line group, and is not limited here. For example, the preset quantity is 3% of the number of word lines in the word line group.
[0097] In this embodiment, the flash memory device is further used to store a first word line table, which records the number of each first word line in a word line group. The optimal voltage includes a first optimal voltage, which is the read voltage used during a read operation for each word line in a word line group whose third error bit number is less than or equal to a third quantity threshold.
[0098] Please see Figure 4 , Figure 4 yes Figure 3 A detailed flowchart of step S124;
[0099] like Figure 4 As shown, step S124 includes:
[0100] Step S1241: Read the word line based on the first read voltage;
[0101] Specifically, each word line in the word line group is read based on the first read voltage to obtain the third error bit count for each word line.
[0102] Step S1242: Obtain the number of third error bits for the word line;
[0103] Specifically, after reading a word line based on the first read voltage, the third error bit count of that word line is obtained.
[0104] Step S1243: Determine whether the number of the third error bits of the word line is greater than the third quantity threshold;
[0105] Specifically, if the number of third error bits of the word line is greater than the third quantity threshold, proceed to step S1244; if the number of third error bits of the word line is less than or equal to the third quantity threshold, proceed to step S1245.
[0106] Step S1244: Determine that the character line is the first character line, and store the number of the first character line in the first character line table;
[0107] Specifically, when the number of third error bits of any word line is greater than the third quantity threshold, the word line is determined to be the first word line, and the number of the first word line is stored in the first word line table.
[0108] Step S1245: Determine whether the relationship between the third error bit count and the third quantity threshold of each word line has been compared;
[0109] Specifically, if the comparison between the third error bit count of each word line in the word line group and the third quantity threshold is completed, then proceed to step S1246; if the comparison between the third error bit count of each word line in the word line group and the third quantity threshold is not completed, then return to step S1242, obtain the third error bit count of the next word line, and execute steps S1242-S1248.
[0110] Step S1246: Determine whether the number of numbers stored in the first character line table is less than the preset number;
[0111] Specifically, if the number of character line numbers stored in the first character line table is less than the preset number, then proceed to step S1247; if the number of character line numbers stored in the first character line table is greater than or equal to the preset number, then proceed to step S1248.
[0112] Step S1247: Take the first read voltage as the first optimal voltage for the word line group;
[0113] Specifically, when the number of numbers stored in the first word line table is less than the preset number, the first read voltage is used as the first optimal voltage for that word line group.
[0114] Step S1248: Obtain the second optimal voltage.
[0115] Specifically, if the number of word line numbers stored in the first word line table is greater than or equal to a preset number, then the first read voltage is not applicable to most of the word lines in that word line group. In this case, the word line group to be read does not have a first optimal voltage, and the process of obtaining the second optimal voltage is entered, i.e., execution... Figure 5 .
[0116] In this embodiment, the optimal voltage includes a second optimal voltage, which is the read voltage used by each first word line in a word line group during a read operation.
[0117] Please see Figure 5 , Figure 5 yes Figure 3 Another detailed flowchart of step S124;
[0118] like Figure 5 As shown, step S124 further includes:
[0119] Step S1249: Obtain the first character line table for this character line group;
[0120] Step S1250: Determine whether the first character line table is empty;
[0121] Specifically, if the first word line table is empty, it means that the first optimal voltage of the word line group can correctly read all the word lines in the group. At this time, there is no second optimal voltage in the word line group, so there is no need to obtain the second optimal voltage and the process ends. If the first word line table is not empty, then proceed to step S1251.
[0122] Step S1251: Sort the number of the third error bits of each first word line in the first word line table in ascending order to obtain the word line sequence;
[0123] Specifically, when the first word line table corresponding to any word line group is not empty, the third error bit count of each first word line in the first word line table is sorted in ascending order to obtain the word line sequence. The word line sequence is a sequence composed of first word lines sorted in ascending order of their third error bit count.
[0124] Step S1252: Determine the second character line;
[0125] The second word line is the first word line with the largest number of error bits in the word line sequence.
[0126] Step S1253: Obtain the second reading voltage;
[0127] The second read voltage is the optimal voltage for the second word line. The specific method for obtaining the second read voltage is similar to that for obtaining the first read voltage, and will not be repeated here.
[0128] Step S1254: Read the word line sequence based on the second read voltage to determine the range of defective word lines corresponding to the word line group;
[0129] The defective word line range is the range of first word lines in the word line sequence that satisfy the first condition. The first condition includes: any two consecutively read first word lines are non-consecutive numbers, or the number of fourth error bits of any first word line is greater than the fourth quantity threshold.
[0130] The fourth error bit count is the number of error bits on the word line when read based on the second read voltage. The fourth quantity threshold is the maximum number of error bits that can be corrected when reading the word line based on the second read voltage. The fourth quantity threshold can be set by those skilled in the art based on the maximum fault tolerance capability of the flash memory device's storage controller chip (master chip), and is not limited thereto. For example, the fourth quantity threshold is 90% of the maximum number of error bits that the master chip can correctly correct.
[0131] In this embodiment of the application, step S1254 specifically includes steps S1-S3:
[0132] Step S1: According to the arrangement order of each first word line in the word line sequence, starting from the second word line, read each first word line sequentially forward based on the second read voltage to obtain the fourth error bit number of each first word line until the first condition is met, and then determine the currently read first word line as the starting word line;
[0133] Among them, the starting character line is the first character line with the smallest number in the range of defective character lines.
[0134] Specifically, following the order of each first word line in the word line sequence, starting from the second word line, each first word line is read sequentially backward based on the second read voltage. It is determined whether the number of the next first word line to be read is consecutive to the number of the previously read first word line. If the two first word lines are not consecutive, the previously read first word line is taken as the starting word line.
[0135] If the number of the next first word line to be read is consecutive to the number of the previous first word line that has been read, then read the first word line to be read and obtain the fourth error bit count of the first word line, and determine whether the fourth error bit count of the first word line is greater than the fourth quantity threshold.
[0136] If the fourth error bit count of the first word line is greater than the fourth quantity threshold, then the first word line is determined to be the starting word line. If the fourth error bit count of the first word line is less than or equal to the fourth quantity threshold, then continue reading forward to determine whether the next first word line meets the first condition, until the starting word line is determined or the forward reading is completed.
[0137] For example, the word line sequence is: [word line 65, word line 72, word line 76, word line 77, word line 78, word line 79, word line 80, word line 81], where word line 77 is the second word line, and the second read voltage is the optimal voltage for word line 77. Starting from word line 77, word lines 76, 72, and 65 are read sequentially forward. Specifically, since word line 76 is numbered consecutively with word line 77, word line 76 is read and its fourth error bit count is obtained. If the fourth error bit count of word line 76 is less than or equal to the fourth quantity threshold, the reading continues forward. Since word line 72 is not numbered consecutively with word line 76, the forward reading stops, and word line 76 is taken as the starting word line.
[0138] Step S2: According to the arrangement order of each first word line in the word line sequence, starting from the second word line, read each first word line sequentially based on the second read voltage to obtain the fourth error bit number of each first word line until the first condition is met, and take the previously read first word line as the end word line.
[0139] Among them, the ending character line is the first character line with the highest number in the range of defective character lines.
[0140] Specifically, following the order of each first word line in the word line sequence, starting from the second word line, each first word line is read sequentially based on the second read voltage. It is determined whether the number of the next first word line to be read is consecutive to the number of the previously read first word line. If the two first word lines are not consecutive, the previously read first word line is taken as the starting word line.
[0141] If the number of the next first word line to be read is consecutive to the number of the previous first word line that has been read, then read the first word line to be read and obtain the fourth error bit count of the first word line, and determine whether the fourth error bit count of the first word line is greater than the fourth quantity threshold.
[0142] If the fourth error bit count of the first word line is greater than the fourth quantity threshold, then the first word line is determined to be the end word line. If the fourth error bit count of the first word line is less than or equal to the fourth quantity threshold, then continue reading to determine whether the next first word line meets the first condition, until the end word line is determined or the forward reading is completed.
[0143] For example, the word line sequence is: [word line 65, word line 72, word line 76, word line 77, word line 78, word line 79, word line 80, word line 81], where word line 77 is the second word line, and the second read voltage is the optimal voltage for word line 77. Starting from word line 77, word lines 78, 79, 80, and 81 are read sequentially. The numbers of word lines 77, 78, 79, and 80 are consecutive. When the number of fourth error bits for word lines 78 and 79 is less than or equal to the fourth quantity threshold, and the number of fourth error bits for word line 80 is greater than the fourth quantity threshold, word line 79 is designated as the ending word line.
[0144] Step S3: Determine the range of defective character lines consisting of the start character line and the end character line.
[0145] Specifically, the range of defective character lines is indicated by the starting character line number and the ending character line number. For example, if the starting character line is character line 76 and the ending character line is character line 79, the range of defective character lines is 76-79.
[0146] It is understandable that when none of the first word lines in a word line sequence satisfy the first condition, there are no starting word lines and no ending word lines in that word line sequence, nor is there a range of defective word lines. When there is no starting word line but an ending word line in the word line sequence, the range of defective word lines is indicated by the ending word line's number. For example, if the ending word line is word line 80, the range of defective word lines is 80-80. When there is a starting word line but no ending word line in the word line sequence, the range of defective word lines is indicated by the starting word line's number. For example, if the starting word line is word line 40, the range of defective word lines is 40-40.
[0147] Step S1255: Determine if the defective character line range exists;
[0148] Specifically, if the defective word line range exists, proceed to step S1256; if the defective word line range does not exist, it indicates that the first optimal voltage of the word line group can correctly read most of the word lines in the group, and a suitable second optimal voltage cannot be found, thus ending the process.
[0149] Step S1256: Determine the second read voltage as the second optimal voltage for the word line group.
[0150] Specifically, when a defective word line exists, the second read voltage is determined to be the second optimal voltage for that word line group.
[0151] In this embodiment, by scanning the word line group and determining the optimal voltage of the word line group in conjunction with the number of error bits, this application can refine the management granularity of read voltage to the word line group level, thereby reducing the probability of error correction failure caused by differences between different word lines within the flash memory block, improving the accuracy of the optimal voltage, and thus reducing the probability of error bits occurring during subsequent read operations based on the optimal voltage, increasing the success rate of the first read, thereby reducing the probability of entering an additional read recovery process, and optimizing the read latency of the flash memory device. On the other hand, the optimal voltage is dynamically determined based on the number of error bits during the actual operation of the flash memory device, which can adapt to the actual condition of the word lines in each flash memory device in real time, meet the needs of different flash memory devices, and thus improve the flexibility and applicability of read voltage management.
[0152] In this embodiment, compared to existing solutions that determine the read voltage based on empirical values from small-batch laboratory tests, which cannot adapt to the actual condition of each word line in real time, this application obtains a first read voltage and reads the word line group based on the first read voltage. This allows the read voltage to be obtained during the operation of the flash memory device, and the optimal voltage can be confirmed by performing another read operation after obtaining the voltage. This eliminates the individual differences of NAND in small-batch laboratory tests, further improving the accuracy of the optimal voltage. As a result, when performing read operations based on the optimal voltage in the future, the probability of erroneous bits can be reduced, the success rate of the first read can be increased, and the probability of entering an additional read recovery process can be reduced, thereby optimizing the read latency of the flash memory device.
[0153] In the embodiments of this application, by obtaining the first optimal voltage and the second optimal voltage of the word line group, this application enables the optimal voltage of the word line group to include both the first optimal voltage that can meet the reading needs of most word lines and the second optimal voltage that can supplement the reading needs of a very small number of digital lines, thereby adapting to a variety of application scenarios in actual production.
[0154] Step S103: Update the voltage value of the optimal voltage for each word line group to the voltmeter so that after receiving the read command, the word lines in the word line group can be read based on the optimal voltage.
[0155] Flash memory devices include flash memory media and RAM. RAM includes, but is not limited to, Dynamic Random Access Memory (DRAM).
[0156] Specifically, the voltage value of the optimal voltage for each word line group is updated to the voltage meter using the logic unit number, flash memory block number, and word line group number as indexes.
[0157] In this embodiment of the application, step S103 includes: updating the voltage value of the first optimal voltage or the second optimal voltage of each word line group to the voltage meter stored in memory; storing the voltage meter to the flash memory medium so that the voltage meter can be loaded into memory the next time the flash memory device is powered on.
[0158] Specifically, when the flash memory device is powered on, a voltage table is loaded into memory. During the operation of the flash memory device, after determining the first optimal voltage or the second optimal voltage for any word line group, the voltage value of the first optimal voltage or the second optimal voltage is updated to the voltage table stored in memory using the logic cell number, the flash memory block number, and the word line group number as indices. The voltage table is then persisted to the flash memory medium, so that the voltage table is loaded into memory the next time the flash memory device is powered on.
[0159] Please refer to Table 1, which is a voltmeter provided in an embodiment of this application;
[0160] Table 1
[0161]
[0162]
[0163] As shown in Table 1, Table 1 stores the voltage values of the first optimal voltage or the second optimal voltage for any word line group of any flash memory block in any logic unit that is in the off state. It can be understood that when the first optimal voltage or the second optimal voltage of any word line group does not exist, the corresponding position in the voltage table is empty.
[0164] In this embodiment, the flash memory device is further used to store a defective word line range table, which records the defective word line range corresponding to each word line group. The method further includes: when a defective word line range exists for any word line group, updating the defective word line range of that word line group to the defective word line range table stored in memory; and storing the defective word line range table to the flash memory medium so that the defective word line range table is loaded into memory the next time the flash memory device is powered on.
[0165] Specifically, when the flash memory device is powered on, the defective word line range table is loaded into memory. During the operation of the flash memory device, if a defective word line range exists for any word line group, and after the defective word line range is determined, the defective word line range of that word line group is updated to the defective word line range table stored in memory using the logic cell number, the flash memory block number, and the word line group number as indexes. This defective word line range table is then persisted to the flash memory medium, so that the defective word line range table is loaded into memory the next time the flash memory device is powered on.
[0166] Please refer to Table 2, which is a defective character line range table provided in the embodiments of this application;
[0167] Table 2
[0168]
[0169] As shown in Table 2, Table 2 stores the defective word line range of any word line group in any flash memory block that is in the off state within any logic unit. It is understood that when the defective word line range of any word line group does not exist, the defective word line range table does not record the defective word line range of that word line group.
[0170] In this embodiment, during the actual operation of the flash memory device, a first optimal voltage that can meet the reading needs of most word lines in the word line group is determined based on the number of error bits, and a second optimal voltage that can also meet the reading needs of a very small number of digital lines in the word line group is determined as a supplement. The voltage value of the first optimal voltage or the second optimal voltage of each word line group is updated to the voltage meter. On the one hand, this application can eliminate the limitations caused by individual differences of NAND in small-batch laboratory testing, and achieve more refined management through word line groups with smaller granularity than flash memory blocks, thereby reducing the probability of error correction failure caused by differences between different word lines in flash memory blocks.
[0171] On the other hand, this application can improve the accuracy of the first optimal voltage and the second optimal voltage, thereby reducing the probability of erroneous bits when performing subsequent read operations based on the first optimal voltage or the second optimal voltage, increasing the success rate of the first read, and thus reducing the probability of entering an additional read recovery process, and optimizing the read latency of the flash memory device.
[0172] In some embodiments, before performing step S101, the method further includes: when the flash memory device is powered on, reading a voltage meter and a defect word line range table stored in the flash memory medium, and loading the voltage meter and the defect word line range table into memory.
[0173] Specifically, after the flash memory device is powered on again, the voltage meter and defect word line range table that were persisted in the previous cycle are loaded into memory.
[0174] In some embodiments, before performing step S101, the method further includes: loading a voltmeter and a defect word line range table into memory when the flash memory device is in its factory state and powered on, and clearing the voltmeter and the defect word line range table.
[0175] Specifically, for a new flash memory device, when the flash memory device is powered on, a voltmeter and a defect word line range table are loaded into memory, and the voltmeter and the defect word line range table are cleared.
[0176] In this embodiment of the application, the method further includes: obtaining a service request sent by the host to the flash memory medium through a foreground task; determining whether the service request is a read command; if the service request is a read command, determining the word line group to be read based on the read command, reading the word line to be read based on the optimal voltage of the word line group to be read, and sending the read data to the host; if the service request is not a read command, determining whether the service request is an erase command; if the service request is an erase command, clearing the relevant entries in the voltage meter and the defective word line range table after performing the erase operation; if the service request is not an erase command, the service request is a write command, and performing a write operation to write the data to the corresponding location.
[0177] Among them, the word line group to be read is the word line group in which the word line to be read is located, and the word line to be read is the word line that needs to be read according to the read command.
[0178] In some embodiments, the step of reading the word line to be read based on the optimal voltage of the word line group to be read includes: when the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read exist simultaneously in the voltage table, querying the defective word line range table; when the defective word line range of the word line group to be read includes the number of the word line to be read in the defective word line range table, reading the word line to be read based on the second optimal voltage of the word line group to be read.
[0179] Specifically, the voltage table is consulted using the logic cell number, flash memory block number, and word line group number as indexes. If both the first and second optimal voltage values for the word line group to be read exist in the voltage table, the defective word line range table is consulted. If the defective word line range of the word line group to be read includes the number of the word line to be read in the defective word line range table, then the word line to be read is the first word line, and the word line to be read is read based on the second optimal voltage of the word line group.
[0180] In some embodiments, the step of reading the word line to be read based on the optimal voltage of the word line group to be read further includes: when the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read exist simultaneously in the voltage table, querying the defective word line range table; when the defective word line range of the word line group to be read does not include the number of the word line to be read in the defective word line range table, reading the word line to be read based on the first optimal voltage of the word line group to be read.
[0181] Specifically, the voltage table is consulted using the logic cell number, flash memory block number, and word line group number as indexes. If both the first optimal voltage and the second optimal voltage of the word line group to be read exist in the voltage table, the defective word line range table is consulted. If the defective word line range of the word line group to be read does not include the number of the word line to be read in the defective word line range table, then the word line to be read is a word line with a third error bit count less than or equal to a third quantity threshold, and the word line to be read is read based on the first optimal voltage of the word line group to be read.
[0182] In some embodiments, the step of reading the word line to be read based on the optimal voltage of the word line group to be read further includes: when there is a voltage value of the first optimal voltage of the word line group to be read in the voltmeter and there is no voltage value of the second optimal voltage of the word line group to be read, reading the word line to be read based on the first optimal voltage of the word line group to be read.
[0183] Specifically, the voltage table is looked up using the logic cell number, flash memory block number, and word line group number as indexes. If the voltage table contains a first optimal voltage value for the word line group to be read, but does not contain a second optimal voltage value, meaning that the word line group to be read does not have a second optimal voltage, the word line to be read is read based on the first optimal voltage of the word line group.
[0184] In some embodiments, the step of reading the word line to be read based on the optimal voltage of the word line group to be read further includes: when there is a voltage value of the second optimal voltage of the word line group to be read in the voltage table, but there is no voltage value of the first optimal voltage of the word line group to be read, querying the defective word line range table; when the defective word line range of the word line group to be read includes the number of the word line to be read in the defective word line range table, reading the word line to be read based on the second optimal voltage of the word line group to be read.
[0185] Specifically, the voltage table is consulted using the logic cell number, flash memory block number, and word line group number of the word line to be read as indexes. If the voltage table contains the second optimal voltage value for the word line group to be read, but not the first optimal voltage value, meaning the word line group to be read does not have a first optimal voltage, the defective word line range table is consulted. If the defective word line range table contains the word line number to be read, the word line to be read is read based on the second optimal voltage of the word line group to be read.
[0186] In some embodiments, the method further includes: when a voltage value of a second optimal voltage for the word line group to be read exists in the voltmeter, but a voltage value of a first optimal voltage for the word line group to be read does not exist, querying a defective word line range table; and when the defective word line range of the word line group to be read does not contain the number of the word line to be read in the defective word line range table, reading the word line to be read based on the default voltage of the word line to be read.
[0187] Specifically, the voltage table is consulted using the logic cell number, flash memory block number, and word line group number of the word line to be read as indexes. If the voltage table contains a second optimal voltage value for the word line group to be read, but not a first optimal voltage value, meaning the word line group to be read does not have a first optimal voltage, the defective word line range table is consulted. If the defective word line range table does not contain the number of the word line to be read, the word line to be read cannot be read correctly based on the second optimal voltage, and the word line to be read is read based on the default voltage of the word line to be read.
[0188] In some embodiments, the method further includes: when there are no voltage values for the first optimal voltage and the second optimal voltage of the word line group to be read in the voltmeter, reading the word line to be read based on the default voltage of the word line to be read.
[0189] Understandably, the first optimal voltage is a read voltage applicable to most word lines in a word line group, while the second optimal voltage is applied to a smaller number of defective word lines, supplementing the scope of the first optimal voltage. If a word line group has either the first or second optimal voltage, it indicates that the number of erroneous bits in this word line group exceeds the threshold during inspection. Based on the default voltage, data may not be read correctly. Using the first and second optimal voltages can increase the probability of correctly reading data, thereby avoiding additional read recovery processing and reducing read latency.
[0190] Please see Figure 6 , Figure 6 This is a schematic diagram of a process for reading a word line to be read, provided in an embodiment of this application;
[0191] like Figure 6 As shown, the process of reading the word line to be read includes:
[0192] Step S601: Obtain the read command;
[0193] Specifically, it retrieves the read command sent by the host.
[0194] Step S602: Determine the word line group to be read based on the read command;
[0195] The read command includes the number of the logical unit to be read, the number of the flash memory block to be read, the number of the word line group to be read, the number of the word line to be read, and the number of the flash memory page to be read. The logical unit to be read is the logical unit to be read according to the read command, the flash memory block to be read is the flash memory block to be read according to the read command, and the flash memory page to be read is the flash memory page to be read according to the read command.
[0196] Step S603: Determine whether the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read exist simultaneously in the voltmeter;
[0197] Specifically, the voltage table is queried using the number of the logic unit to be read, the number of the flash memory block to be read, and the number of the word line group to be read as indices. If the voltage table contains both the first optimal voltage and the second optimal voltage of the word line group to be read, then proceed to step S604; if the voltage table contains only the first optimal voltage of the word line group to be read, or only the second optimal voltage of the word line group to be read, or neither the first optimal voltage nor the second optimal voltage of the word line group to be read, then proceed to step S606.
[0198] Step S604: Query the defect word line range table;
[0199] Specifically, when the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read exist simultaneously in the voltage meter, the defect word line range table is queried using the number of the word line group to be read as the index.
[0200] Step S605: Determine whether the defective character line range of the character line group to be read includes the number of the character line to be read;
[0201] Specifically, if the defective word line range of the word line group to be read includes the number of the word line to be read, then proceed to step S610; if the defective word line range of the word line group to be read does not include the number of the word line to be read, then proceed to step S612.
[0202] Step S606: Determine whether the voltage value of the first optimal voltage of the word line group to be read exists in the voltmeter;
[0203] Specifically, if the voltage value of the first optimal voltage of the word line group to be read exists in the voltage meter, then this is a case where the voltage value of the first optimal voltage of the word line group to be read exists in the voltage meter, but the voltage value of the second optimal voltage of the word line group to be read does not exist, and proceed to step S612; if the voltage value of the first optimal voltage of the word line group to be read does not exist in the voltage meter, then proceed to step S607.
[0204] Step S607: Determine whether the voltage value of the second optimal voltage of the word line group to be read exists in the voltmeter;
[0205] Specifically, if the voltage value of the second optimal voltage of the word line group to be read exists in the voltmeter, then this is a case where the voltage value of the second optimal voltage of the word line group to be read exists in the voltmeter, but the voltage value of the first optimal voltage of the word line group to be read does not exist, and proceed to step S608; if the voltage value of the first optimal voltage and the second optimal voltage of the word line group to be read does not exist in the voltmeter, proceed to step S611.
[0206] Step S608: Query the defect word line range table;
[0207] Specifically, if the voltage value of the second optimal voltage of the word line group to be read exists in the voltage table, but the voltage value of the first optimal voltage of the word line group to be read does not exist, the defective word line range table is queried.
[0208] Step S609: Determine whether the defective word line range of the word line group to be read includes the number of the word line to be read;
[0209] Specifically, if the defective word line range of the word line group to be read includes the number of the word line to be read, then proceed to step S610; if the defective word line range of the word line group to be read does not include the number of the word line to be read, then proceed to step S611.
[0210] Step S610: Read the word line to be read based on the second optimal voltage of the word line group to be read;
[0211] Specifically, when the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read exist simultaneously in the voltage meter, and the defect word line range of the word line group to be read in the defect word line range table includes the number of the word line to be read, the word line to be read is read based on the second optimal voltage of the word line group to be read.
[0212] Alternatively, if a second optimal voltage value for the word line group to be read exists in the voltmeter, but a first optimal voltage value for the word line group to be read does not exist, and the defect word line range of the word line group to be read in the defect word line range table includes the number of the word line to be read, then the word line to be read is read based on the second optimal voltage of the word line group to be read.
[0213] Step S611: Read the word line to be read based on the default voltage of the word line to be read;
[0214] Specifically, when the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read do not exist in the voltmeter, the word line to be read is read based on the default voltage of the word line to be read.
[0215] Alternatively, if the voltage value of the second optimal voltage of the word line group to be read exists in the voltage meter, but the voltage value of the first optimal voltage of the word line group to be read does not exist, and the defective word line range of the word line group to be read in the defective word line range table does not include the number of the word line to be read, the word line to be read is read based on the default voltage of the word line to be read.
[0216] Step S612: Read the word line to be read based on the first optimal voltage of the word line to be read.
[0217] Specifically, when there is a first optimal voltage value for the word line group to be read in the voltmeter, and there is no second optimal voltage value for the word line group to be read, the word line to be read is read based on the first optimal voltage of the word line to be read.
[0218] Alternatively, if the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read exist simultaneously in the voltmeter, and the defect word line range of the word line group to be read does not include the number of the word line to be read in the defect word line range table, the word line to be read is read based on the first optimal voltage of the word line to be read.
[0219] In some embodiments, the method further includes: obtaining an erase command; performing an erase operation on a first flash memory block based on the erase command; clearing the voltage values of a first optimal voltage and a second optimal voltage for each word line group within the first flash memory block in a voltage table; and clearing the defective word line range for each word line group within the first flash memory block in a defective word line range table. The first flash memory block is the flash memory block for which the erase operation is performed.
[0220] Specifically, after erasing the first flash memory block, the voltage values of the first optimal voltage and the second optimal voltage of each word line group under the flash memory block are cleared using the number of the logic cell where the first flash memory block is located and the number of the first flash memory block as indexes. The defective word line range of each word line group under the flash memory block is cleared using the same index.
[0221] In this embodiment, a method for obtaining an optimal voltage is provided. This method is applied to a flash memory device, which includes flash memory blocks, each flash memory block including a plurality of word line groups, each word line group including a plurality of word lines. The flash memory device is also used to store a voltmeter, which records the voltage value of the optimal voltage for each word line group. The method for obtaining the optimal voltage includes: during operation of the flash memory device, at preset intervals, sequentially scanning each word line group in each flash memory block in a closed state to obtain a first error bit count for the plurality of word lines; determining the optimal voltage for the word line group based on the first error bit count; updating the voltage value of the optimal voltage for each word line group to the voltmeter, so that after obtaining a read command, a read operation is performed on the word lines in the word line group based on the optimal voltage.
[0222] By performing a data scan on each word line group in each off-state flash memory block at preset intervals during flash memory device operation to obtain the first error bit count of several word lines, and determining the optimal voltage of the word line group based on the first error bit count, and updating the voltage value of the optimal voltage of each word line group to a voltage meter, this application can refine the management granularity of read voltage to the word line group level, thereby reducing the probability of error correction failure caused by differences between different word lines within the flash memory block. Furthermore, by dynamically determining the optimal voltage based on the error bit count during flash memory device operation, the accuracy of the optimal voltage can be further improved. This reduces the probability of error bits occurring during subsequent read operations based on the optimal voltage, increases the success rate of the first read, and reduces the probability of entering additional read recovery processing, thus optimizing the read latency of the flash memory device.
[0223] On the other hand, the optimal voltage is dynamically determined based on the number of error bits during the actual operation of the flash memory device. It can adapt to the actual condition of the word lines in each flash memory device in real time, meet the needs of different flash memory devices, and thus improve the flexibility and applicability of read voltage management.
[0224] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a storage control chip provided in an embodiment of this application;
[0225] like Figure 7 As shown, the storage control chip 700 includes one or more processors 701 and a memory 702. Wherein, Figure 7 Taking a processor 701 as an example. In this embodiment, the storage control chip includes a controller for a solid-state drive or other storage device that uses flash memory as the storage medium.
[0226] The processor 701 and the memory 702 can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0227] The processor 701 is configured to provide computing and control capabilities to control the flash memory device 800 to perform corresponding tasks, such as controlling the flash memory device 800 to perform the method for obtaining the optimal voltage in any of the above method embodiments. The method for obtaining the optimal voltage includes: during the operation of the flash memory device, at preset intervals, sequentially scanning each word line group in each flash memory block in the off state to obtain a first error bit count of a plurality of word lines; determining the optimal voltage of the word line group based on the first error bit count; updating the voltage value of the optimal voltage of each word line group to a voltage meter so that, after obtaining a read command, a read operation is performed on the word lines in the word line group based on the optimal voltage.
[0228] By sequentially scanning each word line group in each off-state flash memory block at preset intervals during device operation to obtain the first error bit count of several word lines, and determining the optimal voltage of the word line group based on the first error bit count, and updating the voltage value of the optimal voltage of each word line group to the voltage meter, this application can refine the management granularity of read voltage to the word line group level, thereby reducing the probability of error correction failure caused by differences between different word lines in the flash memory block. Furthermore, by dynamically determining the optimal voltage based on the error bit count during flash memory device operation, the accuracy of the optimal voltage can be further improved. This reduces the probability of error bits occurring during subsequent read operations based on the optimal voltage, increases the success rate of the first read, and reduces the probability of entering additional read recovery processing, thus optimizing the read latency of the flash memory device.
[0229] Processor 701 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0230] Memory 702, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for obtaining the optimal voltage in the embodiments of this application. Processor 701 can implement the method for obtaining the optimal voltage in any of the above method embodiments by running the non-transitory software programs, instructions, and modules stored in memory 702. Specifically, memory 702 may include volatile memory (VM), such as random access memory (RAM); memory 702 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), solid-state drive (SSD), or other non-transitory solid-state storage devices; memory 702 may also include combinations of the above types of memory.
[0231] Memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 702 may optionally include memory remotely located relative to processor 701, and these remote memories may be connected to processor 701 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0232] One or more modules are stored in memory 702. When executed by one or more processors 701, they perform the method for obtaining the optimal voltage in any of the above method embodiments, for example, performing the method described above. Figure 1 The steps shown.
[0233] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a flash memory device provided in an embodiment of this application;
[0234] like Figure 8 As shown, the flash memory device 800 includes a storage control chip 700 and at least one flash memory medium 801. Figure 8 Taking a flash memory medium 801 as an example, the storage control chip 700 and the flash memory medium 801 are communicatively connected. The flash memory device is used to store a voltmeter, which records the optimal voltage value for each word line group.
[0235] The storage control chip 700 is used to execute the method for obtaining the optimal voltage in any of the above embodiments. The method for obtaining the optimal voltage includes: when the flash memory device is running, at preset intervals, sequentially scanning each word line group in each flash memory block that is in a closed state to obtain a first error bit count of a plurality of word lines; determining the optimal voltage of the word line group based on the first error bit count; updating the voltage value of the optimal voltage of each word line group to a voltage meter, so that after obtaining a read command, a read operation is performed on the word lines in the word line group based on the optimal voltage.
[0236] At least one flash memory medium 801 is communicatively connected to a storage control chip 700 for storing data. The flash memory medium 801 includes a flash memory block, which includes a plurality of word line groups, and each word line group includes a plurality of word lines.
[0237] The flash memory device includes a storage control chip and at least one flash memory medium. The storage control chip is used to execute the method for obtaining the optimal voltage in any of the above embodiments, and the flash memory medium is used to store data. On the one hand, this application can refine the management granularity of the read voltage to the word line group level, reduce the probability of error correction failure caused by the difference between different word lines in the flash memory block, and improve the accuracy of the optimal voltage. Thus, when performing read operations based on the optimal voltage, the probability of erroneous bits can be reduced, the success rate of the first read can be increased, and the probability of entering an additional read recovery process can be reduced, thereby optimizing the read latency of the flash memory device.
[0238] On the other hand, this application can adapt to the actual condition of the word lines in each flash memory device in real time, meet the needs of different flash memory devices, and thus improve the flexibility and applicability of read voltage management.
[0239] This application also provides a non-volatile computer storage medium storing computer-executable instructions that are executed by one or more processors. For example, the one or more processors can execute the method for obtaining the optimal voltage in any of the above method embodiments, such as executing the method for obtaining the optimal voltage in any of the above method embodiments, or executing the steps described above.
[0240] The apparatus or device embodiments described above are merely illustrative. The unit modules described as separate components may or may not be physically separate, and the components shown as module units may or may not be physical units; that is, they may be located in one place or distributed across multiple network module units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0241] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions for a computer device (which may be a personal computer, server, or network device, etc.) to execute the various embodiments or some parts of the embodiments.
[0242] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of this application as described above. For the sake of brevity, they are not provided in detail; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for obtaining an optimal voltage, characterized in that, The flash memory device includes a flash memory block, the flash memory block includes a plurality of word line groups, each word line group includes a plurality of word lines, and the flash memory device is also used to store a voltmeter, the voltmeter being used to record the voltage value of the optimal voltage for each word line group; The method includes: When the flash memory device is running, at preset intervals, each word line group in each flash memory block that is in the off state is scanned sequentially to obtain the first error bit count of several word lines; Based on the first number of error bits, determine the optimal voltage for the word line group; The voltage value of the optimal voltage for each word line group is updated to the voltage meter so that, after a read command is received, the word lines in the word line group can be read based on the optimal voltage.
2. The method according to claim 1, characterized in that, Each of the aforementioned word line groups includes several voltage sampling groups, and each of the aforementioned voltage sampling groups includes several sampling word lines; The step of sequentially scanning each word line group in each flash memory block in the off state to obtain the first error bit count of several word lines includes: Select a flash memory block that has not been scanned for data from a number of flash memory blocks that are in a closed state; Select a word line group that has not been scanned for data within this flash memory block; Select a voltage sampling group in the word line group and perform a read operation on each sampling word line in the voltage sampling group to obtain the first error bit number of each sampling word line. In this case, select a voltage sampling group in turn during each data scan. Select the next word line group that has not been scanned in the flash memory block, and select a voltage sampling group in the word line group. Perform a read operation on each sampling word line in the voltage sampling group until the first error bit count of each sampling word line in the flash memory block is obtained. The data is scanned for the next flash block that is in the off state until the first error bit count of each sample word line in each flash block in the off state is obtained.
3. The method according to claim 2, characterized in that, The difference between the second error bit counts of any two word lines in each word line group is less than the first quantity threshold, the difference between the optimal voltages corresponding to any two word lines in each word line group is less than the preset difference, and the second error bit count is the average of the error bit counts of the same word line obtained through multiple tests. The sampling word line includes a first sampling word line, a second sampling word line and a third sampling word line. The first sampling word line is the word line with the smallest difference between the second error bit number and the average error bit number in a voltage sampling group. The average error bit number is the average of the sum of the second error bits of each word line in a voltage sampling group. The second sampling word line is the word line with the largest number of second error bits in a voltage sampling group, and the third sampling word line is the word line with the smallest number of second error bits in a voltage sampling group.
4. The method according to claim 1, characterized in that, Each of the aforementioned word line groups includes several sampled word lines; Determining the optimal voltage for the word line group based on the first number of error bits includes: The number of first error bits of each sampled word line in a word line group is sorted to determine a first quantity and a second quantity, wherein the first quantity is the maximum value of the number of first error bits of each sampled word line in a word line group, and the second quantity is the median of the number of first error bits of each sampled word line in a word line group. When the first quantity is greater than the second quantity threshold, a first reading voltage is obtained, wherein the first reading voltage is the optimal voltage of the sampling word line corresponding to the second quantity; The word line group is read based on the first read voltage to determine the optimal voltage for the word line group.
5. The method according to claim 4, characterized in that, The flash memory device is also used to store a first word line table, which records the number of each first word line in a word line group, and the optimal voltage includes a first optimal voltage. The step of reading the word line group based on the first read voltage to determine the optimal voltage for the word line group includes: Based on the first read voltage, each word line in the word line group is read to obtain the third error bit number of each word line; When the number of third error bits of any word line is greater than the third quantity threshold, the word line is determined to be the first word line, and the number of the first word line is stored in the first word line table. When the number of numbers stored in the first word line table is less than a preset number, the first read voltage is taken as the first optimal voltage for the word line group.
6. The method according to claim 5, characterized in that, The optimal voltage includes a second optimal voltage; The step of reading the word line group based on the first read voltage to determine the optimal voltage for the word line group further includes: When the first word line table corresponding to any word line group is not empty, the third error bit number of each first word line in the first word line table is sorted in ascending order to obtain the word line sequence; Determine the second word line, wherein the second word line is the first word line in the word line sequence that has the largest number of third error bits; Obtain the second read voltage, wherein the second read voltage is the optimal voltage of the second word line; The word line sequence is read based on the second read voltage to determine the range of defective word lines corresponding to the word line group; When the defective word line range exists, the second read voltage is determined to be the second optimal voltage for that word line group.
7. The method according to claim 6, characterized in that, The step of reading the word line sequence based on the second read voltage to determine the range of defective word lines corresponding to the word line group includes: According to the arrangement order of each first word line in the word line sequence, starting from the second word line, each first word line is read forward sequentially based on the second read voltage to obtain the fourth error bit number of each first word line until the first condition is met, and the previously read first word line is taken as the starting word line. According to the arrangement order of each first word line in the word line sequence, starting from the second word line, each first word line is read sequentially based on the second read voltage to obtain the fourth error bit number of each first word line until the first condition is met, and the previously read first word line is taken as the end word line. Determine the range of defective character lines consisting of the start character line and the end character line; The first condition includes: the numbers of any two consecutively read first word lines are non-consecutive, or the number of fourth error bits of any first word line is greater than the fourth quantity threshold.
8. The method according to claim 6, characterized in that, The flash memory device includes a flash memory medium and memory, and the flash memory device is also used to store a defective word line range table, which is used to record the defective word line range corresponding to each word line group. The step of updating the voltage value of the optimal voltage for each word line group to the voltmeter includes: Update the voltage value of the first optimal voltage or the second optimal voltage of each word line group to the voltage meter stored in memory; The voltmeter is stored in the flash memory medium so that it can be loaded into the memory the next time the flash memory device is powered on. The method further includes: If a defective word line range exists in any word line group, update the defective word line range of that word line group to the defective word line range table stored in memory. The defect word line range table is stored in the flash memory medium so that it is loaded into the memory the next time the flash memory device is powered on.
9. The method according to claim 8, characterized in that, The method further includes: Get the read command; The word line group to be read is determined based on the read command, wherein the word line group to be read is the word line group in which the word line to be read is located; When the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read exist simultaneously in the voltage table, the defective word line range table is queried. When the defect word line range table contains the number of the word line to be read in the defect word line range of the word line group to be read, the word line to be read is read based on the second optimal voltage of the word line group to be read. When the defective word line range table does not contain the number of the word line to be read in the defective word line range of the word line group to be read, the word line to be read is read based on the first optimal voltage of the word line group to be read.
10. The method according to claim 9, characterized in that, The method further includes: When the voltage values of the first optimal voltage and the second optimal voltage of the word line group to be read do not exist in the voltage table, the word line to be read is read based on the default voltage of the word line to be read. When the voltage value of the first optimal voltage of the word line group to be read exists in the voltage meter, and the voltage value of the second optimal voltage of the word line group to be read does not exist, the word line to be read is read based on the first optimal voltage of the word line group to be read. If the voltage table contains a second optimal voltage value for the word line group to be read, but does not contain a first optimal voltage value for the word line group to be read, then query the defective word line range table. When the defect word line range table contains the number of the word line to be read in the defect word line range of the word line group to be read, the word line to be read is read based on the second optimal voltage of the word line group to be read. When the defective word line range table does not include the number of the word line to be read in the defective word line range of the word line group to be read, the word line to be read is read based on the default voltage of the word line to be read.
11. The method according to claim 8, characterized in that, The method further includes: Get the erase command; An erasure operation is performed on the first flash memory block based on the erase command, wherein the first flash memory block is the flash memory block to be erased in this operation; In the voltage table, the voltage values of the first optimal voltage and the second optimal voltage of each word line group in the first flash memory block are cleared; In the defective word line range table, the defective word line range for each word line group within the first flash memory block is cleared.
12. A storage control chip, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method for obtaining the optimal voltage as described in any one of claims 1-11.
13. A flash memory device, characterized in that, include: The storage control chip as described in claim 12; At least one flash memory medium is communicatively connected to the storage control chip.