CN115803814A - Storage medium reading method and related equipment - Google Patents

Storage medium reading method and related equipment Download PDF

Info

Publication number
CN115803814A
CN115803814A CN202080102871.8A CN202080102871A CN115803814A CN 115803814 A CN115803814 A CN 115803814A CN 202080102871 A CN202080102871 A CN 202080102871A CN 115803814 A CN115803814 A CN 115803814A
Authority
CN
China
Prior art keywords
voltage
read
reading
controller
index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080102871.8A
Other languages
Chinese (zh)
Inventor
张杨
程智翔
张碧华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN115803814A publication Critical patent/CN115803814A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/34Determination of programming status, e.g. threshold voltage, overprogramming or underprogramming, retention

Landscapes

  • Read Only Memory (AREA)

Abstract

A reading method of a storage medium and related equipment are provided, a plurality of physical addresses in the same management area and the same page type in a reading voltage management table have the same reading voltage index, and the reading voltage corresponding to at least one reading voltage index is a plurality of reading voltages corresponding to the same page type, so that memory resources can be saved. The method in the embodiment of the application comprises the following steps: and the controller determines a first reading voltage corresponding to the first reading voltage index according to the first reading voltage index corresponding to the physical address, and reads the storage medium according to the first reading voltage. The reading voltage management table stores the corresponding relations between the reading voltage indexes and the reading voltages under different page types and between the reading voltage indexes and the reading voltages under the different page types.

Description

