Optimized read command processing method and equipment
The read threshold parameters are intelligently selected through the read command adjustment unit of the media interface controller, which solves the complex problem of the error handling process of the read command of the storage device, achieves faster error processing and lower error rates, and extends the service life of the device.
Patent Information
- Application Number
- CN202411960901.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-27
- Publication Date
- 2025-04-25
AI Technical Summary
When existing storage devices process read commands, the error processing process is complex, resulting in an extended error processing time, increasing the load of the storage command processing unit, and limiting its processing capacity.
Through the read command adjustment unit of the media interface controller, the read threshold parameters in the read redo command are intelligently selected and prompted to read the read threshold parameters in the rework command, shortening the error processing time, reducing the error rate of the storage device, and extending its service life.
It effectively shortens the error processing time, reduces the error rate of the storage device, extends its service life, and improves the processing capability of the storage command processing unit.
Smart Images

Figure CN119889412A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to storage device technology, and more particularly to a method for intelligently performing read redo on NVM in a storage device and a media interface controller for implementing the method. Background Art
[0002] Figure 1 The block diagram of the storage device is shown. The storage device 102 is coupled to the host to provide storage capacity for the host. The host and the storage device 102 can be coupled in a variety of ways, including but not limited to connecting the host and the storage device 102 through, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface), SAS (Serial Attached SCSI), IDE (Integrated Drive Electronics), USB (Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe), NVMe (NVM Express), Ethernet, Fiber Channel, wireless communication network, etc. The host can be an information processing device that can communicate with the storage device in the above manner, such as a personal computer, a tablet computer, a server, a portable computer, a network switch, a router, a cellular phone, a personal digital assistant, etc. The storage device 102 includes an interface 103 , a control component 104 , one or more NVM chips 105 , and a DRAM (Dynamic Random Access Memory) 110 .
[0003] NAND flash memory, phase change memory, FeRAM (Ferroelectric RAM), MRAM (Magnetic Random Access Memory), RRAM (Resistive Random Access Memory), XPoint memory, etc. are common NVMs. The data stored in NVM will be damaged to a certain extent. To overcome such problems, the data stored on NVM is usually protected by error correction code (ECC) when accessing NVM. Common error correction codes include BCH code, LDPC, RS code, etc.
[0004] The interface 103 may be adapted to exchange data with the host via, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, etc.
[0005] The control component 104 is used to control data transmission between the interface 103, the NVM chip 105 and the DRAM 110, and is also used for storage management, mapping of host logical addresses to flash physical addresses, erase leveling, bad block management, etc. The control component 104 can be implemented in a variety of ways, such as software, hardware, firmware, or a combination thereof. For example, the control component 104 can be in the form of an FPGA (Field-programmable gate array), an ASIC (Application Specific Integrated Circuit), or a combination thereof. The control component 104 can also include a processor or a controller, in which software is executed to manipulate the hardware of the control component 104 to process IO (Input / Output) commands. The control component 104 can also be coupled to the DRAM 110 and can access the data of the DRAM 110. The data of the FTL table and / or cached IO commands can be stored in the DRAM.
[0006] The control component 104 includes a flash memory interface controller (or medium interface controller, flash memory channel controller), which is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in a manner that complies with the interface protocol of the NVM chip 105 to operate the NVM chip 105, and receives command execution results output from the NVM chip 105. Known NVM chip interface protocols include "Toggle", "ONFI" and the like.
[0007] The NVM chip includes one or more logic units (LUNs). The NVM chip package may include one or more dies. Typically, a logic unit corresponds to a single die. A logic unit may include multiple planes. Multiple planes within a logic unit can be accessed in parallel, and multiple logic units within an NVM chip can execute commands and report status independently of each other.
[0008] The "Open NAND Flash Interface Specification (Revision 3.0)" obtained from http: / / www.micron.com / ~ / media / Documents / Products / Other%20Documents / ONFI3_0Gold.aspx provides the meanings of target, logic unit, and plane, which is part of the prior art.
[0009] NVM chips usually store and read data by page. And erase data by block. A block (also called a physical block) contains multiple pages (also called physical pages). A physical page has a fixed size, such as 17664 bytes. A physical page can also have other sizes.
[0010] Figure 2 A detailed block diagram showing the control components of a storage device.
[0011] The host accesses the storage device with IO commands that comply with the storage protocol. The control component generates one or more storage commands based on the IO commands from the host and provides them to the media interface controller. The media interface controller generates storage media access commands (e.g., programming commands, read commands, and erase commands) that comply with the interface protocol of the NVM chip based on the storage commands. The control component also tracks that all storage commands generated from an IO command have been executed and indicates the processing results of the IO commands to the host.
[0012] See also Figure 2 The control components include, for example, a host interface, a host command processing unit, a storage command processing unit, a medium interface controller, and a storage medium management unit. The host interface obtains the IO command provided by the host, and generates a storage command to provide to the storage command processing unit. The storage command, for example, accesses storage space of the same size, such as 4KB. The data unit corresponding to the data accessed by a storage command recorded in the NVM chip is called a data frame. The physical page records one or more data frames. For example, the size of the physical page is 17664 bytes, and the size of the data frame is 4KB, then one physical page can store 4 data frames.
[0013] The smallest data unit protected by the data correction code is called an ECC block. An ECC block includes user data and check data and has different sizes. The ratio of the user data unit size to the ECC block size is called the ECC code rate. The ECC code rate reflects the error correction capability of the ECC. Generally speaking, the lower the code rate, the stronger the error correction capability. In one example, the user data size in the ECC block is the size of a data frame, and the check data size is 15 bytes. In another example, the user data size in the ECC block is 512 bytes, and the check data size is 8 bytes, so that one data frame can accommodate multiple ECC blocks.
[0014] The storage medium management unit maintains the conversion of logical addresses to physical addresses for each storage command. For example, the storage medium management unit includes an FTL table. For a read command, the storage medium management unit outputs the physical address corresponding to the logical address accessed by the storage command. For a write command, the storage medium management unit allocates an available physical address and records the mapping relationship between the logical address accessed and the allocated physical address. The storage medium management unit also maintains functions required to manage the NVM chip, such as garbage collection and wear leveling.
[0015] The storage command processing unit operates the media interface controller to issue a storage medium access command to the NVM chip according to the physical address provided by the storage medium management unit. For the purpose of clarity, the command sent by the storage command processing unit to the media interface controller is called a media interface command, and the command sent by the media interface controller to the NVM chip is called a storage medium access command. The storage medium access command follows the interface protocol of the NVM chip. Taking the storage medium access read command as an example, the read commands supported by the NVM chip are divided into multiple types according to the size of the data read, such as a read command to read a complete physical page, a read command to read one, two or more data frames, a read command to read multiple planes, a read command to read multiple physical pages of a word line, etc.
[0016] The media interface command corresponds to the storage medium access command, so that the media interface controller determines the type of the generated storage medium access command according to the type of the media interface command.
[0017] Figure 3 A block diagram of a prior art media interface controller is shown.
[0018] The media interface controller of the control component includes a media interface, an ECC encoding unit and an ECC decoding unit. The media interface is coupled to the NVM chip, provides a storage medium access command to the NVM chip and obtains data from the NVM chip according to the storage medium access read command. The media interface couples the ECC encoding unit and the ECC decoding unit. The media interface controller receives the data from the storage command processing unit (see also Figure 2) obtains the media interface command, generates and provides the storage media access command to the NVM chip. When writing data to the NVM chip, the media interface controller moves the data to be written from the memory to the NVM chip. When reading data from the NVM chip, the media interface controller moves the data read from the NVM chip to the memory. The ECC encoding unit performs ECC encoding on the data to be written, and the ECC decoding unit performs ECC decoding on the data read from the NVM chip, and the decoding result is written to the memory.
[0019] The memory is, for example, a DRAM coupled to the control unit or an SRAM integrated in the control unit.
[0020] See also Figure 3 Taking data reading as an example, when the media interface controller is working, the storage command processing unit provides the media interface command to the media interface controller ( Figure 3 The media interface generates a storage media access (read) command and provides it to the NVM chip ( Figure 3 The media interface also provides the read data output by the NVM chip to the ECC decoding unit ( Figure 3 As an example, if the ECC decoding unit fails to decode, the media interface controller notifies the storage command processing unit of the decoding failure ( Figure 3 The storage command processing unit starts the error handling process, such as performing error correction through read retry, and provides a medium interface command indicating read retry to the medium interface controller, and the medium interface generates a storage medium access (read) command indicating read retry and provides it to the NVM chip ( Figure 3 , indicated by (5). A read redo is a read command that can be processed by the NVM chip, which has a specified read threshold parameter. The read redo command, for example, carries a read threshold parameter to indicate the read threshold to be used. By adjusting the read threshold parameter, there is an opportunity to adapt to the characteristics of the storage medium of the NVM chip (random noise, wear, electron escape, etc.), so as to increase the probability of reading correct data.
[0021] In response to a storage medium access (read) command indicating a read re-do, the NVM chip outputs the read data, and the medium interface provides the read data to the ECC decoding unit for ECC decoding again ( Figure 3 As an example, if the ECC decoding is successful, the decoded data is moved into the memory ( Figure 3 If the ECC decoding fails again at "(6)", error handling is also performed by repeating the process from "(4)" to "(7)".
[0022] In some other examples, the media interface controller autonomously implements read redo. In response to the ECC decoding unit decoding failure, the media interface controller directly tries one or more other read threshold parameters through a media interface command indicating read redo. Summary of the invention
[0023] The storage command processing unit is capable of implementing complex error recovery processes, but the error handling process between the storage command processing unit and the media interface controller prolongs the error handling time and increases the load of the storage command processing unit. In the case where the storage command processing unit is implemented by running software, this increase in load becomes particularly serious, which not only prolongs the read command processing time, but also limits the processing capacity of the storage command processing unit due to the increase in load. In the case where the media interface controller spontaneously implements read redo, due to complexity limitations, the media interface controller attempts fewer types of read redo or cannot implement complex strategies for searching read threshold parameters.
[0024] Alternatively or further, in some cases, the supplier of the control component of the storage device delivers a programmable control component to the storage device manufacturer. The storage device manufacturer programs and implements the storage command processing unit, while the supplier of the control component implements the media interface controller. The supplier of the media interface controller usually has a more complete understanding of the characteristics of the NVM chip, so that it can better implement the error recovery process of the read command, including using a better read redo command to complete the processing of the read command faster or more efficiently. However, the storage device manufacturer may have a relatively low understanding of the characteristics of the NVM chip. Therefore, it is hoped that the media interface controller will provide more guidance for the error recovery process and intelligently select or prompt the read threshold parameters used in the read redo to shorten the error processing time, reduce the error rate of the storage device, and extend the service life of the storage device.
[0025] In order to solve the above technical problems, according to the first aspect of the present application, a first read command processing method according to the first aspect of the present application is provided, including: receiving a medium interface command; adjusting a read command or a read redo command to be generated according to the medium interface command, and providing the adjusted read command or read redo command to a non-volatile memory chip.
[0026] According to the first read command processing method of the first aspect of the present application, a second read command processing method according to the first aspect of the present application is provided, wherein a first read threshold parameter for the physical address is identified based on the physical address accessed by the read command or read redo command to be generated.
[0027] According to the second read command processing method of the first aspect of the present application, a third read command processing method according to the first aspect of the present application is provided, wherein the generated read command or read redo command is updated according to the identified first read threshold parameter, and the read command or read redo command is updated to indicate a read redo command using the first read threshold parameter.
[0028] According to the second or third read command processing method of the first aspect of the present application, a fourth read command processing method according to the first aspect of the present application is provided, wherein if the first read threshold parameter of the physical address used for the read command or the read redo command cannot be found, the read command or the read redo command is not updated, and a non-volatile memory chip is directly provided.
[0029] According to the first to fourth read command processing methods of the first aspect of the present application, a fifth read command processing method according to the first aspect of the present application is provided, wherein, according to the read redo command to be generated, if the read redo command to be generated is invalid for the physical address to be accessed by the read redo command to be generated, or does not have a better effect than the read command, the read redo command is updated to a read command to access the physical address.
[0030] According to the first to fourth read command processing methods of the first aspect of the present application, a sixth read command processing method according to the first aspect of the present application is provided, wherein, according to the read redo command to be generated, if the read redo command to be generated is invalid for the physical address to be accessed by the read redo command to be generated, or does not have a better effect than the read command, the read redo command is directly provided to the non-volatile memory chip without updating the read redo command.
[0031] According to the first to sixth read command processing methods of the first aspect of the present application, a seventh read command processing method according to the first aspect of the present application is provided, wherein, according to a read redo command to be generated, if a first read threshold parameter is identified for a physical address to be accessed by the read redo command to be generated, the read redo command is updated to indicate a read redo command using the first read threshold parameter.
[0032] According to the first to seventh read command processing methods of the first aspect of the present application, an eighth read command processing method according to the first aspect of the present application is provided, wherein, according to the read command or read redo command to be generated, the read threshold table is queried with the physical address to be accessed by the read command or read redo command or part of the physical address to obtain the read threshold corresponding to the physical address to be accessed, and the read command or read redo command is updated with the obtained read threshold, and the updated command is provided to the non-volatile memory chip.
[0033] According to the eighth read command processing method of the first aspect of the present application, a ninth read command processing method according to the first aspect of the present application is provided, wherein, if there is an entry in the read threshold table that records the physical address to be accessed and the read threshold, the read command to be generated is updated to a read redo command using the read threshold in the entry and the read redo command is provided to the media interface.
[0034] According to the eighth or ninth read command processing method of the first aspect of the present application, a tenth read command processing method according to the first aspect of the present application is provided, wherein, according to the read redo command to be generated indicating the use of a second read threshold to access a physical address, the read threshold table is queried using the physical address, and if there is no entry recording the physical address in the read threshold table, the read redo command is provided to the non-volatile memory chip without modification, and an entry recording the physical address and the second read threshold is also added to the read threshold table.
[0035] According to the eighth to tenth read command processing methods of the first aspect of the present application, an eleventh read command processing method according to the first aspect of the present application is provided, wherein, according to the read redo command to be generated, the read redo command indicates the use of a third read threshold to access the physical address, and the read threshold table is queried with the physical address. If there is an entry in the read threshold table that records the physical address, but the fourth read threshold recorded in the entry is different from the third read threshold, the read redo command is provided to the non-volatile memory chip without modification, and the read threshold of the entry in the read threshold table that records the physical address is also updated to the third read threshold.
[0036] According to the eighth to eleventh read command processing methods of the first aspect of the present application, a twelfth read command processing method according to the first aspect of the present application is provided, which also includes identifying an uncorrectable mark in a read threshold table entry, wherein the uncorrectable mark indicates that the data obtained by accessing the corresponding physical address using the read threshold recorded in the read threshold entry cannot be correctly decoded by the error correction code.
[0037] According to the twelfth read command processing method of the first aspect of the present application, a thirteenth read command processing method according to the first aspect of the present application is provided, wherein, if an uncorrectable mark exists in the read threshold entry corresponding to the physical address indicated by the read command to be generated, the read command is directly provided to the non-volatile memory chip.
[0038] According to the twelfth or thirteenth read command processing method of the first aspect of the present application, a fourteenth read command processing method according to the first aspect of the present application is provided, wherein, according to the read redo command to be generated, if there is an entry of the physical address indicated by the read redo command in the read threshold table, but the entry has an uncorrectable flag, then the uncorrectable flag in the entry is cleared and the read redo command is provided to the non-volatile memory chip.
[0039] According to the twelfth to fourteenth read command processing methods of the first aspect of the present application, a fifteenth read command processing method according to the first aspect of the present application is provided, wherein, in response to the failure of an error correction code decoding unit to decode data read from a non-volatile memory chip according to a read command or a read redo command accessing a first physical address, an uncorrectable flag is set in the entry corresponding to the first physical address in the read threshold table.
[0040] According to the twelfth to fifteenth read command processing methods of the first aspect of the present application, a sixteenth read command processing method according to the first aspect of the present application is provided, wherein, in response to the failure of an error correction code decoding unit to decode data read from a non-volatile memory chip according to a read command or a read redo command accessing a first physical address, if there is no entry corresponding to the first physical address in the read threshold table, an entry corresponding to the first physical address is added to the read threshold table, and an uncorrectable flag is set for the entry.
[0041] According to the eighth to sixteenth read command processing methods of the first aspect of the present application, a seventeenth read command processing method according to the first aspect of the present application is provided, wherein the physical address in the entry of the read threshold table is the physical block number of the non-volatile memory chip, the layer number of the 3D non-volatile memory chip, or a combination of the physical block number and the layer number.
[0042] According to the seventeenth read command processing method of the first aspect of the present application, an eighteenth read command processing method according to the first aspect of the present application is provided, wherein the number of entries in the read threshold table is sufficient to accommodate all possible values of the physical block number, the layer number of the 3D non-volatile memory chip, or the combination of the physical block number and the layer number.
[0043] According to the seventeenth read command processing method of the first aspect of the present application, a nineteenth read command processing method according to the first aspect of the present application is provided, wherein the number of entries in the read threshold table can only accommodate some possible values of the physical block number, the layer number of the 3D non-volatile memory chip, or the combination of the physical block number and the layer number.
[0044] According to the first to nineteenth read command processing methods of the first aspect of the present application, a twentieth read command processing method according to the first aspect of the present application is provided, wherein the medium interface command also includes a receive read command adjustment unit enable flag.
[0045] According to the twentieth read command processing method of the first aspect of the present application, a twenty-first read command processing method according to the first aspect of the present application is provided, wherein, if the read command adjustment unit enable mark is valid, the read command or read redo command to be generated according to the media interface command is adjusted.
[0046] According to the twentieth or twenty-first read command processing method of the first aspect of the present application, a twenty-second read command processing method according to the first aspect of the present application is provided, wherein, if the read command adjustment unit enable flag is invalid, the read command or read redo command to be generated according to the media interface command is directly provided to the non-volatile memory chip.
[0047] According to the first to twenty-second read command processing methods of the first aspect of the present application, a twenty-third read command processing method according to the first aspect of the present application is provided, which also includes providing a predicted read threshold for the physical address accessed by the read command or read redo command to be generated.
[0048] According to the twenty-third read command processing method of the first aspect of the present application, a twenty-fourth read command processing method according to the first aspect of the present application is provided, wherein a predicted read threshold is given according to a read threshold table.
[0049] According to the twenty-fourth read command processing method of the first aspect of the present application, a twenty-fifth read command processing method according to the first aspect of the present application is provided, wherein an average value or a weighted average value is calculated for the read thresholds of all or part of the entries in the read threshold table as a predicted read threshold.
[0050] According to the twenty-fourth or twenty-fifth read command processing method of the first aspect of the present application, there is provided a twenty-sixth read command processing method according to the first aspect of the present application, wherein an average value or a weighted average value is calculated for the read thresholds of all or part of the entries in the read threshold table having a physical address close to the physical address to be accessed by the generated read command or read redo command as a predicted read threshold.
[0051] According to the twenty-sixth read command processing method of the first aspect of the present application, there is provided a twenty-seventh read command processing method according to the first aspect of the present application, wherein the physical address proximity includes that the two physical addresses are numerically close, the storage units represented by the two physical addresses are spatially close in position on the non-volatile memory chip, and / or the usage status of the storage units represented by the two physical addresses are close.
[0052] According to the twenty-fourth read command processing method of the first aspect of the present application, a twenty-eighth read command processing method according to the first aspect of the present application is provided, which also includes predicting the read threshold based on the temperature, the number of erase and write times and / or the number of read times of the storage unit.
[0053] According to the twenty-fourth to twenty-eighth read command processing methods of the first aspect of the present application, a twenty-ninth read command processing method according to the first aspect of the present application is provided, which also includes generating a read redo command using a predicted read threshold and providing it to a non-volatile memory chip.
[0054] According to the twenty-fourth to twenty-ninth read command processing methods of the first aspect of the present application, a thirtieth read command processing method according to the first aspect of the present application is provided, which further includes updating the read threshold table using the predicted read threshold.
[0055] According to the twenty-fourth to thirtieth read command processing methods of the first aspect of the present application, a thirty-first read command processing method according to the first aspect of the present application is provided, which further includes generating a predicted read threshold based on an uncorrectable mark of a read threshold table.
[0056] According to the thirty-first read command processing method of the first aspect of the present application, a thirty-second read command processing method according to the first aspect of the present application is provided, wherein, in response to the presence of an uncorrectable mark, a predicted read threshold different from the read threshold indicated by the entry where the uncorrectable mark is located is generated.
[0057] According to the twenty-fourth to thirty-second read command processing methods of the first aspect of the present application, a thirty-third read command processing method according to the first aspect of the present application is provided, wherein the read threshold recorded in the entry of the read threshold table is increased by a specified number of units in the direction of increasing the read threshold as a predicted read threshold.
[0058] According to the twenty-fourth to thirty-third read command processing methods of the first aspect of the present application, a thirty-fourth read command processing method according to the first aspect of the present application is provided, wherein the medium interface command also includes a read threshold prediction enable flag.
[0059] According to the thirty-fourth read command processing method of the first aspect of the present application, a thirty-fifth read command processing method according to the first aspect of the present application is provided, wherein, if the read threshold prediction enable flag is valid, a predicted read threshold is generated for the accessed physical address.
[0060] According to the thirty-fourth to thirty-fifth read command processing methods of the first aspect of the present application, a thirty-sixth read command processing method according to the first aspect of the present application is provided, wherein if the read threshold prediction enable flag is invalid, the predicted read threshold is not provided.
[0061] According to the twenty-fourth to thirtieth read command processing methods of the first aspect of the present application, there is provided a thirty-seventh read command processing method according to the first aspect of the present application, wherein a first medium interface command is provided to the medium interface;
[0062] In response to the media interface indicating that an uncorrectable error occurred in processing the first media interface command, a second media interface command is provided to the media interface, wherein the second media interface command accesses the same physical address as the first media command and the second media interface command also carries a valid read threshold prediction enable flag.
[0063] According to the first to thirty-seventh read command processing methods of the first aspect of the present application, a thirty-eighth read command processing method according to the first aspect of the present application is provided, wherein a corresponding microinstruction sequence is acquired according to the medium interface command to be generated, and a specified signal is generated on a lead coupled to a non-volatile memory chip according to a signal indicated by the microinstruction sequence;
[0064] The microinstructions of the microinstruction sequence include a get read threshold microinstruction and / or an update read threshold microinstruction.
[0065] According to the thirty-eighth read command processing method of the first aspect of the present application, a thirty-ninth read command processing method according to the first aspect of the present application is provided, wherein the operand of the obtain read threshold microinstruction includes a physical address.
[0066] According to the thirty-eighth to thirty-ninth read command processing methods of the first aspect of the present application, a fortieth read command processing method according to the first aspect of the present application is provided, wherein the operand for obtaining the read threshold microinstruction also includes a register storing a read threshold table or a register storing an index of the read threshold table.
[0067] According to the thirty-eighth to fortieth read command processing methods of the first aspect of the present application, a forty-first read command processing method according to the first aspect of the present application is provided, wherein the obtain read threshold microinstruction also includes a result register, and in response to the obtain read threshold microinstruction being executed, the result register is filled with the read threshold corresponding to the physical address indicated by the obtain read threshold microinstruction.
[0068] According to the forty-first read command processing method of the first aspect of the present application, a forty-second read command processing method according to the first aspect of the present application is provided, wherein, when executing a get read threshold microinstruction, the physical address indicated by the get read threshold microinstruction is used to obtain the entry corresponding to the physical address from the read threshold table, and the read threshold of the entry is obtained to fill the result register.
[0069] According to the forty-first read command processing method of the first aspect of the present application, a forty-third read command processing method according to the first aspect of the present application is provided, wherein when executing the get read threshold microinstruction, the result register is filled with the predicted read threshold.
[0070] According to the thirty-eighth to forty-third read command processing methods of the first aspect of the present application, a forty-fourth read command processing method according to the first aspect of the present application is provided, wherein the read threshold obtained by the obtain read threshold microinstruction is used to configure a microinstruction sequence for processing a read redo command, so that when the microinstruction sequence is executed, a read redo command indicating the obtained read threshold is provided to the non-volatile memory chip.
[0071] According to the thirty-eighth to forty-fourth read command processing methods of the first aspect of the present application, a forty-fifth read command processing method according to the first aspect of the present application is provided, wherein a microinstruction sequence for processing a read redo command includes a microinstruction sequence for generating a set feature command and a microinstruction sequence for generating a read redo command, the microinstruction sequence for setting the feature command is used to set the read threshold of the read redo command to a fifth read threshold; the read threshold of the read instruction corresponding to the read redo command is the fourth read threshold.
[0072] According to the forty-fifth read command processing method of the first aspect of the present application, a forty-sixth read command processing method according to the first aspect of the present application is provided, wherein the microinstruction sequence for processing the read redo command also includes an additional microinstruction sequence for generating a set feature command, which is used to set the read threshold to the fourth read threshold used by the read command after the read redo command processing is completed.
[0073] According to the thirty-eighth to forty-sixth read command processing methods of the first aspect of the present application, a forty-seventh read command processing method according to the first aspect of the present application is provided, wherein the operands of the update read threshold microinstruction include a physical address and the value of the read threshold to be updated.
[0074] According to the forty-seventh read command processing method of the first aspect of the present application, a forty-eighth read command processing method according to the first aspect of the present application is provided, wherein, in response to an update read threshold microinstruction being executed, the corresponding entry of the read threshold table is obtained according to the physical address indicated by the update read threshold microinstruction, and the read threshold indicated by the microinstruction is written into the entry.
[0075] According to the first to forty-eight read command processing methods of the first aspect of the present application, a forty-ninth read command processing method according to the first aspect of the present application is provided, wherein, in response to the available space in the local cache being less than a threshold, a read pause signal is generated to instruct the non-volatile memory chip to pause outputting data to be acquired by a read command or a read redo command.
[0076] According to the forty-ninth read command processing method of the first aspect of the present application, a fiftieth read command processing method according to the first aspect of the present application is provided, wherein, in response to the available space in the local cache being not less than a threshold, the read pause signal is revoked.
[0077] According to the forty-ninth or fiftieth read command processing method of the first aspect of the present application, a fifty-first read command processing method according to the first aspect of the present application is provided, wherein, in response to a read pause signal, a read enable signal or clock signal provided to the non-volatile memory chip is paused or revoked.
[0078] According to the forty-ninth or fiftieth read command processing method of the first aspect of the present application, a fifty-second read command processing method according to the first aspect of the present application is provided, wherein a signal is generated to put the non-volatile memory chip in a pause state, thereby instructing the non-volatile memory chip to pause outputting data to be obtained by a read command or a read redo command.
[0079] According to the fifty-first read command processing method of the first aspect of the present application, a fifty-third read command processing method according to the first aspect of the present application is provided, wherein, in a state in which the non-volatile memory chip is instructed to suspend outputting data, in response to revoking the read suspend signal, or no longer generating the read suspend signal, the read enable signal or clock signal provided to the non-volatile memory chip is restored to instruct the non-volatile memory chip to continue outputting the data to be obtained by the read command or the read redo command.
[0080] According to the forty-ninth to fifty-third read command processing methods of the first aspect of the present application, a fifty-fourth read command processing method according to the first aspect of the present application is provided, wherein the local cache is managed according to the size of the error correction code block.
[0081] According to the thirty-eighth to fifty-fourth read command processing methods of the first aspect of the present application, a fifty-fifth read command processing method according to the first aspect of the present application is provided, wherein the microinstruction sequence for generating a read command or a read redo command also includes a get read threshold microinstruction and / or an update read threshold microinstruction.
[0082] According to the fifty-fifth read command processing method of the first aspect of the present application, a fifty-sixth read command processing method according to the first aspect of the present application is provided, wherein, by executing a microinstruction for obtaining a read threshold, if the read threshold to be used is obtained, a microinstruction sequence for generating a read redo command is called to continue processing, and the microinstruction sequence for processing the read redo command is configured with the obtained read threshold to issue a read redo command to the non-volatile memory chip.
[0083] According to the fifty-fifth or fifty-sixth read command processing method of the first aspect of the present application, a fifty-seventh read command processing method according to the first aspect of the present application is provided, wherein, in order to generate a read redo command, a get read threshold microinstruction is first called to obtain a read threshold or a predicted read threshold, and the obtained read threshold or predicted read threshold is used to configure the microinstruction sequence for generating the read redo command to issue a read redo command to the non-volatile memory chip.
[0084] According to the fifty-seventh read command processing method of the first aspect of the present application, a fifty-eighth read command processing method according to the first aspect of the present application is provided, wherein an update read threshold microinstruction is also executed to update the read threshold recorded in the entry in the read threshold table corresponding to the physical address to be accessed.
[0085] According to the first to fifty-eight read command processing methods of the first aspect of the present application, a fifty-ninth read command processing method according to the first aspect of the present application is provided, wherein a signal driver is driven according to a signal indicated by a microinstruction sequence to generate a specified signal on a lead coupled to a non-volatile memory chip.
[0086] According to the fifty-ninth read command processing method of the first aspect of the present application, a sixtieth read command processing method according to the first aspect of the present application is provided, wherein the microinstruction sequence also includes a count value indicating that the specified signal is repeatedly driven multiple times.
[0087] According to the sixtieth read command processing method of the first aspect of the present application, a sixty-first read command processing method according to the first aspect of the present application is provided, wherein counting is stopped in response to the read suspend signal being valid.
[0088] According to the sixtieth or sixty-first read command processing method of the first aspect of the present application, there is provided a sixty-second read command processing method according to the first aspect of the present application, wherein counting is resumed in response to the read suspend signal being invalidated or revoked.
[0089] According to the sixtieth to sixty-second read command processing methods of the first aspect of the present application, a sixty-third read command processing method according to the first aspect of the present application is provided, wherein, when counting is stopped, the driving lead is stopped to instruct the non-volatile memory chip to suspend data transmission.
[0090] According to the fifty-ninth to sixty-third read command processing methods of the first aspect of the present application, a sixty-fourth read command processing method according to the first aspect of the present application is provided, wherein the read pause signal also instructs the signal driver to generate an invalid or revoked read enable signal on a lead coupled to the non-volatile memory chip to instruct the non-volatile memory chip to suspend data transmission.
[0091] According to the fifty-ninth to sixty-fourth read command processing methods of the first aspect of the present application, a sixty-fifth read command processing method according to the first aspect of the present application is provided, wherein the read pause signal also instructs the signal driver to generate a signal on a lead coupled to the non-volatile memory chip to indicate that the non-volatile memory chip enters a pause state.
[0092] According to the fifty-ninth to sixty-fifth read command processing methods of the first aspect of the present application, a sixty-sixth read command processing method according to the first aspect of the present application is provided, wherein the read pause signal is only valid for the execution of a microinstruction sequence that generates a read command or a read redo command.
[0093] According to the fifty-ninth to sixty-sixth read command processing methods of the first aspect of the present application, a sixty-seventh read command processing method according to the first aspect of the present application is provided, wherein a yield process is performed in response to a read suspend signal.
[0094] According to the sixty-seventh read command processing method of the first aspect of the present application, a sixty-eighth read command processing method according to the first aspect of the present application is provided, wherein, in response to a read pause signal, the execution of the current microinstruction sequence for generating a read command or a read redo command is paused, and the partial or complete execution status of the current microinstruction sequence for generating a read command or a read redo command is saved.
[0095] According to the sixty-seventh or sixty-eighth read command processing method of the first aspect of the present application, a sixty-ninth read command processing method according to the first aspect of the present application is provided, wherein, after pausing the execution of the current microinstruction sequence for generating a read command or a read redo command, other microinstruction sequences are executed to send a read command or a read redo command to other non-volatile memory chips or other logical units of the non-volatile memory chip.
[0096] According to the sixty-ninth read command processing method of the first aspect of the present application, there is provided the seventieth read command processing method according to the first aspect of the present application, wherein, after the read pause signal is revoked and other microinstruction sequences or other microinstruction sequences are processed and the execution concessions are completed, part or all of the execution status of the previously saved microinstruction sequence for generating a read command or a read redo command is restored, and the previously saved microinstruction sequence for generating a read command or a read redo command continues to be processed.
[0097] According to a second aspect of the present application, there is provided a first medium interface controller according to the second aspect of the present application, comprising a read command adjustment unit, a medium interface and an error correction code decoding unit, wherein the medium interface is coupled with the read command adjustment unit and the error correction code decoding unit;
[0098] The read command adjustment unit adjusts only the media interface command corresponding to the read command or the read redo command according to the media interface command, and provides the adjusted media interface command to the media interface.
[0099] According to the first medium interface controller of the second aspect of the present application, there is provided a second medium interface controller according to the second aspect of the present application, wherein the read command adjustment unit includes a command parsing unit and a read threshold table, the read command adjustment unit maintains the read threshold table, the read threshold table includes a plurality of entries, and the entries of the read threshold table include a physical address and a read threshold;
[0100] In response to receiving a media interface command corresponding to a read command or a read redo command, the command parsing unit queries the read threshold table with the physical address to be accessed by the read command or the read redo command or a portion of the physical address to obtain the read threshold corresponding to the physical address to be accessed, and updates the media interface command corresponding to the read command or the read redo command with the obtained read threshold, and provides the updated command to the media interface.
[0101] According to the first or second medium interface controller of the second aspect of the present application, there is provided a third medium interface controller according to the second aspect of the present application, wherein the medium interface includes a microinstruction execution unit and a signal driver;
[0102] The medium interface obtains the corresponding microinstruction sequence according to the received medium interface command and provides it to the microinstruction execution unit; the microinstruction execution unit executes the microinstruction sequence, drives the signal driver according to the signal indicated by the microinstruction sequence, generates a specified serial number on the lead that couples the medium interface with the non-volatile memory chip, and generates a signal sequence that complies with the non-volatile memory chip interface protocol by executing the microinstruction sequence.
[0103] According to the third media interface controller of the second aspect of the present application, a fourth media interface controller according to the second aspect of the present application is provided, wherein the microinstruction sequence corresponding to the media interface command corresponding to the read command or the read redo command includes a get read threshold microinstruction and / or an update read threshold microinstruction.
[0104] According to the fourth media interface controller of the second aspect of the present application, a fifth media interface controller according to the second aspect of the present application is provided, wherein, in response to the execution of the get read threshold microinstruction, the physical address or part thereof indicated by the get read threshold microinstruction is used to query the read threshold table, and the read threshold obtained according to the read threshold table is obtained.
[0105] According to the fourth or fifth media interface controller of the second aspect of the present application, a sixth media interface controller according to the second aspect of the present application is provided, wherein, in response to an update read threshold microinstruction being executed, the read threshold indicated by the update read threshold microinstruction is recorded in an entry of the read threshold table associated with the physical address or part thereof indicated by the update read threshold microinstruction.
[0106] According to the fourth to sixth media interface controllers of the second aspect of the present application, a seventh media interface controller according to the second aspect of the present application is provided, wherein, in response to executing a get read threshold microinstruction to obtain a read threshold, a microinstruction sequence for generating a read redo command is called to continue processing, and the microinstruction sequence for generating a read redo command is configured with the obtained read threshold.
[0107] According to a third aspect of the present application, a first storage device according to the third aspect of the present application is provided, comprising the above-mentioned media interface controller.
[0108] According to a fourth aspect of the present application, a first read command processing method according to the fourth aspect of the present application is provided, characterized in that it includes: in response to a failure in read command processing, obtaining one or more read threshold parameters in sequence from a read redo sequence table, and generating one or more read redo commands based on the obtained one or more read threshold parameters, the one or more read redo commands accessing the same address as the read command; in response to successful processing of a first read redo command among the one or more read redo commands, recording the number of error bits of data read out by the first read redo command in a first entry in a read redo sequence table that records the read threshold parameters used by the first read redo command; and adjusting the order of entries in the read redo sequence table according to the number of error bits.
[0109] According to the first read command processing method of the fourth aspect of the present application, a second read command processing method according to the fourth aspect of the present application is provided, characterized in that, in response to the successful processing of the first read redo command, the data read out by the first read command is used as the data read out according to the read command.
[0110] According to the first or second read command processing method of the fourth aspect of the present application, a third read command processing method according to the fourth aspect of the present application is provided, characterized in that one or more read threshold parameters are obtained from the read redo sequence table in the order of entries in the read redo sequence table, and one or more read redo commands are generated according to the obtained one or more read threshold parameters, including: obtaining a read threshold parameter in the order of entries in the read redo sequence table, and generating a read redo command according to the obtained read threshold parameter, in response to a failure in processing an obtained read redo command, obtaining the next read threshold parameter in the order of entries in the read redo sequence table, and generating the next read redo command according to the obtained next read threshold parameter, until the processing of the next read redo command obtained is successful.
[0111] According to one of the first to third read command processing methods of the fourth aspect of the present application, a fourth read command processing method according to the fourth aspect of the present application is provided, characterized in that in response to the failure of processing of read redo commands generated using all read threshold parameters in the read redo sequence table, the read command processing failure is indicated.
[0112] According to one of the first to fourth read command processing methods of the fourth aspect of the present application, a fifth read command processing method according to the fourth aspect of the present application is provided, characterized in that if the number of error bits of the data read out by the first read redo command is less than the number of error bits of the first entry in the read redo sequence list, the order of the entries in the read redo sequence list is adjusted, and the first entry is used as the first entry in the read redo sequence list.
[0113] According to one of the first to fifth read command processing methods of the fourth aspect of the present application, a sixth read command processing method according to the fourth aspect of the present application is provided, characterized in that if the number of error bits of the data read out by the first read redo command is greater than the number of error bits of the frontmost entry in the read redo sequence table, the order of the entries in the read redo sequence table will not be changed.
[0114] According to one of the first to fifth read command processing methods of the fourth aspect of the present application, a seventh read command processing method according to the fourth aspect of the present application is provided, characterized in that if the number of error bits of the data read out by the first read redo command is greater than the number of error bits of the frontmost entry in the read redo sequence table, the first entry is moved forward in the read redo sequence table.
[0115] According to one of the first to seventh read command processing methods of the fourth aspect of the present application, an eighth read command processing method according to the fourth aspect of the present application is provided, characterized in that, in response to a failure in read command processing, one or more read threshold parameters are obtained from a read redo sequence table in the order of entries in the read redo sequence table, and one or more medium interface commands respectively indicating the obtained one or more read threshold parameters are generated and provided to a medium interface controller; the medium interface controller generates the one or more read redo commands according to the received one or more medium interface commands.
[0116] According to the eighth read command processing method of the fourth aspect of the present application, a ninth read command processing method according to the fourth aspect of the present application is provided, characterized in that the one or more read redo commands respectively use the read threshold parameters indicated by the one or more media interface commands; or the one or more read redo commands use the read threshold parameters generated by the media interface controller.
[0117] According to the eighth or ninth read command processing method of the fourth aspect of the present application, a tenth read command processing method according to the fourth aspect of the present application is provided, characterized in that, in response to the successful processing of a first read redo command among the one or more read redo commands, the media interface controller generates a first message indicating that the processing of the first media interface command corresponding to the first read redo command is completed, and the first message includes the number of error bits of the data read out by the first read redo command; the storage command processing unit records the number of error bits of the data read out by the first read redo command in the first entry of the read redo sequence table in response to the first message.
[0118] According to the tenth read command processing method of the fourth aspect of the present application, an eleventh read command processing method according to the fourth aspect of the present application is provided, characterized in that: the first message also records the identifier of the first media interface command.
[0119] According to one of the eighth to eleventh read command processing methods of the fourth aspect of the present application, a twelfth read command processing method according to the twelfth aspect of the present application is provided, characterized in that: the media interface controller generates or predicts a read threshold parameter based on all or part of the access address of the received media interface command in response to receiving the media interface command, and indicates the generated or predicted read threshold parameter in the generated read redo command.
[0120] According to the twelfth read command processing method of the fourth aspect of the present application, a thirteenth read command processing method according to the fourth aspect of the present application is provided, characterized in that the read threshold table is queried based on all or part of the access address of the received media interface command to obtain the read threshold parameters to be generated.
[0121] According to the thirteenth read command processing method of the fourth aspect of the present application, a fourteenth read command processing method according to the fourth aspect of the present application is provided, characterized in that an average value or a weighted average value is calculated for the read thresholds of all or part of the entries in the read threshold table as a predicted read threshold parameter.
[0122] According to one of the first to fourteenth read command processing methods of the fourth aspect of the present application, a fifteenth read command processing method according to the fifteenth aspect of the present application is provided, characterized in that: the number of error bits of the data read out by the first read redo command is the number of bits that are flipped between the data obtained by error correction decoding of the data read out from the NVM chip according to the first read redo command and the data read out from the NVM chip according to the first read redo command.
[0123] According to one of the first to fifteenth read command processing methods of the fourth aspect of the present application, a sixteenth read command processing method according to the fifteenth aspect of the present application is provided, characterized in that, in response to a failure in read command processing, the one or more read threshold parameters are obtained from the read redo sequence table in the order of entries in the read redo sequence table, or the one or more read threshold parameters are obtained from the read redo sequence table in the order of the number of error bits recorded in the read redo sequence table from small to large.
[0124] According to one of the first to sixteenth read command processing methods of the fourth aspect of the present application, a seventeenth read command processing method according to the fifteenth aspect of the present application is provided, characterized in that; the method also includes: adjusting the order of entries in the read redo sequence table according to the number of error bits recorded in the read redo sequence table.
[0125] According to the fifth aspect of the present application, an information processing device according to the fifth aspect of the present application is provided, comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, one of the first to seventeenth read command processing methods according to the fourth aspect of the present application is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0126] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0127] Figure 1 A block diagram of a storage device of the prior art is shown;
[0128] Figure 2 A detailed block diagram showing the control components of a storage device;
[0129] Figure 3 A block diagram of a prior art media interface controller is shown;
[0130] Figure 4 A block diagram of a media interface controller according to an embodiment of the present application is shown;
[0131] Figure 5 A block diagram of a read command adjustment unit according to an embodiment of the present application is shown;
[0132] Figure 6 A block diagram of a media interface according to another embodiment of the present application is shown;
[0133] Figure 7 A block diagram of a media interface controller according to an embodiment of the present application is shown;
[0134] Figure 8 A detailed block diagram of a media interface according to an embodiment of the present application is shown;
[0135] Fig. 9 A block diagram of a media interface controller according to another embodiment of the present application is shown;
[0136] Fig.10 A block diagram of a media interface controller according to yet another embodiment of the present application is shown;
[0137] Fig.11 A flowchart of using a read-redo sequence table according to yet another embodiment of the present application is shown;
[0138] Fig.12 A flowchart for processing a read command according to another embodiment of the present application is shown. DETAILED DESCRIPTION
[0139] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0140] Figure 4 A block diagram of a media interface controller according to an embodiment of the present application is shown.
[0141] The medium interface controller of the control component includes a medium interface, an ECC encoding unit, an ECC decoding unit and a read command adjustment unit. The medium interface is coupled with the read command adjustment unit, the NVM chip, the ECC encoding unit and the ECC decoding unit.
[0142] The medium interface command provided by the storage command processing unit to the medium interface controller is provided to the read command adjustment unit. The read command adjustment unit only adjusts the medium interface command to generate a read command or a read redo command, and provides the adjusted medium interface command to the medium interface. For other types of medium interface commands (e.g., write commands, erase commands, etc.), the read command adjustment unit does not process them, but directly provides them to the medium interface.
[0143] According to an embodiment of the present application, the read command adjustment unit identifies the preferred read threshold parameter for accessing the physical address according to the physical address accessed by the read command or read redo command to be generated. For example, for the physical address P1, the read command adjustment unit identifies that the read threshold parameter V1 is preferred for the physical address P1, and updates the received media interface command for accessing the physical address P1, and updates the media interface command to indicate the use of the read redo command of the read threshold parameter V1. For another example, for the physical address P1, the read command adjustment unit cannot find the preferred read threshold parameter for the physical address P1, and does not update the media interface command, but directly provides it to the media interface.
[0144] As another example, the media interface command provided by the storage command processing unit indicates that the physical address P2 is accessed by the read redo command, and for the physical address P2, the read command adjustment unit recognizes that the read redo command is invalid, or does not have a better effect than the read command. Therefore, the read command adjustment unit updates the media interface command indicating the read redo command to a media interface command indicating a common read command for accessing the physical address P2, or directly provides the media interface command indicating the read redo command to the media interface without updating the media interface command. For another example, for the physical address P2, the read command adjustment unit recognizes that the read threshold parameter V2' is preferred for the physical address P2, and updates the media interface command to a read redo command indicating the use of the read threshold parameter V2'.
[0145] As another example, the medium interface command provided by the storage command processing unit indicates that the physical address P2 is accessed by a read command or a read redo command. For the physical address P2, the read command adjustment unit recognizes that the voltage value carried by the read command or the read redo command itself is already the optimal read threshold parameter, and the read command adjustment unit does not adjust the medium interface command, and directly provides the medium interface command to the medium interface.
[0146] Figure 5 A block diagram of a read command adjustment unit according to an embodiment of the present application is shown.
[0147] The read command adjustment unit includes a command parsing unit and a read threshold table. Optionally, the read command adjustment unit also includes a read threshold prediction unit.
[0148] The read command adjustment unit maintains a read threshold table. The read threshold table includes a plurality of entries, and the entries of the read threshold table include a physical address, a read threshold and / or a UECC (uncorrectable) flag. The UECC flag indicates that the data obtained by accessing the corresponding physical address using the read threshold previously recorded in the read threshold entry cannot be correctly ECC decoded. In response to receiving a media interface command indicating a read command or a read redo command, the read threshold table is queried with the physical address or a part of the physical address to be accessed by the indicated read command or read redo command to obtain the read threshold corresponding to the physical address to be accessed, and the media interface command is updated with the obtained read threshold, and the updated media interface command is provided to the media interface.
[0149] Storage Command Processing Unit (see also Figure 4 ) Provide the media interface command to the command parsing unit of the read command adjustment unit. The command parsing unit identifies the type of the received media interface command, and directly provides the media interface commands other than the read command and the read-redo command without processing them. For the media interface command indicating the read command or the read-redo command, the read threshold table is queried to obtain the read threshold, and the media interface command is updated to the media interface command indicating the read-redo command and provided to the media interface.
[0150] For example, the command parsing unit receives a media interface command indicating a read command to access physical address P1, and queries the read threshold table using physical address P1. If there is an entry in the read threshold table recording physical address P1 and read threshold V1, the received media interface command is updated to a read redo command indicating the use of read threshold V1 and then provided to the media interface. In another example, the command parsing unit receives a media interface command indicating a read redo command to access physical address P2 (indicating read threshold V2), and queries the read threshold table using physical address P2. If there is no entry in the read threshold table recording physical address P2, the command parsing unit provides the media interface command to the media interface without modification, and also adds an entry in the read threshold table recording physical address P2 and read threshold V2. In another example, the command parsing unit receives a media interface command indicating a read redo command (indicating a read threshold V3) for accessing physical address P3, and queries the read threshold table using the physical address P3. If there is an entry in the read threshold table that records the physical address P3, but the read threshold recorded in the entry is different from V3, the command parsing unit provides the media interface command to the media interface without modification, and also updates the read threshold of the entry in the read threshold table that records the physical address P3 to the read threshold V3.
[0151] Still optionally, the command parsing unit also identifies the UECC mark in the read threshold table entry. For example, for a media interface command indicating a read command to access physical address P4, there is an entry with physical address P4 in the read threshold table, but the entry has a UECC mark, which means that the data previously obtained by accessing physical address P4 using the recorded read threshold cannot be correctly ECC decoded. Therefore, the command parsing unit directly provides the media interface command to the media interface without updating it to indicate a read redo command. For another example, for a media interface command indicating a read redo command to access physical address P5, there is an entry with physical address P5 in the read threshold table, but the entry has a UECC mark, the command parsing unit clears the UECC flag in the entry, and provides the media interface command to the media interface. Optionally, the command parsing unit also checks the read threshold indicated by the read redo command and the read threshold recorded in the entry. If the two are different, the read threshold in the read redo command is used to replace the read threshold in the entry.
[0152] It can be understood that in response to the ECC decoding unit failing to perform ECC decoding on the data read from the NVM chip according to the read command or the read redo command accessing the physical address, a UECC flag is set in the corresponding entry of the read threshold table. Alternatively, in response to the ECC decoding unit failing to perform ECC decoding on the data read from the NVM chip according to the read command or the read redo command accessing the physical address, if there is no entry corresponding to the physical address where the decoding failed in the read threshold table, an entry corresponding to the physical address is added to the read threshold table, and the UECC flag is set.
[0153] Optionally, the read threshold table has limited entries. The physical address in the entry is, for example, a physical block number of an NVM chip, a layer number of a 3D NVM chip, or a combination of a physical block number and a layer number. Still optionally, the number of entries in the read threshold table is sufficient to accommodate all possible values of the physical block number, the layer number of a 3D NVM chip, or a combination of a physical block number and a layer number. Still optionally, the number of entries in the read threshold table cannot accommodate all possible values of the physical block number, the layer number of a 3D NVM chip, or a combination of a physical block number and a layer number. The command parsing unit also maintains replacement of the read threshold table entries, and replaces the entries in the read threshold table by, for example, least recently used, first-in-first-out, and other strategies.
[0154] In a still optional embodiment, the medium interface command provided by the storage command processing unit also includes a read command adjustment unit enable flag. If the read command adjustment unit enable flag is valid, the read command adjustment unit Figure 4 and Figure 5 The media interface command is processed in the displayed manner. If the read command adjustment unit enable flag is invalid, the read command adjustment unit does not work, and all received media interface commands are directly provided to the media interface.
[0155] In a still optional embodiment, the read threshold prediction unit provides a predicted read threshold for the accessed physical address. Limited by the number of entries in the read threshold table, the accessed physical address may not be recorded in the read threshold table; or the accessed physical address is recorded in the read threshold table, but is also accompanied by a UECC tag; in some cases, the storage command processing unit lacks understanding of the characteristics of the NVM chip, and hopes that the read command adjustment unit will actively provide a recommended read threshold. In one example, the read threshold prediction unit provides a predicted read threshold based on the read threshold table. For example, the read threshold prediction unit calculates an average or weighted average of the read thresholds of all or part of the entries in the read threshold table as the predicted read threshold. For another example, the read threshold prediction unit calculates an average or weighted average of the read thresholds of all or part of the entries in the read threshold table that have physical addresses close to the physical addresses to be accessed by the generated read command or read redo command as the predicted read threshold. Address proximity includes that the two physical addresses are close in value (for example, they are adjacent integers, or the difference is less than 10, for example), or the storage units represented by the two physical addresses are close in spatial position on the NVM chip (for example, the spatial positions are adjacent, or the distance between them is less than 16 physical pages, 3 physical blocks and / or layers, for example), and / or the usage status of the storage units represented by the two physical addresses is close. In another example, the read threshold prediction unit also predicts the read threshold based on factors such as temperature, the number of erases and writes of the storage unit, and / or the number of reads. The read threshold predicted by the read threshold prediction unit is used to generate a read redo command and provided to the medium interface.
[0156] Furthermore, the read threshold generated by the read threshold prediction unit is also used to update the read threshold table. For example, a read threshold is predicted for a read command accessing physical address P6, and the predicted read threshold and physical address P6 are recorded in an entry of the read threshold table.
[0157] Still optionally, the read threshold prediction unit also generates a predicted read threshold based on the UECC tag of the read threshold table. For example, a medium interface command indicating a read command to access physical address P7 is received, and there is an entry in the read threshold table that records physical address P7, and the entry carries a UECC tag. The read threshold prediction unit generates a predicted read threshold different from the read threshold indicated in the entry based on the UECC tag. For example, the entry records the read threshold V7 and the UECC tag, and the read threshold prediction unit generates a predicted read threshold V7' in the direction of increasing the read threshold. It can be understood that the change in the read threshold has a certain regularity, for example, the change in the read threshold shows a trend over time. As another example, the read threshold prediction unit increases the read threshold recorded in the entry by, for example, one or a specified number of units in the direction of increasing the read threshold as the predicted read threshold.
[0158] In another embodiment, the medium interface command provided by the storage command processing unit also includes a read threshold prediction enable flag. If the read threshold prediction enable flag is valid, the read threshold prediction unit generates a predicted read threshold for the accessed physical address. If the read threshold prediction enable flag is invalid, the read threshold prediction unit does not work and does not provide a predicted read threshold.
[0159] Thus, according to one embodiment of the present application, the storage command processing unit and the read command adjustment unit work in coordination. The storage command processing unit does not need to understand the characteristics of the NVM chip, but in normal circumstances, for example, the medium interface command provided to the medium interface controller does not carry the read threshold prediction enable mark. After, for example, the read data fails to be decoded with ECC, a medium interface command indicating a (normal) read command with a read threshold prediction enable mark is provided to the medium interface controller, the read threshold prediction unit generates a predicted read threshold, and the command parsing unit generates a medium interface command indicating a read redo command with the predicted read threshold to replace the medium interface command indicating the (normal) read command and provides it to the medium interface. Next, if the ECC decoding of the data read by the generated medium interface command indicating the read redo command fails again, the storage command processing unit does not need to maintain a complex error handling process, but again sends a medium interface command indicating a read command for the physical address to the medium interface controller, and carries the read threshold prediction enable mark. The read threshold prediction unit generates a new predicted read threshold in response, and the command parsing unit generates a medium interface command indicating a new read redo command with the predicted read threshold and provides it to the medium interface. In this way, the storage command processing unit repeatedly issues a media interface command indicating a read command for the physical address to the media interface controller in response to an ECC decoding failure, and the media interface controller completes the error handling process of the ECC decoding failure of the read data by trying one or more read thresholds through the read threshold prediction unit. Optionally, in each prediction, the read threshold prediction unit generates a predicted read threshold in a direction in which the read threshold increases.
[0160] Figure 6 A block diagram of a media interface according to yet another embodiment of the present application is shown.
[0161] The medium interface includes a microinstruction execution unit and a signal driver. The medium interface is coupled with the NVM chip and the microinstruction memory, provides a storage medium access command to the NVM chip and obtains a processing result of the storage medium access command. The medium interface is also coupled with the microinstruction memory storing the microinstruction sequence, and generates a storage medium access command according to the microinstruction obtained from the microinstruction memory.
[0162] The microinstruction sequence corresponds to the medium interface command. The medium interface obtains the corresponding microinstruction sequence according to the received medium interface command and provides it to the microinstruction execution unit. The microinstruction execution unit executes the microinstruction sequence, drives the signal driver according to the signal indicated by the microinstruction sequence, and generates a specified signal on the lead of the medium interface coupled with the NVM chip. And by executing the microinstruction sequence, a signal sequence that conforms to the NVM chip interface protocol is generated.
[0163] Some microinstructions also include a count value indicating that the specified signal is repeatedly driven multiple times. For example, if 1 byte of data is obtained from the DQ lead each time, in order to obtain, for example, 4KB of data read from the NVM chip, it is necessary to repeatedly collect data from the DQ lead 1K times. The microinstruction execution unit sets a counter according to the count value, and the counter drives the signal driver to repeatedly drive the lead a specified number of times. The signal driver also collects signals from the lead, such as collecting data read from the NVM chip from the DQ lead.
[0164] according to Figure 6 In an embodiment of the present invention, the microinstructions of the microinstruction sequence include, for example, a get read threshold microinstruction and an update read threshold microinstruction. The operand of the get read threshold microinstruction includes a physical address. Optionally, the operand of the get read threshold microinstruction also includes a register storing a read threshold table or a register storing an index of the read threshold table. The get read threshold microinstruction also includes a result register, and in response to the get read threshold microinstruction being executed, the result register is filled with a read threshold corresponding to the register value of the physical address indicated by the get read threshold microinstruction. As an example, to execute the get read threshold microinstruction, the entry corresponding to the address is obtained from the read threshold table using the physical address indicated by the get read threshold microinstruction, and the read threshold of the entry is obtained to fill the result register. Optionally, the result register is filled with the generated predicted read threshold. The read threshold obtained by the get read threshold microinstruction is used to configure the microinstruction sequence for processing the read redo command, so that when the microinstruction sequence is executed, the indication signal driver provides the NVM chip with a read redo command indicating the obtained read threshold. Optionally, some NVM chips need to use, for example, a "Set Feature" command to set the read threshold used. To this end, the microinstruction sequence for processing the read redo command includes a microinstruction sequence for generating a "Set Feature" command and a microinstruction sequence for generating a read redo command. The microinstruction sequence of the "Set Feature" command is used to set the read threshold of the read redo command to the read threshold obtained by the get read threshold microinstruction, for example.
[0165] Optionally, the microinstruction sequence for processing the read redo command also includes an additional microinstruction sequence for generating a "Set Feature" command, which is used to set the read threshold to the read threshold used when processing (ordinary) read commands (read commands before executing the read redo command) after the read redo command processing is completed.
[0166] The operands of the update read threshold microinstruction include a physical address and a value of the read threshold to be updated. In response to the update read threshold microinstruction being executed, a corresponding entry of the read threshold table is obtained according to the address indicated by the update read threshold microinstruction, and the read threshold indicated by the microinstruction is written into the entry.
[0167] The media interface controller uses the storage medium access command to read the data frame or the entire physical page data from the NVM chip. The read data needs to be cached by the media interface controller and ECC decoding is implemented. In order to improve the data reading speed, the media interface controller provides a local cache integrated in the chip to cache the data read from the NVM chip and to be ECC decoded. When the data frame or the entire physical page data read from the NVM chip includes N (N is a positive integer) ECC blocks, and the bandwidth of the ECC decoding unit may be difficult to process N ECC blocks at the same time, resulting in one or more ECC blocks waiting to be ECC decoded in the local cache of the media interface controller. Then, the time that the ECC block stays in the local cache is increased, which reduces the utilization rate of the local cache. In order to ensure the read data bandwidth, the capacity of the local cache needs to be increased, resulting in an increase in the cost and power consumption of the control component and even the storage device. It is hoped that the time that the ECC block stays in the local cache can be reduced to improve the utilization rate of the local cache. It is also hoped that operations related to the use of the local cache can be managed in a manner independent of microinstructions.
[0168] Figure 7 A block diagram of a media interface controller according to an embodiment of the present application is shown.
[0169] The media interface controller of the control component includes a media interface, a microinstruction memory, a local cache and an ECC decoding unit. The media interface is coupled with the NVM chip, the microinstruction memory and the local cache. The microinstruction memory stores microinstructions, and the media interface executes microinstructions to output storage medium access commands to the NVM chip, and stores data obtained from the NVM chip according to the storage medium access read command in the local cache. The ECC decoding unit is coupled with the local cache, performs ECC decoding on the ECC block provided by the local cache, and records the decoding result in the read data cache. The read data cache is coupled to the control component, such as a DRAM or an SRAM integrated in the control component.
[0170] According to an embodiment of the present application, the media interface controller further includes a cache management unit, which is coupled with the local cache and the media interface. The cache management unit provides a signal indicating to suspend reading data (referred to as a read pause signal) to the media interface according to the size of the available space in the local cache. As an example, in response to the available space in the local cache being less than a threshold, the cache management unit outputs a read pause signal to the media interface to instruct the NVM chip to suspend outputting the data to be acquired by the read command or the read redo command. In response to the available space in the local cache being not less than the threshold, the cache management unit cancels the read pause signal provided to the media interface.
[0171] When the media interface operates normally, in response to not receiving the read suspend signal, the media interface reads data from the NVM chip in a conventional manner. For example, the media interface provides a plurality of consecutive read enable signals to the NVM chip to read data from the NVM chip.
[0172] According to an embodiment of the present application, the media interface suspends or cancels the read enable signal or CLK signal provided to the NVM chip in response to receiving a read pause signal, so as to instruct the NVM chip to suspend outputting the data to be obtained by the read command or the read redo command. It can be understood that according to the various NVM chip interface protocols followed by the storage medium access command, or the various working modes defined by the interface protocol, the media interface instructs the NVM chip to suspend outputting data in other ways. For example, by generating a signal that puts the NVM chip in a pause state, the media interface instructs the NVM chip to suspend outputting the data to be obtained by the read command or the read redo command. Subsequently, in a state where the media interface instructs the NVM chip to suspend outputting data, in response to receiving a revoked read pause signal, or no longer receiving a read pause signal, the media interface resumes the read enable signal or CLK signal provided to the NVM chip, or no longer generates a read pause signal, so as to instruct the NVM chip to continue outputting the data to be obtained by the read command or the read redo command.
[0173] The behavior of the cache management unit monitoring the local cache capacity and subsequently generating a read pause signal is independent of the microinstructions executed by the media interface, so there is no need to modify the microinstructions, its execution unit, and the microinstruction sequence used to generate the media interface command. By instructing the NVM chip to pause outputting the data to be obtained by the media interface (read) command when the local cache available space is insufficient, a smaller local cache can be used in the media interface controller, and / or the ability of the media interface controller to process the media interface (read) command is improved, for example, a larger number of media interface (read) commands can be processed concurrently without reducing the capacity of the local cache.
[0174] In an optional embodiment, the local cache is managed according to the ECC block size. The local cache accommodates a number of ECC blocks. When the cache management unit identifies that the available space of the local cache is insufficient to accommodate a specified number (e.g., one) of ECC blocks, a read pause signal is generated and provided to the media interface. When the available space of the local cache is sufficient to accommodate a specified number (e.g., at least one) of ECC blocks, no read pause signal is provided to the media interface. Further, in response to the local cache being filled with a complete ECC block, the complete ECC block is provided to the ECC decoding unit for ECC decoding. And in response to providing the ECC block to the ECC decoding unit, the ECC block is removed from the local cache so that the storage space occupied by it becomes available space.
[0175] As an example, the data frame to be read out from the NVM chip by the storage medium access (read) command includes 4 ECC blocks. If the local cache available space is not enough to accommodate 1 ECC block, the cache management unit provides a read pause signal to the media interface, so that the media interface instructs the NVM chip not to start outputting the data to be obtained by the storage medium access (read) command, or to pause outputting the data to be obtained by the storage medium access (read) command. When the local cache available space is sufficient to accommodate at least 1 ECC block, even if the local cache available space is not enough to accommodate the complete data frame to be read out, the cache management unit also cancels or does not provide the read pause signal to the media interface, and the media interface is also able to instruct the NVM chip to start or continue to output the data to be obtained by the storage medium access (read) command. As a result, the data output of the NVM chip for the storage medium access (read) command can be started earlier. In the case where the media interface controller concurrently processes multiple storage medium access (read) commands, the number of storage medium access (read) commands processed concurrently is increased.
[0176] It can be understood that the read pause signal can be replaced by a read enable signal with similar semantics. In response to receiving the read enable signal, the media interface instructs the NVM chip to output the data to be acquired by the storage media access (read) command, otherwise the media interface instructs the NVM chip to suspend outputting the data to be acquired by the storage media access (read) command.
[0177] The microinstruction sequence corresponds to the medium interface command. The microinstruction sequence for processing a read command or a read redo command also includes, for example, a microinstruction for obtaining a read threshold value and / or an update read threshold value microinstruction. As an example, the microinstruction sequence for processing a read command includes a microinstruction for obtaining a read threshold value. By executing the microinstruction for obtaining a read threshold value, if the read threshold value to be used is obtained, the microinstruction sequence for processing a read redo command is called to continue processing, and the microinstruction sequence for processing a read redo command is configured with the obtained read threshold value to issue a read redo command to the NVM chip. Still as an example, the microinstruction sequence for processing a read redo command includes a microinstruction for updating a read threshold value. By executing the microinstruction for updating a read threshold value, the read threshold value recorded in the entry corresponding to the physical address to be accessed in the read threshold table is updated. Further, the microinstruction sequence for processing a read redo command also includes a microinstruction for obtaining a read threshold value. To process the read redo command, first call the get read threshold microinstruction to obtain the read threshold or the predicted read threshold, and use the obtained read threshold to configure the microinstruction sequence for processing the read redo command to issue a read redo command to the NVM chip, and also execute the update read threshold microinstruction to update the read threshold recorded in the entry corresponding to the physical address to be accessed in the read threshold table.
[0178] Figure 8 A detailed block diagram of a media interface according to an embodiment of the present application is shown.
[0179] The medium interface includes a microinstruction execution unit, a signal driver, a counter and a data conversion unit. The microinstruction execution unit executes a microinstruction sequence, drives the signal driver according to the signal indicated by the microinstruction sequence, generates a specified signal on the lead wire coupled between the medium interface and the NVM chip, and generates a signal sequence that complies with the NVM chip interface protocol by executing the microinstruction sequence.
[0180] Some microinstructions also include a count value, indicating that the specified signal is repeatedly driven multiple times. For example, if 1 byte of data is obtained from the DQ lead each time, in order to obtain, for example, 4KB of data read out by the NVM chip, data must be repeatedly collected from the DQ lead 1K times. The microinstruction execution unit sets a counter according to the count value, and the counter drives the signal driver to repeatedly drive the lead a specified number of times.
[0181] The signal driver also collects signals from the DQ pins and provides the signals collected from the DQ pins to the data conversion unit. In some working modes such as the ONFI protocol (e.g., SDR mode), the DQ pins transmit 8 bits of data per cycle, while in other modes (e.g., NV-DDR2), the DQ pins transmit 16 bits of data per cycle. The data conversion unit obtains valid data from the signals collected from the DQ pins and fills them into the local cache according to the current working mode.
[0182] According to an embodiment of the present application, a read pause signal provided by a cache management unit is coupled to a counter. In response to the read pause signal being valid, the counter stops counting. In response to the read pause signal being invalid or revoked, the counter resumes counting. In the case where the counter stops counting, the signal driver also stops driving, for example, the DQ lead to instruct the NVM chip to suspend data transmission. Optionally or further, the read pause signal also instructs the signal driver to generate an invalid or revoked read enable signal on a lead coupled to the NVM chip to instruct the NVM chip to suspend data transmission. Still optionally, the read pause signal also instructs the signal driver to generate a signal on a lead coupled to the NVM chip to instruct the NVM chip to enter a pause state.
[0183] Thus, according to an embodiment of the present application, the read pause signal causes the execution of the microinstruction to be paused, and after the read pause signal is cancelled, the execution of the microinstruction can be continued. Optionally, the read pause signal is only effective for the execution of the microinstruction that instructs the NVM chip to read data from the DQ lead, and does not affect the execution of other microinstructions.
[0184] According to another embodiment of the present application, in response to receiving a read pause signal, the media interface yields, for example. As an example, in response to the read pause signal, the media interface pauses the execution of the current microinstruction sequence for generating a read command or a read redo command, and saves part or all of the execution state of the microinstruction sequence for generating the current read command or the read redo command. Next, after pausing the execution of the current microinstruction sequence for generating a read command or a read redo command, the media interface may execute other microinstruction sequences to send storage medium access (read) commands to other NVM chips or other LUNs (logical units) of the NVM chips. And after the read pause signal is revoked, and the media interface completes processing of other microinstruction sequences or yields the execution of other microinstruction sequences, restores, for example, part or all of the execution state of the previously saved microinstruction for generating a read command or a read redo command, and continues to process the previously saved microinstruction sequence for generating a read command or a read redo command.
[0185] The present application adjusts the read threshold parameters used by the read command or read redo command to be generated through the read command adjustment unit of the media interface controller, thereby implementing complex searches for read threshold parameters, providing more guidance for the error recovery process, and intelligently selecting or prompting the read threshold parameters used in the read redo, thereby shortening the error processing time, reducing the error rate of the storage device, and extending the service life of the storage device.
[0186] Fig. 9 A block diagram of a media interface controller according to another embodiment of the present application is shown.
[0187] NVM chips usually provide dozens, tens or even hundreds of read threshold parameters. The read redo command indicates to use a read threshold parameter to read data from the NVM chip. Fig. 9 In an embodiment, the storage command processing unit maintains a read redo sequence table. Each entry in the read redo sequence table sequentially records a plurality of (eg, n, where n is a positive integer) read threshold parameters ( Fig. 9 In the figure, the read threshold parameter 1, the read threshold parameter 2, the read threshold parameter ... and the read threshold parameter n are shown. To generate a read redo command, the storage command processing unit accesses the read redo sequence table in the order of the entries, and uses the read threshold parameters recorded in the read redo sequence table to sequentially generate a media interface command and send it to the media interface controller. The media interface controller uses the read threshold parameters indicated by the media interface command to generate a read redo command to access the NVM chip.
[0188] Since there are multiple read threshold parameters recorded in the read redo sequence table, the storage command processing unit instructs the media interface controller to use each read threshold parameter to try to read data from the NVM chip until the correct data is read (the correct data means that the read data can be correctly decoded by the ECC decoding unit). See also Fig. 9To process the read IO command, the storage command processing unit provides a media interface command indicating a read command (not a read redo command) to the media interface controller ( Fig. 9 The media interface generates a storage media access (read) command and provides it to the NVM chip ( Fig. 9 The media interface also provides the read data output by the NVM chip to the ECC decoding unit ( Fig. 9 As an example, if the ECC decoding unit fails to decode, the media interface controller notifies the storage command processing unit of the media interface command processing failure ( Fig. 9 The storage command processing unit starts the error handling process.
[0189] The storage command processing unit accesses the read redo sequence table ( Fig. 9 In (5), a read threshold parameter ( Fig. 9 As an example, in response to a failure in processing a media interface command, the first read threshold parameter obtained by the storage command processing unit from the read redo sequence table is "read threshold parameter 1". The storage command processing unit generates a media interface command (denoted as RCMD1) indicating a read redo command based on the obtained read threshold parameter and provides it to the media interface controller. Fig. 9 The media interface controller gives the storage command processing unit the processing result of the media interface command (RCMD1) through the operations indicated by (1) to (4). If the media interface command (RCMD1) still fails to be processed, the storage command processing unit again passes Fig. 9 The operations indicated by (5) and (6) in the above example obtain the next read operation parameter in the sort order from the read redo sequence table. For example, if the previous media interface command (RCMD1) indicated "read threshold parameter 1", then the next read operation parameter currently obtained is "read threshold parameter 2". And the storage command processing unit generates a media interface command (referred to as RCMD2) indicating the read redo command again according to the obtained read threshold parameter and provides it to the media interface controller. If the processing result of the media interface command (referred to as RCMD2) still fails, the storage command processing unit obtains the next read threshold parameter again until all the read threshold parameters in the read threshold sequence table are used. If the processing of the media interface command indicating a certain read threshold parameter is successful, the storage command processing unit sends a message to, for example, the host command processing unit (see also FIG. 2 ). Figure 3) provides the read data. If all the read threshold parameters in the read threshold sequence table fail to read the correct data from the NVM chip, the storage command processing unit indicates the processing failure to, for example, the host command processing unit. In the read redo sequence table, the order of the entries is provided or suggested by the NVM chip, or is obtained through experiments so that in most cases, the order of the read threshold parameters that are effective for reading data from the NVM chip can be found earlier.
[0190] It can be seen that in order to perform error correction through read retry, the storage command processing unit operates the media interface controller to issue multiple read redo commands to the NVM chip. This significantly increases the processing time of the read command when there are uncorrectable errors in the read data, and also occupies the transmission bandwidth between the storage command processing unit and the media interface controller, limiting the processing capabilities of the storage command processing unit and the media interface controller.
[0191] Fig.10 A block diagram of a media interface controller according to still another embodiment of the present application is shown.
[0192] Fig.10 In the example of FIG. 1 , each entry in the read redo sequence table records not only the read threshold parameter but also the number of error bits corresponding to the read threshold parameter. The number of error bits is, for example, the difference (the number of flipped bits) between the data read from the NVM chip and provided by the media interface controller and the data correctly decoded by the ECC decoding unit from the data read from the NVM chip. Fig.10 In, as an example, "read threshold parameter 1" corresponds to "error bit number 1", "read threshold parameter 2" corresponds to "error bit number 2", and "read threshold parameter n" corresponds to "error bit number n". Optionally, in the initial state, the error bit number of each entry in the read redo sequence table is initialized to 0. Still optionally, the error bit number recorded in the read redo sequence table only represents the error bit number of the data successfully read out by the read redo command after an uncorrectable error occurs. Still optionally, there is only one instance of the read redo sequence table, so the use of the read redo sequence table is irrelevant to the physical address of the data to be read. Still optionally, the storage command processing unit maintains multiple instances of the read redo sequence table, corresponding to, for example, different scenarios. For example, a corresponding read redo sequence table is provided for the type of physical page to be read (for example, an MSB page, a CSB page, and an LSB page, or a page located on one or more layers of the upper or lower surface of a 3D flash memory, or a page located in the middle layer of a 3D flash memory), or a corresponding read redo sequence table is provided for different operating temperature ranges.
[0193] In response to the medium interface controller indicating that a medium interface (read) command has failed, the storage command processing unit sequentially obtains read threshold parameters according to the read redo sequence list and generates one or more medium interface commands indicating read redo to be provided to the medium interface controller. In response to the medium interface command indicating read redo being successfully processed, according to an embodiment of the present application, the processing result of the medium interface command indicating read redo provided by the medium interface controller also carries the number of error bits, which represents the number of bits that have flipped in the data read from the NVM chip using the read redo command before and after ECC decoding. The storage command processing unit updates the number of error bits corresponding to the read threshold parameter in the read redo sequence list according to the obtained number of error bits and the read threshold parameter used to obtain the number of error bits. As an example, in response to the medium interface controller indicating that a medium interface (read) command has failed, the medium interface command indicating read redo generated for the nth time carries the read threshold parameter n. The medium interface command is successfully processed, and the number of error bits in the read data is en. The storage command processing unit records the number of error bits en in association with the read threshold parameter n in the read redo sequence list. Further, the number of error bits en is also compared with the number of error bits (denoted as e1) of the entry at the head (the position of the first entry) of the read redo sequence list. If en < e1, the entry in the read redo sequence list that records the read threshold parameter n and the number of error bits en is also moved to the head (the position of the first entry) of the read redo sequence list. Thus, when the storage command processing unit next responds to the medium interface controller indicating that a medium interface (read) command has failed and accesses the read redo sequence list, it will first obtain the entry at the head of the read redo sequence list that records the read threshold parameter n and the number of error bits en. After the entry that records the read threshold parameter n and the number of error bits en is moved to the head of the read redo sequence list, the first entry to the (k - 1)th entry before the move are each shifted one position backward in sequence, that is, the original (k - 1)th entry becomes the kth entry after the move.
[0194] Optionally, the entries are sorted by the number of error bits of the entries without moving the positions of the entries in the read redo sequence list. When accessing the read redo sequence list, the entry with the smallest number of error bits is accessed first, and the next entry is accessed in ascending order of the number of error bits of the entries the next time the read redo sequence list is accessed.
[0195] Thus, according to Fig.10In an embodiment, during the operation of the storage device, the read redo sequence table is dynamically adjusted so that the entry corresponding to the read threshold parameter that is more suitable for the current working state of the NVM chip is set at the head of the read redo sequence table, so that the storage command processing unit can obtain such read threshold parameters as early as possible and use the obtained read threshold parameters to generate a media interface command, so as to shorten the process of traversing the read redo sequence table and reduce the number of read redo commands generated in response to the media interface controller indicating that the media interface (read) command has failed, so as to obtain the data to be read more quickly.
[0196] Optionally, multiple entries in the read redo sequence table are sorted. For example, the position of the entry in the read redo sequence table determines the order of sorting. The entries at the front of the read redo sequence table will be accessed by the storage command processing unit with higher priority and use the read threshold parameters recorded therein. In response to the media interface controller indicating that the media interface (read) command failed, the storage command processing unit first accesses the entry at the head of the read redo sequence table to obtain the read threshold parameters. As another example, the number of error bits recorded in the entry determines the order of sorting. The entry with a smaller number of error bits will be accessed with higher priority, so that in response to the change in the number of error bits of the entry, there is no need to move the position of the entry in the read redo sequence table.
[0197] Continue to view Fig.10 Optionally, the media interface controller further comprises a read command adjustment unit. The read command adjustment unit is, for example, based on Figure 4 or Figure 5 The read command adjustment unit of the embodiment of the present invention. Still optionally, Fig.10 The media interface is based on Figure 6-Figure 8The medium interface of the embodiment of the present invention. Thus, the read threshold parameter indicated by the received medium interface command can be adjusted in the medium interface controller. For example, the medium interface command provided by the storage command processing unit also includes a read threshold adjustment unit enable mark and / or a read threshold prediction enable mark. If the read threshold adjustment unit enable mark and / or the read threshold prediction enable mark are valid, even if the medium interface command indicates the read threshold parameter obtained by the read command processing unit from the read redo sequence table, the medium interface controller generates a new read threshold parameter (obtained from the read threshold table or generated by the read threshold prediction unit) for the physical address to be accessed by the medium interface command. If the read threshold adjustment unit enable mark and the read threshold prediction enable mark are invalid, the medium interface controller uses the read threshold parameter indicated by the medium interface command. In some cases, the read threshold adjustment unit enable mark and / or the read threshold prediction enable mark are valid, and after evaluation by the medium interface controller, the read threshold parameter indicated by the medium interface command is still used. Thus, the storage command processing unit and the medium interface controller cooperate to process transactions after an uncorrectable error occurs in reading data from the NVM. Optionally, the processing result (indicating processing failure) of the media interface command provided by the media interface controller to the storage command processing unit also includes a suggestion for the next read threshold parameter to be used, and the storage command processing unit generates the read threshold parameter indicated in the next media interface command based on the suggestion.
[0198] Fig.11 A flowchart of using a read redo sequence table according to yet another embodiment of the present application is shown. For example, a storage command processing unit implements Fig.11 The processing flow shown.
[0199] In response to the media interface controller indicating that the data read from the NVM chip cannot be correctly decoded, the storage command processing unit accesses the read redo sequence table, and accesses the entries from the read redo sequence table in a forward and backward order to obtain the read threshold parameter (1110). The storage command processing unit generates a media interface command using the read threshold parameter obtained from the read redo sequence table, and provides it to the media interface controller to instruct the media interface controller to issue a read redo command to the NVM chip to read data from the NVM chip (1120). The media interface controller processes the media interface command and indicates to the storage command processing unit whether the data read from the NVM chip according to the media interface command has an uncorrectable error (UECC).
[0200] In response to the presence of an uncorrectable error (UECC) in the read data (1130), the storage command processing unit accesses the read redo sequence table again, and accesses the (next) entry in the read redo sequence table in a forward-backward order to obtain the read threshold parameter (1110). In response to the absence of an uncorrectable error (UECC) in the read data (1130), the storage command processing unit further obtains error bit information of the read data, and updates the corresponding entry of the read redo sequence table with the error bit information of the read data (1140). For example, the error bit information of the read data includes the number of bits flipped in the data obtained after error correction decoding (ECC) of the read data compared to the data read from the NVM chip. As an example, the storage command processing unit obtains "read threshold parameter 2" from the read redo sequence table (see also ). Fig.10 ), and generates a media interface command RCMD2. The media interface controller indicates that the media interface command RCMD2 is successfully processed, and the data read correctly from the NVM chip has error bit information E2. In response, the storage command processing unit records the error bit information E2 in the entry associated with the "read threshold parameter 2" in the read redo sequence table.
[0201] Continue to view Fig.11 , if the number of error bits represented by the error bit information E2 is less than the number of error bits of the header entry of the read redo sequence table (for example, Fig.10 If the number of error bits represented by the error bit information E2 is not less than the number of error bits of the header entry of the read redo sequence table (for example, Fig.10 "Error bit number 1"), the storage command processing unit does not move the entry in the read redo sequence table.
[0202] It can be understood that the number of error bits in the read redo sequence table is updated only after the data read from the NVM chip is correctly error-corrected and decoded according to a certain read threshold parameter.
[0203] According to this application Figure 9-11In the illustrated embodiment, the storage command processing unit generates a media interface command (referred to as a normal media interface command for the purpose of clarity) according to a host command or an IO read command. In response to a normal media interface command processing failure (the read data exists in the UECC), the storage command processing unit generates one or more media interface commands indicating read redo (referred to as a media interface command indicating read redo for the purpose of clarity), and updates the read redo sequence table based on the read threshold parameter and error information used by only one of the one or more media interface commands indicating read redo that is successfully processed (the read data is correctly ECC decoded). If all the generated media interface commands indicating read redo fail to process, the storage command processing unit does not update the read redo sequence table.
[0204] The storage command processing unit provides multiple concurrent common media interface commands to the media interface controller. As an example, two common media interface commands are respectively recorded as CMD1 and CMD2. As an example, CMD1 processing fails, and the storage command processing unit generates a media interface command indicating read redo using the read threshold parameter (recorded as RP1) of the first entry obtained from the read redo sequence table, that is, the processing is successful, and the storage command processing unit also updates the number of error bits of the first entry (recorded as E1). CMD2 processing fails, and the storage command processing unit generates media interface commands indicating read redo using the read threshold parameter (recorded as RP1) of an entry obtained from the read redo sequence table and the read threshold parameter (recorded as RP2) of the second entry (recorded as RCMD1 and RCMD2, respectively). Among them, RCMD2 processing is successful, and the storage command processing unit also updates the number of error bits of the second entry (recorded as E2).
[0205] It can be understood that the processing of RCMD1 fails, and the number of error bits of its read data is obviously greater than E2, but the number of error bits is not recorded in the read redo sequence table. The number of error bits of the first entry in the read redo sequence table is still E1. Therefore, E2 may be greater than E1 or less than E1. According to an embodiment of the present application, only when E2 is less than E1, the entry recording E2 is moved to the head of the read redo sequence table, and the other entries of the read redo sequence table are optionally moved back in sequence. If E2 is not less than E1, the entry recording E2 is not moved to the head of the read redo sequence table. E2 is less than E1, which means that the read threshold parameter (RP2) corresponding to E2 has a better effect when reading data from the NVM chip than the read threshold parameter (RP2) corresponding to E1. It is also noted that E2 and E1 are each generated from different common media interface commands (CMD1 and CMD2). Although the entry recording E2 obtains a good read result for CMD2, it may not be able to obtain a good read result for CMD1. Therefore, according to an embodiment of the present application, it is prudent to move the entries of the read redo sequence table. The entry corresponding to E2 is moved to the head of the read redo sequence table only when E2 is less than the number of error bits (E1) of the current head entry of the read redo sequence table. Optionally, if E2 is not less than the number of error bits (E1) of the current head entry of the read redo sequence table, the entry corresponding to E2 is not moved to the head of the read redo sequence table, but the position of the entry corresponding to E2 in the read redo sequence table is moved forward, for example, by one entry position, so that the storage command processing unit can obtain the read threshold parameter corresponding to E2 earlier when the read threshold parameter is obtained later.
[0206] According to an embodiment of the present application, as a large number of media interface commands are processed, the order of the read threshold parameters in the read redo sequence table is adjusted accordingly, and the read threshold that is more suitable for the current NVM chip (with a high probability that the read data can be correctly error-corrected and decoded) is moved to the front position of the read redo sequence table, so that the storage command processing unit can obtain the correct read data from the NVM chip through fewer media interface commands indicating read redo, thereby improving the processing efficiency when uncorrectable errors occur.
[0207] Fig.12 A flowchart for processing a read command according to another embodiment of the present application is shown. Fig.12 The processing flow is jointly implemented by the storage command processing unit and the media interface controller.
[0208] The storage command processing unit hands over the media interface command indicating the read command to the media interface controller for processing (1210), and identifies whether the processing of the read command is successful based on whether the data read from the NVM chip can be correctly error-corrected and decoded (1220). If the read command is successfully processed (1220), the processing result of the read command is returned, and the processing flow of the read command ends. If the processing of the read command fails (1220), the storage command processing unit accesses the read redo sequence table, obtains the read threshold parameter from the head of the read redo sequence table (1225), and generates a media interface command indicating read redo using the obtained read threshold parameter and hands it over to the media interface controller for processing. In response, the media interface controller reads data from the NVM chip using the read redo command (1230). It identifies whether the processing of the read redo command is successful based on whether the data read from the NVM chip using the read redo command can be correctly error-corrected and decoded (1235). If the read redo command is successfully processed (1235), the processing result of the read redo command is returned, and the processing flow of the previous read command ends. If the processing of the read redo command fails (1235), the storage command processing unit accesses the read redo sequence table again and obtains the next read threshold parameter from the read redo sequence table (1240). If the next read threshold parameter (1245) that can be obtained does not exist in the read redo sequence table, it means that all possibilities of the read threshold parameter have been tried but the correct data cannot be read from the NVM chip, and then the processing failure is reported for the previous read command (1248), and the processing flow ends. If the next read threshold parameter (1245) is obtained from the read redo sequence table, the obtained read threshold parameter is used to generate a media interface command indicating read redo and the command is handed over to the media interface controller for processing. In response, the media interface controller reads data from the NVM chip using the read redo command (1250). Whether the processing of the read redo command is successful is identified based on whether the data read from the NVM chip using the read redo command can be correctly error-corrected and decoded (1255).
[0209] If the read redo command is processed successfully (1255), the processing result of the read redo command is used as the processing result of the previous read command. The number of bits flipped between the data read from the NVM chip according to the read redo command and the data obtained after error correction decoding of the read data is compared and obtained as the number of error bits corresponding to the read threshold parameter used by the read redo command, the number of error bits is used to update the read redo sequence table, the number of error bits is recorded in association in the entry of the read redo sequence table recording the read threshold parameter used by the read redo command, and the number of error bits is compared with the number of error bits recorded in the header entry of the read redo sequence table (1260). If the number of error bits corresponding to the read threshold parameter used by the read redo command is not less than the number of error bits recorded in the header entry of the read redo sequence table (1265), the processing flow of the previous read command ends. If the number of error bits corresponding to the read threshold parameter used by the read redo command is less than the number of error bits recorded in the header entry of the read redo sequence table (1265), the entry of the read redo sequence table recording the read threshold parameter used by the read redo command is also moved to the head of the read redo sequence table (1270), and optionally, the other entries in the read redo sequence table are moved back in sequence.
[0210] Optionally, a linked list is used to store the read-redo sequence table, so that after a certain entry is moved to the head of the read-redo sequence table, there is no need to move other entries in the read-redo sequence table.
[0211] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application. Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A read command processing method, characterized in that: include: In response to a failure in processing a media interface command indicating a read, one or more read threshold parameters are obtained from a read-redo sequence table in order of entries, and one or more media interface commands indicating a read-redo are generated according to the obtained one or more read threshold parameters, wherein the one or more media interface commands indicating a read-redo access the same address as the media interface command indicating a read; wherein the read-redo sequence table includes a plurality of entries, each entry in the read-redo sequence table records a read threshold parameter applicable to an NVM chip and a number of error bits corresponding to the read threshold parameter, and the plurality of entries in the read-redo sequence table are sorted, and the entries sorted earlier in the read-redo sequence table will be accessed by the storage command processing unit with higher priority and use the read threshold parameters recorded therein; In response to the fact that the read data does not have uncorrectable errors based on the one or more media interface commands indicating read redo, error bit information of the read data is obtained, the error bit information of the read data is used to update the entry order of the read redo sequence table, and the entry with the least number of error bits is sorted to the front of the read redo sequence table.
2. The read command processing method according to claim 1, characterized in that: Compare a first error bit number in the error bit information of the read data with a second error bit number recorded in the first entry in the read-redo sequence table; If the first number of error bits is less than the second number of error bits, the entry recording the first number of error bits is used as the first entry in the redo sequence table.
3. The read command processing method according to claim 2, characterized in that: The entry ordering is determined by the entry's position in the read redo sequence; Sorting the entry with the least number of error bits to the front of the read-redo sequence table includes: The position of the entry corresponding to the first number of error bits is adjusted to the front position in the read-redo sequence table.
4. The read command processing method according to claim 3, characterized in that: Move the entry corresponding to the first number of error bits to the front position of the read-redo sequence table; Move each entry in the read-before-migration redo sequence table backward by one entry in turn.
5. The read command processing method according to any one of claims 2 to 4, characterized in that: Sort the entries by the number of error bits recorded by the entries; Sorting the entry with the least number of error bits to the front of the read-redo sequence table includes: The positions of the entries in the read-redo sequence table are not adjusted, and the entries corresponding to the first number of error bits are moved forward in order.
6. The read command processing method according to any one of claims 1 to 5, characterized in that: The read-redo sequence is stored in a linked list.
7. The read command processing method according to any one of claims 1 to 6, characterized in that: In response to the first media interface command indicating read redo being processed successfully, the first media interface processing result indicating read redo provided by the media interface controller carries the number of error bits; The storage command processing unit records the number of error bits in an entry of a read redo sequence table that records the read threshold parameters used by the first media interface command indicating read redo, based on the error bit data carried in the obtained processing result of the first media interface command indicating read redo.
8. The read command processing method according to claim 7, characterized in that: In response to recording the number of error bits corresponding to the first medium interface command indicating read redo, the storage command processing unit obtains the error bit information and updates the order of entries in the read redo sequence table according to the error bit information.
9. The read command processing method according to any one of claims 2 to 8, characterized in that: If the first number of error bits is not less than the second number of error bits, the order of the entries in the read-redo sequence table is not changed.
10. An information processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.