Media interface controller and storage controller for read command fusion

CN122593697APending Publication Date: 2026-08-18BEIJING STARBLAZE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610736760.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2020-03-23
Publication Date
2026-08-18

Smart Images

  • Figure CN122593697A_ABST
    Figure CN122593697A_ABST
Patent Text Reader

Abstract

A media interface controller and a storage controller for read command fusion are provided. The media interface controller includes a hit check unit to check if a media interface read command fetched from a command queue hits a media interface read command in the command queue, the hit check unit to provide an index of the command queue of the hit media interface command to a command queue update unit, the command queue update unit to fuse the fetched media interface read command with the hit media interface read command, a command processing unit to operate a media interface to issue a storage media access command according to the media interface read command, and the hit check unit to further check if the fetched media interface read command hits an erase command in the command queue, the command queue update unit to fuse the fetched media interface read command with the hit media interface read command if the fetched media interface read command hits a read command in the command queue and the fetched media interface read command does not hit an erase command in the command queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to storage device technology, and more particularly to a method for integrating a read command to be sent to a non-volatile storage medium in a storage device, and a controller for implementing this method. Background Technology

[0002] Figure 1 A block diagram of a solid-state storage device (SSD) is shown. The SSD 102 is coupled to a host computer to provide storage capabilities. The host computer and the SSD 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] Common types of NVMs include NAND flash memory, phase-change memory, FeRAM (Ferroelectric RAM), MRAM (Magnetic Random Access Memory), RRAM (Resistive Random Access Memory), and XPoint memory.

[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 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] In storage devices, the FTL (Flash Translation Layer) is used to maintain the mapping information from logical addresses to physical addresses. Logical addresses constitute the storage space of the storage device as perceived by upper-layer software such as the operating system. Physical addresses are the addresses used to access the physical storage units of the storage device. In related technologies, intermediate address formats can also be used for address mapping. For example, a logical address can be mapped to an intermediate address, and then the intermediate address can be further mapped to a physical address.

[0010] A table structure that stores mapping information from logical addresses to physical addresses is called an FTL table. The FTL table is important metadata in storage devices. Typically, the data items in an FTL table record the address mapping relationships within the storage device, on a per-page basis.

[0011] For some storage devices, the FTL (Framework Time Limit) is provided by the host coupled to the storage device. The host's memory stores the FTL table, and the host's processor executes the software to provide the FTL. Other times, a storage management device positioned between the host and the storage device provides the FTL.

[0012] Figure 2 A detailed block diagram of the control components of the storage device is shown.

[0013] 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 NVM chip's interface protocol based on the storage commands. 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.

[0014] 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.

[0015] 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.

[0016] 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 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.

[0017] Media interface commands correspond to storage media access commands, thus the media interface controller determines the type of storage media access command generated based on the type of the media interface command. Typically, the storage command processing unit generates a media interface command for each storage command accessing, for example, 4KB of storage space. When identifying a continuous read scenario involving large blocks of data, the storage command processing unit merges multiple storage commands to generate a media interface command accessing, for example, the size of a complete physical page. Summary of the Invention

[0018] In storage media access commands, the data read by a read command that reads a complete physical page is the same as the data read by multiple read commands that read each data frame of a physical page. Obviously, reading data through the latter requires greater overhead (time, power consumption, and processing power) for both the media interface controller and the NVM chip. Therefore, it is advantageous to use media interface access commands that integrate multiple storage commands.

[0019] In existing technologies, the control unit sends various types of media interface commands to the media interface controller. However, host read I / O commands for accessing storage devices are typically random, and low latency in processing these commands is desirable. Therefore, the control unit does not want to spend excessive time waiting for one or more mergeable storage commands to merge them; instead, it wants to process the storage commands as quickly as possible and send media interface commands to the media interface controller accordingly. Consequently, the media interface commands provided by the control unit to the media interface controller are mostly media interface commands that access data frames. This conflicts with the requirement to merge multiple storage commands.

[0020] The goal is to send corresponding media access commands to the media interface controller with low-latency processing of storage commands, while also reducing the number of storage media access read commands issued by the media interface controller to the NVM chip, and maintaining low technical complexity for the introduction of new features.

[0021] According to a first aspect of this application, a first command processing method according to the first aspect of this application is provided, comprising: generating a media interface command, wherein the media interface command includes an address field and a data frame bitmap field; and generating one or more storage media access commands according to the media interface command; wherein the address field indicates an operating unit of the storage medium that can be accessed by a single storage media access command; and the data frame bitmap field indicates one or more data frames that need to be accessed among the plurality of data frames contained in the operating unit indicated by the address field.

[0022] According to the first command processing method of the first aspect of this application, a second command processing method according to the first aspect of this application is provided, wherein if the data frame bitmap field indicates that all data frames contained in the operation unit indicated by the address field need to be accessed, a single access storage medium access command is generated to access the complete operation unit indicated by the address field; and / or if the data frame bitmap field indicates access to one or more but not all data frames contained in the operation unit indicated by the address field, multiple access storage medium access commands are generated to access one or more data frames of the operation unit indicated by the address field.

[0023] According to the first or second command processing method of the first aspect of this application, a third command processing method according to the first aspect of this application is provided, wherein the operation unit is a physical page, word line or multiplane physical page of a non-volatile storage medium.

[0024] According to one of the first to third command processing methods of the first aspect of this application, a fourth command processing method according to the first aspect of this application is provided, which further includes: if the generated media interface command hits a media interface command in the command queue, updating the data frame bitmap of the hit media interface command according to the generated media interface command; and discarding the generated media interface command.

[0025] According to the fourth command processing method of the first aspect of this application, a fifth command processing method according to the first aspect of this application is provided, which further includes: if the generated media interface command does not match the media interface commands in the command queue, adding the generated media interface command to the tail of the command queue.

[0026] According to the fourth or fifth command processing method of the first aspect of this application, a sixth command processing method according to the first aspect of this application is provided, wherein the generated media interface command is identified as having matched the media interface commands in the command queue based on whether the operation unit indicated by the address field of the generated media interface command is the same as the operation unit indicated by the address field of the media interface command in the command queue.

[0027] According to one of the first to sixth command processing methods of the first aspect of this application, a seventh command processing method according to the first aspect of this application is provided, further comprising: obtaining a media interface command from the head of a command queue; if the obtained media interface command hits one or more media interface commands in the command queue, removing the hit media interface command from the command queue, updating the data frame bitmap of the obtained media interface command according to the hit media interface command, and then processing the obtained media interface command.

[0028] According to the seventh command processing method of the first aspect of this application, an eighth command processing method according to the first aspect of this application is provided, which further includes: if the acquired media interface command does not match the media interface command in the command queue, then processing the acquired media interface command.

[0029] According to the seventh or eighth command processing method of the first aspect of this application, a ninth command processing method according to the first aspect of this application is provided, further comprising: caching a removed media interface command; and releasing the cached media interface command in response to successful processing of the acquired media interface command.

