Data reading method and computer readable storage device
By adopting a read retry table and a reread mechanism in flash memory devices, the problems of reduced read speed and shortened life of flash memory devices are solved, achieving the effect of improving read performance and extending device life.
Patent Information
- Application Number
- CN202011446463.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-09
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-12-09
AI Technical Summary
As the capacity of flash memory devices increases, the number of groups in the read retry table increases, resulting in a decrease in reading speed and a shortened service life. When read retries fail to correct errors and return correct data, the entire storage unit may need to be discarded, affecting device performance and life.
Provide a data reading method that determines whether to perform data rereading by reading the retry table, using the rereading mechanism until success, and discarding the data storage location when the reading over-limit parameter of the rereading step is greater than the preset threshold, reducing the read retry time and extend equipment life.
It effectively improves the read performance and service life of flash memory devices, avoids discarding storage units due to inability to correct errors, and extends the usable time of the device.
Smart Images

Figure CN112530499B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of memory, and in particular relates to a data reading method and a computer-readable storage device. Background Art
[0002] As the required capacity of flash memory devices increases, flash memory devices also require better error correction quality. The flash memory device suppliers will also provide read retry tables to adjust the voltage offset of the flash memory device during reading, so that the data can be read more accurately. As the capacity of flash memory devices increases, the number of groups in the read retry table provided by flash memory device suppliers also increases. During the read retry process, if you start from the 0th group of the read retry table each time, it will consume a lot of reading and error correction time, resulting in poor overall read performance. Even as time goes by, even the read retry may not be able to correct the correct data, and the entire storage unit can only be discarded. Summary of the invention
[0003] The purpose of the present invention is to provide a data reading method, which solves the problem that the reading speed of a flash memory device decreases and the life of the flash memory device is shortened in the later period of use, effectively improves the reading performance of the flash memory device, and increases the service life of the flash memory device.
[0004] In order to solve the above technical problems, the present invention is achieved through the following technical solutions:
[0005] The present invention provides a data reading method, which comprises the following steps:
[0006] Providing a storage unit, the storage unit comprising a plurality of data storage locations;
[0007] The storage unit is configured with a read retry table;
[0008] Determine whether to perform data rereading at the data storage location according to the read retry table, if so, set a corresponding rereading step for the data rereading process, if not, execute the next step;
[0009] Request to read the data at the data storage location;
[0010] If the read data is correct, the read data is output; if the read data is incorrect, the rereading mechanism is executed using the rereading step until the rereading is successful, and the reread data is output; when the read overlimit parameters of the rereading steps corresponding to all successful rereads are greater than the preset threshold, the data storage location abandonment mechanism is executed.
[0011] In one embodiment of the present invention, the reread mechanism includes: the reread step in the read retry table that is preferentially used during the reread process is the first reread step.
[0012] In one embodiment of the present invention, the reread mechanism includes: if the read retry table has saved a first reread step corresponding to the data storage location, then when executing the reread mechanism, the first reread step is preferentially used for rereading.
[0013] In one embodiment of the present invention, the reread mechanism includes: if the read retry table does not store the first reread step corresponding to the data storage location, rereading is performed according to the arrangement order of the reread steps in the read retry table.
[0014] In one embodiment of the present invention, the reread mechanism includes: when the reread is successful, saving the reread step corresponding to the successful reread as a new first reread step corresponding to the data storage position in the read retry table.
[0015] In one embodiment of the present invention, the reread mechanism includes: if rereading fails using the first reread step, continuing to reread according to the arrangement order of the reread steps in the read retry table until the rereading is successful, and obtaining a new first reread step in the read retry table.
[0016] In one embodiment of the present invention, the re-reading mechanism includes: if the read over-limit parameter of the re-reading step corresponding to the successful re-reading is greater than a preset threshold, then the re-reading step is not saved.
[0017] In one embodiment of the present invention, the preset threshold is the number of bits that is 80% of the maximum error tolerance of the error correction system.
[0018] In one embodiment of the present invention, the data storage location abandonment mechanism includes: abandoning the data storage location requested to be read, and retaining other data storage locations in the storage unit.
[0019] The present invention further provides a computer-readable storage device, on which a computer program is stored, and when the computer program is executed by a processor, the data reading method of the present invention is implemented.
[0020] The present invention provides a data reading method and a computer-readable storage device. The data reading method of the present invention reduces the time required for read retry by mixing two mechanisms, solves the problem of reduced reading speed and shortened life of flash memory devices in the later period of use, effectively improves the reading performance of flash memory devices, and increases the service life of flash memory devices. With the wear of time, when the situation that the correct data cannot be corrected even after rereading occurs, the data storage location that stores the data can be abandoned in advance before the storage unit is completely unusable, and then other data storage locations in the storage unit are retained, avoiding the problem of reduced reading performance and reduced service life of the flash memory device caused by abandoning the entire storage unit.
[0021] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0023] Figure 1 A method flow chart of the data reading method of the present invention;
[0024] Figure 2 It is a logical structure diagram of the data reading method of the present invention;
[0025] Figure 3 It is a schematic diagram of the structure of a solid state hard disk;
[0026] Figure 4 It is a schematic diagram of the structure of the storage unit before the data storage location abandonment mechanism is adopted;
[0027] Figure 5 It is a schematic diagram of the structure of the storage unit after adopting the data storage location abandonment mechanism. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] See also Figures 3 to 5 NAND flash memory products include MLC (multi-level cell) flash memory and TLC (Triple Level Cell) flash memory. MLC (multi-level cell) flash memory refers to storing 2 bits of data in 1 storage unit 400 (cell), i.e., including 2 data storage locations 401, while TLC flash memory refers to storing 3 bits of data in 1 storage unit 400, i.e., including 3 data storage locations 401. TLC flash memory is slower and has a shorter lifespan than MLC flash memory. After a period of wear and tear, a data storage location 401 in the storage unit 400 may fail to be reread successfully. At this time, if the entire storage unit 400 is discarded, not only will the overall read performance be low, but the lifespan of the flash memory will also be reduced.
[0030] See also Figure 1 to Figure 2 The present invention provides a data reading method, the data reading method comprising:
[0031] S1. Providing a storage unit 400, the storage unit 400 includes a plurality of data storage locations 401;
[0032] S2. The storage unit 400 is configured with a read retry table 302;
[0033] S3. Determine whether to perform data rereading at the data storage location 401 according to the read retry table 302. If so, set the corresponding rereading step for the data rereading process. If not, execute the next step;
[0034] S4. Request to read the data on the data storage location 401;
[0035] S5. If the read data is correct, the read data is output; if the read data is incorrect, the rereading step is used to execute the rereading mechanism until the rereading is successful, and the reread data is output; when the read over-limit parameters of the rereading steps corresponding to all successful rereads are greater than the preset threshold, the data storage location 401 abandonment mechanism is executed.
[0036] See also Figures 1 to 5In step S1, a storage unit 400 is provided, and the storage unit 400 includes a plurality of data storage locations 401. The storage unit 400 in this embodiment is, for example, a storage unit 400 in a solid state drive 200 (Solid State Drives), and the solid state drive 200 refers to a hard disk made of a solid-state electronic storage chip array, which is composed of a control unit and a storage unit 400 (FLASH chip, DRAM chip). It uses interfaces such as SATA-III, PCIe x8 or mSATA, M.2, ZIF, IDE, U.2, CF, CFast, etc. The storage medium of the solid state drive 200 (SSD) includes a NAND flash memory chip, which uses a flash memory chip as a storage medium, and is mainly composed of a control chip, a cache chip and a flash memory chip. Among them, the control chip is mainly responsible for data allocation, data transfer, and connecting the flash memory chip and the external SATA interface. The cache chip is mainly used to assist the control chip in data processing. The flash memory chip is used for data reading and writing. The solid state drive 200 based on flash memory is mainly composed of a control unit 300 such as a main controller, a storage unit 400, a cache (optional), and an interface with the host 100 (such as SATA, SAS, PCIe, etc.). The main controller of the solid state drive 200 connects the storage unit 400 to the computer. The main controller can operate multiple flash memory particles in parallel through several channels, greatly improving the bandwidth of the bottom layer, mainly including: error checking and correction (ECC) or error correction system 301, wear leveling, bad block mapping, read disturb (reading a block of data will affect the data of adjacent blocks) management and read retry table 302, etc. NAND flash memory products include MLC flash memory and TLC flash memory, etc. MLC flash memory refers to storing 2 bits of data in 1 storage unit 400, that is, including 2 data storage locations 401, while TLC flash memory refers to storing 3 bits of data in 1 storage unit 400, that is, including 3 data storage locations 401. TLC flash memory is slower than MLC flash memory and has a shorter lifespan. The data stored in MLC, such as "00", "01", "10", and "11", is also determined based on the voltage threshold. When the charged charge is less than 3.5V, it represents "11", when the charged charge is between 3.5V and 4.0V, it represents "10", when the charged charge is between 4V and 5.5V, it represents "01", and when the charged charge is above 5.5V, it represents "00".The data stored in TLC, such as "000", "001", "010", "011", "100", "101", "110", and "111", is also determined based on the voltage threshold. The dividing point of its voltage threshold is more detailed, resulting in lower reliability of each storage unit 400. The storage unit 400 in this embodiment is the storage unit 400 in the TLC flash memory. After a period of wear and tear of the TLC flash memory, it may happen that a data in the storage unit 400 cannot be reread successfully.
[0037] See also Figures 1 to 5 In step S2 and step S3, a read retry table 302 is configured for the storage unit 400. The read retry table 302 includes multiple rereading steps. The multiple rereading steps are sorted in a preset manner. The sorting manner can be the rereading step sorting provided by the supplier, or the optimal rereading step sorting saved in the previous rereading process, such as the first rereading step stored in the rereading process. If the first rereading step corresponding to the data storage location 401 is saved in the read retry table 302, the first rereading step is preferentially used for rereading when the rereading mechanism is executed. If the first rereading step corresponding to the data storage location 401 is not saved in the read retry table 302, the rereading is performed according to the arrangement order of the rereading steps in the read retry table 302. It is determined whether to perform data rereading on the data storage location 401 according to the read retry table 302. If so, the corresponding rereading step is set for the data rereading process. If not, the next step is continued.
[0038] See also Figures 1 to 5In step S4 and step S5, a request is made to read the data on the data storage location 401. If the read data is correct, the read data is output. If the read data is incorrect, a rereading mechanism is executed using a rereading step until the rereading is successful, and the reread data is output. When the read overlimit parameters of the rereading steps corresponding to all successful rereads are greater than a preset threshold, a data storage location 401 abandonment mechanism is executed to abandon the data storage location 401 requested to be read. The preset threshold can be 80% of the number of bits of the maximum fault tolerance of the error correction system. In some embodiments, the main controller controls various operations of the solid-state drive 200. The main controller can implement its functions by executing a processor and various hardware circuits of the firmware stored in the FW area of the flash memory, and executes various instructions such as write requests, cache refresh requests, and read requests from the host 100. In this embodiment, the host 100 issues a request to read the data on the data storage location 401, and determines whether the read data is correct. If the read data is correct, the read data is output. If the read data is incorrect, a rereading step is used to execute a rereading mechanism until the rereading is successful, and the reread data is output. In the read retry table 302, the reread steps are arranged in an initial order. When the reread mechanism is initially executed, the rereading is performed in the initial order of the reread steps. When the rereading is successful, the rereading step corresponding to the successful rereading is saved as the first rereading step corresponding to the data storage location 401 in the read retry table 302. At this time, the arrangement order of the rereading steps in the read retry table 302 is updated. When the flash memory receives a data read command again, it first determines whether the first rereading step corresponding to the data storage location 401 has been saved in the read retry table 302. If the first rereading step corresponding to the data storage location 401 has been saved in the read retry table 302, the first rereading step is preferentially used for rereading when the reread mechanism is executed. If the rereading fails using the first rereading step, the rereading continues in the arrangement order of the rereading steps in the read retry table 302 until the rereading is successful, and a new first rereading step in the read retry table 302 is obtained. If the read retry table 302 does not store the first reread step corresponding to the data storage location 401, rereading is performed in the order of the reread steps in the read retry table 302 until the rereading is successful, and the first reread step in the read retry table 302 is obtained. For example, the storage unit 400 is provided with a read retry table 302T(1) to a read retry table 302T(49), which means that each read retry table 302T(0) to T(49) includes a different read voltage. The master controller presets the reread step to first use the read voltage of the read retry table 302T(0) to read the data of the page.If the data error of the page cannot be effectively corrected by using the read voltage of the retry table T(0), such as VthA(0)-VthG(0), the main controller continues to use the read voltage of the retry table 302T(1), such as VthA(1)-VthG(1), to reread the data of the page, and so on, until the data of the page can be read without the occurrence of the uncorrectable error by using the read voltage of the retry table 302T(i), such as VthA(i)-VthG(i). The reread step i at this time can be saved as the first reread step of the data storage location 401. In this embodiment, when the reread is successful, it is determined whether the read overrun parameter of the reread step corresponding to the successful reread is greater than the preset threshold value. If the read overrun parameter of this reread step is greater than the preset threshold value, it is proved that this reread step will no longer be able to reread successfully. At this time, this reread step is not saved, and other reread steps are used in the subsequent reread mechanism to reread the data of the data storage location 401. If the read overrun parameter of this reread step is not greater than the preset threshold value, this reread step is saved as the first reread step corresponding to the data storage location 401 in the read retry table 302, thereby reducing the time required for the next read retry. When the read overrun parameter of all reread steps corresponding to the successful reread is greater than the preset threshold value, if the read overrun parameter is greater than the preset threshold value, it is proved that all reread steps will fail. At this time, the data storage location 401 abandonment mechanism is executed to abandon the data storage location 401 requested to be read.
[0039] See also Figures 1 to 5Specifically, in this embodiment, for example, in a TLC flash memory, each storage unit 400 includes three data storage locations 401, and each data storage location 401 stores one data. Before the host 100 requests to read the data in the storage unit 400, it first determines whether to perform data rereading according to the read retry table 302. If it is determined to perform data rereading, a corresponding rereading step is set for the data rereading process, and if there is a first rereading step, it is set to be used first. If it is determined that data rereading is not to be performed, the data reading process starts normally. After the data reading process, it is first determined whether the read data is correct. If correct, the read data is directly output. If an error occurs in a certain data read, the data storage location 401 where the reading error occurs is reread, that is, the reread mechanism is turned on. If there is a first reread step in the read retry table 302, the first reread step is used for rereading, which can save a lot of rereading time. If there is no first reread step in the read retry table 302, the rereading is performed in the order in the read retry table 302. After each rereading, it is determined whether the rereading is successful. If the rereading is unsuccessful, the rereading is continued according to the order of the rereading steps until the rereading is successful, that is, the data of this data storage location 401 is correctly read, and then the data is output. At the same time, it is determined whether the read overlimit parameter of the rereading step that is successfully reread is greater than the preset threshold value. If the read overlimit parameter of the rereading step is not greater than the preset threshold value, the rereading step that correctly reads the data of the data storage location 401 is saved and updated in the read retry table 302 as the first rereading step. The so-called first rereading step is the most preferred rereading step when the data storage location 401 is reread. When the data stored in the data storage location 401 has a read error again in the subsequent data reading process, the first rereading step is preferentially used to reread the data stored in the data storage location 401. Through this rereading mechanism, the optimal first rereading step can be saved for each data storage location 401, thereby effectively saving the time of data rereading. In addition, when the rereading is successful, the read overlimit parameter of the applied rereading step is first determined. If the read overlimit parameter of the applied rereading step is greater than the preset threshold value, the rereading step is not saved as the first rereading step. When all rereadings are successful, the read overlimit parameters of the applied rereading steps are greater than the preset threshold value, and the data storage location 401 abandonment mechanism is enabled.This is because when the read overlimit parameter of a successful reread step is greater than a preset threshold, it means that the reread step will no longer be able to successfully reread the data at the data storage location 401. When the read overlimit parameter of some reread steps is greater than the preset threshold, other reread steps can be used for rereading. However, when all rereads are successful and the read overlimit parameters of the applied reread steps are greater than the preset threshold, the entire storage unit 400 can be discarded, and data will no longer be stored in this storage unit 400. In this embodiment, a data storage location 401 discarding mechanism is adopted, that is, the entire storage unit 400 is retained, and only the data storage location in the storage unit 400 that is about to fail to be successfully reread is discarded. 401 is abandoned, for example, one of the three data storage locations 401 of a storage unit 400 of the TLC flash memory is abandoned, and the remaining two data storage locations 401 are retained. Abandoning the data storage location 401 means that all data on the data storage location 401 are not used. At the same time, when performing a write operation, the abandoned data storage location 401 should be written with garbage data to correctly complete the write operation of the TLC flash memory, so that the storage unit 400 of the TLC flash memory becomes similar to the state in which the storage unit 400 in the MLC flash memory only includes two data storage locations 401. In this way, the reading performance of the flash memory will not be affected, and the service life of the flash memory can be improved.
[0040] The present invention further provides a computer-readable storage device, on which a computer program is stored, and when the computer program is executed by a processor, the data reading method of the present invention is implemented.
[0041] The present invention provides a data reading method and a computer-readable storage device. The data reading method of the present invention reduces the time required for read retry and solves the problem of reduced reading speed and shortened life of flash memory devices in the later period of use by mixing two mechanisms, effectively improving the reading performance of flash memory devices and increasing the service life of flash memory devices. With the wear and tear of time, when the situation that the correct data cannot be corrected even after rereading occurs, the data storage location 401 storing the data can be abandoned in advance before the storage unit 400 is completely unusable, and then other data storage locations 401 in the storage unit 400 are retained, avoiding the problem of reduced reading performance and reduced service life of the flash memory device caused by abandoning the entire storage unit 400.
[0042] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A data reading method, characterized in that: It includes the following steps: Provide a storage unit, the storage unit comprising a plurality of data storage locations, and each of the data storage locations stores one bit of data; The storage unit is configured with a read retry table; Determine whether to perform data rereading at the data storage location according to the read retry table, if so, set a corresponding rereading step for the data rereading process, if not, execute the next step; Request to read the data at the data storage location; If the read data is correct, the read data is output; if the read data is incorrect, a rereading mechanism is executed using a rereading step until the rereading is successful, and the reread data is output; when the read overlimit parameters of the rereading steps corresponding to all successful rereads are greater than a preset threshold, a data storage location abandonment mechanism is executed; Wherein, the reread mechanism includes: the reread step in the read retry table that is preferentially used in the reread process is the first reread step; The data storage location abandonment mechanism includes: abandoning the data storage location requested to be read, and retaining other data storage locations in the storage unit.
2. The data reading method according to claim 1, characterized in that: The reread mechanism includes: if the read retry table has stored a first reread step corresponding to the data storage location, then when the reread mechanism is executed, the first reread step is preferentially used for rereading.
3. The data reading method according to claim 1, characterized in that: The reread mechanism includes: if the read retry table does not store the first reread step corresponding to the data storage location, rereading is performed according to the arrangement order of the reread steps in the read retry table.
4. The data reading method according to claim 1, characterized in that: The reread mechanism includes: when the reread is successful, saving the reread step corresponding to the successful reread as a new first reread step corresponding to the data storage position in the read retry table.
5. The data reading method according to claim 1, characterized in that: The reread mechanism includes: if the rereading fails using the first rereading step, then continue to reread according to the arrangement order of the rereading steps in the read retry table until the rereading succeeds, and obtain a new first rereading step in the read retry table.
6. The data reading method according to claim 1, characterized in that: The re-reading mechanism includes: if the reading over-limit parameter of the re-reading step corresponding to the successful re-reading is greater than a preset threshold, then the re-reading step is not saved.
7. The data reading method according to claim 6, characterized in that: The preset threshold is the number of bits that is 80% of the maximum error tolerance of the error correction system.
8. A computer-readable storage device, wherein a computer program is stored on the computer-readable storage device, and when the computer program is executed by a processor, the data reading method according to any one of claims 1 to 7 is implemented.
