WO2022099441A1 - Method for reading storage medium, and related device - Google Patents

Method for reading storage medium, and related device Download PDF

Info

Publication number
WO2022099441A1
WO2022099441A1 PCT/CN2020/127729 CN2020127729W WO2022099441A1 WO 2022099441 A1 WO2022099441 A1 WO 2022099441A1 CN 2020127729 W CN2020127729 W CN 2020127729W WO 2022099441 A1 WO2022099441 A1 WO 2022099441A1
Authority
WO
WIPO (PCT)
Prior art keywords
read
read voltage
voltage
page type
controller
Prior art date
Application number
PCT/CN2020/127729
Other languages
French (fr)
Chinese (zh)
Inventor
张杨
程智翔
张碧华
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/127729 priority Critical patent/WO2022099441A1/en
Priority to CN202080102871.8A priority patent/CN115803814A/en
Publication of WO2022099441A1 publication Critical patent/WO2022099441A1/en

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

Definitions

  • the present application relates to the field of data processing, and in particular, to a method for reading a storage medium and related devices.
  • a storage medium is a carrier for storing data, can record data information, and can save data information for a period of time.
  • commonly used storage media include memory sticks, smart media (smart media, SM) cards, floppy disks, hard disks, optical disks, and the like.
  • SM smart media
  • the storage medium needs to be read according to an appropriate read voltage, so as to obtain the data to be used.
  • a method of reading a storage medium is to store the optimal read voltage of each physical address in the read voltage management table (RVMT) of the controller.
  • RVMT read voltage management table
  • the controller needs to Select read voltages corresponding to different physical addresses to perform read operations.
  • the read voltage management table in the method stores the read voltage of each physical address, which requires a large storage space and occupies a high memory resource.
  • Embodiments of the present application provide a method for reading a storage medium and related equipment. By storing the correspondence between multiple management regions and multiple page types and read voltage indexes in a read voltage management table, as well as the relationship between the read voltage index and multiple Corresponding relationship between read voltages under page types, wherein at least one page type among multiple page types corresponds to multiple read voltages, thereby reducing memory resources used by the read voltage management table.
  • a first aspect of the embodiments of the present application provides a method for reading a storage medium, including:
  • one management area represents a physical space corresponding to at least one physical address in the storage medium.
  • the controller After receiving the read command sent by the host through the host-side interface, the controller can parse the read command and obtain the target physical address corresponding to the read command. After that, the controller can determine the management area and the target page type corresponding to the target physical address, respectively.
  • the physical address of the storage medium can be determined according to the codes corresponding to the physical addresses. These codes include die, plane, block and page.
  • a physical address can be represented as (die0, plane1) , block1, page20), which means that the physical address is the physical address of the 20th page in the 1st block under the 1st plane of the 0th particle.
  • a particle has two planes, each plane has 1000 to 2000 blocks, and there are multiple particles in the storage system, which will be determined according to the storage capacity of the storage system, which is not limited here.
  • the main basis for the controller to determine the target page type is the page code, and the mapping relationship between the page code and the page type is determined according to the performance of the storage medium.
  • the manner in which the controller determines the management area corresponding to the target address is related to the management granularity of the management area. Different management granularity, the code based on which the management area is determined is also different. If the management area is divided according to the unit of a single block, then the physical address corresponding to the same block code is the same management area.
  • the controller can determine the first read voltage index and the first read voltage corresponding to the first read voltage index in the read voltage management table stored locally by the controller according to the management area corresponding to the target physical address and the target page type. Finally, the controller executes the read command issued by the host according to the first read voltage to read data from the storage medium.
  • the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types. There are multiple read voltages corresponding to at least one page type among the multiple page types. Therefore, the first read voltage index may correspond to one read voltage or multiple read voltages.
  • the number of 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 may correspond to A plurality of read voltage indexes, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium.
  • the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types.
  • the read voltage corresponding to at least one read voltage index is multiple read voltages corresponding to the same page type, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the read voltage.
  • the read voltage management table uses a two-level table structure, and the read voltage index is stored in the first-level table of the read voltage management table with a plurality of management
  • the correspondence between the area and a plurality of page types is stored in the second-level table of the read voltage management table, and the correspondence between the read voltage index and the read voltage under different page types is stored.
  • the multiple page types in the read voltage management table at least one page type corresponds to multiple read voltages.
  • the controller in combination with the first aspect or the first implementation manner of the first aspect, in the second implementation manner of the first aspect of the embodiments of the present application, if the controller fails to read data from the storage medium according to the first read voltage, it means that an error has occurred. In the case of read recovery, the existing read voltage in the read voltage management table is no longer applicable to the current situation, and the controller needs to update the read voltage management table.
  • the controller can update the read voltage management table in the following ways:
  • the controller can obtain the first read recovery voltage, which is the read voltage used when the read recovery is successful.
  • the manner in which the controller obtains the first-read recovery voltage is not the focus of the technical solution of the present application, and will not be introduced in detail here.
  • the controller may determine the second read recovery voltage according to the distance relationship between the first read recovery voltage and the read voltage stored in the second level table.
  • the read voltage management table is updated according to the determined second read recovery voltage.
  • the controller may update the read voltage management table.
  • the read voltage recorded in the read voltage management table is updated, so that the second level table of the read voltage management table stores less read voltages. The actual situation improves the flexibility of the technical solution.
  • the controller may, according to the distance relationship between the first read recovery voltage and the read voltage stored in the second level table, , and determine the second read recovery voltage for performing the read operation on the physical address where the read recovery occurs afterward.
  • the controller can determine that the second read voltage is the second read recovery voltage, where the second read voltage is the second read recovery voltage.
  • the page type corresponding to the voltage is the same as the page type corresponding to the first read recovery voltage.
  • 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, which may be that the distance between the first read recovery voltage and the read voltage stored in the second-level table is less than or equal to the preset condition.
  • the threshold value is set, and the size of the preset threshold value is determined according to the allowable error range of the actual application. In practical applications, multiple second read voltages that meet the preset conditions may appear in the second-level table, and any one of them may be selected.
  • the selection method can be the first read voltage determined by the controller that satisfies the preset conditions, or the read voltage that is closest to the first read recovery voltage when the preset conditions are met, and can be based on the needs of practical applications.
  • the operation time can be reduced. If the read voltage closest to the first read recovery voltage is used, the error range can be reduced.
  • the controller may determine that the read voltage of a row in the second-level table is the second read voltage when the relationship between the first read recovery voltage and the read voltage stored in the second-level table satisfies a preset condition Read recovery voltage, the second read recovery voltage is used to perform the read operation on the physical address where the read recovery occurs. Within the allowable error range, use the read voltage stored in the second-level table to perform the read operation, which can avoid frequent read operations. Updating the second-level table simplifies the processing process and saves computing resources.
  • the second-level table of the read voltage management table further includes a page type count, and the page type count is used to indicate that a certain target is hit. The number of times of reading the voltage of the page type corresponding to a physical address.
  • the controller may update the read voltage management table in different ways according to different values of the second read recovery voltage.
  • the controller may determine the page type count corresponding to the second read voltage and the first row label corresponding to the second read voltage in the second level table. Then, the controller may update the page type count corresponding to the second read voltage, and the update method may be to increase the value of the page type count, thereby completing the update of the second-level table.
  • the controller can also update the first-level table in the read voltage management table. Since the physical address of the read operation has read recovery, the read voltage used for the read operation of the physical address in the future is actually the second read voltage. , so if the value of the first read voltage index still uses the previous value, it may correspond to an unsuitable read voltage. Therefore, the controller needs to update the first read voltage index, and update the value of the first read voltage index to the first row label.
  • the controller may update the value of the first read voltage index, so that the value of the first-level table in the first-level table is updated.
  • the read voltage index can always correspond to the appropriate read voltage in the second-level table, and the controller can use the optimal read voltage to perform the read operation, which improves the reliability of the technical solution of the present application.
  • the controller will trigger the swap-in and swap-out strategy to update the read voltage management table.
  • the second-level table of the read voltage management table also includes the page type count, and the controller can determine the target page type corresponding to the physical address where the read recovery occurs.
  • the first page type count with the smallest value of the page type count. Since read recovery occurs, and the read voltages stored in the second-level table before the update do not meet the preset conditions, it is necessary to replace the read voltage with the least hits in the second-level table with the second read recovery voltage, that is, replace The third read voltage corresponding to the first page type count is replaced with the second read recovery voltage.
  • the first page type count can no longer use the previous value, it needs to start accumulating again, and the controller also needs to update the value of the first page type count.
  • the updated value of the first page type count indicates that the storage medium is read by using the second read recovery voltage once.
  • the controller when the swap-in and swap-out strategy is triggered, can update the read voltage with the least hits in the second-level table to the second read recovery voltage, so that the read voltage stored in the read voltage management table It can be flexibly applied to a variety of practical situations, which improves the flexibility of the scheme.
  • the controller also needs to update the first-level table.
  • the update process is as follows:
  • the controller can determine the row number in the second-level table where the read voltage to be replaced is located, that is, the second row number. Since in the second-level table, the read voltage corresponding to the label in the second row has changed, the corresponding relationship between the read voltage index and the read voltage needs to be updated in the first-level table to be updated.
  • the update method is to first determine the read voltage index value of the second read voltage index of the second row number, and then update the second read voltage index value to a preset value.
  • the page type corresponding to the second read voltage index is the target page type. Since the read voltage value corresponding to the first read voltage index is changed due to read recovery, the controller also needs to update the first read voltage index value to the second row label.
  • the controller may update the first-level table, so that the read voltage in the first-level table
  • the index can always correspond to the appropriate read voltage in the second-level table, and the controller can use the optimal read voltage to perform the read operation, which improves the reliability of the technical solution of the present application.
  • the storage medium may be managed in advance according to the management granularity.
  • the management granularity can be a page of the storage medium or a block of the storage medium, which is selected according to the amount of memory resources, which is not specifically limited here.
  • a relatively rough management granularity can be used to divide the management area, for example, according to the unit of two blocks or three blocks, so as to further reduce the memory resources occupied by the reading voltage management table.
  • a finer management granularity can be used to divide the management area, such as a single block or half-block as a unit, so as to make the operation result more accurate.
  • the eighth implementation manner of the first aspect of the embodiments of the present application since in each storage unit of the storage medium, The data of each bit (bit) corresponds to the same page type.
  • the storage medium involved in the embodiments of the present application requires at least two page types, and at least one page type corresponds to at least two read voltages.
  • each storage unit in the storage medium provided by the embodiments of the present application stores at least two bits of data, and common storage media with this feature include NAND flash memory or NOR flash memory.
  • the NAND flash memory includes a multi-level cell (MLC), a triple-level cell (TLC), or a quadratic level cell (QLC), which is not specifically limited here.
  • MLC multi-level cell
  • TLC triple-level cell
  • QLC quadratic level cell
  • the storage medium includes NAND flash memory or NOR flash memory, which can be applied to different scenarios, which improves the practicability of the technical solution.
  • the first level table for reading the voltage management table includes the most Best voltage index storage (BVIT).
  • the second-level table for reading the voltage management table includes the voltage Lookup table (voltage look up table, VLUT).
  • the first-level table and the second-level table of the reading voltage management table may be specific optimal voltage subscript tables and voltage look-up tables, which improves the implementability of the solution.
  • the controller includes a universal flash storage (universal flash storage).
  • UFS universal flash storage
  • UFS devices often use NAND flash memory as a storage medium.
  • a second aspect of the embodiments of the present application provides a storage controller, including:
  • Processor memory, host side interface and storage medium side interface.
  • the memory is used to store the read voltage management table, wherein the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the read voltage index and the read voltage under different page types.
  • the corresponding relationship between the voltages, at least one page type in the multiple page types corresponds to multiple read voltages, and each management area in the multiple management areas is a physical space in the storage medium corresponding to at least one physical address.
  • the processor is used to:
  • the read voltage management table has a two-level table structure, wherein the first-level table of the read voltage management table stores the read voltage index with a plurality of management regions and a plurality of Corresponding relationship between page types, the second level table of the read voltage management table stores the corresponding relationship between read voltage indexes and read voltages under different page types, and at least one page type among multiple page types corresponds to multiple read voltages .
  • the processor is further configured to:
  • the first read recovery voltage is obtained. Then, according to the relationship between the first read recovery voltage and the read voltage stored in the second level table, the second read recovery voltage is determined. Finally, according to the second read recovery voltage, the read voltage management table to be updated is updated to obtain the read voltage management table.
  • the processor is used for:
  • the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage
  • the page type corresponding to the second read voltage is the same.
  • the second read recovery voltage is determined to be the first recovery read voltage.
  • the second-level table further includes a page type count, and the page type count is used to indicate a read voltage that hits a page type corresponding to a certain physical address number of times.
  • the processor is configured to update the page type count corresponding to the second read voltage in the to-be-updated second-level table when it is determined that the second read recovery voltage is the second read voltage, to obtain the second-level table.
  • the processor may also be configured to determine the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second-level table. Then, in the table of the first level to be updated, the index value of the first read voltage is updated to the label of the first row to obtain the table of the first level.
  • the second-level table further includes a page type count
  • the processor is used to:
  • the first page type count is determined in the second level table to be updated, where the first page type count is taken from the page type count corresponding to the target page type minimum value.
  • the third read voltage is then updated to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count.
  • the processor is also used to update the value of the first page type count.
  • the processor is further configured to:
  • the second row label corresponding to the first page type count is determined, wherein the second row label is the row label of the first page type count in the second-level table.
  • a second read voltage index is determined, wherein the value of the second read voltage index is the second row label, and the page type corresponding to the second read voltage index is the target page type.
  • the value of the second read voltage index is updated to a preset value, and the first read voltage index value is updated to the second row label.
  • the multiple management areas are based on the management granularity of the storage medium. pre-divided.
  • the management granularity includes pages of the storage medium or blocks of the storage medium.
  • the eighth implementation manner of the second aspect of the embodiments of the present application since in each storage unit of the storage medium, The data of each bit corresponds to the same page type.
  • the storage medium involved in the embodiments of the present application requires at least two page types, and at least one page type corresponds to at least two read voltages.
  • each storage unit of the storage medium provided by the embodiments of the present application stores at least two bits of data, and common storage media with this feature include NOR flash memory or NAND flash memory.
  • the NAND flash memory includes MLC, TLC or QLC, which is not specifically limited here.
  • the first level table of the read voltage management table includes the most Optimal voltage subscript table.
  • the second-level table for reading the voltage management table includes the voltage Inquiry form.
  • the storage controller includes the controller in the UFS device .
  • UFS devices often use NAND flash memory as a storage medium.
  • a third aspect of the embodiments of the present application provides a device for reading a storage medium, including:
  • the processing unit is used to parse the read command and obtain the target physical address corresponding to the read command.
  • the determining unit is configured to determine, based on the target physical address, the management area and the target page type respectively corresponding to the target physical address.
  • the management area represents a physical space corresponding to at least one physical address in the storage medium.
  • the obtaining unit is configured to obtain the first read voltage index from the read voltage management table stored locally by the controller based on the management area and the target page type. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table, wherein the read voltage management table stores the read voltage index and a plurality of management areas and a plurality of page types respectively. and the corresponding relationship between the read voltage index and the read voltages under multiple page types, and at least one page type in the multiple page types corresponds to multiple read voltages.
  • the processing unit is further configured to execute a read command according to the first read voltage to read data from the storage medium.
  • the read voltage management table has a two-level table structure, wherein the first-level table of the read voltage management table stores the read voltage index and a plurality of management Correspondence between regions and a plurality of page types, the second level table of the read voltage management table stores the correspondence between read voltage indexes and read voltages under different page types.
  • the device for reading a storage medium further includes an update unit.
  • the obtaining unit is further configured to obtain the first read recovery voltage if reading data from the storage medium fails according to the first read voltage.
  • the determining unit is further configured to determine the second read recovery voltage according to the relationship between the first read recovery voltage and the read voltage stored in the second level table.
  • the updating unit is further configured to update the read voltage management table to be updated according to the second read recovery voltage to obtain the read voltage management table.
  • the determining unit is specifically used for:
  • the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage
  • the page type corresponding to the second read voltage is the same.
  • the second read recovery voltage is determined to be the first recovery read voltage.
  • the second-level table further includes a page type count, and the page type count is used to indicate that a page corresponding to a certain physical address is hit. Type of read voltage times.
  • the updating unit 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 can also be used to determine the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second level table. Then, in the table of the first level to be updated, the index value of the first read voltage is updated to the label of the first row to obtain the table of the first level.
  • the second-level table further includes a page type count.
  • the updating unit is configured to determine the 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, wherein the first page type count is in the corresponding target page type. The smallest value in the page type count. The third read voltage is then updated to the second read recovery voltage, where the third read voltage corresponds to the first page type count.
  • the update unit is also used to update the value of the first page type count.
  • the determining unit is further used for:
  • a second row label corresponding to the first page type count is determined, wherein the second row label is the row label of the first page type count in the second-level table. Then, in the first level table to be updated, the second read voltage index corresponding to the page type is determined, wherein the second read voltage index value is the second row label.
  • the updating unit is further configured to update the value of the second read voltage index to a preset value, and update the first read voltage index value to the second row label.
  • the multiple management areas are based on the management granularity of the storage medium.
  • the management granularity includes pages of the storage medium, or blocks of the storage medium.
  • the eighth implementation manner of the third aspect of the embodiments of the present application since in each storage unit of the storage medium, The data of each bit corresponds to the same page type.
  • the storage medium involved in the embodiments of the present application requires at least two page types, and at least one page type corresponds to at least two read voltages.
  • each storage unit in the storage medium provided by the embodiments of the present application stores data of at least two bits.
  • Common storage media with this feature include NAND flash memory or NOR flash memory, and NAND flash memory includes MLC, TLC, or QLC. Specifically, this There are no restrictions.
  • the storage medium includes NAND flash memory or NOR flash memory, which improves the practicability of the technical solution.
  • the first level table of the reading voltage management table includes the most Optimal voltage subscript table.
  • the second-level table for reading the voltage management table includes the voltage Inquiry form.
  • the device for reading the storage medium includes a UFS device. 's controller.
  • UFS devices often use NAND flash memory as a storage medium.
  • a fourth aspect of the present application provides a storage system, including:
  • controller includes the storage controller of the second aspect.
  • Each storage unit in the storage medium stores at least two bits of data.
  • the storage medium may be a NAND flash memory or a NOR flash memory, and the NAND flash memory includes MLC, TLC or QLC, which is not specifically limited here.
  • the storage system may be a storage system using the UFS storage specification.
  • a fifth aspect of the embodiments of the present application provides a chip system, the chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected through a line, and the at least one processor is used for running a computer program or instruction to perform method of the first aspect.
  • the communication interface in the chip system may be an input/output interface, a pin or a circuit, or the like.
  • the chip system described above in the present application further includes at least one memory, and instructions are stored in the at least one memory.
  • the memory may be a storage unit inside the chip system, such as a register, a cache, etc., or a storage unit of the chip (eg, a read-only memory, a random access memory, etc.).
  • a sixth aspect of the embodiments of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the computer executes the program, the method of the foregoing first aspect is performed.
  • a seventh aspect of the embodiments of the present application provides a computer program product.
  • the computer program product When the computer program product is executed on a computer, the computer executes the method of the foregoing first aspect.
  • FIG. 1 is a schematic diagram of an application scenario of a method for reading a storage medium in an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for reading a storage medium in an embodiment of the present application
  • FIG. 3 is another schematic flowchart of a method for reading a storage medium in an embodiment of the present application.
  • FIG. 4 is another schematic flowchart of a storage medium reading method in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a storage medium reading device in an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a controller for reading data in an embodiment of the application.
  • FIG. 7 is a schematic structural diagram of a storage system in an embodiment of the present application.
  • Embodiments of the present application provide a method for reading a storage medium and related equipment.
  • the read voltage management table stores the correspondence between the read voltage index and multiple management regions and multiple page types, respectively, and the read voltage index and the corresponding relationship between the multiple page types. Correspondence between read voltages under different page types, wherein at least one page type in the multiple page types corresponds to multiple read voltages, so that the read voltages stored in the read voltage management table can perform all physical addresses of the storage medium. read operation, thereby reducing the memory resources occupied by the read voltage management table.
  • the storage medium involved in the embodiments of this application requires at least two page types, and at least one page type corresponds to at least two read Voltage. Therefore, the storage medium provided in this embodiment of the present application refers to a storage medium in which each storage unit stores at least two bits of data, including NAND flash memory, NOR flash memory, etc., which is not specifically limited here.
  • UFS device refers to a storage device that uses the universal flash storage specification, which includes a controller and NAND flash memory.
  • the universal flash storage specification increases the transmission frequency and achieves higher transmission bandwidth through more advanced serial signals. Therefore, UFS devices wide range of application.
  • the embodiments of the present application take a UFS device using a NAND flash memory as an example to introduce the technical solutions of the present application in detail.
  • the controller In response to the read command issued by the host, the controller will select an appropriate read voltage to read the NAND flash memory.
  • NAND flash memory often makes the optimal read voltage recorded in the controller can no longer successfully read data due to various reasons.
  • the controller will determine a read voltage that can successfully read data.
  • This process is the process of read recovery.
  • the process of read recovery is the process from the failure of reading to the successful reading of data by the controller in some ways.
  • the read voltage used in the read recovery may be called a read recovery voltage, a correctable voltage or an offset voltage, and the embodiment of the present application uses the term read recovery voltage.
  • the way to determine the read recovery voltage is related to the specific design of the controller.
  • the current mainstream products often use the method of dynamically estimating the read recovery voltage.
  • the read recovery voltage is often a value that cannot be accurately known in advance.
  • the specific method of determining the read recovery voltage is not the focus of the technical solution of the present application, and therefore, the embodiment of the present application will not be described in detail.
  • Data retention time is also one of the common causes of read recovery in NAND flash memory.
  • the data stored in the flash memory gradually disappears over time, the reason for the disappearance of the data is the escape of electrons in the floating gate.
  • the speed of electrons escaping the floating gate is proportional to the number of erasing, that is to say, the more the number of erasing, the faster the speed of electrons escaping, that is, the faster the data disappears.
  • Read disturb means that as the number of flash memory reads increases, the contents of similar memory cells in the same block will change, and electrons will continue to enter the floating gate, causing the data state of the memory cell to change. In this case, if the read operation of the NAND flash memory is still performed using the originally recorded read voltage, the result of read failure will occur.
  • the read operation and the write operation may be carried out separately and continuously under the condition of large temperature difference, for example, the read operation at 55°C is followed by the write operation at 25°C, and the same operation is repeated. read and write operations. It is also possible to repeat the read operation under gradually changing temperature, which is not specifically limited here.
  • FIG. 1 is a schematic diagram of an application scenario of the storage medium reading method provided by the embodiments of the present application.
  • a communication connection is established between the host 101 , the controller 102 and the NAND flash memory 103 for data transmission.
  • 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 and obtains the target physical address for which the read operation is determined to be performed. Then, the management area and target page type corresponding to the target physical address are determined from the read voltage management table stored locally by the controller, so as to obtain the first read voltage index, and then the target physical address is determined from the read voltage management table. The first read voltage of the read operation, and finally a read command is issued to the NAND flash memory 103 .
  • the NAND flash memory 103 can perform a read operation according to the first read voltage, and then send the operation result to the controller 102 .
  • the controller 102 may send the operation result to the host 101 .
  • the controller 102 may receive the read command sent by the host through the host-side interface.
  • 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 the storage medium side interface.
  • the storage medium side interface is a NAND flash interface (NAND flash interface, NFI), and the NAND flash memory can pass the I/O
  • the interface receives a read command.
  • controller 102 and the NAND flash memory 103 can also be coupled in the same storage system.
  • NAND flash memory can be divided into different types, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (tripe level cell, TLC) or quadratic level cell (quadratic level cell, QLC), etc.
  • SLC single-level cell
  • MLC multi-level cell
  • TLC tripe level cell
  • QLC quadratic level cell
  • each storage unit of the used storage medium stores at least two bits of data
  • the NAND flash memory is TLC as an example.
  • Each storage unit in the TLC stores 3-bit data.
  • the least significant bit (LSB), the central significant bit (CSB) and the most significant bit ( Most significant bit, MSB) three page types (page types) often need to use multiple read voltages, the number of read voltages is related to the configuration of the NAND flash memory, in a possible implementation, seven read voltages can be used voltage to complete the reading process. Among them, the read voltage corresponding to each page type is different, which is related to the configuration of the NAND flash memory.
  • the LSB can correspond to 1 or 2 read voltages
  • the CSB can correspond to 2 or 3 read voltages
  • the MSB can correspond to 2, 3
  • TLCs include "1-2-4" type TLC, "1-3-3” type TLC or "2-3-3” type TLC, these three numbers indicate the read voltage required to read LSB, CSB and MSB respectively Take “1-2-4" type TLC as an example, the meaning of "1-2-4" type is that LSB corresponds to 1 read voltage, CSB corresponds to 2 read voltages, and MSB corresponds to 4 read voltages.
  • the read voltage of each physical address needs to be stored in the read voltage management table, and the read voltage in the read voltage management table can only correspond to one physical address.
  • the process of reading data in the NAND flash memory by this method is described below by taking the "1-2-4" type TLC as an example.
  • 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, among them, the page type corresponding to 512 physical addresses is LSB, the page type corresponding to 512 physical addresses is CSB, and the page corresponding to 512 physical addresses is The type is MSB. To perform a read operation on all physical addresses whose page type is CSB, 1024 read voltages need to be stored in the read voltage management table.
  • the "1-2-4" type TLC can be divided into several management areas according to the management granularity.
  • the size of the management granularity is selected according to the usage of memory resources.
  • the management granularity can be several blocks or several pages, which can be divided in units of single block or half block (sub-block), or can be It is divided according to the unit of single page or double page, and the selection is made according to the actual application needs, which is not limited here.
  • the management area can be divided in units of two blocks or three blocks, so that the number of divided management areas is small, and the memory resources occupied by the first-level table are further reduced. In the case of sufficient memory resources, the management area can be divided according to the unit of single block or half block, so as to reduce the error of reading data.
  • the embodiment of the present application takes the division of the management area in units of two blocks as an example for simple description.
  • each block can include 64 pages, which can be regarded as 64 physical addresses. If the "1-2-4" type TLC is divided into 4 management regions (regions), the obtained first-level table The contents shown in Table 1 can be included.
  • the horizontal headers of Table 1 indicate categories of page types, and the vertical headers indicate different management areas. According to Table 1, there are three page types in the same management area of the TLC, and the read voltage index can be determined according to the management area and the page type. Since Table 1 is the result obtained after the management area is divided in units of double blocks, if the 512 physical addresses corresponding to the CSB in the "1-2-4" type TLC are divided into 4 management areas, respectively Corresponding to index 0,1 , index 1,1 , index 2,1 and index 3,1 , then each read voltage index corresponds to 128 physical addresses. Next, the appropriate read voltage needs to be determined according to the read voltage stored in the second-level table.
  • the second level table may include the content shown in Table 2.
  • the corresponding row label of Table 2 is 0. , 1, 2 or 3 read voltages where the page type is CSB. If rB and rF are read voltages corresponding to CSB, then it can be determined that R n,3 and R n,5 are read voltages to be selected, where n is an integer from 0 to 3. Taking the read operation of the physical address corresponding to index 0,1 as an example, the read voltage determined by the controller in combination with Table 1 and Table 2 is the read voltage value corresponding to R 0,1 and R 0,5 .
  • the physical addresses are also divided, but 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.
  • the memory resources occupied by the first-level table in the application embodiment are still relatively high.
  • the memory resources occupied by each read voltage and each read voltage index are the same.
  • Using the first-level table provided by this embodiment of the present application can save 57 % of memory resources.
  • QLC because the read voltage used for reading QLC is 15 and there are 4 page types, more memory resources can be saved, about 73%.
  • the read voltage stored in the second-level table of the read-voltage management table provided by the embodiment of the present application is determined according to experiments and has a wide range of applications.
  • the technical solution of the present application can also update the read voltage in the second-level table. , so that the read voltage stored in the second-level table can perform read operations on all physical addresses of the storage medium.
  • the specific update method will be described below.
  • the first-level table in this embodiment of the present application often has hundreds or thousands of rows, or even more, and the second-level table is usually within 32 or 64 rows, so that the second-level table The overall resource occupied is much smaller than that of the first-level table. Therefore, the second-level table structure adopted by the read voltage management table in the embodiment of the present application can save memory resources.
  • the following describes the method for reading the storage medium provided by the embodiment of the present application.
  • the method for reading the storage medium provided by the embodiment of the present application can be applied to the scenario shown in FIG. 1 .
  • use the read voltage in the read voltage management table to perform A read operation may fail to read data successfully.
  • the following describes the success and failure of reading.
  • FIG. 2 is an embodiment of a method for reading a storage medium in an embodiment of the present application, including:
  • the controller receives a read command.
  • the controller can establish a connection with the host, and receive the 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, which is selected according to actual application needs, which is not specifically limited here.
  • the controller determines the target physical address corresponding to the read command.
  • the controller When the controller reads the NAND flash memory, it does not blindly read all the physical addresses, but determines the target physical address that needs to be read according to the read command issued by the host. After the controller receives the read command sent by the host, it can parse the read command to determine the target physical address corresponding to the read command, that is, in the NAND flash memory, the target corresponding to the data to be read this time. physical address.
  • the controller determines the first read voltage index.
  • the controller After the controller determines the first physical address corresponding to the read command, it can determine the first read voltage from the read voltage management table stored locally by the controller according to the management area corresponding to the target physical address and the target page type corresponding to the target physical address. index.
  • the physical address of the storage medium can be determined according to the codes corresponding to the physical addresses, and the codes include the codes of particles, planes, blocks and pages of the storage medium.
  • a physical address may be represented as (die0, plane2, block3, page10), which means that the physical address is the physical address of page 10 in block 3 under plane 2 of particle 0.
  • a particle has two planes, and each plane has 1000 to 2000 blocks.
  • There are multiple particles in the storage system which will be determined according to the storage capacity of the storage system. The larger the storage capacity, the more particles. , which is not specifically limited here.
  • the main basis for the controller to determine the target page type is the page code, and the mapping relationship between the page code and the page type is determined according to the performance of the storage medium.
  • mapping relationship between page code and page type can be as shown in Table 3:
  • an appropriate management granularity can be selected to divide the NAND flash memory into several management areas.
  • Each management area contains multiple physical addresses, and a management area can be regarded as a physical space that stores several physical addresses.
  • the management granularity can be a single block or a half block, or a double block or three blocks, which is determined according to the needs of practical applications, and is not specifically limited here.
  • the management area can be divided in units of two blocks or three blocks, so that the number of divided management areas is small, and the memory resources occupied by the first-level table are further reduced.
  • the management area can be divided according to the unit of single block or half block, so as to reduce the error of reading data.
  • the correspondence between the management area and the physical address is related to the management granularity. Different management granularities have different code names for determining the management area. For example, if the management area is divided according to a single block, the mapping relationship between the management area and the physical address can be shown in Table 4. For example, if the management area is divided according to the unit of two blocks, the mapping relationship between the management area and the physical address may be as shown in Table 5.
  • code management area block0 region0 block1 region1 block2 region2 block3 region3 block4 region4
  • the block code is block3
  • the page code is the physical address of page2
  • the corresponding management area is region3
  • the corresponding target page type is LSB.
  • code management area block0 block1 region0 block2, block3 region1 block4, block5 region2 block6, block7 region3 block8, block9 region4
  • the number of blocks in a storage medium is related to the performance and configuration of the storage medium.
  • a common storage medium has 1,000 to 2,000 blocks.
  • the technical solution of the present application does not affect the number of blocks in the storage medium. limit.
  • the block code is block3
  • the page code is the physical address of page2
  • the corresponding management region is region1
  • the corresponding target page type is LSB.
  • the first read voltage index is stored in the first level table of the read voltage management table.
  • the first level table of the read voltage management table a plurality of management areas and the correspondence between a plurality of page types and read voltage indexes are stored, and each read voltage index has a corresponding page type and a corresponding management area.
  • There will be multiple physical addresses in a management area and a page type will also correspond to multiple physical addresses.
  • the same management area and the same page type correspond to multiple physical addresses. , pointing to the same read voltage index.
  • the embodiment of the present application takes the first level table as the optimal voltage subscript table as an example.
  • the number of management areas stored in the optimal voltage subscript table is related to the management granularity of the NAND flash memory, and the management granularity may be based on several blocks Or several pages are divided, which can be divided according to single block or half block, or divided according to single page or double page, which is selected according to actual application needs, which is not limited here.
  • the determination of the management granularity is also related to the utilization rate of memory resources.
  • a relatively rough management granularity can be used to divide the management area, for example, it is divided in units of two blocks or three blocks. Further reduce the memory resources occupied by reading the voltage management table.
  • a finer management granularity can be used to divide the management area, such as a single block or half-block as a unit, so as to make the operation result more accurate.
  • the degree of fineness of the division of the management area can be determined according to the usage of memory resources, which improves the flexibility of the technical solution.
  • the optimal voltage subscript table may include the contents shown in Table 6:
  • the page type corresponding to the read voltage index 0,0 is LSB, and the corresponding management region is region0.
  • the controller determines whether the value of the first read voltage index is a preset value, and if so, executes step 205, and if not, executes step 206.
  • the controller may determine the value of the first read voltage index, and determine an appropriate read voltage according to the relationship between the value of the first read voltage index and the preset value.
  • the value of the read voltage index can be as shown in Table 7:
  • the controller uses the buffered read voltage to perform a read operation.
  • the controller may determine to use the buffered read voltage to perform the read operation.
  • the preset value can also be called the sentinel value, which can be preset manually.
  • the specific value of the preset value It can be larger than the largest row number in the second-level table of the reading voltage management table, or it can be The row number smaller than the smallest row number in the second-level table of the read voltage management table, as long as the value is different from any row number in the second-level table, which is not specifically limited here.
  • the preset values corresponding to different read voltage indexes may be the same or different, which are not specifically limited here.
  • the read voltage cached in the embodiment of the present application is the read voltage cached on the particle die, and each page type of each management area has its own cached read voltage, and these read voltages may be the same or different. , which indicates the read voltage used in the last read operation on the physical address corresponding to a certain page type in a certain management area. Due to the performance characteristics of the NAND flash memory, the voltage value can be cached on the die, and even when the read operation is performed for the first time, the voltage value will be cached on the die.
  • the controller determines the first read voltage corresponding to the first read voltage index.
  • the controller may determine the value of the first read voltage index, and determine the first read voltage corresponding to the first read voltage index from the second-level table.
  • the second-level table is a voltage look-up table as an example.
  • the voltage look-up table may include the contents shown in Table 8:
  • rA to rG represent physical addresses.
  • the physical addresses corresponding to each page type are different, so the read voltage corresponding to each page type is also different, which is related to the configuration of the NAND flash memory.
  • LSB can correspond to 1 or 2 read voltages
  • CSB can correspond to 2 or 3 read voltages
  • MSB can correspond to 2, 3 or 4 read voltages, there is no specific limitation here, according to the actual use of NAND flash memory
  • the configuration is determined, as long as a maximum of seven read voltages can be used to distinguish different page types.
  • R 0,0 to R 0,6 represent the read voltage with row number 1, 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 complex usage scenarios of UFS devices, NAND flash memory often has a coupling phenomenon due to data retention time, read interference or temperature changes, which makes the optimal read voltage change. Therefore, multiple groups of read voltages can be stored in the read voltage look-up table and updated according to actual application conditions.
  • the read voltage lookup table can store 32 rows of read voltages or 64 rows of read voltages, as long as the memory resources occupied by the second-level table are much smaller than those of the first-level table, which is not limited here.
  • the page type count includes LSB count, CSB count and MSB count, which represent the number of times of using the read voltage corresponding to a certain page type.
  • N 0,1 represents the number of read operations performed on the NAND flash memory using the read voltage corresponding to R 0,0 .
  • the initial value of the page type count is 0. If the controller uses the corresponding read voltage of a certain page type, the value of the page type count will be updated.
  • the update method can be used once, and the value is incremented by 1, or it can be used once, and the value is incremented by 10. The selection is made according to the needs of the actual application, as long as the value of the page type count increases every time it is used. It is sufficient that the values are the same, and there is no specific limitation here.
  • the read voltage is used once, and the page type count value corresponding to the read voltage is incremented by 1 as an example.
  • the controller may determine the read voltage index corresponding to the physical address of the read command according to Table 6. Then, according to Table 7, the value of the read voltage index is determined. Then, according to Table 8 and Table 9, the read voltage corresponding to the read voltage index is determined.
  • the first read voltage index is index 0,0 as an example, and with reference to Tables 6 to 9, the controller can determine that index 0,0 corresponds to R 0,0 and R 0,4 in the voltage lookup table the indicated read voltage.
  • the controller sets the first read voltage on the die.
  • the controller may set the first read voltage on the die.
  • the controller updates the read voltage management table.
  • the voltage management table needs to be read, and the update method may be to increase the page type count corresponding to the first read voltage.
  • the first read voltage index is index 0,0 as an example, and it can be known from Tables 3 to 6 that the page type count corresponding to index 0,0 is N 0,1 . If the controller uses the read voltage corresponding to index 0 , 0, the value corresponding to N 0 , 1 in the VLUT is incremented by 1, thereby completing the update of the read voltage management table.
  • the controller reads the NAND flash memory to perform a read operation according to the first read voltage.
  • the controller may use the first read voltage to perform a read operation on the NAND flash memory.
  • step 207, step 208 and step 209 do not have a necessary order.
  • step 207 can be executed first
  • step 208 can also be executed first
  • step 209 can also be executed first, which is not limited here. .
  • the controller receives the operation result, and sends the operation result to the host.
  • an operation result can be generated, and the operation result can be sent to the controller.
  • the controller After receiving the operation result, the controller can send the operation result to the host.
  • the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types.
  • the read voltage corresponding to at least one read voltage index is a plurality of read voltages corresponding to the same page type, so that the read voltage stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the read voltage. Manage the memory resources occupied by the table.
  • the value of the read voltage index can be a preset value.
  • the controller does not need to query the read voltage management table, and can directly obtain the read voltage from the die, which saves the steps of setting the read voltage and reduces the need for setting the read voltage. time cost incurred.
  • the controller uses a read voltage to perform a read operation, it will update the page type count corresponding to the read voltage once, which provides a basis for the update of the read voltage management table, making the update of the read voltage management table more in line with the needs of practical applications. Improve the flexibility of the program.
  • the controller can update the read voltage management table, so that it can adapt to various usage environments, which improves the flexibility of the technical solution.
  • FIG. 3 is an embodiment of a method for reading a storage medium in an embodiment of the present application, including:
  • the controller receives a read command
  • the controller determines the target physical address corresponding to the read command.
  • the controller determines a first read voltage index.
  • the controller determines whether the value of the first read voltage index is a preset value, and if so, executes step 305, and if not, executes step 307.
  • the controller uses the buffered read voltage to perform a read operation.
  • steps 301 to 305 are similar to steps 201 to 205 in the embodiment shown in FIG. 2 , and details are not repeated here.
  • the controller receives the operation result, and sends the operation result to the host.
  • the operation results received by the controller have various situations, which are described below:
  • the controller after the controller performs a read operation on the NAND flash memory according to the read voltage buffered on the die after step 305, the NAND flash memory generates an operation result, and sends the operation result to the controller. After receiving the operation result, the controller can send the operation result to the host.
  • the controller 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, if the read recovery does not occur at the physical address where the read operation is performed, the controller If the data is successfully read, the controller will also send the received operation result to the host.
  • the controller determines the first read voltage corresponding to the first read voltage index.
  • step 307 is similar to step 206 in the embodiment shown in FIG. 2 , and details are not described herein again.
  • the controller reads the NAND flash memory to perform a read operation according to the first read voltage.
  • the controller may use the first read voltage to perform a read operation on the NAND flash memory.
  • the controller can also set the first read voltage on the die, and can also update the read voltage management table.
  • the setting and updating methods are the same as those in steps 207 and 208 in the embodiment shown in FIG. 2 . Similar, details are not repeated here.
  • the controller determines whether read recovery occurs at the target physical address, and if so, executes step 310, and if not, executes step 306.
  • the controller After the controller performs a read operation on the NAND flash memory according to the first read voltage, it can determine whether the target physical address corresponding to the read command has read recovery. If the read is successful, it means that the target physical address does not have read recovery. If the read fails, it means that the target physical address has read recovery.
  • the first read voltage is not the optimal read operation for the target physical address corresponding to the read command. Voltage.
  • the controller determines the first read recovery voltage.
  • the controller can determine the first read recovery voltage, which is the optimal read voltage of the target physical address.
  • the manner in which the controller determines the recovery voltage of the first reading is not the focus of the technical solution of the present application, so the embodiment of the present application does not introduce the process of obtaining the recovery voltage of the first reading in detail.
  • the controller determines whether the distance between the first read recovery voltage and the read voltage in the Xth row of the second-level table satisfies a preset condition, if yes, executes step 312, if not, executes step 315.
  • the controller can compare the distance between the first read recovery voltage and the read voltage of any row in the second-level table, so as to determine the second read recovery voltage for performing the read operation on the NAND flash memory, and According to the second read recovery voltage, the read voltage management table is updated using different update methods.
  • This embodiment takes the voltage look-up table VLUT as an example for detailed description.
  • the Xth row is used to represent any row in the VLUT, where X represents the row label of the VLUT, that is, the first row label corresponding to the second read voltage in the claim, and X is greater than or equal to 0 the integer.
  • 2 )/n), where U (u 1 , u 2 , .
  • the distance between the two groups of voltages may be less than the threshold value, or the distance between the two groups of voltages may be less than or equal to the threshold value.
  • the selection is made according to the needs of the actual application. There is no limitation here.
  • the first read recovery voltage with the read voltage stored in the VLUT can be compared in sequence from the 0th row to the last row in the VLUT table, or random but not repeated.
  • the comparison is performed in the order of comparison, or a read voltage that satisfies the condition is obtained in the VLUT, and the comparison is no longer performed, and the selection is made according to the needs of the actual application, which is not specifically limited here.
  • the read voltage of the Xth row which can be the first read voltage compared, or it can be the read voltage with the smallest distance from the first read recovery voltage among all the read voltages that meet the conditions. , and select it according to the actual application needs, which is not limited here.
  • the controller can determine that the second read recovery voltage is read voltage 1.
  • the controller determines the read voltage of the Xth row, and each way has different beneficial effects. If it is determined that the read voltage obtained from the first comparison is the second read recovery voltage, the number of comparisons can be reduced and computing resources can be saved. If it is determined that the second read recovery voltage is the read voltage with the smallest distance from the first read recovery voltage among all the read voltages that meet the conditions, the read voltage used for the read operation on the physical address corresponding to the read command is closer to the optimum. Reading the voltage can reduce the error and improve the accuracy of the technical solution.
  • the controller determines that the second read recovery voltage is the read voltage of the Xth row.
  • the controller may determine that the second read recovery voltage is the read voltage of the Xth row.
  • the controller may determine that the read voltage of a row in the second-level table is the second read voltage when the relationship between the first read recovery voltage and the read voltage stored in the second-level table satisfies a preset condition Read recovery voltage, the second read recovery voltage is used to perform the read operation on the physical address where the read recovery occurs. Within the allowable error range, use the read voltage stored in the second-level table to perform the read operation, which can avoid frequent read operations. Updating the second-level table simplifies the processing process and saves computing resources.
  • the controller updates the first-level table.
  • the controller may update the first level table.
  • the first-level table is an optimal voltage subscript table BVIT as an example for detailed description.
  • the update manner may be to update the value of the first read voltage index to X.
  • the management region for performing the read operation is region0
  • the page type corresponding to the management region is LSB
  • the value of the first read voltage index 0,0 is 0 as an example. If the second read recovery voltage is the read voltage of the first row, the value of index 0 , 0 needs to be updated to 1.
  • the controller may update the value of the first read voltage index, so that the value of the first-level table in the first-level table is updated.
  • the read voltage index can always correspond to the appropriate read voltage in the second-level table, and the controller can use the optimal read voltage to perform the read operation, which improves the reliability of the technical solution of the present application.
  • the controller updates the second-level table.
  • the controller may also update the VLUT by increasing the page type count corresponding to the Xth row.
  • the value of the page type count is increased by 10 as long as the read voltage of a certain page type in the Xth row is used, the value of the page type count value increases by the same value, according to the needs of the actual application. Make a selection, which is not limited here.
  • the page type corresponding to the management area is LSB
  • the Xth row is the 1st row
  • the page type count N 1 the value of 1 is 10
  • the update method is to use a certain page type in the Xth row every time.
  • the value of the page type count is increased by 1 as an example. If the read voltage of the Xth row is determined as the second read recovery voltage, the value of N 1,1 is updated to 11.
  • step 313 and step 314 do not have a necessary sequence. In practical applications, step 313 or step 314 may be performed first, as long as it is performed after step 312, which is not limited here.
  • the controller determines that the second read recovery voltage is the first read recovery voltage.
  • the controller can determine the first read voltage.
  • the second read recovery voltage is the first read recovery voltage.
  • the controller updates the read voltage management table.
  • the controller can trigger the swap-in and swap-out strategy to update the read voltage management table.
  • the controller receives the operation result of read recovery, and sends the operation result of read recovery to the host.
  • the controller may perform a read operation on the NAND according to the first read recovery voltage to obtain an operation result.
  • the controller can send the operation result to the host.
  • step 317 is not necessarily after step 314 or step 316, it can also be before step 314 or step 316, or before step 311, as long as it is after step 310, and the selection is made according to the needs of the actual application , which is not specifically limited here.
  • the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types.
  • the read voltage corresponding to at least one read voltage index is a plurality of read voltages corresponding to the same page type, so that the read voltage stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the read voltage. Manage the memory resources occupied by the table.
  • the controller can update the read voltage management table to make it applicable to various situations, improving flexibility of the program.
  • FIG. 4 is an embodiment of a method for reading a storage medium in an embodiment of the present application, including:
  • the controller determines the count of the first page type whose value is Y.
  • the controller can determine the page type corresponding to the physical address at which read recovery occurs, and then can determine the first page type count with a value of Y, where Y is counted in at least one page type corresponding to the page type The value in is the smallest, that is, the value of the first page type count in the claim.
  • the controller updates the type count of the first page.
  • the controller After the controller determines the first page type count, it can update the first page type count, and the update method can be to update the value of the first page type count to 1, or it can be to update the value of the first page type count. It is updated to 10, as long as the value can indicate that the first read recovery voltage is hit once.
  • step 3162 may be performed before step 3163, or may be performed after step 3163, as long as it is performed after step 3161, which is not specifically limited here.
  • the controller determines the row label Z where the first page type count is located.
  • the controller may determine the row number Z where the first page type count is located in the voltage look-up table, that is, the first row number in the claims.
  • the controller when the swap-in and swap-out strategy is triggered, can update the read voltage with the least hits in the second-level table to the second read recovery voltage, so that the read voltage stored in the read voltage management table It can be flexibly applied to a variety of practical situations, which improves the flexibility of the scheme.
  • the controller updates the read voltage of the Zth row.
  • the controller may update the read voltage of the Zth row after determining the row number Z where the first page type count is located.
  • the update manner may be to update the read voltage corresponding to the page type in the Zth row to the second read recovery voltage.
  • the controller updates the value of the first read voltage index.
  • the controller can determine the first read voltage index corresponding to the physical address where read recovery occurs in the optimal voltage subscript table. Due to the read recovery, the value of the first read voltage has changed, and the corresponding value in the voltage lookup table is The row number may also be changed, so the value of the first read voltage index needs to be updated.
  • the update manner may be to update the value of the first read voltage index to Z.
  • step 3164 can be executed first, or step 3165 can be executed first, or step 3164 and step 3165 can be executed at the same time, as long as it is executed after step 3163, There is no specific limitation here.
  • the controller determines the second read voltage index.
  • the controller can determine the second read voltage index, wherein the value of the second read voltage index is Z, and the second read voltage index corresponds to the page type in which read recovery occurs.
  • the controller updates the value of the second read voltage index.
  • the update manner may be to update the value of the index of the second read voltage to a preset value.
  • the above update process is briefly described by taking the read recovery of the LSB of region 0 as an example. Assuming that the row number corresponding to the page type count with the smallest value is 2, the value of index 2, 0 is 2, and the maximum row number of the VLUT is 64. Then, the controller can update the value of the first read voltage index index 0,0 to 2, and update the value of index 2,0 to the preset value 66, and can also in the second row of the VLUT, the LSB corresponds to The read voltage is updated to the read recovery voltage.
  • the controller may update the first-level table, so that the read voltage in the first-level table
  • the index can always correspond to the appropriate read voltage in the second-level table, and the controller can use the optimal read voltage to perform the read operation, which improves the reliability of the technical solution of the present application.
  • the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types.
  • the read voltage corresponding to at least one read voltage index is multiple read voltages corresponding to the same page type, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the read voltage.
  • the controller may update the read voltage with the least hits in the second-level table to the second read recovery voltage, so that The read voltage stored in the read voltage management table can be flexibly applied to various practical situations, which improves the flexibility of the scheme.
  • FIG. 5 is a schematic diagram of an apparatus for reading a storage medium 500 in an embodiment of the present application.
  • An embodiment of the apparatus for reading a storage medium 500 in the present application includes:
  • the processing unit 501 is configured to parse the read command and obtain the target physical address corresponding to the read command.
  • the determining unit 502 is configured to determine, based on the physical address, a management area and a target page type respectively corresponding to the target physical address, where the management area is a physical space in the storage medium corresponding to at least one physical address.
  • the obtaining unit 503 is configured to obtain the first read voltage index from the read voltage management table stored locally by the controller based on the management area and the target page type. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table, wherein the read voltage management table stores the read voltage index and a plurality of management areas and a plurality of page types respectively. and the corresponding relationship between the read voltage index and the read voltage under different page types, at least one page type in the multiple page types corresponds to multiple read voltages.
  • the processing unit 501 is further configured to execute a read command according to the first read voltage to read data from the storage medium.
  • the read voltage management table has a two-level table structure, wherein the first level table of the read voltage management table stores the read voltage index and the relationship between the multiple management areas and the multiple page types, respectively. Corresponding relationship, the second level table of the read voltage management table stores the corresponding relationship between the read voltage index and the read voltage under different page types.
  • the storage medium reading apparatus 500 further includes an updating unit 504 .
  • the obtaining unit 503 is further configured to obtain the first read recovery voltage if the data read from the storage medium fails according to the first read voltage.
  • the determining unit 502 is further configured to determine the second read recovery voltage according to the 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 to obtain the read voltage management table.
  • the determining unit 502 is specifically configured to:
  • the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage
  • the page type corresponding to the second read voltage is the same.
  • the second read recovery voltage is determined to be the first recovery read voltage.
  • the second-level table further includes a page type count, where the page type count is used to indicate the number of times the read voltage of the page type corresponding to a certain physical address is hit.
  • 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 can also use the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second level table. Then, in the table of the first level to be updated, the index value of the first read voltage is updated to the label of the first row to obtain the table of the first level.
  • the updating unit 504 is configured to, if it is determined that the second read recovery voltage is the first recovery read voltage, determine the first page type count in the second level table to be updated, wherein , the first page type count is the smallest among the page type counts corresponding to the target page type. The third read voltage is then updated to the second read recovery voltage, wherein 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.
  • the determining unit 502 is further configured to:
  • a second row label corresponding to the first page type count is determined, wherein the second row label is the row label of the first page type count in the second-level table. Then, in the first-level table to be updated, a second read voltage index is determined, wherein the second read voltage index value is the second row label, and the page type corresponding to the second read voltage index is the target page type.
  • 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 label.
  • the multiple management areas are pre-divided according to the management granularity of the storage medium, and the management granularity includes a page of the storage medium or a block of the storage medium.
  • each storage unit in the storage medium stores data of at least two bits, which may be NAND flash memory or NOR flash memory. Selection, which is not specifically limited here.
  • the first-level table of the read voltage management table includes an optimal voltage subscript table
  • the second-level table of the read voltage management table includes a voltage look-up table
  • the device for reading the storage medium includes a controller in the UFS device.
  • UFS devices often use NAND flash memory as a storage medium.
  • the device 500 for reading a storage medium can perform the operations performed by the controller in the foregoing embodiments shown in FIG. 1 to FIG. 4 , and details are not repeated here.
  • the controller 600 may include one or more processors (central processing units, CPU) 601 and a memory 602, and the memory 602 stores There is one or more applications or data.
  • processors central processing units, CPU
  • memory 602 stores There is one or more applications or data.
  • the memory 602 may be volatile storage or persistent storage.
  • the program stored in memory 602 may include one or more modules, each module may include a series of instructions to operate on the server.
  • the processor 601 may be arranged 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 ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM, etc.
  • one or more operating systems such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM, etc.
  • the memory 602 is used to store a read voltage management table, where the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the read voltage index and the read voltage under different page types. At least one page type in the multiple page types corresponds to multiple read voltages, and each management area in the multiple management areas is a physical space in the storage medium corresponding to at least one physical address.
  • Processor 601 for:
  • the read command received through the host-side interface 603 is parsed to obtain the target physical address corresponding to the read command. Then, based on the target physical address, the management area and target page type respectively corresponding to the target physical address are determined. After that, based on the management area and the target page type, the first read voltage index is obtained from the read voltage management table. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table. Finally, according to the first read voltage, a read command is issued to the storage medium through the storage medium side interface 604 to read data from the storage medium.
  • the read voltage management table has a two-level table structure, wherein the first level table of the read voltage management table stores the correspondence between a plurality of management regions and a plurality of page types and the read voltage index
  • the second level table of the read voltage management table stores the corresponding relationship between the read voltage index and the read voltages under multiple page types, and at least one page type in the multiple page types corresponds to multiple read voltages.
  • the processor 601 is further configured to:
  • the first read recovery voltage is obtained. Then, according to the relationship between the first read recovery voltage and the read voltage stored in the second level table, the second read recovery voltage is determined. Finally, according to the second read recovery voltage, the read voltage management table to be updated is updated to obtain the read voltage management table.
  • the processor 601 is configured to:
  • the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage
  • the page type corresponding to the second read voltage is the same.
  • the second read recovery voltage is determined to be the first recovery read voltage.
  • the second-level table further includes a page type count, where the page type count is used to indicate the number of times the read voltage of the page type corresponding to a certain physical address is hit.
  • the processor 601 is configured to update the page type count corresponding to the second read voltage in the to-be-updated second-level table to obtain the second-level table when it is determined that the second read recovery voltage is the second read voltage.
  • the processor 601 may also be configured to determine the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second level table. Then, in the table of the first level to be updated, the index value of the first read voltage is updated to the label of the first row to obtain the table of the first level.
  • the second level table further includes a page type count
  • the processor 601 is configured to, if it is determined that the second read recovery voltage is the first recovery read voltage, determine the first page type count in the second level table to be updated, where the first page type count corresponds to the target page type. The smallest value in the count of page types. The third read voltage is then updated to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count. The processor is also used to update the value of the first page type count.
  • the processor 601 is further configured to:
  • the second row label corresponding to the first page type count is determined, wherein the second row label is the row label of the first page type count in the second-level table.
  • a second read voltage index is determined, wherein the value of the second read voltage index is the second row label, and the page type corresponding to the second read voltage index is the target page type.
  • the value of the second read voltage index is updated to a preset value, and the first read voltage index value is updated to the second row label.
  • the multiple management areas are pre-divided according to the management granularity of the storage medium.
  • the management granularity includes pages of the storage medium or blocks of the storage medium.
  • each storage unit in the storage medium stores data of at least two bits, which may be NAND flash memory or NOR flash memory. Selection, which is not specifically limited here.
  • the first-level table of the read voltage management table includes an optimal voltage subscript table
  • the second-level table of the read voltage management table includes a voltage look-up table
  • the device for reading the storage medium includes a controller in the UFS device.
  • UFS devices often use NAND flash memory as a storage medium.
  • FIG. 7 is a schematic structural diagram of the storage system 700 in an embodiment of the present application.
  • Storage system 700 including:
  • the controller 701 can perform the operations performed by the controller in the embodiments shown in FIG. 1 to FIG. 4, the operations performed by the device for reading the storage medium in the embodiment shown in FIG. 5, or the implementation shown in FIG. 6. The operations performed by the processor in the example will not be repeated here.
  • Each storage unit in the storage medium 702 stores at least two bits of data.
  • the storage medium 702 includes NOR flash memory or NAND flash memory, and the NAND flash memory includes MLC, TLC or QLC.
  • the storage system may be a storage system using the UFS storage specification.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Read Only Memory (AREA)

Abstract

A method for reading a storage medium, and a related device. A plurality of physical addresses under the same management region and of the same page type in a read voltage management table have the same read voltage index, and read voltages corresponding to at least one read voltage index are a plurality of read voltages corresponding to the same page type, such that memory resources can be saved. The method of the embodiments of the present application comprises: a controller determining, according to a first read voltage index corresponding to a physical address, a first read voltage corresponding to the first read voltage index, and performing a read operation on a storage medium according to the first read voltage. The read voltage management table stores correlations between read voltage indexes and a plurality of management regions and between the read voltage indexes and a plurality of page types, and correlations between the read voltage indexes and read voltages under different page types.

Description

一种存储介质的读取方法以及相关设备A method for reading a storage medium 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 related devices.
背景技术Background technique
存储介质是存储数据的载体,能够记录数据信息,并且可以在一段时间内保存数据信息。目前常常使用到的存储介质包括记忆棒、智能媒体(smart media,SM)卡、软盘、硬盘、光盘等。在需要使用存储介质中的数据时,需要根据合适的读电压对存储介质进行读操作,从而得到想要使用的数据。A storage medium is a carrier for storing data, can record data information, and can save data information for a period of time. Currently, commonly used storage media include memory sticks, smart media (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 an appropriate read voltage, so as to obtain the data to be used.
一种存储介质的读取方法是在控制器的读电压管理表(read voltage management table,RVMT)中存储每个物理地址的最优读电压,在读取不同物理地址的数据时,控制器需要选取不同物理地址对应的读电压进行读操作。A method of reading a storage medium is to store the optimal read voltage of each physical address in the read voltage management table (RVMT) of the controller. When reading data of different physical addresses, the controller needs to Select read voltages corresponding to different physical addresses to perform read operations.
该方法中的读电压管理表存储的是每个物理地址的读电压,所需要的存储空间较大,占用的内存资源较高。The read voltage management table in the method stores the read voltage of each physical address, which requires a large storage space and occupies a high memory resource.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种存储介质的读取方法以及相关设备,通过在读电压管理表中存储了多个管理区域和多个页类型与读电压索引的对应关系,以及读电压索引与多个页类型下的读电压的对应关系,其中,多个页类型中的至少一个页类型对应多个读电压,从而降低读电压管理表使用的内存资源。Embodiments of the present application provide a method for reading a storage medium and related equipment. By storing the correspondence between multiple management regions and multiple page types and read voltage indexes in a read voltage management table, as well as the relationship between the read voltage index and multiple Corresponding relationship between read voltages under page types, wherein at least one page type among multiple page types corresponds to multiple read voltages, thereby reducing memory resources used by the read voltage management table.
本申请实施例第一方面提供了存储介质的读取方法,包括:A first aspect of the embodiments of the present application provides a method for reading a storage medium, including:
根据内存资源的使用情况,选择合适的管理粒度对存储介质进行划分,使得同一个管理区域和同一个页类型共同对应的物理地址,在读电压管理表中对应的读电压索引相同,可以使用相同的读电压进行数据的读取。其中,一个管理区域表示的是存储介质中对应于至少一个物理地址的物理空间。According to the usage of memory resources, select the appropriate management granularity to divide the storage medium, so that the physical addresses corresponding to the same management area and the same page type are the same in the read voltage management table, and the corresponding read voltage indexes can be used. The read voltage is used to read data. Wherein, one management area represents a physical space corresponding to at least one physical address in the storage medium.
控制器通过主机侧接口,接收到主机下发的读命令后,可以解析该读命令,获取到读命令对应的目标物理地址。之后,控制器可以确定出分别与目标物理地址对应的管理区域和目标页类型。After receiving the read command sent by the host through the host-side interface, the controller can parse the read command and obtain the target physical address corresponding to the read command. After that, the controller can determine the management area and the target page type corresponding to the target physical address, respectively.
存储介质的物理地址可以根据物理地址对应的代号确定,这些代号包括颗粒(die)、平面(plane)、区块(block)和页(page),例如,一个物理地址可以表示为(die0,plane1,block1,page20),其含义是这个物理地址是0号颗粒1号平面下,1号区块中的20号页的物理地址。常见的,一个颗粒会有两个平面,每个平面中有1000到2000个区块,存储系统中有多个颗粒,会根据存储系统的存储容量决定,具体此处不做限定。The physical address of the storage medium can be determined according to the codes corresponding to the physical addresses. These codes include die, plane, block and page. For example, a physical address can be represented as (die0, plane1) , block1, page20), which means that the physical address is the physical address of the 20th page in the 1st block under the 1st plane of the 0th particle. Commonly, a particle has two planes, each plane has 1000 to 2000 blocks, and there are multiple particles in the storage system, which will be determined according to the storage capacity of the storage system, which is not limited here.
控制器确定目标页类型的主要依据是页代号,页代号与页类型的映射关系根据存储介质的性能确定。控制器确定目标地址对应的管理区域的方式,与管理区域的管理粒度有关。不同的管理粒度,确定管理区域所依据的代号也不相同,若按照单区块为单位划分管理区 域,那么区块代号相同的物理地址对应的管理区域相同。The main basis for the controller to determine the target page type is the page code, and the mapping relationship between the page code and the page type is determined according to the performance of the storage medium. The manner in which the controller determines the management area corresponding to the target address is related to the management granularity of the management area. Different management granularity, the code based on which the management area is determined is also different. If the management area is divided according to the unit of a single block, then the physical address corresponding to the same block code is the same management area.
然后控制器可以根据目标物理地址对应的管理区域和目标页类型,在控制器本地存储的读电压管理表中,确定出第一读电压索引,以及第一读电压索引对应的第一读电压。最后,控制器根据第一读电压,执行主机下发的读命令,从存储介质中读取数据。Then, the controller can determine the first read voltage index and the first read voltage corresponding to the first read voltage index in the read voltage management table stored locally by the controller according to the management area corresponding to the target physical address and the target page type. Finally, the controller executes the read command issued by the host according to the first read voltage to read data from the storage medium.
其中,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系。多个页类型中的至少一个页类型对应的读电压是多个,因此,第一读电压索引对应的读电压可能是一个也可能是多个。The read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types. There are multiple read voltages corresponding to at least one page type among the multiple page types. Therefore, the first read voltage index may correspond to one read voltage or multiple read voltages.
此外,读电压管理表存储的读电压所对应的读电压索引的数量并不唯一,第二级表中同一个页类型对应的至少一个读电压,可以对应于一个读电压索引,也可以对应于多个读电压索引,以使得读电压管理表中存储的读电压能够对存储介质的所有物理地址进行读操作。In addition, the number of 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 may correspond to A plurality of read voltage indexes, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium.
本申请实施例中,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系,存在至少一个读电压索引对应的读电压是同一个页类型对应的多个读电压,使得读电压管理表中存储的读电压能够对存储介质的所有物理地址进行读操作,从而降低了读电压管理表占用的内存资源。In the embodiment of the present application, the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types. , the read voltage corresponding to at least one read voltage index is multiple read voltages corresponding to the same page type, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the read voltage. Manage the memory resources occupied by the table.
结合第一方面,本申请实施例第一方面的第一种实现方式中,读电压管理表使用了二级表结构,在读电压管理表的第一级表中存储读电压索引分别与多个管理区域和多个页类型之间的对应关系,在读电压管理表的第二级表中存储读电压索引与不同页类型下的读电压之间的对应关系。其中,读电压管理表的多个页类型中,至少有一个页类型对应于多个读电压。In combination with the first aspect, in the first implementation manner of the first aspect of the embodiments of the present application, the read voltage management table uses a two-level table structure, and the read voltage index is stored in the first-level table of the read voltage management table with a plurality of management The correspondence between the area and a plurality of page types is stored in the second-level table of the read voltage management table, and the correspondence between the read voltage index and the read voltage under different page types is stored. Among the multiple page types in the read voltage management table, at least one page type corresponds to multiple read voltages.
结合第一方面或第一方面的第一种实现方式,本申请实施例第一方面的第二种实现方式中,如果控制器根据第一读电压从存储介质中读取数据失败,说明发生了读恢复的情况,读电压管理表中现存的读电压不再适用于当前的情况,控制器需要对读电压管理表进行更新。控制器可以使用如下的方式更新读电压管理表:In combination with the first aspect or the first implementation manner of the first aspect, in the second implementation manner of the first aspect of the embodiments of the present application, if the controller fails to read data from the storage medium according to the first read voltage, it means that an error has occurred. In the case of read recovery, the existing read voltage in the read voltage management table is no longer applicable to the current situation, and the controller needs to update the read voltage management table. The controller can update the read voltage management table in the following ways:
首先,控制器可以获取到第一读恢复电压,第一读恢复电压即为读恢复成功时使用的读电压。控制器获取第一读恢复电压的方式并不是本申请技术方案重点关注的内容,此处不进行详细介绍。然后,控制器可以根据第一读恢复电压和第二级表中存储的读电压之间的距离关系,确定出第二读恢复电压。最后根据确定出的第二读恢复电压对读电压管理表进行更新。First, the controller can obtain the first read recovery voltage, which is the read voltage used when the read recovery is successful. The manner in which the controller obtains the first-read recovery voltage is not the focus of the technical solution of the present application, and will not be introduced in detail here. Then, the controller may determine the second read recovery voltage according to the distance relationship between the first read recovery voltage and the read voltage stored in the second level table. Finally, the read voltage management table is updated according to the determined second read recovery voltage.
本申请实施例中,在发生读恢复的情况下,控制器可以对读电压管理表进行更新。存储介质发生读恢复的原因有多种情况,在读恢复的情况下更新读电压管理表中记录的读电压,使得读电压管理表的第二级表中存储较少的读电压就能够适应多种实际情况,提升了技术方案的灵活性。In this embodiment of the present application, in the case of read recovery, the controller may update the read voltage management table. There are many reasons for the read recovery of the storage medium. In the case of read recovery, the read voltage recorded in the read voltage management table is updated, so that the second level table of the read voltage management table stores less read voltages. The actual situation improves the flexibility of the technical solution.
结合第一方面的第二种实现方式,本申请实施例第一方面的第三种实现方式中,控制器可以根据第一读恢复电压和第二级表中存储的读电压之间的距离关系,确定出之后对发 生读恢复的物理地址进行读操作的第二读恢复电压。In combination with the second implementation manner of the first aspect, in the third implementation manner of the first aspect of the embodiments of the present application, the controller may, according to the distance relationship between the first read recovery voltage and the read voltage stored in the second level table, , and determine the second read recovery voltage for performing the read operation on the physical address where the read recovery occurs afterward.
若在第二级表中存在第二读电压,与第一读恢复电压之间的距离满足预设条件,那么控制器可以确定第二读电压即为第二读恢复电压,其中,第二读电压对应的页类型和第一读恢复电压对应的页类型相同。If there is a second read voltage in the second-level table, and the distance between the second read voltage and the first read recovery voltage satisfies the preset condition, the controller can determine that the second read voltage is the second read recovery voltage, where the second read voltage is the second read recovery voltage. The page type corresponding to the voltage is the same as the page type corresponding to the first read recovery voltage.
若第二级表中存储的每一行读电压,与第一读恢复电压之间的距离都不满足预设条件,说明读电压管理表中现存的读电压都不是对读命令对应的物理地址进行读操作的最优读电压,控制器可以把第二读恢复电压确定为第一读恢复电压。If the distance between each row of read voltages stored in the second-level table and the first read recovery voltage does not meet the preset condition, it means that none of the existing read voltages in the read voltage management table is used for the physical address corresponding to the read command. For the optimal read voltage of the read operation, the controller may determine the second read recovery voltage as the first read recovery voltage.
其中,第一读恢复电压,与第二级表中存储的读电压的距离满足预设条件,可以是第一读恢复电压和第二级表中存储的读电压之间的距离小于或等于预设门限值,预设门限值的大小根据实际应用所允许的误差范围进行确定。在实际的应用中,第二级表中可能出现多个满足预设条件的第二读电压,从中任选一个即可。选择的方式可以是控制器确定出的第一个满足预设条件的读电压,也可以是在满足预设条件的情况下和第一读恢复电压距离最近的读电压,可以根据实际应用的需要进行选择,具体此处不做限定。若使用控制器确定出的第一个满足预设条件的读电压为第二读恢复电压,则可以减少操作时间。若使用和第一读恢复电压距离最近的读电压,则可以减小误差范围。Wherein, the distance between the first read recovery voltage and the read voltage stored in the second-level table satisfies a preset condition, which may be that the distance between the first read recovery voltage and the read voltage stored in the second-level table is less than or equal to the preset condition. The threshold value is set, and the size of the preset threshold value is determined according to the allowable error range of the actual application. In practical applications, multiple second read voltages that meet the preset conditions may appear in the second-level table, and any one of them may be selected. The selection method can be the first read voltage determined by the controller that satisfies the preset conditions, or the read voltage that is closest to the first read recovery voltage when the preset conditions are met, and can be based on the needs of practical applications. Make a selection, which is not limited here. If the first read voltage that satisfies the preset condition determined by the controller is 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 range can be reduced.
本申请实施例中,控制器在第一读恢复电压和第二级表中存储的读电压的关系满足预设条件的情况下,可以确定第二级表中的某一行读电压即为第二读恢复电压,第二读恢复电压用于之后再对发生读恢复的物理地址进行读操作,在误差允许的范围内,使用第二级表中存有的读电压进行读操作,可以避免频繁地更新第二级表,简化处理过程,节约了运算资源。In the embodiment of the present application, the controller may determine that the read voltage of a row in the second-level table is the second read voltage when the relationship between the first read recovery voltage and the read voltage stored in the second-level table satisfies a preset condition Read recovery voltage, the second read recovery voltage is used to perform the read operation on the physical address where the read recovery occurs. Within the allowable error range, use the read voltage stored in the second-level table to perform the read operation, which can avoid frequent read operations. Updating the second-level table simplifies the processing process and saves computing resources.
结合第一方面的第三种实现方式,本申请实施例第一方面的第四种实现方式中,读电压管理表的第二级表中还包括页类型计数,页类型计数用于表示命中某一物理地址对应的页类型的读电压的次数。In combination with the third implementation manner of the first aspect, in the fourth implementation manner of the first aspect of the embodiments of the present application, the second-level table of the read voltage management table further includes a page type count, and the page type count is used to indicate that a certain target is hit. The number of times of reading the voltage of the page type corresponding to a physical address.
控制器可以根据第二读恢复电压的不同取值,使用不同的方式更新读电压管理表。The controller may update the read voltage management table in different ways according to different values of the second read recovery voltage.
在第二读恢复电压为第二读电压的情况下,控制器可以确定出第二读电压对应的页类型计数和第二读电压在第二级表中对应的第一行标号。然后控制器可以更新第二读电压对应的页类型计数,更新的方式可以是增加该页类型计数的取值,从而完成对第二级表的更新。When the second read recovery voltage is the second read voltage, the controller may determine the page type count corresponding to the second read voltage and the first row label corresponding to the second read voltage in the second level table. Then, the controller may update the page type count corresponding to the second read voltage, and the update method may be to increase the value of the page type count, thereby completing the update of the second-level table.
控制器还可以对读电压管理表中的第一级表进行更新,由于进行读操作的物理地址发生了读恢复,今后对该物理地址进行读操作所使用的读电压实际上是第二读电压,所以如果第一读电压索引的取值仍然使用之前的取值,可能会对应到不适合的读电压。因此,控制器需要更新第一读电压索引,将第一读电压索引的取值更新为第一行标号。The controller can also update the first-level table in the read voltage management table. Since the physical address of the read operation has read recovery, the read voltage used for the read operation of the physical address in the future is actually the second read voltage. , so if the value of the first read voltage index still uses the previous value, it may correspond to an unsuitable read voltage. Therefore, the controller needs to update the first read voltage index, and update the value of the first read voltage index to the first row label.
本申请实施例中,读电压管理标的第二级表中的读电压在发生读恢复仍然适用的情况下,控制器可以对第一读电压索引的取值进行更新,使得第一级表中的读电压索引始终可以对应于第二级表中合适的读电压,控制器可以使用最优读电压进行读操作,提高了本申请技术方案的可靠性。In the embodiment of the present application, in the case that the read voltage in the second-level table of the read voltage management target is still applicable after read recovery occurs, the controller may update the value of the first read voltage index, so that the value of the first-level table in the first-level table is updated. The read voltage index can always correspond to the appropriate read voltage in the second-level table, and the controller can use the optimal read voltage to perform the read operation, which improves the reliability of the technical solution of the present application.
结合第一方面的第三种实现方式,本申请实施例第一方面的第五种实现方式中,若第 二读恢复电压为第一读恢复电压,说明第二级表中存储的读电压都不是最优读电压,控制器会触发换入换出策略,对读电压管理表进行更新。In combination with the third implementation manner of the first aspect, in the fifth implementation manner of the first aspect of the embodiments of the present application, if the second read recovery voltage is the first read recovery voltage, it means that the read voltages stored in the second-level table are all If the read voltage is not optimal, the controller will trigger the swap-in and swap-out strategy to update the read voltage management table.
下面对控制器更新第二级表的过程进行说明:读电压管理表的第二级表中还包括页类型计数,控制器可以在发生读恢复的物理地址对应的目标页类型中,确定出页类型计数的取值最小的第一页类型计数。由于发生了读恢复,且更新前第二级表中存储的读电压均不满足预设条件,所以需要将第二级表中命中次数最少的读电压替换为第二读恢复电压,也就是将第一页类型计数对应的第三读电压替换为第二读恢复电压。The process of updating the second-level table by the controller is described below: the second-level table of the read voltage management table also includes the page type count, and the controller can determine the target page type corresponding to the physical address where the read recovery occurs. The first page type count with the smallest value of the page type count. Since read recovery occurs, and the read voltages stored in the second-level table before the update do not meet the preset conditions, it is necessary to replace the read voltage with the least hits in the second-level table with the second read recovery voltage, that is, replace The third read voltage corresponding to the first page type count is replaced with the second read recovery voltage.
由于第二读恢复电压此时才存入第二级表中,所以第一页类型计数不能再沿用之前的取值,需要重新开始累计,控制器还需要更新第一页类型计数的取值。更新后的第一页类型计数的取值表示的是使用了一次第二读恢复电压对存储介质进行了读操作。Since the second read recovery voltage is only stored in the second-level table at this time, the first page type count can no longer use the previous value, it needs to start accumulating again, and the controller also needs to update the value of the first page type count. The updated value of the first page type count indicates that the storage medium is read by using the second read recovery voltage once.
本申请实施例中,在触发换入换出策略的情况下,控制器可以把第二级表中命中次数最少的读电压更新为第二读恢复电压,使得读电压管理表中存储的读电压可以灵活适用于多种实际情况,提升了方案的灵活性。In the embodiment of the present application, when the swap-in and swap-out strategy is triggered, the controller can update the read voltage with the least hits in the second-level table to the second read recovery voltage, so that the read voltage stored in the read voltage management table It can be flexibly applied to a variety of practical situations, which improves the flexibility of the scheme.
结合第一方面的第五种实现方式,本申请实施例第一方面的第六种实现方式中,控制器还需要对第一级表进行更新。更新的过程如下:With reference to the fifth implementation manner of the first aspect, in the sixth implementation manner of the first aspect of the embodiments of the present application, the controller also needs to update the first-level table. The update process is as follows:
首先,在确定出第一页类型计数之后,控制器可以确定出第二级表中需要被替换的读电压所在的行标号,即第二行标号。由于第二级表中,第二行标号对应的读电压发生了变化,所以在待更新第一级表中,需要更新读电压索引和读电压的对应关系。具体来说,更新的方式是,先确定出读电压索引值为第二行标号的第二读电压索引,然后将第二读电压索引值更新为预设值。其中,第二读电压索引对应的页类型为目标页类型。由于读恢复导致第一读电压索引对应的读电压值发生了改变,因此,控制器还需要将第一读电压索引值更新为第二行标号。First, after determining the first page type count, the controller can determine the row number in the second-level table where the read voltage to be replaced is located, that is, the second row number. Since in the second-level table, the read voltage corresponding to the label in the second row has changed, the corresponding relationship between the read voltage index and the read voltage needs to be updated in the first-level table to be updated. Specifically, the update method is to first determine the read voltage index value of the second read voltage index of the second row number, and then update the second read voltage index value to a preset value. The page type corresponding to the second read voltage index is the target page type. Since the read voltage value corresponding to the first read voltage index is changed due to read recovery, the controller also needs to update the first read voltage index value to the second row label.
本申请实施例中,在发生读恢复且第二级表中存储的读电压都不满足预设条件的情况下,控制器可以对第一级表进行更新,使得第一级表中的读电压索引始终可以对应于第二级表中合适的读电压,控制器可以使用最优读电压进行读操作,提高了本申请技术方案的可靠性。In the embodiment of the present application, when read recovery occurs and the read voltages stored in the second-level table do not meet the preset conditions, the controller may update the first-level table, so that the read voltage in the first-level table The index can always correspond to the appropriate read voltage in the second-level table, and the controller can use the optimal read voltage to perform the read operation, which improves the reliability of the technical solution of the present application.
结合第一方面、第一方面的第一种至第六种实现方式中的任一种,本申请实施例第一方面的第七种实现方式中,可以预先对存储介质按照管理粒度进行管理区域的划分,管理粒度可以是存储介质的页,或者是存储介质的区块,根据内存资源的多少进行选择,具体此处不做限定。With reference to the first aspect and any one of the first to sixth implementation manners of the first aspect, in the seventh implementation manner of the first aspect of the embodiments of the present application, the storage medium may be managed in advance according to the management granularity. The management granularity can be a page of the storage medium or a block of the storage medium, which is selected according to the amount of memory resources, which is not specifically limited here.
在内存资源较为紧张的情况下,可以采用较为粗糙的管理粒度进行管理区域的划分,例如按照双区块或者三区块为单位进行划分,从而进一步减小读电压管理表占用的内存资源。在内存资源比较充足的情况下,可以使用比较精细的管理粒度进行管理区域的划分,例如按照单区块或者半区块为单位进行划分,从而使得操作结果更加准确。When the memory resources are relatively tight, a relatively rough management granularity can be used to divide the management area, for example, according to the unit of two blocks or three blocks, so as to further reduce the memory resources occupied by the reading voltage management table. In the case of sufficient memory resources, a finer management granularity can be used to divide the management area, such as a single block or half-block as a unit, so as to make the operation result more accurate.
本申请实施例中,存储介质的管理区域划分有多种选择方式,根据内存资源的占用情况进行确定,各有各的有益效果,提升了方案的灵活性。In the embodiment of the present application, there are various selection methods for the division of the management area of the storage medium, which are determined according to the occupation of memory resources, each of which has its own beneficial effects and improves the flexibility of the solution.
结合第一方面、第一方面的第一种至第七种实现方式中的任一种,本申请实施例第一 方面的第八种实现方式中,由于在存储介质的每个存储单元中,每个比特(bit)的数据共同对应的页类型相同,本申请实施例中涉及的存储介质需要至少两个页类型,而且至少有一个页类型对应至少两个读电压。With reference to the first aspect and any one of the first to seventh implementation manners of the first aspect, in the eighth implementation manner of the first aspect of the embodiments of the present application, since in each storage unit of the storage medium, The data of each bit (bit) corresponds to the same page type. The storage medium involved in the embodiments of the present application requires at least two page types, and at least one page type corresponds to at least two read voltages.
因此,本申请实施例提供的存储介质中的每个存储单元存储至少两个bit的数据,常见的具有该特点的存储介质包括NAND闪存或NOR闪存。Therefore, each storage unit in the storage medium provided by the embodiments of the present application stores at least two bits of data, and common storage media with this feature include NAND flash memory or NOR flash memory.
其中,NAND闪存包括多层单元(multi level cell,MLC)、三层单元(tripe level cell,TLC)或四层单元(quadratic level cell,QLC),具体此处不做限定。The NAND flash memory includes a multi-level cell (MLC), a triple-level cell (TLC), or a quadratic level cell (QLC), which is not specifically limited here.
本申请实施例中,存储介质包括NAND闪存或NOR闪存,可以应用到不用的场景中,提升了技术方案的可实现性。In the embodiment of the present application, the storage medium includes NAND flash memory or NOR flash memory, which can be applied to different scenarios, which improves the practicability of the technical solution.
结合第一方面、第一方面的第一种至第八种实现方式中的任一种,本申请实施例第一方面的第九种实现方式中,读电压管理表的第一级表包括最优电压下标表(best voltage index storage,BVIT)。With reference to the first aspect and any one of the first to eighth implementation manners of the first aspect, in the ninth implementation manner of the first aspect of the embodiments of the present application, the first level table for reading the voltage management table includes the most Best voltage index storage (BVIT).
结合第一方面、第一方面的第一种至第九种实现方式中的任一种,本申请实施例第一方面的第十种实现方式中,读电压管理表的第二级表包括电压查询表(voltage look up table,VLUT)。With reference to the first aspect and any one of the first to ninth implementation manners of the first aspect, in the tenth implementation manner of the first aspect of the embodiments of the present application, the second-level table for reading the voltage management table includes the voltage Lookup table (voltage look up table, VLUT).
本申请实施例中,读电压管理表的第一级表和第二级表可以是具体的最优电压下标表和电压查询表,提升了方案的可实现性。In the embodiment of the present application, the first-level table and the second-level table of the reading voltage management table may be specific optimal voltage subscript tables and voltage look-up tables, which improves the implementability of the solution.
结合第一方面、第一方面的第一种至第十种实现方式中的任一种,本申请实施例第一方面的第十一种实现方式中,控制器包括通用闪存存储(universal flash storage,UFS)器件中的控制器。其中,UFS器件常常使用NAND闪存作为存储介质。With reference to the first aspect and any one of the first to tenth implementation manners of the first aspect, in the eleventh implementation manner of the first aspect of the embodiments of the present application, the controller includes a universal flash storage (universal flash storage). , UFS) device controller. Among them, UFS devices often use NAND flash memory as a storage medium.
本申请实施例第二方面提供了一种存储控制器,包括:A second aspect of the embodiments of the present application provides a storage controller, including:
处理器,存储器,主机侧接口和存储介质侧接口。Processor, memory, host side interface and storage medium side interface.
存储器,用于存储读电压管理表,其中,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系,多个页类型中的至少一个页类型对应多个读电压,多个管理区域中的每个管理区域为存储介质中对应于至少一个物理地址物理空间。The memory is used to store the read voltage management table, wherein the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the read voltage index and the read voltage under different page types. The corresponding relationship between the voltages, at least one page type in the multiple page types corresponds to multiple read voltages, and each management area in the multiple management areas is a physical space in the storage medium corresponding to at least one physical address.
处理器用于:The processor is used to:
解析通过主机侧接口接收的读命令,得到读命令对应的目标物理地址。然后基于目标物理地址,确定分别与目标物理地址对应的管理区域和目标页类型。之后,基于该管理区域和目标页类型,从控制器本地存储的读电压管理表中获取第一读电压索引。再根据第一读电压索引,从读电压管理表中获取第一读电压索引对应的第一读电压。最后根据第一读电压,通过存储介质侧接口向存储介质下发读命令,从存储介质中读取数据。Parse the read command received through the host-side interface to obtain the target physical address corresponding to the read command. Then, based on the target physical address, the management area and the target page type respectively corresponding to the target physical address are determined. After that, based on the management area and the target page type, the first read voltage index is obtained from the read voltage management table stored locally by the controller. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table. Finally, according to the first read voltage, a read command is issued to the storage medium through the storage medium side interface, and data is read from the storage medium.
本方面所示的有益效果,与第一方面的有益效果相似,详见第一方面所示,此处不再赘述。The beneficial effects shown in this aspect are similar to the beneficial effects of the first aspect, which are shown in the first aspect for details, and will not be repeated here.
结合第二方面,第二方面的第一种实现方式中,读电压管理表为二级表结构,其中,读电压管理表的第一级表存储读电压索引分别与多个管理区域和多个页类型之间的对应关系,读电压管理表的第二级表存储读电压索引与不同页类型下的读电压之间的对应关系, 多个页类型中的至少一个页类型对应多个读电压。In combination with the second aspect, in the first implementation manner of the second aspect, the read voltage management table has a two-level table structure, wherein the first-level table of the read voltage management table stores the read voltage index with a plurality of management regions and a plurality of Corresponding relationship between page types, the second level table of the read voltage management table stores the corresponding relationship between read voltage indexes and read voltages under different page types, and at least one page type among multiple page types corresponds to multiple read voltages .
结合第二方面或第二方面的第一种实现方式,第二方面的第二种实现方式中,处理器还用于:With reference to the second aspect or the first implementation manner of the second aspect, in the second implementation manner of the second aspect, the processor is further configured to:
若根据第一读电压,从存储介质中读取数据失败,则获取第一读恢复电压。然后根据第一读恢复电压,和第二级表中存储的读电压的关系,确定第二读恢复电压。最后根据第二读恢复电压,更新待更新读电压管理表,得到读电压管理表。If reading data from the storage medium fails according to the first read voltage, the first read recovery voltage is obtained. Then, according to the relationship between the first read recovery voltage and the read voltage stored in the second level table, the second read recovery voltage is determined. Finally, according to the second read recovery voltage, the read voltage management table to be updated is updated to obtain the read voltage management table.
结合第二方面的第二种实现方式,第二方面的第三种实现方式中,处理器用于:In combination with the second implementation manner of the second aspect, in the third implementation manner of the second aspect, the processor is used for:
若第一读恢复电压,和第二级表中存储的第二读电压的距离满足预设条件,则确定第二恢复读电压为第二读电压,其中,第一读恢复电压对应的页类型和第二读电压对应的页类型相同。If the distance between the first read recovery voltage and the second read voltage stored in the second-level table satisfies the preset condition, the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage The page type corresponding to the second read voltage is the same.
若第一读恢复电压,和第二级表中存储的任一行读电压的距离均不满足预设条件,则确定第二读恢复电压为第一恢复读电压。If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, the second read recovery voltage is determined to be the first recovery read voltage.
结合第二方面的第三种实现方式,第二方面的第四种实现方式中,第二级表还包括页类型计数,页类型计数用于表示命中某一物理地址对应的页类型的读电压的次数。In combination with the third implementation manner of the second aspect, in the fourth implementation manner of the second aspect, the second-level table further includes a page type count, and the page type count is used to indicate a read voltage that hits a page type corresponding to a certain physical address number of times.
处理器用于在确定第二读恢复电压为第二读电压的情况下,在待更新第二级表中,更新第二读电压对应的页类型计数,得到第二级表。The processor is configured to update the page type count corresponding to the second read voltage in the to-be-updated second-level table when it is determined that the second read recovery voltage is the second read voltage, to obtain the second-level table.
处理器还可以用于确定第二读电压对应的第一行标号,其中,第一行标号为第二读电压在第二级表中的行标号。然后在待更新第一级表中,将第一读电压索引值更新为第一行标号,得到第一级表。The processor may also be configured to determine the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second-level table. Then, in the table of the first level to be updated, the index value of the first read voltage is updated to the label of the first row to obtain the table of the first level.
结合第二方面的第三种实现方式,第二方面的第五种实现方式中,第二级表还包括页类型计数;With reference to the third implementation manner of the second aspect, in the fifth implementation manner of the second aspect, the second-level table further includes a page type count;
处理器用于:The processor is used to:
若确定第二读恢复电压为第一恢复读电压,则在待更新第二级表中,确定出第一页类型计数,其中,第一页类型计数在目标页类型对应的页类型计数中取值最小。然后将第三读电压更新为第二读恢复电压,其中,第三读电压对应于第一页类型计数。处理器还用于更新第一页类型计数的取值。If it is determined that the second read recovery voltage is the first recovery read voltage, the first page type count is determined in the second level table to be updated, where the first page type count is taken from the page type count corresponding to the target page type minimum value. The third read voltage is then updated to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count. The processor is also used to update the value of the first page type count.
结合第二方面的第五种实现方式,第二方面的第六种实现方式中,处理器还用于:In combination with the fifth implementation manner of the second aspect, in the sixth implementation manner of the second aspect, the processor is further configured to:
确定第一页类型计数对应的第二行标号,其中,第二行标号为第一页类型计数在第二级表中的行标号。然后在待更新第一级表中,确定第二读电压索引,其中,第二读电压索引的取值为第二行标号,且第二读电压索引对应的页类型为目标页类型。最后,将第二读电压索引的取值更新为预设值,将第一读电压索引值更新为第二行标号。The second row label corresponding to the first page type count is determined, wherein the second row label is the row label of the first page type count in the second-level table. Then, in the first-level table to be updated, a second read voltage index is determined, wherein the value of the second read voltage index is the second row label, and the page type corresponding to the second read voltage index is the target page type. Finally, the value of the second read voltage index is updated to a preset value, and the first read voltage index value is updated to the second row label.
结合第二方面、第二方面的第一种至第六种实现方式中的任一种,本申请实施例第二方面的第七种实现方式中,多个管理区域是根据存储介质的管理粒度预先划分的。其中,管理粒度包括存储介质的页,或存储介质的区块。With reference to the second aspect and any one of the first to sixth implementation manners of the second aspect, in the seventh implementation manner of the second aspect of the embodiments of the present application, the multiple management areas are based on the management granularity of the storage medium. pre-divided. The management granularity includes pages of the storage medium or blocks of the storage medium.
结合第二方面、第二方面的第一种至第七种实现方式中的任一种,本申请实施例第二方面的第八种实现方式中,由于在存储介质的每个存储单元中,每个bit的数据共同对应的页类型相同,本申请实施例中涉及的存储介质需要至少两个页类型,而且至少有一个页 类型对应至少两个读电压。With reference to the second aspect and any one of the first to seventh implementation manners of the second aspect, in the eighth implementation manner of the second aspect of the embodiments of the present application, since in each storage unit of the storage medium, The data of each bit corresponds to the same page type. The storage medium involved in the embodiments of the present application requires at least two page types, and at least one page type corresponds to at least two read voltages.
因此,本申请实施例提供的存储介质的每个存储单元存储至少两个bit的数据,常见的具有该特点的存储介质包括NOR闪存或NAND闪存。其中,NAND闪存包括MLC、TLC或QLC,具体此处不做限定。Therefore, each storage unit of the storage medium provided by the embodiments of the present application stores at least two bits of data, and common storage media with this feature include NOR flash memory or NAND flash memory. The NAND flash memory includes MLC, TLC or QLC, which is not specifically limited here.
结合第二方面、第二方面的第一种至第八种实现方式中的任一种,本申请实施例第二方面的第九种实现方式中,读电压管理表的第一级表包括最优电压下标表。With reference to the second aspect and any one of the first to eighth implementation manners of the second aspect, in the ninth implementation manner of the second aspect of the embodiments of the present application, the first level table of the read voltage management table includes the most Optimal voltage subscript table.
结合第二方面、第二方面的第一种至第九种实现方式中的任一种,本申请实施例第二方面的第十种实现方式中,读电压管理表的第二级表包括电压查询表。With reference to the second aspect and any one of the first to ninth implementation manners of the second aspect, in the tenth implementation manner of the second aspect of the embodiments of the present application, the second-level table for reading the voltage management table includes the voltage Inquiry form.
结合第二方面、第二方面的第一种至第十种实现方式中的任一种,本申请实施例第二方面的第十一种实现方式中,存储控制器包括UFS器件中的控制器。其中,UFS器件常常使用NAND闪存作为存储介质。With reference to the second aspect and any one of the first to tenth implementation manners of the second aspect, in the eleventh implementation manner of the second aspect of the embodiments of the present application, the storage controller includes the controller in the UFS device . Among them, UFS devices often use NAND flash memory as a storage medium.
本申请实施例第三方面提供了一种存储介质的读取装置,包括:A third aspect of the embodiments of the present application provides a device for reading a storage medium, including:
处理单元,用于解析读命令,获取读命令对应的目标物理地址。The processing unit is used to parse the read command and obtain the target physical address corresponding to the read command.
确定单元,用于基于目标物理地址,确定分别与目标物理地址对应的管理区域和目标页类型。其中,管理区域表示的是存储介质中对应于至少一个物理地址的物理空间。The determining unit is configured to determine, based on the target physical address, the management area and the target page type respectively corresponding to the target physical address. Wherein, the management area represents a physical space corresponding to at least one physical address in the storage medium.
获取单元,用于基于管理区域和目标页类型,从控制器本地存储的读电压管理表中获取第一读电压索引。然后根据第一读电压索引,从读电压管理表中获取第一读电压索引对应的第一读电压,其中,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与多个页类型下的读电压的对应关系,多个页类型中的至少一个页类型对应多个读电压。The obtaining unit is configured to obtain the first read voltage index from the read voltage management table stored locally by the controller based on the management area and the target page type. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table, wherein the read voltage management table stores the read voltage index and a plurality of management areas and a plurality of page types respectively. and the corresponding relationship between the read voltage index and the read voltages under multiple page types, and at least one page type in the multiple page types corresponds to multiple read voltages.
处理单元,还用于根据第一读电压,执行读命令,从存储介质中读取数据。The processing unit is further configured to execute a read command according to the first read voltage to read data from the storage medium.
本方面所示的有益效果,与第一方面的有益效果相似,详见第一方面所示,此处不再赘述。The beneficial effects shown in this aspect are similar to the beneficial effects of the first aspect, which are shown in the first aspect for details, and will not be repeated here.
结合第三方面,本申请实施例第三方面的第一种实现方式中,读电压管理表为二级表结构,其中,读电压管理表的第一级表存储读电压索引分别与多个管理区域和多个页类型之间的对应关系,读电压管理表的第二级表存储读电压索引与不同页类型下的读电压之间的对应关系。In combination with the third aspect, in the first implementation manner of the third aspect of the embodiments of the present application, the read voltage management table has a two-level table structure, wherein the first-level table of the read voltage management table stores the read voltage index and a plurality of management Correspondence between regions and a plurality of page types, the second level table of the read voltage management table stores the correspondence between read voltage indexes and read voltages under different page types.
结合第三方面或第三方面的第一种实现方式,本申请实施例第三方面的第二种实现方式中,存储介质的读取装置还包括更新单元。With reference to the third aspect or the first implementation manner of the third aspect, in the second implementation manner of the third aspect of the embodiments of the present application, the device for reading a storage medium further includes an update unit.
获取单元,还用于若根据第一读电压,从存储介质中读取数据失败,则获取第一读恢复电压。The obtaining unit is further configured to obtain the first read recovery voltage if reading data from the storage medium fails according to the first read voltage.
确定单元,还用于根据第一读恢复电压,和第二级表中存储的读电压的关系,确定第二读恢复电压。The determining unit is further configured to determine the second read recovery voltage according to the relationship between the first read recovery voltage and the read voltage stored in the second level table.
更新单元,还用于根据第二读恢复电压,更新待更新读电压管理表,得到读电压管理表。The updating unit is further configured to update 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 the third implementation manner of the third aspect of the embodiments of the present application, the determining unit is specifically used for:
若第一读恢复电压,和第二级表中存储的第二读电压的距离满足预设条件,则确定第二恢复读电压为第二读电压,其中,第一读恢复电压对应的页类型和第二读电压对应的页类型相同。If the distance between the first read recovery voltage and the second read voltage stored in the second-level table satisfies the preset condition, the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage The page type corresponding to the second read voltage is the same.
若第一读恢复电压,和第二级表中存储的任一行读电压的距离均不满足预设条件,则确定第二读恢复电压为第一恢复读电压。If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, the second read recovery voltage is determined to be the first recovery read voltage.
结合第三方面的第三种实现方式,本申请实施例第三方面的第四种实现方式中,第二级表还包括页类型计数,页类型计数用于表示命中某一物理地址对应的页类型的读电压的次数。In combination with the third implementation manner of the third aspect, in the fourth implementation manner of the third aspect of the embodiments of the present application, the second-level table further includes a page type count, and the page type count is used to indicate that a page corresponding to a certain physical address is hit. Type of read voltage times.
更新单元,用于若确定第二读恢复电压为第二读电压,则在待更新第二级表中,更新第二读电压对应的页类型计数,得到第二级表。The updating unit 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 can also be used to determine the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second level table. Then, in the table of the first level to be updated, the index value of the first read voltage is updated to the label of the first row to obtain the table of the first level.
结合第三方面的第三种实现方式,本申请实施例第三方面的第五种实现方式中,第二级表还包括页类型计数。With reference to the third implementation manner of the third aspect, in the fifth implementation manner of the third aspect of the embodiments of the present application, the second-level table further includes a page type count.
更新单元,用于若确定第二读恢复电压为第一恢复读电压,则在待更新第二级表中,确定出第一页类型计数,其中,第一页类型计数在目标页类型对应的页类型计数中取值最小。然后将第三读电压更新为第二读恢复电压,其中,第三读电压对应于第一页类型计数。更新单元还用于更新第一页类型计数的取值。The updating unit is configured to determine the 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, wherein the first page type count is in the corresponding target page type. The smallest value in the page type count. The third read voltage is then updated to the second read recovery voltage, where the third read voltage corresponds to the first page type count. The update unit is also used to update the value of the first page type count.
结合第三方面的第五种实现方式,本申请实施例第三方面的第六种实现方式中,确定单元,还用于:With reference to the fifth implementation manner of the third aspect, in the sixth implementation manner of the third aspect of the embodiments of the present application, the determining unit is further used for:
确定第一页类型计数对应的第二行标号,其中,第二行标号为第一页类型计数在第二级表中的行标号。然后在待更新第一级表中,确定页类型对应的第二读电压索引,其中,第二读电压索引值为第二行标号。A second row label corresponding to the first page type count is determined, wherein the second row label is the row label of the first page type count in the second-level table. Then, in the first level table to be updated, the second read voltage index corresponding to the page type is determined, wherein the second read voltage index value is the second row label.
更新单元,还用于将第二读电压索引的取值更新为预设值,将第一读电压索引值更新为第二行标号。The updating unit is further configured to update the value of the second read voltage index to a preset value, and update the first read voltage index value to the second row label.
结合第三方面、第三方面的第一种至第六种实现方式中的任一种,本申请实施例第三方面的第七种实现方式中,多个管理区域是根据存储介质的管理粒度预先划分的,管理粒度包括存储介质的页,或存储介质的区块。With reference to the third aspect and any one of the first to sixth implementation manners of the third aspect, in the seventh implementation manner of the third aspect of the embodiments of the present application, the multiple management areas are based on the management granularity of the storage medium. Pre-divided, the management granularity includes pages of the storage medium, or blocks of the storage medium.
结合第三方面、第三方面的第一种至第七种实现方式中的任一种,本申请实施例第三方面的第八种实现方式中,由于在存储介质的每个存储单元中,每个bit的数据共同对应的页类型相同,本申请实施例中涉及的存储介质需要至少两个页类型,而且至少有一个页类型对应至少两个读电压。With reference to the third aspect and any one of the first to seventh implementation manners of the third aspect, in the eighth implementation manner of the third aspect of the embodiments of the present application, since in each storage unit of the storage medium, The data of each bit corresponds to the same page type. The storage medium involved in the embodiments of the present application requires at least two page types, and at least one page type corresponds to at least two read voltages.
因此,本申请实施例提供的存储介质中的每个存储单元存储至少两个bit的数据,常见的具有该特点的存储介质包括NAND闪存或NOR闪存,NAND闪存包括MLC、TLC或QLC,具体此处不做限定。Therefore, each storage unit in the storage medium provided by the embodiments of the present application stores data of at least two bits. Common storage media with this feature include NAND flash memory or NOR flash memory, and NAND flash memory includes MLC, TLC, or QLC. Specifically, this There are no restrictions.
本申请实施例中,存储介质包括NAND闪存或NOR闪存,提升了技术方案的可实现性。In the embodiment of the present application, the storage medium includes NAND flash memory or NOR flash memory, which improves the practicability of the technical solution.
结合第三方面、第三方面的第一种至第八种实现方式中的任一种,本申请实施例第二方面的第九种实现方式中,读电压管理表的第一级表包括最优电压下标表。With reference to the third aspect and any one of the first to eighth implementation manners of the third aspect, in the ninth implementation manner of the second aspect of the embodiment of the present application, the first level table of the reading voltage management table includes the most Optimal voltage subscript table.
结合第三方面、第三方面的第一种至第九种实现方式中的任一种,本申请实施例第三方面的第十种实现方式中,读电压管理表的第二级表包括电压查询表。With reference to the third aspect and any one of the first to ninth implementation manners of the third aspect, in the tenth implementation manner of the third aspect of the embodiments of the present application, the second-level table for reading the voltage management table includes the voltage Inquiry form.
结合第三方面、第三方面的第一种至第十种实现方式中的任一种,本申请实施例第三方面的第十一种实现方式中,存储介质的读取装置包括UFS器件中的控制器。其中,UFS器件常常使用NAND闪存作为存储介质。With reference to the third aspect and any one of the first to tenth implementation manners of the third aspect, in the eleventh implementation manner of the third aspect of the embodiments of the present application, the device for reading the storage medium includes a UFS device. 's controller. Among them, UFS devices often use NAND flash memory as a storage medium.
本申请实施第四方面提供了一种存储系统,包括:A fourth aspect of the present application provides a storage system, including:
控制器和存储介质。其中,控制器包括第二方面的存储控制器。存储介质中的每个存储单元存储至少两个bit的数据。controller and storage medium. Wherein, the controller includes the storage controller of the second aspect. Each storage unit in the storage medium stores at least two bits of data.
结合第四方面,本申请实施例第四方面的第一种实现方式中,存储介质可以是NAND闪存或NOR闪存,NAND闪存包括MLC、TLC或QLC,具体此处不做限定。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 MLC, TLC or QLC, which is not specifically limited here.
结合第四方面,本申请实施第四方面的第一种实现方式中,该存储系统可以是使用UFS存储规范的存储系统。With reference to the fourth aspect, in a first implementation manner of implementing the fourth aspect of the present application, the storage system may be a storage system using the UFS storage specification.
本申请实施例第五方面提供了一种芯片系统,该芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以进行第一方面的方法。A fifth aspect of the embodiments of the present application provides a chip system, the chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected through a line, and the at least one processor is used for running a computer program or instruction to perform method of the first aspect.
其中,芯片系统中的通信接口可以为输入/输出接口、管脚或电路等。Wherein, the communication interface in the chip system may be an input/output interface, a pin or a circuit, or the like.
结合第五方面,本申请实施例第五方面的第一种实现方式中,本申请中上述描述的芯片系统还包括至少一个存储器,该至少一个存储器中存储有指令。该存储器可以为芯片系统内部的存储单元,例如,寄存器、缓存等,也可以是该芯片的存储单元(例如,只读存储器、随机存取存储器等)。With reference to the fifth aspect, in the first implementation manner of the fifth aspect of the embodiments of the present application, the chip system described above in the present application further includes at least one memory, and instructions are stored in the at least one memory. The memory may be a storage unit inside the chip system, such as a register, a cache, etc., or a storage unit of the chip (eg, a read-only memory, a random access memory, etc.).
本申请实施例第六方面提供了一种计算机可读存储介质,该计算机可读存储介质中保存有程序,当该计算机执行程序时,执行前述第一方面的方法。A sixth aspect of the embodiments of the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and when the computer executes the program, the method of the foregoing first aspect is performed.
本申请实施例第七方面提供了一种计算机程序产品,当该计算机程序产品在计算机上执行时,该计算机执行前述第一方面的方法。A seventh aspect of the embodiments of the present application provides a computer program product. When the computer program product is executed on a computer, the computer executes the method of the foregoing first aspect.
附图说明Description of drawings
图1为本申请实施例中存储介质读取方法的一个应用场景示意图;1 is a schematic diagram of an application scenario of a method for reading a storage medium in an embodiment of the present application;
图2为本申请实施例中存储介质读取方法的一个流程示意图;2 is a schematic flowchart of a method for reading a storage medium in an embodiment of the present application;
图3为本申请实施例中存储介质读取方法的另一个流程示意图;3 is another schematic flowchart of a method for reading a storage medium in an embodiment of the present application;
图4为本申请实施例中存储介质读取方法另一个流程示意图;4 is another schematic flowchart of a storage medium reading method in an embodiment of the present application;
图5为本申请实施例中存储介质读取装置的一个结构示意图;5 is a schematic structural diagram of a storage medium reading device in an embodiment of the present application;
图6为本申请实施例中读取数据的控制器的一个结构示意图;6 is a schematic structural diagram of a controller for reading data in an embodiment of the application;
图7为本申请实施例中存储系统的一个结构示意图。FIG. 7 is a schematic structural diagram of a storage system in an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了一种存储介质的读取方法以及相关设备,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系,其中,多个页类型中的至少一个页类型对应多个读电压,使得读电压管理表中存储的读电压能够对存储介质的所有物理地址进行读操作,从而降低了读电压管理表占用的内存资源。Embodiments of the present application provide a method for reading a storage medium and related equipment. The read voltage management table stores the correspondence between the read voltage index and multiple management regions and multiple page types, respectively, and the read voltage index and the corresponding relationship between the multiple page types. Correspondence between read voltages under different page types, wherein at least one page type in the multiple page types corresponds to multiple read voltages, so that the read voltages stored in the read voltage management table can perform all physical addresses of the storage medium. read operation, thereby reducing the memory resources occupied by the read voltage management table.
由于在存储介质的每个存储单元中,每个bit的数据共同对应的页类型相同,本申请实施例中涉及的存储介质需要至少两个页类型,而且至少有一个页类型对应至少两个读电压。因此,本申请实施例提供的存储介质是指每个存储单元存储至少两个bit数据的存储介质,包括NAND闪存、NOR闪存等,具体此处不做限定。Since in each storage unit of the storage medium, the data of each bit corresponds to the same page type, the storage medium involved in the embodiments of this application requires at least two page types, and at least one page type corresponds to at least two read Voltage. Therefore, the storage medium provided in this embodiment of the present application refers to a storage medium in which each storage unit stores at least two bits of data, including NAND flash memory, NOR flash memory, etc., which is not specifically limited here.
由于NAND闪存具有读写时延小、功耗低等优点,在实际应用中有许多设备使用NAND闪存作为存储介质,常见的使用NAND闪存作为存储介质的器件包括UFS器件。UFS器件是指使用通用闪存存储规范的存储器件,其内部包括控制器和NAND闪存,通用闪存存储规范通过更加先进的串行信号,提高了传输频率,达到较高的传输带宽,因此,UFS器件的适用范围广泛。Because NAND flash memory has the advantages of low read and write latency and low power consumption, many devices use NAND flash memory as a storage medium in practical applications. Common devices that use NAND flash memory as a storage medium include UFS devices. UFS device refers to a storage device that uses the universal flash storage specification, which includes a controller and NAND flash memory. The universal flash storage specification increases the transmission frequency and achieves higher transmission bandwidth through more advanced serial signals. Therefore, UFS devices wide range of application.
综上,本申请实施例以使用NAND闪存的UFS器件为例,对本申请的技术方案进行详细的介绍。To sum up, the embodiments of the present application take a UFS device using a NAND flash memory as an example to introduce the technical solutions of the present application in detail.
首先,对本申请实施例中可能涉及到的相关概念进行说明:First, the related concepts that may be involved in the embodiments of the present application are described:
(1)读恢复。(1) Read recovery.
控制器在响应主机下发的读命令的情况下,会选取合适的读电压对NAND闪存进行读操作。但是NAND闪存常常会因为各种原因,使得控制器中记录的最优读电压不再能够成功地读取数据,在这种情况下,控制器会确定出一个能够成功读取数据的读电压,使用该读电压对NAND闪存进行读操作,并向主机返回操作结果,这个过程就是读恢复的过程。简单地说,读恢复的过程就是从读失败,到控制器通过一些方式成功读取数据的过程。其中,在读恢复中使用的读电压可以叫做读恢复电压、可纠电压或者偏移电压,本申请实施例使用读恢复电压的说法。In response to the read command issued by the host, the controller will select an appropriate read voltage to read the NAND flash memory. However, NAND flash memory often makes the optimal read voltage recorded in the controller can no longer successfully read data due to various reasons. In this case, the controller will determine a read voltage that can successfully read data. Use the read voltage to read the NAND flash memory and return the operation result to the host. This process is the process of read recovery. Simply put, the process of read recovery is the process from the failure of reading to the successful reading of data by the controller in some ways. The read voltage used in the read recovery may be called a read recovery voltage, a correctable voltage or an offset voltage, and the embodiment of the present application uses the term read recovery voltage.
控制器在读失败的情况下,确定读恢复电压的方式与控制器的具体设计有关,当前的主流产品常常使用的是动态估计读恢复电压的方式,读恢复电压常常是一个预先无法准确获知的值,具体确定读恢复电压的方式并不是本申请技术方案关注的地方,因此,本申请实施例不再详述。When the controller fails to read, the way to determine the read recovery voltage is related to the specific design of the controller. The current mainstream products often use the method of dynamically estimating the read recovery voltage. The read recovery voltage is often a value that cannot be accurately known in advance. , the specific method of determining the read recovery voltage is not the focus of the technical solution of the present application, and therefore, the embodiment of the present application will not be described in detail.
(2)擦除次数。(2) Erase times.
NAND闪存发生读恢复的原因有多种可能,擦除次数属于其中之一。随着NAND闪存擦除次数的增加,会使得隔离浮栅极电子的氧化层磨损,绝缘性变差,从而导致读取数据出错。There are many possible reasons for the read recovery of NAND flash memory, and the number of erasures is one of them. As the number of erasures of NAND flash memory increases, the oxide layer that isolates the floating gate electrons will wear out and the insulation will deteriorate, resulting in errors in reading data.
(3)数据保存时间(data retention)。(3) Data retention time (data retention).
数据保存时间也是导致NAND闪存发生读恢复的常见原因之一。随着时间的流逝,存储在闪存中的数据会逐渐消失,数据消失的原因是浮栅极中的电子逸出。其中,电子逸出浮栅极的速度与擦除次数成正比,也就是说,擦除次数越多,电子逸出的速度越快,也即数 据消失得越快。Data retention time is also one of the common causes of read recovery in NAND flash memory. The data stored in the flash memory gradually disappears over time, the reason for the disappearance of the data is the escape of electrons in the floating gate. Among them, the speed of electrons escaping the floating gate is proportional to the number of erasing, that is to say, the more the number of erasing, the faster the speed of electrons escaping, that is, the faster the data disappears.
(4)读取干扰(read disturb)。(4) read disturbance (read disturbance).
read disturb是指随着闪存读取次数的增加,会导致在同一区块中相近的存储单元的内容发生改变,会有电子不断进入浮栅极,使得该存储单元的数据状态发生变化。在这种情况下,如果依旧使用原来记录的读电压对NAND闪存进行读操作,就会出现读取失败的结果。Read disturb means that as the number of flash memory reads increases, the contents of similar memory cells in the same block will change, and electrons will continue to enter the floating gate, causing the data state of the memory cell to change. In this case, if the read operation of the NAND flash memory is still performed using the originally recorded read voltage, the result of read failure will occur.
(5)温变(cross temperature)。(5) temperature change (cross temperature).
NAND闪存所处环境的温度发生变化,也会影响数据状态。温变的情况可能是在温度差异较大的情况下分别并且连续地进行读操作和写操作,例如在55℃下进行读操作后,紧接着在25℃下进行写操作,并重复进行同样的读操作和写操作。也可能是在逐渐变化的温度下重复进行读操作,具体此处不做限定。Changes in the temperature of the environment in which the NAND flash memory is located will also affect the data state. In the case of temperature change, the read operation and the write operation may be carried out separately and continuously under the condition of large temperature difference, for example, the read operation at 55°C is followed by the write operation at 25°C, and the same operation is repeated. read and write operations. It is also possible to repeat the read operation under gradually changing temperature, which is not specifically limited here.
在实际应用中,NAND闪存发生读恢复的情况有多种可能,并不局限于上述几种原因。不同存储介质发生读恢复的原因也不尽相同,除了NAND闪存之外的存储介质发生读恢复的原因可以是其他的可能,此处不再赘述。In practical applications, there are many possibilities for the read recovery of the NAND flash memory, which are not limited to the above-mentioned reasons. The reasons for the read recovery of different storage media are also different. The reasons for the read recovery of the storage medium other than the NAND flash memory may be other possibilities, which will not be repeated here.
接下来,对本申请实施例的应用场景进行简单的介绍,请参阅图1,图1为本申请实施例提供的存储介质的读取方法的一个应用场景示意图。Next, the application scenarios of the embodiments of the present application are briefly introduced. Please refer to FIG. 1 . FIG. 1 is a schematic diagram of an application scenario of the storage medium reading method provided by the embodiments of the present application.
如图1所示,主机101、控制器102和NAND闪存103之间建立通信连接,用于进行数据的传输。主机101可以向控制器102下发读命令,控制器102在接收到读命令之后,对读命令进行解析,获取到确定需要进行读操作的目标物理地址。然后从控制器本地存储的读电压管理表中确定出分别与目标物理地址对应的管理区域和目标页类型,从而得到第一读电压索引,再从读电压管理表中确定出对目标物理地址进行读操作的第一读电压,最后向NAND闪存103下发读命令。NAND闪存103在收到读命令后,可以根据第一读电压进行读操作,然后将操作结果发送给控制器102。控制器102在收到操作结果后,可以向主机101发送该操作结果。其中,控制器102可以通过主机侧接口,接收主机下发的读命令。通常情况下,主机侧接口的接口类型是输入/输出(in/out,I/O)接口。控制器102是通过存储介质侧接口向存储介质下发读命令的,当存储介质是NAND闪存时,该存储介质侧接口是NAND Flash接口(NAND flash interface,NFI),NAND闪存可以通过I/O接口接收读命令。As shown in FIG. 1 , a communication connection is established between the host 101 , the controller 102 and the NAND flash memory 103 for data transmission. 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 and obtains the target physical address for which the read operation is determined to be performed. Then, the management area and target page type corresponding to the target physical address are determined from the read voltage management table stored locally by the controller, so as to obtain the first read voltage index, and then the target physical address is determined from the read voltage management table. The first read voltage of the read operation, and finally a read command is issued to the NAND flash memory 103 . After receiving the read command, the NAND flash memory 103 can perform a read operation according to the first read voltage, and then send the operation result to the controller 102 . After receiving the operation result, the controller 102 may send the operation result to the host 101 . The controller 102 may receive the read command sent 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 the storage medium side interface. When the storage medium is a NAND flash memory, the storage medium side interface is a NAND flash interface (NAND flash interface, NFI), and the NAND flash memory can pass the I/O The interface receives a read command.
需要注意的是,在实际应用中,控制器102和NAND闪存103也可以耦合在同一个存储系统中。It should be noted that, in practical applications, the controller 102 and the NAND flash memory 103 can also be coupled in the same storage system.
根据每个存储单元中存储的bit数据的多少,可以将NAND闪存分成不同的类型,包括单层单元(single level cell,SLC)、多层单元(multi level cell,MLC)、三层单元(tripe level cell,TLC)或四层单元(quadratic level cell,QLC)等。According to the amount of bit data stored in each memory cell, NAND flash memory can be divided into different types, including single-level cell (SLC), multi-level cell (MLC), triple-level cell (tripe level cell, TLC) or quadratic level cell (quadratic level cell, QLC), etc.
在本申请实施例中,使用的存储介质的每个存储单元存储至少两个bit数据,在下文的说明中,均以NAND闪存是TLC为例。TLC中的每个存储单元,存储有3bit的数据,对TLC进行读操作时,需要读取最低有效位(least significant bit,LSB)、中央有效位(central significant bit,CSB)和最高有效位(most significant bit,MSB)三种页 类型(page type),常需要用到多个读电压,读电压的个数与NAND闪存的配置有关,在一种可能的实现方式中,可以使用七个读电压完成读取的过程。其中,每个页类型对应的读电压有所不同,与NAND闪存的配置有关,LSB可以对应1个或者2个读电压,CSB可以对应2个或者3个读电压,MSB可以对应2个、3个或者4个读电压,具体此处不做限定,只要满足最多使用七个读电压便能区分出不同的页类型即可。In the embodiments of the present application, each storage unit of the used storage medium stores at least two bits of data, and in the following description, the NAND flash memory is TLC as an example. Each storage unit in the TLC stores 3-bit data. When reading the TLC, the least significant bit (LSB), the central significant bit (CSB) and the most significant bit ( Most significant bit, MSB) three page types (page types), often need to use multiple read voltages, the number of read voltages is related to the configuration of the NAND flash memory, in a possible implementation, seven read voltages can be used voltage to complete the reading process. Among them, the read voltage corresponding to each page type is different, which is related to the configuration of the NAND flash memory. The LSB can correspond to 1 or 2 read voltages, the CSB can correspond to 2 or 3 read voltages, and the MSB can correspond to 2, 3 There are one or four read voltages, which is not specifically limited here, as long as a maximum of seven read voltages can be used to distinguish different page types.
常见的TLC包括“1-2-4”型TLC、“1-3-3”型TLC或“2-3-3”型TLC,这三个数字分别表示读LSB、CSB、MSB需要的读电压的个数,以“1-2-4”型TLC为例,“1-2-4”型的含义是,LSB对应1个读电压,CSB对应2个读电压,MSB对应4个读电压。Common TLCs include "1-2-4" type TLC, "1-3-3" type TLC or "2-3-3" type TLC, these three numbers indicate the read voltage required to read LSB, CSB and MSB respectively Take "1-2-4" type TLC as an example, the meaning of "1-2-4" type is that LSB corresponds to 1 read voltage, CSB corresponds to 2 read voltages, and MSB corresponds to 4 read voltages.
在一种NAND闪存的读取方法中,需要在读电压管理表中存储每个物理地址的读电压,读电压管理表中的读电压只能对应于一个物理地址。下面以“1-2-4”型TLC为例说明该方法读取NAND闪存中的数据的过程。In a method for reading NAND flash memory, the read voltage of each physical address needs to be stored in the read voltage management table, and the read voltage in the read voltage management table can only correspond to one physical address. The process of reading data in the NAND flash memory by this method is described below by taking the "1-2-4" type TLC as an example.
通常情况下,一个存储介质的每个页类型的数量是相同的,因为在同一个管理区域中,每个页类型对应的是同一个存储单元的bit信息。若该“1-2-4”型TLC中有1536个物理地址,其中,有512个物理地址对应的页类型是LSB,512个物理地址对应的页类型是CSB,512个物理地址对应的页类型是MSB,若要对所有页类型是CSB的物理地址进行读操作,则需要在读电压管理表中存储1024个读电压。Usually, 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, among them, the page type corresponding to 512 physical addresses is LSB, the page type corresponding to 512 physical addresses is CSB, and the page corresponding to 512 physical addresses is The type is MSB. To perform a read operation on all physical addresses whose page type is CSB, 1024 read voltages need to be stored in the read voltage management table.
对于同样的情况,在本申请提供的技术方案中,可以对该“1-2-4”型TLC按照管理粒度进行划分,划分成若干个管理区域。其中,管理粒度的大小是根据内存资源的使用情况进行选择的,管理粒度可以是若干区块或若干页,可以是按照单区块或半区块(sub-block)为单位进行划分,也可以是按照单页或者双页(double page)为单位进行划分,根据实际应用的需要进行选择,具体此处不做限定。在内存资源较为紧张的情况下,可以按照双区块或者三区块为单位,进行管理区域的划分,使得划分出的管理区域数量较少,进一步减少第一级表占用的内存资源。在内存资源较为充足的情况下,可以按照单区块或者半区块为单位,进行管理区域的划分,减少读取数据的误差。For the same situation, in the technical solution provided by the present application, the "1-2-4" type TLC can be divided into several management areas according to the management granularity. Among them, the size of the management granularity is selected according to the usage of memory resources. The management granularity can be several blocks or several pages, which can be divided in units of single block or half block (sub-block), or can be It is divided according to the unit of single page or double page, and the selection is made according to the actual application needs, which is not limited here. When the memory resources are relatively tight, the management area can be divided in units of two blocks or three blocks, so that the number of divided management areas is small, and the memory resources occupied by the first-level table are further reduced. In the case of sufficient memory resources, the management area can be divided according to the unit of single block or half block, so as to reduce the error of reading data.
本申请实施例以按照双区块为单位进行管理区域的划分为例,进行简单的说明。The embodiment of the present application takes the division of the management area in units of two blocks as an example for simple description.
示例的,每个区块可以包括64个页,可以看作是64个物理地址,若将该“1-2-4”型TLC划分成4个管理区域(region),得到的第一级表可以包括表1所示的内容。Exemplarily, each block can include 64 pages, which can be regarded as 64 physical addresses. If the "1-2-4" type TLC is divided into 4 management regions (regions), the obtained first-level table The contents shown in Table 1 can be included.
表1Table 1
   LSBLSB CSBCSB MSBMSB