[0030] According to the ninth command processing method of the first aspect of this application, a tenth command processing method according to the first aspect of this application is provided, further comprising: processing a cached media interface command in response to a failure to process the acquired media interface command.

[0031] According to one of the first to third command processing methods of the first aspect of this application, an eleventh command processing method according to the first aspect of this application is provided, further comprising: if the generated media interface command is a media interface read command, the generated media interface command extension hits a media interface read command in the command queue, and the generated media interface command extension does not hit a media interface write command in the command queue, then updating the data frame bitmap of the hit media interface command according to the generated media interface command; and discarding the generated media interface command.

[0032] According to the eleventh command processing method of the first aspect of this application, a twelfth command processing method according to the first aspect of this application is provided, further comprising: if the generated media interface command is a media interface read command, the generated media interface command extension hits a media interface read command in the command queue, the generated media interface command extension hits a media interface write command in the command queue, and the hit media interface write command is located before the hit media interface read command in the command queue, then updating the data frame bitmap of the hit media interface command according to the generated media interface command; and discarding the generated media interface command.

[0033] According to the eleventh or twelfth command processing method of the first aspect of this application, a thirteenth command processing method according to the first aspect of this application is provided, further comprising: if the generated media interface command is a media interface read command, the generated media interface command extension hits a media interface read command in the command queue, the generated media interface command extension hits a media interface write command in the command queue, and the hit media interface write command is located after the hit media interface read command in the command queue, then the hit media interface read command is removed from the command queue, the data frame bitmap of the generated media interface command is updated according to the removed media interface command, and the generated media interface read command is added to the tail of the command queue.

[0034] According to one of the first to third and eleventh to thirteenth command processing methods of the first aspect of this application, a fourteenth command processing method according to the first aspect of this application is provided, further comprising: obtaining a media interface command from the head of a command queue; if the obtained media interface command is a media interface read command, the obtained media interface command extension hits a media interface read command in the command queue, and the obtained media interface command extension does not hit a media interface write command in the command queue, then updating the data frame bitmap of the obtained media interface read command according to the hit media interface read command, and removing the hit media interface read command from the command queue.

[0035] According to the fourteenth command processing method of the first aspect of this application, a fifteenth command processing method according to the first aspect of this application is provided, further comprising: if the acquired media interface command is a media interface read command, the acquired media interface command extends to hit a media interface read command in the command queue, also extends to hit a media interface write command in the command queue, and the hit media interface write command is located after the hit media interface read command in the command queue, then the data frame bitmap of the acquired media interface read command is updated according to the hit media interface read command, and the hit media interface read command is removed from the command queue.

[0036] According to the fourteenth or fifteenth command processing method of the first aspect of this application, a sixteenth command processing method according to the first aspect of this application is provided, further comprising: if the acquired media interface command is a media interface read command, the acquired media interface command extends to hit a media interface read command in the command queue and also extends to hit a media interface write command in the command queue, and the hit media interface write command is located before the hit media interface read command in the command queue, then the data frame bitmap of the hit media interface read command is updated according to the acquired media interface read command, and the acquired media interface read command is discarded.

[0037] According to one of the fourteenth to sixteenth command processing methods of the first aspect of this application, a seventeenth command processing method according to the first aspect of this application is provided, further comprising: if the acquired media interface command is a media interface read command, and the acquired media interface command extends to hit both the first media interface read command and the second media interface read command in the command queue, and also extends to hit the media interface write command in the command queue, and the hit media interface write command is located before the first media interface read command and after the second media interface read command in the command queue, then the data frame bitmap of the first media interface read command is updated according to the acquired media interface read command and the second media interface read command, the second media interface read command is removed from the command queue, and the acquired media interface read command is discarded.

[0038] According to one of the fourteenth to seventeenth command processing methods of the first aspect of this application, an eighteenth command processing method according to the first aspect of this application is provided, which further includes: caching removed media interface read commands and discarded media interface read commands; and releasing one or more cached media interface read commands merged into the successfully processed media interface read commands in response to successful processing of media interface commands.

[0039] According to the eighteenth command processing method of the first aspect of this application, a nineteenth command processing method according to the first aspect of this application is provided, further comprising: processing one or more media interface read commands that are cached and merged into the successfully processed media interface read command in response to a failure to process a media interface read command.

[0040] According to one of the first to third command processing methods of the first aspect of this application, a twentieth command processing method according to the first aspect of this application is provided, further comprising: if the generated media interface command is a media interface read command, and the generated media interface command non-extended hits a media interface read command in the command queue, then updating the data frame bitmap of the hit media interface command according to the generated media interface command; and discarding the generated media interface command.

[0041] According to the twentieth command processing method of the first aspect of this application, a twenty-first command processing method according to the first aspect of this application is provided, further comprising: if the generated media interface command is a media interface read command, the generated media interface command is not an extended hit media interface read command in the command queue, the generated media interface command extended hits media interface read commands in the command queue, and the generated media interface command is not an extended hit media interface write command in the command queue, then updating the data frame bitmap of the hit media interface command according to the generated media interface command; and discarding the generated media interface command.

[0042] According to the twentieth or twentieth-first command processing method of the first aspect of this application, a twenty-second command processing method according to the first aspect of this application is provided, further comprising: if the generated media interface command is a media interface read command, the generated media interface command is not an extended hit media interface read command in the command queue, the generated media interface command extended hits a media interface read command in the command queue, the generated media interface command extended hits a media interface write command in the command queue, and the hit media interface write command is located before the hit media interface read command in the command queue, then the data frame bitmap of the hit media interface command is updated according to the generated media interface command; and the generated media interface command is discarded.

[0043] According to one of the twenty to twenty-two command processing methods of the first aspect of this application, a twenty-third command processing method according to the first aspect of this application is provided, further comprising: if the generated media interface command is a media interface read command, the generated media interface command is not an extended hit of a media interface read command in the command queue, the generated media interface command extended hits a media interface read command in the command queue, the generated media interface command extended hits a media interface write command in the command queue, and the hit media interface write command is located after the hit media interface read command in the command queue, then the hit media interface read command is removed from the command queue, the data frame bitmap of the generated media interface command is updated according to the removed media interface command, and the generated media interface read command is added to the tail of the command queue.

[0044] According to one of the twenty to twenty-third command processing methods of the first aspect of this application, a twenty-fourth command processing method according to the first aspect of this application is provided, further comprising: if the generated media interface command is a media interface read command, the generated media interface command is not an extended hit of a media interface read command in the command queue, the generated media interface command extended hits a first media interface read command and a second media interface read command in the command queue, the generated media interface command extended hits a media interface write command in the command queue, and the hit media interface write command is located before the first media interface read command and after the second media interface read command in the command queue, then the data frame bitmap of the first media interface read command is updated according to the generated media interface read command and the second media interface read command, the second media interface read command is removed from the command queue, and the generated media interface read command is discarded.