Storage medium reading method and related equipment Technical Field
The present application relates to the field of data processing, and in particular, to a method for reading a storage medium and a related device.
Background
A storage medium is a carrier for storing data, capable of recording data information, and may hold data information for a period of time. Storage media commonly used at present include memory sticks, smart Media (SM) cards, floppy disks, hard disks, optical disks, and the like. When the data in the storage medium needs to be used, the storage medium needs to be read according to a proper read voltage, so that the data which is desired to be used is obtained.
A reading method of a storage medium is to store an optimal reading voltage of each physical address in a Reading Voltage Management Table (RVMT) of a controller, and when reading data of different physical addresses, the controller needs to select the reading voltages corresponding to the different physical addresses to perform reading operation.
The read voltage management table in the method stores the read voltage of each physical address, the required storage space is large, and the occupied memory resource is high.
Disclosure of Invention
The embodiment of the application provides a method for reading a storage medium and related equipment, wherein a reading voltage management table stores a plurality of management areas, a corresponding relation between a plurality of page types and a reading voltage index, and a corresponding relation between the reading voltage index and a reading voltage under the plurality of page types, wherein at least one page type in the plurality of page types corresponds to a plurality of reading voltages, so that memory resources used by the reading voltage management table are reduced.
A first aspect of an embodiment of the present application provides a method for reading a storage medium, including:
according to the using condition of the memory resources, the storage medium is divided by selecting proper management granularity, so that the physical addresses which correspond to the same management area and the same page type are the same in the read voltage index in the read voltage management table, and the data can be read by using the same read voltage. Wherein one management area represents a physical space in the storage medium corresponding to at least one physical address.
After receiving the read command issued by the host through the host side interface, the controller can analyze the read command to obtain a target physical address corresponding to the read command. Thereafter, the controller may determine a management area and a target page type corresponding to the target physical address, respectively.
The physical address of the storage medium may be determined according to the code numbers corresponding to the physical addresses, which include grain (die), plane (plane), block (block), and page (page), for example, a physical address may be represented as (die 0, plane1, block1, page 20), which means that the physical address is the physical address of page20 in block1 under plane1 of grain 0. Generally, a granule has two planes, each plane has 1000 to 2000 blocks, and a storage system has a plurality of granules, which are determined according to the storage capacity of the storage system, and the details are not limited herein.
The controller determines the target page type mainly according to the page code, and the mapping relation between the page code and the page type is determined according to the performance of the storage medium. The mode of the controller for determining the management area corresponding to the target address is related to the management granularity of the management area. If the management areas are divided according to the unit of a single block, the management areas corresponding to the physical addresses with the same block code number are the same.
Then, the controller may determine, in a read voltage management table locally stored by the controller, a first read voltage index and a first read voltage corresponding to the first read voltage index according to a management area corresponding to the target physical address and the type of the target page. And finally, the controller executes a read command issued by the host according to the first read voltage, and reads data from the storage medium.
The reading voltage management table stores the corresponding relations between the reading voltage indexes and the reading voltages under different page types and between the reading voltage indexes and the reading voltages under the different page types. The reading voltage corresponding to at least one of the page types is multiple, and therefore, the reading voltage corresponding to the first reading voltage index may be one or multiple.
In addition, the number of the read voltage indexes corresponding to the read voltages stored in the read voltage management table is not unique, and at least one read voltage corresponding to the same page type in the second-level table may correspond to one read voltage index or a plurality of read voltage indexes, so that the read voltages stored in the read voltage management table can read all physical addresses of the storage medium.
In the embodiment of the application, the reading voltage management table stores the corresponding relations between the reading voltage indexes and the multiple management areas and the multiple page types respectively, and the corresponding relations between the reading voltage indexes and the reading voltages under different page types, and the reading voltages corresponding to at least one reading voltage index are multiple reading voltages corresponding to the same page type, so that the reading voltages stored in the reading voltage management table can read all physical addresses of a storage medium, and memory resources occupied by the reading voltage management table are reduced.
With reference to the first aspect, in a first implementation manner of the first aspect of the embodiment of the present application, the read voltage management table uses a two-level table structure, the first-level table of the read voltage management table stores correspondence between read voltage indexes and multiple management areas and multiple page types, and the second-level table of the read voltage management table stores correspondence between read voltage indexes and read voltages in different page types. At least one page type in the plurality of page types of the read voltage management table corresponds to a plurality of read voltages.
With reference to the first aspect or the first implementation manner of the first aspect, in a second implementation manner of the first aspect of the embodiment of the present application, if the controller fails to read data from the storage medium according to the first read voltage, which indicates that a read recovery occurs, an existing read voltage in the read voltage management table is no longer applicable to a current situation, and the controller needs to update the read voltage management table. The controller may update the read voltage management table using the following:
first, the controller may obtain a first read recovery voltage, which is a read voltage used when the read recovery is successful. The manner in which the controller obtains the first read recovery voltage is not a matter of importance in the present disclosure, and is not described in detail herein. The controller may then determine a second read recovery voltage based on a distance relationship between the first read recovery voltage and the read voltages stored in the second level table. And finally, updating the read voltage management table according to the determined second read recovery voltage.
In the embodiment of the application, the controller may update the read voltage management table when the read recovery occurs. The reason for the read recovery of the storage medium is various conditions, and the read voltage recorded in the read voltage management table is updated under the condition of the read recovery, so that the read voltage stored in the second-level table of the read voltage management table can adapt to various actual conditions, and the flexibility of the technical scheme is improved.
With reference to the second implementation manner of the first aspect, in a third implementation manner of the first aspect of this embodiment of the present application, the controller may determine, according to a distance relationship between the first read recovery voltage and a read voltage stored in the second-level table, a second read recovery voltage for performing a subsequent read operation on a physical address where read recovery occurs.
If the second reading voltage exists in the second-level table and the distance between the second reading voltage and the first reading recovery voltage meets the preset condition, the controller may determine that the second reading voltage is the second reading recovery voltage, where a page type corresponding to the second reading voltage is the same as a page type corresponding to the first reading recovery voltage.
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 indicates that the existing read voltage in the read voltage management table is not the optimal read voltage for performing the read operation on the physical address corresponding to the read command, and the controller may determine the second read recovery voltage as the first read recovery voltage.
The distance between the first read recovery voltage and the read voltage stored in the second-level table satisfies a preset condition, and may be that the distance between the first read recovery voltage and the read voltage stored in the second-level table is smaller than or equal to a preset threshold value, and the size of the preset threshold value is determined according to an error range allowed by practical application. In practical applications, a plurality of second read voltages satisfying the predetermined condition may be present in the second-level table, and any one of the second read voltages may be selected. The selection mode may be that the first read voltage that meets the preset condition is determined by the controller, or the read voltage that is closest to the first read recovery voltage when the preset condition is met may be selected according to the needs of the practical application, which is not limited herein. If the first read voltage which meets the preset condition and is determined by the controller to be the second read recovery voltage, the operation time can be reduced. If the read voltage closest to the first read recovery voltage is used, the error margin can be reduced.
In the embodiment of the application, the controller can determine that a certain row of reading voltage in the second-level table is the second reading recovery voltage when the relation between the first reading recovery voltage and the reading voltage stored in the second-level table meets the preset condition, the second reading recovery voltage is used for reading the physical address where reading recovery occurs later, and the reading voltage stored in the second-level table is used for reading within the allowable error range, so that frequent updating of the second-level table can be avoided, the processing process is simplified, and the operation resources are saved.
With reference to the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect of this embodiment of the present application, the second-level table of the read voltage management table further includes a page type count, where the page type count is used to indicate a number of times of hitting a read voltage of a page type corresponding to a certain physical address.
The controller may update the read voltage management table in different ways according to different values of the second read recovery voltage.
In the case that the second reading recovery voltage is the second reading voltage, the controller may determine a page type count corresponding to the second reading voltage and a first row index corresponding to the second reading voltage in the second-level table. Then, the controller may update the page type count corresponding to the second read voltage, and the update may be performed by increasing a value of the page type count, so as to complete the update of the second-level table.
The controller may also update the first-level table in the read voltage management table, and since the physical address for performing the read operation is read and restored, and the read voltage used for performing the read operation on the physical address in the future is actually the second read voltage, if the value of the first read voltage index is still the previous value, the first read voltage index may correspond to an inappropriate read voltage. Therefore, the controller needs to update the first read voltage index and update the value of the first read voltage index to the first row index.
In the embodiment of the application, under the condition that the read voltage in the second-level table of the read voltage management target is still applicable when the read recovery occurs, 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 proper read voltage in the second-level table, the controller can use the optimal read voltage to perform the read operation, and the reliability of the technical scheme of the application is improved.
With reference to the third implementation manner of the first aspect, in a fifth implementation manner of the first aspect of the embodiment of the present application, if the second read recovery voltage is the first read recovery voltage, it indicates that none of the read voltages stored in the second-level table is the optimal read voltage, and the controller triggers a swap-in and swap-out policy to update the read voltage management table.
The following describes the process of the controller updating the second level table: the second-level table of the read voltage management table further includes a page type count, and the controller can determine the first page type count with the minimum value of the page type count from the target page types corresponding to the physical address where the read recovery occurs. Since the read recovery occurs and the read voltages stored in the second-level table before updating do not satisfy the preset condition, the read voltage with the least number of 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 needs to be replaced with the second read recovery voltage.
Since the second read recovery voltage is stored in the second-level table, the first page type count cannot use the previous value any longer, accumulation needs to be restarted, and the controller needs to update the value of the first page type count. The updated first page type count value indicates that the storage medium was read using the second read restore voltage.
In the embodiment of the application, under the condition of triggering the swap-in and swap-out strategy, the controller can update the read voltage with the least number of 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 applicable to various practical situations, and the flexibility of the scheme is improved.
With reference to the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect of this embodiment of the present application, the controller further needs to update the first-level table. The updating process is as follows:
first, after determining the first page type count, the controller may determine the row number in the second level table where the read voltage needs to be replaced, i.e., the second row number. Since the reading voltage corresponding to the second row label in the second-level table is changed, the corresponding relationship between the reading voltage index and the reading voltage needs to be updated in the first-level table to be updated. Specifically, the updating method is to determine the read voltage index value as a second read voltage index of the second row index, and then update the second read voltage index value to a preset value. And the page type corresponding to the second read voltage index is the target page type. Since the read recovery causes the read voltage value corresponding to the first read voltage index to change, the controller also needs to update the first read voltage index value to the second row index.
In the embodiment of the application, under the condition that the reading recovery occurs and the reading voltage stored in the second-level table does not meet the preset condition, the controller can update the first-level table, so that the reading voltage index in the first-level table can always correspond to the proper reading voltage in the second-level table, the controller can use the optimal reading voltage to perform the reading operation, and the reliability of the technical scheme of the application is improved.
With reference to the first aspect and any one of the first to sixth implementation manners of the first aspect, in a seventh implementation manner of the first aspect, the storage medium may be divided into the management areas according to a management granularity in advance, where the management granularity may be a page of the storage medium or a block of the storage medium, and is selected according to how much memory resources are, and is not limited here.
Under the condition that the memory resources are tense, the management area can be divided by adopting a rough management granularity, for example, the management area is divided by taking a double block or a three block as a unit, so that the memory resources occupied by the read voltage management table are further reduced. In the case of sufficient memory resources, the management area may be divided using a finer management granularity, for example, divided in units of a single block or a half block, so that the operation result is more accurate.
In the embodiment of the application, the management area of the storage medium is divided into a plurality of selection modes, and the selection modes are determined according to the occupation condition of the memory resource, so that the beneficial effects are achieved, and the flexibility of the scheme is improved.
With reference to the first aspect and any one of the first to seventh implementation manners of the first aspect, in an eighth implementation manner of the first aspect of the present application, because in each storage unit of the storage medium, page types corresponding to data of each bit (bit) are the same, the storage medium related in this embodiment of the present application needs at least two page types, and at least one page type corresponds to at least two read voltages.
Therefore, each storage unit in the storage medium provided by the embodiment of the application stores data of at least two bits, and common storage media with the characteristic comprise a NAND flash memory or a NOR flash memory.
The NAND flash memory includes a multi-level cell (MLC), a triple-level cell (TLC), or a quad-level cell (QLC), which is not limited herein.
In the embodiment of the application, the storage medium comprises a NAND flash memory or a NOR flash memory, and can be applied to different scenes, so that the realizability of the technical scheme is improved.
With reference to the first aspect and any one of the first to eighth implementation manners of the first aspect, in a ninth implementation manner of the first aspect of the embodiment of the present application, the first-level table of the read voltage management table includes a best voltage index storage (BVIT).
With reference to the first aspect and any one of the first to ninth implementation manners of the first aspect, in a tenth implementation manner of the first aspect of the embodiment of the present application, the second-level table for reading the voltage management table includes a voltage look-up table (VLUT).
In the embodiment of the application, the first-level table and the second-level table of the read voltage management table can be a specific optimal voltage subscript table and a voltage query table, so that the realizability of the scheme is improved.
With reference to the first aspect and any one of the first to tenth implementation manners of the first aspect, in an eleventh implementation manner of the first aspect of this embodiment of the present application, the controller includes a controller in a Universal Flash Storage (UFS) device. Among them, UFS devices often use NAND flash memory as a storage medium.
A second aspect of an embodiment of the present application provides a storage controller, including:
a processor, a memory, a host-side interface, and a storage medium-side interface.
The memory is used for storing a read voltage management table, wherein the read voltage management table stores corresponding relations between read voltage indexes and a plurality of management areas and a plurality of page types respectively, and between the read voltage indexes and read voltages under different page types, at least one page type in the plurality of page types corresponds to a plurality of read voltages, and each management area in the plurality of management areas is a physical space corresponding to at least one physical address in the storage medium.
The processor is configured to:
and analyzing the read command received through the host side interface to obtain a target physical address corresponding to the read command. Then, based on the target physical address, a management area and a target page type respectively corresponding to the target physical address are determined. Then, based on the management area and the target page type, a first read voltage index is acquired from a read voltage management table locally stored in the controller. And then acquiring a first reading voltage corresponding to the first reading voltage index from the reading voltage management table according to the first reading voltage index. And finally, according to the first reading voltage, issuing a reading command to the storage medium through the storage medium side interface, and reading data from the storage medium.
The beneficial effects of the present aspect are similar to the beneficial effects of the first aspect, which are detailed in the first aspect and are not repeated herein.
With reference to the second aspect, in a first implementation manner of the second aspect, the read voltage management table has a two-level table structure, where a first level table of the read voltage management table stores correspondence between read voltage indexes and read voltages in a plurality of management areas and a plurality of page types, respectively, a second level table of the read voltage management table stores correspondence between the read voltage indexes and the read voltages in different page types, and at least one of the page types corresponds to a plurality of read voltages.
With reference to the second aspect or the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the processor is further configured to:
and if the data reading from the storage medium fails according to the first reading voltage, acquiring a first reading recovery voltage. A second read recovery voltage is then determined based on the relationship of the first read recovery voltage to the read voltages stored in the second level table. And finally, updating the read voltage management table to be updated according to the second read recovery voltage to obtain the read voltage management table.
With reference to the second implementation manner of the second aspect, in a third implementation manner of the second aspect, the processor is configured to:
and if the distance between the first reading recovery voltage and the second reading voltage stored in the second-level table meets a preset condition, determining that the second reading recovery voltage is the second reading voltage, wherein the page type corresponding to the first reading recovery voltage is the same as the page type corresponding to the second reading voltage.
And if the distance between the first reading recovery voltage and the reading voltage of any row stored in the second-level table does not meet the preset condition, determining that the second reading recovery voltage is the first recovery reading voltage.
With reference to the third implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the second-level table further includes a page type count, where the page type count is used to indicate a number of times of hitting a read voltage of a page type corresponding to a certain physical address.
The processor is used for updating the page type count corresponding to the second reading voltage in the second-level table to be updated under the condition that the second reading recovery voltage is determined to be the second reading voltage, so that the second-level table is obtained.
The processor may be further configured to determine a first row index corresponding to the second read voltage, where the first row index is a row index of the second read voltage in the second-level table. And then updating the first reading voltage index value into a first row index in the first-level table to be updated to obtain the first-level table.
With reference to the third implementation manner of the second aspect, in a fifth implementation manner of the second aspect, the second-level table further includes a page type count;
the processor is configured to:
and if the second reading recovery voltage is determined to be the first recovery reading voltage, determining a first page type count in a second-level table to be updated, wherein the first page type count has the minimum value in the page type counts corresponding to the target page types. The third read voltage is then updated to a second read recovery voltage, where the third read voltage corresponds to the first page type count. The processor is also configured to update a value of the first page type count.
With reference to the fifth implementation manner of the second aspect, in a sixth implementation manner of the second aspect, the processor is further configured to:
and determining a second line index corresponding to the first page type count, wherein the second line index is the line index of the first page type count in the second-level table. And then, in the first-level table to be updated, determining a second read voltage index, wherein the value of the second read voltage index is a second row label, and the page type corresponding to the second read voltage index is a target page type. And finally, updating the value of the second reading voltage index to a preset value, and updating the value of the first reading voltage index to a second row label.
With reference to the second aspect and any one of the first to sixth implementation manners of the second aspect, in a seventh implementation manner of the second aspect of the embodiment of the present application, the plurality of management areas are divided in advance according to a management granularity of the storage medium. Wherein the management granularity includes pages of the storage medium, or blocks of the storage medium.
With reference to the second aspect and any one of the first to seventh implementation manners of the second aspect, in an eighth implementation manner of the second aspect of the present application, since in each storage unit of the storage medium, the page types corresponding to the data of each bit in common are the same, the storage medium related to the embodiment of the present application needs at least two page types, and at least one page type corresponds to at least two read voltages.
Therefore, each storage unit of the storage medium provided by the embodiment of the application stores data of at least two bits, and common storage media with the characteristic comprise NOR flash memories or NAND flash memories. The NAND flash memory includes MLC, TLC or QLC, which is not limited herein.
With reference to the second aspect and any one of the first to eighth implementation manners of the second aspect, in a ninth implementation manner of the second aspect of the embodiment of the present application, the first-level table of the read voltage management table includes an optimal voltage index table.
With reference to the second aspect and any one of the first to ninth implementation manners of the second aspect, in a tenth implementation manner of the second aspect of the embodiment of the present application, the second-level table of the read voltage management table includes a voltage lookup table.
With reference to the second aspect and any one of the first to tenth implementation manners of the second aspect, in an eleventh implementation manner of the second aspect of the embodiment of the present application, the storage controller includes a controller in the UFS device. Among them, UFS devices often use NAND flash memory as a storage medium.
A third aspect of embodiments of the present application provides a storage medium reading apparatus, including:
and the processing unit is used for analyzing the read command and acquiring a target physical address corresponding to the read command.
And a determining unit for determining the management area and the target page type respectively corresponding to the target physical address based on the target physical address. Wherein the management area represents a physical space in the storage medium corresponding to at least one physical address.
And the acquisition unit is used for acquiring a first read voltage index from a read voltage management table locally stored in the controller based on the management area and the target page type. And then acquiring a first reading voltage corresponding to the first reading voltage index from a reading voltage management table according to the first reading voltage index, wherein the reading voltage management table stores corresponding relations between the reading voltage index and a plurality of management areas and a plurality of page types respectively, and between the reading voltage index and the reading voltages under the plurality of page types, and at least one page type in the plurality of page types corresponds to the plurality of reading voltages.
And the processing unit is also used for executing a read command according to the first read voltage and reading data from the storage medium.
The beneficial effects shown in the aspect are similar to those of the first aspect, which are shown in the first aspect and are not described herein again.
With reference to the third aspect, in a first implementation manner of the third aspect of the embodiment of the present application, the read voltage management table has a two-level table structure, where a first-level table of the read voltage management table stores correspondence between read voltage indexes and a plurality of management areas and a plurality of page types, respectively, and a second-level table of the read voltage management table stores correspondence between the read voltage indexes and read voltages in different page types.
With reference to the third aspect or the first implementation manner of the third aspect, in a second implementation manner of the third aspect of the embodiment of the present application, the reading apparatus of the storage medium further includes an updating unit.
The obtaining unit is further used for obtaining a first reading recovery voltage if the data reading from the storage medium fails according to the first reading voltage.
And the determining unit is also used for determining the second reading recovery voltage according to the relation between the first reading recovery voltage and the reading voltage stored in the second-level table.
And the updating unit is also used for updating the read voltage management table to be updated according to the second read recovery voltage to obtain the read voltage management table.
With reference to the second implementation manner of the third aspect, in a third implementation manner of the third aspect of the embodiment of the present application, the determining unit is specifically configured to:
and if the distance between the first reading recovery voltage and the second reading voltage stored in the second-level table meets a preset condition, determining that the second reading recovery voltage is the second reading voltage, wherein the page type corresponding to the first reading recovery voltage is the same as the page type corresponding to the second reading voltage.
And if the distance between the first reading recovery voltage and the reading voltage of any row stored in the second-level table does not meet the preset condition, determining that the second reading recovery voltage is the first recovery reading voltage.
With reference to the third implementation manner of the third aspect, in a fourth implementation manner of the third aspect of the embodiment of the present application, the second-level table further includes a page type count, where the page type count is used to indicate a number of times of hitting a read voltage of a page type corresponding to a certain physical address.
And the updating unit is used for updating the page type count corresponding to the second reading voltage in the second-level table to be updated to obtain the second-level table if the second reading recovery voltage is determined to be the second reading voltage.
The updating unit may be further configured to determine a first row index corresponding to the second reading voltage, where the first row index is a row index of the second reading voltage in the second-level table. And then updating the first reading voltage index value into a first row index in the first-level table to be updated to obtain the first-level table.
With reference to the third implementation manner of the third aspect, in a fifth implementation manner of the third aspect of the embodiment of the present application, the second-level table further includes a page type count.
And the updating unit is used for determining a first page type count in the second-level table to be updated if the second reading recovery voltage is determined to be the first recovery reading voltage, wherein the first page type count has the minimum value in the page type counts corresponding to the target page types. The third read voltage is then updated to a second read restore voltage, where the third read voltage corresponds to the first page type count. The updating unit is further configured to update a value of the first page type count.
With reference to the fifth implementation manner of the third aspect, in a sixth implementation manner of the third aspect of the embodiment of the present application, the determining unit is further configured to:
and determining a second line index corresponding to the first page type count, wherein the second line index is the line index of the first page type count in the second-level table. And then determining a second read voltage index corresponding to the page type in the first-level table to be updated, wherein the second read voltage index value is a second row label.
And the updating unit is also used for updating the value of the second read voltage index to a preset value and updating the value of the first read voltage index to a second row label.
With reference to the third aspect and any one of the first to sixth implementation manners of the third aspect, in a seventh implementation manner of the third aspect of the present embodiment, the plurality of management areas are pre-divided according to a management granularity of the storage medium, where the management granularity includes a page of the storage medium or a block of the storage medium.
With reference to the third aspect and any one of the first to seventh implementation manners of the third aspect, in an eighth implementation manner of the third aspect of the present application, because in each storage unit of the storage medium, the page types corresponding to the data of each bit in common are the same, the storage medium related to in the embodiment of the present application needs at least two page types, and at least one page type corresponds to at least two read voltages.
Therefore, each memory cell in the storage medium provided in the embodiments of the present application stores data of at least two bits, and a common storage medium having this characteristic includes a NAND flash memory or a NOR flash memory, where the NAND flash memory includes an MLC, a TLC, or a QLC, and is not limited herein.
In the embodiment of the application, the storage medium comprises a NAND flash memory or a NOR flash memory, so that the realizability of the technical scheme is improved.
With reference to the third aspect and any one of the first to eighth implementation manners of the third aspect, in a ninth implementation manner of the second aspect of the embodiment of the present application, the first-level table of the read voltage management table includes an optimal voltage index table.
With reference to the third aspect and any one of the first to ninth implementation manners of the third aspect, in a tenth implementation manner of the third aspect of the embodiment of the present application, the second-level table of the read voltage management table includes a voltage lookup table.
With reference to the third aspect and any one of the first to tenth implementation manners of the third aspect, in an eleventh implementation manner of the third aspect of the present application, the reading apparatus for a storage medium includes a controller in the UFS device. Among them, UFS devices often use NAND flash memory as a storage medium.
A fourth aspect of the present application provides a memory system, including:
a controller and a storage medium. Wherein the controller comprises the storage controller of the second aspect. Each storage unit in the storage medium stores data of at least two bits.
With reference to the fourth aspect, in the first implementation manner of the fourth aspect of the embodiments of the present application, the storage medium may be a NAND flash memory or a NOR flash memory, and the NAND flash memory includes an MLC, a TLC, or a QLC, which is not limited herein.
With reference to the fourth aspect, in a first implementation manner of the fourth aspect implemented by the present application, the storage system may be a storage system that uses UFS storage specifications.
A fifth aspect of embodiments of the present application provides a chip system, where the chip system includes at least one processor and a communication interface, where the communication interface and the at least one processor are interconnected by a line, and the at least one processor is configured to execute a computer program or instructions to perform the method of the first aspect.
The communication interface in the system-on-chip may be an input/output interface, a pin, a circuit, or the like.
With reference to the fifth aspect, in a first implementation manner of the fifth aspect of the embodiment of the present application, the chip system described above in the present application further includes at least one memory, where the at least one memory stores instructions. The memory may be a storage unit inside the system on chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).
A sixth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a program, and when the computer executes the program, executes the method of the first aspect.
A seventh aspect of embodiments of the present application provides a computer program product, which when executed on a computer, performs the method of the first aspect.
Drawings
Fig. 1 is a schematic view of an application scenario of a storage medium reading method in an embodiment of the present application;
FIG. 2 is a schematic flowchart of a storage medium reading method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a storage medium reading method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart illustrating a method for reading a storage medium according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a storage medium reading apparatus in an embodiment of the present application;
FIG. 6 is a schematic diagram of a controller for reading data according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a storage system in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method and related equipment for reading a storage medium, wherein a reading voltage management table stores corresponding relations between reading voltage indexes and a plurality of management areas and a plurality of page types respectively, and between the reading voltage indexes and reading voltages under different page types, wherein at least one page type in the page types corresponds to a plurality of reading voltages, so that the reading voltages stored in the reading voltage management table can read all physical addresses of the storage medium, and memory resources occupied by the reading voltage management table are reduced.
Since the common corresponding page types of each bit of data in each storage unit of the storage medium are the same, the storage medium related to the embodiment of the application needs at least two page types, and at least one page type corresponds to at least two read voltages. Therefore, the storage medium provided in the embodiment of the present application refers to a storage medium in which each storage unit stores at least two bits of data, and includes a NAND flash memory, a NOR flash memory, and the like, which is not limited herein.
Because the NAND flash memory has the advantages of small time delay for reading and writing, low power consumption, and the like, in practical application, many devices use the NAND flash memory as a storage medium, and common devices using the NAND flash memory as a storage medium include UFS devices. The UFS device is a memory device using a universal flash memory specification, and includes a controller and a NAND flash memory therein, and the universal flash memory specification increases a transmission frequency by a more advanced serial signal, and achieves a higher transmission bandwidth, and thus the UFS device has a wide application range.
In summary, the embodiments of the present application take a UFS device using a NAND flash memory as an example, and details the technical solution of the present application.
First, a description will be given of related concepts that may be involved in the embodiments of the present application:
(1) And (6) reading and recovering.
Under the condition of responding to a read command issued by the host, the controller selects a proper read voltage to read the NAND flash memory. However, the NAND flash memory often has various reasons that the optimal read voltage recorded in the controller is no longer able to successfully read the data, in which case the controller determines a read voltage that can successfully read the data, uses the read voltage to read the NAND flash memory, and returns an operation result to the host, which is a read recovery process. In short, the process of read recovery is from a read failure to the controller successfully reading the data in some way. The read voltage used in the read recovery may be referred to as a read recovery voltage, a correctable voltage, or an offset voltage.
The method for determining the read recovery voltage of the controller is related to the specific design of the controller under the condition of read failure, the current mainstream products often use a method for dynamically estimating the read recovery voltage, the read recovery voltage is often a value which cannot be accurately known in advance, and the specific method for determining the read recovery voltage is not a place concerned by the technical scheme of the application, so the embodiment of the application is not detailed.
(2) The number of times of erasing.
There are many possible reasons for read recovery of NAND flash memory, and the number of times of erasing belongs to one of them. As the number of times of erasing the NAND flash memory increases, the oxide layer isolating the floating gate electrons is worn away, and the insulation is deteriorated, thereby causing errors in reading data.
(3) Data retention time (data retention).
Data retention time is also one of the common causes for read recovery of NAND flash. As time passes, data stored in the flash memory gradually disappears due to the escape of electrons in the floating gate. The speed of the electrons escaping from the floating gate is proportional to the number of times of erasing, that is, the more the number of times of erasing, the faster the speed of the electrons escaping, that is, the faster the data disappears.
(4) Read disturb (read disturb).
read disturb refers to that as the number of times of reading the flash memory increases, the contents of the memory cells close to each other in the same block change, and electrons continuously enter the floating gate, so that the data state of the memory cell changes. In this case, if the read operation is still performed on the NAND flash memory using the originally recorded read voltage, a read failure result occurs.
(5) Temperature change (cross temperature).
The data state is also affected by the temperature change of the environment where the NAND flash memory is located. The case of temperature change may be such that the read operation and the write operation are performed separately and continuously with a large temperature difference, for example, the read operation is performed at 55 c, followed by the write operation at 25 c, and the same read operation and write operation are repeated. It is also possible to repeat the reading operation at a gradually changing temperature, which is not limited herein.
In practical applications, there are many possibilities for read recovery of the NAND flash memory, and the reasons are not limited to the above. The reasons for the read recovery of different storage media are different, and the reasons for the read recovery of the storage media other than the NAND flash memory may be other possible reasons, which are not described herein again.
Next, an application scenario of the embodiment of the present application is briefly introduced, please refer to fig. 1, and fig. 1 is a schematic application scenario diagram of a method for reading a storage medium according to the embodiment of the present application.
As shown in fig. 1, a communication connection is established between a host 101, a controller 102, and a NAND flash memory 103 for data transfer. The host 101 may issue a read command to the controller 102, and after receiving the read command, the controller 102 parses the read command to obtain a target physical address determined to need to perform a read operation. Then, a management area and a target page type corresponding to the target physical address are determined from a read voltage management table locally stored in the controller, so that a first read voltage index is obtained, a first read voltage for performing a read operation on the target physical address is determined from the read voltage management table, and finally, a read command is issued to the NAND flash memory 103. The NAND flash memory 103 may perform a read operation according to the first read voltage after receiving the read command, and then transmit the operation result to the controller 102. The controller 102, upon receiving the operation result, may send the operation result to the host 101. The controller 102 may receive a read command issued by the host through the host-side interface. Typically, the interface type of the host side interface is an input/output (in/out, I/O) interface. The controller 102 issues a read command to the storage medium through a storage medium side interface, and when the storage medium is a NAND Flash memory, the storage medium side interface is a NAND Flash Interface (NFI), and the NAND Flash memory may receive the read command through an I/O interface.
It should be noted that, in practical applications, the controller 102 and the NAND flash memory 103 may also be coupled in the same memory system.
The NAND flash memory may be divided into different types according to the amount of bit data stored in each memory cell, including Single Level Cell (SLC), multi-level cell (MLC), triple Level Cell (TLC), quad Level Cell (QLC), and the like.
In the embodiment of the present application, each storage unit of the storage medium used stores at least two bit data, and in the following description, the NAND flash memory is TLC for example. Each memory cell in TLC stores 3-bit data, and when TLC is read, three page types (page types) including Least Significant Bit (LSB), central Significant Bit (CSB), and Most Significant Bit (MSB) need to be read, and a plurality of read voltages are often used, and the number of read voltages is related to the configuration of the NAND flash memory. The read voltage corresponding to each page type is different, and is related to the configuration of the NAND flash memory, the LSB may correspond to 1 or 2 read voltages, the CSB may correspond to 2 or 3 read voltages, and the MSB may correspond to 2, 3, or 4 read voltages, which is not limited herein, and different page types may be distinguished as long as seven read voltages are used at most.
Common TLCs include "type 1-2-4" TLC, "type 1-3-3" TLC, or "type 2-3-3" TLC, where the three numbers indicate the number of read voltages required to read the LSB, CSB, and MSB, respectively, and in the case of "type 1-2-4" TLC, "type 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.
In a reading method of a NAND flash memory, a reading voltage of each physical address needs to be stored in a reading voltage management table, and the reading voltage in the reading voltage management table corresponds to only one physical address. The process of reading data in the NAND flash memory by the method is described below by taking "1-2-4" type TLC as an example.
Generally, the number of each page type of a storage medium is the same, because in the same management area, each page type corresponds to the bit information of the same storage unit. If there are 1536 physical addresses in the "1-2-4" type TLC, where 512 physical addresses correspond to page types that are LSB,512 physical addresses correspond to page types that are CSB,512 physical addresses correspond to page types that are MSB, and if it is desired to perform a read operation on all page types that are CSB physical addresses, 1024 read voltages need to be stored in the read voltage management table.
For the same situation, in the technical solution provided in the present application, the "1-2-4" type TLC may be divided into a plurality of management areas according to the management granularity. The size of the management granularity is selected according to the use condition of the memory resource, the management granularity may be a plurality of blocks or a plurality of pages, may be divided according to a single block or a sub-block (sub-block) as a unit, or may be divided according to a single page or a double page (double page) as a unit, and is selected according to the needs of the actual application, and is not limited here. Under the condition that the memory resources are tense, the management areas can be divided according to the unit of double blocks or three blocks, so that the number of the divided management areas is small, and the memory resources occupied by the first-level table are further reduced. Under the condition of sufficient memory resources, the management area can be divided according to a single block or a half block as a unit, and errors of reading data are reduced.
The present embodiment will briefly be described with an example of dividing a management area into two blocks.
For example, each block may include 64 pages, which may be regarded as 64 physical addresses, and if the "1-2-4" type TLC is divided into 4 management areas (regions), the obtained first-level table may include the contents shown in table 1.
TABLE 1
LSB CSB MSB
region0 index 0,0 index 0,1 index 0,2
region1 index 1,0 index 1,1 index 1,2
region2 index 2,0 index 2,1 index 2,2
region3 index 3,0 index 3,1 index 3,2
The horizontal header of table 1 indicates the category of the page type, and the vertical header indicates a different management area. As can be seen from table 1, there are three page types in the same management area of TLC, and the read voltage index can be determined according to the management area and the page type. Since Table 1 shows the result of the management area division in units of double blocks, if the type is "1-2-4512 physical addresses corresponding to the CSB in the TLC are divided into 4 management areas respectively corresponding to the index 0,1 、 index 1,1 、index 2,1 And index 3,1 Then, each read voltage index would correspond to 128 physical addresses. Next, it is necessary to determine an appropriate read voltage from the read voltages stored in the second level table.
The second level table may include the contents shown in table 2.
TABLE 2
Figure PCTCN2020127729-APPB-000001
If index 0,1 Is taken as 0,index 1,1 Is taken as 1,index 2,1 Is taken to be 2,index 3,1 Is 3, respectively corresponds to the reading voltage of CSB in the row number 0, 1, 2 or 3 of the table 2. If rB and rF are read voltages corresponding to CSB, then R can be determined n,3 And R n,5 Is the read voltage to be selected, wherein n is an integer from 0 to 3. In pair index 0,1 For example, the controller performs a read operation on the corresponding physical address, and the read voltage determined by the controller in combination with tables 1 and 2 is R 0,1 And R 0,5 The corresponding read voltage value.
As can be seen from table 1 and table 2, the read operation can be performed on 512 physical addresses by storing 8 read voltages in the second-level table.
Even though the physical addresses are also divided in the conventional method, 7 read voltages are stored in each management area, instead of the read voltage index determined according to the page type in the technical solution of the present application, which still occupies higher memory resources compared with the primary table in the embodiment of the present application.
Taking dividing a physical address of a storage medium into 1000 management areas as an example, for TLC, according to an existing management method, 1000 × 7=7000 read voltages are stored in a read voltage management table, and a first-level table of the present application stores 1000 × 3=3000 read voltage indexes, and memory resources occupied by each read voltage and each read voltage index are the same, and by using the first-level table provided in the present application, 57% of memory resources can be saved. For the QLC, since the read voltage for reading the QLC is 15, and there are 4 page types, more memory resources can be saved, which is about 73%.
In addition, the reading voltage stored in the second-level table of the reading voltage management table provided by the embodiment of the application is determined according to experiments, the application range is wide, and the technical scheme of the application can also update the reading voltage in the second-level table, so that the reading voltage stored in the second-level table can read all physical addresses of the storage medium. A specific updating manner will be described below, the first-level table in the embodiment of the present application often includes hundreds of rows, or even more rows, and the second-level table is usually within 32 rows or 64 rows, so that the resource occupied by the second-level table as a whole is far smaller than that of the first-level table.
The method for reading a storage medium provided in the embodiment of the present application is described below, and the method for reading a storage medium provided in the embodiment of the present application may be applied to the scenario shown in fig. 1. Due to the complex usage environment of the UFS device, the NAND flash memory often generates a coupling phenomenon due to data storage time, read interference, or temperature change, so that the optimal read voltage changes, and at this time, the read operation performed using the read voltage in the read voltage management table may not successfully read data. The following describes the case of read success and read failure, respectively.
1. Case of successful read using the first read voltage:
referring to fig. 2, fig. 2 is a schematic diagram illustrating an embodiment of a method for reading a storage medium according to an embodiment of the present application, including:
201. the controller receives a read command.
The controller can establish connection with the host and receive a read command sent by the host through the host side interface. The connection established between the controller and the host may be a wireless connection or a wired connection, and is selected according to the needs of the actual application, which is not limited herein.
202. The controller determines a target physical address corresponding to the read command.
The controller reads the NAND flash memory, and determines a target physical address needing to be read according to a read command sent by the host instead of blindly reading all the physical addresses. After receiving the read command sent by the host, the controller may parse the read command to determine a target physical address corresponding to the read command, that is, a target physical address corresponding to the data to be read in the NAND flash memory this time.
203. The controller determines a first read voltage index.
After determining the first physical address corresponding to the read command, the controller may determine the first read voltage index from a read voltage management table locally stored in the controller according to a management area corresponding to the target physical address and a target page type corresponding to the target physical address.
The following is a brief description of a process in which the controller determines a management area corresponding to the target physical address and a target page type corresponding to the target physical address.
The physical address of the storage medium may be determined according to a code number corresponding to the physical address, including a code number of a grain, a plane, a block, and a page of the storage medium. For example, one physical address may be represented as (die 0, plane2, block3, page 10), which means that this physical address is the physical address of page10 in block No. 3 under plane No. 2 of grain No. 0. Generally, a granule has two planes, each plane has 1000 to 2000 blocks, and a storage system has a plurality of granules, which are determined according to the storage capacity of the storage system, and the larger the storage capacity is, the larger the granule number is, and the details are not limited herein.
The controller determines the target page type mainly according to the page code, and the mapping relation between the page code and the page type is determined according to the performance of the storage medium.
For example, in TLC, the mapping relationship between page code number and page type may be as shown in table 3:
TABLE 3
Page code Page type
page0 to page20 LSB
pages 21 to 35 CSB
pages 36 to 64 MSB
When the NAND flash memory is configured, the NAND flash memory can be divided into a plurality of management areas by selecting an appropriate management granularity according to the use condition of the memory resource of the storage system. Each management area includes a plurality of physical addresses, and one management area can be regarded as a physical space in which a plurality of physical addresses are stored. The management granularity has multiple choices, and may be a single block or a half block, or a double block or a triple block, which is determined according to the needs of the actual application, and is not limited herein. Under the condition that the memory resources are more tense, the management areas can be divided according to the unit of double blocks or three blocks, so that the number of the divided management areas is less, and the memory resources occupied by the first-level table are further reduced. Under the condition that the memory resources are sufficient, the management area can be divided according to the unit of a single block or a half block, and the error of reading data is reduced.
The correspondence between the management area and the physical address is related to the management granularity, and the code numbers for determining the management area are different for different management granularities, for example, if the management area is divided by using a single block as a unit, the mapping relationship between the management area and the physical address can be as shown in table 4. For example, if the management area is divided in units of double blocks, the mapping relationship between the management area and the physical address may be as shown in table 5.
TABLE 4
(Code) Managing an area
block0 region0
block1 region1
block2 region2
block3 region3
block4 region4
As can be seen from table 3 and table 4, the block code is block3, the page code is the physical address of page2, the corresponding management area is region3, and the corresponding target page type is LSB.
TABLE 5
(Code) Managing an area
block0、block1 region0
block2、block3 region1
block4、block5 region2
block6、block7 region3
block8、block9 region4
In practical applications, the number of blocks of the storage medium is related to the performance and the allocation manner of the storage medium, and more common storage media have 1000 to 2000 blocks.
Combining table 3 and table 5, it can be seen that the block code is block3, the page code is the physical address of page2, the corresponding management area is region1, and the corresponding target page type is LSB.
The following describes a process in which the controller determines the first read voltage index according to the management area corresponding to the target physical address and the type of the target page.
The first read voltage index is stored in a first level table of the read voltage management table. In a first-level table of the read voltage management table, a plurality of management areas and a plurality of correspondence relationships between page types and read voltage indexes are stored, each read voltage index having a corresponding page type and a corresponding management area. In the first-level table of the read voltage management table, a plurality of physical addresses which are commonly corresponding to the same management area and the same page type point to the same read voltage index.
In the embodiment of the application, the first-level table is taken as an example of an optimal voltage index table, the number of management areas stored in the optimal voltage index table is related to the management granularity of the NAND flash memory, and the management granularity may be divided according to a plurality of blocks or a plurality of pages, may be divided according to a single block or a half block, or may be divided according to a single page or a double page, and is selected according to the needs of practical applications, and is not limited herein.
The determination of the management granularity is also related to the utilization rate of the memory resource, and under the condition that the memory resource is in shortage, the management area can be divided by adopting the coarser management granularity, for example, the management area is divided by taking a double block or a triple block as a unit, so that the memory resource occupied by the read voltage management table is further reduced. In the case of sufficient memory resources, the management area may be divided using a finer management granularity, for example, divided in units of a single block or a half block, so that the operation result is more accurate.
In the embodiment of the application, the management area of the storage medium is divided into multiple selection modes, the fine degree of division of the management area can be determined according to the using condition of the memory resource, and the flexibility of the technical scheme is improved.
For example, the optimal voltage index table may include the contents shown in table 6:
TABLE 6
LSB CSB MSB
region0 index 0,0 index 0,1 index 0,2
region1 index 1,0 index 1,1 index 1,2
region2 index 2,0 index 2,1 index 2,2
As shown in Table 6, the read voltage index 0,0 The corresponding page type is LSB and the corresponding management area is region0.
204. The controller determines whether a value of the first read voltage index is a preset value, if yes, step 205 is executed, and if not, step 206 is executed.
After the controller determines the first reading voltage index, the value of the first reading voltage index can be determined, and a proper reading voltage is determined according to the relationship between the value of the first reading voltage index and the preset value.
For example, the values of the read voltage index may be as shown in table 7:
TABLE 7
Read voltage index Value taking
index 0,0 0
index 0,1 1
index 0,2 2
index 1,0 65
index 1,1 65
index 2,0 -1
index 2,2 3
205. The controller uses the buffered read voltage for a read operation.
If the value of the first read voltage index is the same as the preset value, the controller may determine to perform a read operation using the cached read voltage. The preset value may also be referred to as a sentinel value, and may be preset manually, and the specific numerical value of the preset value may be a maximum row number in the second-level table larger than the read voltage management table, or a minimum row number in the second-level table smaller than the read voltage management table, as long as the numerical value is different from the numerical value of any row number in the second-level table, and the specific numerical value is not limited here. Optionally, the preset values corresponding to different read voltage indexes may be the same or different, and are not limited herein.
It should be noted that, in the embodiment of the present application, the cached read voltage is a read voltage cached on the granule die, each page type of each management area has a respective cached read voltage, and the read voltages may be the same or different, and indicate a read voltage used for performing a read operation on a physical address corresponding to a certain page type in a certain management area last time. Due to the performance characteristics of the NAND flash memory, the voltage value can be cached on the die, and even under the condition of carrying out read operation for the first time, the voltage value can be cached on the die.
206. The controller determines a first read voltage corresponding to the first read voltage index.
If the value of the first reading voltage index is different from the preset value, the controller may 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. In the embodiment of the present application, the second-level table is taken as an example of a voltage lookup table, and for example, the voltage lookup table may include the contents shown in table 8:
TABLE 8
Figure PCTCN2020127729-APPB-000002
As shown in table 8, rA to rG indicate physical addresses, and the physical addresses corresponding to each page type are different, so that the read voltages corresponding to each page type are also different, and are related to the configuration of the NAND flash memory, in general, LSB may correspond to 1 or 2 read voltages, CSB may correspond to 2 or 3 read voltages, and MSB may correspond to 2, 3, or 4 read voltages, which is not limited herein.
For example, the correspondence between the page type and the read voltage can be as shown in table 9:
TABLE 9
Page type Read voltage
LSB rA、rE
CSB rB、rD、rF
MSB rC、rG
As can be seen from a combination of tables 8 and 9, R 0,0 The corresponding page type is LSB and the corresponding read voltages are rA and rE.
As shown in Table 8, R 0,0 To R 0,6 The read voltage with row number 1 is shown, and the initial value of the read voltage can be determined according to the performance of the NAND flash memory and the test results of multiple experiments. Due to the fact thatThe use scene of the UFS device is complex, and the NAND flash memory often has a coupling phenomenon due to data storage time, read interference or temperature change, so that the optimal read voltage changes. Therefore, a plurality of groups of reading voltages can be stored in the reading voltage lookup table and updated according to the actual application condition.
Optionally, the read voltage lookup table may store 32 rows of read voltages, and may also store 64 rows of read voltages, as long as the memory resource occupied by the second-level table is far smaller than that of the first-level table, which is not limited herein.
As shown in table 9, the page type count includes an LSB count, a CSB count, and an MSB count, which indicates the number of times a read voltage corresponding to a certain page type is used. For example, combining tables 6 and 7, N 0,1 Is represented by using R 0,0 The number of times the corresponding read voltage performs a read operation on the NAND flash memory.
The initial value of the page type count is 0, and if the controller uses a corresponding read voltage of a certain page type, the value of the page type count is updated. The updating mode may be to use once, where the value is added by 1, or to use once, where the value is added by 10, and the updating mode is selected according to the needs of the actual application, as long as the increased value of the page type count value is consistent every time the page type count value is used once, and the specific place is not limited here. In the embodiment of the present application, a reading voltage is used once, and 1 is added to a page type count value corresponding to the reading voltage.
It should be understood that tables 3 to 5, 7 and 9 express mapping relationships, and do not necessarily mean that there are separate tables in actual applications.
The controller may determine the read voltage index corresponding to the physical address of the read command according to table 6. Then, the value of the read voltage index is determined according to table 7. And determining the reading voltage corresponding to the reading voltage index according to the table 8 and the table 9. In the embodiment of the present application, the first reading voltage index is index 0,0 For example, in conjunction with tables 6-9, the controller may determine the index 0,0 Corresponding to R in the voltage lookup table 0,0 And R 0,4 Indicated read voltageAnd (5) pressing.
207. The controller sets the first read voltage to die.
The controller may set the first read voltage at die after determining the first read voltage.
208. The controller updates the read voltage management table.
Since the first reading voltage is stored in the reading voltage management table to be updated, the reading voltage management table is required to be read, and the updating manner can be to increase the page type count corresponding to the first reading voltage. In the embodiment of the present application, the first reading voltage index is index 0,0 For example, combining tables 3 to 6, index 0,0 Corresponding page type count is N 0,1 . If the controller uses index 0,0 Corresponding read voltage, N in VLUT 0,1 And adding 1 to the corresponding value, thereby finishing the updating of the read voltage management table.
209. And the controller reads the NAND flash memory to perform read operation according to the first read voltage.
The controller may perform a read operation on the NAND flash memory using the first read voltage after determining the first read voltage.
It should be noted that, step 207, step 208, and step 209 do not have a necessary sequence, and in practical applications, step 207, step 208, and step 209 may be executed first, and are not limited herein.
210. The controller receives the operation result and sends the operation result to the host.
The NAND flash may generate an operation result after a read operation using the first read voltage, and transmit the operation result to the controller. The controller may send the operation result to the host after receiving the operation result.
In the embodiment of the application, the reading voltage management table stores the corresponding relations between the reading voltage indexes and the multiple management areas and the multiple page types respectively, and the corresponding relations between the reading voltage indexes and the reading voltages under different page types, and the reading voltages corresponding to at least one reading voltage index are multiple reading voltages corresponding to the same page type, so that the reading voltages stored in the reading voltage management table can read all physical addresses of a storage medium, and memory resources occupied by the reading voltage management table are reduced.
Furthermore, the value of the read voltage index can be a preset value, and at this time, the controller can directly acquire the read voltage from the die without inquiring the read voltage management table, so that the step of setting the read voltage is saved, and the time overhead caused by setting the read voltage is reduced. In addition, the controller uses the reading voltage for reading once, the page type count corresponding to the reading voltage can be updated once, and a basis is provided for updating the reading voltage management table, so that the updating of the reading voltage management table is more in line with the requirement of practical application, and the flexibility of the scheme is improved.
2. Case of read failure using the first read voltage:
due to the complex use environment of the UFS device, the optimal read voltage of the NAND flash memory is often subjected to coupling phenomenon due to reasons such as data storage time, read disturbance or temperature change, so that the optimal read voltage changes, thereby causing a read recovery phenomenon. In the embodiment of the application, under the condition of reading recovery, the controller can update the reading voltage management table, so that the reading voltage management table can adapt to various use environments, and the flexibility of the technical scheme is improved.
Referring to fig. 3, fig. 3 is a diagram illustrating an embodiment of a method for reading a storage medium according to an embodiment of the present application, including:
301. the controller receives a read command;
302. the controller determines a target physical address corresponding to the read command.
303. The controller determines a first read voltage index.
304. The controller determines whether a value of the first read voltage index is a preset value, if so, step 305 is executed, and if not, step 307 is executed.
305. The controller uses the buffered read voltage for a read operation.
In the embodiment of the present application, steps 301 to 305 are similar to steps 201 to 205 in the embodiment shown in fig. 2, and are not described herein again.
306. The controller receives the operation result and sends the operation result to the host.
There are many situations in which the controller receives the operation result, and the following description is given separately:
in one case, after the controller performs a read operation on the NAND flash memory according to the read voltage buffered on die after step 305, the NAND flash memory generates an operation result and sends the operation result to the controller. The controller, after receiving the operation result, may transmit the operation result to the host.
In one case, 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, the controller successfully reads data when a read recovery does not occur at a physical address where the read operation is performed, and the controller also sends a received operation result to the host.
307. The controller determines a first read voltage corresponding to the first read voltage index.
In the embodiment of the present application, step 307 is similar to step 206 in the embodiment shown in fig. 2, and is not described herein again.
308. And the controller reads the NAND flash memory to perform read operation according to the first read voltage.
The controller may perform a read operation on the NAND flash memory using the first read voltage after determining the first read voltage.
It should be noted that after step 307, the controller may further set the first read voltage to die, and may further update the read voltage management table, where the setting and updating manners are similar to those in step 207 and step 208 in the embodiment shown in fig. 2, and details are not described here again.
309. The controller determines whether a read recovery occurs to the target physical address, if so, performs step 310, and if not, performs step 306.
After the controller performs the read operation on the NAND flash memory according to the first read voltage, it may be determined whether the target physical address corresponding to the read command has read recovery. If the reading is successful, it indicates that the target physical address has not been read recovered, and if the reading is failed, it indicates that the target physical address has been read recovered, and the first read voltage is not the optimal read voltage for performing the read operation on the target physical address corresponding to the read command.
310. The controller determines a first read recovery voltage.
If the physical address corresponding to the read command is read and restored, it means that the controller cannot successfully read the data of the physical address using the first read voltage, and the read voltage needs to be changed. In this case, the controller may determine the first read recovery voltage, which is the optimal read voltage for the target physical address.
The manner in which the controller determines the first read recovery voltage is not a key point of attention in the technical solution of the present application, and therefore, the process of obtaining the first-degree recovery voltage is not described in detail in this embodiment of the present application.
311. The controller determines whether the distance between the first read recovery voltage and the read voltage of the X-th row in the second level table satisfies a predetermined condition, if yes, step 312 is executed, and if no, step 315 is executed.
After the controller acquires the first reading recovery voltage, the distance between the first reading recovery voltage and the reading voltage of any row in the second-level table can be compared, so that a second reading recovery voltage for reading the NAND flash memory is determined, and the reading voltage management table is updated in different updating modes according to the second reading recovery voltage.
The present embodiment takes the voltage lookup table VLUT as an example for detailed description. For convenience of writing, any row in the VLUT is denoted by X, where X denotes a row number of the VLUT, that is, a first row number corresponding to the second read voltage in the claims, and X is an integer greater than or equal to 0.
In practical application, the distance between the first read recovery voltage and the read voltage of the X-th row may be calculated in various calculation manners, which may be a sum of differences between two groups of voltages, or a weighted average of differences between two groups of voltages, and is not limited herein.
For example, a distance calculation formula may be d (U, V) = sqrt ((| V) 1 -u 1 | 2 +……+|v n -u n | 2 ) N), wherein U = (U) 1 ,u 2 ,……,u n ),V=(v 1 ,v 2 ,……,v n ) And U and V denote the first read restore voltage and the read voltage of the X-th row in VLUT, respectively.
There are various situations when the preset condition is met, in practical application, the distance between the two sets of voltages may be smaller than the threshold, or the distance between the two sets of voltages may be smaller than or equal to the threshold, and the distance is selected according to the requirements of practical application, which is not limited herein.
Optionally, there are various ways for comparing the first read recovery voltage with the read voltage stored in the VLUT, which may be sequentially comparing according to the sequence from row 0 to row last in the VLUT table, or comparing according to the sequence that is random but not repeated, or comparing no longer when a read voltage meeting the condition is obtained in the VLUT, and selecting according to the requirement of practical application, which is not limited herein.
Optionally, there are many ways to determine the xth row read voltage, which may be the first read voltage obtained by comparison, or the read voltage with the minimum distance from the first read recovery voltage among all read voltages meeting the condition, and the determination is performed according to the needs of practical application, and is not limited here.
For example, taking the case that the preset condition is satisfied and is less than or equal to 0.5, the read voltage with the minimum distance from the first read recovery voltage is selected as the second read recovery voltage: if the read voltage 1 and the read voltage 2 exist in the VLUT, where the distance between the read voltage 1 and the first read recovery voltage is 0.2, and the distance between the read voltage 2 and the first read recovery voltage is 0.45, the controller may determine the second read recovery voltage to be the read voltage 1 because the read voltage 1 is closer to the first read recovery voltage and the error is smaller.
In the implementation of the application, the controller determines the read voltage of the xth row in various ways, and each way has different beneficial effects. If the first read voltage is determined to be the second read recovery voltage, the comparison times can be reduced, and the operation resources are saved. If the second read recovery voltage is determined to be the read voltage with the minimum distance from the first read recovery voltage in all the read voltages meeting the conditions, the read voltage used for reading the physical address corresponding to the read command is closer to the optimal read voltage, errors can be reduced, and the accuracy of the technical scheme is improved.
312. The controller determines the second read recovery voltage as the read voltage for the X-th row.
If the distance between the first read recovery voltage and the xth row read voltage satisfies the preset condition, the controller may determine that the second read recovery voltage is the xth row read voltage.
In the embodiment of the application, the controller can determine that a certain row of reading voltage in the second-level table is the second reading recovery voltage when the relation between the first reading recovery voltage and the reading voltage stored in the second-level table meets the preset condition, the second reading recovery voltage is used for reading the physical address where reading recovery occurs later, and in the range allowed by errors, the reading voltage stored in the second-level table is used for reading, so that frequent updating of the second-level table can be avoided, the processing process is simplified, and the operation resources are saved.
313. The controller updates the first level table.
The controller may update the first-level table after determining that the second read recovery voltage is the read voltage of the X-th row.
In this embodiment, the first-level table is the optimum voltage index table BVIT, for example, and is explained in detail. The updating may be performed by updating the value of the first read voltage index to X.
Illustratively, a management area for performing a read operation is region0, the page type corresponding to the management area is LSB, and the first read voltage index is index 0,0 The value of (b) is 0 as an example. If the second read recovery voltage is the 1 st row read voltage, then index is required 0,0 The value of (d) is updated to 1.
In the embodiment of the application, under the condition that the read voltage in the second-level table of the read voltage management target is still applicable when the read recovery occurs, 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 proper read voltage in the second-level table, the controller can use the optimal read voltage to perform the read operation, and the reliability of the technical scheme of the application is improved.
314. The controller updates the second level table.
The controller may also update the VLUT by incrementing the page type count corresponding to row X. The increasing range may be various, the value of the page type count is increased by 1 each time a certain page type read voltage in the X-th row is used, or the value of the page type count is increased by 10 each time a certain page type read voltage in the X-th row is used, as long as the increasing value of the page type count is consistent each time a certain page type read voltage in the X-th row is used, the value is selected according to the needs of practical application, and the specific range is not limited here.
Illustratively, the page type corresponding to the management area is LSB, line X is line 1, and the page type count N 1,1 The value of (1) is 10, and the update mode is to increase the value of the page type count by 1 every time the read voltage of a certain page type in the X-th row is used. If the read voltage of the X row is determined as the second read recovery voltage, N is determined 1,1 The value of (d) is updated to 11.
It should be noted that, step 313 and step 314 are not necessarily in order, and in practical applications, step 313 may be executed first, or step 314 may be executed first, as long as step 312 is executed later, which is not limited herein.
315. The controller determines the second read recovery voltage as the first read recovery voltage.
If the first read recovery voltage and the distance between the first read recovery voltage and the read voltage of any row in the VLUT do not satisfy the preset condition, it indicates that the read voltages stored in the voltage management table are not the optimal read voltage at this time, and the controller may determine that the second read recovery voltage is the first read recovery voltage.
316. The controller updates the read voltage management table.
After determining that the first read recovery voltage is the second read recovery voltage, the controller may trigger a swap-in and swap-out strategy to update the read voltage management table.
317. The controller receives the operation result of the read recovery and sends the operation result of the read recovery to the host.
The controller may perform a read operation on the NAND according to the first read recovery voltage after determining the first read recovery voltage, thereby obtaining an operation result. In the case of successful reading of data using the first read restore voltage, the controller may transmit the operation result to the host.
It should be noted that step 317 is not necessarily after step 314 or step 316, but may also be before step 314 or step 316, or may also be before step 311, as long as it is after step 310, and is selected according to the needs of the actual application, and is not limited herein.
In the embodiment of the application, the read voltage management table stores the corresponding relations between the read voltage indexes and the management areas and the page types respectively, and the corresponding relations between the read voltage indexes and the read voltages under different page types, and there are a plurality of read voltages corresponding to at least one read voltage index and corresponding to the same page type, so that the read voltages stored in the read voltage management table can read all physical addresses of the storage medium, and memory resources occupied by the read voltage management table are reduced.
Furthermore, since the NAND flash memory is often subjected to read recovery, if the read recovery occurs each time, the read voltage is changed, and the read voltage management table is updated, the processing process is complicated, and the costs of time, labor, and the like are high. Therefore, the read voltage stored in the read voltage management table can be used for subsequent read operation within the allowable error range, so that the process is simplified, and the operation resource is saved. Under the condition that the distance between the first reading recovery voltage and the reading voltage of the X row in the voltage lookup table exceeds the error allowable range, the controller can update the reading voltage management table, so that the reading voltage management table can be suitable for various conditions, and the flexibility of the scheme is improved.
The process of the controller triggering the swap-in and swap-out policy to update the read voltage management table is described in detail below based on step 316 in the embodiment shown in FIG. 3. As shown in fig. 3, if a read recovery occurs to the first physical address, the controller may obtain the first read recovery voltage, and then may compare the distance between the first read recovery voltage and the read voltage of any row in the voltage lookup table, so as to update the read voltage management table. Under the condition that the distance between the first read recovery voltage and the read voltage of each row in the voltage lookup table does not satisfy the preset condition, the controller may update the read voltage management table according to the flow shown in fig. 4. Referring to fig. 4, fig. 4 is a schematic diagram illustrating an embodiment of a method for reading a storage medium according to an embodiment of the present application, including:
3161. the controller determines a first page type count value of Y.
In the voltage lookup table, the controller may determine a page type corresponding to a physical address where read recovery occurs, and then may determine a first page type count whose value is Y, where Y has a minimum value in at least one page type count corresponding to the page type, that is, a value of the first page type count in the claims.
It should be understood that in practical applications, there may be a plurality of page type counts with a value of Y, and the controller may arbitrarily select one of the page type counts as the first page type count.
3162. The controller updates the first page type count.
The controller may update the first page type count after determining the first page type count, and the update mode may be to update the value of the first page type count to 1, or update the value of the first page type count to 10, as long as the value can indicate that the first read recovery voltage is hit once.
It should be noted that step 3162 may be executed before step 3163, or after step 3163, as long as it is executed after step 3161, and is not limited herein.
3163. The controller determines the row index Z at which the first page type count is located.
After determining the first page type count, the controller may determine the row index Z in the voltage lookup table where the first page type count is located, i.e., the first row index in the claims.
In the embodiment of the application, under the condition of triggering the swap-in and swap-out strategy, the controller can update the read voltage with the least hit times in the second-stage table to the second read recovery voltage, so that the read voltage stored in the read voltage management table can be flexibly applicable to various actual conditions, and the flexibility of the scheme is improved.
3164. The controller updates the read voltage of the Z-th row.
The controller may update the read voltage of the Z-th row after determining the row index Z at which the first page type count is located. The updating may be in such a manner that the read voltage corresponding to the page type in the Z-th row is updated to the second read recovery voltage.
3165. The controller updates the value of the first read voltage index.
The controller may determine, in the optimal voltage index table, a first read voltage index corresponding to the physical address where the read recovery occurs, and since the read recovery occurs, a value of the first read voltage changes, and a corresponding row label in the voltage lookup table may also change, the value of the first read voltage index needs to be updated. The updating may be performed by updating the value of the first read voltage index to Z.
It should be noted that step 3164 and step 3165 do not have a certain sequence, and step 3164 may be executed first, step 3165 may also be executed first, and step 3164 and step 3165 may also be executed simultaneously, as long as they are executed after step 3163, which is not limited herein.
3166. The controller determines a second read voltage index.
In the optimal voltage index table, the controller may determine a second read voltage index, where a value of the second read voltage index is Z, and the second read voltage index corresponds to a page type where read recovery occurs.
3167. The controller updates the value of the second read voltage index.
Since the reading voltage of the Z-th row changes, the value of the second reading voltage index also needs to be updated to meet the requirement of practical application. The updating may be performed by updating a value of the index of the second read voltage to a preset value.
For example, to facilitate understanding of the technical solution, the update process is briefly described by taking the case that the LSB of region0 is read and restored. Assuming that the row label corresponding to the page type count with the smallest value is 2,index 2,0 The maximum row number of (d) is 2,vlut is 64. Then, the controller may index the first read voltage index 0,0 Update the value of (2), and index 2,0 The value of (c) is updated to the preset value 66, and the read voltage corresponding to the LSB may also be updated to the read recovery voltage in row 2 of the VLUT.
In the embodiment of the application, under the condition that the reading recovery occurs and the reading voltage stored in the second-level table does not meet the preset condition, the controller can update the first-level table, so that the reading voltage index in the first-level table can always correspond to the proper reading voltage in the second-level table, the controller can use the optimal reading voltage to perform the reading operation, and the reliability of the technical scheme of the application is improved.
In the embodiment of the application, the read voltage management table stores the corresponding relations between the read voltage indexes and the management areas and the page types respectively, and the corresponding relations between the read voltage indexes and the read voltages under different page types, and there are a plurality of read voltages corresponding to at least one read voltage index and corresponding to the same page type, so that the read voltages stored in the read voltage management table can read all physical addresses of the storage medium, and memory resources occupied by the read voltage management table are reduced.
Furthermore, in the embodiment of the present application, under the condition that a read recovery occurs and a swap-in and swap-out strategy is triggered, the controller may update the read voltage with the least number of hits in the second-level table to the second read recovery voltage, so that the read voltage stored in the read voltage management table may be flexibly applicable to various practical situations, and the flexibility of the scheme is improved.
The following describes a reading apparatus for a storage medium in an embodiment of the present application:
referring to fig. 5, fig. 5 is a schematic diagram of a reading apparatus 500 for a storage medium according to an embodiment of the present application, where the reading apparatus 500 for a storage medium according to the present application includes:
the processing unit 501 is configured to parse the read command and obtain a target physical address corresponding to the read command.
A determining unit 502, configured to determine, based on the physical addresses, a management area and a target page type respectively corresponding to the target physical addresses, where the management area is a physical space in the storage medium corresponding to at least one physical address.
An obtaining unit 503, configured to obtain a first read voltage index from a read voltage management table locally stored in a controller based on the management area and the target page type. And then acquiring a first reading voltage corresponding to the first reading voltage index from a reading voltage management table according to the first reading voltage index, wherein the reading voltage management table stores the corresponding relations between the reading voltage index and a plurality of management areas and a plurality of page types respectively, the corresponding relations between the reading voltage index and the reading voltages under different page types, and at least one page type in the plurality of page types corresponds to a plurality of reading voltages.
The processing unit 501 is further configured to execute a read command according to the first read voltage, and read data from the storage medium.
In some optional embodiments of the present application, the read voltage management table has a two-level table structure, where a first-level table of the read voltage management table stores correspondence between read voltage indexes and multiple management areas and multiple page types, respectively, and a second-level table of the read voltage management table stores correspondence between read voltage indexes and read voltages in different page types.
In some optional embodiments of the present application, the reading apparatus 500 of the storage medium further comprises an updating unit 504.
The obtaining unit 503 is further configured to obtain a first read recovery voltage if reading of data from the storage medium fails according to the first read voltage.
The determining unit 502 is further configured to determine a second read recovery voltage according to a relationship between the first read recovery voltage and the read voltage stored in the second-level table.
The updating unit 504 is further configured to update the read voltage management table to be updated according to the second read recovery voltage, so as to obtain the read voltage management table.
In some optional embodiments of the present application, the determining unit 502 is specifically configured to:
and if the distance between the first reading recovery voltage and the second reading voltage stored in the second-level table meets a preset condition, determining that the second reading recovery voltage is the second reading voltage, wherein the page type corresponding to the first reading recovery voltage is the same as the page type corresponding to the second reading voltage.
And if the distance between the first reading recovery voltage and the reading voltage of any row stored in the second-level table does not meet the preset condition, determining the second reading recovery voltage as the first recovery reading voltage.
In some optional embodiments of the present application, the second-level table further comprises a page type count, and the page type count is used for indicating the number of times of hitting a read voltage of a page type corresponding to a certain physical address.
The updating unit 504 is configured to update the page type count corresponding to the second read voltage in the second-level table to be updated to obtain the second-level table if it is determined that the second read recovery voltage is the second read voltage.
The updating unit 504 may further update a first row index corresponding to the second reading voltage, where the first row index is a row index of the second reading voltage in the second-level table. And then updating the first reading voltage index value into a first row index in the first-level table to be updated to obtain the first-level table.
In some optional embodiments of the present application, the updating unit 504 is configured to determine, in the second-level table to be updated, a first page type count if it is determined that the second read recovery voltage is the first recovery read voltage, where the first page type count has a minimum value in page type counts corresponding to target page types. The third read voltage is then updated to a second read recovery voltage, where the third read voltage corresponds to the first page type count. The updating unit 504 is further configured to update the value of the first page type count.
In some optional embodiments of the present application, the determining unit 502 is further configured to:
and determining a second line index corresponding to the first page type count, wherein the second line index is the line index of the first page type count in the second-level table. And then, in the first-level table to be updated, determining a second reading voltage index, wherein the value of the second reading voltage index is a second row label, and the page type corresponding to the second reading voltage index is a target page type.
The updating unit 504 is further configured to update the value of the second read voltage index to a preset value, and update the value of the first read voltage index to the second row index.
In some optional embodiments of the present application, the plurality of management areas are pre-divided according to a management granularity of the storage medium, the management granularity including pages of the storage medium, or blocks of the storage medium.
In some optional embodiments of the present application, each storage unit in the storage medium stores data of at least two bits, and may be a NAND flash memory or a NOR flash memory, where the NAND flash memory includes MLC, TLC or QLC, and is selected according to a requirement of an actual application, which is not limited herein.
In some optional embodiments of the present application, the first level table of the read voltage management table comprises an optimal voltage index table, and the second level table of the read voltage management table comprises a voltage lookup table.
In some optional embodiments of the present application, the reading means for the storage medium comprises a controller in the UFS device. Among them, UFS devices often use NAND flash memory as a storage medium.
In this embodiment, the reading apparatus 500 of the storage medium may perform the operations performed by the controllers in the embodiments shown in fig. 1 to fig. 4, which are not described herein again.
Fig. 6 is a schematic structural diagram of a controller for reading data according to an embodiment of the present disclosure, where the controller 600 may include one or more processors (CPUs) 601 and a memory 602, and one or more applications or data are stored in the memory 602.
The memory 602 may be volatile storage or persistent storage, among other things. The program stored in the memory 602 may include one or more modular blocks, each of which may include a series of instruction operations on a server. Further, the processor 601 may be configured to communicate with the memory 602 to execute a series of instruction operations in the memory 602 on the controller 600.
The controller 600 may also include one or more power supplies 605, one or more host-side interfaces 603, one or more storage medium-side interfaces 604, and/or one or more operating systems, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
In some alternative embodiments of the present application,
a memory 602, configured to store a read voltage management table, where correspondence relationships between read voltage indexes and a plurality of management areas and a plurality of page types, respectively, and correspondence relationships between the read voltage indexes and read voltages under different page types are stored, where at least one page type of the plurality of page types corresponds to a plurality of read voltages, and each management area of the plurality of management areas is a physical space corresponding to at least one physical address in the storage medium.
A processor 601 configured to:
the read command received through the host side interface 603 is parsed to obtain a target physical address corresponding to the read command. Then, based on the target physical address, a management area and a target page type respectively corresponding to the target physical address are determined. Then, a first read voltage index is obtained from the read voltage management table based on the management area and the target page type. And acquiring a first reading voltage corresponding to the first reading voltage index from the reading voltage management table according to the first reading voltage index. Finally, according to the first reading voltage, a reading command is issued to the storage medium through the storage medium side interface 604, and data is read from the storage medium.
In some optional embodiments of the present application, the read voltage management table has a two-level table structure, where a first level table of the read voltage management table stores a plurality of management areas and a correspondence between a plurality of page types and read voltage indexes, a second level table of the read voltage management table stores a correspondence between the read voltage indexes and read voltages under the plurality of page types, and at least one of the plurality of page types corresponds to the plurality of read voltages.
In some optional embodiments of the present application, the processor 601 is further configured to:
and if the data reading from the storage medium fails according to the first reading voltage, acquiring a first reading recovery voltage. A second read recovery voltage is then determined based on the relationship of the first read recovery voltage to the read voltages stored in the second level table. And finally, updating the read voltage management table to be updated according to the second read recovery voltage to obtain the read voltage management table.
In some optional embodiments of the present application, the processor 601 is configured to:
and if the distance between the first reading recovery voltage and the second reading voltage stored in the second-level table meets a preset condition, determining that the second reading recovery voltage is the second reading voltage, wherein the page type corresponding to the first reading recovery voltage is the same as the page type corresponding to the second reading voltage.
And if the distance between the first reading recovery voltage and the reading voltage of any row stored in the second-level table does not meet the preset condition, determining that the second reading recovery voltage is the first recovery reading voltage.
In some optional embodiments of the present application, the second level table further comprises a page type count, the page type count being used to indicate a number of times a read voltage hit on a page type corresponding to a certain physical address.
The processor 601 is configured to update the page type count corresponding to the second reading voltage in the second-level table to be updated to obtain the second-level table when the second reading recovery voltage is determined to be the second reading voltage.
The processor 601 may be further configured to determine a first row index corresponding to the second reading voltage, where the first row index is a row index of the second reading voltage in the second-level table. And then updating the first reading voltage index value into a first row index in the first-level table to be updated to obtain the first-level table.
In some optional embodiments of the present application, the second level table further comprises a page type count;
the processor 601 is configured to determine a first page type count in the second-level table to be updated if it is determined that the second read recovery voltage is the first recovery read voltage, where the first page type count has a minimum value in the page type counts corresponding to the target page types. The third read voltage is then updated to a second read recovery voltage, where the third read voltage corresponds to the first page type count. The processor is also configured to update a value of the first page type count.
In some optional embodiments of the present application, the processor 601 is further configured to:
and determining a second line index corresponding to the first page type count, wherein the second line index is the line index of the first page type count in the second-level table. And then, in the first-level table to be updated, determining a second reading voltage index, wherein the value of the second reading voltage index is a second row label, and the page type corresponding to the second reading voltage index is a target page type. And finally, updating the value of the second reading voltage index to a preset value, and updating the value of the first reading voltage index to a second row label.
In some optional embodiments of the present application, the plurality of management areas are pre-divided according to a management granularity of the storage medium. Wherein the management granularity includes pages of the storage medium, or blocks of the storage medium.
In some optional embodiments of the present application, each memory cell in the storage medium stores data of at least two bits, which may be a NAND flash memory or a NOR flash memory, and the NAND flash memory includes an MLC, a TLC or a QLC, and is selected according to a requirement of an actual application, which is not limited herein.
In some optional embodiments of the present application, the first level table of the read voltage management table comprises an optimal voltage index table, and the second level table of the read voltage management table comprises a voltage lookup table.
In some optional embodiments of the present application, the reading means for the storage medium comprises a controller in the UFS device. Among them, UFS devices often use NAND flash memory as a storage medium.
Finally, referring to fig. 7, a brief description is given of a memory system 700 provided in the embodiment of the present application, and fig. 7 is a schematic structural diagram of the memory system 700 in the embodiment of the present application.
A storage system 700, comprising:
a controller 701 and a storage medium 702.
The controller 701 may perform the operations performed by the controller in the embodiments shown in fig. 1 to fig. 4, the operations performed by the reading apparatus for the storage medium in the embodiment shown in fig. 5, or the operations performed by the processor in the embodiment shown in fig. 6, which are not described herein again;
each storage unit in the storage medium 702 stores at least two bits of data.
In some optional embodiments of the present application, the storage medium 702 comprises NOR flash memory or NAND flash memory, the NAND flash memory comprising MLC, TLC or QLC.
In some embodiments of the present application, the storage system may be a storage system using the UFS storage specification.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