region0region0 index 0,0 index 0,0 index 0,1 index 0,1 index 0,2 index 0,2
region1region1 index 1,0 index 1,0 index 1,1 index 1,1 index 1,2 index 1,2
region2region2 index 2,0 index 2,0 index 2,1 index 2,1 index 2,2 index 2,2
region3region3 index 3,0 index 3,0 index 3,1 index 3,1 index 3,2 index 3,2
表1的横向表头指示的是页类型的类别,纵向表头指示的是不同的管理区域。根据表1可知,TLC的同一个管理区域中会有三个页类型,根据管理区域和页类型,能够确定出读电压索引。由于表1是按照双区块为单位进行管理区域划分后得到的结果,若该“1-2-4”型TLC中的512个对应于CSB的物理地址被均分成了4个管理区域,分别对应于index 0,1、 index 1,1、index 2,1和index 3,1,那么,每个读电压索引会对应128个物理地址。接下来,需要根据第二级表中存储的读电压,确定合适的读电压。 The horizontal headers of Table 1 indicate categories of page types, and the vertical headers indicate different management areas. According to Table 1, there are three page types in the same management area of the TLC, and the read voltage index can be determined according to the management area and the page type. Since Table 1 is the result obtained after the management area is divided in units of double blocks, if the 512 physical addresses corresponding to the CSB in the "1-2-4" type TLC are divided into 4 management areas, respectively Corresponding to index 0,1 , index 1,1 , index 2,1 and index 3,1 , then each read voltage index corresponds to 128 physical addresses. Next, the appropriate read voltage needs to be determined according to the read voltage stored in the second-level table.
第二级表可以包括表2所示的内容。The second level table may include the content shown in Table 2.
表2Table 2
Figure PCTCN2020127729-appb-000001
Figure PCTCN2020127729-appb-000001
若index 0,1的取值为0,index 1,1的取值为1,index 2,1的取值为2,index 3,1的取值为3,则分别对应表2行标号为0、1、2或3的读电压中页类型为CSB的读电压。若rB和rF是对应于CSB的读电压,那么可以确定出R n,3和R n,5为所要选取的读电压,其中,n为0至3的整数。以对index 0,1对应的物理地址进行读操作为例,控制器结合表1和表2所确定出的读电压即为R 0,1和R 0,5对应的读电压值。 If the value of index 0 , 1 is 0, the value of index 1 , 1 is 1, the value of index 2 , 1 is 2, and the value of index 3 , 1 is 3, then the corresponding row label of Table 2 is 0. , 1, 2 or 3 read voltages where the page type is CSB. If rB and rF are read voltages corresponding to CSB, then it can be determined that R n,3 and R n,5 are read voltages to be selected, where n is an integer from 0 to 3. Taking the read operation of the physical address corresponding to index 0,1 as an example, the read voltage determined by the controller in combination with Table 1 and Table 2 is the read voltage value corresponding to R 0,1 and R 0,5 .
结合表1和表2可知,在第二级表中存储8个读电压,便可以对512个物理地址完成读操作。Combining Table 1 and Table 2, it can be known that by storing 8 read voltages in the second-level table, the read operation can be completed for 512 physical addresses.
即使现有的方法中,同样对物理地址进行了划分,但是在每个管理区域存储的是7个读电压,而不是本申请技术方案中的根据页类型确定的读电压索引,相较于本申请实施例一级表占用的内存资源仍然较高。Even in the existing method, the physical addresses are also divided, but 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. The memory resources occupied by the first-level table in the application embodiment are still relatively high.
以将存储介质的物理地址划分为1000个管理区域为例,对于TLC而言,按照现有的管理方法,会在读电压管理表中存储1000×7=7000个读电压,而本申请技术方案的第一级表中存储的是1000×3=3000个读电压索引,每个读电压和每个读电压索引占用的内存资源是一样的,使用本申请实施例提供的第一级表可以节约57%的内存资源。对于QLC而言,因为读取QLC使用的读电压为15个,有4个页类型,所以可以节约更多的内存资源,大约为73%。Taking the physical address of the storage medium divided into 1000 management areas as an example, for TLC, according to the existing management method, 1000×7=7000 read voltages will be stored in the read voltage management table, and the technical solution of the present application The first-level table stores 1000×3=3000 read voltage indexes. The memory resources occupied by each read voltage and each read voltage index are the same. Using the first-level table provided by this embodiment of the present application can save 57 % of memory resources. For QLC, because the read voltage used for reading QLC is 15 and there are 4 page types, more memory resources can be saved, about 73%.
此外,本申请实施例提供的读电压管理表的第二级表中存储的读电压是根据实验确定的,适用范围广泛,本申请的技术方案还可以对第二级表中的读电压进行更新,使得第二级表中存储的读电压能够对存储介质的所有物理地址进行读操作。具体的更新方式会在下文进行阐述,本申请实施例中的第一级表常常为成百上千行,甚至更多,第二级表通常在32行或者64行以内,使得第二级表整体占用的资源远小于第一级表,因此本申请实施例的读电压管理表采用的二级表结构,能够节约内存资源。In addition, the read voltage stored in the second-level table of the read-voltage management table provided by the embodiment of the present application is determined according to experiments and has a wide range of applications. The technical solution of the present application can also update the read voltage in the second-level table. , so that the read voltage stored in the second-level table can perform read operations on all physical addresses of the storage medium. The specific update method will be described below. The first-level table in this embodiment of the present application often has hundreds or thousands of rows, or even more, and the second-level table is usually within 32 or 64 rows, so that the second-level table The overall resource occupied is much smaller than that of the first-level table. Therefore, the second-level table structure adopted by the read voltage management table in the embodiment of the present application can save memory resources.
下面对本申请实施例提供的存储介质的读取方法进行介绍,本申请实施例提供的存储介质的读取方法,可以应用于图1所示的场景中。由于UFS器件的使用环境复杂,NAND闪存常常会因为数据保存时间、读取干扰或者温变等原因,出现耦合现象,使得最优读电压发生变化,此时使用读电压管理表中的读电压进行读操作可能无法成功读取到数据。下面 分别对读成功和读失败的情况进行说明。The following describes the method for reading the storage medium provided by the embodiment of the present application. The method for reading the storage medium provided by the embodiment of the present application can be applied to the scenario shown in FIG. 1 . Due to the complex use environment of UFS devices, NAND flash memory often has a coupling phenomenon due to data storage time, read interference or temperature changes, etc., which makes the optimal read voltage change. At this time, use the read voltage in the read voltage management table to perform A read operation may fail to read data successfully. The following describes the success and failure of reading.
1、使用第一读电压读成功的情况:1. Use the first reading voltage to read successfully:
请参阅图2,图2为本申请实施例中存储介质读取方法的一个实施例,包括:Please refer to FIG. 2. FIG. 2 is an embodiment of a method for reading a storage medium in an embodiment of the present application, including:
201、控制器接收读命令。201. The controller receives a read command.
控制器可以和主机建立连接,通过主机侧接口接收到主机发送的读命令。控制器和主机建立的连接可以是无线连接,也可以是有线连接,根据实际应用的需要进行选择,具体此处不做限定。The controller can establish a connection with the host, and receive the 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, which is selected according to actual application needs, which is not specifically limited here.
202、控制器确定读命令对应的目标物理地址。202. The controller determines the target physical address corresponding to the read command.
控制器对NAND闪存进行读操作,并不是盲目地读所有的物理地址,而是根据主机下发的读命令中确定需要进行读操作的目标物理地址。控制器在接收到主机发送的读命令之后,可以对读命令进行解析,从而确定出该读命令对应的目标物理地址,也即是在NAND闪存中,此次所要读取的数据所对应的目标物理地址。When the controller reads the NAND flash memory, it does not blindly read all the physical addresses, but determines the target physical address that needs to be read according to the read command issued by the host. After the controller receives the read command sent by the host, it can parse the read command to determine the target physical address corresponding to the read command, that is, in the NAND flash memory, the target corresponding to the data to be read this time. physical address.
203、控制器确定第一读电压索引。203. The controller determines the first read voltage index.
控制器在确定读命令对应的第一物理地址后,可以根据目标物理地址对应的管理区域和目标物理地址对应的目标页类型,从控制器本地存储的读电压管理表中确定出第一读电压索引。After the controller determines the first physical address corresponding to the read command, it can determine the first read voltage from the read voltage management table stored locally by the controller according to the management area corresponding to the target physical address and the target page type corresponding to the target physical address. index.
下面对控制器确定目标物理地址对应的管理区域和目标物理地址对应的目标页类型的过程,进行简单说明。The process of determining the management area corresponding to the target physical address and the target page type corresponding to the target physical address by the controller is briefly described below.
存储介质的物理地址可以根据物理地址对应的代号确定,这些代号包括存储介质的颗粒、平面、区块和页的代号。示例的,一个物理地址可以表示为(die0,plane2,block3,page10),其含义是这个物理地址是0号颗粒的2号平面下3号区块中的10号页的物理地址。常见的,一个颗粒会有两个平面,每个平面中有1000到2000个区块,存储系统中有多个颗粒,会根据存储系统的存储容量决定,存储容量越大,颗粒数也越多,具体此处不做限定。The physical address of the storage medium can be determined according to the codes corresponding to the physical addresses, and the codes include the codes of particles, planes, blocks and pages of the storage medium. Exemplarily, a physical address may be represented as (die0, plane2, block3, page10), which means that the physical address is the physical address of page 10 in block 3 under plane 2 of particle 0. Commonly, a particle has two planes, and each plane has 1000 to 2000 blocks. There are multiple particles in the storage system, which will be determined according to the storage capacity of the storage system. The larger the storage capacity, the more particles. , which is not specifically limited here.
控制器确定目标页类型的主要依据是页代号,页代号与页类型的映射关系根据存储介质的性能确定。The main basis for the controller to determine the target page type is the page code, and the mapping relationship between the page code and the page type is determined according to the performance of the storage medium.
示例的,在TLC中,页代号与页类型的映射关系可以如表3所示:For example, in TLC, the mapping relationship between page code and page type can be as shown in Table 3:
表3table 3
页代号page code 页类型page type
page0至page20page0 to page20 LSBLSB
page21至page35page21 to page35 CSBCSB
page36至page64page36 to page64 MSBMSB
在配置NAND闪存时,可以根据存储系统的内存资源的使用情况,选择合适的管理粒度将NAND闪存划分为若干管理区域。每个管理区域中包含多个物理地址,可以将一个管理区域看作是一个存储有若干物理地址的物理空间。其中,管理粒度有多种选择,可以是单区块或者半区块,也可以是双区块或者三区块,根据实际应用的需要确定,具体此处不做限定。在内存资源较为紧张的情况下,可以按照双区块或者三区块为单位,进行管理区域的 划分,使得划分出的管理区域数量较少,进一步减少第一级表占用的内存资源。在内存资源较为充足的情况下,可以按照单区块或者半区块为单位,进行管理区域的划分,减少读取数据的误差。When configuring the NAND flash memory, according to the usage of the memory resources of the storage system, an appropriate management granularity can be selected to divide the NAND flash memory into several management areas. Each management area contains multiple physical addresses, and a management area can be regarded as a physical space that stores several physical addresses. Among them, there are various options for the management granularity, which can be a single block or a half block, or a double block or three blocks, which is determined according to the needs of practical applications, and is not specifically limited here. In the case of tight memory resources, the management area can be divided in units of two blocks or three blocks, so that the number of divided management areas is small, and the memory resources occupied by the first-level table are further reduced. In the case of sufficient memory resources, the management area can be divided according to the unit of single block or half block, so as to reduce the error of reading data.
管理区域与物理地址的对应关系与管理粒度有关,不同的管理粒度,确定管理区域所依据的代号也不同,示例的,若按照单区块为单位划分管理区域,管理区域与物理地址的映射关系可以如表4所示。示例的,若按照双区块为单位划分管理区域,管理区域与物理地址的映射关系可以如表5所示。The correspondence between the management area and the physical address is related to the management granularity. Different management granularities have different code names for determining the management area. For example, if the management area is divided according to a single block, the mapping relationship between the management area and the physical address can be shown in Table 4. For example, if the management area is divided according to the unit of two blocks, the mapping relationship between the management area and the physical address may be as shown in Table 5.
表4Table 4
代号code 管理区域management area
block0block0 region0region0
block1block1 region1region1
block2block2 region2region2
block3block3 region3region3
block4block4 region4region4
结合表3和表4可知,区块代号为block3,页代号为page2的物理地址,对应的管理区域是region3,对应的目标页类型是LSB。Combining with Table 3 and Table 4, it can be known that 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.
表5table 5
代号code 管理区域management area
block0、block1block0, block1 region0region0
block2、block3block2, block3 region1region1
block4、block5block4, block5 region2region2
block6、block7block6, block7 region3region3
block8、block9block8, block9 region4region4
在实际应用中,储存介质的区块数量与存储介质的性能和配置方式有关,较为常见的存储介质中会有1000个至2000个区块,本申请技术方案并不对存储介质中的区块数量进行限制。In practical applications, the number of blocks in a storage medium is related to the performance and configuration of the storage medium. A common storage medium has 1,000 to 2,000 blocks. The technical solution of the present application does not affect the number of blocks in the storage medium. limit.
结合表3和表5可知,区块代号为block3,页代号为page2的物理地址,对应的管理区域是region1,对应的目标页类型是LSB。Combining with Table 3 and Table 5, it can be known that the block code is block3, the page code is the physical address of page2, the corresponding management region is region1, and the corresponding target page type is LSB.
下面对控制器根据目标物理地址对应的管理区域和目标页类型,确定第一读电压索引的过程进行说明。The process of determining the first read voltage index by the controller according to the management area corresponding to the target physical address and the target page type will be described below.
第一读电压索引存储于读电压管理表的第一级表中。在读电压管理表的第一级表中,存储了多个管理区域和多个页类型与读电压索引的对应关系,每个读电压索引都有一个对应的页类型和一个对应的管理区域。一个管理区域中会有多个物理地址,一个页类型也会对应于多个物理地址,在读电压管理表的第一级表中,同一个管理区域和同一个页类型共同对应的多个物理地址,指向的是同一个读电压索引。The first read voltage index is stored in the first level table of the read voltage management table. In the first level table of the read voltage management table, a plurality of management areas and the correspondence between a plurality of page types and read voltage indexes are stored, and each read voltage index has a corresponding page type and a corresponding management area. There will be multiple physical addresses in a management area, and a page type will also correspond to multiple physical addresses. In the first-level table of the read voltage management table, the same management area and the same page type correspond to multiple physical addresses. , pointing to the same read voltage index.
本申请实施例以第一级表为最优电压下标表为例,最优电压下标表中存储的管理区域的个数与NAND闪存的管理粒度有关,该管理粒度可以是按照若干区块或若干页进行划分, 可以是按照单区块或半区块为单位进行划分,也可以是按照单页或者双页为单位进行划分,根据实际应用的需要进行选择,具体此处不做限定。The embodiment of the present application takes the first level table as the optimal voltage subscript table as an example. The number of management areas stored in the optimal voltage subscript table is related to the management granularity of the NAND flash memory, and the management granularity may be based on several blocks Or several pages are divided, which can be divided according to single block or half block, or divided according to single page or double page, which is selected according to actual application needs, which is not limited here.
管理粒度的确定还与内存资源的使用率有关,在内存资源较为紧张的情况下,可以采用较为粗糙的管理粒度进行管理区域的划分,例如按照双区块或者三区块为单位进行划分,从而进一步减少读电压管理表占用的内存资源。在内存资源比较充足的情况下,可以使用比较精细的管理粒度进行管理区域的划分,例如按照单区块或者半区块为单位进行划分,从而使得操作结果更加准确。The determination of the management granularity is also related to the utilization rate of memory resources. In the case of tight memory resources, a relatively rough management granularity can be used to divide the management area, for example, it is divided in units of two blocks or three blocks. Further reduce the memory resources occupied by reading the voltage management table. In the case of sufficient memory resources, a finer management granularity can be used to divide the management area, such as a single block or half-block as a unit, so as to make the operation result more accurate.
本申请实施例中,存储介质的管理区域划分有多种选择方式,根据内存资源的使用情况可以确定对管理区域进行划分的精细程度,提升了技术方案的灵活性。In the embodiment of the present application, there are various options for the division of the management area of the storage medium, and the degree of fineness of the division of the management area can be determined according to the usage of memory resources, which improves the flexibility of the technical solution.
示例的,最优电压下标表可以包括表6所示的内容:Illustratively, the optimal voltage subscript table may include the contents shown in Table 6:
表6Table 6
   LSBLSB CSBCSB MSBMSB