[0045] According to one of the first to third and twenty to twenty-fourth command processing methods of the first aspect of this application, a twenty-fifth command processing method according to the first aspect of this application is provided, further comprising: obtaining a media interface command from the head of a command queue; if the obtained media interface command is a media interface read command, and the obtained media interface command non-extended hits a media interface read command in the command queue, then updating the data frame bitmap of the obtained media interface read command according to the hit media interface read command, and removing the hit media interface read command from the command queue.

[0046] According to the twenty-fifth command processing method of the first aspect of this application, a twenty-sixth command processing method according to the first aspect of this application is provided, further comprising: if the acquired media interface command is a media interface read command, the acquired media interface command does not hit a media interface read command in the command queue, the acquired media interface command hits a media interface read command in the command queue through extension, and the acquired media interface command does not hit a media interface write command in the command queue through extension, then updating the data frame bitmap of the acquired media interface read command according to the hit media interface read command, and removing the hit media interface read command from the command queue.

[0047] According to the twenty-fifth or twenty-sixth command processing method of the first aspect of this application, a twenty-seventh command processing method according to the first aspect of this application is provided, further comprising: if the acquired media interface command is a media interface read command, the acquired media interface command not extended to hit a media interface read command in the command queue, the acquired media interface command extended to hit a media interface read command in the command queue, and also extended to hit a media interface write command in the command queue, and the hit media interface write command is located after the hit media interface read command in the command queue, then the data frame bitmap of the acquired media interface read command is updated according to the hit media interface read command, and the hit media interface read command is removed from the command queue.

[0048] According to one of the twenty-fifth to twenty-seventh command processing methods of the first aspect of this application, a twenty-eighth command processing method according to the first aspect of this application is provided, further comprising: if the acquired media interface command is a media interface read command, the acquired media interface command not extended to hit a media interface read command in the command queue, the acquired media interface command extended to hit a media interface read command in the command queue, and also extended to hit a media interface write command in the command queue, and the hit media interface write command is located before the hit media interface read command in the command queue, then the data frame bitmap of the hit media interface read command is updated according to the acquired media interface read command, and the acquired media interface read command is discarded.

[0049] According to one of the twenty-fifth to twenty-eighth command processing methods of the first aspect of this application, a twenty-ninth command processing method according to the first aspect of this application is provided, further comprising: if the acquired media interface command is a media interface read command, the acquired media interface command not extended to hit a media interface read command in the command queue, the acquired media interface command extended to hit a first media interface read command and a second media interface read command in the command queue, and also extended to hit a media interface write command in the command queue, and the hit media interface write command is located before the first media interface read command and after the second media interface read command in the command queue, then the data frame bitmap of the first media interface read command is updated according to the acquired media interface read command and the second media interface read command, the second media interface read command is removed from the command queue, and the acquired media interface read command is discarded.

[0050] According to one of the twenty-fifth to twenty-ninth command processing methods of the first aspect of this application, a thirtyth command processing method according to the first aspect of this application is provided, further comprising: caching removed media interface read commands and discarded media interface read commands; and releasing one or more cached media interface read commands merged into the successfully processed media interface read commands in response to successful processing of media interface commands.

[0051] According to the thirtieth command processing method of the first aspect of this application, a thirty-first command processing method according to the first aspect of this application is provided, further comprising: processing one or more media interface read commands that are cached and merged into the successfully processed media interface read command in response to a failure to process a media interface read command.

[0052] According to a second aspect of this application, a first media interface controller according to the second aspect of this application is provided, comprising: a hit checking unit, a command queue updating unit, a command processing unit, and a media interface; the hit checking unit is coupled to the command queue, the command queue updating unit, and the command processing unit, and checks whether a media interface read command obtained from the command queue hits a media interface read command in the command queue, and provides the index of the hit media interface command in the command queue to the command queue updating unit; the command queue updating unit merges the obtained media interface read command with the hit media interface read command; the command processing unit operates the media interface according to the media interface read command and issues a storage media access command.

[0053] According to the first media interface controller of the second aspect of this application, a second media interface controller according to the second aspect of this application is provided, wherein if the acquired media interface read command does not match the media interface read command in the command queue, the hit check unit provides the acquired media interface read command to the command processing unit.

[0054] 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 command queue update unit removes the hit media interface read command from the command queue, updates the data frame bitmap of the acquired media interface read command with the hit media interface read command, and provides the updated media interface read command to the command processing unit.

[0055] 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 command queue update unit moves the removed media interface read commands to the cache.

[0056] 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, further comprising a cache management unit; the media interface provides the processing result of the storage media access command to the cache management unit; in response to the processing result indicating that the first media interface read command processing failed, the cache management unit provides one or more cached media interface read commands corresponding to the first media interface read command to the command processing unit.

[0057] According to one of the first to fifth media interface controllers of the second aspect of this application, a sixth media interface controller according to the second aspect of this application is provided, wherein the hit checking unit provides the index of the hit and to be merged media interface command in the command queue to the command queue updating unit, and instructs the command queue updating unit to merge the interface command to be merged with the acquired media interface command.

[0058] According to the sixth media interface controller of the second aspect of this application, a seventh media interface controller according to the second aspect of this application is provided, wherein the hit checking unit identifies that the acquired media interface read command extends to hit one or more media interface read commands in the command queue, and also extends to hit a media interface write command. The hit media interface read command precedes the hit media interface write command. In response, the hit checking unit provides the index of the acquired media interface read command and the hit media interface read command in the command queue to the command queue update unit.

[0059] According to the sixth or seventh media interface controller of the second aspect of this application, an eighth media interface controller according to the second aspect of this application is provided, wherein the hit checking unit identifies that the acquired media interface read command extends to hit the media interface read command in the command queue, and also extends to hit the media interface write command. The hit media interface read command follows the hit media interface write command. In response, the hit checking unit provides the index of the acquired media interface read command and the hit media interface read command in the command queue to the command queue update unit. The command queue update unit updates the data frame bitmap of the hit media interface read command with the acquired media interface read command, and caches the acquired media interface read command without sending it to the command processing unit.

[0060] According to one of the sixth to eighth media interface controllers of the second aspect of this application, a ninth media interface controller according to the second aspect of this application is provided, wherein a hit checking unit identifies that the acquired media interface read command extends to hit the first media interface read command and the second media interface read command in the command queue, and also extends to hit the media interface write command. The hit media interface write command is located in the command queue before the first media interface read command and after the second media interface read command. In response, the hit checking unit provides the acquired media interface read command, the index of the first media interface read command in the command queue, and the index of the second media interface read command in the command queue to the command queue update unit respectively. The command queue update unit updates the data frame bitmap of the first media interface read command according to the acquired media interface read command and the second media interface read command, removes the second media interface read command from the command queue, and caches the acquired media interface read command and the second media interface read command, and does not send the acquired media interface read command to the command processing unit.

[0061] According to a third aspect of this application, a control component for a first storage device according to the third aspect of this application is provided, comprising a control component and a non-volatile memory, wherein the control component executes one of the first to thirty-first command processing methods according to the first aspect of this application.

[0062] According to a fourth aspect of this application, a control component for a first storage device according to the fourth aspect of this application is provided, comprising a control component and a non-volatile memory, the control component further comprising one of a first to a ninth media interface controller according to the first aspect of this application. Attached Figure Description

