A method of reading a storage medium and related apparatus

By employing a two-level table structure for the read voltage management table in the storage medium, the problem of large memory resource consumption by the read voltage management table is solved, achieving more efficient memory utilization and read operation flexibility.

CN115803814BActive Publication Date: 2026-03-24HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-10
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

The read voltage management table of existing storage media consumes a large amount of memory resources, resulting in a waste of storage space.

Method used

The read voltage management table adopts a two-level table structure to store the correspondence between the read voltage index and the management area and page type, reducing memory resource consumption, and updating the read voltage table in the event of read recovery to adapt to various actual situations.

Benefits of technology

This reduces the memory resource usage of reading the voltage management table, improves the flexibility and reliability of read operations, and reduces the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115803814B_ABST
    Figure CN115803814B_ABST
Patent Text Reader

Abstract

A reading method of a storage medium and related equipment, read voltage management table in the same management area and the same page type of multiple physical addresses have the same read voltage index, there is at least one read voltage index corresponding read voltage is the same page type corresponding multiple read voltage, can save memory resources. The embodiment method of the application comprises: the controller determines the first read voltage index corresponding to the first read voltage index corresponding to the physical address, and carries out read operation on the storage medium according to the first read voltage. Wherein, the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and more particularly to a method for reading a storage medium and related equipment. Background Technology

[0002] Storage media are carriers of data, capable of recording and preserving data for a period of time. Commonly used storage media include Memory Sticks, Smart Media Cards (SM Cards), floppy disks, hard disks, and optical discs. When data on a storage medium needs to be accessed, a suitable read voltage is required to perform a read operation on the medium and retrieve the desired data.

[0003] One method for reading storage media involves storing the optimal read voltage for each physical address in the controller's read voltage management table (RVMT). When reading data from different physical addresses, the controller needs to select the corresponding read voltage for each physical address to perform the read operation.

[0004] The read voltage management table in this method stores the read voltage for each physical address, which requires a large amount of storage space and occupies a high amount of memory resources. Summary of the Invention

[0005] This application provides a method for reading a storage medium and related devices. By storing multiple management areas and multiple page types with the corresponding relationship between the read voltage index and the read voltage index and the read voltage under multiple page types in the read voltage management table, wherein at least one page type among the multiple page types corresponds to multiple read voltages, the memory resources used by the read voltage management table are reduced.

[0006] The first aspect of this application provides a method for reading a storage medium, including:

[0007] Based on memory resource usage, an appropriate management granularity is selected to divide the storage medium, ensuring that the physical addresses corresponding to the same management region and the same page type have the same read voltage index in the read voltage management table, allowing data to be read using the same read voltage. Here, a management region represents the physical space within the storage medium corresponding to at least one physical address.

[0008] After receiving a read command from the host via the host-side interface, the controller can parse the read command and obtain the target physical address corresponding to the read command. Then, the controller can determine the management zone and target page type corresponding to the target physical address.

[0009] The physical address of a storage medium can be determined based on the corresponding designation. These designations include die, plane, block, and page. For example, a physical address can be represented as (die0, plane1, block1, page20), meaning that this physical address is the physical address of page 20 in block 1 of die 0, plane 1. Typically, a die has two planes, each containing 1000 to 2000 blocks. The number of dies in a storage system depends on the storage capacity of the system; no specific limit is specified here.

[0010] The controller primarily determines the target page type based on the page number, and the mapping relationship between page numbers and page types is determined according to the performance of the storage medium. The method by which the controller determines the management region corresponding to the target address is related to the management granularity of the management region. Different management granularities use different page numbers to determine the management region. If the management region is divided into units of single blocks, then physical addresses with the same block number correspond to the same management region.

[0011] Then, based on the management region corresponding to the target physical address and the target page type, the controller determines the first read voltage index and the first read voltage corresponding to the first read voltage index in the read voltage management table stored locally on the controller. Finally, based on the first read voltage, the controller executes the read command issued by the host to read data from the storage medium.

[0012] The read voltage management table stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. Since at least one of the multiple page types corresponds to multiple read voltages, the read voltage corresponding to the first read voltage index may be one or multiple.

[0013] Furthermore, the number of read voltage indices corresponding to the read voltages stored in the read voltage management table is not unique. At least one read voltage corresponding to the same page type in the second-level table can correspond to one read voltage index or multiple read voltage indices, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium.

[0014] In this embodiment, the read voltage management table stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. There are at least one read voltage index corresponding to multiple read voltages corresponding to the same page type, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the memory resources occupied by the read voltage management table.

[0015] In conjunction with the first aspect, in the first implementation of the first aspect of this application, the read voltage management table uses a two-level table structure. The first-level table stores the correspondence between read voltage indices and multiple management regions and multiple page types, while the second-level table stores the correspondence between read voltage indices and read voltages under different page types. Specifically, among the multiple page types in the read voltage management table, at least one page type corresponds to multiple read voltages.

[0016] In conjunction with the first aspect or the first implementation of the first aspect, in the second implementation of the first aspect of this application, if the controller fails to read data from the storage medium based on the first read voltage, it indicates that a read recovery has occurred. The existing read voltage in the read voltage management table is no longer applicable to the current situation, and the controller needs to update the read voltage management table. The controller can update the read voltage management table in the following manner:

[0017] First, the controller obtains the first read recovery voltage, which is the read voltage used when a read recovery is successful. The method by which the controller obtains the first read recovery voltage is not the focus of this application and will not be described in detail here. Then, the controller determines the second read recovery voltage based on the distance relationship between the first read recovery voltage and the read voltages stored in the second-level table. Finally, the read voltage management table is updated based on the determined second read recovery voltage.

[0018] In this embodiment, the controller can update the read voltage management table in the event of a read recovery. There are various reasons why a read recovery might occur on the storage medium. Updating the read voltage recorded in the read voltage management table in the event of a read recovery allows the second-level table of the read voltage management table to store fewer read voltages to adapt to various actual situations, thus improving the flexibility of the technical solution.

[0019] In conjunction with the second implementation of the first aspect, in the third implementation of the first aspect of this application, the controller can determine the second read recovery voltage for subsequent read operations on the physical address where read recovery occurs based on the distance relationship between the first read recovery voltage and the read voltage stored in the second-level table.

[0020] If a second read voltage exists in the second-level table, and the distance between it and the first read recovery voltage meets a preset condition, then the controller can determine that the second read voltage is the second read recovery voltage. The page type corresponding to the second read voltage is the same as the page type corresponding to the first read recovery voltage.

[0021] If the distance between each row of read voltage stored in the second-level table and the first read recovery voltage does not meet the preset condition, it means that the existing read voltages in the read voltage management table are not the optimal read voltages for performing read operations on the physical address corresponding to the read command. The controller can then determine the second read recovery voltage as the first read recovery voltage.

[0022] The first read recovery voltage must satisfy a preset condition regarding its distance from the read voltage stored in the second-level table. This condition can be that the distance between the first read recovery voltage and the read voltage stored in the second-level table is less than or equal to a preset threshold value. The size of the preset threshold value is determined based on the allowable error range for the actual application. In practical applications, multiple second read voltages that satisfy the preset condition may appear in the second-level table; any one of them can be selected. The selection method can be either the first read voltage that satisfies the preset condition as determined by the controller, or the read voltage that is closest to the first read recovery voltage while satisfying the preset condition. The choice can be made according to the needs of the actual application and is not limited here. Using the first read voltage that satisfies the preset condition as determined by the controller as the second read recovery voltage can reduce operation time. Using the read voltage that is closest to the first read recovery voltage can reduce the error range.

[0023] In this embodiment, when the relationship between the first read recovery voltage and the read voltage stored in the second-level table meets the preset conditions, the controller can determine that a certain row of read voltage in the second-level table is the second read recovery voltage. The second read recovery voltage is used to perform read operations on the physical address where read recovery occurs. Within the allowable error range, using the read voltage stored in the second-level table for read operations can avoid frequent updates to the second-level table, simplify the processing, and save computing resources.

[0024] In conjunction with the third implementation of the first aspect, in the fourth implementation of the first aspect of this application, the second-level table of the read voltage management table also includes a page type count, which is used to indicate the number of read voltages that hit the page type corresponding to a certain physical address.

[0025] The controller can update the read voltage management table in different ways depending on the different values ​​of the second read recovery voltage.

[0026] When the second read recovery voltage is the same as the second read voltage, the controller can determine the page type count corresponding to the second read voltage and the first row label of the second read voltage in the second-level table. The controller can then update the page type count corresponding to the second read voltage by incrementing the page type count, thereby completing the update of the second-level table.

[0027] The controller can also update the first-level table of the read voltage management table. Since the physical address where the read operation was performed has undergone read recovery, the read voltage used for future read operations on that physical address will actually be the second read voltage. Therefore, if the value of the first read voltage index still uses the previous value, it may correspond to an unsuitable read voltage. Therefore, the controller needs to update the first read voltage index, updating its value to the first row label.

[0028] In this embodiment, if the read voltage in the second-level table of the read voltage management target is still applicable after a read recovery, the controller can update the value of the first read voltage index so that the read voltage index in the first-level table can always correspond to the appropriate read voltage in the second-level table. The controller can then use the optimal read voltage to perform read operations, thereby improving the reliability of the technical solution of this application.

[0029] In conjunction with the third implementation of the first aspect, in the fifth implementation of the first aspect of this application, if the second read recovery voltage is the first read recovery voltage, it means that the read voltages stored in the second-level table are not the optimal read voltages, and the controller will trigger the swap-in / swap-out strategy to update the read voltage management table.

[0030] The following describes the process of the controller updating the second-level table: The second-level table of the read voltage management table also includes page type counts. The controller can determine the first page type count with the smallest value from the target page types corresponding to the physical address where a read recovery occurred. Since a read recovery has occurred, and none of the read voltages stored in the second-level table before the update meet the preset conditions, the read voltage with the fewest hits in the second-level table needs to be replaced with the second read recovery voltage. That is, the third read voltage corresponding to the first page type count is replaced with the second read recovery voltage.

[0031] Since the second read recovery voltage is only now stored in the second-level table, the first page type count cannot use the previous value and needs to start accumulating again. The controller also needs to update the value of the first page type count. The updated value of the first page type count indicates that a read operation was performed on the storage medium using the second read recovery voltage.

[0032] In this embodiment of the application, when the swap-in / swap-out strategy is triggered, the controller can update the read voltage with the fewest hits in the second-level table to the second read recovery voltage, so that the read voltage stored in the read voltage management table can be flexibly applied to various actual situations, thus improving the flexibility of the solution.