Claims (24)

  1. A method of reading a storage medium, comprising:
    the controller analyzes the read command and acquires a target physical address corresponding to the read command;
    the controller determines a management area and a target page type respectively corresponding to the target physical address based on the target physical address, wherein the management area is a physical space corresponding to at least one physical address in a storage medium;
    the controller acquires a first read voltage index from a read voltage management table locally stored by the controller based on the management area and the target page type;
    the controller acquires a first reading voltage from the reading voltage management table according to the first reading voltage index, wherein the reading voltage management table stores corresponding relations between the reading voltage index and a plurality of management areas and between the reading voltage index and reading voltages under different page types, and at least one page type in the page types corresponds to a plurality of reading voltages;
    and the controller executes the read command according to the first read voltage and reads data from the storage medium.
  2. The method of claim 1, wherein the read voltage management table has a two-level table structure, wherein a first level table of the read voltage management table stores the correspondence between the plurality of management areas and the plurality of page types and the read voltage index, and wherein a second level table of the read voltage management table stores the correspondence between the read voltage index and the read voltages under the plurality of page types.
  3. The method of claim 1 or 2, wherein after the reading data from the storage medium according to the first read voltage by executing the read command, the method further comprises:
    if the controller fails to read data from the storage medium according to the first reading voltage, acquiring a first reading recovery voltage;
    the controller determines a second read recovery voltage according to the relationship between the first read recovery voltage and the read voltage stored in the second-level table;
    and the controller updates the read voltage management table to be updated according to the second read recovery voltage to obtain the read voltage management table.
  4. The method of claim 3, wherein the controller determines a second read recovery voltage based on the relationship between the first read recovery voltage and the read voltages stored in the second level table, comprising:
    if the distance between the first reading recovery voltage and a second reading voltage stored in the second-level table meets a preset condition, the controller determines that the second reading recovery voltage is the second reading voltage, wherein the page type corresponding to the first reading recovery voltage is the same as the page type corresponding to the second reading voltage;
    and if the distance between the first reading recovery voltage and any row reading voltage stored in the second-level table does not meet a preset condition, the controller determines that the second reading recovery voltage is the first recovery reading voltage.
  5. The method of claim 4, wherein the second-level table further comprises a page type count indicating a number of times a read voltage for a page type corresponding to a physical address is hit;
    the controller updates the read voltage management table to be updated according to the second read recovery voltage, and the method comprises the following steps:
    if the controller determines that the second reading recovery voltage is the second reading voltage, updating a page type count corresponding to the second reading voltage in a second-level table to be updated to obtain the second-level table;
    the controller determines a first row index corresponding to the second reading voltage, wherein the first row index is a row index of the second reading voltage in the second-level table;
    in a first-level table to be updated, the controller updates the value of the first read voltage index into the first row label to obtain the first-level table.
  6. The method of claim 4, wherein the second level table further comprises a page type count;
    the controller updates the read voltage management table to be updated according to the second read recovery voltage, and the method comprises the following steps:
    if the controller determines that the second read recovery voltage is the first recovery read voltage, determining a first page type count in the second-level table to be updated, wherein the first page type count has a minimum value in the page type counts corresponding to the target page type;
    the controller updates a third read voltage to the second read restore voltage, wherein the third read voltage corresponds to the first page type count;
    the controller updates a value of the first page type count.
  7. The method of claim 6, wherein after the controller determines the first page type count, the method further comprises:
    the controller determines a second row label corresponding to the first page type count, wherein the second row label is a row label 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 a value of the second read voltage index is the second row label, and a page type corresponding to the second read voltage index is the target page type;
    the controller updates the value of the second reading voltage index to a preset value;
    the controller updates the first read voltage index value to the second row index.
  8. The method according to any one of claims 1 to 7, wherein the plurality of management areas are divided in advance according to a management granularity of the storage medium;
    the management granularity includes a page of the storage medium, or a block of the storage medium.
  9. The method of any of claims 1 to 7, wherein the storage medium comprises NOR flash memory or NAND flash memory;
    the NAND flash memory includes: multi-level cell MLC, three-level cell TLC, or four-level cell QLC.
  10. The method of any of claims 1 to 7, wherein the controller comprises a controller in a Universal Flash Storage (UFS) device.
  11. A storage controller, comprising:
    a processor, a memory, a host side interface and a storage medium side interface;
    the memory is used for storing a reading voltage management table, wherein the reading voltage management table stores corresponding relations between reading voltage indexes and a plurality of management areas and a plurality of page types respectively, and corresponding relations between the reading voltage indexes and reading voltages under different page types, at least one page type in the page types corresponds to a plurality of reading voltages, and each management area in the management areas is a physical space corresponding to at least one physical address in a storage medium;
    the processor is configured to:
    analyzing the read command received through the host side interface to obtain a target physical address corresponding to the read command;
    determining a management area and a target page type respectively corresponding to the target physical address based on the target physical address;
    acquiring a first reading voltage index from the reading voltage management table based on the management area and the target page type;
    acquiring a first reading voltage from the reading voltage management table according to the first reading voltage index;
    and issuing the read command to the storage medium through the storage medium side interface according to the first read voltage, and reading data from the storage medium.
  12. The memory controller according to claim 11, wherein the read voltage management table has a two-level table structure, wherein a first level table of the read voltage management table stores the correspondence between the plurality of management areas and the plurality of page types and the read voltage index, and a second level table of the read voltage management table stores the correspondence between the read voltage index and the read voltages under the plurality of page types.
  13. The storage controller of claim 11 or 12, wherein the processor is further configured to:
    if the data reading from the storage medium fails according to the first reading voltage, acquiring a first reading recovery voltage;
    determining a second read recovery voltage according to the relationship between the first read recovery voltage and the read voltage stored in the second-level table;
    and updating the read voltage management table to be updated according to the second read recovery voltage to obtain the read voltage management table.
  14. The storage controller of claim 13, wherein the processor is configured to:
    if the distance between the first reading recovery voltage and the second reading voltage stored in the second-level table meets a preset condition, determining that the second reading recovery voltage is the second reading voltage, wherein the page type corresponding to the first reading recovery voltage is the same as the page type corresponding to the second reading voltage;
    and if the distance between the first reading recovery voltage and the reading voltage of any row stored in the second-level table does not meet a preset condition, determining that the second reading recovery voltage is the first recovery reading voltage.
  15. The memory controller according to claim 14, wherein the second-level table further includes a page type count indicating a number of times of hitting a read voltage of a page type corresponding to a physical address;
    the processor is configured to:
    if the second reading recovery voltage is determined to be the second reading voltage, updating a page type count corresponding to the second reading voltage in a second-level table to be updated to obtain the second-level table;
    determining a first row label corresponding to the second reading voltage, wherein the first row label is a row label of the second reading voltage in the second-level table;
    and updating the value of the first reading voltage index into the first row label in a first-level table to be updated to obtain the first-level table.
  16. The memory controller of claim 14, wherein the second level table further comprises a page type count;
    the processor is configured to:
    if the second read recovery voltage is determined to be the first recovery read voltage, determining a first page type count in the second-level table to be updated, wherein the first page type count has a minimum value in the page type counts corresponding to the target page types;
    updating a third read voltage to the second read restore voltage, wherein the third read voltage corresponds to the first page type count;
    and updating the value of the first page type count.
  17. The storage controller of claim 16, wherein the processor is further configured to:
    determining a second row label corresponding to the first page type count, wherein the second row label is a row label of the first page type count in the second-level table;
    determining a second reading voltage index in the first-level table to be updated, wherein the value of the second reading voltage index is the second row label, and the page type corresponding to the second reading voltage index is the target page type;
    updating the value of the second read voltage index to a preset value;
    and updating the first reading voltage index value to the second row index.
  18. The storage controller according to any one of claims 11 to 17, wherein the plurality of management areas are divided in advance according to a management granularity of the storage medium;
    the management granularity includes a page of the storage medium, or a block of the storage medium.
  19. The storage controller of any of claims 11 to 17, wherein the storage medium comprises NOR flash memory or NAND flash memory;
    the NAND flash memory includes: multi-level cell MLC, three-level cell TLC, or four-level cell QLC.
  20. A storage controller according to any of claims 11 to 17, comprising a controller in a UFS device.
  21. A storage system, comprising:
    a controller and a storage medium;
    the controller comprises the storage controller of any one of claims 11 to 20;
    each storage unit in the storage medium stores at least two bits of data.
  22. The system of claim 21, wherein the storage medium comprises NOR flash memory or NAND flash memory;
    the NAND flash memory includes a multi-level cell MLC, a three-level cell TLC, or a four-level cell QLC.
  23. A computer-readable storage medium, characterized in that a program is stored in the computer-readable storage medium, which, when executed by the computer, performs the method according to 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 according to any one of claims 1 to 10.