region0region0 index 0,0 index 0,0 index 0,1 index 0,1 index 0,2 index 0,2
region1region1 index 1,0 index 1,0 index 1,1 index 1,1 index 1,2 index 1,2
region2region2 index 2,0 index 2,0 index 2,1 index 2,1 index 2,2 index 2,2
如表6所示,读电压索引index 0,0对应的页类型是LSB,对应的管理区域是region0。 As shown in Table 6, the page type corresponding to the read voltage index 0,0 is LSB, and the corresponding management region is region0.
204、控制器确定第一读电压索引的取值是否为预设值,若是,则执行步骤205,若否,则执行步骤206。204. The controller determines whether the value of the first read voltage index is a preset value, and if so, executes step 205, and if not, executes step 206.
控制器在确定出第一读电压索引后,可以确定第一读电压索引的取值,根据第一读电压索引的取值和预设值之间的关系,确定出合适的读电压。After determining the first read voltage index, the controller may determine the value of the first read voltage index, and determine an appropriate read voltage according to the relationship between the value of the first read voltage index and the preset value.
示例的,读电压索引的取值可以如表7所示:As an example, the value of the read voltage index can be as shown in Table 7:
表7Table 7
读电压索引Read Voltage Index 取值value
index 0,0 index 0,0 00
index 0,1 index 0,1 11
index 0,2 index 0,2 22
index 1,0 index 1,0 6565
index 1,1 index 1,1 6565
index 2,0 index 2,0 -1-1
index 2,2 index 2,2 33
205、控制器使用缓存的读电压进行读操作。205. The controller uses the buffered read voltage to perform a read operation.
若第一读电压索引的取值和预设值相同,控制器可以确定使用缓存的读电压进行读操作。其中,预设值又可以称为哨兵值,可以由人工预先设置,预设值的具体数值有多种可能,可以是大于读电压管理表的第二级表中最大的行标号,也可以是小于读电压管理表的第二级表中最小的行标号,只要与二级表中的任意一个行标号的数值不同即可,具体此处不做限定。可选的,不同读电压索引对应的预设值可以相同,也可以不同,具体此处不做限定。If the value of the first read voltage index is the same as the preset value, the controller may determine to use the buffered read voltage to perform the read operation. Among them, the preset value can also be called the sentinel value, which can be preset manually. There are many possibilities for the specific value of the preset value. It can be larger than the largest row number in the second-level table of the reading voltage management table, or it can be The row number smaller than the smallest row number in the second-level table of the read voltage management table, as long as the value is different from any row number in the second-level table, which is not specifically limited here. Optionally, the preset values corresponding to different read voltage indexes may be the same or different, which are not specifically limited here.
需要注意的是,本申请实施例中缓存的读电压是缓存在颗粒die上的读电压,每个管理区域的每个页类型都有各自缓存的读电压,这些读电压可能相同,也可能不同,表示的是上一次对某一管理区域中某一页类型对应的物理地址进行读操作时使用的读电压。由于NAND闪存自身的性能特点,可以在die上缓存电压值,即使是首次进行读操作的情况下,die上也会缓存有电压值。It should be noted that the read voltage cached in the embodiment of the present application is the read voltage cached on the particle die, and each page type of each management area has its own cached read voltage, and these read voltages may be the same or different. , which indicates the read voltage used in the last read operation on the physical address corresponding to a certain page type in a certain management area. Due to the performance characteristics of the NAND flash memory, the voltage value can be cached on the die, and even when the read operation is performed for the first time, the voltage value will be cached on the die.
206、控制器确定第一读电压索引对应的第一读电压。206. The controller determines the first read voltage corresponding to the first read voltage index.
若第一读电压索引的取值和预设值不同,控制器可以确定第一读电压索引的取值,从第二级表中确定出第一读电压索引对应的第一读电压。本申请实施例以第二级表为电压查询表为例,示例的,电压查询表可以包括表8所示的内容:If the value of the first read voltage index is different from the preset value, the controller may determine the value of the first read voltage index, and determine the first read voltage corresponding to the first read voltage index from the second-level table. In this embodiment of the present application, the second-level table is a voltage look-up table as an example. By way of example, the voltage look-up table may include the contents shown in Table 8:
表8Table 8
Figure PCTCN2020127729-appb-000002
Figure PCTCN2020127729-appb-000002
如表8所示,rA至rG表示的是物理地址,每个页类型对应的物理地址有所不同,因此每个页类型对应的读电压也不同,与NAND闪存的配置有关,通常情况下,LSB可以对应1个或者2个读电压,CSB可以对应2个或者3个读电压,MSB可以对应2个、3个或者4个读电压,具体此处不做限定,根据实际使用的NAND闪存的配置确定,只要满足最多使用七个读电压便能区分出不同的页类型即可。As shown in Table 8, rA to rG represent physical addresses. The physical addresses corresponding to each page type are different, so the read voltage corresponding to each page type is also different, which is related to the configuration of the NAND flash memory. Usually, LSB can correspond to 1 or 2 read voltages, CSB can correspond to 2 or 3 read voltages, MSB can correspond to 2, 3 or 4 read voltages, there is no specific limitation here, according to the actual use of NAND flash memory The configuration is determined, as long as a maximum of seven read voltages can be used to distinguish different page types.
示例的,页类型与读电压的对应关系可以如表9所示:By way of example, the corresponding relationship between page type and read voltage can be shown in Table 9:
表9Table 9
页类型page type 读电压read voltage
LSBLSB rA、rErA, rE
CSBCSB rB、rD、rFrB, rD, rF
MSBMSB rC、rGrC, rG
结合表8和表9可知,R 0,0对应的页类型为LSB,对应的读电压为rA和rE。 Combining with Table 8 and Table 9, it can be known that the page type corresponding to R 0,0 is LSB, and the corresponding read voltages are rA and rE.
如表8所示,R 0,0至R 0,6表示的是行标号为1的读电压,读电压的初始取值可以根据NAND闪存性能和多次实验的测试结果确定。由于UFS器件的使用场景复杂,NAND闪存常常会因为数据保存时间、读取干扰或者温变等原因,出现耦合现象,使得最优读电压发生变化。因此,读电压查询表中可以存储多组读电压,并根据实际的应用情况进行更新。 As shown in Table 8, R 0,0 to R 0,6 represent the read voltage with row number 1, 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 complex usage scenarios of UFS devices, NAND flash memory often has a coupling phenomenon due to data retention time, read interference or temperature changes, which makes the optimal read voltage change. Therefore, multiple groups of read voltages can be stored in the read voltage look-up table and updated according to actual application conditions.
可选的,读电压查询表中可以存储32行读电压,也可以存储64行读电压,只要使得第二级表占用的内存资源远小于第一级表即可,具体此处不做限定。Optionally, the read voltage lookup table can store 32 rows of read voltages or 64 rows of read voltages, as long as the memory resources occupied by the second-level table are much smaller than those of the first-level table, which is not limited here.
如表9所示,页类型计数包括LSB计数、CSB计数和MSB计数,表示的是使用某一页类型对应的读电压的次数。示例的,结合表6和表7可知,N 0,1表示的是,使用R 0,0对应的读电压对NAND闪存进行读操作的次数。 As shown in Table 9, the page type count includes LSB count, CSB count and MSB count, which represent the number of times of using the read voltage corresponding to a certain page type. By way of example, it can be known from Table 6 and Table 7 that N 0,1 represents the number of read operations performed on the NAND flash memory using the read voltage corresponding to R 0,0 .
其中,页类型计数的初始值为0,若控制器使用某一页类型的对应的读电压,该页类型计数的取值会进行更新。更新的方式可以是使用一次,该取值就加1,也可以是使用一次,该取值就加10,根据实际应用的需要进行选择,只要使得每使用一次,页类型计数的取值增加的数值一致即可,具体此处不做限定。本申请实施例以使用读电压一次,该读电压对应的页类型计数取值就加1为例。The initial value of the page type count is 0. If the controller uses the corresponding read voltage of a certain page type, the value of the page type count will be updated. The update method can be used once, and the value is incremented by 1, or it can be used once, and the value is incremented by 10. The selection is made according to the needs of the actual application, as long as the value of the page type count increases every time it is used. It is sufficient that the values are the same, and there is no specific limitation here. In the embodiment of the present application, the read voltage is used once, and the page type count value corresponding to the read voltage is incremented by 1 as an example.
应理解,表3至表5、表7以及表9表达的是映射关系,并不意味着在实际应用中一定存在各自单独的表格。It should be understood that Table 3 to Table 5, Table 7 and Table 9 express the mapping relationship, which does not mean that there must be separate tables in practical applications.
控制器可以根据表6,确定出读命令的物理地址对应的读电压索引。然后根据表7,确定出读电压索引的取值。再根据表8和表9,确定出读电压索引对应的读电压。本申请实施例以第一读电压索引是index 0,0为例,结合表6至表9,控制器可以确定出index 0,0对应的是电压查询表中R 0,0和R 0,4所指示的读电压。 The controller may determine the read voltage index corresponding to the physical address of the read command according to Table 6. Then, according to Table 7, the value of the read voltage index is determined. Then, according to Table 8 and Table 9, the read voltage corresponding to the read voltage index is determined. In this embodiment of the present application, the first read voltage index is index 0,0 as an example, and with reference to Tables 6 to 9, the controller can determine that index 0,0 corresponds to R 0,0 and R 0,4 in the voltage lookup table the indicated read voltage.
207、控制器将第一读电压设置到die上。207. The controller sets the first read voltage on the die.
控制器在确定出第一读电压之后,可以将第一读电压设置在die上。After the controller determines the first read voltage, the controller may set the first read voltage on the die.
208、控制器更新读电压管理表。208. The controller updates the read voltage management table.
由于第一读电压存储在待更新的读电压管理表中,所以需要读电压管理表,更新方式可以是增加第一读电压对应的页类型计数。本申请实施例以第一读电压索引是index 0,0为例,结合表3至表6可知,index 0,0对应的页类型计数为N 0,1。若控制器使用index 0,0对应的读电压,在VLUT中N 0,1对应的取值就加1,从而完成读电压管理表的更新。 Since the first read voltage is stored in the read voltage management table to be updated, the voltage management table needs to be read, and the update method may be to increase the page type count corresponding to the first read voltage. In the embodiment of the present application, the first read voltage index is index 0,0 as an example, and it can be known from Tables 3 to 6 that the page type count corresponding to index 0,0 is N 0,1 . If the controller uses the read voltage corresponding to index 0 , 0, the value corresponding to N 0 , 1 in the VLUT is incremented by 1, thereby completing the update of the read voltage management table.
209、控制器根据第一读电压,读NAND闪存进行读操作。209. The controller reads the NAND flash memory to perform a read operation according to the first read voltage.
控制器在确定出第一读电压之后,可以使用第一读电压对NAND闪存进行读操作。After the controller determines the first read voltage, the controller may use the first read voltage to perform a read operation on the NAND flash memory.
需要注意的是,步骤207、步骤208和步骤209没有必然的先后顺序,在实际应用中,可以先执行步骤207,也可以先执行步骤208,还可以先执行步骤209,具体此处不做限定。It should be noted that step 207, step 208 and step 209 do not have a necessary order. In practical applications, step 207 can be executed first, step 208 can also be executed first, and step 209 can also be executed first, which is not limited here. .
210、控制器接收操作结果,并向主机发送操作结果。210. The controller receives the operation result, and sends the operation result to the host.
NAND闪存在使用第一读电压进行读操作之后,可以生成操作结果,并将操作结果发送给控制器。控制器在收到该操作结果后,可以将操作结果发送给主机。After the NAND flash memory uses the first read voltage to perform a read operation, an operation result can be generated, and the operation result can be sent to the controller. After receiving the operation result, the controller can send the operation result to the host.
本申请实施例中,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系,存在至少一个读电压索引对应的读电压是同一个页类型对应的多个读电压,使得读电压管理表中存储的读电压能够对存储介质的所有物理地址进行读操作,从而降低了读电压管理表占用的内存资源。In the embodiment of the present application, the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types. , the read voltage corresponding to at least one read voltage index is a plurality of read voltages corresponding to the same page type, so that the read voltage stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the read voltage. Manage the memory resources occupied by the table.
进一步的,读电压索引的取值可以是预设值,此时控制器不需要查询读电压管理表,可以直接从die上获取读电压,节省了设置读电压的步骤,减少了因为设置读电压带来的时间开销。此外,控制器使用一次读电压进行读操作,就会更新一次该读电压对应的页类型计数,为读电压管理表的更新提供了依据,使得读电压管理表的更新更加符合实际应用的需要,提升了方案的灵活性。Further, the value of the read voltage index can be a preset value. At this time, the controller does not need to query the read voltage management table, and can directly obtain the read voltage from the die, which saves the steps of setting the read voltage and reduces the need for setting the read voltage. time cost incurred. In addition, when the controller uses a read voltage to perform a read operation, it will update the page type count corresponding to the read voltage once, which provides a basis for the update of the read voltage management table, making the update of the read voltage management table more in line with the needs of practical applications. Improve the flexibility of the program.
2、使用第一读电压读失败的情况:2. When the first reading voltage reading fails:
由于UFS器件的使用环境复杂,NAND闪存的最优读电压常常会数据保存时间、读取干 扰或者温变等原因,出现耦合现象,使得最优读电压发生变化,从而导致读恢复现象。本申请实施例中,在发生读恢复的情况下,控制器可以更新读电压管理表,使其可以适应各种使用环境,提升了技术方案的灵活性。Due to the complex use environment of UFS devices, the optimal read voltage of NAND flash memory often occurs due to data retention time, read interference or temperature changes, etc., resulting in a coupling phenomenon, which makes the optimal read voltage change, resulting in read recovery. In the embodiment of the present application, in the case of read recovery, the controller can update the read voltage management table, so that it can adapt to various usage environments, which improves the flexibility of the technical solution.
请参阅图3,图3为本申请实施例中存储介质读取方法的一个实施例,包括:Please refer to FIG. 3. FIG. 3 is an embodiment of a method for reading a storage medium in an embodiment of the present application, including:
301、控制器接收读命令;301. The controller receives a read command;
302、控制器确定读命令对应的目标物理地址。302. The controller determines the target physical address corresponding to the read command.
303、控制器确定第一读电压索引。303. The controller determines a first read voltage index.
304、控制器确定第一读电压索引的取值是否为预设值,若是,则执行步骤305,若否,则执行步骤307。304. The controller determines whether the value of the first read voltage index is a preset value, and if so, executes step 305, and if not, executes step 307.
305、控制器使用缓存的读电压进行读操作。305. The controller uses the buffered read voltage to perform a read operation.
本申请实施例中,步骤301至步骤305与图2所示实施例中步骤201至步骤205类似,此处不再赘述。In this embodiment of the present application, steps 301 to 305 are similar to steps 201 to 205 in the embodiment shown in FIG. 2 , and details are not repeated here.
306、控制器接收操作结果,并向主机发送操作结果。306. The controller receives the operation result, and sends the operation result to the host.
控制器接收到的操作结果有多种情况,下面分别进行说明:The operation results received by the controller have various situations, which are described below:
一种情况是,控制器在步骤305之后,根据die上缓存的读电压对NAND闪存进行读操作之后,NAND闪存生成操作结果,并将操作结果发送给控制器。控制器在接收到操作结果之后,可以将该操作结果发送给主机。In one case, after the controller performs a read operation on the NAND flash memory according to the read voltage buffered on the die after step 305, the NAND flash memory generates an operation result, and sends the operation result to the controller. After receiving the operation result, the controller can send the operation result to the host.
一种情况是,控制器在使用读电压管理表的第二级表中存储的第一读电压对NAND闪存进行读操作之后,在进行读操作的物理地址没有发生读恢复的情况下,控制器成功读取到数据,控制器也会将收到的操作结果发送给主机。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, if the read recovery does not occur at the physical address where the read operation is performed, the controller If the data is successfully read, the controller will also send the received operation result to the host.
307、控制器确定第一读电压索引对应的第一读电压。307. The controller determines the first read voltage corresponding to the first read voltage index.
本申请实施例中,步骤307与图2所示实施例中步骤206类似,此处不再赘述。In this embodiment of the present application, step 307 is similar to step 206 in the embodiment shown in FIG. 2 , and details are not described herein again.
308、控制器根据第一读电压,读NAND闪存进行读操作。308. The controller reads the NAND flash memory to perform a read operation according to the first read voltage.
控制器在确定出第一读电压之后,可以使用第一读电压对NAND闪存进行读操作。After the controller determines the first read voltage, the controller may use the first read voltage to perform a read operation on the NAND flash memory.
需要注意的是,在步骤307之后,控制器还可以将第一读电压设置到die上,还可以更新读电压管理表,设置和更新的方式与图2所示实施例中步骤207和步骤208类似,具体此处不再赘述。It should be noted that after step 307, the controller can also set the first read voltage on the die, and can also update the read voltage management table. The setting and updating methods are the same as those in steps 207 and 208 in the embodiment shown in FIG. 2 . Similar, details are not repeated here.
309、控制器确定目标物理地址是否发生读恢复,若是,则执行步骤310,若否,则执行步骤306。309. The controller determines whether read recovery occurs at the target physical address, and if so, executes step 310, and if not, executes step 306.
控制器在根据第一读电压对NAND闪存进行读操作之后,可以确定出读命令对应的目标物理地址是否发生了读恢复。若读成功,则说明目标物理地址没有发生读恢复,若读失败,则意味着目标物理地址发生了读恢复,第一读电压并不是对读命令对应的目标物理地址进行读操作的最优读电压。After the controller performs a read operation on the NAND flash memory according to the first read voltage, it can determine whether the target physical address corresponding to the read command has read recovery. If the read is successful, it means that the target physical address does not have read recovery. If the read fails, it means that the target physical address has read recovery. The first read voltage is not the optimal read operation for the target physical address corresponding to the read command. Voltage.
310、控制器确定第一读恢复电压。310. The controller determines the first read recovery voltage.
若读命令对应的物理地址发生了读恢复,意味着控制器使用第一读电压无法成功读取出物理地址的数据,需要更换读电压。在这种情况下,控制器可以确定出第一读恢复电压,第一读恢复电压即为目标物理地址的最优读电压。If the read recovery occurs at the physical address corresponding to the read command, 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 replaced. In this case, the controller can determine the first read recovery voltage, which is the optimal read voltage of the target physical address.
其中,控制器确定第一读恢复电压的方式并不是本申请技术方案关注的重点,因此本申请实施例不对获取第一度恢复电压的过程进行详细的介绍。The manner in which the controller determines the recovery voltage of the first reading is not the focus of the technical solution of the present application, so the embodiment of the present application does not introduce the process of obtaining the recovery voltage of the first reading in detail.
311、控制器确定第一读恢复电压,与第二级表中第X行的读电压之间的距离是否满足预设条件,若是,则执行步骤312,若否,则执行步骤315。311. The controller determines whether the distance between the first read recovery voltage and the read voltage in the Xth row of the second-level table satisfies a preset condition, if yes, executes step 312, if not, executes step 315.
控制器在获取到第一读恢复电压之后,可以比较第一读恢复电压与第二级表中任一行的读电压的距离,从而确定出对NAND闪存进行读操作的第二读恢复电压,并根据第二读恢复电压,对读电压管理表使用不同的更新方式进行更新。After obtaining the first read recovery voltage, the controller can compare the distance between the first read recovery voltage and the read voltage of any row in the second-level table, so as to determine the second read recovery voltage for performing the read operation on the NAND flash memory, and According to the second read recovery voltage, the read voltage management table is updated using different update methods.
本实施例以电压查询表VLUT为例,进行详细介绍。为了书写方便,采用第X行表示VLUT中的任一行,其中,X表示的是VLUT的行标号,也即是权利要求中的第二读电压对应的第一行标号,X为大于或等于0的整数。This embodiment takes the voltage look-up table VLUT as an example for detailed description. For the convenience of writing, the Xth row is used to represent any row in the VLUT, where X represents the row label of the VLUT, that is, the first row label corresponding to the second read voltage in the claim, and X is greater than or equal to 0 the integer.
在实际应用中,可以使用多种计算方式计算第一读恢复电压与第X行的读电压之间的距离,可以是计算两组电压的差值之和,也可以是计算两组电压的差值的加权平均值,具体此处不做限定。In practical applications, a variety of calculation methods can be used to calculate the distance between the first read recovery voltage and the read voltage of the Xth row. The weighted average of the values, which is not specifically limited here.
示例的,一种距离计算公式可以是d(U,V)=sqrt((|v 1-u 1| 2+……+|v n-u n| 2)/n),其中U=(u 1,u 2,……,u n),V=(v 1,v 2,……,v n),U和V分别表示第一读恢复电压和VLUT中第X行的读电压。 Exemplarily, a distance calculation formula may be d(U,V)=sqrt((|v 1 -u 1 | 2 +...+|v n -u n | 2 )/n), where U=(u 1 , u 2 , .
满足预设条件有多种情况,在实际应用中,可以是两组电压的距离小于门限值,也可以是两组电压的距离小于或等于门限值,根据实际应用的需要进行选择,具体此处不做限定。There are many situations in which the preset conditions are met. In practical applications, the distance between the two groups of voltages may be less than the threshold value, or the distance between the two groups of voltages may be less than or equal to the threshold value. The selection is made according to the needs of the actual application. There is no limitation here.
可选的,第一读恢复电压与VLUT中存储的读电压进行比较的方式有多种,可以是按照VLUT表中从第0行到最后一行的顺序依次比较,也可以是按照随机但不重复比较的顺序进行比较,还可以是在VLUT中得到一个满足条件的读电压就不再进行比较,根据实际应用的需要进行选择,具体此处不做限定。Optionally, there are many ways to compare the first read recovery voltage with the read voltage stored in the VLUT, which can be compared in sequence from the 0th row to the last row in the VLUT table, or random but not repeated. The comparison is performed in the order of comparison, or a read voltage that satisfies the condition is obtained in the VLUT, and the comparison is no longer performed, and the selection is made according to the needs of the actual application, which is not specifically limited here.
可选的,第X行读电压的确定方式也有很多种,可以是第一个比较出来的读电压,也可以是所有满足条件的读电压中,与第一读恢复电压的距离最小的读电压,根据实际应用的需要进行选择,此处不做限定。Optionally, there are many ways to determine the read voltage of the Xth row, which can be the first read voltage compared, or it can be the read voltage with the smallest distance from the first read recovery voltage among all the read voltages that meet the conditions. , and select it according to the actual application needs, which is not limited here.
示例的,以满足预设条件是小于或等于0.5,选择与第一读恢复电压的距离最小的读电压作为第二读恢复电压为例:若在VLUT中存在读电压1和读电压2,其中,读电压1与第一读恢复电压的距离是0.2,读电压2与第一读恢复电压的距离是0.45,由于读电压1与第一读恢复电压的距离更近,带来的误差更小,所以控制器可以确定第二读恢复电压为读电压1。Exemplarily, to satisfy the preset condition that is less than or equal to 0.5, select the read voltage with the smallest distance from the first read recovery voltage as the second read recovery voltage as an example: if there are read voltage 1 and read voltage 2 in the VLUT, where , the distance between read voltage 1 and the first read recovery voltage is 0.2, and the distance between read voltage 2 and the first read recovery voltage is 0.45. Since the distance between read voltage 1 and the first read recovery voltage is closer, the error caused is smaller , so the controller can determine that the second read recovery voltage is read voltage 1.
本申请实施中,控制器确定第X行读电压的方式有多种,每种方式都有不同的有益效果。若确定第一个比较出来的读电压为第二读恢复电压,可以减少比较的次数,节约运算资源。若确定第二读恢复电压是所有满足条件的读电压中,与第一读恢复电压的距离最小的读电压,使得之后再对读命令对应的物理地址进行读操作使用的读电压更接近最优读电压,可以减小误差,提升技术方案的准确度。In the implementation of the present application, there are many ways for the controller to determine the read voltage of the Xth row, and each way has different beneficial effects. If it is determined that the read voltage obtained from the first comparison is the second read recovery voltage, the number of comparisons can be reduced and computing resources can be saved. If it is determined that the second read recovery voltage is the read voltage with the smallest distance from the first read recovery voltage among all the read voltages that meet the conditions, the read voltage used for the read operation on the physical address corresponding to the read command is closer to the optimum. Reading the voltage can reduce the error and improve the accuracy of the technical solution.
312、控制器确定第二读恢复电压为第X行的读电压。312. The controller determines that the second read recovery voltage is the read voltage of the Xth row.
若第一读恢复电压,与第X行读电压之间的距离满足预设条件,则控制器可以确定第二读恢复电压是第X行的读电压。If the distance between the first read recovery voltage and the read voltage of the Xth row satisfies the preset condition, the controller may determine that the second read recovery voltage is the read voltage of the Xth row.
本申请实施例中,控制器在第一读恢复电压和第二级表中存储的读电压的关系满足预设条件的情况下,可以确定第二级表中的某一行读电压即为第二读恢复电压,第二读恢复电压用于之后再对发生读恢复的物理地址进行读操作,在误差允许的范围内,使用第二级表中存有的读电压进行读操作,可以避免频繁地更新第二级表,简化处理过程,节约了运算资源。In the embodiment of the present application, the controller may determine that the read voltage of a row in the second-level table is the second read voltage when the relationship between the first read recovery voltage and the read voltage stored in the second-level table satisfies a preset condition Read recovery voltage, the second read recovery voltage is used to perform the read operation on the physical address where the read recovery occurs. Within the allowable error range, use the read voltage stored in the second-level table to perform the read operation, which can avoid frequent read operations. Updating the second-level table simplifies the processing process and saves computing resources.
313、控制器更新第一级表。313. The controller updates the first-level table.
控制器在确定出第二读恢复电压为第X行的读电压之后,可以更新第一级表。After determining that the second read recovery voltage is the read voltage of the Xth row, the controller may update the first level table.
示例的,本实施例以第一级表是最优电压下标表BVIT为例,进行详细的说明。更新的方式可以是将第一读电压索引的取值更新为X。Illustratively, in this embodiment, the first-level table is an optimal voltage subscript table BVIT as an example for detailed description. The update manner may be to update the value of the first read voltage index to X.
示例的,以进行读操作的管理区域为region0,该管理区域对应的页类型是LSB,第一读电压索引index 0,0的取值为0为例。若第二读恢复电压为第1行读电压,则需要将index 0,0的取值更新为1。 For example, the management region for performing the read operation is region0, the page type corresponding to the management region is LSB, and the value of the first read voltage index 0,0 is 0 as an example. If the second read recovery voltage is the read voltage of the first row, the value of index 0 , 0 needs to be updated to 1.
本申请实施例中,在读电压管理标的第二级表中的读电压在发生读恢复仍然适用的情况下,控制器可以对第一读电压索引的取值进行更新,使得第一级表中的读电压索引始终可以对应于第二级表中合适的读电压,控制器可以使用最优读电压进行读操作,提高了本申请技术方案的可靠性。In the embodiment of the present application, in the case where the read voltage in the second-level table of the read voltage management target is still applicable after read recovery occurs, the controller may update the value of the first read voltage index, so that the value of the first-level table in the first-level table is updated. The read voltage index can always correspond to the appropriate read voltage in the second-level table, and the controller can use the optimal read voltage to perform the read operation, which improves the reliability of the technical solution of the present application.
314、控制器更新第二级表。314. The controller updates the second-level table.
控制器还可以对VLUT进行更新,更新的方式可以是增加第X行对应的该页类型计数。增加的幅度有多种,可以是每使用一次第X行中某一页类型的读电压,该页类型计数的取值就增加1,也可以是每使用一次第X行中某一页类型的读电压,该页类型计数的取值就增加10,只要使得每使用一次第X行中某一页类型的读电压,该页类型计数的取值增加的数值一致即可,根据实际应用的需要进行选择,具体此处不做限定。The controller may also update the VLUT by increasing the page type count corresponding to the Xth row. There are various increases. It can be that each time the read voltage of a certain page type in the Xth row is used, the value of the page type count is increased by 1, or it can be that each time a certain page type in the Xth row is used. When reading the voltage, the value of the page type count is increased by 10, as long as the read voltage of a certain page type in the Xth row is used, the value of the page type count value increases by the same value, according to the needs of the actual application. Make a selection, which is not limited here.
示例的,以管理区域对应的页类型是LSB,第X行是第1行,该页类型计数N 1,1的取值是10,更新方式是每使用一次第X行中某一页类型的读电压,该页类型计数的取值就增加1为例。若将第X行读电压确定为第二读恢复电压,则将N 1,1的取值更新为11。 For example, the page type corresponding to the management area is LSB, the Xth row is the 1st row, the page type count N 1 , the value of 1 is 10, and the update method is to use a certain page type in the Xth row every time. When reading the voltage, the value of the page type count is increased by 1 as an example. If the read voltage of the Xth row is determined as the second read recovery voltage, the value of N 1,1 is updated to 11.
需要注意的是,步骤313和步骤314没有必然的先后顺序,在实际应用中,可以先执行步骤313,也可以先执行步骤314,只要在步骤312之后执行即可,具体此处不做限定。It should be noted that step 313 and step 314 do not have a necessary sequence. In practical applications, step 313 or step 314 may be performed first, as long as it is performed after step 312, which is not limited here.
315、控制器确定第二读恢复电压为第一读恢复电压。315. The controller determines that the second read recovery voltage is the first read recovery voltage.
若第一读恢复电压,与VLUT中任意一行的读电压之间的距离都不满足预设条件,说明此时压管理表中存储的读电压都不是最优的读电压,控制器可以确定第二读恢复电压是第一读恢复电压。If the distance between the first read recovery voltage and the read voltage of any row in the VLUT does not meet the preset condition, it means that the read voltage stored in the voltage management table is not the optimal read voltage at this time, and the controller can determine the first read voltage. The second read recovery voltage is the first read recovery voltage.
316、控制器更新读电压管理表。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 can trigger the swap-in and swap-out strategy to update the read voltage management table.
317、控制器接收读恢复的操作结果,并向主机发送读恢复的操作结果。317. The controller receives the operation result of read recovery, and sends the operation result of read recovery to the host.
控制器在确定出第一读恢复电压之后,可以根据第一读恢复电压对NAND进行读操作,从而获得操作结果。在使用第一读恢复电压,成功读取到数据的情况下,控制器可以将操作结果发送给主机。After the controller determines the first read recovery voltage, the controller may perform a read operation on the NAND according to the first read recovery voltage to obtain an operation result. In the case that the data is successfully read using the first read recovery voltage, the controller can send the operation result to the host.
需要注意的是,步骤317并不一定在步骤314或者步骤316之后,也可以在步骤314或步骤316之前,还可以在步骤311之前,只要在步骤310之后即可,根据实际应用的需要进行选择,具体此处不做限定。It should be noted that step 317 is not necessarily after step 314 or step 316, it can also be before step 314 or step 316, or before step 311, as long as it is after step 310, and the selection is made according to the needs of the actual application , which is not specifically limited here.
本申请实施例中,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系,存在至少一个读电压索引对应的读电压是同一个页类型对应的多个读电压,使得读电压管理表中存储的读电压能够对存储介质的所有物理地址进行读操作,从而降低了读电压管理表占用的内存资源。In the embodiment of the present application, the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types. , the read voltage corresponding to at least one read voltage index is a plurality of read voltages corresponding to the same page type, so that the read voltage stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the read voltage. Manage the memory resources occupied by the table.
进一步的,由于NAND闪存常常会发生读恢复,若每次发生读恢复都更换读电压,并更新读电压管理表,处理过程较为复杂,且需要的时间、人力等成本较高。所以可以在误差允许的范围内,使用读电压管理表中已经存储的读电压进行后续的读操作,从而简化过程,节约了运算资源。在第一读恢复电压,与电压查询表中第X行的读电压之间的距离超出误差允许的范围的情况下,控制器可以更新读电压管理表,使其可以适用于多种情况,提升了方案的灵活性。Further, since read recovery often occurs in NAND flash memory, if the read voltage is changed every time a read recovery occurs, and the read voltage management table is updated, the processing process is relatively complicated, and the required time and labor costs are high. Therefore, the subsequent read operation can be performed using the read voltage already stored in the read voltage management table within the allowable range of the error, thereby simplifying the process and saving computing resources. When the distance between the first read recovery voltage and the read voltage in the Xth row of the voltage look-up table exceeds the allowable error range, the controller can update the read voltage management table to make it applicable to various situations, improving flexibility of the program.
基于图3所示实施例中的步骤316,下面详细描述控制器触发换入换出策略更新读电压管理表的过程。如图3所示的实施例,若第一物理地址发生了读恢复,控制器可以获取到第一读恢复电压,然后可以比较第一读恢复电压与电压查询表中任一行的读电压的距离,从而对读电压管理表进行更新。在第一读恢复电压与电压查询表中每一行的读电压的距离均不满足预设条件的情况下,控制器可以按照图4所示的流程更新读电压管理表。请参阅图4,图4为本申请实施例中存储介质读取方法的一个实施例,包括:Based on step 316 in the embodiment shown in FIG. 3 , the following describes in detail the process of the controller triggering the swap-in and swap-out strategy to update the read voltage management table. In the embodiment shown in FIG. 3 , if a read recovery occurs at the first physical address, the controller can obtain the first read recovery voltage, and then can compare the distance between the first read recovery voltage and the read voltage in any row in the voltage lookup table , so as to update the read voltage management table. When the distance between the first read recovery voltage and the read voltage of each row in the voltage look-up table does not meet the preset condition, the controller may update the read voltage management table according to the process shown in FIG. 4 . Please refer to FIG. 4. FIG. 4 is an embodiment of a method for reading a storage medium in an embodiment of the present application, including:
3161、控制器确定取值为Y的第一页类型计数。3161. The controller determines the count of the first page type whose value is Y.
在电压查询表中,控制器可以确定出发生读恢复的物理地址对应的页类型,然后可以确定取值为Y的第一页类型计数,其中,Y在该页类型对应的至少一个页类型计数中的取值最小,也即是权利要求中的第一页类型计数的取值。In the voltage lookup table, the controller can determine the page type corresponding to the physical address at which read recovery occurs, and then can determine the first page type count with a value of Y, where Y is counted in at least one page type corresponding to the page type The value in is the smallest, that is, the value of the first page type count in the claim.
应理解,在实际应用中,可能存在多个取值为Y的页类型计数,控制器任意选择其中一个作为第一页类型计数即可。It should be understood that, in practical applications, there may be multiple page type counts with a value of Y, and the controller can arbitrarily select one of them as the first page type count.
3162、控制器更新第一页类型计数。3162. The controller updates the type count of the first page.
控制器在确定出第一页类型计数之后,可以更新第一页类型计数,更新的方式可以是将第一页类型计数的取值更新为1,也可以是将第一页类型计数的取值更新为10,只要该取值能够表示命中一次第一读恢复电压即可。After the controller determines the first page type count, it can update the first page type count, and the update method can be to update the value of the first page type count to 1, or it can be to update the value of the first page type count. It is updated to 10, as long as the value can indicate that the first read recovery voltage is hit once.
需要注意的是,步骤3162可以在步骤3163之前执行,也可以在步骤3163之后执行,只要在步骤3161之后执行即可,具体此处不做限定。It should be noted that step 3162 may be performed before step 3163, or may be performed after step 3163, as long as it is performed after step 3161, which is not specifically limited here.
3163、控制器确定第一页类型计数所在的行标号Z。3163. The controller determines the row label Z where the first page type count is located.
控制器在确定第一页类型计数之后,可以在电压查询表中确定第一页类型计数所在的 行标号Z,也即是权利要求中的第一行标号。After determining the first page type count, the controller may determine the row number Z where the first page type count is located in the voltage look-up table, that is, the first row number in the claims.
本申请实施例中,在触发换入换出策略的情况下,控制器可以把第二级表中命中次数最少的读电压更新为第二读恢复电压,使得读电压管理表中存储的读电压可以灵活适用于多种实际情况,提升了方案的灵活性。In the embodiment of the present application, when the swap-in and swap-out strategy is triggered, the controller can update the read voltage with the least hits in the second-level table to the second read recovery voltage, so that the read voltage stored in the read voltage management table It can be flexibly applied to a variety of practical situations, which improves the flexibility of the scheme.
3164、控制器更新第Z行的读电压。3164. The controller updates the read voltage of the Zth row.
控制器在确定第一页类型计数所在的行标号Z之后,可以更新第Z行的读电压。更新的方式可以是,将第Z行中对应于页类型的读电压更新为第二读恢复电压。The controller may update the read voltage of the Zth row after determining the row number Z where the first page type count is located. The update manner may be to update the read voltage corresponding to the page type in the Zth row to the second read recovery voltage.
3165、控制器更新第一读电压索引的取值。3165. The controller updates the value of the first read voltage index.
控制器可以在最优电压下标表中确定发生读恢复的物理地址对应的第一读电压索引,由于发生了读恢复,第一读电压的取值发生了变化,在电压查询表中对应的行标号也可能发生了改变,因此需要更新第一读电压索引的取值。更新的方式可以是将第一读电压索引的取值更新为Z。The controller can determine the first read voltage index corresponding to the physical address where read recovery occurs in the optimal voltage subscript table. Due to the read recovery, the value of the first read voltage has changed, and the corresponding value in the voltage lookup table is The row number may also be changed, so the value of the first read voltage index needs to be updated. The update manner may be to update the value of the first read voltage index to Z.
需要注意的是,步骤3164和步骤3165之间没有必然的先后顺序,可以先执行步骤3164,也可以先执行步骤3165,还可以同时执行步骤3164和步骤3165,只要在步骤3163之后执行即可,具体此处不做限定。It should be noted that there is no necessary sequence between step 3164 and step 3165. Step 3164 can be executed first, or step 3165 can be executed first, or step 3164 and step 3165 can be executed at the same time, as long as it is executed after step 3163, There is no specific limitation here.
3166、控制器确定第二读电压索引。3166. The controller determines the second read voltage index.
在最优电压下标表中,控制器可以确定出第二读电压索引,其中,第二读电压索引的取值为Z,且第二读电压索引对应于发生读恢复的页类型。In the optimal voltage index table, the controller can determine the second read voltage index, wherein the value of the second read voltage index is Z, and the second read voltage index corresponds to the page type in which read recovery occurs.
3167、控制器更新第二读电压索引的取值。3167. The controller updates the value of the second read voltage index.
由于第Z行的读电压发生了变化,因此第二读电压索引的取值也需要进行更新,以符合实际应用的要求。更新的方式可以是将第二读电压的索引的取值更新为预设值。Since the read voltage of row Z has changed, the value of the second read voltage index also needs to be updated to meet the requirements of practical applications. The update manner may be to update the value of the index of the second read voltage to a preset value.
示例的,为了便于理解技术方案,以region0的LSB发生读恢复为例,简单说明上述更新过程。假设取值最小的页类型计数对应的行标号为2,index 2,0的取值为2,VLUT的最大行标号为64。那么,控制器可以将第一读电压索引index 0,0的取值更新为2,将index 2,0的取值更新为预设值66,还可以在VLUT的第2行中,将LSB对应的读电压更新为读恢复电压。 By way of example, in order to facilitate understanding of the technical solution, the above update process is briefly described by taking the read recovery of the LSB of region 0 as an example. Assuming that the row number corresponding to the page type count with the smallest value is 2, the value of index 2, 0 is 2, and the maximum row number of the VLUT is 64. Then, the controller can update the value of the first read voltage index index 0,0 to 2, and update the value of index 2,0 to the preset value 66, and can also in the second row of the VLUT, the LSB corresponds to The read voltage is updated to the read recovery voltage.
本申请实施例中,在发生读恢复且第二级表中存储的读电压都不满足预设条件的情况下,控制器可以对第一级表进行更新,使得第一级表中的读电压索引始终可以对应于第二级表中合适的读电压,控制器可以使用最优读电压进行读操作,提高了本申请技术方案的可靠性。In the embodiment of the present application, when read recovery occurs and the read voltage stored in the second-level table does not meet the preset conditions, the controller may update the first-level table, so that the read voltage in the first-level table The index can always correspond to the appropriate read voltage in the second-level table, and the controller can use the optimal read voltage to perform the read operation, which improves the reliability of the technical solution of the present application.
本申请实施例中,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系,存在至少一个读电压索引对应的读电压是同一个页类型对应的多个读电压,使得读电压管理表中存储的读电压能够对存储介质的所有物理地址进行读操作,从而降低了读电压管理表占用的内存资源。In the embodiment of the present application, the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the corresponding relationship between the read voltage index and the read voltage under different page types. , the read voltage corresponding to at least one read voltage index is multiple read voltages corresponding to the same page type, so that the read voltages stored in the read voltage management table can perform read operations on all physical addresses of the storage medium, thereby reducing the read voltage. Manage the memory resources occupied by the table.
进一步的,本申请实施例中,在发生读恢复的情况并触发换入换出策略的情况下,控制器可以把第二级表中命中次数最少的读电压更新为第二读恢复电压,使得读电压管理表 中存储的读电压可以灵活适用于多种实际情况,提升了方案的灵活性。Further, in this embodiment of the present application, when a read recovery occurs and a swap-in and swap-out strategy is triggered, the controller may update the read voltage with the least hits in the second-level table to the second read recovery voltage, so that The read voltage stored in the read voltage management table can be flexibly applied to various practical situations, which improves the flexibility of the scheme.
下面对本申请实施例中存储介质的读取装置进行介绍:The following describes the device for reading the storage medium in the embodiment of the present application:
请参阅图5,图5为本申请实施例中存储介质的读取装置500的一个示意图,本申请中存储介质的读取装置500的一个实施例包括:Please refer to FIG. 5. FIG. 5 is a schematic diagram of an apparatus for reading a storage medium 500 in an embodiment of the present application. An embodiment of the apparatus for reading a storage medium 500 in the present application includes:
处理单元501,用于解析读命令,获取读命令对应的目标物理地址。The processing unit 501 is configured to parse the read command and obtain the target physical address corresponding to the read command.
确定单元502,用于基于物理地址,确定分别与目标物理地址对应的管理区域和目标页类型,其中,管理区域为存储介质中对应于至少一个物理地址的物理空间。The determining unit 502 is configured to determine, based on the physical address, a management area and a target page type respectively corresponding to the target physical address, where the management area is a physical space in the storage medium corresponding to at least one physical address.
获取单元503,用于基于管理区域和目标页类型,从控制器本地存储的读电压管理表中获取第一读电压索引。然后根据第一读电压索引,从读电压管理表中获取第一读电压索引对应的第一读电压,其中,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系,多个页类型中的至少一个页类型对应多个读电压。The obtaining unit 503 is configured to obtain the first read voltage index from the read voltage management table stored locally by the controller based on the management area and the target page type. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table, wherein the read voltage management table stores the read voltage index and a plurality of management areas and a plurality of page types respectively. and the corresponding relationship between the read voltage index and the read voltage under different page types, at least one page type in the multiple page types corresponds to multiple read voltages.
处理单元501,还用于根据第一读电压,执行读命令,从存储介质中读取数据。The processing unit 501 is further configured to execute a read command according to the first read voltage to 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, wherein the first level table of the read voltage management table stores the read voltage index and the relationship between the multiple management areas and the multiple page types, respectively. Corresponding relationship, the second level table of the read voltage management table stores the corresponding relationship between the read voltage index and the read voltage under different page types.
在本申请的一些可选实施例中,存储介质的读取装置500还包括更新单元504。In some optional embodiments of the present application, the storage medium reading apparatus 500 further includes an updating unit 504 .
获取单元503,还用于若根据第一读电压,从存储介质中读取数据失败,则获取第一读恢复电压。The obtaining unit 503 is further configured to obtain the first read recovery voltage if the data read from the storage medium fails according to the first read voltage.
确定单元502,还用于根据第一读恢复电压,和第二级表中存储的读电压的关系,确定第二读恢复电压。The determining unit 502 is further configured to determine the second read recovery voltage according to the relationship between the first read recovery voltage and the read voltage stored in the second level table.
更新单元504,还用于根据第二读恢复电压,更新待更新读电压管理表,得到读电压管理表。The updating unit 504 is further configured to update the read voltage management table to be updated according to the second read recovery voltage to obtain the read voltage management table.
在本申请的一些可选实施例中,确定单元502,具体用于:In some optional embodiments of the present application, the determining unit 502 is specifically configured to:
若第一读恢复电压,和第二级表中存储的第二读电压的距离满足预设条件,则确定第二恢复读电压为第二读电压,其中,第一读恢复电压对应的页类型和第二读电压对应的页类型相同。If the distance between the first read recovery voltage and the second read voltage stored in the second-level table satisfies the preset condition, the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage The page type corresponding to the second read voltage is the same.
若第一读恢复电压,和第二级表中存储的任一行读电压的距离均不满足预设条件,则确定第二读恢复电压为第一恢复读电压。If the distance between the first read recovery voltage and the read voltage of any row stored in the second-level table does not meet the preset condition, the second read recovery voltage is determined to be the first recovery read voltage.
在本申请的一些可选实施例中,第二级表还包括页类型计数,页类型计数用于表示命中某一物理地址对应的页类型的读电压的次数。In some optional embodiments of the present application, the second-level table further includes a page type count, where the page type count is used to indicate the number of times the read voltage of the page type corresponding to a certain physical address is hit.
更新单元504,用于若确定第二读恢复电压为第二读电压,则在待更新第二级表中,更新第二读电压对应的页类型计数,得到第二级表。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.
更新单元504,还可以第二读电压对应的第一行标号,其中,第一行标号为第二读电压在第二级表中的行标号。然后在待更新第一级表中,将第一读电压索引值更新为第一行标号,得到第一级表。The updating unit 504 can also use the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second level table. Then, in the table of the first level to be updated, the index value of the first read voltage is updated to the label of the first row to obtain the table of the first level.
在本申请的一些可选实施例中,更新单元504,用于若确定第二读恢复电压为第一恢 复读电压,则在待更新第二级表中,确定出第一页类型计数,其中,第一页类型计数在目标页类型对应的页类型计数中取值最小。然后将第三读电压更新为第二读恢复电压,其中,第三读电压对应于第一页类型计数。更新单元504,还用于更新第一页类型计数的取值。In some optional embodiments of the present application, the updating unit 504 is configured to, if it is determined that the second read recovery voltage is the first recovery read voltage, determine the first page type count in the second level table to be updated, wherein , the first page type count is the smallest among the page type counts corresponding to the target page type. The third read voltage is then updated to the second read recovery voltage, wherein 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.
在本申请的一些可选实施例中,确定单元502,还用于:In some optional embodiments of the present application, the determining unit 502 is further configured to:
确定第一页类型计数对应的第二行标号,其中,第二行标号为第一页类型计数在第二级表中的行标号。然后在待更新第一级表中,确定第二读电压索引,其中,第二读电压索引值为第二行标号,且第二读电压索引对应的页类型为目标页类型。A second row label corresponding to the first page type count is determined, wherein the second row label is the row label of the first page type count in the second-level table. Then, in the first-level table to be updated, a second read voltage index is determined, wherein the second read voltage index value is the second row label, and the page type corresponding to the second read voltage index is the target page type.
更新单元504,还用于将第二读电压索引的取值更新为预设值,将第一读电压索引值更新为第二行标号。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 label.
在本申请的一些可选实施例中,多个管理区域是根据存储介质的管理粒度预先划分的,管理粒度包括存储介质的页,或存储介质的区块。In some optional embodiments of the present application, the multiple management areas are pre-divided according to the management granularity of the storage medium, and the management granularity includes a page of the storage medium or a block of the storage medium.
在本申请的一些可选实施例中,存储介质中的每个存储单元存储至少两个bit的数据,可以是NAND闪存或NOR闪存,NAND闪存包括MLC、TLC或QLC,根据实际应用的需要进行选择,具体此处不做限定。In some optional embodiments of the present application, each storage unit in the storage medium stores data of at least two bits, which may be NAND flash memory or NOR flash memory. Selection, which is not specifically limited here.
在本申请的一些可选实施例中,读电压管理表的第一级表包括最优电压下标表,读电压管理表的二级表包括电压查询表。In some optional embodiments of the present application, the first-level table of the read voltage management table includes an optimal voltage subscript table, and the second-level table of the read voltage management table includes a voltage look-up table.
在本申请的一些可选实施例中,存储介质的读取装置包括UFS器件中的控制器。其中,UFS器件常常使用NAND闪存作为存储介质。In some optional embodiments of the present application, the device for reading the storage medium includes a controller in the UFS device. Among them, UFS devices often use NAND flash memory as a storage medium.
本实施例中,存储介质的读取装置500可以执行前述图1至图4所示实施例中控制器所执行的操作,具体此处不再赘述。In this embodiment, the device 500 for reading a storage medium can perform the operations performed by the controller in the foregoing embodiments shown in FIG. 1 to FIG. 4 , and details are not repeated here.
图6是本申请实施例提供的一种读取数据的控制器的结构示意图,该控制器600可以包括一个或一个以上处理器(central processing units,CPU)601和存储器602,该存储器602中存储有一个或一个以上的应用程序或数据。6 is a schematic structural diagram of a controller for reading data provided by an embodiment of the present application. The controller 600 may include one or more processors (central processing units, CPU) 601 and a memory 602, and the memory 602 stores There is one or more applications or data.
其中,存储器602可以是易失性存储或持久存储。存储在存储器602的程序可以包括一个或一个以上模区块,每个模区块可以包括对服务器中的一系列指令操作。更进一步地,处理器601可以设置为与存储器602通信,在控制器600上执行存储器602中的一系列指令操作。Among them, the memory 602 may be volatile storage or persistent storage. The program stored in memory 602 may include one or more modules, each module may include a series of instructions to operate on the server. Furthermore, the processor 601 may be arranged to communicate with the memory 602 to execute a series of instruction operations in the memory 602 on the controller 600 .
控制器600还可以包括一个或一个以上电源605,一个或一个以上主机侧接口603,一个或一个以上存储介质侧接口604,和/或,一个或一个以上操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等。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 X™ , UnixTM, LinuxTM, FreeBSDTM, etc.
在本申请的一些可选实施例中,In some optional embodiments of the present application,
存储器602,用于存储读电压管理表,读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及读电压索引与不同页类型下的读电压之间的对应关系,其中,多个页类型中的至少一个页类型对应多个读电压,多个管理区域中的每个管理区域为存储介质中对应于至少一个物理地址的物理空间。The memory 602 is used to store a read voltage management table, where the read voltage management table stores the corresponding relationship between the read voltage index and multiple management areas and multiple page types, and the read voltage index and the read voltage under different page types. At least one page type in the multiple page types corresponds to multiple read voltages, and each management area in the multiple management areas is a physical space in the storage medium corresponding to at least one physical address.
处理器601,用于: Processor 601 for:
解析通过主机侧接口603接收的读命令,得到读命令对应的目标物理地址。然后基于 目标物理地址,确定分别与目标物理地址对应的管理区域和目标页类型。之后,基于该管理区域和目标页类型,从读电压管理表中获取第一读电压索引。再根据第一读电压索引,从读电压管理表中获取第一读电压索引对应的第一读电压。最后根据第一读电压,通过存储介质侧接口604向存储介质下发读命令,从存储介质中读取数据。The read command received through the host-side interface 603 is parsed to obtain the target physical address corresponding to the read command. Then, based on the target physical address, the management area and target page type respectively corresponding to the target physical address are determined. After that, based on the management area and the target page type, the first read voltage index is obtained from the read voltage management table. Then, according to the first read voltage index, the first read voltage corresponding to the first read voltage index is obtained from the read voltage management table. Finally, according to the first read voltage, a read command is issued to the storage medium through the storage medium side interface 604 to read data from the storage medium.
在本申请的一些可选实施例中,读电压管理表为二级表结构,其中,读电压管理表的第一级表存储多个管理区域和多个页类型与读电压索引之间的对应关系,读电压管理表的第二级表存储读电压索引与多个页类型下的读电压的对应关系,多个页类型中的至少一个页类型对应多个读电压。In some optional embodiments of the present application, the read voltage management table has a two-level table structure, wherein the first level table of the read voltage management table stores the correspondence between a plurality of management regions and a plurality of page types and the read voltage index The second level table of the read voltage management table stores the corresponding relationship between the read voltage index and the read voltages under multiple page types, and at least one page type in the multiple page types corresponds to multiple read voltages.
在本申请的一些可选实施例中,处理器601,还用于:In some optional embodiments of the present application, the processor 601 is further configured to:
若根据第一读电压,从存储介质中读取数据失败,则获取第一读恢复电压。然后根据第一读恢复电压,和第二级表中存储的读电压的关系,确定第二读恢复电压。最后根据第二读恢复电压,更新待更新读电压管理表,得到读电压管理表。If reading data from the storage medium fails according to the first read voltage, the first read recovery voltage is obtained. Then, according to the relationship between the first read recovery voltage and the read voltage stored in the second level table, the second read recovery voltage is determined. Finally, according to the second read recovery voltage, the read voltage management table to be updated is updated to obtain the read voltage management table.
在本申请的一些可选实施例中,处理器601,用于:In some optional embodiments of the present application, the processor 601 is configured to:
若第一读恢复电压,和第二级表中存储的第二读电压的距离满足预设条件,则确定第二恢复读电压为第二读电压,其中,第一读恢复电压对应的页类型和第二读电压对应的页类型相同。If the distance between the first read recovery voltage and the second read voltage stored in the second-level table satisfies the preset condition, the second read recovery voltage is determined to be the second read voltage, wherein the page type corresponding to the first read recovery voltage The page type corresponding to the second read voltage is the same.
若第一读恢复电压,和第二级表中存储的任一行读电压的距离均不满足预设条件,则确定第二读恢复电压为第一恢复读电压。If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet the preset condition, the second read recovery voltage is determined to be the first recovery read voltage.
在本申请的一些可选实施例中,第二级表还包括页类型计数,页类型计数用于表示命中某一物理地址对应的页类型的读电压的次数。In some optional embodiments of the present application, the second-level table further includes a page type count, where the page type count is used to indicate the number of times the read voltage of the page type corresponding to a certain physical address is hit.
处理器601,用于在确定第二读恢复电压为第二读电压的情况下,在待更新第二级表中,更新第二读电压对应的页类型计数,得到第二级表。The processor 601 is configured to update the page type count corresponding to the second read voltage in the to-be-updated second-level table to obtain the second-level table when it is determined that the second read recovery voltage is the second read voltage.
处理器601,还可以用于确定第二读电压对应的第一行标号,其中,第一行标号为第二读电压在第二级表中的行标号。然后在待更新第一级表中,将第一读电压索引值更新为第一行标号,得到第一级表。The processor 601 may also be configured to determine the first row label corresponding to the second read voltage, where the first row label is the row label of the second read voltage in the second level table. Then, in the table of the first level to be updated, the index value of the first read voltage is updated to the label of the first row to obtain the table of the first level.
在本申请的一些可选实施例中,第二级表还包括页类型计数;In some optional embodiments of the present application, the second level table further includes a page type count;
处理器601,用于若确定第二读恢复电压为第一恢复读电压,则在待更新第二级表中,确定出第一页类型计数,其中,第一页类型计数在目标页类型对应的页类型计数中取值最小。然后将第三读电压更新为第二读恢复电压,其中,第三读电压对应于第一页类型计数。处理器还用于更新第一页类型计数的取值。The processor 601 is configured to, if it is determined that the second read recovery voltage is the first recovery read voltage, determine the first page type count in the second level table to be updated, where the first page type count corresponds to the target page type. The smallest value in the count of page types. The third read voltage is then updated to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count. The processor is also used to update the value of the first page type count.
在本申请的一些可选实施例中,处理器601,还用于:In some optional embodiments of the present application, the processor 601 is further configured to:
确定第一页类型计数对应的第二行标号,其中,第二行标号为第一页类型计数在第二级表中的行标号。然后在待更新第一级表中,确定第二读电压索引,其中,第二读电压索引的取值为第二行标号,且第二读电压索引对应的页类型为目标页类型。最后,将第二读电压索引的取值更新为预设值,将第一读电压索引值更新为第二行标号。The second row label corresponding to the first page type count is determined, wherein the second row label is the row label of the first page type count in the second-level table. Then, in the first-level table to be updated, a second read voltage index is determined, wherein the value of the second read voltage index is the second row label, and the page type corresponding to the second read voltage index is the target page type. Finally, the value of the second read voltage index is updated to a preset value, and the first read voltage index value is updated to the second row label.
在本申请的一些可选实施例中,多个管理区域是根据存储介质的管理粒度预先划分的。其中,管理粒度包括存储介质的页,或存储介质的区块。In some optional embodiments of the present application, the multiple management areas are pre-divided according to the management granularity of the storage medium. The management granularity includes pages of the storage medium or blocks of the storage medium.
在本申请的一些可选实施例中,存储介质中的每个存储单元存储至少两个bit的数据,可以是NAND闪存或NOR闪存,NAND闪存包括MLC、TLC或QLC,根据实际应用的需要进行选择,具体此处不做限定。In some optional embodiments of the present application, each storage unit in the storage medium stores data of at least two bits, which may be NAND flash memory or NOR flash memory. Selection, which is not specifically limited here.
在本申请的一些可选实施例中,读电压管理表的第一级表包括最优电压下标表,读电压管理表的二级表包括电压查询表。In some optional embodiments of the present application, the first-level table of the read voltage management table includes an optimal voltage subscript table, and the second-level table of the read voltage management table includes a voltage look-up table.
在本申请的一些可选实施例中,存储介质的读取装置包括UFS器件中的控制器。其中,UFS器件常常使用NAND闪存作为存储介质。In some optional embodiments of the present application, the device for reading the storage medium includes a controller in the UFS device. Among them, UFS devices often use NAND flash memory as a storage medium.
最后,对本申请实施例提供的一种存储系统700进行简单说明,请参阅图7,图7为本申请实施例中存储系统700的一个结构示意图。Finally, a brief description of a storage system 700 provided by an embodiment of the present application is provided, please refer to FIG. 7 , which is a schematic structural diagram of the storage system 700 in an embodiment of the present application.
存储系统700,包括: Storage system 700, including:
控制器701和存储介质702。 Controller 701 and storage medium 702.
控制器701,可以执行前述图1至图4所示实施例中控制器所执行的操作,前述图5所示实施例中存储介质的读取装置所执行的操作,或者前述图6所示实施例中处理器所执行的操作,具体此处不再赘述;The controller 701 can perform the operations performed by the controller in the embodiments shown in FIG. 1 to FIG. 4, the operations performed by the device for reading the storage medium in the embodiment shown in FIG. 5, or the implementation shown in FIG. 6. The operations performed by the processor in the example will not be repeated here.
存储介质702中的每个存储单元至少存储两个比特的数据。Each storage unit in the storage medium 702 stores at least two bits of data.
在本申请的一些可选实施例中,存储介质702包括NOR闪存或NAND闪存,NAND闪存包括MLC、TLC或QLC。In some optional embodiments of the present application, the storage medium 702 includes NOR flash memory or NAND flash memory, and the NAND flash memory includes MLC, TLC or QLC.
在本申请的一些实施例中,该存储系统可以是使用UFS存储规范的存储系统。In some embodiments of the present application, the storage system may be a storage system using the UFS storage specification.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部 分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Claims (24)

  1. 一种存储介质的读取方法,其特征在于,包括:A method for reading a storage medium, comprising:
    控制器解析读命令,获取所述读命令对应的目标物理地址;The controller parses the read command to obtain the target physical address corresponding to the read command;
    所述控制器基于所述目标物理地址,确定分别与所述目标物理地址对应的管理区域和目标页类型,其中,所述管理区域为存储介质中对应于至少一个物理地址的物理空间;The controller determines, based on the target physical address, a management area and a target page type respectively corresponding to the target physical address, wherein the management area is a physical space in the storage medium corresponding to at least one physical address;
    所述控制器基于所述管理区域和所述目标页类型,从所述控制器本地存储的读电压管理表中获取第一读电压索引;obtaining, by the controller, 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 obtains the first read voltage from the read voltage management table according to the first read voltage index, wherein the read voltage management table stores the read voltage index and a plurality of management regions and a plurality of a correspondence between page types, and a correspondence between the read voltage index and read voltages under different page types, at least one of the plurality of page types corresponds to a plurality of read voltages;
    所述控制器根据所述第一读电压,执行所述读命令,从所述存储介质中读取数据。The controller executes the read command according to the first read voltage to read data from the storage medium.
  2. 根据权利要求1所述的方法,其特征在于,所述读电压管理表为二级表结构,其中,所述读电压管理表的第一级表存储所述多个管理区域和所述多个页类型与所述读电压索引之间的对应关系,所述读电压管理表的第二级表存储所述读电压索引与所述多个页类型下的读电压的对应关系。The method according to 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 plurality of management areas and the plurality of The corresponding relationship between the page type and the read voltage index, the second level table of the read voltage management table stores the corresponding relationship between the read voltage index and the read voltage under the plurality of page types.
  3. 根据权利要求1或2所述的方法,其特征在于,在所述根据所述第一读电压,执行所述读命令,从所述存储介质中读取数据之后,所述方法还包括:The method according to claim 1 or 2, wherein after the read command is executed according to the first read voltage to read data from the storage medium, the method further comprises:
    若所述控制器根据所述第一读电压,从所述存储介质中读取数据失败,则获取第一读恢复电压;If the controller fails to read data from the storage medium according to the first read voltage, obtain a first read recovery voltage;
    所述控制器根据所述第一读恢复电压,和所述第二级表中存储的读电压的关系,确定第二读恢复电压;The controller determines the second read recovery voltage according to the relationship between the first read recovery voltage and the read voltage stored in the second level table;
    所述控制器根据所述第二读恢复电压,更新待更新读电压管理表,得到所述读电压管理表。The controller updates the read voltage management table to be updated according to the second read recovery voltage to obtain the read voltage management table.
  4. 根据权利要求3所述的方法,其特征在于,所述控制器根据所述第一读恢复电压,和所述第二级表中存储的读电压的关系,确定第二读恢复电压,包括:The method according to claim 3, wherein the controller determines the second read recovery voltage according to the relationship between the first read recovery voltage and the read voltage stored in the second level table, comprising:
    若所述第一读恢复电压,和所述第二级表中存储的第二读电压的距离满足预设条件,则所述控制器确定所述第二恢复读电压为所述第二读电压,其中,所述第一读恢复电压对应的页类型和所述第二读电压对应的页类型相同;If the distance between the first read recovery voltage and the second read voltage stored in the second level table satisfies a preset condition, the controller determines that the second recovery read voltage is the second read voltage , wherein the page type corresponding to the first read recovery voltage is the same as the page type corresponding to the second read voltage;
    若所述第一读恢复电压,和所述第二级表中存储的任一行读电压的距离均不满足预设条件,则所述控制器确定所述第二读恢复电压为所述第一恢复读电压。If the distance between the first read recovery voltage and any row read voltage stored in the second-level table does not meet a preset condition, the controller determines that the second read recovery voltage is the first read recovery voltage Restore read voltage.
  5. 根据权利要求4所述的方法,其特征在于,所述第二级表还包括页类型计数,所述页类型计数用于表示命中某一物理地址对应的页类型的读电压的次数;The method according to claim 4, wherein the second level table further comprises a page type count, wherein the page type count is used to indicate the number of times the read voltage of the page type corresponding to a certain physical address is hit;
    所述控制器根据所述第二读恢复电压,更新待更新读电压管理表,包括:The controller updates the to-be-updated read voltage management table according to the second read recovery voltage, including:
    若所述控制器确定所述第二读恢复电压为所述第二读电压,则在待更新第二级表中,更新第二读电压对应的页类型计数,得到所述第二级表;If the controller determines that the second read recovery voltage is the second read voltage, update the page type count corresponding to the second read voltage in the second-level table to be updated to obtain the second-level table;
    所述控制器确定所述第二读电压对应的第一行标号,其中,所述第一行标号为所述第 二读电压在所述第二级表中的行标号;The controller determines the first row label corresponding to the second read voltage, wherein the first row label is the row label of the second read voltage in the second level table;
    在待更新第一级表中,所述控制器将所述第一读电压索引的取值更新为所述第一行标号,得到所述第一级表。In the to-be-updated first-level table, the controller updates the value of the first read voltage index to the first row number to obtain the first-level table.
  6. 根据权利要求4所述的方法,其特征在于,所述第二级表还包括页类型计数;The method of claim 4, wherein the second level table further includes a page type count;
    所述控制器根据所述第二读恢复电压,更新待更新读电压管理表,包括:The controller updates the to-be-updated read voltage management table according to the second read recovery voltage, including:
    若所述控制器确定所述第二读恢复电压为所述第一恢复读电压,则在所述待更新第二级表中,确定第一页类型计数,其中,所述第一页类型计数在所述目标页类型对应的页类型计数中取值最小;If the controller determines that the second read recovery voltage is the first recovery read voltage, in the second level table to be updated, determine a first page type count, where the first page type count Take the smallest value in the page type count corresponding to the target page type;
    所述控制器将第三读电压更新为所述第二读恢复电压,其中,所述第三读电压对应于所述第一页类型计数;the controller updates a third read voltage to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count;
    所述控制器更新所述第一页类型计数的取值。The controller updates the value of the first page type count.
  7. 根据权利要求6所述的方法,其特征在于,在所述控制器确定第一页类型计数之后,所述方法还包括: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 to-be-updated first-level table, the controller determines a second read voltage index, wherein the value of the second read voltage index is the second row label, and the second read voltage index The corresponding page type is the target page type;
    所述控制器将第二读电压索引的取值更新为预设值;The controller updates the value of the second read voltage index to a preset value;
    所述控制器将所述第一读电压索引值更新为所述第二行标号。The controller updates the first read voltage index value to the second row number.
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述多个管理区域是根据所述存储介质的管理粒度预先划分的;The method according to any one of claims 1 to 7, wherein the multiple management areas are pre-divided according to the management granularity of the storage medium;
    所述管理粒度包括所述存储介质的页,或所述存储介质的区块。The management granularity includes pages of the storage medium, or blocks of the storage medium.
  9. 根据权利要求1至7中任一项所述的方法,其特征在于,所述存储介质包括NOR闪存或NAND闪存;The method according to any one of claims 1 to 7, wherein the storage medium comprises NOR flash memory or NAND flash memory;
    所述NAND闪存包括:多层单元MLC、三层单元TLC或四层单元QLC。The NAND flash memory includes: multi-level cell MLC, three-level cell TLC or four-level cell QLC.
  10. 根据权利要求1至7中任一项所述的方法,其特征在于,所述控制器包括通用闪存存储UFS器件中的控制器。The method of any one of claims 1 to 7, wherein the controller comprises a controller in a universal flash storage UFS device.
  11. 一种存储控制器,其特征在于,包括:A storage controller, comprising:
    处理器,存储器,主机侧接口和存储介质侧接口;processor, memory, host side interface and storage medium side interface;
    所述存储器用于存储读电压管理表,所述读电压管理表中存储了读电压索引分别与多个管理区域和多个页类型之间的对应关系,以及所述读电压索引与不同页类型下的读电压之间的对应关系,其中,所述多个页类型中的至少一个页类型对应多个读电压,所述多个管理区域中的每个管理区域为存储介质中对应于至少一个物理地址的物理空间;The memory is used to store a read voltage management table, and the read voltage management table stores the corresponding relationship between the read voltage index and a plurality of management regions and a plurality of page types, and the read voltage index and different page types. The corresponding relationship between the read voltages under the following conditions, wherein, 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 storage medium corresponding to at least one page type Physical space for physical addresses;
    所述处理器,用于:the processor for:
    解析通过所述主机侧接口接收的读命令,获取所述读命令对应的目标物理地址;Parse the read command received through the host-side interface, and obtain the target physical address corresponding to the read command;
    基于所述目标物理地址,确定分别与所述目标物理地址对应的管理区域和目标页类型;Based on the target physical address, determining a management area and a target page type corresponding to the target physical address respectively;
    基于所述管理区域和所述目标页类型,从所述读电压管理表中获取第一读电压索引;obtaining a first read voltage index from the read voltage management table based on the management region and the target page type;
    根据所述第一读电压索引,从所述读电压管理表中获取第一读电压;obtaining a first read voltage from the read voltage management table according to the first read voltage index;
    根据所述第一读电压,通过所述存储介质侧接口向存储介质下发所述读命令,从所述存储介质中读取数据。According to the first read voltage, the read command is issued to the storage medium through the storage medium side interface, and data is read from the storage medium.
  12. 根据权利要求11所述的存储控制器,其特征在于,所述读电压管理表为二级表结构,其中,所述读电压管理表的第一级表存储所述多个管理区域和所述多个页类型与所述读电压索引之间的对应关系,所述读电压管理表的第二级表存储所述读电压索引与所述多个页类型下的读电压的对应关系。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 plurality of management regions and the The correspondence between a plurality of page types and the read voltage indexes, and the second level table of the read voltage management table stores the correspondence between the read voltage indexes and the read voltages under the plurality of page types.
  13. 根据权利要求11或12所述的存储控制器,其特征在于,所述处理器还用于:The storage controller according to claim 11 or 12, wherein the processor is further configured to:
    若根据所述第一读电压,从所述存储介质中读取数据失败,则获取第一读恢复电压;If reading data from the storage medium fails according to the first read voltage, obtaining a first read recovery voltage;
    根据所述第一读恢复电压,和所述第二级表中存储的读电压的关系,确定第二读恢复电压;determining the second read recovery voltage according to the relationship between the first read recovery voltage and the read voltage stored in the second level table;
    根据所述第二读恢复电压,更新待更新读电压管理表,得到所述读电压管理表。According to the second read recovery voltage, the read voltage management table to be updated is updated to obtain the read voltage management table.
  14. 根据权利要求13所述的存储控制器,其特征在于,所述处理器,用于:The storage controller according to claim 13, wherein the processor is configured to:
    若所述第一读恢复电压,和所述第二级表中存储的第二读电压的距离满足预设条件,则确定所述第二恢复读电压为所述第二读电压,其中,所述第一读恢复电压对应的页类型和所述第二读电压对应的页类型相同;If the distance between the first read recovery voltage and the second read voltage stored in the second-level table satisfies a preset condition, the second read recovery voltage is determined to be the second read voltage, wherein the The page type corresponding to the first read recovery voltage is the same as the page type corresponding to the second read voltage;
    若所述第一读恢复电压,和所述第二级表中存储的任一行读电压的距离均不满足预设条件,则确定所述第二读恢复电压为所述第一恢复读电压。If the distance between the first read recovery voltage and the read voltage of any row stored in the second-level table does not meet a preset condition, the second read recovery voltage is determined to be the first recovery read voltage.
  15. 根据权利要求14所述的存储控制器,其特征在于,所述第二级表还包括页类型计数,所述页类型计数用于表示命中某一物理地址对应的页类型的读电压的次数;The storage controller according to claim 14, wherein the second-level table further comprises a page type count, wherein the page type count is used to indicate the number of times the read voltage of the page type corresponding to a certain physical address is hit;
    所述处理器,用于:the processor for:
    若确定所述第二读恢复电压为所述第二读电压,则在待更新第二级表中,更新第二读电压对应的页类型计数,得到所述第二级表;If it is determined that the second read recovery voltage is the second read voltage, update the page type count corresponding to the second read voltage in the second-level table to be updated to obtain the second-level table;
    确定所述第二读电压对应的第一行标号,其中,所述第一行标号为所述第二读电压在所述第二级表中的行标号;determining the first row label corresponding to the second read voltage, wherein the first row label is the row label of the second read voltage in the second level table;
    在待更新第一级表中,将所述第一读电压索引的取值更新为所述第一行标号,得到所述第一级表。In the to-be-updated first-level table, the value of the first read voltage index is updated to the first row label to obtain the first-level table.
  16. 根据权利要求14所述的存储控制器,其特征在于,所述第二级表还包括页类型计数;The storage controller of claim 14, wherein the second level table further includes a page type count;
    所述处理器,用于:the processor for:
    若确定所述第二读恢复电压为所述第一恢复读电压,则在所述待更新第二级表中,确定第一页类型计数,其中,所述第一页类型计数在所述目标页类型对应的页类型计数中取值最小;If it is determined that the second read recovery voltage is the first recovery read voltage, a first page type count is determined in the second level table to be updated, wherein the first page type count is at the target The page type count corresponding to the page type has the smallest value;
    将第三读电压更新为所述第二读恢复电压,其中,所述第三读电压对应于所述第一页类型计数;updating a third read voltage to the second read recovery voltage, wherein the third read voltage corresponds to the first page type count;
    更新所述第一页类型计数的取值。Update the value of the first page type count.
  17. 根据权利要求16所述的存储控制器,其特征在于,所述处理器还用于:The storage controller of claim 16, wherein the processor is further configured to:
    确定所述第一页类型计数对应的第二行标号,其中,所述第二行标号为所述第一页类型计数在所述第二级表中的行标号;determining the second row label corresponding to the first page type count, wherein the second row label is the row label of the first page type count in the second level table;
    在所述待更新第一级表中,确定第二读电压索引,其中,所述第二读电压索引的取值为所述第二行标号,且所述第二读电压索引对应的页类型为所述目标页类型;In the to-be-updated first-level table, a second read voltage index is determined, wherein the value of the second read voltage index is the second row label, and the page type corresponding to the second read voltage index is the target page type;
    将第二读电压索引的取值更新为预设值;updating the value of the second read voltage index to a preset value;
    将所述第一读电压索引值更新为所述第二行标号。The first read voltage index value is updated to the second row number.
  18. 根据权利要求11至17中任一项所述的存储控制器,其特征在于,所述多个管理区域是根据所述存储介质的管理粒度预先划分的;The storage controller according to any one of claims 11 to 17, wherein the multiple management areas are pre-divided according to the management granularity of the storage medium;
    所述管理粒度包括所述存储介质的页,或所述存储介质的区块。The management granularity includes pages of the storage medium, or blocks of the storage medium.
  19. 根据权利要求11至17中任一项所述的存储控制器,其特征在于,所述存储介质包括NOR闪存或NAND闪存;The storage controller according to any one of claims 11 to 17, wherein the storage medium comprises a NOR flash memory or a NAND flash memory;
    所述NAND闪存包括:多层单元MLC、三层单元TLC或四层单元QLC。The NAND flash memory includes: multi-level cell MLC, three-level cell TLC or four-level cell QLC.
  20. 根据要求11至17中任一项所述的存储控制器,其特征在于,所述存储控制器包括UFS器件中的控制器。The storage controller according to any one of claims 11 to 17, wherein the storage controller comprises a controller in a UFS device.
  21. 一种存储系统,其特征在于,包括:A storage system, characterized in that it includes:
    控制器和存储介质;controllers and storage media;
    所述控制器包括权利要求11至20中任一项中的所述存储控制器;the controller comprising 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. 根据权利要求21所述的系统,其特征在于,所述存储介质包括NOR闪存或NAND闪存;The system according to claim 21, wherein the storage medium comprises NOR flash memory or NAND flash memory;
    所述NAND闪存包括多层单元MLC、三层单元TLC或四层单元QLC。The NAND flash memory includes a multi-level cell MLC, a three-level cell TLC or a four-level cell QLC.
  23. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中保存有程序,当所述计算机执行所述程序时,执行如权利要求1至10中任一项所述的方法。A computer-readable storage medium, characterized in that a program is stored in the computer-readable storage medium, and when the computer executes the program, the method according to any one of claims 1 to 10 is executed.
  24. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上执行时,所述计算机执行如权利要求1至10中任一项所述的方法。A computer program product, characterized in that, when the computer program product is executed on a computer, the computer executes the method according to any one of claims 1 to 10.
PCT/CN2020/127729 2020-11-10 2020-11-10 Method for reading storage medium, and related device WO2022099441A1 (en)

Priority Applications (2)

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
CN202080102871.8A CN115803814A (en) 2020-11-10 2020-11-10 Storage medium reading method and related equipment

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
WO2022099441A1 true WO2022099441A1 (en) 2022-05-19

Family

ID=81600709

Family Applications (1)

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

Country Status (2)

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

Cited By (2)

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

Citations (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
CN106057243A (en) * 2016-05-27 2016-10-26 华为技术有限公司 Method and device for determining applied read reference voltages
CN106448737A (en) * 2016-09-30 2017-02-22 北京忆芯科技有限公司 Flash memory data reading method and device and solid disk drive
CN108735253A (en) * 2017-04-20 2018-11-02 三星电子株式会社 non-volatile memory storage system
CN110007861A (en) * 2019-03-29 2019-07-12 新华三技术有限公司 A kind of method for reading data and device

Patent Citations (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
CN106057243A (en) * 2016-05-27 2016-10-26 华为技术有限公司 Method and device for determining applied read reference voltages
CN106448737A (en) * 2016-09-30 2017-02-22 北京忆芯科技有限公司 Flash memory data reading method and device and solid disk drive
CN108735253A (en) * 2017-04-20 2018-11-02 三星电子株式会社 non-volatile memory storage system
CN110007861A (en) * 2019-03-29 2019-07-12 新华三技术有限公司 A kind of method for reading data and device

Cited By (4)

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

Also Published As

Publication number Publication date
CN115803814A (en) 2023-03-14

Similar Documents

Publication Publication Date Title
US11789860B2 (en) Logical to physical mapping management using low-latency non-volatile memory
US10884947B2 (en) Methods and memory systems for address mapping
KR101283289B1 (en) Method and system for wear leveling in a solid state drive
TWI437439B (en) Method for performing block management using dynamic threshold, and associated memory device and controller thereof
US10698762B2 (en) Data reading method and storage controller
US9563498B2 (en) Method for preventing read-disturb errors, memory control circuit unit and memory storage apparatus
US11003587B2 (en) Memory system with configurable NAND to DRAM ratio and method of configuring and using such memory system
WO2022099441A1 (en) Method for reading storage medium, and related device
US20200225882A1 (en) System and method for compaction-less key-value store for improving storage capacity, write amplification, and i/o performance
US9418731B1 (en) Memory management method, memory storage device and memory control circuit unit
CN110377233B (en) SSD (solid State disk) reading performance optimization method and device, computer equipment and storage medium
US10896125B2 (en) Garbage collection methods and memory systems for hybrid address mapping
US20190129647A1 (en) Method, device and computer program product for managing disk array
JP2018163707A (en) Semiconductor storage device and read control method of the same
US11763899B2 (en) Balanced three-level read disturb management in a memory device
US9880930B2 (en) Method for operating controller and method for operating device including the same
CN114360612A (en) Read voltage level correction method, memory storage device and control circuit unit
CN113076218B (en) Method for rapidly processing data reading errors of NVM (non-volatile memory) chip and controller thereof
CN112764662B (en) Method, apparatus and computer program product for storage management
US11199991B2 (en) Method and apparatus for controlling different types of storage units
US11409599B2 (en) Managing probabilistic data integrity scans in workloads with localized read patterns
CN114385074A (en) Firmware parameter optimization system and method
US10261715B2 (en) Storage space management method and apparatus
US20230409203A1 (en) Memory system and read method
US11656979B2 (en) Data tiering in heterogeneous memory system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20961000

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20961000

Country of ref document: EP

Kind code of ref document: A1