[0033] In conjunction with the fifth implementation of the first aspect, in the sixth implementation of the first aspect of this application, the controller also needs to update the first-level table. The update process is as follows:

[0034] First, after determining the first page type count, the controller can determine the row number of the read voltage that needs to be replaced in the second-level table, i.e., the second row number. Since the read voltage corresponding to the second row number has changed in the second-level table, the correspondence between the read voltage index and the read voltage needs to be updated in the first-level table to be updated. Specifically, the update method is to first determine the second read voltage index with the read voltage index value of the second row number, and then update the second read voltage index value to a preset value. The page type corresponding to the second read voltage index is the target page type. Because read recovery causes a change in the read voltage value corresponding to the first read voltage index, the controller also needs to update the first read voltage index value to the second row number.

[0035] In this embodiment, when a read recovery occurs and the read voltages stored in the second-level table do not meet the preset conditions, the controller can update the first-level table so that the read voltage index in the first-level table can always correspond to the appropriate read voltage in the second-level table. The controller can then use the optimal read voltage to perform read operations, thereby improving the reliability of the technical solution of this application.

[0036] In conjunction with the first aspect and any of the first to sixth implementations of the first aspect, in the seventh implementation of the first aspect of this application, the storage medium can be pre-divided into management areas according to management granularity. The management granularity can be a page of the storage medium or a block of the storage medium, which is selected according to the amount of memory resources, and is not specifically limited here.

[0037] When memory resources are limited, a coarser management granularity can be used to divide the management area, such as dividing it into two or three blocks, thereby further reducing the memory resources occupied by reading the voltage management table. When memory resources are plentiful, a finer management granularity can be used to divide the management area, such as dividing it into single or half-block units, thereby making the operation results more accurate.

[0038] In this embodiment, there are multiple ways to divide the management area of ​​the storage medium, which are determined according to the memory resource usage. Each method has its own advantages and improves the flexibility of the solution.

[0039] In conjunction with the first aspect and any of the first to seventh implementations of the first aspect, in the eighth implementation of the first aspect of this application, since each bit of data in each storage cell of the storage medium corresponds to the same page type, the storage medium involved in this application requires at least two page types, and at least one page type corresponds to at least two read voltages.

[0040] Therefore, each storage cell in the storage medium provided in this application embodiment stores at least two bits of data. Common storage media with this feature include NAND flash memory or NOR flash memory.

[0041] NAND flash memory includes multi-level cell (MLC), triple-level cell (TLC), or quadratic level cell (QLC), but the specific type is not limited here.

[0042] In this embodiment, the storage medium includes NAND flash memory or NOR flash memory, which can be applied to different scenarios, thus improving the feasibility of the technical solution.

[0043] In conjunction with the first aspect and any of the first to eighth implementations of the first aspect, in the ninth implementation of the first aspect of this application, the first-level table of the voltage management table includes the best voltage index storage (BVIT).

[0044] In conjunction with the first aspect and any of the first to ninth implementations of the first aspect, in the tenth implementation of the first aspect of this application, the second-level table of the voltage management table includes a voltage lookup table (VLUT).

[0045] In this embodiment, the first-level table and the second-level table of the voltage management table can be a specific optimal voltage subscript table and a voltage lookup table, which improves the feasibility of the solution.

[0046] In conjunction with the first aspect and any of the first to tenth implementations of the first aspect, in the eleventh implementation of the first aspect of this application, the controller includes a controller in a universal flash storage (UFS) device. UFS devices typically use NAND flash memory as the storage medium.

[0047] A second aspect of this application provides a storage controller, including:

[0048] Processor, memory, host-side interface, and storage medium-side interface.

[0049] The memory is used to store a read voltage management table, wherein the read voltage management table stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. At least one page type among the multiple page types corresponds to multiple read voltages, and each management region among the multiple management regions is a physical space in the storage medium corresponding to at least one physical address.

[0050] The processor is used for:

[0051] The read command received through the host-side interface is parsed to obtain the target physical address corresponding to the read command. Then, based on the target physical address, the corresponding management region and target page type are determined. Next, based on this management region and target page type, the first read voltage index is retrieved from the read voltage management table stored locally on the controller. Then, based on the first read voltage index, the corresponding first read voltage is retrieved from the read voltage management table. Finally, based on the first read voltage, a read command is issued to the storage medium through the storage medium-side interface to read data from the storage medium.

[0052] The beneficial effects shown in this aspect are similar to those in the first aspect, as detailed in the first aspect, and will not be repeated here.

[0053] In conjunction with the second aspect, in the first implementation of the second aspect, the read voltage management table is a two-level table structure. The first-level table of the read voltage management table stores the correspondence between the read voltage index and multiple management areas and multiple page types. The second-level table of the read voltage management table stores the correspondence between the read voltage index and the read voltage under different page types. At least one of the multiple page types corresponds to multiple read voltages.

[0054] In conjunction with the second aspect or the first implementation of the second aspect, in the second implementation of the second aspect, the processor is further used for:

[0055] If reading data from the storage medium fails based on the first read voltage, the first read recovery voltage is obtained. Then, based on the first read recovery voltage and the relationship between the read voltages stored in the second-level table, the second read recovery voltage is determined. Finally, the read voltage management table to be updated is updated based on the second read recovery voltage, resulting in the read voltage management table.

[0056] In conjunction with the second implementation of the second aspect, in the third implementation of the second aspect, the processor is used for:

[0057] If the distance between the first read recovery voltage and the second read voltage stored in the second-level table meets a preset condition, then the second recovery read voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage and the page type corresponding to the second read voltage are the same.

[0058] If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, then the second read recovery voltage is determined to be the first read recovery voltage.

[0059] In conjunction with the third implementation of the second aspect, the fourth implementation of the second aspect also includes a page type count in the second-level table. The page type count is used to represent the number of read voltages that hit the page type corresponding to a certain physical address.

[0060] The processor, upon determining that the second read recovery voltage is the second read voltage, updates the page type count corresponding to the second read voltage in the second-level table to be updated, thereby obtaining the second-level table.

[0061] The processor can also be used to determine the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second-level table. Then, in the first-level table to be updated, the index value of the first read voltage is updated to the first row label, thus obtaining the first-level table.

[0062] In conjunction with the third implementation of the second aspect, the fifth implementation of the second aspect also includes a page type count in the second-level table;

[0063] The processor is used for:

[0064] If the second read recovery voltage is determined to be the first read recovery voltage, then the first page type count is determined in the second-level table to be updated, where the first page type count has the smallest value among the page type counts corresponding to the target page type. Then, the third read voltage is updated to the second read recovery voltage, where the third read voltage corresponds to the first page type count. The processor is also used to update the value of the first page type count.

[0065] In conjunction with the fifth implementation of the second aspect, in the sixth implementation of the second aspect, the processor is also used for:

[0066] First, determine the second row label corresponding to the first page type count, where the second row label is the row label of the first page type count in the second-level table. Then, in the first-level table to be updated, determine the second read voltage index, where the value of the second read voltage index is the second row label, and the page type corresponding to the second read voltage index is the target page type. Finally, update the value of the second read voltage index to the preset value, and update the value of the first read voltage index to the second row label.

[0067] In conjunction with the second aspect and any of the first to sixth implementations of the second aspect, in the seventh implementation of the second aspect of this application, multiple management regions are pre-divided according to the management granularity of the storage medium. The management granularity includes pages or blocks of the storage medium.

[0068] In conjunction with the second aspect and any of the first to seventh implementations of the second aspect, in the eighth implementation of the second aspect of this application, since the data of each bit in each storage unit of the storage medium corresponds to the same page type, the storage medium involved in this application requires at least two page types, and at least one page type corresponds to at least two read voltages.

[0069] Therefore, each storage cell of the storage medium provided in this application embodiment stores at least two bits of data. Common storage media with this feature include NOR flash memory or NAND flash memory. Among them, NAND flash memory includes MLC, TLC or QLC, and is not specifically limited here.

[0070] In conjunction with the second aspect and any of the first to eighth implementations of the second aspect, in the ninth implementation of the second aspect of this application, the first-level table of the voltage management table includes an optimal voltage subscript table.

[0071] In conjunction with the second aspect and any of the first to ninth implementations of the second aspect, in the tenth implementation of the second aspect of this application, the second-level table of the voltage management table includes a voltage lookup table.

[0072] In conjunction with the second aspect and any of the first to tenth implementations of the second aspect, in the eleventh implementation of the second aspect of this application, the storage controller includes a controller in the UFS device. The UFS device typically uses NAND flash memory as the storage medium.

[0073] A third aspect of this application provides a storage medium reading device, comprising:

[0074] The processing unit is used to parse the read command and obtain the target physical address corresponding to the read command.

[0075] The determining unit is used to determine the management region and target page type corresponding to the target physical address, respectively, based on the target physical address. The management region refers to the physical space in the storage medium corresponding to at least one physical address.

[0076] The acquisition unit is used to obtain a first read voltage index from the read voltage management table stored locally on the controller, based on the management region and the target page type. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table. The read voltage management table stores the correspondence between the read voltage index and multiple management regions and multiple page types, as well as the correspondence between the read voltage index and the read voltage under multiple page types. At least one of the multiple page types corresponds to multiple read voltages.

[0077] The processing unit is also used to execute a read command based on the first read voltage to read data from the storage medium.

[0078] The beneficial effects shown in this aspect are similar to those in the first aspect, as detailed in the first aspect, and will not be repeated here.

[0079] In conjunction with the third aspect, in the first implementation of the third aspect of this application, the read voltage management table is a two-level table structure. The first-level table of the read voltage management table stores the correspondence between the read voltage index and multiple management regions and multiple page types, respectively. The second-level table of the read voltage management table stores the correspondence between the read voltage index and the read voltage under different page types.

[0080] In conjunction with the third aspect or the first implementation of the third aspect, in the second implementation of the third aspect of this application, the storage medium reading device further includes an updating unit.

[0081] The acquisition unit is also configured to acquire a first read recovery voltage if reading data from the storage medium fails based on the first read voltage.

[0082] The determining unit is also used to determine the second read recovery voltage based on the relationship between the first read recovery voltage and the read voltage stored in the second-level table.

[0083] The update unit is also used to update the read voltage management table to be updated based on the second read recovery voltage, so as to obtain the read voltage management table.