CN202080102871.8A 2020-11-10 2020-11-10 Storage medium reading method and related equipment Pending CN115803814A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/127729 WO2022099441A1 (en) 2020-11-10 2020-11-10 Method for reading storage medium, and related device

Publications (1)

Publication Number Publication Date
CN115803814A true CN115803814A (en) 2023-03-14

Family

ID=81600709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080102871.8A Pending CN115803814A (en) 2020-11-10 2020-11-10 Storage medium reading method and related equipment

Country Status (2)

Country Link
CN (1) CN115803814A (en)
WO (1) WO2022099441A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115793991B (en) * 2023-01-20 2023-04-14 苏州浪潮智能科技有限公司 Data reading method and device, electronic equipment and readable storage medium
CN116564391B (en) * 2023-03-17 2024-03-01 平头哥(成都)半导体有限公司 Storage control chip, solid state disk and flash memory read voltage determining method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130185612A1 (en) * 2012-01-18 2013-07-18 Samsung Electronics Co., Ltd. Flash memory system and read method of flash memory system
CN106057243B (en) * 2016-05-27 2019-10-18 华为技术有限公司 Method and device is determined using reference voltage is read
CN106448737B (en) * 2016-09-30 2020-12-01 厦门旌存半导体技术有限公司 Method and device for reading flash memory data and solid state drive
CN108735253B (en) * 2017-04-20 2022-06-21 三星电子株式会社 Non-volatile memory storage system
CN110007861A (en) * 2019-03-29 2019-07-12 新华三技术有限公司 A kind of method for reading data and device