[0063] 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.

[0064] Figure 1 A block diagram showing a storage device using existing technology; Figure 2 A detailed block diagram of the control components of the storage device is shown; Figure 3 A schematic diagram illustrating the delivery of media interface commands to a media interface controller according to an embodiment of this application is shown; Figure 4A A schematic diagram illustrating the delivery of a media interface command to a media interface controller according to yet another embodiment of this application is shown; Figure 4B A flowchart illustrating the fusion of media interface commands in the storage command processing unit according to an embodiment of this application is shown; Figure 4C A flowchart illustrating the media interface controller fusion media interface commands according to an embodiment of this application is shown; Figure 5 It shows a command queue where multiple media interface commands access the same address; Figure 6 An architecture diagram of 3D NAND storage media is shown; Figures 7A-7C It shows a command queue where multiple media interface commands access the same extended operation unit; Figure 8A A flowchart illustrating the fusion of media interface commands in a storage command processing unit according to yet another embodiment of this application is shown. Figure 8B A flowchart illustrating the media interface controller fusion media interface commands according to yet another embodiment of this application is shown; Figure 9A A flowchart illustrating the fusion of media interface commands in a storage command processing unit according to another embodiment of this application is shown. Figure 9B A flowchart illustrating the fusion of media interface commands by a media interface controller according to another embodiment of this application is shown; and Figure 10 A block diagram of a media interface controller according to yet another embodiment of this application is shown. Detailed Implementation

[0065] 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.

[0066] Figure 3 A schematic diagram illustrating the delivery of media interface commands to a media interface controller according to an embodiment of this application is shown.

[0067] The storage command processing unit delivers media interface commands to the media interface controller via command queue 320. Each entry in the command queue is one of the media interface commands.

[0068] According to embodiments of this application, a media interface command includes multiple fields indicating, for example, the type of media interface command, a data frame bitmap, and the address to be accessed. As an example, Figure 3 Three media interface commands (310, 312, and 314) are illustrated. The type field of the media interface command indicates, for example, a read command, a write command, or an erase command. For a read command, the address field to be accessed in the media interface command indicates, for example, the physical page address of an NVM chip. A physical page can carry one or more data frames. The data frame bitmap field indicates one or more data frames to be accessed in the physical page indicated by the address field. For example, if a physical page comprises N data frames (N is a positive integer, e.g., N=4), the data frame bitmap field comprises N bits, each bit indicating whether one of the N data frames of the physical page has been accessed. Thus, a media interface command according to an embodiment of this application can indicate different types of storage media access commands. For example, if the data frame bitmap field of a media interface command indicates that all N data frames of a physical page have been accessed, the media interface controller accordingly generates a storage media access command to access the entire physical page. As another example, if the data frame bitmap field of a media interface command indicates that a single data frame of a physical page has been accessed, the media interface controller generates a storage media access command to access the single data frame. In another example, if the data frame bitmap field of the media interface command indicates that three data frames of a physical page are accessed, then a storage media access command for accessing a single data frame and a storage media access command for accessing two data frames are generated, or a storage media access command for accessing a physical page is generated, and data frames not indicated by the data frame bitmap field of the media interface command are discarded from the read data.

[0069] See Figure 3Media interface command 310 accesses data frames 1 and 3 of physical page 1, with the first and third bits (from right to left) of the data frame bitmap field set to "1" to indicate access to these data frames. Media interface command 312 accesses data frame 1 of physical page 2, and media interface command 314 accesses all four data frames of physical page 3.

[0070] The media interface controller retrieves media interface commands from the head of command queue 320. Based on these commands, it generates storage media access commands and provides them to the NVM chip. For example, based on media interface command 310, it generates two storage media access commands to access a single data frame and sends them to the NVM chip; based on media interface command 312, it generates one storage media access command to access a single data frame and sends it to the NVM chip; and based on media interface command 314, it generates one storage media access command to access a complete physical page and sends it to the NVM chip. Thus, according to the embodiment of this application, the control unit completes the reading of seven data frames using four storage media access commands.

[0071] We also hope to further integrate media interface commands to reduce the number of storage media access commands issued to the NVM chip.

[0072] Figure 4A A schematic diagram illustrating the delivery of media interface commands to a media interface controller according to yet another embodiment of this application is shown.

[0073] The storage command processing unit 450 submits media interface commands to the media interface controller 460 through the command queue 420.

[0074] according to Figure 4AIn one alternative implementation of the illustrated embodiment, the command processing unit 450, in addition to submitting media interface commands to the tail of the command queue 420, couples each entry in the command queue 420 to update the media interface commands (including media interface commands for non-tail entries) in the command queue 420 as needed. For example, the storage command processing unit 450 couples the address field containing the media interface command to each entry in the command queue 420. Thus, before adding a new media interface command to the command queue 420, the storage command processing unit 450 identifies whether the new media interface command hits a media interface command in the command queue 420. A "hit" is understood to mean that the address field of the new media interface command is the same as, or at least partially bit-same as, the address field of a media interface command in the command queue 420. It is understood that only read commands in the command queue 420 are identified as hits. If the new media interface command does not hit any media interface command in the command queue 420, the storage command processing unit 420 adds the new media interface command to the tail of the command queue 420. If the new media interface command matches a media interface command in command queue 420, the matched media interface command is updated with its data frame bitmap field, but the new media interface command is not added to command queue 420. The updated data frame bitmap field of the new media interface command is such that it indicates all data frames accessed by both the new and matched media interface commands. For example, an OR operation is performed between the data frame bitmap field of the new media interface command and the data frame bitmap field of the matched media interface command, and the result is used to update the matched media interface command.

[0075] Thus, the storage command processing unit 450 can further merge media interface commands using the command queue 420, reducing the number of media interface commands processed by the media interface controller 480 and increasing the probability that the media interface controller 480 will generate storage media access commands that access complete physical pages. Furthermore, the storage command processing unit 450 does not need to wait for more storage commands to perform the merging.

[0076] Continue reading Figure 4AIn another alternative implementation, the command processing unit 450 adds media interface commands only to the tail of the command queue 420 without performing fusion. The media interface controller 460 performs fusion of the media interface commands in the command queue 420. For example, the media interface controller 460 retrieves a media interface command from the head of the command queue 420 and processes it. The media interface controller 460 also couples the address field containing the media interface command to each entry in the command queue 420. Thus, when retrieving a media interface command from the head of the command queue 420, the media interface processor 460 identifies whether the retrieved media interface command matches any media interface commands in the command queue 420. If the retrieved media interface command does not match any media interface commands in the command queue 420, the media interface controller 460 processes the retrieved media interface command, for example, generating a storage media access command based on the media interface command. If the retrieved media interface command matches one or more media interface commands in the command queue 420, the data frame bitmap field of the retrieved media interface command is updated with the data frame bitmap field of the matched one or more media commands. The updated media interface command removes the hit media interface from the command queue 420 and stops processing it. The updated media interface command's data frame bitmap field indicates all data frames to be accessed by the retrieved media interface command and the one or more hit media interface commands. The media interface controller 460 generates storage media access commands based on the updated media interface commands. For example, if the updated media interface command's data frame bitmap indicates access to all data frames of a physical page, a storage media access command to access the entire physical page is generated, thereby reducing the number of storage media access commands generated.

[0077] Thus, the media interface controller 460 can further merge media interface commands using the command queue 420, reducing the number of media interface commands processed by the media interface controller 480 and increasing the probability that the media interface controller 480 will generate storage media access commands that access complete physical pages. Furthermore, the storage command processing unit 450 does not need to wait for more storage commands to perform the merging.

[0078] Figure 4B A flowchart illustrating the fusion of media interface commands in the storage command processing unit according to an embodiment of this application is shown. Figure 4B The presentation process is as follows: Figure 4A The storage command processing unit 450 is implemented in the middle.

[0079] The storage command processing unit 450 acquires a media interface read command to be sent to the media interface controller 460 (470). It checks, for example, the address field of the acquired media interface command to see if it matches a media interface command in the command queue 420 (472). If the acquired media interface command does not match a media interface command in the command queue 420 (472), it adds the acquired media interface command to the tail of the command queue 420 (476). If the acquired media interface command matches a media interface command in the command queue 420 (472), it updates the data frame bitmap of the matched media interface command with the acquired media interface command (478).

[0080] Figure 4C A flowchart illustrating the media interface controller fusion media interface command according to an embodiment of this application is shown. Figure 4C The presentation process is as follows: Figure 4A The media interface controller 460 is implemented in the middle.

[0081] The media interface controller 460 retrieves a media interface read command to be processed from the command queue 420 (480). It checks, for example, the address field of the retrieved media interface command to see if it matches any media interface command in the command queue 420 (482). If the retrieved media interface command does not match any media interface command in the command queue 420 (482), the retrieved media interface command is processed (484). If the retrieved media interface command matches one or more media interface commands in the command queue 420 (482), all matched media interface commands are removed from the command queue 420 (486), the data frame bitmap of the retrieved media interface command is updated with all matched media interface commands (488), and the retrieved media interface command is processed again (490).

[0082] Optionally, the media interface controller 460 also caches all media interface commands removed from the command queue 420, and releases all cached media interface commands in response to the completion of media interface command processing in step 490. If media interface command processing in step 490 fails, in addition to indicating the failure to the storage command processing unit, all cached media interface commands are retrieved and processed.

[0083] According to this application Figures 4A-4CThe illustrated embodiment alters the processing order of media interface commands in command queue 420. This typically does not cause read / write conflicts. Read / write conflicts caused by a change in command processing order occur, for example, when a read command accessing the same address occurs after a write command. The write command modifies the data at the accessed address, and a subsequent read command should read the modified, written data. When the processing order of read and write commands accessing the same address is changed, such that a read command might occur before a write command, it may result in the read command reading data that was not written by the write command. Figure 5 This shows a command queue where multiple media interface commands access the same address.

[0084] See Figure 5 The command queue includes a media interface read command (510) to access physical page P1 and a media interface write command (520) to access physical page P1, as well as a media interface read command (530) to be added to the command queue. Downward arrows indicate the direction of the queue, with the head at the bottom and the tail at the top. When the storage command processing unit adds a media interface read command (530) to the command queue, since media interface read command 530 hits media interface read command 510, the data frame bitmap field of media interface read command 510 is updated with media interface read command 530, and media interface read command 530 is not added to the command queue. However, this merging will cause media interface read command 530, which originally occurred after media interface write command 520, to be preemptively processed, causing media interface read command 510 to obtain incorrect data when reading the data frame for media interface read command 530. However, according to the embodiments of this application, this situation will not occur. Taking NAND flash memory as an example, NVM chips have the characteristics of being programmed before being read and not being reprogrammable. Therefore, the storage command processing unit will not issue a media interface command to read physical page P1 before writing data to physical page P1; and after writing data to physical page P1, it will not issue another media interface command to write data to physical page P1. Thus, in Figure 5 Since the existence of media interface command 510 means that physical page P1 has been written with data, no media interface command will be written to physical page P1 after media interface command 510 (before physical page P1 is erased).

[0085] In some cases, the command queue includes erase commands, thus violating the aforementioned constraints. Therefore, in an optional implementation, when the storage command processing unit identifies whether a media interface command to be added to the command queue matches a media interface command in the queue, it also checks whether the command queue contains a matched erase command. If a matched erase command is present in the command queue, the storage command processing unit simply adds the media interface command to be added to the tail of the command queue without attempting to merge the media interface commands. Similarly, in an embodiment where merging is performed by the interface controller, the media interface controller, upon identifying a matched erase command in the command queue, also only retrieves the media interface command from the tail of the command queue for processing without performing media interface command merging.

[0086] NVM chips are also rapidly developing, and 3D NAND storage media have emerged, with each storage cell storing 1 bit (SLC), 2 bits (MLC), 3 bits (TLC), or even more bits of data. 3D NAND comprises multiple layers in the Z-direction (perpendicular to the wafer plane) of the wafer on which it is hosted. Each layer of the physical block includes word lines.

[0087] Figure 6 An architecture diagram of 3D NAND storage media is shown.

[0088] 3D NAND flash memory chips consist of multiple physical blocks arranged in the XY direction. Figure 6 The image shows blocks 0 and 600. Physical blocks consist of multiple layers. Figure 6 The diagram illustrates layers L3, L4, L30, and L31, each containing multiple segments (segments 0 through 3 are shown). Each segment comprises a word line. Taking TLC storage media as an example, a word line includes three physical pages, referred to as the LSB (Least Significant Bit) page, CSB (Middle Significant Bit) page, and MSB (Most Significant Bit) page, respectively. Each physical page has a unique physical address. Physical pages in the NVM chip are accessed via their physical addresses. Optionally, the physical address may or may not represent the physical page's location in the physical space of the storage medium.

[0089] For some NVM chips, a word line, or a word line carrying two or more physical pages instead of a single physical page, becomes the smallest unit of operation for storage media access commands indicating programming operations. While the smallest unit of operation for storage media access commands indicating read operations remains a data frame for these NVM chips, they also support storage media access commands indicating read operations with a word line (all physical pages) as the largest unit of operation. In this case, the "hit" determination method in the fused media interface commands according to embodiments of this application is adjusted to further fuse media interface commands using such storage media access commands indicating read operations. If the address fields of two media interface commands indicate the same word line, then one media interface command can hit the other media interface command.

[0090] Similarly, some NVM chips also support multi-plane operations. Multiple planes of the NVM chip can be accessed simultaneously within a single storage media access command, thereby reducing the amount of data used in the storage media access command and increasing the data transfer bandwidth of the NVM chip. In this case, the "hit" determination method in the fused media interface command according to the embodiments of this application can be optionally or further adjusted to further fuse the media interface commands using such storage media access commands indicating multi-plane read operations. If the addresses indicated by the address fields of two media interface commands can be overridden by a single storage media access command indicating multi-plane operation, then one media interface command can hit the other media interface command.