[0084] In conjunction with the second implementation of the third aspect, in the third implementation of the embodiments of this application, the determining unit is specifically used for:

[0085] If the distance between the first read recovery voltage and the second read voltage stored in the second-level table meets a preset condition, then the second recovery read voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage and the page type corresponding to the second read voltage are the same.

[0086] If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, then the second read recovery voltage is determined to be the first read recovery voltage.

[0087] In conjunction with the third implementation of the third aspect, in the fourth implementation of the third aspect of this application, the second-level table further includes a page type count, which is used to represent the number of read voltages of a page type corresponding to a certain physical address.

[0088] The update unit is used to update the page type count corresponding to the second read voltage in the second-level table to be updated if the second read recovery voltage is determined to be the second read voltage, so as to obtain the second-level table.

[0089] The update unit can also be used to determine the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second-level table. Then, in the first-level table to be updated, the index value of the first read voltage is updated to the first row label to obtain the first-level table.

[0090] In conjunction with the third implementation of the third aspect, in the fifth implementation of the third aspect of this application, the second-level table further includes a page type count.

[0091] The update unit is configured to, if the second read recovery voltage is determined to be the first read recovery voltage, determine the first page type count in the second-level table to be updated, wherein the first page type count has the smallest value among the page type counts corresponding to the target page type. Then, the third read voltage is updated to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count. The update unit is also configured to update the value of the first page type count.

[0092] In conjunction with the fifth implementation of the third aspect, in the sixth implementation of the third aspect of this application, the determining unit is further configured to:

[0093] Determine the second row label corresponding to the first page type count, where the second row label is the row label of the first page type count in the second-level table. Then, in the first-level table to be updated, determine the second read voltage index corresponding to the page type, where the second read voltage index value is the second row label.

[0094] The update unit is also used to update the value of the second reading voltage index to a preset value and update the value of the first reading voltage index to the second row number.

[0095] In conjunction with the third aspect and any of the first to sixth implementations of the third aspect, in the seventh implementation of the third aspect of this application, multiple management regions are pre-divided according to the management granularity of the storage medium, and the management granularity includes pages of the storage medium or blocks of the storage medium.

[0096] In conjunction with the third aspect and any of the first to seventh implementations of the third aspect, in the eighth implementation of the third aspect of this application, since the data of each bit in each storage unit of the storage medium corresponds to the same page type, the storage medium involved in this application requires at least two page types, and at least one page type corresponds to at least two read voltages.

[0097] Therefore, each storage cell in the storage medium provided in this application embodiment stores at least two bits of data. Common storage media with this feature include NAND flash memory or NOR flash memory. NAND flash memory includes MLC, TLC or QLC, and the specific type is not limited here.

[0098] In this embodiment, the storage medium includes NAND flash memory or NOR flash memory, which improves the feasibility of the technical solution.

[0099] In conjunction with the third aspect and any of the first to eighth implementations of the third aspect, in the ninth implementation of the second aspect of this application, the first-level table of the voltage management table includes an optimal voltage subscript table.

[0100] In conjunction with the third aspect and any of the first to ninth implementations of the third aspect, in the tenth implementation of the third aspect of this application, the second-level table of the voltage management table includes a voltage lookup table.

[0101] In conjunction with the third aspect and any of the first to tenth implementations of the third aspect, in the eleventh implementation of the third aspect of this application, the storage medium reading device includes a controller in the UFS device. The UFS device typically uses NAND flash memory as the storage medium.

[0102] This application provides a fourth aspect of a storage system, comprising:

[0103] The controller and storage medium. The controller includes a storage controller (a second aspect). Each storage cell in the storage medium stores at least two bits of data.

[0104] In conjunction with the fourth aspect, in the first implementation of the fourth aspect of the present application, the storage medium may be NAND flash memory or NOR flash memory. NAND flash memory includes MLC, TLC or QLC, and the specific type is not limited here.

[0105] In conjunction with the fourth aspect, in the first implementation of the fourth aspect of this application, the storage system may be a storage system using the UFS storage specification.

[0106] A fifth aspect of this application provides a chip system including at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the at least one processor being used to run computer programs or instructions to perform the method of the first aspect.

[0107] The communication interface in the chip system can be an input / output interface, pins, or circuits.

[0108] In conjunction with the fifth aspect, in the first implementation of the fifth aspect of this application, the chip system described above further includes at least one memory, which stores instructions. The memory can be an internal storage unit of the chip system, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0109] A sixth aspect of this application provides a computer-readable storage medium storing a program, which, when executed by a computer, performs the method described in the first aspect.

[0110] A seventh aspect of this application provides a computer program product that, when executed on a computer, performs the method described in the first aspect. Attached Figure Description

[0111] Figure 1 This is a schematic diagram illustrating an application scenario of the storage medium reading method in the embodiments of this application;

[0112] Figure 2 This is a flowchart illustrating a storage medium reading method in an embodiment of this application;

[0113] Figure 3 This is another flowchart illustrating the storage medium reading method in this application embodiment;

[0114] Figure 4 This is another flowchart illustrating the storage medium reading method in this application embodiment;

[0115] Figure 5 This is a schematic diagram of a storage medium reading device in an embodiment of this application;

[0116] Figure 6 This is a schematic diagram of the controller for reading data in an embodiment of this application;

[0117] Figure 7 This is a schematic diagram of the storage system in an embodiment of this application. Detailed Implementation

[0118] This application provides a method for reading a storage medium and related devices. The read voltage management table stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. At least one of the multiple page types corresponds to multiple read voltages, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the memory resources occupied by the read voltage management table.

[0119] Since each bit of data in each storage cell of the storage medium corresponds to the same page type, the storage medium involved in this application embodiment requires at least two page types, and at least one page type corresponds to at least two read voltages. Therefore, the storage medium provided in this application embodiment refers to a storage medium that stores at least two bits of data per storage cell, including NAND flash memory, NOR flash memory, etc., and is not specifically limited here.

[0120] Due to its advantages such as low read / write latency and low power consumption, NAND flash memory is widely used as a storage medium in many practical applications. Common devices using NAND flash memory include UFS devices. UFS devices refer to storage devices that use the Universal Flash Memory Standard (UFS). They internally include a controller and NAND flash memory. The UFS standard uses more advanced serial signals to increase the transmission frequency and achieve higher transmission bandwidth, thus making UFS devices widely applicable.

[0121] In summary, this application uses a UFS device with NAND flash memory as an example to provide a detailed description of the technical solution of this application.

[0122] First, the relevant concepts that may be involved in the embodiments of this application will be explained:

[0123] (1) Read recovery.

[0124] When responding to a read command from the host, the controller selects an appropriate read voltage to perform a read operation on the NAND flash memory. However, due to various reasons, the optimal read voltage recorded in the controller may no longer be able to successfully read data from the NAND flash memory. In this case, the controller determines a read voltage that can successfully read data, uses this read voltage to perform a read operation on the NAND flash memory, and returns the operation result to the host. This process is called read recovery. Simply put, read recovery is the process from read failure to the controller successfully reading data through some means. The read voltage used in read recovery can be called read recovery voltage, correctable voltage, or offset voltage; this application uses the term read recovery voltage.

[0125] In the event of a read failure, the method by which the controller determines the read recovery voltage is related to the specific design of the controller. Current mainstream products often use a dynamic estimation method for the read recovery voltage. The read recovery voltage is often a value that cannot be accurately known in advance. The specific method for determining the read recovery voltage is not the focus of this application's technical solution, therefore, the embodiments of this application will not be described in detail.

[0126] (2) Number of times to erase.

[0127] There are several possible reasons for read recovery in NAND flash memory, and the number of erase cycles is one of them. As the number of erase cycles in NAND flash memory increases, the oxide layer that isolates the floating gate electrons wears down, reducing its insulation and leading to data read errors.

[0128] (3) Data retention time.

[0129] Data retention time is also a common cause of read recovery in NAND flash memory. Over time, the data stored in the flash memory gradually disappears because electrons escape from the floating gate. The rate at which electrons escape from the floating gate is directly proportional to the number of erase cycles; that is, the more erase cycles, the faster the electrons escape, and the faster the data disappears.

[0130] (4) Read disturb.

[0131] Read disturb refers to the phenomenon where, with increasing flash memory read cycles, the contents of adjacent memory cells within the same block change. Electrons continuously enter the floating gate, altering the data state of that cell. In this situation, if the previously recorded read voltage is used to perform read operations on the NAND flash memory, read failures will occur.

[0132] (5) Temperature change.

[0133] Temperature variations in the environment in which NAND flash memory is stored can also affect data state. Temperature variations can occur when read and write operations are performed sequentially and continuously under significant temperature differences, such as performing a read operation at 55°C followed immediately by a write operation at 25°C, and then repeating the same read and write operations. Alternatively, read operations can be performed repeatedly under gradually changing temperatures; the specific scenario is not limited here.

[0134] In practical applications, read recovery in NAND flash memory can occur in various ways, not limited to the reasons mentioned above. The reasons for read recovery also differ depending on the storage medium. For storage media other than NAND flash memory, the reasons for read recovery can be other than those mentioned above, which will not be elaborated upon here.

[0135] Next, a brief introduction to the application scenarios of the embodiments of this application will be given. Please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of the method for reading a storage medium provided in an embodiment of this application.

[0136] like Figure 1As shown, a communication connection is established between the host 101, controller 102, and NAND flash memory 103 for data transmission. The host 101 can send a read command to the controller 102. Upon receiving the read command, the controller 102 parses it to determine the target physical address for which a read operation needs to be performed. Then, it determines the management region and target page type corresponding to the target physical address from the read voltage management table stored locally in the controller, thus obtaining the first read voltage index. Next, it determines the first read voltage for performing the read operation on the target physical address from the read voltage management table, and finally sends the read command to the NAND flash memory 103. After receiving the read command, the NAND flash memory 103 can perform a read operation based on the first read voltage and then send the operation result to the controller 102. After receiving the operation result, the controller 102 can send the operation result back to the host 101. The controller 102 can receive read commands from the host through a host-side interface. Typically, the host-side interface is an input / output (I / O) interface. The controller 102 sends read commands to the storage medium through the storage medium side interface. When the storage medium is NAND flash memory, the storage medium side interface is the NAND Flash interface (NFI). The NAND flash memory can receive read commands through the I / O interface.

[0137] It should be noted that in practical applications, the controller 102 and the NAND flash memory 103 can also be coupled in the same storage system.

[0138] Based on the number of bits of data stored in each storage cell, NAND flash memory can be divided into different types, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), or quadratic-level cell (QLC).

