Intelligent read retry method and media interface controller
By introducing a read command adjustment unit and a read threshold table into the media interface controller, the read command and read redo command are optimized, which solves the problem of high complexity in the error recovery process of the media interface controller, improves the processing efficiency and reliability of the storage device, and extends the device life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING STARBLAZE TECH CO LTD
- Filing Date
- 2020-06-30
- Publication Date
- 2026-05-12
AI Technical Summary
In existing storage devices, the error recovery process of the media interface controller is highly complex when processing read commands, which leads to longer processing time and increased load. Furthermore, the media interface controller cannot effectively select or implement complex read redo strategies, affecting the performance and lifespan of the storage device.
By introducing a read command adjustment unit and a read threshold table into the media interface controller, read commands or read redo commands are intelligently adjusted and optimized. Read threshold parameters are identified and updated based on the physical address, optimizing the error recovery process, reducing error handling time, and extending the lifespan of the storage device.
It improves the efficiency of read command processing and the reliability of storage devices, reduces the error rate, and extends the lifespan of the devices.
Smart Images

Figure CN113867616B_ABST
Abstract
Description
Technical Field
[0001] This application relates to storage device technology, and more particularly to a method for intelligently implementing read redo on NVM in a storage device and a media interface controller for implementing the method. Background Technology
[0002] Figure 1 A block diagram of a storage device is shown. Storage device 102 is coupled to a host computer to provide storage capabilities. The host computer and storage device 102 can be coupled in various ways, including but not limited to connections via 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), NVMe (NVM Express), Ethernet, Fibre Channel, and wireless communication networks. The host computer can be an information processing device capable of communicating with the storage device via the above methods, such as a personal computer, tablet computer, server, laptop computer, network switch, router, cellular phone, or personal digital assistant. Storage device 102 includes interface 103, control unit 104, one or more NVM chips 105, and 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), and XPoint memory are common types of NVM. Data stored in NVM is susceptible to corruption to some extent. To overcome this problem, error correction codes (ECC) are typically used to protect the data stored in NVM when accessing it. Commonly used error correction codes include BCH code, LDPC, and RS code.
[0004] Interface 103 is compatible with exchanging data with the host via methods such as SATA, IDE, USB, PCIe, NVMe, SAS, Ethernet, and Fibre Channel.
[0005] The control unit 104 is used to control data transfer between the interface 103, the NVM chip 105, and the DRAM 110. It is also used for memory management, host logical address to flash physical address mapping, erase leveling, bad block management, etc. The control unit 104 can be implemented in various ways, including software, hardware, firmware, or a combination thereof. For example, the control unit 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 unit 104 may also include a processor or controller, in which software executes to manipulate the hardware of the control unit 104 to process I / O (Input / Output) commands. The control unit 104 can also be coupled to the DRAM 110 and can access the data in the DRAM 110. FTL tables and / or cached I / O command data can be stored in the DRAM.
[0006] The control unit 104 includes a flash interface controller (or media interface controller, flash channel controller), which is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in accordance with the interface protocol of the NVM chip 105 to operate the NVM chip 105, and receives the command execution results output from the NVM chip 105. Known NVM chip interface protocols include "Toggle", "ONFI", etc.
[0007] An NVM chip includes one or more Logic Units (LUNs). An 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, while multiple Logic Units within an NVM chip can execute commands and report status independently of each other. The meanings of target, Logic Unit, and Plane are provided in the "Open NAND Flash Interface Specification (Revision 3.0)" available at http: / / www.micron.com / ~ / media / Documents / Products / Other%20Documents / ONFI3_0Gold.ashx, which is part of the prior art.
[0008] NVM chips typically store and retrieve data in pages, while erasing data in blocks. A block (also called a physical block) contains multiple pages (also called physical pages). Physical pages have a fixed size, such as 17664 bytes. Physical pages can also have other sizes.
[0009] Figure 2 A detailed block diagram of the control components of the storage device is shown.
[0010] The host accesses the storage device using I / O commands that conform to the storage protocol. The control unit generates one or more storage commands based on the I / O 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, erase commands) that conform to the interface protocol of the NVM chip. The control unit also tracks the completion of all storage commands generated from a single I / O command and indicates the processing results of the I / O commands to the host.
[0011] See Figure 2 The control components include, for example, a host interface, a host command processing unit, a storage command processing unit, a media interface controller, and a storage media management unit. The host interface receives I / O commands from the host and generates storage commands, which are then provided to the storage command processing unit. A storage command may access a storage space of the same size, such as 4KB. The data unit recorded in the NVM chip corresponding to the data accessed by a storage command is called a data frame. A physical page records one or more data frames. For example, if the size of a physical page is 17664 bytes and the size of a data frame is 4KB, then one physical page can store four data frames.
[0012] The smallest data unit protected by data correction codes is called an ECC block. An ECC block includes user data and parity data, and has different sizes. The ratio of the user data unit size to the ECC block size is called the ECC bitrate. The ECC bitrate reflects the error correction capability of ECC. Generally, the lower the bitrate, the stronger the error correction capability. In one example, the user data size within an ECC block is one data frame size, while the parity data size is 15 bytes. In another example, the user data size within an ECC block is 512 bytes, while the parity data size is 8 bytes, allowing a single data frame to hold multiple ECC blocks.
[0013] The storage media management unit (SMMU) maintains a logical address to physical address translation for each storage command. For example, the SMMU includes an FTL table. For a read command, the SMMU outputs the physical address corresponding to the logical address accessed by the storage command; for a write command, the SMMU allocates an available physical address and records the mapping between the accessed logical address and the allocated physical address. The SMMU also maintains functions required for managing the NVM chip, such as garbage collection and wear leveling.
[0014] The storage command processing unit, based on the physical address provided by the storage media management unit, operates the media interface controller to issue storage media access commands to the NVM chip. For clarity, the commands sent by the storage command processing unit to the media interface controller are called media interface commands, while the commands sent by the media interface controller to the NVM chip are called storage media access commands. Storage media access commands conform to the NVM chip's interface protocol. Taking storage media access read commands as an example, the NVM chip supports various types of read commands based on the size of the data being read, such as read commands to read an entire physical page, read commands to read one, two, or more data frames, read commands to read multiple planes, and read commands to read multiple physical pages of a word line, etc.
[0015] The media interface command corresponds to the storage media access command, so the media interface controller determines the type of the generated storage media access command based on the type of the media interface command.
[0016] Figure 3 A block diagram of a prior art media interface controller is shown.
[0017] The media interface controller of the control unit includes a media interface, an ECC encoding unit, and an ECC decoding unit. The media interface is coupled to the NVM chip, providing storage media access commands to the NVM chip and retrieving data from the NVM chip based on storage media access read commands. The media interface is coupled to the ECC encoding unit and the ECC decoding unit. The media interface controller processes data from the storage command processing unit (see also...). Figure 2 The media interface controller receives the media interface command, generates and provides storage media access commands 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. The decoding result is written to the memory.
[0018] The memory is either DRAM or SRAM, which is coupled to the control unit.
[0019] See Figure 3 Taking reading data 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 In the middle, as indicated by (1). The media interface generates storage media access (read) commands and provides them to the NVM chip ( Figure 3 In the middle, as indicated by (2). The media interface also provides the read data output by the NVM chip to the ECC decoding unit ( Figure 3 In the middle, as indicated by (3). For 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 In the middle, as indicated by (4). The storage command processing unit starts the error handling process, for example, by performing error correction through read retry, and provides the media interface command indicating read retry to the media interface controller. The media interface generates a storage media access (read) command indicating read retry and provides it to the NVM chip ( Figure 3 In the context of (5), read redo is a read command that the NVM chip can process, which has a specified read threshold parameter. The read redo command carries, for example, a read threshold parameter to indicate the read threshold to be used. By adjusting the read threshold parameter, it is possible to adapt to the characteristics of the NVM chip's storage medium (random noise, wear, electron escape, etc.), thereby increasing the probability of reading the correct data.
[0020] In response to a read command instructing the storage medium access (read) to be re-encoded, the NVM chip outputs read data, and the media interface provides the read data to the ECC decoding unit for further ECC decoding. Figure 3 In the middle, as indicated by (6). For example, if the ECC decoding is successful this time, the decoded data is moved into the memory ( Figure 3 In the middle, as indicated by (7). If ECC decoding fails again at “(6)”, error handling is performed by repeating the process from “(4)” to “(7)”.
[0021] In other cases, the media interface controller spontaneously performs read redo. In response to ECC decoding unit decoding failure, the media interface controller directly attempts one or more other read threshold parameters via a media interface command instructing read redo. Summary of the Invention
[0022] The storage command processing unit (SCR) is capable of implementing complex error recovery processes. However, the back-and-forth error handling between the SCR and the media interface controller prolongs error handling time and increases the load on the SCR. This increased load is particularly severe when the SCR is implemented in software, both lengthening read command processing time and limiting the SCR's processing capacity due to the increased load. Furthermore, when the media interface controller spontaneously performs read redo, its complexity limits the types of read redo attempts it can attempt or prevents it from implementing complex strategies for searching read threshold parameters.
[0023] Optionally or further, in some cases, the supplier of the storage device's control components delivers programmable control components to the storage device manufacturer. The storage device manufacturer programs the storage command processing unit, while the control component supplier implements the media interface controller. The media interface controller supplier typically has a more thorough understanding of the characteristics of the NVM chip, enabling them to better implement the error recovery process for read commands, including using optimized read redo commands to complete read command processing faster or more efficiently. Storage device manufacturers, on the other hand, may have a relatively lower understanding of the NVM chip's characteristics. Therefore, they desire the media interface controller to provide more guidance for the error recovery process and intelligently select or prompt for the read threshold parameters used in read redo, thereby shortening error handling time, reducing the error rate of the storage device, and extending the lifespan of the storage device.
[0024] According to a first aspect of this application, a first read command processing method according to the first aspect of this application is provided, comprising: receiving a media interface command; adjusting a read command or read redo command to be generated according to the media interface command; and providing the adjusted read command or read redo command to a non-volatile memory chip.
[0025] According to the first read command processing method of the first aspect of this application, a second read command processing method according to the first aspect of this 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.
[0026] According to the second read command processing method of the first aspect of this application, a third read command processing method according to the first aspect of this 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 a read redo command indicating the use of the first read threshold parameter.
[0027] According to the second or third read command processing method of the first aspect of this application, a fourth read command processing method according to the first aspect of this application is provided, wherein if a first read threshold parameter for a physical address for a read command or read redo command cannot be found, the read command or read redo command is not updated, and a non-volatile memory chip is directly provided.
[0028] According to the first to fourth read command processing methods of the first aspect of this application, a fifth read command processing method according to the first aspect of this application is provided, wherein, according to the read redo command to be generated, if the read redo command to be generated is invalid or does not have a better effect than the read command for the physical address to be accessed, then the read redo command is updated to a read command to access the physical address.
[0029] According to the first to fourth read command processing methods of the first aspect of this application, a sixth read command processing method according to the first aspect of this 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, then the read redo command is directly provided to the non-volatile memory chip without updating the read redo command.
[0030] According to the first to sixth read command processing methods of the first aspect of this application, a seventh read command processing method according to the first aspect of this application is provided, wherein, based on the read redo command to be generated, if a first read threshold parameter is identified for the physical address to be accessed by the read redo command to be generated, the read redo command is updated to a read redo command indicating the use of the first read threshold parameter.
[0031] According to the first to seventh read command processing methods of the first aspect of this application, an eighth read command processing method according to the first aspect of this application is provided, wherein, according to the read command or read redo command to be generated, a read threshold table is queried using the physical address or a portion of the physical address to be accessed by the read command or read redo command 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.
[0032] According to the eighth read command processing method of the first aspect of this application, a ninth read command processing method according to the first aspect of this 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.
[0033] According to the eighth or ninth read command processing method of the first aspect of this application, a tenth read command processing method according to the first aspect of this application is provided, wherein, according to the read redo command to be generated that instructs to access the physical address using a second read threshold, the read threshold table is queried using the physical address; 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 added to the read threshold table.
[0034] According to the eighth to tenth read command processing methods of the first aspect of this application, an eleventh read command processing method according to the first aspect of this application is provided, wherein, according to the read redo command to be generated, the read redo command instructs to access the physical address using a third read threshold, the read threshold table is queried using 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, then the read redo command is provided to the non-volatile memory chip without modification, and the read threshold of the entry that records the physical address in the read threshold table is also updated to the third read threshold.
[0035] According to the eighth to eleventh read command processing methods of the first aspect of this application, a twelfth read command processing method according to the first aspect of this application is provided, which further includes identifying an uncorrectable flag in a read threshold table entry, the uncorrectable flag indicating that the data obtained from the physical address corresponding to the read threshold access previously recorded with the read threshold entry cannot be correctly decoded by the error correction code.
[0036] According to the twelfth read command processing method of the first aspect of this application, a thirteenth read command processing method according to the first aspect of this application is provided, wherein if there is an uncorrectable mark 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.
[0037] According to the twelfth or thirteenth read command processing method of the first aspect of this application, a fourteenth read command processing method according to the first aspect of this application is provided, wherein, according to the read redo command to be generated, if there is an entry for the physical address indicated by the read redo command in the read threshold table, but the entry has an uncorrectable flag, the uncorrectable flag in the entry is cleared, and the read redo command is provided to the non-volatile memory chip.
[0038] According to the twelfth to fourteenth read command processing methods of the first aspect of this application, a fifteenth read command processing method according to the first aspect of this application is provided, wherein, in response to the failure of the error correction code decoding unit to decode the data read from the non-volatile memory chip according to the read command or read redo command to access the first physical address, an uncorrectable flag is set in the entry of the read threshold table corresponding to the first physical address.
[0039] According to the twelfth to fifteenth read command processing methods of the first aspect of this application, a sixteenth read command processing method according to the first aspect of this application is provided, wherein, in response to the failure of the error correction code decoding unit to decode the data read from the non-volatile memory chip according to the read command or read redo command to access the 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.
[0040] According to the eighth to sixteenth read command processing methods of the first aspect of this application, a seventeenth read command processing method according to the first aspect of this 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.
[0041] According to the seventeenth read command processing method of the first aspect of this application, an eighteenth read command processing method according to the first aspect of this 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 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 this application, a nineteenth read command processing method according to the first aspect of this application is provided, wherein the number of entries in the read threshold table can only accommodate a portion of the possible values of the physical block number, the layer number of the 3D non-volatile memory chip, or a combination of the physical block number and the layer number.
[0043] According to the first to nineteenth read command processing methods of the first aspect of this application, a twentieth read command processing method according to the first aspect of this application is provided, wherein the media interface command further includes a receive read command adjustment unit enable flag.
[0044] According to the twentieth read command processing method of the first aspect of this application, a twenty-first read command processing method according to the first aspect of this application is provided, wherein if the read command adjustment unit enable flag is valid, the read command or read redo command to be generated according to the media interface command is adjusted.
[0045] According to the twentieth or twentieth-first read command processing method of the first aspect of this application, a twentieth-second read command processing method according to the first aspect of this 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.
[0046] According to the first to twenty-second read command processing methods of the first aspect of this application, a twenty-third read command processing method according to the first aspect of this application is provided, which further includes providing a predicted read threshold for the physical address accessed by the read command or read redo command to be generated.
[0047] According to the twenty-third read command processing method of the first aspect of this application, a twenty-fourth read command processing method according to the first aspect of this application is provided, wherein a predicted read threshold is given according to a read threshold table.
[0048] According to the twenty-fourth read command processing method of the first aspect of this application, a twenty-fifth read command processing method according to the first aspect of this application is provided, wherein an average or weighted average of the read thresholds of all or some entries in the read threshold table is calculated as the predicted read threshold.
[0049] According to the twenty-fourth or twenty-fifth read command processing method of the first aspect of this application, a twenty-sixth read command processing method according to the first aspect of this application is provided, wherein the 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 is calculated as the predicted read threshold.
[0050] According to the twenty-sixth read command processing method of the first aspect of this application, a twenty-seventh read command processing method according to the first aspect of this application is provided, wherein physical address proximity includes two physical addresses being numerically close, the memory cells represented by the two physical addresses being spatially close on the non-volatile memory chip, and / or the memory cells represented by the two physical addresses being in similar usage states.
[0051] According to the twenty-fourth read command processing method of the first aspect of this application, a twenty-eighth read command processing method according to the first aspect of this application is provided, which further includes predicting a read threshold based on temperature, the number of erase / write cycles and / or the number of read cycles of the storage cell.
[0052] According to the twenty-fourth to twenty-eighth read command processing methods of the first aspect of this application, a twenty-ninth read command processing method according to the first aspect of this application is provided, which further includes generating a read redo command using a predicted read threshold and providing it to a non-volatile memory chip.
[0053] According to the twenty-fourth to twenty-ninth read command processing methods of the first aspect of this application, a thirtieth read command processing method according to the first aspect of this application is provided, which further includes updating the read threshold table using a predicted read threshold.
[0054] According to the twenty-fourth to thirtieth read command processing methods of the first aspect of this application, a thirty-first read command processing method according to the first aspect of this application is provided, wherein the method further includes generating a predicted read threshold based on an uncorrectable marker in a read threshold table.
[0055] According to the thirty-first read command processing method of the first aspect of this application, a thirty-second read command processing method according to the first aspect of this application is provided, wherein, in response to the presence of an uncorrectable marker, a predicted read threshold different from the read threshold indicated by the entry where the uncorrectable marker is located is generated.
[0056] According to the twenty-fourth to thirty-second read command processing methods of the first aspect of this application, a thirty-third read command processing method according to the first aspect of this 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 read threshold as the predicted read threshold.
[0057] According to the twenty-fourth to thirty-third read command processing methods of the first aspect of this application, the thirty-fourth read command processing method according to the first aspect of this application is provided, wherein the media interface command further includes a read threshold prediction enable flag.
[0058] According to the thirty-fourth read command processing method of the first aspect of this application, a thirty-fifth read command processing method according to the first aspect of this application is provided, wherein if the read threshold prediction enable flag is valid, a predicted read threshold is generated for the accessed physical address.
[0059] According to the thirty-fourth and thirty-fifth read command processing methods of the first aspect of this application, a thirty-sixth read command processing method according to the first aspect of this application is provided, wherein if the read threshold prediction enable flag is invalid, no predicted read threshold is provided.
[0060] According to the twenty-fourth to thirtieth read command processing methods of the first aspect of this application, a thirty-seventh read command processing method according to the first aspect of this application is provided, wherein a first media interface command is provided to the media interface;
[0061] In response to an uncorrectable error occurring in the processing of 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.
[0062] According to the first to thirty-seventh read command processing methods of the first aspect of this application, a thirty-eighth read command processing method according to the first aspect of this application is provided, wherein a corresponding microinstruction sequence is obtained according to the medium interface command to be generated, and a specified signal is generated on the lead coupled to the non-volatile memory chip according to the signal indicated by the microinstruction sequence.
[0063] The microinstructions in the microinstruction sequence include microinstructions for obtaining the read threshold and / or microinstructions for updating the read threshold.
[0064] According to the thirty-eighth read command processing method of the first aspect of this application, a thirty-ninth read command processing method according to the first aspect of this application is provided, wherein the operand of the read threshold microinstruction includes a physical address.
[0065] According to the thirty-eighth and thirty-ninth read command processing methods of the first aspect of this application, a fortieth read command processing method according to the first aspect of this application is provided, wherein the operand of the read threshold microinstruction further includes a register storing a read threshold table or a register storing an index of the read threshold table.
[0066] According to the thirty-eighth to fortieth read command processing methods of the first aspect of this application, the forty-first read command processing method according to the first aspect of this application is provided, wherein the read threshold acquisition microinstruction further includes a result register, and in response to the execution of the read threshold acquisition microinstruction, the result register is filled with the read threshold corresponding to the physical address indicated by the read threshold acquisition microinstruction.
[0067] According to the forty-first read command processing method of the first aspect of this application, a forty-second read command processing method according to the first aspect of this application is provided, wherein when executing the read threshold microinstruction, the entry corresponding to the physical address indicated by the read threshold microinstruction is obtained from the read threshold table, and the read threshold of the entry is obtained to fill the result register.
[0068] According to the forty-first read command processing method of the first aspect of this application, a forty-third read command processing method according to the first aspect of this application is provided, wherein when executing the read threshold microinstruction, the result register is filled with the predicted read threshold.
[0069] According to the thirty-eighth to forty-third read command processing methods of the first aspect of this application, a forty-fourth read command processing method according to the first aspect of this application is provided, wherein the read threshold obtained by the read threshold microinstruction is used to configure a microinstruction sequence for processing read redo commands, such that when the microinstruction sequence is executed, a read redo command indicating the obtained read threshold is provided to the non-volatile memory chip.
[0070] According to the thirty-eighth to forty-fourth read command processing methods of the first aspect of this application, a forty-fifth read command processing method according to the first aspect of this application is provided, wherein the microinstruction sequence for processing the read redo command includes a microinstruction sequence for generating a setting feature command and a microinstruction sequence for generating the read redo command, and 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.
[0071] The read threshold for 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 this application, a forty-sixth read command processing method according to the first aspect of this application is provided, wherein the microinstruction sequence for processing the read redo command further includes an additional microinstruction sequence for generating a setting feature command, 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 this application, the forty-seventh read command processing method according to the first aspect of this application is provided, wherein the operands of the read threshold microinstruction include the 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 this application, a forty-eighth read command processing method according to the first aspect of this application is provided, wherein, in response to the execution of the update read threshold microinstruction, 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 this application, a forty-ninth read command processing method according to the first aspect of this 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 the output of the data to be acquired by the read command or read redo command.
[0076] According to the forty-ninth read command processing method of the first aspect of this application, a fiftieth read command processing method according to the first aspect of this 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 this application, a fifty-first read command processing method according to the first aspect of this application is provided, wherein, in response to a read pause signal, the read enable signal or clock signal provided to the non-volatile memory chip is paused or canceled.
[0078] According to the forty-ninth or fiftieth read command processing method of the first aspect of this application, a fifty-second read command processing method according to the first aspect of this application is provided, wherein a signal is generated to put the non-volatile memory chip into a pause state, instructing the non-volatile memory chip to pause the output of the data to be acquired by the read command or read redo command.
[0079] According to the 51st read command processing method of the first aspect of this application, a 53rd read command processing method according to the first aspect of this application is provided, wherein, in a state where the non-volatile memory chip is instructed to pause data output, in response to canceling the read pause signal or no longer generating the read pause 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 read redo command.
[0080] According to the forty-ninth to fifty-third read command processing methods of the first aspect of this application, a fifty-fourth read command processing method according to the first aspect of this 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 this application, the fifty-fifth read command processing method according to the first aspect of this application is provided, wherein the microinstruction sequence for generating a read command or read redo command further includes obtaining a read threshold microinstruction and / or updating a read threshold microinstruction.
[0082] According to the 55th read command processing method of the first aspect of this application, the 56th read command processing method of the first aspect of this application is provided, wherein, by executing a read threshold acquisition microinstruction, if the read threshold to be used is obtained, a microinstruction sequence for generating a read redo command is invoked 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 55th or 56th read command processing method of the first aspect of this application, a 57th read command processing method according to the first aspect of this application is provided, wherein, in order to generate a read redo command, a read threshold microinstruction is first invoked to obtain a read threshold or a predicted read threshold, and the obtained read threshold or the predicted read threshold is used to configure the microinstruction sequence for generating the read redo command so as 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 this application, a fifty-eighth read command processing method according to the first aspect of this application is provided, wherein an update read threshold microinstruction is further executed to update the read threshold recorded in the entry corresponding to the physical address to be accessed in the read threshold table.
[0085] According to the first to fifty-eight read command processing methods of the first aspect of this application, a fifty-ninth read command processing method according to the first aspect of this 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 this application, the sixtieth read command processing method according to the first aspect of this application is provided, wherein the microinstruction sequence further includes a count value indicating that a specified signal is repeatedly driven multiple times.
[0087] According to the sixtieth read command processing method of the first aspect of this application, a sixty-first read command processing method according to the first aspect of this application is provided, wherein counting is stopped in response to a valid read pause signal.
[0088] According to the sixtieth or sixty-first read command processing method of the first aspect of this application, a sixty-second read command processing method according to the first aspect of this application is provided, wherein the counting is resumed in response to the invalidation or cancellation of the read pause signal.
[0089] According to the sixtieth to sixty-second read command processing methods of the first aspect of this application, a sixty-third read command processing method according to the first aspect of this application is provided, wherein, in the case of stopping counting, the drive lead is stopped to instruct the non-volatile memory chip to pause data transmission.
[0090] According to the 59th to 63rd read command processing methods of the first aspect of this application, the 64th read command processing method according to the first aspect of this application is provided, wherein the read pause signal further instructs a signal driver to generate a read enable signal indicating invalidation or cancellation on the lead coupled to the non-volatile memory chip, so as to instruct the non-volatile memory chip to pause data transmission.
[0091] According to the 59th to 64th read command processing methods of the first aspect of this application, the 65th read command processing method according to the first aspect of this application is provided, wherein the read pause signal further instructs a signal driver to generate a signal on the lead coupled to the non-volatile memory chip indicating that the non-volatile memory chip has entered a pause state.
[0092] According to the 59th to 65th read command processing methods of the first aspect of this application, the 66th read command processing method according to the first aspect of this application is provided, wherein the read pause signal is only valid for the execution of the microinstruction sequence that generates the read command or read redo command.
[0093] According to the 59th to 66th read command processing methods of the first aspect of this application, the 67th read command processing method according to the first aspect of this application is provided, wherein a concession processing is performed in response to a read pause signal.
[0094] According to the sixty-seventh read command processing method of the first aspect of this application, a sixty-eighth read command processing method according to the first aspect of this 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 part or all of the execution state 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 this application, a sixty-ninth read command processing method according to the first aspect of this 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 read commands or read redo commands to other non-volatile memory chips or other logic units of non-volatile memory chips.
[0096] According to the sixty-ninth read command processing method of the first aspect of this application, the seventieth read command processing method according to the first aspect of this application is provided, wherein, after the read pause signal is withdrawn and the execution concession of other microinstruction sequences or other microinstruction sequences is completed, the execution state of the previously saved microinstruction sequence for generating read commands or read redo commands is restored, and the previously saved microinstruction sequence for generating read commands or read redo commands continues to be processed.
[0097] According to a second aspect of this application, a first media interface controller according to the second aspect of this application is provided, including a read command adjustment unit, a media interface, and an error correction code decoding unit, wherein the media interface is coupled to 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 read redo command based on the media interface command, and provides the adjusted media interface command to the media interface.
[0099] According to the first media interface controller of the second aspect of the present application, a second media interface controller according to the second aspect of the present application is provided, 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 multiple entries, and the entries of the read threshold table include physical addresses and read thresholds;
[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 using the physical address or part of the physical address to be accessed by the read command or read redo command to obtain the read threshold corresponding to the physical address to be accessed, updates the media interface command corresponding to the read command or read redo command with the obtained read threshold, and provides the updated command to the media interface.
[0101] According to the first or second media interface controller of the second aspect of this application, a third media interface controller according to the second aspect of this application is provided, wherein the media interface includes a microinstruction execution unit and a signal driver;
[0102] The media interface obtains the corresponding microinstruction sequence based on the received media 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 sequence number on the lead coupling between the media interface and the non-volatile memory chip, and generates a signal sequence that conforms to 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 this application, a fourth media interface controller according to the second aspect of this 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 read threshold microinstruction and / or an update read threshold microinstruction.
[0104] According to the fourth media interface controller of the second aspect of this application, a fifth media interface controller according to the second aspect of this application is provided, wherein, in response to the execution of a read threshold microinstruction, a read threshold table is queried with the physical address indicated by the read threshold microinstruction or a portion thereof, and a 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 this application, a sixth media interface controller according to the second aspect of this application is provided, wherein, in response to the execution of the update read threshold microinstruction, 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 a portion thereof indicated by the update read threshold microinstruction.
[0106] According to the fourth to sixth media interface controllers of the second aspect of this application, a seventh media interface controller according to the second aspect of this application is provided, wherein, in response to obtaining a read threshold by executing a read threshold microinstruction, a microinstruction sequence for generating a read redo command is invoked to continue processing, and the obtained read threshold is used to configure the microinstruction sequence for generating the read redo command.
[0107] According to a third aspect of this application, a first storage device according to the third aspect of this application is provided, including the media interface controller described above. Attached Figure Description
[0108] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0109] Figure 1 A block diagram showing a storage device using existing technology;
[0110] Figure 2 A detailed block diagram of the control components of the storage device is shown;
[0111] Figure 3 A block diagram illustrating a prior art media interface controller is shown.
[0112] Figure 4 A block diagram of a media interface controller according to an embodiment of this application is shown;
[0113] Figure 5 A block diagram of a read command adjustment unit according to an embodiment of this application is shown;
[0114] Figure 6 A block diagram of a media interface according to yet another embodiment of this application is shown;
[0115] Figure 7 A block diagram of a media interface controller according to an embodiment of this application is shown;
[0116] Figure 8 A detailed block diagram of the media interface according to an embodiment of this application is shown. Detailed Implementation
[0117] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0118] Figure 4 A block diagram of a media interface controller according to an embodiment of this application is shown.
[0119] The media interface controller of the control unit includes a media interface, an ECC encoding unit, an ECC decoding unit, and a read command adjustment unit. The media interface is coupled to the read command adjustment unit, the NVM chip, the ECC encoding unit, and the ECC decoding unit.
[0120] The media interface commands provided by the storage command processing unit to the media interface controller are first provided to the read command adjustment unit. The read command adjustment unit only adjusts the media interface commands that are to generate read commands or read redo commands, and provides the adjusted media interface commands to the media interface. For other types of media interface commands (e.g., write commands, erase commands, etc.), the read command adjustment unit does not process them, but provides them directly to the media interface.
[0121] According to embodiments of this application, the read command adjustment unit identifies a preferred read threshold parameter for accessing the physical address based on the physical address accessed by the read command or read redo command to be generated. For example, for physical address P1, if the read command adjustment unit identifies that the read threshold parameter V1 is preferred for physical address P1, it updates the received media interface command for accessing physical address P1, updating the media interface command to indicate the use of the read threshold parameter V1 as a read redo command. Alternatively, if the read command adjustment unit cannot find a preferred read threshold parameter for physical address P1, it does not update the media interface command but directly provides it to the media interface.
[0122] As another example, the storage command processing unit provides a media interface command instructing access to physical address P2 using a read redo command. However, for physical address P2, the read command adjustment unit identifies that the read redo command is invalid or does not offer better performance than a read command. Therefore, the read command adjustment unit updates the media interface command instructing the read redo command to a media interface command instructing access to physical address P2 using a normal read command, or it directly provides the media interface command instructing the read redo command without updating it. For yet another example, for physical address P2, the read command adjustment unit identifies that the read threshold parameter V2' is preferred for physical address P2, and updates the media interface command to instruct the use of a read redo command instructing the use of the read threshold parameter V2'.
[0123] Figure 5 A block diagram of a read command adjustment unit according to an embodiment of this application is shown.
[0124] The read command adjustment unit includes a command parsing unit and a read threshold table. Optionally, the read command adjustment unit may also include a read threshold prediction unit.
[0125] The read command adjustment unit maintains a read threshold table. The read threshold table includes multiple entries, each containing a physical address, a read threshold, and / or a UECC (Uncorrectable Code) flag. The UECC flag indicates that data obtained from accessing the physical address corresponding to a read threshold previously recorded in the read threshold entry cannot be correctly decoded by ECC. In response to receiving a media interface command instructing a read command or a read redo command, the unit queries the read threshold table using the physical address or a portion of that physical address to be accessed by the instructed read command or read redo command to obtain the read threshold corresponding to the physical address to be accessed. The obtained read threshold is then used to update the media interface command, and the updated media interface command is provided to the media interface.
[0126] Storage command processing unit (see also) Figure 4The command parsing unit provides the media interface command to the read command adjustment unit. The command parsing unit identifies the type of the received media interface command. For media interface commands other than read commands and read redo commands, it does not process them but directly provides them to the media interface. For media interface commands indicating read commands or read redo commands, it queries the read threshold table to obtain the read threshold, updates the media interface command to indicate a read redo command, and provides it to the media interface.
[0127] For example, the command parsing unit receives a media interface command instructing access to physical address P1 for a read command. It then queries the read threshold table using physical address P1. If an entry for physical address P1 and read threshold V1 exists in the read threshold table, the received media interface command is updated to indicate a read redo command using read threshold V1 before being provided to the media interface. In another example, the command parsing unit receives a media interface command instructing access to physical address P2 for a read redo command (instructing read threshold V2). It queries the read threshold table using physical address P2. If an entry for physical address P2 does not exist in the read threshold table, the command parsing unit provides the media interface command without modification and also adds an entry for physical address P2 and read threshold V2 to the read threshold table. In another example, the command parsing unit receives a media interface command indicating access to physical address P3 (indicating read threshold V3), queries the read threshold table using physical address P3, and if there is an entry in the read threshold table that records physical address P3, but the read threshold recorded in the entry is different from V3, then the command parsing unit provides the media interface command to the media interface without modification, and also updates the read threshold of the entry that records physical address P3 in the read threshold table to read threshold V3.
[0128] Optionally, the command parsing unit may also identify the UECC flag in the read threshold table entries. For example, for a media interface command indicating a read command to access physical address P4, there is an entry for physical address P4 in the read threshold table, but this entry contains a UECC flag, which means that the data obtained by accessing physical address P4 using the previously recorded read threshold cannot be correctly decoded by ECC. Therefore, the command parsing unit directly provides this media interface command to the media interface without updating it to indicate a read redo command. As another example, for a media interface command indicating a read redo command to access physical address P5, there is an entry for physical address P5 in the read threshold table, but this entry contains a UECC flag. The command parsing unit clears the UECC flag from this entry and provides the media interface command to the media interface. Optionally, the command parsing unit may also check whether the read threshold indicated by the read redo command is different from the read threshold recorded in the entry. If they are different, the read threshold in the read redo command is used to replace the read threshold in the entry.
[0129] Understandably, in response to the ECC decoding unit's failure to perform ECC decoding on data read from the NVM chip based on a read command or read redo command for an access physical address, a UECC flag is set in the corresponding entry of the read threshold table. Alternatively, in response to the ECC decoding unit's failure to perform ECC decoding on data read from the NVM chip based on a read command or read redo command for an access physical address, if there is no entry in the read threshold table corresponding to the physical address that failed to decode, an entry corresponding to that physical address is added to the read threshold table, and the UECC flag is set.
[0130] Optionally, the read threshold table has a limited number of entries. The physical address in the entry is, for example, the physical block number of the NVM chip, the layer number of the 3D NVM chip, or a combination of the physical block number and the layer number. Alternatively, 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 NVM chip, or a combination of the physical block number and the layer number. Alternatively, if the number of entries in the read threshold table cannot accommodate all possible values of the physical block number, the layer number of the 3D NVM chip, or a combination of the physical block number and the layer number, the command parsing unit also maintains the replacement of read threshold table entries, replacing entries in the read threshold table using strategies such as least recently used, first-in-first-out, etc.
[0131] In an optional embodiment, the media interface commands provided by the storage command processing unit further include a read command adjustment unit enable flag. If the read command adjustment unit enable flag is valid, the read command adjustment unit adjusts according to... Figure 4 and Figure 5 The media interface commands are processed in a display 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.
[0132] In optional embodiments, the read threshold prediction unit provides a predicted read threshold for the accessed physical address. Due to limitations in 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 may be recorded in the read threshold table but also have a UECC tag. In some cases, the storage command processing unit lacks understanding of the characteristics of the NVM chip and desires the read command adjustment unit to proactively provide a suggested 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 the average or weighted average of the read thresholds of all or some entries in the read threshold table as the predicted read threshold. As another example, the read threshold prediction unit calculates the average or weighted average of the read thresholds of all or some entries in the read threshold table that have physical addresses close to the physical address to be accessed by the generated read command or read redo command as the predicted read threshold. Address proximity includes two physical addresses being numerically close (e.g., adjacent integers, or a difference less than, for example, 10), or the memory cells represented by the two physical addresses being spatially close on the NVM chip (e.g., spatially adjacent, or less than, for example, 16 physical pages, 3 physical blocks, and / or layers apart), and / or the memory cells represented by the two physical addresses being in similar usage states. In another example, the read threshold prediction unit also predicts a read threshold based on factors such as temperature, the number of erase / write cycles and / or read cycles of the memory cell. The read threshold predicted by the read threshold prediction unit is used to generate a read redo command and provided to the media interface.
[0133] 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 this predicted read threshold and physical address P6 are recorded as entries in the read threshold table.
[0134] Optionally, the read threshold prediction unit also generates a predicted read threshold based on the UECC flag in the read threshold table. For example, if a media interface command indicating access to physical address P7 is received, and the read threshold table contains an entry recording physical address P7 with a UECC flag, the read threshold prediction unit generates a predicted read threshold different from the read threshold indicated in the entry based on the UECC flag. For example, if the entry records read threshold V7 and the UECC flag, the read threshold prediction unit generates a predicted read threshold V7' in the direction of increasing read thresholds. Understandably, the change in read thresholds has a certain regularity; for example, the change in read thresholds 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 read thresholds as the predicted read threshold.
[0135] In another embodiment, the media interface command provided by the storage command processing unit further 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 operate and does not provide a predicted read threshold.
[0136] Therefore, according to one embodiment of this application, the storage command processing unit and the read command adjustment unit work together. The storage command processing unit does not need to understand the characteristics of the NVM chip; instead, under normal circumstances, the media interface command provided to the media interface controller does not carry a read threshold prediction enable flag. However, if, for example, ECC decoding fails while reading data, a media interface command indicating a (normal) read command with a read threshold prediction enable flag is provided to the media interface controller. The read threshold prediction unit generates a predicted read threshold, and the command parsing unit uses the predicted read threshold to generate a media interface command indicating a read redo command, replacing the original (normal) read command, and provides it to the media interface. Next, if the ECC decoding of the data read by the generated media interface command indicating a read redo command fails again, the storage command processing unit does not need to maintain a complex error handling process. Instead, it issues another media interface command indicating a read command for that physical address to the media interface controller, carrying a read threshold prediction enable flag. In response, the read threshold prediction unit generates a new predicted read threshold, and the command parsing unit uses the predicted read threshold to generate a media interface command indicating a new read redo command, providing it to the media interface. In this manner, the storage command processing unit, in response to an ECC decoding failure, repeatedly issues a media interface command to the media interface controller, indicating a read command for the physical address, with a read threshold prediction enable flag. The media interface controller then uses the read threshold prediction unit to attempt one or more read thresholds to complete the error handling process for the read data ECC decoding failure. Optionally, in each prediction, the read threshold prediction unit generates a predicted read threshold in the direction of increasing read threshold.
[0137] Figure 6 A block diagram of a media interface according to yet another embodiment of this application is shown.
[0138] The media interface includes a microinstruction execution unit and signal drivers. The media interface is coupled to the NVM chip and the microinstruction memory, providing storage media access commands to the NVM chip and retrieving the processing results of these commands. The media interface is also coupled to a microinstruction memory that stores microinstruction sequences, generating storage media access commands based on the microinstructions retrieved from the microinstruction memory.
[0139] The microinstruction sequence corresponds to the media interface command. The media interface obtains the corresponding microinstruction sequence based on the received media interface command and provides it to the microinstruction execution unit. The microinstruction execution unit executes the microinstruction sequence, driving the signal driver according to the signal indicated by the microinstruction sequence to generate the specified signal on the lead coupling between the media interface and the NVM chip. Furthermore, by executing the microinstruction sequence, it generates a signal sequence conforming to the NVM chip interface protocol.
[0140] Some microinstructions also include a counter value indicating how many times a specified signal is driven. For example, if 1 byte of data is fetched from the DQ lead each time, to obtain, for example, 4KB of data read from the NVM chip, the data must be fetched from the DQ lead 1K times. The microinstruction execution unit sets a counter based on the counter value, and the counter drives the signal driver to drive the lead repeatedly the specified number of times. The signal driver also fetches signals from the lead, such as data read from the NVM chip from the DQ lead.
[0141] according to Figure 6 In one embodiment, the microinstructions in 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, which, in response to the execution of the get read threshold microinstruction, is filled with a read threshold corresponding to the register value at the physical address indicated by the get read threshold microinstruction. For example, to execute the get read threshold microinstruction, the entry corresponding to the physical address indicated by the get read threshold microinstruction is retrieved from the read threshold table, and the read threshold of the retrieved entry is filled into the result register. Optionally, the result register is filled with a generated, predicted read threshold. The read threshold retrieved by the get read threshold microinstruction is used to configure the microinstruction sequence for processing read redo commands, such that when the microinstruction sequence is executed, an instruction signal driver provides a read redo command indicating the retrieved read threshold to the NVM chip. Optionally, some NVM chips require setting the read threshold used using, for example, a "Set Feature" command. Therefore, the microinstruction sequence for processing the read redo command includes a microinstruction sequence for generating the "Set Feature" command and a microinstruction sequence for generating the read redo command. The microinstruction sequence for the "Set Feature" command is used to set the read threshold of the read redo command to, for example, the read threshold obtained by the read threshold acquisition microinstruction.
[0142] Optionally, the microinstruction sequence for processing read redo commands also includes an additional microinstruction sequence for generating a “Set Feature” command, which sets the read threshold to the read threshold used when processing (normal) read commands (read commands before executing read redo commands) after the read redo command processing is completed.
[0143] The operands of the update read threshold microinstruction include a physical address and the value of the read threshold to be updated. In response to the execution of the update read threshold microinstruction, the corresponding entry in the read threshold table is retrieved according to the address indicated by the update read threshold microinstruction, and the read threshold indicated by the microinstruction is written into that entry.
[0144] The media interface controller (MIC) uses storage media access commands to read data frames or entire physical pages from the NVM chip. The read data needs to be buffered by the MIC and ECC decoded. To improve data read speed, the MIC provides an integrated local cache to buffer data read from the NVM chip awaiting ECC decoding. When the data frame or entire physical page read from the NVM chip includes N (N is a positive integer) ECC blocks, the bandwidth of the ECC decoding unit may be insufficient to handle N ECC blocks simultaneously, causing one or more ECC blocks to wait for ECC decoding in the MIC's local cache. This increases the time ECC blocks remain in the local cache, reducing cache utilization. To maintain read bandwidth, the local cache capacity needs to be increased, leading to increased cost and power consumption for the control unit and even the storage device. The goal is to reduce the time ECC blocks remain in the local cache to improve cache utilization. Furthermore, it is desirable to manage operations related to local cache usage in a manner independent of microinstructions.
[0145] Figure 7 A block diagram of a media interface controller according to an embodiment of this application is shown.
[0146] The media interface controller of the control unit includes a media interface, a microinstruction memory, a local cache, and an ECC decoding unit. The media interface is coupled to the NVM chip, the microinstruction memory, and the local cache. The microinstruction memory stores microinstructions; the media interface executes these microinstructions to output storage media access commands to the NVM chip and stores the data retrieved from the NVM chip according to the storage media access read command in the local cache. The ECC decoding unit is coupled to the local cache, performs ECC decoding on the ECC blocks provided by the local cache, and records the decoding results in the read data cache. The read data cache is, for example, DRAM coupled to the control unit or SRAM integrated into the control unit.
[0147] The media interface controller according to an embodiment of this application further includes a cache management unit coupled to the local cache and the media interface. The cache management unit provides a signal (hereinafter referred to as a read pause signal) to the media interface indicating a pause in reading data, based on the available space in the local cache. For 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 pause the output of data to be acquired by a read command or read redo command. Conversely, 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.
[0148] When the media interface is working normally, it reads data from the NVM chip in a normal manner in response to the absence of a read pause signal. For example, the media interface provides multiple consecutive read enable signals to the NVM chip in order to read data from the NVM chip.
[0149] According to embodiments of this application, in response to receiving a read pause signal, the media interface pauses or cancels the provision of a read enable signal or CLK signal to the NVM chip, instructing the NVM chip to pause the output of data to be acquired by the read command or read redo command. It is understood that, depending on the various NVM chip interface protocols followed by the storage media access command, or the various operating modes defined by the interface protocols, the media interface instructs the NVM chip to pause data output 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 pause the output of data to be acquired by the read command or read redo command. Subsequently, in the state where the media interface instructs the NVM chip to pause data output, in response to receiving a canceled read pause signal, or no longer receiving a read pause signal, the media interface resumes the provision of the read enable signal or CLK signal to the NVM chip, or no longer generates a read pause signal, instructing the NVM chip to continue outputting the data to be acquired by the read command or read redo command.
[0150] The cache management unit's monitoring of the local cache capacity and subsequent generation of read pause signals are independent of the microinstructions executed by the media interface, thus eliminating the need to modify the microinstructions, their execution units, and the microinstruction sequence used to generate media interface commands. By instructing the NVM chip to pause the output of data to be acquired by the media interface (read) command when the available local cache space is insufficient, a smaller local cache capacity can be used in the media interface controller, and / or the media interface controller's ability to process media interface (read) commands is improved; for example, a larger number of media interface (read) commands can be processed concurrently without reducing the local cache capacity.
[0151] In an optional implementation, the local cache is managed according to the ECC block size. The local cache holds a number of ECC blocks. When the cache management unit identifies that the available space in the local cache is insufficient to hold a specified number (e.g., one) of ECC blocks, it generates a read pause signal and provides it to the media interface. Conversely, when the available space in the local cache is sufficient to hold 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, making the storage space it occupies available.
[0152] For example, a data frame to be read from the NVM chip by a storage media access (read) command consists of four ECC blocks. If the available space in the local cache is insufficient to hold one ECC block, the cache management unit provides a read pause signal to the media interface. This instructs the NVM chip not to start outputting the data requested by the storage media access (read) command, or to pause the output of the data requested by the storage media access (read) command. Conversely, if the available space in the local cache is sufficient to hold at least one ECC block, even if the available space in the local cache is insufficient to hold the complete data frame to be read, the cache management unit withdraws or does not provide a read pause signal to the media interface. The media interface can then instruct the NVM chip to start or continue outputting the data requested by the storage media access (read) command. This allows the NVM chip to begin outputting data for the storage media access (read) command earlier. In cases where the media interface controller processes multiple storage media access (read) commands concurrently, the number of concurrently processed storage media access (read) commands is increased.
[0153] Understandably, 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 requested by the storage media access (read) command; conversely, the media interface instructs the NVM chip to pause outputting the data requested by the storage media access (read) command.
[0154] The microinstruction sequence corresponds to the media interface command. The microinstruction sequence for processing read commands or read redo commands also includes, for example, a read threshold acquisition microinstruction and / or a read threshold update microinstruction. For example, the microinstruction sequence for processing a read command includes a read threshold acquisition microinstruction. By executing the read threshold acquisition microinstruction, if the desired read threshold is obtained, the microinstruction sequence for processing the read redo command is invoked to continue processing, and the obtained read threshold is used to configure the read redo command processing microinstruction sequence to issue a read redo command to the NVM chip. Again, as an example, the microinstruction sequence for processing a read redo command includes a read threshold update microinstruction. By executing the read threshold update microinstruction, the read threshold recorded in the entry corresponding to the physical address to be accessed in the read threshold table is updated. Furthermore, the microinstruction sequence for processing a read redo command also includes a read threshold acquisition microinstruction. To process the read redo command, the read threshold microinstruction is first invoked to obtain the read threshold or the predicted read threshold. The obtained read threshold is then used to configure the microinstruction sequence for processing the read redo command, so as to send the read redo command to the NVM chip. Additionally, the read threshold update microinstruction is executed to update the read threshold recorded in the entry corresponding to the physical address to be accessed in the read threshold table.
[0155] Figure 8 A detailed block diagram of the media interface according to an embodiment of this application is shown.
[0156] The media interface includes a microinstruction execution unit, signal drivers, counters, and a data conversion unit. The microinstruction execution unit executes a microinstruction sequence, drives the signal drivers according to the signals indicated by the microinstruction sequence, generates specified signals on the leads coupling between the media interface and the NVM chip, and generates a signal sequence conforming to the NVM chip interface protocol by executing the microinstruction sequence.
[0157] Some microinstructions also include a counter value indicating how many times a specified signal is driven. For example, if 1 byte of data is fetched from the DQ pin each time, to obtain, for example, 4KB of data read from the NVM chip, the data must be fetched from the DQ pin 1K times. The microinstruction execution unit sets a counter based on the counter value, and the counter drives the signal driver to drive the pin repeatedly the specified number of times.
[0158] The signal driver also acquires signals from the DQ lead and provides these signals to the data conversion unit. In some operating modes of the ONFI protocol (e.g., SDR mode), the DQ lead transmits 8 bits of data per cycle, while in other modes (e.g., NV-DDR2), the DQ lead transmits 16 bits of data per cycle. The data conversion unit, depending on the current operating mode, extracts valid data from the signals acquired from the DQ lead and fills it into its local buffer.
[0159] According to embodiments of this application, a read pause signal provided by the cache management unit is coupled to a counter. In response to a valid read pause signal, the counter stops counting. In response to an invalid or revoked read pause signal, the counter resumes counting. When the counter stops counting, the signal driver also stops driving, for example, the DQ lead to instruct the NVM chip to pause data transmission. Optionally or further, the read pause signal also instructs the signal driver to generate a read enable signal indicating invalidation or revocation on the lead coupled to the NVM chip to instruct the NVM chip to pause data transmission. Still optionally, the read pause signal also instructs the signal driver to generate a signal on the lead coupled to the NVM chip indicating that the NVM chip has entered a pause state.
[0160] Therefore, according to embodiments of this application, the read pause signal suspends the execution of microinstructions, and the execution of microinstructions can continue after the read pause signal is removed. Optionally, the read pause signal is only effective for the execution of microinstructions that indicate the acquisition of data from the NVM chip via the DQ lead, and does not affect the execution of other microinstructions.
[0161] According to another embodiment of this application, in response to receiving a read pause signal, the media interface, for example, yields. As an example, in response to the read pause signal, the media interface pauses the execution of the current microinstruction sequence for generating read commands or read redo commands, and saves part or all of the execution state of the current microinstruction sequence for generating read commands or read redo commands. Next, after pausing the execution of the current microinstruction sequence for generating read commands or read redo commands, the media interface can execute other microinstruction sequences to send storage media access (read) commands to other NVM chips or other LUNs (Logical Units) of the NVM chip. And after the read pause signal is revoked, and after the media interface has processed the execution yield of other microinstruction sequences or other microinstruction sequences, it restores, for example, the previously saved partial or all of the execution state of the microinstructions for generating read commands or read redo commands, and continues processing the previously saved microinstruction sequence for generating read commands or read redo commands.
[0162] This application adjusts the read threshold parameters used in the read command or read redo command to be generated by the read command adjustment unit of the media interface controller, thereby enabling complex search of read threshold parameters, providing more guidance for the error recovery process, and intelligently selecting or prompting the read threshold parameters used in read redo, so as to shorten error handling time, reduce the error rate of storage devices, and extend the service life of storage devices.
[0163] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application. Clearly, those skilled in the art can make various alterations and variations to this application without departing from its spirit and scope. Thus, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for processing read commands, characterized in that, include: Receive media interface commands; Adjust the read command or read redo command to be generated according to the media interface command, and provide the adjusted read command or read redo command to the non-volatile memory chip; This includes providing predicted read thresholds for the physical addresses accessed by the read commands or read redo commands to be generated; and calculating the average or weighted average of the read thresholds for all or some entries in the read threshold table as the predicted read thresholds. Provide the first media interface command to the media interface; In response to an uncorrectable error occurring in the processing of 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.
2. The read command processing method as described in claim 1, characterized in that, Identify a first read threshold parameter for the physical address accessed by the read command or read redo command to be generated; update the generated read command or read redo command according to the identified first read threshold parameter, and update the read command or read redo command to indicate the use of the first read threshold parameter.
3. The read command processing method as described in claim 1 or 2, characterized in that, If the read redo command to be generated is invalid or does not have a better effect than the read command for the physical address to be accessed, then the read redo command is updated to a read command to access the physical address.
4. The read command processing method as described in claim 1, characterized in that, Based on the read command or read redo command to be generated, the read threshold table is queried using the physical address or part of the physical address to be accessed by the read command or read redo command 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.
5. The read command processing method as described in claim 4, characterized in that, According to the instruction to use the second read threshold to access the physical address to generate the read redo command, the read threshold table is queried with the physical address. If there is no entry in the read threshold table that records the physical address, 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 added to the read threshold table.
6. The read command processing method as described in claim 4, characterized in that, It also includes identifying uncorrectable flags in read threshold table entries, the uncorrectable flags indicating that data obtained from the physical address corresponding to the read threshold access previously recorded with the read threshold entry cannot be correctly decoded by the error correction code; according to the read redo command to be generated, if there is an entry in the read threshold table for the physical address indicated by the read redo command, 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.
7. The read command processing method as described in claim 1, characterized in that, Obtain the corresponding microinstruction sequence according to the media interface command to be generated, and generate the specified signal on the lead coupled to the non-volatile memory chip according to the signal indicated by the microinstruction sequence. The microinstructions in the microinstruction sequence include a read threshold microinstruction and / or an update read threshold microinstruction; When executing the read threshold microinstruction, the entry corresponding to the physical address indicated by the read threshold microinstruction is retrieved from the read threshold table, and the read threshold of the entry is retrieved to fill the result register; In response to the execution of the update read threshold microinstruction, the corresponding entry in 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.
8. A media interface controller, characterized in that, It includes a read command adjustment unit, a media interface, and an error correction code decoding unit. The media interface is coupled to the read command adjustment unit and the error correction code decoding unit. The read command adjustment unit adjusts only the media interface command corresponding to the read command or read redo command based on the media interface command, and provides the adjusted media interface command to the media interface. The read command adjustment unit also includes a read threshold prediction unit; The read threshold prediction unit is used to provide a predicted read threshold for the physical address accessed by the read command or read redo command to be generated; the average or weighted average of the read thresholds of all or some entries in the read threshold table is calculated as the predicted read threshold. Provide the first media interface command to the media interface; In response to an uncorrectable error occurring in the processing of 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.