[0091] The maximum (optionally, largest) unit of operation that can be accessed by a single read instruction that exceeds the size of a single physical page is called the extended unit of operation. The extended unit of operation is, for example, the largest unit of operation that can be accessed by a word line or a single multiplane read instruction.

[0092] Figures 7A-7C It shows a command queue where multiple media interface commands access the same extended operation unit.

[0093] P1 indicates an extended operation unit. For example, P1 indicates a word line that contains two physical pages of the MLC. In another example, P1 indicates two physical pages (D1, D2) belonging to two different planes, accessible by a storage media access command of a multi-plane read operation. The address P1D1 accessed by the media interface command indicates the address of physical page D1 of the extended operation unit P1. Optionally, the address field of the media interface command indicates the data frame contained in the extended operation unit.

[0094] The downward arrows indicate the direction of the queue, with the head of the queue at the bottom and the tail at the top.

[0095] See Figure 7A The command queue includes a media interface read command (710) for access address P1D2, a media interface read command (712) for access address P1D1, and a media interface write command (714) for access address P1D1. Physical page D2 of the extended operation unit P1 has been written with data, while physical page D1 has not yet been written with data. After the media interface write command (714) for access address P1D1 is processed, both physical pages (D1 and D2) of the extended operation unit P1 will be filled with data, allowing the data in physical pages D1 and D2 to be read using a single storage media access (read) command for the extended operation unit P1.

[0096] According to an embodiment of this application, when the storage command processing unit adds a media interface read command (710) to the command queue, since media interface read command 710 and media interface read command 712 access the same extended operation unit P1 but different physical pages, media interface read command 710 is identified as having an "extended hit" with media interface read command 712. For clarity, in the embodiment of this application, "extended hit" refers to two media interface commands accessing the same extended operation unit, while "non-extended hit" refers to two media interface commands accessing the same physical page. Understandably, "non-extended hit" also falls under the category of "extended hit".

[0097] The media interface write command 714 is at the front of the command queue and will not affect the media interface read commands 710 and 712. Since it is recognized that the media interface read command 710 extends and hits the media interface read command 712, the storage command processing unit updates the media interface read command 712 with the data frame bitmap of the media interface read command 710, without adding the media interface read command 710 to the command queue.

[0098] Therefore, when the media interface write command 714 is processed, the extended operation unit P1 is filled, and data can be read from the extended operation unit P1 using a single storage media access (read) command. When the media interface controller processes the media access command 712, it has the opportunity to read data from the extended operation unit P1 using a single storage media access (read) command, according to the indication of its data frame bitmap.

[0099] See Figure 7BThe command queue includes a media interface read command (724) for access address P1D1 and a media interface write command (722) for access address P1D2, as well as a media interface read command (720) for access address P1D2 to be added to the command queue. Physical page D1 of the extended operation unit P1 has been written with data, while physical page D2 has not yet been written with data. The media interface write command (722) for access address P1D2 should be processed after the media interface read command (724) and before the media interface command (720).

[0100] According to an embodiment of this application, when the storage command processing unit adds a media interface read command (720) to the command queue, it identifies that the media interface read command 720 "extended hits" the media interface read command 724, and that it non-extended hits the media interface write command 722. In one embodiment, the media interface read command 720 and the media interface read command 724 are not merged. This is because directly merging these two media interface read commands would result in the physical page P1D2 being read before data is written, which violates the access constraints of the NVM chip. Instead, the storage command processing unit adds the media interface read command 720 to the tail of the command queue. In another embodiment, the media interface read command (724) is deleted from the command queue, the deleted media interface read command (724) is merged with the media interface read command (720), and then the media interface read command (720) is added to the command queue. Thus, the media interface read command (720) is processed after the media interface write command (722) is processed.

[0101] See Figure 7C The command queue includes a media interface read command (730) for access address P1D2, a media interface read command (734) for access address P1D1, and a media interface write command (732) for access address P1D2. Physical page D1 of the extended operation unit P1 has been written with data, while physical page D2 has not yet been written with data. The media interface write command (732) for access address P1D2 should be processed after the media interface read command (734) and before the media interface command (730).

[0102] according to Figure 7CIn the illustrated embodiment, when the media interface controller retrieves a media interface read command (734) from the command queue, it identifies that the media interface read command 734 "extended hits" the media interface read command 730, and that it non-extended hits the media interface write command 732. In one implementation, the media interface read command 730 and the media interface read command 734 are not merged. Alternatively, the media interface controller retrieves the media interface read command 734 from the command queue and processes it. In another implementation, the retrieved media interface read command (734) is deleted, and the deleted media interface read command (734) is merged with the media interface read command (730) to update the media interface read command (730). The media interface controller then continues to retrieve and process other media interface commands from the command queue. Thus, the media interface read command (730) is processed after the media interface write command (732) has been processed.

[0103] Figure 8A A flowchart illustrating the fusion of media interface commands in a storage command processing unit according to yet another embodiment of this application is shown.

[0104] The storage command processing unit acquires a media interface read command to be sent to the media interface controller (810). It checks, for example, the address field of the acquired media interface command, whether it has an extended hit with one or more media interface read commands in the command queue (820). If the media interface command to be sent does not have any media interface read commands in the command queue that have an "extended hit" (as opposed to a "non-extended hit") (820), the media interface command to be sent is added to the tail of the command queue (825).

[0105] If the media interface command to be sent extends and hits a media interface read command in the command queue (820), it is further identified whether the media interface command to be sent extends and hits a media interface write command in the command queue (830). If the extended and hit media interface only has a read command and no write command (830), the data frame bitmap field of the hit media interface read command is updated with the media interface command to be sent (835), and the media interface command to be sent is not added to the command queue. If the extended and hit media interface has both a media interface read command and a media interface write command (830), and the position of the extended and hit media interface write command in the command queue is between the extended and hit media interface read command and the media interface read command to be sent, the hit media interface read command is removed from the command queue (840), the data frame bitmap of the media interface read command to be sent is updated with the removed media interface read command (842), and the media interface read command to be sent is added to the tail of the command queue (844).

[0106] In the command queue, the media interface commands that are "before" are located closer to the head of the queue compared to the media interface commands that are "after".

[0107] Optionally, if the extended hit media interface has both a media interface read command and a media interface write command (830), and the extended hit media interface write command is located before the extended hit media interface read command in the command queue, then the data frame bitmap field of the hit media interface read command is updated with the media interface command to be sent.

[0108] Figure 8B A flowchart illustrating the fusion of media interface commands by a media interface controller according to yet another embodiment of this application is shown.

[0109] The media interface controller retrieves a media interface read command to be processed from the command queue (850). It checks, for example, the address field of the retrieved media interface read command to see if it has an extended hit with one or more media interface read commands in the command queue (860). If the retrieved media interface command does not have any media interface read commands in the command queue that have an "extended hit" (as opposed to a "non-extended hit") (860), then the retrieved media interface command is processed (865).

[0110] If the acquired media interface command extension hits a media interface read command in the command queue (860), it further identifies whether the acquired media interface read command extension hits a media interface write command in the command queue (870). If the extended media interface hit only has a read command and no write command (870), the hit media interface read command is removed from the command queue, and the removed media interface read command is also cached (880). The media interface controller also updates the data frame bitmap of the acquired media interface read command with one or more removed media interface read commands (882), and then processes the acquired media interface read command (884).

[0111] If the extended hit media interface command includes both a media interface read command and a media interface write command (870), and if the extended command for media interface read is located after the hit media interface write command in the command queue, then the acquired media interface read command and any extended hit media interface read commands (if any) located before the hit media interface write command in the command queue are deleted and cached (890). The deleted media interface read command is then used to update the data frame bitmap of the extended hit media interface read command in the command queue (892). Since the updated media interface read command is located in the command queue rather than at the head of the queue, the media interface controller does not process the media interface read command, but returns to step 850 to continue obtaining commands to be processed from the head of the command queue.

[0112] If the extended hit media interface command contains both media interface read and media interface write commands (870), and if all media interface read commands in the extended command queue are ahead of the hit media interface write command, then the hit media interface read command is removed from the command queue, and the removed media interface read command is also cached. The media interface controller also updates the data frame bitmap of the acquired media interface read command with one or more removed media interface read commands, and then processes the acquired media interface read command.

[0113] For cached media interface read commands, they have been merged into other media interface read commands. In response to the completion of processing of the other media interface read command, the media interface controller releases the cached media interface command merged with it. If the processing of the other media interface read command fails, in addition to indicating the failure to the storage command processing unit, the controller also retrieves and processes the cached media interface command merged with it.

[0114] Figure 9A A flowchart illustrating the fusion of media interface commands in a storage command processing unit according to another embodiment of this application is shown.

[0115] The storage command processing unit acquires a media interface read command to be sent to the media interface controller (910). It checks, for example, the address field of the acquired media interface command, whether a media interface read command in the command queue has been "non-extended hit" (912). If the media interface command to be sent has "non-extended hit" any media interface read command in the command queue (912), the data frame bitmap of the hit media interface read command is updated with the media interface command to be sent (914) to merge the media interface read command to be sent with the media interface read command that has been "non-extended hit".

[0116] If the media interface command to be sent does not contain any media interface read command in the "non-extended hit" command queue (912), check whether the media interface read command to be sent has an extended hit in the command queue (920). If the media interface command to be sent does not contain any media interface read command in the "extended hit" (different from "non-extended hit") command queue (920), add the media interface command to be sent to the tail of the command queue (925).

[0117] If the media interface command to be sent extends and hits a media interface read command in the command queue (920), it is further identified whether the media interface command to be sent extends and hits a media interface write command in the command queue (930). If the extended and hit media interface only has a read command and no write command (930), the data frame bitmap field of the hit media interface read command is updated with the media interface command to be sent (935), and the media interface command to be sent is not added to the command queue. If the extended and hit media interface has both a media interface read command and a media interface write command (930), and the position of the extended and hit media interface write command in the command queue is between the extended and hit media interface read command and the media interface read command to be sent, the hit media interface read command is removed from the command queue (940), the data frame bitmap of the media interface read command to be sent is updated with the removed media interface read command (942), and the media interface read command to be sent is added to the tail of the command queue (944).

[0118] Figure 9B A flowchart illustrating the fusion of media interface commands by a media interface controller according to another embodiment of this application is shown.

[0119] The media interface controller retrieves a media interface read command to be processed from the command queue (950). It checks, for example, the address field of the retrieved media interface command to see if it has a "non-extended hit" with a media interface read command in the command queue (952). If the retrieved media interface command has a "non-extended hit" with a media interface read command in the command queue (952), the hit media interface read command is removed from the command queue (954), the data frame bitmap of the retrieved media interface command is updated with the hit media interface command (956), and then the retrieved media interface command is processed (958).

[0120] If the media interface command to be sent does not contain any media interface read command in the "non-extended hit" command queue (952), check whether the acquired media interface read command has an extended hit in the command queue (960). If the acquired media interface command does not contain any media interface read command in the "extended hit" (different from "non-extended hit") command queue (960), then process the acquired media interface command (965).

[0121] If the acquired media interface command extension hits a media interface read command in the command queue (960), it further identifies whether the acquired media interface read command extension hits a media interface write command in the command queue (970). If the media interface hit by the extension only has a read command and no write command (970), the hit media interface read command is removed from the command queue, and the removed media interface read command is also cached (980). The media interface controller also updates the data frame bitmap of the acquired media interface read command with one or more removed media interface read commands (982), and then processes the acquired media interface read command (984).

[0122] If the extended hit media interface command includes both a media interface read command and a media interface write command (970), and if the extended command for media interface read is located after the hit media interface write command in the command queue, then the acquired media interface read command and any extended hit media interface read commands (if any) located before the hit media interface write command in the command queue are deleted and cached (990). The deleted media interface read command is then used to update the data frame bitmap of the extended hit media interface read command in the command queue (992). Since the updated media interface read command is located in the command queue rather than at the head of the queue, the media interface controller does not process the media interface read command, but returns to step 950 to continue obtaining commands to be processed from the head of the command queue.

[0123] If the extended hit media interface command contains both media interface read and write commands (970), and if all media interface read commands in the extended command queue are ahead of the hit media interface write command, then the hit media interface read command is removed from the command queue, and the removed media interface read command is also cached. The media interface controller also updates the data frame bitmap of the acquired media interface read commands with one or more removed media interface read commands, and then processes the acquired media interface read commands.

[0124] Figure 10 A block diagram of a media interface controller according to yet another embodiment of this application is shown.

[0125] The media interface controller is coupled to the command queue. The media interface controller includes a hit check unit, a command queue update unit, a command processing unit, a command cache management unit, and the media interface. The media interface is coupled to the NVM chip and is used to send storage media access commands to the NVM chip.

[0126] The storage command processing unit of the control component adds the media access command to the tail of the command queue, and the media interface controller retrieves the media access command from the head of the command queue.

[0127] The hit check unit couples the command queue, the command queue update unit, and the command processing unit. The command check unit retrieves the media interface command to be processed from the tail of the command queue. The command check unit is also coupled to each entry in the command queue and checks whether the media interface read command to be processed hits a media interface read command in the command queue, and determines whether to merge two or more media interface commands.

[0128] Information regarding media interface commands that require convergence due to a media interface event is provided to the command queue update unit. Media interface commands that have not been triggered or do not require convergence are provided to the command processing unit. The command processing unit generates one or more storage media access commands based on the content of the media interface commands and operates the media interface to send them to the NVM chip.

[0129] As an example, if a non-extended media interface read command hits one or more media interface read commands in the command queue, fusion needs to be performed. The hit checking unit provides the command queue update unit with the index of the media interface read command to be processed, along with the indices of all hit media interface read commands in the command queue, and instructs the command queue update unit to fuse these media interface read commands.