[0139] In the embodiments of this application, each storage cell of the storage medium used stores at least two bits of data. In the following description, the NAND flash memory is TLC as an example. Each storage cell in TLC stores 3 bits of data. When performing a read operation on TLC, it is necessary to read three page types: least significant bit (LSB), central significant bit (CSB), and most significant bit (MSB). Multiple read voltages are often required. The number of read voltages is related to the configuration of the NAND flash memory. In one possible implementation, seven read voltages can be used to complete the reading process. The read voltage corresponding to each page type is different and depends on the configuration of the NAND flash memory. LSB can correspond to 1 or 2 read voltages, CSB can correspond to 2 or 3 read voltages, and MSB can correspond to 2, 3, or 4 read voltages. The specific requirements are not limited here, as long as a maximum of seven read voltages are used to distinguish different page types.

[0140] Common TLCs include "1-2-4" type TLCs, "1-3-3" type TLCs, or "2-3-3" type TLCs. These three numbers represent the number of read voltages required to read the LSB, CSB, and MSB, respectively. Taking the "1-2-4" type TLC as an example, "1-2-4" means that the LSB corresponds to 1 read voltage, the CSB corresponds to 2 read voltages, and the MSB corresponds to 4 read voltages.

[0141] In one method of reading NAND flash memory, the read voltage for each physical address needs to be stored in a read voltage management table. Each read voltage in the read voltage management table can only correspond to one physical address. The following uses a "1-2-4" type TLC as an example to illustrate the process of reading data from NAND flash memory using this method.

[0142] Typically, the number of pages of each type in a storage medium is the same because, within the same management area, each page type corresponds to the bit information of the same storage unit. If a "1-2-4" type TLC has 1536 physical addresses, of which 512 physical addresses correspond to LSB, 512 to CSB, and 512 to MSB page types, then to perform read operations on all physical addresses with CSB page types, 1024 read voltages need to be stored in the read voltage management table.

[0143] For the same situation, the technical solution provided in this application can divide the "1-2-4" type TLC into several management regions according to the management granularity. The size of the management granularity is selected based on the memory resource usage. The management granularity can be several blocks or several pages, and can be divided in units of single blocks or sub-blocks, or in units of single pages or double pages, depending on the actual application needs. When memory resources are scarce, the management regions can be divided in units of double blocks or triple blocks, resulting in a smaller number of management regions and further reducing the memory resources occupied by the first-level table. When memory resources are abundant, the management regions can be divided in units of single blocks or sub-blocks, reducing data reading errors.

[0144] This application uses the division of management areas into units of two blocks as an example for a simple explanation.

[0145] For example, each block can include 64 pages, which can be regarded as 64 physical addresses. If the "1-2-4" type TLC is divided into 4 management regions, the resulting first-level table can include the contents shown in Table 1.

[0146] Table 1

[0147] LSB CSB MSB region0 index 0,0 ]]> index 0,1 ]] index 0,2 ]]> region1 index 1,0 ]]> index 1,1 ]]> index 1,2 ]] region2 <![CDATA[index 2,0 ]]> <![CDATA[index 2,1 ]]> <![CDATA[index 2,2 ]]> region3 <![CDATA[index 3,0 ]]> <![CDATA[index 3,1 ]]> <![CDATA[index 3,2 ]]>

[0148] Table 1's horizontal header indicates the page type category, and the vertical header indicates different management regions. According to Table 1, a single management region of a TLC will contain three page types. Based on the management region and page type, the read voltage index can be determined. Since Table 1 is the result of dividing the management region into units of two blocks, if the 512 physical addresses corresponding to CSBs in this "1-2-4" type TLC are evenly divided into four management regions, each corresponding to an index... 0,1 index 1,1 index 2,1 and index 3,1 Therefore, each read voltage index will correspond to 128 physical addresses. Next, the appropriate read voltage needs to be determined based on the read voltages stored in the second-level table.

[0149] The second-level table can include the contents shown in Table 2.

[0150] Table 2

[0151]

[0152] If index0,1 The value is 0, and the index is... 1,1 The value is 1, and the index is... 2,1 The value is 2, and the index is... 3,1 If the value is 3, then it corresponds to the read voltage of page type CSB in the read voltages labeled 0, 1, 2, or 3 in row 2 of Table 2. If rB and rF are the read voltages corresponding to CSB, then R can be determined. n,3 and R n,5 The desired reading voltage is specified, where n is an integer from 0 to 3. This is used to select the index. 0,1 Taking the read operation based on the corresponding physical address as an example, the read voltage determined by the controller in conjunction with Tables 1 and 2 is R. 0,1 and R 0,5 The corresponding reading voltage value.

[0153] As can be seen from Tables 1 and 2, storing 8 read voltages in the second-level table allows for read operations on 512 physical addresses.

[0154] Even though the existing methods also divide the physical address, they store 7 read voltages in each management area instead of the read voltage index determined by the page type in the technical solution of this application. Therefore, the memory resources occupied by the first-level table in the embodiment of this application are still higher.

[0155] Taking the division of the physical address of the storage medium into 1000 management regions as an example, for TLC, according to existing management methods, 1000 × 7 = 7000 read voltages would be stored in the read voltage management table. However, the first-level table in this application stores 1000 × 3 = 3000 read voltage indices. Each read voltage and each read voltage index occupies the same amount of memory resources. Using the first-level table provided in this application embodiment can save 57% of memory resources. For QLC, because reading QLC uses 15 read voltages and has 4 page types, even more memory resources can be saved, approximately 73%.

[0156] Furthermore, the read voltages stored in the second-level table of the read voltage management table provided in this application embodiment are determined experimentally and have a wide range of applications. The technical solution of this application can also update the read voltages in the second-level table, enabling the read voltages stored in the second-level table to perform read operations on all physical addresses of the storage medium. The specific update method will be described below. In this application embodiment, the first-level table often has hundreds or thousands of rows, or even more, while the second-level table is usually within 32 or 64 rows, making the overall resource usage of the second-level table much smaller than that of the first-level table. Therefore, the two-level table structure adopted by the read voltage management table in this application embodiment can save memory resources.

[0157] The following describes the method for reading a storage medium provided in the embodiments of this application. The method for reading a storage medium provided in the embodiments of this application can be applied to... Figure 1 In the scenario shown, due to the complex operating environment of UFS devices, NAND flash memory often experiences coupling phenomena due to factors such as data retention time, read interference, or temperature changes, causing the optimal read voltage to change. In this case, using the read voltage in the read voltage management table may fail to read the data. The following sections explain the cases of successful and failed reads.

[0158] 1. Successful reading using the first reading voltage:

[0159] Please see Figure 2 , Figure 2 One embodiment of the storage medium reading method in this application includes:

[0160] 201. The controller receives the read command.

[0161] The controller can establish a connection with the host and receive read commands sent by the host through the host-side interface. The connection between the controller and the host can be wireless or wired, depending on the needs of the actual application; no specific limitation is made here.

[0162] 202. The controller determines the target physical address corresponding to the read command.

[0163] When the controller performs a read operation on NAND flash memory, it doesn't blindly read all physical addresses. Instead, it determines the target physical address to be read based on the read command sent by the host. After receiving the read command from the host, the controller can parse the command to determine the target physical address, which is the physical address of the data to be read in the NAND flash memory.

[0164] 203. The controller determines the first reading voltage index.

[0165] After determining the first physical address corresponding to the read command, the controller can determine the first read voltage index from the read voltage management table stored locally by the controller, based on the management area corresponding to the target physical address and the target page type corresponding to the target physical address.

[0166] The following is a brief explanation of the process by which the controller determines the management region corresponding to the target physical address and the target page type corresponding to the target physical address.

[0167] The physical address of a storage medium can be determined by the corresponding designation, which includes the designation of the granular, plane, block, and page. For example, a physical address can be represented as (die0, plane2, block3, page10), meaning that this physical address is the physical address of page 10 in block 3 under plane 2 of granular 0. Typically, a granular component has two planes, each containing 1000 to 2000 blocks. The number of granular components in a storage system depends on the system's storage capacity; the larger the storage capacity, the more granular components are used. However, this is not a specific limitation here.

[0168] The controller primarily determines the target page type based on the page number, and the mapping relationship between the page number and the page type is determined according to the performance of the storage medium.

[0169] For example, in TLC, the mapping relationship between page number and page type can be shown in Table 3:

[0170] Table 3

[0171] Page Code Page type Pages 0 to 20 LSB Pages 21 to 35 CSB Pages 36 to 64 MSB

[0172] When configuring NAND flash memory, the NAND flash memory can be divided into several management regions with an appropriate management granularity based on the memory resource usage of the storage system. Each management region contains multiple physical addresses, and can be viewed as a physical space storing several physical addresses. There are various options for the management granularity, including single-block, half-block, double-block, and triple-block configurations, determined according to the actual application needs; no specific limitation is made here. When memory resources are limited, management regions can be divided into double-block or triple-block units, resulting in a smaller number of management regions and further reducing the memory resources occupied by the first-level table. When memory resources are sufficient, management regions can be divided into single-block or half-block units, reducing data read errors.

[0173] The mapping between management regions and physical addresses depends on the management granularity. Different management granularities use different codes to determine management regions. For example, if management regions are divided into single-block units, the mapping relationship between management regions and physical addresses can be shown in Table 4. Similarly, if management regions are divided into two-block units, the mapping relationship can be shown in Table 5.

[0174] Table 4

[0175] code name Management Area block0 region0 block1 region1 block2 region2 block3 region3 block4 region4

[0176] Combining Tables 3 and 4, we can see that the physical address with block number block3 and page number page2 corresponds to region3 and the target page type is LSB.

[0177] Table 5

[0178] code name Management Area block0, block1 region0 block2, block3 region1 block4, block5 region2 block6, block7 region3 block8, block9 region4

[0179] In practical applications, the number of blocks in a storage medium is related to its performance and configuration. Common storage media typically contain 1,000 to 2,000 blocks. This application does not limit the number of blocks in a storage medium.

[0180] Combining Tables 3 and 5, we can see that the physical address with block number block3 and page number page2 corresponds to region1 in the management area and LSB in the target page type.

[0181] The following describes the process by which the controller determines the first read voltage index based on the management region and target page type corresponding to the target physical address.

