Programming methods, word line management methods and apparatus for non-volatile storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-09
- Publication Date
- 2026-08-14
Smart Images

Figure CN113377685B_ABST
Abstract
Description
Technical Field
[0001] This application relates to storage device technology, and more particularly to a programming method, word line management method and apparatus for next-generation non-volatile storage media in a storage device. Background Technology
[0002] See Figure 1 The diagram illustrates a block diagram of a storage device. Storage device 102 is coupled to a host computer to provide storage capabilities. The host computer and storage device 102 can be coupled in various ways, including but not limited to connections via SATA, IDE, USB, PCIe, NVMe (NVM Express), SAS, 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 aforementioned methods, such as a personal computer, tablet computer, server, laptop computer, network switch, router, cellular phone, or personal digital assistant. Storage device 102 includes an interface 103, a control unit 104, one or more NVM (Non-Volatile Memory) chips 105, and optionally firmware storage 110. Interface 103 is adapted to exchange data with the host via, for example, SATA, IDE, USB, PCIe, NVMe, SAS, Ethernet, or Fibre Channel. The control unit 104 is used to control data transmission between the interface 103, the NVM chip 105, and the firmware memory 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 through software, hardware, firmware, or a combination thereof. 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. During operation, the control unit 104 loads firmware from the firmware memory 110. The firmware memory 110 can be NOR flash memory, ROM, EEPROM, or a portion of the NVM chip 105.
[0003] 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.
[0004] A memory target is one or more logic units within a NAND flash memory package that share a chip enable (CE) signal. Each logic unit has a logic unit number (LUN). A NAND flash memory 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 a NAND flash memory chip can execute commands and report status independently of each other. The meanings of target, logic unit, LUN, 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.
[0005] Data is typically stored and retrieved in pages on storage media, while data is erased in blocks. A block (also called a physical block) contains multiple pages. Pages on a storage medium (called physical pages) have a fixed size, such as 17664 bytes. Physical pages can also have other sizes.
[0006] 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 solid-state 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 solid-state storage device. Related technologies can also utilize intermediate address formats 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.
[0007] The table structure that stores the mapping information from logical addresses to physical addresses is called the FTL table. The FTL table is an important metadata in solid-state storage devices. Typically, the data items in the FTL table record the address mapping relationships in the solid-state storage device at the data page level.
[0008] 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.
[0009] A large block comprises physical blocks from each of multiple logical units (LUNs). The multiple logical units that provide physical blocks for a large block are called a logical unit group. Each logical unit in a logical unit group can provide a physical block for the large block. For example, in... Figure 2A The schematic diagram of the large blocks shown depicts large blocks constructed on every 16 logical units (LUNs). Each large block comprises 16 physical blocks, each originating from one of the 16 logical units (LUNs). Figure 2A In the example, block 0 comprises physical blocks 0 from each of the 16 logical units (LUNs), while block 2 comprises physical blocks 2 from each logical unit (LUN). Blocks can also be constructed in various other ways. In Figure 2, physical blocks are indicated by reference numerals of the form Bb-a, where a indicates that the physical block is provided by logical unit (LUN a), and b indicates that the block number of the physical block in the logical unit is b. The blocks store user data and check data. Check data for the blocks is calculated based on the user data stored in the blocks. As an example, check data is stored in the last physical block of the block. Other physical blocks of the block can also be selected to store check data. As yet another example, other construction methods for blocks are provided in Chinese patent application number 201710752321.0.
[0010] Figure 2B This diagram illustrates logic units (LUNs) and planes. Each logic unit (LUN) comprises multiple planes. See also... Figure 3 Large blocks are constructed on groups of 16 logical units (LUN0, LUN1, ..., LUN15). Taking LUN 2 as an example, LUN 2 includes 4 planes (plane 0, plane 1, plane 2, and plane 3, where plane 0 and plane 3 are shown). Each plane within the LUN can perform read and write operations simultaneously, thereby improving the parallelism of NVM operations.
[0011] Figure 2B In this block, blocks B0 of LUN0-LUN15 constitute large block 0. Physical blocks B0 in each plane from LUN0 to LUN14 are used to store user data, while physical blocks B0 in the four planes of LUN15 are used to store checksum data calculated based on the user data in large block 0. Blocks B1 of LUN0-LUN15 constitute large block 1.
[0012] Figure 3 Detailed block diagrams of the storage device's control components and media interface controller are shown.
[0013] For example, the CPU of the control unit generates one or more storage commands (displayed as C1, C2, C3, and C4) based on the I / O commands received from the processing unit and provides them to the media interface controller. The media interface controller then generates storage media access commands (e.g., programming commands, read commands, erase commands) that conform to the interface protocol of the NVM chip. As an example, Figure 3 The diagram illustrates four storage commands received by the media interface controller, indicating that data should be written to the NVM chip. Each storage command also specifies the index of the data to be written to the NVM chip; the corresponding data (indicated as D1, D2, D3, and D4) is stored in DRAM. Storage command C1 is shown as D1.
[0014] The media interface controller couples to one or more NVM chips. The media interface controller issues storage media access commands in parallel to each LUN and / or plane of the NVM chip.
[0015] NVM chips are also developing rapidly, 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. Physical blocks set word lines in each layer.
[0016] 3D NAND storage media have a specified order in which data is written to the physical pages of its physical blocks. When programming a physical block, programming commands are sent to the corresponding physical pages in a specified order. Each storage cell stores 2 bits or more of data, so that a word line carries multiple physical pages. For example, for TLC flash memory, multiple physical pages on the same word line are referred to as LSB (Least Significant Bit) pages, CSB (Middle Significant Bit) pages, and MSB (Most Significant Bit) pages. Optionally, it is also required to program multiple physical pages belonging to the same word line in a specified combination. For example, multiple physical pages belonging to the same word line can be programmed simultaneously in one programming command, or two programming commands can be used to program three physical pages on the same word line (the first programming command programs one physical page, and the second programming command programs the remaining two physical pages).
[0017] Figure 4 This is a table of program numbers used to demonstrate the specified order of writing data to a physical block of a 3D TLC NAND.
[0018] The physical block is shown in three layers (L3, L4, and L5), each layer is further divided into 16 sections (referred to as section 0 to section 15). Each section includes three physical pages (LSB page, CSB page, and LSB page) belonging to the same word line. Figure 4The numbers in the displayed cells, in the form of Bn (called the program number), indicate the programming order, which follows the order of the numbers represented by n from smallest to largest. The position of the cell represents its physical location within the physical block of the 3D NAND, uniquely determined by its physical address.
[0019] See Figure 4 The programming number B0 for the LSB page of block 0 in layer L3 indicates that this physical page should be programmed first. Next, the LSB page of block 1 in layer L3 with programming number B1 is programmed. Then, the LSB pages of blocks 2 through 15 in layer L3 are programmed. Next, the LSB pages of blocks 0 through 15 in layer L4 are programmed, although the physical pages of L3 are not yet fully programmed at this point. Next, the MSB and CSB pages of block 0 in layer L3 are programmed according to programming numbers B32 and B33, and these two pages are programmed using a single programming command. The physical page with programming number B31 is geographically far from the physical page with programming number B32, as defined by the layer and segment. Next, the LBS page of segment 0 in layer L5 is programmed according to programming number B34. And so on, programming each physical page in ascending order of programming number. Before the physical page corresponding to program number Bn is programmed, programming operations cannot be performed on the physical page corresponding to program number Bm (m>n).
[0020] Figure 4 The mapping between physical page locations (also known as physical addresses) and program numbers in the displayed program number table is unresolvable. This mapping is typically obtained through a lookup table. The program number table is provided by the storage media vendor. Summary of the Invention
[0021] Programming operations on NVM chips have a certain probability of failure, and in response to programming failures, additional programming commands need to be applied to other physical pages. For example... Figure 4 In the demonstrated 3D TLC storage medium, three physical pages in one segment of a layer belong to the same word line. If programming any one of these physical pages fails, all three physical pages of that word line (excluding physical pages in other segments of the same layer) must be reprogrammed. To perform the reprogramming, it is necessary to ensure that the data to be programmed remains available. See also... Figure 4Physical pages with program numbers B0, B32, and B33 belong to the same word line. After programming the physical page indicated by program number B0, there is a considerable waiting period before the physical pages indicated by program numbers B32 and B33 are programmed. If programming the physical pages indicated by program numbers B32 and B33 fails, it is necessary to reprogram using the data corresponding to program number B0. If programming the physical pages indicated by program numbers B32 and B33 fails, the word line containing these physical pages may be damaged, making the physical page corresponding to program number B0 unreadable. Consequently, the host cannot obtain the data recording the physical page corresponding to program number B0, which is unacceptable for the storage device.
[0022] Therefore, in order to reprogram the data, it is necessary to properly retain the programmed data in the cache of the storage device. On the other hand, the retained data occupies a large portion of the storage device's cache, and the retained data needs to be released in a timely manner to obtain usable cache.
[0023] NVM chips from different vendors and with different specifications may have different numbering tables. Furthermore, they may also have different sizes and / or quantities of physical pages / physical blocks / planes / LUNs. Therefore, replacing or upgrading the NVM chip in a storage device will necessitate modifications to the storage media management functions of the control unit. This introduces additional development costs and extends the delivery time of storage devices.
[0024] We hope to improve upon and overcome one or more of the aforementioned defects.
[0025] According to a first aspect of this application, a first control component according to the first aspect of this application is provided, including a program number generation unit and a programming command assembly unit; the program number generation unit generates a program number according to the physical address of a storage command; the programming command assembly unit caches the storage commands in the order of the program numbers, and obtains one or more cached programming commands in the order of the program numbers to generate a storage medium access command; wherein the data associated with the one or more obtained programming commands is written to the storage medium in a storage medium access command.
[0026] According to the first control component of the first aspect of this application, a second control component according to the first aspect of this application is provided, further comprising a word line management unit; the word line management unit identifies whether the physical pages provided by the word line are all programmed, and instructs the programming command assembly unit on a word line whose physical pages are all programmed; the programming command assembly unit further removes all cached storage commands that access the first word line in response to receiving the instruction for the first word line from the word line management unit.
[0027] According to the first or second control component of the first aspect of this application, a third control component according to the first aspect of this application is provided, wherein the program number generation unit queries the mapping table from physical address to program number using the physical address of the storage command to obtain the program number, and appends the program number to the storage command.
[0028] According to one of the first to third control components of the first aspect of this application, a fourth control component according to the first aspect of this application is provided, wherein the programming command assembly unit responds to the fact that the maximum program number of the cached storage command obtained for generating the storage medium access command is N, and then only the storage command with program number N+1 is obtained to generate the storage medium access command, where N is a positive integer; if there is no storage command with program number N+1 among the cached storage commands, then the storage command is not obtained for the time being.
[0029] According to one of the first to fourth control components of the first aspect of this application, a fifth control component according to the first aspect of this application is provided, wherein the programming command assembly unit responds to the fact that the maximum program number of the cached storage command obtained for generating a storage medium access command is N, and then only obtains the storage command with program number N+1 and one or more programming commands immediately following the program number N+1 to generate the storage medium access command, where N is a positive integer; if there is no storage command with program number N+1 or no one or more programming commands immediately following the program number N+1 in the cached storage commands, then the storage command is not obtained for the time being.
[0030] According to one of the second to fifth control components of the first aspect of this application, a sixth control component according to the first aspect of this application is provided, wherein the programming command assembly unit, in response to acquiring one or more storage commands for generating storage medium access commands, also provides the physical address of the acquired one or more storage commands to the word line management unit.
[0031] According to one of the second to sixth control components of the first aspect of this application, a seventh control component according to the first aspect of this application is provided, wherein in response to the programming command assembly unit, all cached storage commands that accessed the first word line are removed, and the cache storing data corresponding to all the storage commands is also released.
[0032] According to one of the first to seventh control components of the first aspect of this application, an eighth control component according to the first aspect of this application is provided, wherein the storage medium access command accesses the storage medium using the physical address of the storage command.
[0033] According to one of the first to eighth control components of the first aspect of this application, a ninth control component according to the first aspect of this application is provided, further comprising a distribution unit; a storage command indicating a programming operation is provided to the program number generation unit; the distribution unit uses storage commands of other types besides indicating programming operations to generate storage medium access commands.
[0034] According to one of the first to ninth control components of the first aspect of this application, a tenth control component according to the first aspect of this application is provided, further comprising a processor; the processor sends a storage command generated according to an IO command to a program number generation unit, wherein the IO command accesses a logical address, and the storage command generated according to the IO command accesses a physical address; the processor also records the logical address and its corresponding physical address in association; the storage command further indicates a cache for storing its corresponding data.
[0035] According to one of the first to tenth control components of the first aspect of this application, an eleventh control component according to the first aspect of this application is provided, further comprising a command mapping unit: the command mapping unit is coupled to the program number generation unit; the command mapping unit generates one or more storage commands indicating physical addresses according to the unified medium address of the storage commands, and provides the storage commands indicating physical addresses to the program number generation unit.
[0036] According to the eleventh control component of the first aspect of this application, a twelfth control component according to the first aspect of this application is provided, further comprising a distribution unit; the distribution unit is coupled to the command mapping unit; the command mapping unit provides storage commands indicating programming operations to the program number generation unit, and provides storage commands indicating other types of operations besides programming operations to the distribution unit; the distribution unit uses storage commands indicating other types of operations besides programming operations to generate storage medium access commands.
[0037] According to the eleventh or twelfth control component of the first aspect of this application, a thirteenth control component according to the first aspect of this application is provided, wherein the command mapping unit generates one or more storage commands indicating physical addresses based on one or more physical pages included in the unified media page indicated by the unified media address, and each of the one or more storage commands indicating physical addresses accesses one of the one or more physical pages.
[0038] According to the thirteenth control component of the first aspect of this application, a fourteenth control component according to the first aspect of this application is provided, wherein the one or more physical pages included in the unified medium page have the same physical block number and physical page address, but are located in different planes of the logical unit.
[0039] According to one of the eleventh to fourteenth control components of the first aspect of this application, a fifteenth control component according to the first aspect of this application is provided, wherein the command mapping unit generates a plurality of storage commands indicating physical addresses based on the uniform media addresses of the plurality of storage commands, and provides the storage commands indicating physical addresses to the program number generation unit; wherein each of the uniform media addresses of the plurality of storage commands indicates a uniform media page, and each uniform media page includes portions of a plurality of physical pages.
[0040] According to the fifteenth control component of the first aspect of this application, a sixteenth control component according to the first aspect of this application is provided, wherein the unified media address of each of the plurality of storage commands includes a first unified media address and a second unified media address, the first unified media address indicating a first unified media page, and the second unified media address indicating a second unified media page; the first unified media page includes a first portion of a first plurality of physical pages, and the second unified media page includes a second portion of the first plurality of physical pages, wherein the first portion of the physical pages is different from the second portion of the physical pages.
[0041] According to one of the eleventh to sixteenth control components of the first aspect of this application, a seventeenth control component according to the first aspect of this application is provided, wherein the command mapping unit identifies that all one or more storage commands indicating physical addresses generated based on the unified media address of the storage command have been processed and returns that the storage command indicating the unified media address has been processed.
[0042] According to one of the eleventh to seventeenth control components of the first aspect of this application, an eighteenth control component according to the first aspect of this application is provided, further comprising a processor; the processor sends a storage command generated according to an IO command to the command mapping unit, wherein the IO command accesses a logical address, and the storage command generated according to the IO command accesses a unified media address; the processor also records the logical address and its corresponding unified media address in association; the storage command further indicates a cache for storing its corresponding data.
[0043] According to one of the first to tenth control components of the first aspect of this application, a nineteenth control component according to the first aspect of this application is provided, wherein in response to the processing failure of a first storage command, the word line management unit indicates to the programming command assembly unit the first word line accessed by the first storage command; the word line management unit identifies one or more storage commands that have been programmed to the word line containing the physical address accessed by the first storage command; and the programming command assembly unit removes the cached one or more storage commands that access the first word line.
[0044] According to the nineteenth control component of the first aspect of this application, a twentieth control component according to the first aspect of this application is provided, wherein an instruction to the processor to access one or more memory commands of the first word line is removed; the processor regenerates physical addresses for the one or more memory commands of the first word line and sends them to the program number generation unit.
[0045] According to one of the eleventh to eighteenth control components of the first aspect of this application, a twenty-first control component according to the first aspect of this application is provided, wherein in response to the processing failure of a first storage command, the word line management unit indicates to the programming command assembly unit the first word line accessed by the first storage command; the word line management unit identifies one or more storage commands that have been programmed to the word line containing the physical address accessed by the first storage command; and the programming command assembly unit removes the cached one or more storage commands that access the first word line.
[0046] According to the twenty-first control component of the first aspect of this application, a twenty-second control component according to the first aspect of this application is provided, wherein an instruction to the processor to access one or more memory commands of the first word line is removed; the processor regenerates a uniform medium address for the one or more memory commands of the first word line and sends it to the command mapping unit.
[0047] According to the twenty-first control component of the first aspect of this application, a twenty-second control component according to the first aspect of this application is provided, wherein a processor is instructed that processing of one or more second storage commands for accessing one or more storage commands of the first word line has failed; the processor regenerates a unified media address for the one or more second storage commands for accessing the unified media address and sends it to the command mapping unit.
[0048] According to a second aspect of this application, a first control component according to the second aspect of this application is provided, including a command mapping unit and a media access command generation unit; the command mapping unit generates one or more storage commands indicating physical addresses based on the unified media address of the storage commands; the media access command generation unit generates storage media access commands for operating the storage media based on the storage commands indicating physical addresses.
[0049] According to the first control component of the second aspect of this application, a second control component according to the second aspect of this application is provided, wherein the command mapping unit identifies that all one or more storage commands indicating physical addresses generated based on the unified media address of the storage command have been processed, and returns that the storage command indicating the unified media address has been processed.
[0050] According to the first or second control component of the second aspect of this application, a third control component according to the second aspect of this application is provided, wherein the command mapping unit generates one or more storage commands indicating physical addresses based on one or more physical pages included in the unified media page indicated by the unified media address, and each of the one or more storage commands indicating physical addresses accesses one of the one or more physical pages.
[0051] According to the third control component of the second aspect of this application, a fourth control component according to the second aspect of this application is provided, wherein the one or more physical pages included in the unified medium page have the same physical block number and physical page address, but are located in different planes of the logical unit.
[0052] According to one of the first to fourth control components of the second aspect of this application, a fifth control component according to the second aspect of this application is provided, wherein the command mapping unit generates a plurality of storage commands indicating physical addresses based on the uniform media addresses of the plurality of storage commands respectively; wherein each of the uniform media addresses of the plurality of storage commands indicates a uniform media page, and each uniform media page includes portions of a plurality of physical pages.
[0053] According to the fifth control component of the second aspect of this application, a sixth control component according to the second aspect of this application is provided, wherein the unified media address of each of the plurality of storage commands includes a first unified media address and a second unified media address, the first unified media address indicating a first unified media page, and the second unified media address indicating a second unified media page; the first unified media page includes a first portion of a first plurality of physical pages, and the second unified media page includes a second portion of the first plurality of physical pages, wherein the first portion of the physical pages is different from the second portion of the physical pages.
[0054] According to one of the first to sixth control components of the second aspect of this application, a seventh control component according to the second aspect of this application is provided, further comprising a processor; the processor sends a storage command generated according to an IO command to the command mapping unit, wherein the IO command accesses a logical address, and the storage command generated according to the IO command accesses a unified media address; the processor also records the logical address and its corresponding unified media address in association; the storage command further indicates a cache for storing its corresponding data.
[0055] According to one of the first to seventh control components of the second aspect of this application, an eighth control component according to the second aspect of this application is provided, further comprising a program number generation unit and a programming command assembly unit; the program number generation unit generates program numbers according to the physical address of the stored commands; the programming command assembly unit caches the stored commands in the order of the program numbers, and retrieves one or more cached programming commands in the order of the program numbers and provides them to the media access command generation unit.
[0056] According to a third aspect of this application, a method for processing a first storage command according to the third aspect of this application is provided, comprising: generating one or more storage commands based on an I / O command, wherein the I / O command accesses a logical address and the storage command accesses a physical address; generating a programming number for the storage command based on the physical address accessed by the storage command; caching the storage commands in order of the programming numbers; retrieving one or more cached programming commands in order of the programming numbers to generate a storage medium access command; wherein data associated with the retrieved one or more programming commands is written to the storage medium in a storage medium access command.
[0057] According to the first method for processing storage commands according to the third aspect of this application, a second method for processing storage commands according to the third aspect of this application is provided, further comprising: recording the word line to which the physical address accessed by the storage command used to generate the storage medium access command belongs; and, in response to all physical pages of the first word line being programmed, removing all cached storage commands that accessed the first word line.
[0058] According to the first or second method of processing storage commands according to the third aspect of this application, a third method of processing storage commands according to the third aspect of this application is provided, wherein in response to the maximum program number of the cached storage command obtained for generating a storage medium access command being N, only the storage command with program number N+1 is obtained next to generate the storage medium access command, where N is a positive integer; if there is no storage command with program number N+1 among the cached storage commands, then the storage command is not obtained for the time being.
[0059] According to one of the first to third methods for processing storage commands according to the third aspect of this application, a fourth method for processing storage commands according to the third aspect of this application is provided, wherein in response to the maximum program number of the cached storage command obtained for generating a storage medium access command being N, only the storage command with program number N+1 and one or more programming commands immediately following the program number N+1 are obtained to generate the storage medium access command, where N is a positive integer; if there is no storage command with program number N+1 or no one or more programming commands immediately following the program number N+1 among the cached storage commands, then the storage command is not obtained for the time being.
[0060] According to one of the second to fourth methods for processing storage commands according to the third aspect of this application, a fifth method for processing storage commands according to the third aspect of this application is provided, wherein in response to removing all cached storage commands that accessed the first word line, the cache storing data corresponding to all the storage commands is also released.
[0061] According to one of the first to fifth methods for processing storage commands according to the third aspect of this application, a sixth method for processing storage commands according to the third aspect of this application is provided, wherein: for a storage command indicating a programming operation, a program number is generated for the storage command based on the physical address accessed by the storage command; for storage commands of other types besides indicating programming operations, a storage medium access command is directly generated based on the other type of storage command.
[0062] According to one of the first to sixth methods for processing storage commands according to the third aspect of this application, a seventh method for processing storage commands according to the third aspect of this application is provided, wherein the logical address accessed by the IO command and the physical address accessed by the storage command generated according to the IO command are also recorded in association; the storage command further indicates a cache for storing its corresponding data.
[0063] According to one of the first to seventh methods for processing storage commands according to the third aspect of this application, an eighth method for processing storage commands according to the third aspect of this application is provided, further comprising: in response to a processing failure of the first storage command, identifying a first word line accessed by the first storage command, and identifying one or more storage commands that have been programmed to the word line containing the physical address accessed by the first storage command; and removing cached one or more storage commands that access the first word line.
[0064] According to the eighth method for processing storage commands according to the third aspect of this application, a ninth method for processing storage commands according to the third aspect of this application is provided, wherein in response to the removal of one or more storage commands accessing the first word line; a physical address is regenerated for the one or more storage commands accessing the first word line, and the one or more storage commands with the regenerated physical address are processed.
[0065] According to a fourth aspect of this application, a method for processing a first storage command according to the fourth aspect of this application is provided, comprising: generating one or more storage commands based on an I / O command, wherein the I / O command accesses a logical address and the storage command accesses a unified media address; generating one or more storage commands accessing a physical address based on the storage command accessing the unified media address; generating a programming number for the storage command based on the physical address accessed by the storage command; caching the storage commands in order of programming numbers; retrieving one or more cached programming commands in order of programming numbers to generate a storage media access command; wherein data associated with the retrieved one or more programming commands is written to the storage medium in a storage media access command.
[0066] According to the first method for processing storage commands according to the fourth aspect of this application, a second method for processing storage commands according to the fourth aspect of this application is provided, further comprising: recording the word line to which the physical address accessed by the storage command used to generate the storage medium access command belongs; and, in response to all physical pages of the first word line being programmed, removing all cached storage commands that accessed the first word line.
[0067] According to the first or second method of processing storage commands according to the fourth aspect of this application, a third method of processing storage commands according to the fourth aspect of this application is provided, wherein in response to the maximum program number of the cached storage command obtained for generating a storage medium access command being N, only the storage command with program number N+1 is obtained next to generate the storage medium access command, where N is a positive integer; if there is no storage command with program number N+1 among the cached storage commands, then the storage command is not obtained for the time being.
[0068] According to the second or third method of processing storage commands according to the fourth aspect of this application, a fourth method of processing storage commands according to the fourth aspect of this application is provided, wherein in response to removing all cached storage commands that accessed the first word line, the cache storing data corresponding to all the storage commands is also released.
[0069] According to one of the first to fourth methods for processing storage commands according to the fourth aspect of this application, a fifth method for processing storage commands according to the fourth aspect of this application is provided, wherein: for a storage command indicating a programming operation, a program number is generated for the storage command based on the physical address accessed by the storage command; for storage commands of other types besides indicating programming operations, a storage medium access command is directly generated based on the other type of storage command.
[0070] According to one of the first to sixth methods for processing storage commands according to the fourth aspect of this application, a seventh method for processing storage commands according to the fourth aspect of this application is provided, wherein the logical address accessed by the IO command and the uniform medium address accessed by the storage command generated according to the IO command are also recorded in association; the storage command further indicates a cache for storing its corresponding data.
[0071] According to a fifth aspect of this application, a method for processing a first storage command according to the fifth aspect of this application is provided, comprising: generating one or more storage commands based on an I / O command, wherein the I / O command accesses a logical address and the storage command accesses a uniform medium address; generating one or more storage commands accessing a physical address based on the storage command accessing the uniform medium address; and generating a storage medium access command for operating the storage medium based on the storage command indicating the physical address.
[0072] According to the first method for processing storage commands according to the fifth aspect of this application, a second method for processing storage commands according to the fifth aspect of this application is provided, further comprising: identifying that all one or more storage commands indicating physical addresses generated based on the uniform media address of the storage command have been processed, and returning that the storage command indicating the uniform media address has been processed.
[0073] A third method for processing storage commands according to a fifth aspect of this application is provided, wherein one or more storage commands indicating physical addresses are generated based on one or more physical pages included in a unified media page indicated by a unified media address, and each of the one or more storage commands indicating physical addresses accesses one of the one or more physical pages.
[0074] According to one of the first to third methods for processing storage commands according to the fifth aspect of this application, a fourth method for processing storage commands according to the fifth aspect of this application is provided, wherein a plurality of storage commands indicating physical addresses are generated based on the uniform media addresses of the plurality of storage commands respectively; wherein each of the uniform media addresses of the plurality of storage commands indicates a uniform media page, and each uniform media page includes portions of a plurality of physical pages.
[0075] According to one of the first to fourth methods for processing storage commands according to the fifth aspect of this application, a fifth method for processing storage commands according to the fifth aspect of this application is provided, wherein: the unified media address of each of the plurality of storage commands includes a first unified media address and a second unified media address, the first unified media address indicating a first unified media page, and the second unified media address indicating a second unified media page; the first unified media page includes a first portion of a first plurality of physical pages, and the second unified media page includes a second portion of the first plurality of physical pages, wherein the first portion of the physical pages is different from the second portion of the physical pages.
[0076] According to one of the methods for processing storage commands according to the first to fifth aspects of the fifth aspect of this application, a method for processing storage commands according to the sixth aspect of the fifth aspect of this application is provided, wherein the logical address and its corresponding uniform medium address are also recorded in association; the storage command further indicates a cache for storing its corresponding data.
[0077] According to one of the first to sixth methods for processing storage commands according to the fifth aspect of this application, a seventh method for processing storage commands according to the fifth aspect of this application is provided, further comprising: generating a programming number for the storage command based on the physical address accessed by the storage command; caching the storage commands in the order of the programming numbers; retrieving one or more cached programming commands in the order of the programming numbers to generate a storage medium access command; wherein data associated with the one or more retrieved programming commands is written to the storage medium in a storage medium access command. Attached Figure Description
[0078] 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.
[0079] Figure 1 A block diagram showing a storage device using existing technology;
[0080] Figure 2A A large schematic diagram was shown;
[0081] Figure 2B A schematic diagram showing logic units and planes is provided.
[0082] Figure 3 Detailed block diagrams of the control components and media interface controller of the storage device are shown;
[0083] Figure 4 This is a table of program numbers used to demonstrate the specified order of data writes to a physical block of a 3D TLC NAND flash memory.
[0084] Figure 5 A schematic diagram illustrating the mapping from physical address to program number according to an embodiment of this application is shown;
[0085] Figure 6 A block diagram of a media interface controller according to an embodiment of this application is shown;
[0086] Figures 7A-7E A schematic diagram illustrating the assembly of storage commands according to an embodiment of this application is shown;
[0087] Figure 8 A schematic diagram illustrating the mapping from physical address to program number according to yet another embodiment of this application is shown;
[0088] Figure 9 A schematic diagram illustrating a storage splitting command based on a uniform media address according to yet another embodiment of this application is shown;
[0089] Figure 10A-10D This illustrates the mapping from a unified media page to a physical page according to embodiments of this application;
[0090] Figures 11A-11C A schematic diagram illustrating the processing of storage commands for accessing a unified media page according to an embodiment of this application is shown;
[0091] Figure 12 A block diagram of a media interface controller according to yet another embodiment of this application is shown. Detailed Implementation
[0092] 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.
[0093] Figure 5 A schematic diagram illustrating the mapping from physical address to program number according to an embodiment of this application is shown.
[0094] In response to a write I / O command, the control unit of the storage device allocates a physical address for the data to be written to the storage medium and records the mapping relationship between the logical address of the I / O command and the allocated physical address in the FTL table. Thus, when a read I / O command is subsequently received, the logical address of the read I / O command is used to look up the corresponding physical address in the FTL table, and the physical address is used to access the read data.
[0095] The control unit also provides a mapping table between physical addresses and program numbers, allowing users to look up the corresponding program number based on the physical address. The mapping table is obtained or generated based on the program number table provided by the manufacturer.
[0096] The physical address is recorded in the FTL table, and it is also used in the storage media access commands sent by the media interface controller to the NVM chip. The media interface controller determines which storage media access command to send to the NVM chip from among multiple pending storage media access commands based on the program number (in ascending order of program number).
[0097] Optionally, the mapping from physical address to program number is segment-resolvable. This eliminates the need for a physical address-to-program number mapping table; instead, the corresponding mapping function is determined based on the range of physical address values, and the program number is obtained.
[0098] Alternatively, some storage media may have the same physical address as the program number.
[0099] According to embodiments of this application, the CPU of the control unit or the media interface controller provides the translation from physical address to program number. Thus, other parts of the control unit do not need to concern themselves with the existence of program numbers, but instead issue storage commands to the media interface controller based on the order of physical addresses. Optionally, the physical address is associated with the spatial distribution of storage cells in the storage medium. The spatial distribution of storage cells affects the reliability of the stored data to some extent (e.g., due to cross-coupling interference, the error correction techniques used, etc.). Therefore, the CPU of the control unit can implement a specific way of organizing data on the storage medium according to the physical address to improve reliability or meet other requirements, without needing to consider the impact of program numbers and programming order, nor needing to update related processing procedures for changes in programming order. In some cases, sequentially allocating physical addresses to carry the data to be written is simple, which also facilitates the processing of write I / O commands.
[0100] Figure 6 A block diagram of a media interface controller according to an embodiment of this application is shown.
[0101] The media interface controller includes a program number generation unit, a programming command assembly unit, a media access command generation unit, a word line management unit, and a data transmission unit. The media interface controller couples the storage device's cache with the NVM.
[0102] The storage command provided by the control unit to the media interface controller is first provided to the program number generation unit. The program number generation unit obtains the program number by, for example, looking up a mapping table from physical address to program number based on the physical address indicated by the storage command, and provides the storage command along with its program number to the command assembly unit.
[0103] The command assembly unit caches storage commands (indicating programming operations on physical pages). Based on the program numbers of the cached storage commands, it retrieves one or more storage commands that can be used to generate media access commands and provides them to the storage media access command generation unit. For example, the command assembly unit sorts the cached storage commands by their program numbers and generates a sorted list. It then retrieves storage commands from the sorted list from front to back to generate the storage media access commands. The program numbers of the storage commands used to generate the storage media access commands must be sequentially increasing and cannot skip any steps. For example, a storage command with program number Bm (m>n) cannot be used to generate a storage media access command before the storage command with program number Bn in the sorted list has been used to generate the storage media access command.
[0104] Storage commands retrieved from the sorting list and provided to the media access command generation unit remain in the sorting list until the word line management unit indicates that one or more storage commands can be removed from the sorting list. Storage commands provided by the programming command assembly unit to the media access command generation unit are also provided to the word line management unit. Optionally, the physical address in the storage command is provided to the word line management unit to reduce the size of the transmitted commands.
[0105] The word line management unit records whether the physical pages of each word line of the storage medium have been programmed. See also: Figure 4 For example, segment 0 of layer L3 has three physical pages (programmed with numbers B0, B32, and B33), each with its own physical address. The word line management unit, based on received storage commands, identifies whether all physical pages of the word line have been programmed (optionally, the word line management unit sends the storage command to the media access command generation unit as evidence that the physical page indicated by the physical address of the storage command has been programmed). After identifying that all physical pages of a word line have been programmed, it indicates these physical pages (which have been programmed) to the programming command assembly unit, thereby allowing the programming command assembly unit to release the storage commands accessing these physical pages.
[0106] According to embodiments of this application, the word line management unit identifies whether all physical pages of a word line have been programmed based on their physical addresses, since the physical address at least partially reflects the spatial location of the physical page in the storage medium. Thus, based on the identifier of each word line, the physical address of the physical page it provides can be parsedly obtained. Optionally, the word line management unit records the physical addresses of all physical pages provided by each word line, thereby identifying the word line it belongs to in response to a received physical address and recording that the physical address of that word line has been programmed. Optionally, the word line management unit identifies whether all physical pages of a word line have been programmed based on the program number.
[0107] The memory commands cached by the programming command assembly unit are also associated with data cached in, for example, DRAM. The programming command assembly unit releases the memory commands that accessed these programmed physical pages and also releases the corresponding cached data in DRAM only after the word line management unit indicates to the programming command assembly unit that all physical pages of a word line have been programmed.
[0108] The media access command generation unit generates a storage media access command based on the received storage command and uses the physical address in it, and sends it to the NVM chip. Along with the storage media access command, the data to be programmed is also transferred from the cache to the NVM chip through the data transmission unit.
[0109] Optionally or further, if a storage media access command fails, all data written to all physical pages on the word line containing the accessed physical page needs to be rewritten to the NVM chip. For example, the media access command generation unit indicates to the command assembly unit that the storage command corresponding to the storage media access command has failed. The physical address of the failed storage command is also provided to the word line management unit. The word line management unit identifies the word line to which the physical address accessed by the failed storage command belongs and identifies whether one or more of that word line have been programmed. The word line management unit provides these programmed physical pages on that word line to the programming command assembly unit. The programming command assembly unit removes the storage commands that accessed these physical pages from the sorting list. The data recorded in these physical pages needs to be rewritten to other physical pages on the NVM chip. For example, the media interface controller provides these storage commands to the CPU of the control unit, which reallocates physical pages for these storage commands and provides them to the media interface controller for processing again. Data cached in DRAM that was written to these physical pages can then be written to the newly allocated physical pages without needing to retrieve the data to be written to the NVM chip again for these storage commands.
[0110] Figures 7A-7E A schematic diagram illustrating the assembly of storage commands according to an embodiment of this application is shown.
[0111] The media interface controller receives storage commands through the inbound queue. Figure 7A In this context, multiple store commands are added to the inbound queue. Each store command indicates, for example, the physical address to be accessed; for instance, store command 710 requests physical address 48 (indicated by Addr). Each store command is associated with data in the cache; for example, store command 710 is associated with data 48 in the cache.
[0112] For example, storage command 710 is retrieved from the inbound queue, and the program number generation unit generates a corresponding program number (B0) based on its physical address 48. The programming command assembly unit adds the storage command to the assembly command set according to the program number B0, denoted as storage command (720). The storage command set is, for example, organized as a sorted linked list, where the elements are sorted by program number. Figure 7A In the example, the assembly command set contains only one storage command (720), which is arranged at the head of the linked list.
[0113] See Figure 7B The storage command (712) in the inbound queue is retrieved, and its access physical address is 49. The program number generation unit generates a sequence number B33 based on the physical address 49. The programming command assembly unit inserts it into the assembly command set according to the program number B33. Since there are no other elements in the assembly command set, the element with the inserted program number B33 is ordered after the element with the program number B0.
[0114] The programming command assembly unit also obtains storage commands from the assembly command set that can be provided to the media access command generation unit. The storage command corresponding to program number B0 is the first programmable physical page of the accessed physical block. Since the storage command with program number B0 is in the assembly command set, the storage command (720) is provided to the media access command generation unit. Figure 7B In the middle, the storage command indicated by the "programming location" arrow is provided to the media access command generation unit. And the storage command (720) is still recorded in the assembly command set and is not removed.
[0115] See Figure 7C The storage command (714) in the inbound queue is retrieved, and its access physical address is 50. The program number generation unit generates a sequence number B1 based on the physical address 50. The programming command assembly unit inserts it into the assembly command set according to the program number B31, after the element with program number B0 and before the element with program number B31.
[0116] Since the storage command for program number B0 has been provided to the media access command generation unit, and the storage command for program number B1 has appeared in the assembly command set, and program number B1 is the next program number after program number B0, the storage command (724) is provided to the media access command generation unit. Figure 7C In the middle, the storage command indicated by the "programming position" arrow is provided to the media access command generation unit. The programming command (720) and the storage command (724) are still recorded in the assembly command set and are not removed. Although the programming command (722) was added to the assembly command set earlier, its program number B33 is still far from the sequence number B1 of the storage command currently provided to the media access command generation unit. The storage command corresponding to its preceding program number B32 has not yet been submitted to the media access command generation unit, therefore the storage command corresponding to program number B33 will not be submitted to the media access command generation unit either.
[0117] Storage commands continue to be added to the assembly command set, and storage commands continue to be provided to the media access command generation unit sequentially according to their program numbers. See also Figure 7D Multiple storage commands have been added to the assembly command set in order of their program numbers. The storage command with program number B2, indicated by the "Programming Location" arrow, has been submitted to the media access command generation unit. The storage command with program number B33 has been inserted into the assembly command set.
[0118] See Figure 7E The storage commands with program numbers B32 and B33, indicated by the "programming command" arrow, are submitted to the media access command generation unit. See also, for example, [link to example]. Figure 4 The storage medium is of type TLC. Two storage commands, B32 and B33, access the CSB and MSB pages of the same word line, respectively. These two storage commands are provided together to the media access command generation unit, which then generates a single storage media access command based on these two storage commands.
[0119] Furthermore, the word line management unit is aware that these two storage commands have been submitted to the media access command generation unit, and identifies that they belong to the same word line (for example, see...). Figure 4 The three physical pages with program numbers B0, B32, and B33, belonging to the word line (WL0) of L3 segment 0, have been submitted to the media access command generation unit. The word line management unit then indicates to the programming assembly unit that programming of word line WL0 is complete. In response, the programming command assembly unit removes these three memory commands (with program numbers B0, B32, and B33) from the assembly command set. Accordingly, the caches corresponding to these three memory commands are released. Subsequently, the media interface controller also sends a message to, for example, the CPU or other components of the control unit to indicate that the processing of these three memory commands has been completed. Optionally, the CPU or other components of the control unit release the caches corresponding to these three memory commands.
[0120] Figure 8 A schematic diagram illustrating the mapping from physical address to program number according to yet another embodiment of this application is shown.
[0121] NVM chips for storage devices come in various specifications. To reduce the need for modifications to the storage media management functions of the control unit due to the replacement or upgrade of the NVM chip in the storage device, a unified media address is provided according to another embodiment of this application. The storage media management function uses the unified media address to manage the storage media, including allocation, garbage collection, wear leveling, etc. The media interface controller or other components of the control unit translate the unified media address into the physical address of the NVM chip according to the specific NVM chip used.
[0122] See Figure 8 In response to write I / O commands, the control unit of the storage device allocates a unified media address for the data to be written to the storage medium and records the mapping relationship between the logical address of the I / O command and the allocated unified media address in the FTL table. Thus, when a read I / O command is subsequently received, the logical address of the read I / O command is used to query the FTL table to obtain the corresponding unified media address, and the unified media address is used to access the read data.
[0123] A unified media address represents a unified medium. The unified medium has similar geometric features to an NVM chip, including unified logical units, unified blocks, and unified pages. The unified medium is erased by unified blocks and written to or read from unified pages. For example, the logical units and unified blocks of the unified medium correspond to the logical units and physical blocks of the storage device's NVM chip, respectively. The size of a unified page is twice the size of a physical page in the NVM chip. The NVM chip comprises planes. A unified page is mapped to two physical pages in two planes of the same logical unit, each with the same physical block number and the same physical page address.
[0124] In another example, the size of the unified page is four times the size of the physical pages of the NVM chip. The logic unit of the NVM chip comprises four planes. The unified page is mapped to four physical pages with the same physical block number and the same physical page address in the four planes of the same logic unit.
[0125] For a given storage device, the mapping between unified pages and physical pages of the NVM chip is known. Therefore, the mapping from unified media address to physical address is resolvable. In the example above where a unified page consists of two physical pages, the physical page address is obtained by adding one bit to the unified media address. Furthermore, programming operations on a single unified page are split into programming operations on two physical pages, where the bits indicating the planes providing the two physical pages respectively.
[0126] The mapping from uniform media address to physical address is implemented, for example, by the media interface controller. The uniform media address is recorded in the FTL table associated with the logical address. Therefore, in response to a read operation, the uniform media address is also obtained from the FTL table, and the physical address is obtained through the same mapping method.
[0127] According to embodiments of this application, the physical address is also mapped to a program number. The mapping from physical address to program number is also present. Figure 5 The consistency shown in the text is not repeated here.
[0128] Optionally, the unified media address is associated with the physical address, which in turn is associated with the spatial distribution of storage cells in the storage medium. The spatial distribution of storage cells affects the reliability of the stored data to a certain extent. Therefore, the CPU of the control unit can implement a specific method of organizing data on the storage medium based on the unified media address to improve reliability or meet other requirements, without needing to consider the impact of program numbers and programming order, nor needing to update related processing procedures for changes in programming order. In some cases, sequentially allocating unified media addresses to carry the data to be written is simple, which also facilitates the handling of write I / O commands.
[0129] according to Figure 8 In the illustrated embodiment, even if the NVM chip is replaced, the control unit still uses a unified address to manage the storage medium, and the media controller provides a mapping from the unified media address to the physical address based on the specific characteristics of the NVM chip.
[0130] Figure 9 A schematic diagram illustrating a storage splitting command based on a unified media according to yet another embodiment of this application is shown.
[0131] exist Figure 9 In this example, the unified page is mapped to four physical pages in four planes of the same logical unit, each with the same physical block number and the same physical page address. Thus, the unified medium address for accessing the unified page is split into four physical addresses for accessing the physical pages (910, 920, 930, and 940). These four physical addresses respectively indicate the four planes (plane 0, plane 1, plane 2, and plane 3) that provide the four physical pages that make up the unified page.
[0132] For each physical address, a corresponding programming number (912, 922, 932, and 942) is also obtained. The media interface controller accesses plane 0 based on programming number 912 and physical address 910, plane 1 based on programming number 922 and physical address 920, plane 2 based on programming number 932 and physical address 930, and plane 3 based on programming number 942 and physical address 940.
[0133] The storage command to access the unified media address is split into storage commands corresponding to four physical addresses. Once these four storage commands to access physical addresses are processed, the storage command to access the unified media address is considered complete.
[0134] Figure 10A-10D This illustrates the mapping from a unified media page to a physical page according to an embodiment of this application.
[0135] See Figure 10A A unified media page consists of four physical pages, which share the same logical unit address, physical block number, and physical page number, but each physical page resides in a different plane (plane 0, plane 1, plane 2, and plane 3). For example, a unified media page is 16KB in size, while a physical page is 4KB in size.
[0136] See Figure 10B A unified media page consists of two physical pages. These physical pages share the same logical unit address, physical block number, and physical page number, but each physical page resides in a different plane (plane 0 and plane 1). For example, a unified media page is 16KB in size, while a physical page is 8KB in size.
[0137] See Figure 10CA unified media page consists of two physical pages located in the same logical unit, the same physical block, and the same plane, each with a different physical page number. To facilitate address translation from the unified page to the physical page, the two physical pages that make up the unified page have the same physical page number except for a specified bit (e.g., the least significant bit). For example, a unified media page is 16KB in size, while a physical page is 8KB in size.
[0138] See Figure 10D Two unified media pages (1010 and 1020) are interleaved from four physical pages (1030, 1032, 1034, and 1036). For example, the unified media page size is 16KB, and the physical page size is 8KB. Unified media page 1010 consists of the first half (4KB) of physical pages 1030, 1032, 1034, and 1036, while unified media page 1020 consists of the second half (4KB) of the same physical pages. By distributing the unified media pages across multiple physical pages, when reading data from a unified media page, storage media access (read) commands are simultaneously issued to all four physical pages. This reduces the time to read 16KB of data to the time to read four 4KB copies of data in parallel, thus reducing read command processing latency. By distributing data across multiple physical pages, it is also helpful to reconstruct the data from other physical pages using fault-tolerant techniques in the event of the failure of a single physical page.
[0139] according to Figure 10D For example, unified media page 1010 and unified media page 1020 have unified addresses related, such as being adjacent. Therefore, upon receiving a storage command to access an adjacent unified media page, data can be written to four physical pages. In response to receiving a storage command to access a unified media page, the storage command is temporarily cached, and the system waits for another storage command to access the same unified media page in order to generate a storage command to access all four physical pages. Each physical page records data from two unified media pages.
[0140] Understandably, there are other ways to interleave multiple physical address pages into multiple unified media pages.
[0141] Figures 11A-11C A schematic diagram illustrating the processing of storage commands for accessing a unified media page according to an embodiment of this application is shown.
[0142] See Figure 11AA unified media page consists of two physical pages. A read command for a unified media page is provided to the media interface controller. The media interface controller breaks down the read command into two separate storage media access (read) commands for accessing the two physical pages and submits them to the NVM chip. The media interface controller also generates a message indicating that the read command for the unified media page has been completed upon the completion of these two storage media access (read) commands.
[0143] See Figure 11B A unified media page consists of two physical pages. The write command for a unified media page is provided to the media interface controller. The media interface controller breaks down the write command into two separate storage media access (write) commands that access the two physical pages and submits them to the NVM chip. The media interface controller also generates a message indicating that the write command for the unified media page has been completed in response to the completion of these two storage media access (write) commands.
[0144] See Figure 11C A unified media block consists of two physical blocks. The storage command to erase the unified media block is provided to the media interface controller. The media interface controller breaks down the storage command to erase the unified media block into storage media access (erase) commands to access the two physical blocks and submits them to the NVM chip. In response to the completion of these two storage media access (erase) commands, the media interface controller also generates a message indicating that the storage command to erase the unified media block has been processed.
[0145] Figure 12 A block diagram of a media interface controller according to yet another embodiment of this application is shown.
[0146] The media interface controller includes a command mapping unit, a program number generation unit, a programming command assembly unit, a media access command generation unit, a word line management unit, and a data transmission unit. The media interface controller couples the storage device's cache with the NVM.
[0147] The storage commands provided by the control unit to the media interface controller are storage commands that access a unified media address. The command mapping unit of the media interface controller maps the unified media address in the storage command to a physical address. The mapping method between the unified media address and the physical address is configured to the command mapping unit; for example, a storage command to access a unified media address can be split into multiple storage commands, and one or more bits of an indicator plane can be inserted at a specified position in the unified media address as the physical address. Optionally, the unified media address and the physical address can be the same, and the storage command to access the unified media address can be used as a storage command to access the physical address.
[0148] The command mapping unit also identifies the type of storage command. Storage commands indicating programming operations are provided to the program number generation unit, while storage commands indicating other operations are provided to the distribution unit. The distribution unit, based on the storage command, operates the media access command generation unit to generate a storage media access command. The command distribution unit also obtains the processing result of the storage command and provides it to the command mapping unit.
[0149] Optionally, the command mapping unit also generates cache indexes for storage commands that access physical addresses. A storage command accessing a uniform media address carries one or more cache indexes, indicating the cache space containing the data corresponding to the uniform media page. For each generated storage command accessing a physical address, one or more cache indexes are generated to indicate the cache space containing the data of the corresponding physical page. For example, the cache space corresponding to a storage command accessing a uniform media address is a continuous 16KB space starting from address A, and the cache spaces corresponding to the four generated storage commands accessing physical addresses are each a continuous 4KB space starting from address A, a continuous 4KB space starting from address A+4KB, a continuous 4KB space starting from address A+8KB, and a continuous 4KB space starting from address A+12KB.
[0150] same Figure 6 Similarly, in the illustrated embodiment, the program number generation unit obtains the program number based on the physical address indicated by the storage command. The programming command assembly unit, word line management unit, and media access command generation unit jointly process the storage commands indicating programming operations. After identifying that all physical pages of a word line have been programmed, the word line management unit indicates these physical pages (which have been programmed) to the programming command assembly unit, thereby allowing the programming command assembly unit to release the storage commands accessing these physical pages from the assembly command set and indicate the processing results of these storage commands to the command mapping unit.
[0151] The command processing unit also identifies that all storage commands accessing physical addresses, which are derived from a single storage command accessing a unified media address, have been processed and returns the processing result of that single storage command.
[0152] In an optional implementation, the command mapping unit splits a specified number of storage commands accessing a unified media address into multiple storage commands accessing a physical address using an interleaving method. After all the split storage commands accessing physical addresses have been processed, the unit returns a message indicating that all storage commands accessing the unified media address have been processed.
[0153] For example, every two storage commands accessing the same media address can be split into four storage commands accessing the physical address (see also...). Figure 10DEach storage command accessing a physical address accesses a portion of the space accessed by the two storage commands accessing the same medium address. For example, the two storage commands accessing the same medium address each access medium pages U1 and U2, and the four storage commands accessing physical addresses each access physical pages P1, P2, P3, and P4. The first half of the storage space of each of these four physical pages is used to hold the data of the same medium page U1, and the second half of the storage space of each of these four physical pages is used to hold the data of the same medium page U2. Optionally, the command mapping unit also generates multiple cache indexes for each generated storage command accessing a physical address, indicating multiple cache segments that will hold the data to be written to each physical page.
[0154] Optionally or further, if a storage media access command fails to execute, the media access command generation unit indicates to the command assembly unit that the storage command corresponding to the storage media access command has failed. The word line management unit identifies the word line to which the physical address accessed by the failed storage command belongs, and identifies whether one or more of the word lines have been programmed. The word line management unit provides these programmed physical pages on the word line to the programming command assembly unit. The programming command assembly unit removes the storage commands that accessed these physical pages from the sorting list. Based on these storage commands in the sorting list, it also obtains one or more storage commands for accessing uniform media addresses to generate these storage commands.
[0155] Data corresponding to one or more storage commands accessing a unified media address needs to be rewritten to other physical pages of the NVM chip. For example, the media interface controller provides these one or more storage commands to the CPU of the control unit, which then reallocates unified media pages for these storage commands and provides them to the media interface controller again for processing. Data cached in DRAM that needs to be written to these unified media pages can then be written to the newly allocated unified media pages without needing to retrieve the data to be written to the NVM chip again for these storage commands.
[0156] 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 control component, comprising a program number generation unit and a programming command assembly unit; The program number generation unit generates a program number based on the physical address of the stored command; the program number generation unit queries the mapping table from physical address to program number using the physical address of the stored command to obtain the program number, and appends the program number to the stored command; The programming command assembly unit caches storage commands in the order of the program numbers and retrieves one or more cached programming commands in the order of the program numbers to generate storage medium access commands; wherein the data associated with the one or more retrieved programming commands is written to the storage medium in a storage medium access command; the programming command assembly unit releases the storage commands that access these programmed physical pages and also releases the corresponding cached data in the DRAM until it indicates to the programming command assembly unit that all physical pages of a word line have been programmed; in, The program numbers of the storage commands used to generate storage medium access commands should be sequentially incremented and should not skip any steps.
2. The control component according to claim 1 further includes a word line management unit; The word line management unit identifies whether the physical pages provided by the word line are all programmed, and instructs the programming command assembly unit to program the word line whose physical pages are all programmed. The programming command assembly unit also removes all cached storage commands that accessed the first word line in response to receiving an instruction for the first word line from the word line management unit.
3. The control component according to claim 1 or 2, wherein... The programming command assembly unit responds to the fact that the maximum program number of the cached storage command obtained for generating the storage medium access command is N, and then only obtains the storage command with program number N+1 to generate the storage medium access command, where N is a positive integer; if there is no storage command with program number N+1 in the cached storage commands, then no storage command is obtained for the time being.
4. The control component according to claim 3, wherein In response to acquiring one or more storage commands for generating storage medium access commands, the programming command assembly unit also provides the physical address of the acquired one or more storage commands to the word line management unit.
5. The control component according to claim 4, further comprising a distribution unit; The storage command indicating the programming operation is provided to the program number generation unit; The distribution unit uses storage commands of other types besides those indicating programming operations to generate storage medium access commands.
6. The control component according to claim 5 further includes a processor; The processor sends a storage command generated based on the IO command to the program number generation unit, wherein the IO command accesses a logical address, while the storage command generated based on the IO command accesses a physical address; the processor also records the logical address and its corresponding physical address in association; the storage command also indicates a cache for storing its corresponding data.
7. The control component according to claim 6 further includes a command mapping unit: The command mapping unit is coupled to the program number generation unit; The command mapping unit generates one or more storage commands that indicate physical addresses based on the unified media address of the storage commands, and provides the storage commands that indicate physical addresses to the program number generation unit.
8. The control component according to claim 7, further comprising a distribution unit; The distribution unit is coupled to the command mapping unit; The command mapping unit provides storage commands indicating programming operations to the program number generation unit, and provides storage commands of other types indicating programming operations to the distribution unit; The distribution unit uses storage commands of other types besides those indicating programming operations to generate storage medium access commands.
9. A method for processing store commands, comprising: One or more storage commands are generated based on IO commands, where IO commands access logical addresses and storage commands access physical addresses; Generate a program number for the storage command based on the physical address accessed by the storage command; use the physical address of the storage command to look up the mapping table from physical address to program number to obtain the program number, and then append the program number to the storage command; Commands are cached and stored in order of their program numbers; One or more cached programming commands are retrieved in order of their program numbers to generate storage media access commands; The data associated with the one or more programming commands acquired is written to the storage medium in a storage medium access command; the programming command assembly unit releases the storage commands that access these programmed physical pages and also releases the corresponding cached data in the DRAM until it indicates to the programming command assembly unit that all physical pages of a word line have been programmed. The program numbers of the storage commands used to generate storage medium access commands should be sequentially incremented and cannot skip any steps.
10. The method of claim 9, further comprising: The record is used to specify the word line to which the physical address accessed by the storage command used to generate the storage medium access command belongs; In response to all physical pages of the first word line being programmed, all cached storage commands that accessed the first word line were removed.
Citation Information
Patent Citations
Garbage collection method and apparatus based on variable-length chunks
CN109426436A
Nonvolatile memory device and program method thereof
US20130311711A1