[0130] As another example, the media interface read command to be processed extends and hits one or more media interface read commands in the command queue. The command checking unit also identifies whether there are extended-hit media interface write commands in the command queue, and the relationship between the extended-hit media interface write commands and the extended-hit media interface read commands. If the extended-hit media interface read commands all precede the extended-hit media interface write commands, the hit checking unit provides the media interface read command to be processed, along with the indices of all hit media interface read commands in the command queue to the command queue update unit, and instructs the command queue update unit to merge these media interface read commands. If an extended-hit media interface read command follows the extended-hit media interface write command, the hit checking unit provides the media interface read command to be processed, the indices of the hit media interface read commands preceding the extended-hit media interface write command, and the hit media interface read commands following the extended-hit media interface write command in the command queue to the command queue update unit, and instructs the command queue update unit to merge these media interface read commands.

[0131] The command queue update unit identifies the fusion method of the media interface read commands provided by the hit check unit. In one example, based on the received indices, the command queue update unit removes the media interface read commands indicated by those indices from the command queue, updates the currently processed media interface command with the indices of these removed media interface read commands, and provides the updated currently processed media interface read commands to the data frame bitmap of the command processing unit. The command queue update unit also moves the media interface read commands removed from the command queue to the command buffer.

[0132] In another example, the hit checking unit indicates the respective indices in the command queue (one or more indices at the beginning of the command queue, and indices at the end of the command queue). The command queue update unit, based on all the received indices at the beginning of the command queue, removes the media interface read commands corresponding to those indices from the command queue, and updates the data frame bitmap of the media interface read command indicated by the later index in the command queue with these removed commands and the media interface read command to be processed. The command queue update unit also moves the media interface read command to be processed and the media interface read commands removed from the command queue to the command buffer, and does not provide the media interface read command to be processed to the command processing unit.

[0133] The processing results of storage media access (read) commands obtained from the NVM chip by the media interface are also provided to the command cache management unit. The command cache management unit identifies whether a corresponding media interface read command is cached for successfully processed storage media access (read) commands, and deletes the cached media interface read command in response. If the command cache management unit identifies that the processing of a storage media access (read) command has failed, it provides the corresponding cached media interface read command to the command processing unit for processing.

[0134] 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 media interface controller, characterized in that, include: Hit check unit, command queue update unit, command processing unit and media interface; The hit check unit is coupled with the command queue, the command queue update unit and the command processing unit, and checks whether the media interface read command obtained from the command queue hits the media interface read command in the command queue. The hit check unit provides the index of the hit media interface command in the command queue to the command queue update unit; The command queue update unit merges the acquired media interface read commands with the matched media interface read commands; The command processing unit reads commands from the media interface, operates the media interface, and issues storage media access commands. Among them, when the hit checking unit checks whether the media interface read command obtained from the command queue hits the media interface read command in the command queue, it also checks whether the obtained media interface read command hits the erase command in the command queue. If the acquired media interface read command hits the read command in the command queue, and the acquired media interface read command does not hit the erase command in the command queue, the acquired media interface read command is merged with the hit media interface read command. A hit occurs when the address field of the acquired media interface command is the same as, or at least partially the same as, the address field of the media interface command in the command queue.

2. The media interface controller according to claim 1, characterized in that, If the acquired media interface read command matches a read command in the command queue, and the acquired media interface read command matches an erase command in the command queue, the acquired media interface read command and the matched media interface read command will not be merged.

3. The media interface controller according to claim 1 or 2, characterized in that, If the acquired media interface read command does not match any media interface read commands in the command queue, or if the acquired media interface read command matches an erase command in the command queue, the hit check unit will provide the acquired media interface read command to the command processing unit.

4. The media interface controller according to claim 1 or 2, characterized in that, The command queue update unit removes the hit media interface read command from the command queue, updates the data frame bitmap of the acquired media interface read command with the hit media interface read command, and provides the updated media interface read command to the command processing unit.

5. The media interface controller according to any one of claims 1-4, characterized in that, The hit checking unit identifies that the acquired media interface read command has hit one or more media interface read commands in the command queue, and has also hit a media interface write command. The hit media interface read command precedes the hit media interface write command. In response, the hit checking unit provides the index of the acquired media interface read command and the hit media interface read command in the command queue to the command queue update unit. The command queue update unit updates the data frame bitmap of the acquired media interface read command with the hit media interface read command, removes the hit media interface read command from the command queue, and provides the updated media interface read command to the command processing unit.

6. The media interface controller according to any one of claims 1-4, characterized in that, The hit checking unit identifies that the acquired media interface read command has been extended to hit the media interface read command in the command queue, and has also been extended to hit the media interface write command. The hit media interface read command is after the hit media interface write command. In response, the hit checking unit provides the index of the acquired media interface read command and the hit media interface read command in the command queue to the command queue update unit. The command queue update unit updates the data frame bitmap of the hit media interface read command with the acquired media interface read command, and caches the acquired media interface read command without sending it to the command processing unit.

7. The media interface controller according to any one of claims 1-4, characterized in that, The hit checking unit identifies that the acquired media interface read command has been extended to hit the first media interface read command and the second media interface read command in the command queue, and has also been extended to hit the media interface write command. The hit media interface write command is located in the command queue before the first media interface read command and after the second media interface read command. In response, the hit checking unit provides the acquired media interface read command, the index of the first media interface read command in the command queue, and the index of the second media interface read command in the command queue to the command queue update unit respectively. The command queue update unit updates the data frame bitmap of the first media interface read command based on the acquired media interface read command and the second media interface read command, removes the second media interface read command from the command queue, and caches the acquired media interface read command and the second media interface read command, without sending the acquired media interface read command to the command processing unit.

8. The media interface controller according to any one of claims 1-4, characterized in that, The hit checking unit identifies that the acquired media interface read command has not been extended to hit the media interface read command in the command queue, the acquired media interface command has been extended to hit the media interface read command in the command queue, and the acquired media interface command has not been extended to hit the media interface write command in the command queue. In response, the hit checking unit provides the index of the acquired media interface read command and the hit media interface read command in the command queue to the command queue update unit. The command queue update unit updates the data frame bitmap of the acquired media interface read command with the hit media interface read command, and removes the hit media interface read command from the command queue.

9. The media interface controller according to any one of claims 1-4, characterized in that, The hit checking unit identifies that the acquired media interface read command has not been extended to hit the media interface read command in the command queue. The acquired media interface command has been extended to hit the media interface read command in the command queue and has also been extended to hit the media interface write command in the command queue. The hit media interface write command is located after the hit media interface read command in the command queue. The hit checking unit provides the index of the acquired media interface read command and the hit media interface read command in the command queue to the command queue update unit. The command queue update unit updates the data frame bitmap of the acquired media interface read command with the hit media interface read command, and removes the hit media interface read command from the command queue.

10. A control component for a storage device, comprising a control component and a non-volatile memory, said control component comprising a media interface controller as described in any one of claims 1-9.