[0182] The first read voltage index is stored in the first-level table of the read voltage management table. This first-level table stores the correspondence between multiple management regions and page types and their corresponding read voltage indices. Each read voltage index has a corresponding page type and a corresponding management region. A management region may have multiple physical addresses, and a page type may also correspond to multiple physical addresses. In the first-level table of the read voltage management table, multiple physical addresses corresponding to the same management region and the same page type all point to the same read voltage index.

[0183] In this embodiment, the first-level table is taken as the optimal voltage subscript table. The number of management areas stored in the optimal voltage subscript table is related to the management granularity of the NAND flash memory. This management granularity can be divided into several blocks or several pages, or into single blocks or half blocks, or into single pages or double pages. The specific choice is made according to the actual application needs, and no limitation is made here.

[0184] The determination of management granularity is also related to memory resource utilization. When memory resources are scarce, a coarser management granularity can be used to divide the management area, such as dividing it into units of two or three blocks, thereby further reducing the memory resources occupied by reading the voltage management table. When memory resources are plentiful, a finer management granularity can be used to divide the management area, such as dividing it into units of single blocks or half blocks, thereby making the operation results more accurate.

[0185] In this embodiment, there are multiple options for dividing the management area of ​​the storage medium. The fineness of dividing the management area can be determined according to the usage of memory resources, which improves the flexibility of the technical solution.

[0186] For example, the optimal voltage subscript table may include the contents shown in Table 6:

[0187] Table 6

[0188] LSB CSB MSB region0 <![CDATA[index 0,0 ]]> <![CDATA[index 0,1 ]]> <![CDATA[index 0,2 ]]> region1 <![CDATA[index 1,0 ]]> <![CDATA[index 1,1 ]]> <![CDATA[index 1,2 ]]> region2 <![CDATA[index 2,0 ]]> <![CDATA[index 2,1 ]]> <![CDATA[index 2,2 ]]>

[0189] As shown in Table 6, the voltage reading index is... 0,0 The corresponding page type is LSB, and the corresponding management region is region0.

[0190] 204. The controller determines whether the value of the first read voltage index is a preset value. If yes, then proceed to step 205; otherwise, proceed to step 206.

[0191] After determining the first reading voltage index, the controller can determine the value of the first reading voltage index and determine the appropriate reading voltage based on the relationship between the value of the first reading voltage index and the preset value.

[0192] For example, the values ​​for the voltage index can be shown in Table 7:

[0193] Table 7

[0194] Read voltage index Value <![CDATA[index 0,0 ]]> 0 <![CDATA[index 0,1 ]]> 1 <![CDATA[index 0,2 ]]> 2 <![CDATA[index 1,0 ]]> 65 <![CDATA[index 1,1 ]]> 65 <![CDATA[index 2,0 ]]> -1 <![CDATA[index 2,2 ]]> 3

[0195] 205. The controller uses the cached read voltage to perform read operations.

[0196] If the value of the first read voltage index is the same as the preset value, the controller can determine to use the cached read voltage for the read operation. The preset value, also known as the sentinel value, can be manually set. The specific value of the preset value can be of various values; it can be greater than the largest row number in the second-level table of the read voltage management table, or it can be less than the smallest row number in the second-level table, as long as it is different from any row number in the second-level table. Specific limitations are not specified here. Optionally, the preset values ​​corresponding to different read voltage indices can be the same or different; specific limitations are not specified here.

[0197] It is important to note that the cached read voltage in this embodiment is the read voltage cached on the die. Each page type in each management region has its own cached read voltage. These read voltages may be the same or different, representing the read voltage used when a read operation was performed on the physical address corresponding to a page type in a certain management region. Due to the performance characteristics of NAND flash memory itself, voltage values ​​can be cached on the die, even in the case of the first read operation.

[0198] 206. The controller determines the first reading voltage corresponding to the first reading voltage index.

[0199] If the value of the first reading voltage index differs from the preset value, the controller can determine the value of the first reading voltage index and determine the first reading voltage corresponding to the first reading voltage index from the second-level table. This embodiment uses a voltage lookup table as an example of the second-level table. For instance, the voltage lookup table may include the contents shown in Table 8:

[0200] Table 8

[0201]

[0202] As shown in Table 8, rA to rG represent physical addresses. Each page type corresponds to a different physical address, and therefore the read voltage for each page type is also different, depending on the NAND flash memory configuration. Typically, an LSB can correspond to 1 or 2 read voltages, a CSB can correspond to 2 or 3 read voltages, and an MSB can correspond to 2, 3, or 4 read voltages. The specifics are not limited here and are determined based on the actual NAND flash memory configuration used. As long as a maximum of seven read voltages are used, different page types can be distinguished.

[0203] For example, the correspondence between page type and read voltage can be shown in Table 9:

[0204] Table 9

[0205] Page type Read voltage LSB rA、rE CSB rB, rD, rF MSB rC、rG

[0206] Combining Tables 8 and 9, we can see that R 0,0 The corresponding page type is LSB, and the corresponding read voltages are rA and rE.

[0207] As shown in Table 8, R 0,0 To R 0,6This represents the read voltage at row number 1. The initial value of the read voltage can be determined based on the performance of the NAND flash memory and the results of multiple experiments. Due to the complex application scenarios of UFS devices, NAND flash memory often experiences coupling phenomena due to data retention time, read interference, or temperature changes, causing the optimal read voltage to change. Therefore, the read voltage lookup table can store multiple sets of read voltages and be updated according to the actual application situation.

[0208] Optionally, the voltage lookup table can store 32 or 64 rows of voltage readings, as long as the memory resources occupied by the second-level table are much smaller than those of the first-level table. No specific limitation is made here.

[0209] As shown in Table 9, the page type count includes the LSB count, CSB count, and MSB count, representing the number of times the read voltage corresponding to a certain page type is used. For example, referring to Tables 6 and 7, N... 0,1 This means using R 0,0 The number of read operations performed on the NAND flash memory at the corresponding read voltage.

[0210] The initial value of the page type count is 0. If the controller uses the read voltage corresponding to a certain page type, the page type count will be updated. The update method can be to increment the value by 1 each time the page type count is used, or to increment it by 10 each time it is used, depending on the actual application requirements. The key is to ensure that the increase in the page type count is consistent with each use; no specific limitation is made here. This embodiment uses the example where the page type count corresponding to the read voltage is incremented by 1 each time it is used.

[0211] It should be understood that Tables 3 to 5, 7 and 9 express mapping relationships, and do not necessarily mean that each of them exists as a separate table in actual application.

[0212] The controller can determine the read voltage index corresponding to the physical address of the read command based on Table 6. Then, it determines the value of the read voltage index based on Table 7. Finally, it determines the read voltage corresponding to the read voltage index based on Tables 8 and 9. In this embodiment, the first read voltage index is index. 0,0 For example, by combining Tables 6 to 9, the controller can determine the index. 0,0 The corresponding value is R in the voltage lookup table. 0,0 and R 0,4 The indicated reading voltage.

[0213] 207. The controller sets the first read voltage to the die.

[0214] After determining the first read voltage, the controller can set the first read voltage on the die.

[0215] 208. Update the voltage management table of the controller.

[0216] Since the first read voltage is stored in the read voltage management table to be updated, a read voltage management table is needed. The update method could be to increment the page type count corresponding to the first read voltage. In this embodiment, the first read voltage is indexed as `index`. 0,0 For example, referring to Tables 3 to 6, we can see that the index 0,0 The corresponding page type count is N 0,1 If the controller uses index 0,0 The corresponding read voltage, N in VLUT 0,1 The corresponding value is then incremented by 1, thus completing the update of the voltage management table.

[0217] 209. The controller performs a read operation on the NAND flash memory based on the first read voltage.

[0218] After determining the first read voltage, the controller can use the first read voltage to perform read operations on the NAND flash memory.

[0219] It should be noted that there is no necessary order for steps 207, 208 and 209. In practical applications, step 207 can be executed first, step 208 can be executed first, or step 209 can be executed first. No specific restrictions are made here.

[0220] 210. The controller receives the operation results and sends them to the host.

[0221] After performing a read operation using the first read voltage, the NAND flash memory can generate an operation result and send it to the controller. Upon receiving the operation result, the controller can then send it to the host.

[0222] In this embodiment, the read voltage management table stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. There are at least one read voltage index corresponding to multiple read voltages corresponding to the same page type, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the memory resources occupied by the read voltage management table.

[0223] Furthermore, the read voltage index can be a preset value. In this case, the controller does not need to query the read voltage management table and can directly obtain the read voltage from the die, saving the step of setting the read voltage and reducing the time overhead caused by setting the read voltage. In addition, the controller updates the page type count corresponding to the read voltage every time it performs a read operation, providing a basis for updating the read voltage management table. This makes the update of the read voltage management table more in line with the needs of actual applications and improves the flexibility of the solution.

[0224] 2. Cases where reading fails using the first reading voltage:

[0225] Due to the complex operating environment of UFS devices, the optimal read voltage of NAND flash memory often changes due to factors such as data retention time, read interference, or temperature variations, leading to read recovery. In this embodiment, in the event of read recovery, the controller can update the read voltage management table to adapt to various operating environments, thus improving the flexibility of the technical solution.

[0226] Please see Figure 3 , Figure 3 One embodiment of the storage medium reading method in this application includes:

[0227] 301. The controller receives a read command;

[0228] 302. The controller determines the target physical address corresponding to the read command.

[0229] 303. The controller determines the first reading voltage index.

[0230] 304. The controller determines whether the value of the first read voltage index is a preset value. If yes, then proceed to step 305; otherwise, proceed to step 307.

[0231] 305. The controller uses the cached read voltage for read operations.

[0232] In this embodiment of the application, steps 301 to 305 are... Figure 2 Steps 201 to 205 in the illustrated embodiment are similar and will not be repeated here.

[0233] 306. The controller receives the operation result and sends the operation result to the host.

[0234] The controller receives several possible operation results, which are explained below:

[0235] In one scenario, after step 305, the controller performs a read operation on the NAND flash memory based on the read voltage cached on the die. The NAND flash memory then generates an operation result and sends it to the controller. Upon receiving the operation result, the controller can send it to the host.

[0236] In one scenario, after the controller performs a read operation on the NAND flash memory using the first read voltage stored in the second-level table of the read voltage management table, and the physical address where the read operation was performed has not been recovered, the controller successfully reads the data and sends the received operation result to the host.

[0237] 307. The controller determines the first reading voltage corresponding to the first reading voltage index.

[0238] In this embodiment of the application, step 307 and... Figure 2 Step 206 in the illustrated embodiment is similar and will not be repeated here.

[0239] 308. The controller performs a read operation on the NAND flash memory based on the first read voltage.

[0240] After determining the first read voltage, the controller can use the first read voltage to perform read operations on the NAND flash memory.

[0241] It should be noted that after step 307, the controller can also set the first read voltage to the die and update the read voltage management table. The setting and updating methods are the same as those for... Figure 2 Steps 207 and 208 in the illustrated embodiment are similar and will not be described in detail here.

[0242] 309. The controller determines whether a read recovery has occurred at the target physical address. If yes, proceed to step 310; otherwise, proceed to step 306.

[0243] After performing a read operation on the NAND flash memory based on the first read voltage, the controller can determine whether a read recovery has occurred at the target physical address corresponding to the read command. If the read is successful, it means that no read recovery has occurred at the target physical address; if the read fails, it means that a read recovery has occurred at the target physical address, and the first read voltage is not the optimal read voltage for performing a read operation on the target physical address corresponding to the read command.

[0244] 310. The controller determines the first read recovery voltage.

[0245] If a read recovery occurs at the physical address corresponding to the read command, it means that the controller cannot successfully read the data from the physical address using the first read voltage, and the read voltage needs to be changed. In this case, the controller can determine the first read recovery voltage, which is the optimal read voltage for the target physical address.

[0246] The method by which the controller determines the first recovery voltage is not the focus of this application's technical solution; therefore, this application's embodiments will not provide a detailed description of the process for obtaining the first recovery voltage.

[0247] 311. The controller determines whether the distance between the first read recovery voltage and the read voltage in row X of the second-level table meets the preset condition. If yes, then execute step 312; otherwise, execute step 315.

[0248] After obtaining the first read recovery voltage, the controller can compare the distance between the first read recovery voltage and the read voltage of any row in the second-level table to determine the second read recovery voltage for reading the NAND flash memory, and update the read voltage management table using different update methods based on the second read recovery voltage.

[0249] This embodiment uses a voltage lookup table (VLUT) as an example for detailed explanation. For ease of writing, the Xth row is used to represent any row in the VLUT, where X represents the row number of the VLUT, which is also the first row number corresponding to the second read voltage in the claim, and X is an integer greater than or equal to 0.

[0250] In practical applications, the distance between the first read recovery voltage and the read voltage of the Xth row can be calculated using various methods. This can be either the sum of the differences between the two sets of voltages or the weighted average of the differences between the two sets of voltages. No specific method is specified here.

[0251] For example, one distance calculation formula could be d(U,V)=sqrt((|v1-u1| 2 +……+|v n -u n | 2 ) / n), where U=(u1,u2,…,u n V = (v1, v2, ..., v) n U and V represent the first read recovery voltage and the read voltage of the Xth row in VLUT, respectively.

[0252] There are several ways to meet the preset conditions. In practical applications, it can be that the distance between the two voltage groups is less than the threshold value, or the distance between the two voltage groups is less than or equal to the threshold value. The choice can be made according to the actual application needs, and no specific limit is made here.

[0253] Optionally, there are several ways to compare the first read recovery voltage with the read voltage stored in the VLUT. It can be compared sequentially from row 0 to the last row in the VLUT table, or in a random but non-repeating order, or the comparison can be stopped once a read voltage that meets the conditions is obtained in the VLUT. The choice can be made according to the actual application needs, and no specific limitation is made here.

[0254] Optionally, there are many ways to determine the reading voltage of the Xth row. It can be the first reading voltage compared, or it can be the reading voltage that is the closest to the first reading recovery voltage among all the reading voltages that meet the conditions. The choice can be made according to the actual application needs, and there is no limitation here.

[0255] For example, to satisfy the preset condition of being less than or equal to 0.5, the second read recovery voltage is selected as the read voltage with the smallest distance from the first read recovery voltage: If there are read voltage 1 and read voltage 2 in VLUT, where the distance between read voltage 1 and the first read recovery voltage is 0.2 and the distance between read voltage 2 and the first read recovery voltage is 0.45, since read voltage 1 is closer to the first read recovery voltage, the error is smaller, so the controller can determine that the second read recovery voltage is read voltage 1.

[0256] In this application, the controller can determine the read voltage of row X in several ways, each with its own advantages. If the first compared read voltage is determined to be the second read recovery voltage, the number of comparisons can be reduced, saving computational resources. If the second read recovery voltage is determined to be the read voltage with the smallest distance from the first read recovery voltage among all satisfying read voltages, the read voltage used for subsequent read operations on the physical address corresponding to the read command will be closer to the optimal read voltage, reducing errors and improving the accuracy of the technical solution.

[0257] 312. The controller determines the second read recovery voltage to be the read voltage of row X.

[0258] If the distance between the first read recovery voltage and the read voltage of row X meets the preset condition, the controller can determine that the second read recovery voltage is the read voltage of row X.

[0259] In this embodiment, when the relationship between the first read recovery voltage and the read voltage stored in the second-level table meets the preset conditions, the controller can determine that a certain row of read voltage in the second-level table is the second read recovery voltage. The second read recovery voltage is used to perform read operations on the physical address where read recovery occurs. Within the allowable error range, using the read voltage stored in the second-level table for read operations can avoid frequent updates to the second-level table, simplify the processing, and save computing resources.

[0260] 313. The controller updates the first-level table.

[0261] After the controller determines that the second read recovery voltage is the read voltage of row X, it can update the first-level table.

[0262] For example, this embodiment uses the optimal voltage index table BVIT as the first-level table for detailed explanation. The update method can be to update the value of the first read voltage index to X.

[0263] For example, the management region for reading operations is region0, the page type corresponding to this management region is LSB, and the first read voltage index is index. 0,0 Taking a value of 0 as an example. If the second read recovery voltage is the same as the first row read voltage, then the index needs to be adjusted. 0,0 The value is updated to 1.

[0264] In this embodiment, if the read voltage in the second-level table of the read voltage management table is still applicable after a read recovery, the controller can update the value of the first read voltage index so that the read voltage index in the first-level table can always correspond to the appropriate read voltage in the second-level table. The controller can then use the optimal read voltage to perform read operations, thereby improving the reliability of the technical solution of this application.

[0265] 314. The controller updates the second-level table.

[0266] The controller can also update the VLUT by increasing the page type count corresponding to row X. The increment can vary: it could be 1 for each read voltage operation of a page type in row X, or 10 for each operation. The key is to ensure the increment is consistent, depending on the application requirements. No specific limitation is set here.

[0267] For example, if the page type corresponding to the managed area is LSB, and row X is row 1, then the page type count is N. 1,1 The value is 10, and the update method is that each time a read voltage of a certain page type in row X is used, the count of that page type is incremented by 1. For example, if the read voltage of row X is determined as the second read recovery voltage, then N... 1,1 The value is updated to 11.

[0268] It should be noted that there is no necessary order between steps 313 and 314. In practical applications, step 313 can be executed first or step 314 can be executed first, as long as it is executed after step 312. No specific restrictions are made here.

[0269] 315. The controller determines that the second read recovery voltage is the first read recovery voltage.

[0270] If the distance between the first read recovery voltage and the read voltage of any row in the VLUT does not meet the preset condition, it means that the read voltage stored in the voltage management table is not the optimal read voltage. The controller can then determine that the second read recovery voltage is the first read recovery voltage.

[0271] 316. Update the voltage management table of the controller.

[0272] After the controller determines that the first read recovery voltage is the second read recovery voltage, it can trigger the swap-in / swap-out strategy to update the read voltage management table.

[0273] 317. The controller receives the read recovery operation result and sends the read recovery operation result to the host.

[0274] After determining the first read recovery voltage, the controller can perform a read operation on the NAND flash memory based on the first read recovery voltage to obtain the operation result. If data is successfully read using the first read recovery voltage, the controller can send the operation result to the host.

[0275] It should be noted that step 317 is not necessarily after step 314 or step 316. It can also be before step 314 or step 316, or even before step 311, as long as it is after step 310. The choice can be made according to the actual application needs, and no specific limitation is made here.

[0276] In this embodiment, the read voltage management table stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. There are at least one read voltage index corresponding to multiple read voltages corresponding to the same page type, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the memory resources occupied by the read voltage management table.

[0277] Furthermore, since NAND flash memory frequently experiences read recoveries, changing the read voltage and updating the read voltage management table for each recovery is complex and time-consuming. Therefore, within acceptable error limits, subsequent read operations can use the read voltage already stored in the read voltage management table, simplifying the process and saving computational resources. If the distance between the first read recovery voltage and the read voltage in row X of the voltage lookup table exceeds the acceptable error range, the controller can update the read voltage management table, making it applicable to various situations and improving the flexibility of the solution.

[0278] based on Figure 3Step 316 in the illustrated embodiment is described in detail below as the process by which the controller triggers the swap-in / switch-out strategy to update the read voltage management table. For example... Figure 3 In the illustrated embodiment, if a read recovery occurs at the first physical address, the controller can obtain the first read recovery voltage and then compare the distance between the first read recovery voltage and the read voltage of any row in the voltage lookup table, thereby updating the read voltage management table. If the distance between the first read recovery voltage and the read voltage of any row in the voltage lookup table does not meet a preset condition, the controller can proceed according to... Figure 4 The process shown updates the voltage management table. Please refer to [link / reference]. Figure 4 , Figure 4 One embodiment of the storage medium reading method in this application includes:

[0279] 3161. The controller determines the first page type count with a value of Y.

[0280] In the voltage lookup table, the controller can determine the page type corresponding to the physical address where the read recovery occurred, and then determine the first page type count with a value of Y, wherein Y has the smallest value among at least one page type count corresponding to the page type, which is the value of the first page type count in the claim.

[0281] It should be understood that in practical applications, there may be multiple page type counts with a value of Y, and the controller can arbitrarily select one of them as the first page type count.

[0282] 3162. The controller updates the type count on the first page.

[0283] After determining the first page type count, the controller can update the first page type count. The update method can be to update the value of the first page type count to 1 or to 10, as long as the value can indicate that the first read recovery voltage has been hit once.

[0284] It should be noted that step 3162 can be executed before or after step 3163, as long as it is executed after step 3161. No specific limitation is made here.

[0285] 3163. The controller determines the row number Z where the first page type count is located.

[0286] After determining the first page type count, the controller can determine the row number Z of the first page type count in the voltage lookup table, which is also the first row number in the claims.

[0287] In this embodiment of the application, when the swap-in / swap-out strategy is triggered, the controller can update the read voltage with the fewest hits in the second-level table to the second read recovery voltage, so that the read voltage stored in the read voltage management table can be flexibly applied to various actual situations, thus improving the flexibility of the solution.

[0288] 3164. The controller updates the read voltage of line Z.

[0289] After determining the row number Z where the first page type count is located, the controller can update the read voltage of row Z. This update can be achieved by replacing the read voltage corresponding to the page type in row Z with the second read recovery voltage.

[0290] 3165. The controller updates the value of the first read voltage index.

[0291] The controller can determine the first read voltage index corresponding to the physical address where a read recovery occurred in the optimal voltage index table. Since a read recovery has occurred, the value of the first read voltage has changed, and the corresponding row number in the voltage lookup table may also have changed. Therefore, the value of the first read voltage index needs to be updated. This update can be done by setting the value of the first read voltage index to Z.

[0292] It should be noted that there is no necessary order between steps 3164 and 3165. Step 3164 can be executed first, or step 3165 can be executed first, or both steps 3164 and 3165 can be executed simultaneously, as long as they are executed after step 3163. No specific restrictions are imposed here.

[0293] 3166. The controller determines the second read voltage index.

[0294] In the optimal voltage subscript table, the controller can determine the second read voltage index, where the value of the second read voltage index is Z, and the second read voltage index corresponds to the page type in which the read recovery occurred.

[0295] 3167. The controller updates the value of the second read voltage index.

[0296] Since the read voltage in row Z has changed, the value of the second read voltage index also needs to be updated to meet the requirements of the actual application. This can be done by updating the value of the second read voltage index to a preset value.

[0297] For example, to facilitate understanding of the technical solution, let's take a read recovery of the LSB in region0 as an example to simply illustrate the above update process. Assume the row number corresponding to the smallest page type count is 2, and the index... 2,0 The value is 2, and the maximum row number of the VLUT is 64. Therefore, the controller can read the first voltage index. 0,0The value of index is updated to 2. 2,0 The value is updated to the preset value 66. In the second row of VLUT, the read voltage corresponding to LSB is also updated to the read recovery voltage.

[0298] In this embodiment, when a read recovery occurs and the read voltages stored in the second-level table do not meet the preset conditions, the controller can update the first-level table so that the read voltage index in the first-level table can always correspond to the appropriate read voltage in the second-level table. The controller can then use the optimal read voltage to perform read operations, thereby improving the reliability of the technical solution of this application.

[0299] In this embodiment, the read voltage management table stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. There are at least one read voltage index corresponding to multiple read voltages corresponding to the same page type, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the memory resources occupied by the read voltage management table.

[0300] Furthermore, in this embodiment of the application, when a read recovery occurs and the swap-in / swap-out strategy is triggered, the controller can update the read voltage with the fewest hits in the second-level table to the second read recovery voltage, so that the read voltage stored in the read voltage management table can be flexibly applied to various actual situations, thereby improving the flexibility of the solution.

[0301] The following describes the storage medium reading device in the embodiments of this application:

[0302] Please see Figure 5 , Figure 5 This is a schematic diagram of a storage medium reading device 500 in an embodiment of this application. One embodiment of the storage medium reading device 500 in this application includes:

[0303] Processing unit 501 is used to parse read commands and obtain the target physical address corresponding to the read command.

[0304] The determining unit 502 is used to determine, based on the physical address, the management region and the target page type corresponding to the target physical address, respectively, wherein the management region is the physical space in the storage medium corresponding to at least one physical address.

[0305] The acquisition unit 503 is used to obtain a first read voltage index from the read voltage management table stored locally by the controller based on the management region and the target page type. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table. The read voltage management table stores the correspondence between the read voltage index and multiple management regions and multiple page types, as well as the correspondence between the read voltage index and the read voltage under different page types. At least one of the multiple page types corresponds to multiple read voltages.

[0306] The processing unit 501 is also configured to execute a read command based on the first read voltage to read data from the storage medium.

[0307] In some optional embodiments of this application, the read voltage management table is a two-level table structure. The first-level table of the read voltage management table stores the correspondence between the read voltage index and multiple management regions and multiple page types, respectively. The second-level table of the read voltage management table stores the correspondence between the read voltage index and the read voltage under different page types.

[0308] In some optional embodiments of this application, the storage medium reading device 500 further includes an update unit 504.

[0309] The acquisition unit 503 is also configured to acquire a first read recovery voltage if reading data from the storage medium fails based on the first read voltage.

[0310] The determining unit 502 is also used to determine the second read recovery voltage based on the relationship between the first read recovery voltage and the read voltage stored in the second-level table.

[0311] The update unit 504 is also used to update the read voltage management table to be updated based on the second read recovery voltage, so as to obtain the read voltage management table.

[0312] In some optional embodiments of this application, the determining unit 502 is specifically used for:

[0313] If the distance between the first read recovery voltage and the second read voltage stored in the second-level table meets a preset condition, then the second recovery read voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage and the page type corresponding to the second read voltage are the same.

[0314] If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, then the second read recovery voltage is determined to be the first read recovery voltage.

[0315] In some optional embodiments of this application, the second-level table further includes a page type count, which represents the number of read voltages that hit the page type corresponding to a certain physical address.

[0316] The update unit 504 is used to update the page type count corresponding to the second read voltage in the second-level table to be updated if the second read recovery voltage is determined to be the second read voltage, so as to obtain the second-level table.

[0317] The update unit 504 can also update the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second-level table. Then, in the first-level table to be updated, the index value of the first read voltage is updated to the first row label to obtain the first-level table.

[0318] In some optional embodiments of this application, the update unit 504 is configured to, if the second read recovery voltage is determined to be the first read recovery voltage, determine the first page type count in the second-level table to be updated, wherein the first page type count has the smallest value among the page type counts corresponding to the target page type. Then, the third read voltage is updated to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count. The update unit 504 is also configured to update the value of the first page type count.

[0319] In some optional embodiments of this application, the determining unit 502 is further configured to:

[0320] Determine the second row label corresponding to the first page type count, where the second row label is the row label of the first page type count in the second-level table. Then, in the first-level table to be updated, determine the second read voltage index, where the second read voltage index value is the second row label, and the page type corresponding to the second read voltage index is the target page type.

[0321] The update unit 504 is also used to update the value of the second reading voltage index to a preset value and update the value of the first reading voltage index to the second row number.

[0322] In some optional embodiments of this application, multiple management regions are pre-divided according to the management granularity of the storage medium, which includes pages or blocks of the storage medium.

[0323] In some optional embodiments of this application, each storage cell in the storage medium stores at least two bits of data, which can be NAND flash memory or NOR flash memory. NAND flash memory includes MLC, TLC or QLC, and the selection is made according to the needs of the actual application. No specific limitation is made here.

[0324] In some optional embodiments of this application, the first-level table of the voltage management table includes an optimal voltage subscript table, and the second-level table of the voltage management table includes a voltage lookup table.

[0325] In some optional embodiments of this application, the reading device for the storage medium includes a controller in the UFS device. UFS devices often use NAND flash memory as the storage medium.

[0326] In this embodiment, the storage medium reading device 500 can perform the aforementioned... Figures 1 to 4 The specific operations performed by the controller in the illustrated embodiment will not be described in detail here.

[0327] Figure 6 This is a schematic diagram of the structure of a data reading controller provided in an embodiment of this application. The controller 600 may include one or more central processing units (CPUs) 601 and a memory 602, in which one or more applications or data are stored.

[0328] The memory 602 can be volatile or persistent storage. The program stored in the memory 602 can include one or more modules, each module including a series of instruction operations on the server. Furthermore, the processor 601 can be configured to communicate with the memory 602 and execute the series of instruction operations in the memory 602 on the controller 600.

[0329] The controller 600 may also include one or more power supplies 605, one or more host-side interfaces 603, one or more storage media-side interfaces 604, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0330] In some optional embodiments of this application,

[0331] The memory 602 is used to store a read voltage management table. The read voltage management table stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. At least one page type among the multiple page types corresponds to multiple read voltages, and each management region among the multiple management regions is a physical space in the storage medium corresponding to at least one physical address.

[0332] Processor 601, used for:

[0333] The read command received through the host-side interface 603 is parsed to obtain the target physical address corresponding to the read command. Then, based on the target physical address, the management region and target page type corresponding to the target physical address are determined. Next, based on the management region and target page type, the first read voltage index is obtained from the read voltage management table. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table. Finally, based on the first read voltage, a read command is issued to the storage medium through the storage medium-side interface 604 to read data from the storage medium.

[0334] In some optional embodiments of this application, the read voltage management table is a two-level table structure. The first-level table of the read voltage management table stores the correspondence between multiple management areas and multiple page types and read voltage indexes. The second-level table of the read voltage management table stores the correspondence between read voltage indexes and read voltages under multiple page types. At least one of the multiple page types corresponds to multiple read voltages.

[0335] In some optional embodiments of this application, processor 601 is further configured to:

[0336] If reading data from the storage medium fails based on the first read voltage, the first read recovery voltage is obtained. Then, based on the first read recovery voltage and the relationship between the read voltages stored in the second-level table, the second read recovery voltage is determined. Finally, the read voltage management table to be updated is updated based on the second read recovery voltage, resulting in the read voltage management table.

[0337] In some optional embodiments of this application, processor 601 is configured to:

[0338] If the distance between the first read recovery voltage and the second read voltage stored in the second-level table meets a preset condition, then the second recovery read voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage and the page type corresponding to the second read voltage are the same.

[0339] If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, then the second read recovery voltage is determined to be the first read recovery voltage.

[0340] In some optional embodiments of this application, the second-level table further includes a page type count, which represents the number of read voltages that hit the page type corresponding to a certain physical address.

[0341] Processor 601 is configured to, when determining that the second read recovery voltage is the second read voltage, update the page type count corresponding to the second read voltage in the second-level table to be updated, thereby obtaining the second-level table.

[0342] The processor 601 can also be used to determine the first row label corresponding to the second read voltage, wherein the first row label is the row label of the second read voltage in the second-level table. Then, in the first-level table to be updated, the index value of the first read voltage is updated to the first row label to obtain the first-level table.

[0343] In some optional embodiments of this application, the second-level table further includes a page type count;

[0344] Processor 601 is configured to, if it is determined that the second read recovery voltage is the same as the first read recovery voltage, determine the first page type count in the second-level table to be updated, wherein the first page type count is the smallest among the page type counts corresponding to the target page type. Then, it updates the third read voltage to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count. The processor is also configured to update the value of the first page type count.

[0345] In some optional embodiments of this application, processor 601 is further configured to:

[0346] First, determine the second row label corresponding to the first page type count, where the second row label is the row label of the first page type count in the second-level table. Then, in the first-level table to be updated, determine the second read voltage index, where the value of the second read voltage index is the second row label, and the page type corresponding to the second read voltage index is the target page type. Finally, update the value of the second read voltage index to the preset value, and update the value of the first read voltage index to the second row label.

[0347] In some optional embodiments of this application, multiple management regions are pre-divided according to the management granularity of the storage medium. The management granularity includes pages or blocks of the storage medium.

[0348] In some optional embodiments of this application, each storage cell in the storage medium stores at least two bits of data, which can be NAND flash memory or NOR flash memory. NAND flash memory includes MLC, TLC or QLC, and the selection is made according to the needs of the actual application. No specific limitation is made here.

[0349] In some optional embodiments of this application, the first-level table of the voltage management table includes an optimal voltage subscript table, and the second-level table of the voltage management table includes a voltage lookup table.

[0350] In some optional embodiments of this application, the reading device for the storage medium includes a controller in the UFS device. UFS devices often use NAND flash memory as the storage medium.

[0351] Finally, a brief description of a storage system 700 provided in the embodiments of this application will be given. Please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram of the structure of the storage system 700 in an embodiment of this application.

[0352] Storage system 700 includes:

[0353] Controller 701 and storage medium 702.

[0354] Controller 701 can perform the aforementioned Figures 1 to 4 The operations performed by the controller in the illustrated embodiment are as described above. Figure 5 The operation performed by the storage medium reading device in the illustrated embodiment, or the aforementioned Figure 6 The specific operations performed by the processor in the illustrated embodiment will not be described here.

[0355] Each storage cell in storage medium 702 stores at least two bits of data.

[0356] In some alternative embodiments of this application, the storage medium 702 includes NOR flash memory or NAND flash memory, and the NAND flash memory includes MLC, TLC or QLC.

[0357] In some embodiments of this application, the storage system may be a storage system using the UFS storage specification.

[0358] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0359] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0360] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0361] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0362] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for reading a storage medium, characterized in that, include: The controller parses the read command and obtains the target physical address corresponding to the read command; Based on the target physical address, the controller determines the management region and target page type corresponding to the target physical address, wherein the management region is a physical space in the storage medium corresponding to at least one physical address; The controller obtains the first read voltage index from the read voltage management table stored locally on the controller, based on the management region and the target page type. The controller obtains the first read voltage from the read voltage management table according to the first read voltage index. The read voltage management table stores the correspondence between the read voltage index and multiple management regions and multiple page types, as well as the correspondence between the read voltage index and the read voltage under different page types. At least one of the multiple page types corresponds to multiple read voltages. The controller executes the read command based on the first read voltage to read data from the storage medium.

2. The method according to claim 1, characterized in that, The read voltage management table has a two-level table structure. The first-level table of the read voltage management table stores the correspondence between the multiple management areas and the multiple page types and the read voltage index. The second-level table of the read voltage management table stores the correspondence between the read voltage index and the read voltage under the multiple page types.

3. The method according to claim 1 or 2, characterized in that, After executing the read command according to the first read voltage to read data from the storage medium, the method further includes: If the controller fails to read data from the storage medium based on the first read voltage, it obtains the first read recovery voltage. The controller determines the second read recovery voltage based on the relationship between the first read recovery voltage and the read voltage stored in the second-level table; The controller updates the read voltage management table to be updated based on the second read recovery voltage, thereby obtaining the read voltage management table.

4. The method according to claim 3, characterized in that, The controller determines the second read recovery voltage based on the relationship between the first read recovery voltage and the read voltages stored in the second-level table, including: If the distance between the first read recovery voltage and the second read voltage stored in the second-level table meets a preset condition, then the controller determines the second read recovery voltage as the second read voltage, wherein the page type corresponding to the first read recovery voltage and the page type corresponding to the second read voltage are the same; If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, then the controller determines that the second read recovery voltage is the first read recovery voltage.

5. The method according to claim 4, characterized in that, The second-level table also includes a page type count, which represents the number of read voltages that hit a page type corresponding to a certain physical address; The controller updates the read voltage management table to be updated based on the second read recovery voltage, including: If the controller determines that the second read recovery voltage is the second read voltage, then in the second-level table to be updated, the page type count corresponding to the second read voltage is updated to obtain the second-level table; The controller determines the first row number corresponding to the second read voltage, wherein the first row number is the row number of the second read voltage in the second level table; In the first-level table to be updated, the controller updates the value of the first read voltage index to the first row number to obtain the first-level table.

6. The method according to claim 4, characterized in that, The second-level table also includes page type counts; The controller updates the read voltage management table to be updated based on the second read recovery voltage, including: If the controller determines that the second read recovery voltage is the first read recovery voltage, then in the second-level table to be updated, a first page type count is determined, wherein the first page type count is the smallest among the page type counts corresponding to the target page type; The controller updates the third read voltage to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count; The controller updates the value of the first page type count.

7. The method according to claim 6, characterized in that, After the controller determines the first page type count, the method further includes: The controller determines the second row number corresponding to the first page type count, wherein the second row number is the row number of the first page type count in the second level table; In the first-level table to be updated, the controller determines a second read voltage index, wherein the value of the second read voltage index is the second row number, and the page type corresponding to the second read voltage index is the target page type; The controller updates the value of the second read voltage index to a preset value; The controller updates the first read voltage index value to the second row number.

8. The method according to any one of claims 1, 2, or 4 to 7, characterized in that, The multiple management regions are pre-divided according to the management granularity of the storage medium; The management granularity includes pages of the storage medium or blocks of the storage medium.

9. The method according to any one of claims 1, 2, or 4 to 7, characterized in that, The storage medium includes NOR flash memory or NAND flash memory; The NAND flash memory includes: multi-layer cell (MLC), three-layer cell (TLC), or four-layer cell (QLC).

10. The method according to any one of claims 1, 2, or 4 to 7, characterized in that, The controller includes the controller in a general-purpose flash storage (UFS) device.

11. A storage controller, characterized in that, include: Processor, memory, host-side interface, and storage medium-side interface; The memory is used to store a read voltage management table, which stores the correspondence between read voltage indices and multiple management regions and multiple page types, as well as the correspondence between read voltage indices and read voltages under different page types. At least one of the multiple page types corresponds to multiple read voltages, and each of the multiple management regions is a physical space in the storage medium corresponding to at least one physical address. The processor is used for: Parse the read command received through the host-side interface to obtain the target physical address corresponding to the read command; Based on the target physical address, determine the management region and target page type corresponding to the target physical address respectively; Based on the management region and the target page type, the first read voltage index is obtained from the read voltage management table; The first read voltage is obtained from the read voltage management table based on the first read voltage index; Based on the first read voltage, a read command is sent to the storage medium through the storage medium-side interface to read data from the storage medium.

12. The storage controller according to claim 11, characterized in that, The read voltage management table has a two-level table structure. The first-level table of the read voltage management table stores the correspondence between the multiple management areas and the multiple page types and the read voltage index. The second-level table of the read voltage management table stores the correspondence between the read voltage index and the read voltage under the multiple page types.

13. The storage controller according to claim 11 or 12, characterized in that, The processor is also used for: If reading data from the storage medium fails based on the first read voltage, then the first read recovery voltage is obtained; The second read recovery voltage is determined based on the relationship between the first read recovery voltage and the read voltage stored in the second-level table; Based on the second read recovery voltage, update the read voltage management table to be updated to obtain the read voltage management table.

14. The storage controller according to claim 13, characterized in that, The processor is used for: If the distance between the first read recovery voltage and the second read voltage stored in the second-level table meets a preset condition, then the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage and the page type corresponding to the second read voltage are the same; If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, then the second read recovery voltage is determined to be the first read recovery voltage.

15. The storage controller according to claim 14, characterized in that, The second-level table also includes a page type count, which represents the number of read voltages that hit a page type corresponding to a certain physical address; The processor is used for: If the second read recovery voltage is determined to be the second read voltage, then in the second-level table to be updated, the page type count corresponding to the second read voltage is updated to obtain the second-level table; Determine the first row number corresponding to the second read voltage, wherein the first row number is the row number of the second read voltage in the second level table; In the first-level table to be updated, the value of the first read voltage index is updated to the first row number to obtain the first-level table.

16. The storage controller according to claim 14, characterized in that, The second-level table also includes page type counts; The processor is used for: If the second read recovery voltage is determined to be the first read recovery voltage, then in the second-level table to be updated, the first page type count is determined, wherein the first page type count is the smallest among the page type counts corresponding to the target page type; The third read voltage is updated to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count; Update the value of the type count for the first page.

17. The storage controller according to claim 16, characterized in that, The processor is also used for: Determine the second row number corresponding to the first page type count, wherein the second row number is the row number of the first page type count in the second-level table; In the first-level table to be updated, a second read voltage index is determined, wherein the value of the second read voltage index is the second row number, and the page type corresponding to the second read voltage index is the target page type; Update the value of the second reading voltage index to the preset value; Update the first read voltage index value to the second row label.

18. The storage controller according to any one of claims 11, 12, or 14 to 17, characterized in that, The multiple management regions are pre-divided according to the management granularity of the storage medium; The management granularity includes pages of the storage medium or blocks of the storage medium.

19. The storage controller according to any one of claims 11, 12, or 14 to 17, characterized in that, The storage medium includes NOR flash memory or NAND flash memory; The NAND flash memory includes: multi-layer cell (MLC), three-layer cell (TLC), or four-layer cell (QLC).

20. The storage controller according to any one of claims 11, 12, or 14 to 17, characterized in that, The storage controller includes the controller in the UFS device.

21. A storage system, characterized in that, include: Controller and storage media; The controller includes the storage controller according to any one of claims 11 to 20; Each storage unit in the storage medium stores at least two bits of data.

22. The system according to claim 21, characterized in that, The storage medium includes NOR flash memory or NAND flash memory; The NAND flash memory includes multi-layer cell (MLC), three-layer cell (TLC), or four-layer cell (QLC).

23. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains a program that, when executed by the computer, performs the method as described in any one of claims 1 to 10.

24. A computer program product, characterized in that, When the computer program product is executed on a computer, the computer performs the method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Flash memory device and method for adjusting read voltage of flash memory device

    CN101335047A

  • Nonvolatile memory storage system

    CN108735253A