Also Published As

Publication number Publication date
WO2022099441A1 (en) 2022-05-19

Similar Documents

Publication Publication Date Title
US9129699B2 (en) Semiconductor storage apparatus and method including executing refresh in a flash memory based on a reliability period using degree of deterioration and read frequency
US10698762B2 (en) Data reading method and storage controller
US9213731B2 (en) Determining whether to relocate data to a different tier in a multi-tier storage system
US9563498B2 (en) Method for preventing read-disturb errors, memory control circuit unit and memory storage apparatus
US10372349B2 (en) Method and apparatus for facilitating wear leveling of solid state disk
CN110377233B (en) SSD (solid State disk) reading performance optimization method and device, computer equipment and storage medium
US10303382B1 (en) Application defined storage device
US10126970B2 (en) Paired metablocks in non-volatile storage device
KR101933766B1 (en) Methods and systems for improving flash memory flushing
US10031673B2 (en) Techniques for selecting amounts of over-provisioning
CN115803814A (en) Storage medium reading method and related equipment
US10740020B2 (en) Method, device and computer program product for managing disk array
CN113076218B (en) Method for rapidly processing data reading errors of NVM (non-volatile memory) chip and controller thereof
US10424383B1 (en) Decoding method and storage controller
JP2018163707A (en) Semiconductor storage device and read control method of the same
US20180226990A1 (en) Managing soft information in high-capacity solid state drive
CN115148267A (en) Avoiding errors based on voltage distribution parameters of a block family
CN116134519A (en) Balanced three-level read disturb management in memory devices
CN115827511A (en) Method and device for setting cache
US10261715B2 (en) Storage space management method and apparatus
CN110364197B (en) Decoding method and storage controller
CN111767165A (en) Data processing method and device and control equipment
CN109144424B (en) Read-write method, device and equipment for solid state disk and storage medium
US11789748B2 (en) Firmware parameters optimizing systems and methods
CN115454346A (en) SSD RAID optimization method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination