Data storage device and data processing method
By changing the data arrangement order and allocating continuous data page addresses, the problem of low access efficiency caused by busy periods of memory devices is solved, efficient interleaving read and write operations of memory devices are realized, and the access efficiency of the overall memory device is improved.
Patent Information
- Application Number
- CN202010484223.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-09
- Filing Date
- 2020-06-01
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-06-01
AI Technical Summary
The access efficiency of the memory device is limited by the problem that the memory controller must wait for the end of the busy period of the memory device, resulting in low read/write operation efficiency.
By changing the order of data arrangement, using interleaved read and write operations, the memory controller moves data from one memory block to multiple memory blocks and allocates continuous data page addresses in the target block to perform read/ in parallel Write operations to improve the access efficiency of memory devices.
It realizes efficient access to memory devices, reduces waiting time, and improves data processing efficiency, especially in a multi-memory chip environment.
Smart Images

Figure CN113377279B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a data processing method suitable for a data storage device, which can effectively improve the access efficiency of the memory device. Background Art
[0002] As the technology of data storage devices has grown rapidly in recent years, many data storage devices, such as memory cards that comply with Secure Digital (SD) / Multi Media Card (MMC), Compact Flash (CF), Memory Stick (MS) and Extreme Digital (XD), solid state drives, embedded Multi Media Card (eMMC) and Universal Flash Storage (UFS) have been widely used in a variety of applications. Therefore, efficient access control has become an important issue for these data storage devices.
[0003] Generally speaking, the read / write operation of the memory device must go through a period of time when the memory device is busy. After the memory controller issues a read / write instruction to the memory device, it must wait until the busy period of the memory device ends before issuing another read / write instruction to the memory device to perform other operations. Therefore, the access efficiency of the memory will be limited. Summary of the invention
[0004] As described above, the access efficiency of the memory is affected because the memory controller must wait for the busy period of the memory device to end.
[0005] One purpose of the present invention is to solve the problem that interleaved reading cannot be performed due to the arrangement of data. The present invention arranges the data in the target super block in such a way that when a memory controller needs to read data in the future, it can use an interleaved reading method to read the target super block, thereby improving the access efficiency of the memory device through the interleaved reading operation.
[0006] The present invention discloses a data storage device, including a memory device and a memory controller. The memory device includes a plurality of memory chips, each of which includes a plurality of memory blocks. The memory controller is coupled to the memory device for accessing the memory device. The memory controller configures a plurality of first memory blocks for receiving data from a host device, wherein the first memory block forms at least one first super block, and the first super block includes a first predetermined number of first memory blocks located in different memory chips. When a data amount of data stored in the first memory block reaches a specific value, the memory controller moves the data from the first memory block to a plurality of second memory blocks in a predetermined procedure, wherein the second memory block forms at least one second super block, and the second super block includes a second predetermined number of second memory blocks located in different memory chips, and in the predetermined procedure, the memory controller writes the data stored in the first memory block into the second memory block in sequence, wherein the data of two adjacent logical data pages stored in the first super block are written into two second memory blocks located in different memory chips.
[0007] The present invention discloses a data processing method, which is applicable to a memory device, wherein the memory device includes a plurality of memory chips, each memory chip includes a plurality of memory blocks, and the method includes: configuring a plurality of first memory blocks to receive data from a host device, wherein the first memory blocks form at least one first super block, the first super block includes a first predetermined number of first memory blocks located in different memory chips; and when a data amount of data stored in the first memory block reaches a specific value, in a predetermined procedure, moving the data from the first memory block to a plurality of second memory blocks, wherein the second memory block forms at least one second super block, the second super block includes a second predetermined number of second memory blocks located in different memory chips, and wherein data of two logical data pages allocated with consecutive data page addresses stored in the first super block are written into two second memory blocks located in different memory chips. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 A schematic diagram showing a data storage device according to an embodiment of the present invention.
[0009] Figure 2 A schematic diagram of a single-layer storage super block according to an embodiment of the present invention is shown.
[0010] Figure 3 A timing diagram showing interleaved writing of a flash memory in a single channel architecture according to an embodiment of the present invention is shown.
[0011] Figure 4A timing diagram showing interleaved reads of a flash memory in a single channel architecture according to an embodiment of the present invention.
[0012] Figure 5 A schematic diagram of a three-tier storage super block according to an embodiment of the present invention is shown.
[0013] Figure 6 A schematic diagram showing an example of data arrangement sequence of a target super block according to an embodiment of the present invention.
[0014] Figure 7 A schematic diagram of a three-tier storage super block according to another embodiment of the present invention is shown.
[0015] Figure 8 An exemplary flow chart of a data processing method according to an embodiment of the present invention is shown.
[0016] Fig. 9 A timing diagram showing interleaved writing of a flash memory in a dual-channel architecture according to another embodiment of the present invention is shown.
[0017] Fig.10 A timing diagram showing interleaved reads of a flash memory in a dual-channel architecture according to another embodiment of the present invention.
[0018] The reference numerals are described as follows:
[0019] 100 data storage device;
[0020] 110 memory controller;
[0021] 112 microprocessor;
[0022] 112C Program Code;
[0023] 112M read-only memory;
[0024] 114 control logic;
[0025] 116 Buffer memory;
[0026] 118 interface logic;
[0027] 120 memory device;
[0028] 130 host device;
[0029] 132 encoder;
[0030] 134 decoder;
[0031] 200 SLC superblock;
[0032] 210, 220, 230, 240 SLC memory blocks;
[0033] 500, 600, 700 TLC super blocks;
[0034] 510, 520, 530, 540, 610, 620, 630, 640, 710, 720, 730, 740 TLC memory blocks;
[0035] BUS, BUS_1, BUS_2 data bus;
[0036] BUSY
[0037] CE0, CE1, CE2, CE3 chip enable signals;
[0038] DATA, SLC_P(0)~SLC_P(N-1) data;
[0039] L_Page logical data page;
[0040] P_Page entity data page;
[0041] PGM_CMD write command;
[0042] Read_CMD Read command. DETAILED DESCRIPTION
[0043] In the following, many specific details are described to provide a thorough understanding of the embodiments of the present invention. However, those skilled in the art will still understand how to implement the present invention in the absence of one or more specific details or relying on other methods, components or materials. In other cases, well-known structures, materials or operations are not shown or described in detail to avoid obscuring the main concepts of the present invention.
[0044] References throughout this specification to "one embodiment," "an embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in conjunction with the embodiment or example is included in at least one of the multiple embodiments of the present invention. Thus, the phrases "in one embodiment," "in an embodiment," "in an example," or "in an example" that appear in various places throughout this specification are not necessarily referring to the same embodiment or example. Furthermore, the particular features, structures, or characteristics may be combined in any suitable combinations and / or subcombinations in one or more embodiments or examples.
[0045] In addition, in order to make the purpose, features and advantages of the present invention more clearly understood, the following is a detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings. The purpose is to illustrate the spirit of the present invention rather than to limit the scope of protection of the present invention. It should be understood that the following embodiments can be implemented via software, hardware, firmware, or any combination thereof.
[0046] Figure 1 A schematic diagram of a data storage device 100 according to an embodiment of the present invention is shown. The data storage device 100 includes a memory device 120, such as a flash memory module, and a memory controller 110, and the memory controller 110 is used to access the memory device 120. According to an embodiment of the present invention, the memory controller 110 includes a microprocessor 112, a read only memory (ROM) 112M, a control logic 114, a buffer memory 116, and an interface logic 118. The ROM 112M is used to store a program code 112C, and the microprocessor 112 is used to execute the program code 112C to control the access to the memory device 120. The control logic 114 includes an encoder 132 and a decoder 134 , wherein the encoder 132 is used to encode the data written into the memory device 120 to generate a corresponding check code (or error correction code (ECC)), and the decoder 134 is used to decode the data read from the memory device 120 .
[0047] In a typical case, the memory device 120 includes a plurality of flash memory chips, and each flash memory chip includes a plurality of memory blocks, and the controller (e.g., the memory controller 110 executing the program code 112C through the microprocessor 112) performs the data erasing operation on the memory device 120 in units of blocks. In addition, a memory block may record (include) a specific number of data pages, for example, all floating gate transistors or other charge capture components (not shown) on a word line constitute at least one data page, i.e., a physical data page, wherein the controller (e.g., the memory controller 110 executing the program code 112C through the microprocessor 112) performs the data writing operation on the memory device 120 in units of data pages.
[0048] In practice, the memory controller 110, which executes the program code 112C through the microprocessor 112, can use its own internal components to perform a variety of control operations, such as using the control logic 114 to control the access operation of the memory device 120 (especially the access operation to at least one block or at least one data page), using the buffer memory 116 to perform the required buffer processing, and using the interface logic 118 to communicate with a host device 130. In one embodiment, the memory controller 110 communicates with the host device 130 through the interface logic 118 and using a standard communication protocol. For example, the above-mentioned standard communication protocols include (but are not limited to): Universal Serial Bus (USB) standard, Secure Digital (SD) interface standard, Ultra High Speed-I (UHS-I) interface standard, Ultra High Speed-II (UHS-II) interface standard, Compact flash (CF) interface standard, Multimedia Card (MMC) interface standard, Embedded Multimedia Card (eMMC) interface standard, Universal Flash Storage (UFS) interface standard, Advanced Technology Attachment (ATA) standard, Serial ATA (SATA) standard, Peripheral Component Interconnect Express (PCI-E) standard, Parallel Advanced Technology Attachment (PATA) standard.
[0049] In one embodiment, the buffer memory 116 is implemented as a random access memory (RAM). For example, the buffer memory 116 may be a static random access memory (SRAM), but the present invention is not limited thereto.
[0050] In one embodiment, the data storage device 100 may be a portable memory device (e.g., a memory card that complies with SD / MMC, CF, MS, or XD standards), and the host device 130 may be an electronic device that can be connected to the data storage device, such as a mobile phone, a laptop computer, a desktop computer, etc. In another embodiment, the data storage device 100 may be a solid state drive or an embedded storage device that complies with the Universal Flash Storage (UFS) or Embedded Multi Media Card (EMMC) specifications, and is disposed in an electronic device, such as a mobile phone, a laptop computer, or a desktop computer, and the host device 130 may be a processor of the electronic device.
[0051] The host device 130 may issue commands, such as read commands or write commands, to the data storage device 100 to access data stored in the memory device 120 , or to further control and manage the data storage device 100 .
[0052] According to an embodiment of the present invention, the plurality of memory blocks included in the memory device 120 may include a single-level cell (SLC) (or single-level storage) memory block, a multiple-level cell (MLC) (or multi-level storage) memory block, a triple-level cell (TLC) (or triple-level storage) memory block, and / or a quad-level cell (QLC) (or quad-level storage) memory block. Each memory cell (e.g., the above-mentioned floating gate transistor or other charge trapping element) of the SLC memory block stores one bit of data, each memory cell of the MLC memory block stores two bits of data, each memory cell of the TLC memory block stores three bits of data, and each memory cell of the QLC memory block stores four bits of data.
[0053] In general, the memory device 120 can be roughly divided into three areas, including a system area, a data area, and a spare area. The memory controller 110 can select one or more memory blocks from the spare area as a cache, or buffer, to receive and temporarily store data. When the amount of data to be stored in the buffer reaches a specific value (for example, when the buffer is full, or is about to be full), the memory controller 110 will update the memory block used as the buffer to a data block in the data area. For example, if the buffer used to receive and temporarily store data is an MLC, TLC, or QLC memory block, when the buffer is full, it can be updated to a data block in the data area. If the buffer used to receive and temporarily store data is an SLC memory block, when a certain number of buffers are filled, the data stored in multiple memory blocks used as buffers (source memory blocks) can be moved to MLC, TLC or QLC memory blocks (target memory blocks) through a garbage collection process, and the target memory blocks can be updated to data blocks in the data area through this operation.
[0054] In order to improve access efficiency, multiple flash memory chips (or called dies, logical unit numbers (abbreviated as LUN), which may be named differently or presented in different forms depending on the packaging method adopted by the memory device) of the memory device 120 can share a data bus. That is, the multiple flash memory chips of the memory device 120 can be coupled to the memory controller 110 through a shared data bus. It should be noted that the present invention is not limited to configuring multiple flash memory chips to be coupled to the memory controller 110 through a shared data bus, and it can also be configured as described above that multiple dies or LUNs are coupled to the memory controller 110 through a shared data bus. However, to simplify the explanation, the memory chip will be used as an example for explanation below. In addition, it should be noted that the chips, dies or LUNs that share the data bus can each have their own internal cache and maintain their own operating status.
[0055] In operation, the memory controller 110 can sequentially enable each flash memory chip and sequentially transmit instructions to the corresponding flash memory chip through a shared data bus (only the enabled flash memory chip will receive the instruction), so that the flash memory chip can perform read / write operations in parallel. By overlapping read / write operations on the time axis, the access efficiency of the data storage device can be effectively improved.
[0056] Figure 2A schematic diagram of a single-layer storage (SLC) superblock according to an embodiment of the present invention is shown. In this embodiment, four SLC memory blocks located in different flash memory chips can form an SLC superblock, wherein the four SLC memory blocks forming an SLC superblock can have the same memory block number or memory block index value (block index) in their corresponding flash memory chips.
[0057] like Figure 2 As shown, the SLC super block 200 is formed by SLC memory blocks 210, 220, 230 and 240, wherein the SLC memory blocks 210, 220, 230 and 240 are respectively located in different flash memory chips and can be, for example, the first memory block included in these flash memory chips. The memory controller 110 can enable the corresponding memory chips using different chip enable signals. For example, the memory controller 110 can enable the flash memory chips corresponding to the SLC memory blocks 210, 220, 230 and 240 by chip enable signals CE0, CE1, CE2 and CE3 respectively.
[0058] Each SLC memory block can be used to store data of a plurality of logical data pages, wherein one physical data page P_Page of the SLC memory block corresponds to one logical data page.
[0059] Assume that the memory controller 110 sequentially Figure 2 The SLC memory blocks 210, 220, 230 and 240 shown are regarded as the first SLC memory block, the second SLC memory block, the third SLC memory block and the fourth SLC memory block included in the SLC super block 200. The memory controller 110 can sequentially give each logical data page corresponding to the SLC super block 200 a corresponding index value as a default data page index value (page index) in a cyclic manner.
[0060] For example, the first data page of the first SLC memory block may be given an index value idx=0, the first data page of the second SLC memory block may be given an index value idx=1, the first data page of the third SLC memory block may be given an index value idx=2, the first data page of the fourth SLC memory block may be given an index value idx=3, then the second data page of the first SLC memory block may be given an index value idx=4, the second data page of the second SLC memory block may be given an index value idx=5, and so on. That is, the memory controller 110 may sequentially assign a data page index value to the logical data pages corresponding to the first, second, third, and fourth SLC memory blocks in a cyclic manner along the direction in which the internal physical data page index values of each SLC memory block increase.
[0061] According to the above rules, it can be deduced that for the SLC super block 200, the index value idx corresponding to the j-th page of the i-th SLC memory block is idx=(i-1)+4*(j-1), where i=1~I, I is the number of memory blocks included in a super block, and in this implementation I=4, j=1~J, J is the number of data pages included in a memory block.
[0062] According to an embodiment of the present invention, in addition to the default data page index value, the memory controller 110 may also allocate multiple data page addresses to multiple logical data pages corresponding to a super block according to a first rule (i.e., the memory controller 110 may identify the arrangement order of the data page addresses of the SLC super block 200 according to the first rule). For example, the memory controller 110 refers to the default data page index value and sequentially allocates a corresponding data page address to a logical data page of the first SLC memory block, the second SLC memory block, the third SLC memory block, and the fourth SLC memory block in ascending order of the data page addresses, so that each logical data page corresponding to the SLC super block 200 is allocated a unique data page address, and the arrangement of these data page addresses (i.e., the arrangement order of the data page addresses, or the arrangement order of the data page addresses identified by the memory controller 110) will have a first order.
[0063] like Figure 2 As shown, each SLC memory block includes a plurality of logical data pages, wherein a physical data page P_Page of the SLC memory block corresponds to a logical data page, and each logical data page is marked with a number, which is the data page address Page_add corresponding to the logical data page. In this embodiment, the memory controller 110 sequentially assigns a data page address Page_add=0 to the first page of the first SLC memory block, assigns a data page address Page_add=1 to the first page of the second SLC memory block, assigns a data page address Page_add=2 to the first page of the third SLC memory block, assigns a data page address Page_add=3 to the first page of the fourth SLC memory block, then assigns a data page address Page_add=4 to the second page of the first SLC memory block, assigns a data page address Page_add=5 to the second page of the second SLC memory block, and so on in an ascending manner of the data page address.
[0064] Therefore, in an embodiment of the present invention, the first rule may be to arrange the data page addresses according to the default data page index values so that the first order is the same as the order of the default data page index values, that is, as the data page index values increase, the data page addresses are also allocated to the corresponding logical data pages in an increasing manner.
[0065] Since the arrangement of the data page addresses of the SLC superblock 200 complies with the first rule, during a write operation, the memory controller 110 can sequentially write data into the corresponding logical data pages according to the first order. As described above, since the multiple flash memory chips of the memory device 120 can be coupled to the memory controller 110 via a shared data bus, the flash memory chips can perform read / write operations in parallel. By overlapping read / write operations on the time axis, the access efficiency of the data storage device can be effectively improved.
[0066] Figure 3 A timing diagram of flash memory interleaving writing in a single channel architecture according to an embodiment of the present invention is shown, which shows a timing diagram of the memory controller 110 writing data into a super block. In this embodiment, four memory blocks located in different flash memory chips (referred to as the first chip, the second chip, the third chip and the fourth chip in this example) form a super block. The first chip, the second chip, the third chip and the fourth chip are coupled to the memory controller 110 via a shared data bus BUS. Figure 3 The write operations of the first chip, the second chip, the third chip and the fourth chip are shown in the figure. The time interval marked with the write instruction PGM_CMD represents that the memory controller 110 sends a write instruction to the corresponding chip through the data bus BUS to inform it of the data to be written. The time interval marked with data DATA represents that the memory controller 110 provides the data to be stored to the corresponding chip through the data bus BUS. The time interval marked with busy BUSY represents that the corresponding chip is performing the data write operation, so its status is busy. Since the above-mentioned write instructions and data are transmitted to the corresponding chip through the data bus BUS, Figure 3 It also shows the actual instructions and data transmitted on the data bus BUS. Figure 3 It can be seen that, through the configuration of the super block, the first chip, the second chip, the third chip and the fourth chip can perform write operations in parallel. Therefore, in the busy period when one chip is performing a data write operation, the memory controller 110 can still continue to issue instructions to another chip without waiting for the state of the memory chip to change to not busy, thereby greatly improving the access efficiency of the memory device.
[0067] Figure 4A timing diagram showing interleaved reads of flash memory in a single channel architecture according to an embodiment of the present invention is shown. Similarly, in this embodiment, memory blocks of four flash memory chips (referred to as the first chip, the second chip, the third chip and the fourth chip in this example) form a super block. Figure 4 The read operations of the first chip, the second chip, the third chip, and the fourth chip are shown in the figure. The time interval marked with the read instruction Read_CMD represents that the memory controller 110 sends a read instruction to the corresponding chip through the data bus BUS to inform it of the data to be read. The time interval marked with the busy BUSY represents that the corresponding chip is preparing the data that the memory controller 110 wants to read, for example, finding the data according to the read address and storing it in the internal buffer of the chip, so its status is busy. The time interval marked with the data DATA represents that the corresponding chip provides the data to the memory controller 110 through the data bus BUS. Since the above-mentioned read instructions and data are transmitted to the corresponding chip through the data bus BUS, Figure 4 It also shows the actual instructions and data transmitted on the data bus BUS. Figure 4 It can be seen that, through the configuration of the super block, the first chip, the second chip, the third chip and the fourth chip can perform read operations in parallel. Therefore, during the busy period when one chip is performing a data read operation, the memory controller 110 can still continue to issue instructions to another chip without waiting for the state of the memory chip to change to not busy, thereby greatly improving the access efficiency of the memory device.
[0068] According to an embodiment of the present invention, the memory controller 110 may be configured as follows: Figure 2 The SLC superblock 200 is shown as a buffer for receiving data from the host device 130 and can be used as described above. Figure 2 and Figure 3 As shown, data is sequentially written into the logical data pages 0 to (M+3) corresponding to the SLC super block 200 in an interleaved writing manner according to the increasing order of the data page addresses.
[0069] Since the storage efficiency of the SLC memory block is still not as good as other multi-layer storage memory blocks, when the amount of data stored in the SLC memory block used as a buffer reaches a specific value, for example, when the SLC memory block currently used as a buffer is full, or the amount of written data has reached 90%, 95% or 97% of the capacity of the SLC memory block, etc., the memory controller 110 may decide to move the data from the SLC memory block to other memory blocks, such as MLC, TLC or QLC memory blocks, hereinafter referred to as target memory blocks, in a predetermined procedure. For example, the memory controller 110 may read the data from the SLC memory block in a garbage collection procedure and sequentially write the data to multiple logical data pages of the target memory block.
[0070] For the sake of simplicity and clarity of the concept of the present invention, the following multiple embodiments will be explained using a TLC memory block as an example of a target memory block. However, it should be noted that the application of the present invention is not limited to moving data from an SLC memory block to a TLC memory block, but can also be applied to moving data from an SLC memory block to an MLC memory block, from an SLC memory block to a QLC memory block, or from an MLC memory block to a TLC memory block, from an MLC memory block to a QLC memory block, from a TLC memory block to a TLC memory block, from a TLC memory block to a QLC memory block, etc.
[0071] In other words, the data processing method of the present invention can be implemented in any type of application in which the number of data bits stored in a memory cell of a target memory block is greater than or equal to the number of data bits stored in a memory cell of a source memory block.
[0072] Figure 5 A schematic diagram of a triple-layer storage (TLC) superblock according to an embodiment of the present invention is shown. In this embodiment, four TLC memory blocks located in different flash memory chips can form a TLC superblock, wherein the four TLC memory blocks forming a TLC superblock can have the same memory block number or memory block index value (block index) in their corresponding flash memory chips.
[0073] like Figure 5As shown, the TLC super block 500 is formed by TLC memory blocks 510, 520, 530 and 540, wherein the TLC memory blocks 510, 520, 530 and 540 are respectively located in different flash memory chips and can be, for example, the first memory block included in these flash memory chips. The memory controller 110 can enable the corresponding memory chips using different chip enable signals. For example, the memory controller 110 can enable the flash memory chips corresponding to the TLC memory blocks 510, 520, 530 and 540 by chip enable signals CE0, CE1, CE2 and CE3 respectively.
[0074] Each TLC memory block can be used to store data of a plurality of logical data pages, wherein one physical data page P_Page of the TLC memory block corresponds to three logical data pages L_Page.
[0075] Assume that the memory controller 110 sequentially Figure 5 The TLC memory blocks 510, 520, 530 and 540 shown are regarded as the first TLC memory block, the second TLC memory block, the third TLC memory block and the fourth TLC memory block included in the TLC super block 500. The memory controller 110 can also give each logical data page corresponding to the TLC super block 500 a corresponding index value as a default data page index value in a cyclic manner.
[0076] For example, the first logical data page of the first physical data page of the first TLC memory block may be given an index value idx=0, the second logical data page of the first physical data page of the first TLC memory block may be given an index value idx=1, the third logical data page of the first physical data page of the first TLC memory block may be given an index value idx=2, the first logical data page of the first physical data page of the second TLC memory block may be given an index value idx=3, the second logical data page of the first physical data page of the second TLC memory block may be given an index value idx=4, the third logical data page of the first physical data page of the second TLC memory block may be given an index value idx=5, and the third logical data page of the first physical data page of the second TLC memory block may be given an index value idx=6. The first logical data page of the first physical data page of the TLC memory block may be given an index value of idx=6, the second logical data page of the first physical data page of the third TLC memory block may be given an index value of idx=7, the third logical data page of the first physical data page of the third TLC memory block may be given an index value of idx=8, the first logical data page of the first physical data page of the fourth TLC memory block may be given an index value of idx=9, the second logical data page of the first physical data page of the fourth TLC memory block may be given an index value of idx=10, the third logical data page of the first physical data page of the fourth TLC memory block may be given an index value of idx=11, and so on. That is, the memory controller 110 may sequentially assign a data page index value to the first, second, and third logical data pages corresponding to the first, second, third, and fourth SLC memory blocks in a cyclic manner along the direction in which the internal physical data page index values of each TLC memory block increase.
[0077] According to the above rules, the index value idx corresponding to the zth logical data page of the yth physical data page of the xth TLC memory block can be deduced as idx=3*(x-1)+12*(y-1)+(z-1), wherein x=1~X, X is the number of memory blocks included in a super block, and in this implementation, X=4; y=1~Y, Y is the number of physical data pages included in a number of memory blocks; z=1~Z, Z is the number of logical data pages corresponding to a physical data page, and in this implementation, Z=3.
[0078] As described above, in addition to the default data page index value, the memory controller 110 may also assign multiple data page addresses to multiple logical data pages corresponding to a super block.
[0079] According to a first embodiment of the present invention, the memory controller 110 may allocate multiple data page addresses to multiple logical data pages corresponding to the TLC super block 500 according to a second rule (i.e., the memory controller 110 may identify the arrangement order of the data page addresses of the TLC super block 500 according to the second rule). For example, the memory controller 110 refers to the default data page index value and sequentially allocates a corresponding data page address to a logical data page of the first TLC memory block, the second TLC memory block, the third TLC memory block, and the fourth TLC memory block in ascending order of the data page address, so that each logical data page corresponding to the TLC super block 500 is allocated a unique data page address, and the arrangement of these data page addresses (i.e., the arrangement order of the data page addresses, or the arrangement order of the data page addresses identified by the memory controller 110) will have a second order.
[0080] like Figure 5 As shown, each TLC memory block includes a plurality of logical data pages L_Page, and each logical data page is marked with a number, which is the data page address Page_add corresponding to the logical data page. In this embodiment, the memory controller 110 sequentially assigns a data page address Page_add=0 to the first logical data page of the first physical data page of the first TLC memory block, assigns a data page address Page_add=1 to the second logical data page of the first physical data page of the first TLC memory block, assigns a data page address Page_add=2 to the third logical data page of the first physical data page of the first TLC memory block, assigns a data page address Page_add=3 to the first logical data page of the first physical data page of the second TLC memory block, assigns a data page address Page_add=4 to the second logical data page of the first physical data page of the second TLC memory block, assigns a data page address Page_add=5 to the third logical data page of the first physical data page of the second TLC memory block, and so on.
[0081] Therefore, in the first embodiment of the present invention, the second rule may be to arrange the data page addresses according to the default data page index values, so that the second order is the same as the order of the default data page index values, that is, as the data page index values increase, the data page addresses are also allocated to the corresponding logical data pages in an increasing manner.
[0082] According to an embodiment of the present invention, the memory controller 110 may be configured as follows: Figure 5The TLC super block 500 shown is used as a target super block to receive data originally stored in the SLC memory block in the above-mentioned predetermined procedure, wherein the memory block included in the TLC super block 500 is the target memory block in the predetermined procedure.
[0083] For reference Figure 2 and Figure 5 Since the data page address arrangement of the SLC super block 200 (the source super block in the given procedure) complies with the first rule, during a write operation, the memory controller 110 can sequentially write data into the corresponding logical data page according to the first order. During a read operation, the memory controller 110 can also sequentially read data according to the first order, thus improving the access efficiency of the memory device through the above-mentioned interleaved write and interleaved read operations.
[0084] However, it should be noted that, in the above-mentioned predetermined procedure, if the memory controller 110 follows the above-mentioned second sequence (ie, Figure 5 The data read from the SLC super block 200 is sequentially written into the logical data page corresponding to the TLC super block 500 (the arrangement order of the data page address of the TLC super block 500 shown in the figure). In the process of reading data, the access efficiency of the memory device cannot be improved by the above-mentioned interleaved reading operation.
[0085] For example, it is assumed that the data SLC_P(k) is used to represent the data read from the data page assigned with the data page address Page_add=k in the SLC super block 200 . If the memory controller 110 does not readjust the data, but directly writes the read data into the TLC super block 500 in the order of the data read from the SLC super block 200, then the first data SLC_P(0) stored in the SLC super block 200 will be written into the first logical data page of the first physical data page of the first TLC memory block of the TLC super block 500 (because its assigned data page address Page_add=0), the second data SLC_P(1) stored in the SLC super block 200 will be written into the second logical data page of the first physical data page of the first TLC memory block of the TLC super block 500 (because its assigned data page address Page_add=1), the third data SLC_P(2) stored in the SLC super block 200 will be written into the third logical data page of the first physical data page of the first TLC memory block of the TLC super block 500 (because its assigned data page address Page_add=2), and so on.
[0086] In this way, when the memory controller 110 needs to read the data SLC_P(0)~SLC_P(2) in sequence later, it must continuously access the same memory chip (for example, the memory chip to which the TLC memory block 510 belongs). More specifically, the memory controller 110 must wait for the memory device 120 to complete the operation of reading the data SLC_P(0) and the state of the memory chip to change from busy to not busy before issuing another instruction to the same memory chip to request the reading of the data SLC_P(1). Therefore, in the process of reading data, it is impossible to improve the access efficiency of the memory device by the above-mentioned interleaved reading operation. When the data temporarily stored in the SLC super block 200 is continuous data, and the memory controller 110 directly reads the data according to the following example: Figure 5 When data is written into the TLC super block 500 in the order of the data page addresses shown, the above-mentioned inefficient access operation will occur when the continuous data needs to be read later.
[0087] In order to solve the above problem, according to an embodiment of the present invention, when executing the predetermined program, the memory controller 110 can write the data of two adjacent logical data pages stored in the source super block into two memory blocks located in different memory chips in the target super block. In the embodiment of the present invention, the two adjacent logical data pages refer to logical data pages that are assigned with continuous data page addresses, for example, 0 and 1, 1 and 2, 2 and 3, etc.
[0088] In the first embodiment of the present invention, if the rule for arranging the data page addresses of the TLC super block 500 (target super block) by the memory controller 110 (for example, the second rule mentioned above) is the same as the rule for arranging the data page addresses of the SLC super block 200 (source super block) (for example, the first rule mentioned above), then when moving data from the source super block to the target super block, the memory controller 110 can write the data to multiple logical data pages corresponding to the target super block in sequence according to a predetermined order, wherein this predetermined order is different from the arrangement order of the data page addresses of the target super block (for example, the second order mentioned above).
[0089] In other words, in the first embodiment of the present invention, the first rule and the second rule can both arrange the data page addresses according to the default data page index value, so that the data page addresses are assigned to the corresponding logical data pages in an increasing manner as the data page index value increases. However, when the second rule is the same as the first rule, the memory controller 110 will not write the data into the target super block in the order of the data page addresses, so as to achieve the result that the data of two adjacent logical data pages in the source super block are written into two memory blocks located in different memory chips in the target super block.
[0090] For example, the memory controller 110 may first temporarily store the data read from the source super block in the buffer memory 116, and then write the data into the target super block after rearranging the data sequence. For another example, the memory controller 110 may not read the data from the source super block in sequence according to the first sequence, but read the data from the source super block according to the data arrangement sequence (e.g., the predetermined sequence) that is ultimately intended to be presented in the target super block.
[0091] Figure 6 A schematic diagram showing an example of a data arrangement sequence of a target super block according to an embodiment of the present invention is shown in FIG. Figure 6 The data arrangement sequence finally presented in the target super block is shown in FIG. In this embodiment, the target super block is a TLC super block 600, which is formed by TLC memory blocks 610, 620, 630 and 640 respectively located in different flash memory chips.
[0092] Figure 6 The symbol SLC_P(k) indicated by each logical data page in the table indicates that the source of the data stored in the logical data page is the data page in the SLC super block 200 to which the data page address Page_add=k is assigned. Figure 6 In the example, k = 0 to (N-1). It is worth noting that since the capacity of a TLC superblock can be three times the capacity of an SLC superblock, the number of source superblocks in a given procedure can actually be greater than 1. If the number of source superblocks is greater than 1, Figure 6 The parameter k used in the above example can be converted into the data page address of the corresponding SLC super block through appropriate calculation, for example, by subtracting a value. Those familiar with the art can understand the implementation of the conversion, so it will not be described in detail.
[0093] like Figure 6 As shown, the data arrangement order finally presented in the target super block (for example, the predetermined order mentioned above) and the arrangement order of the data page addresses of the target super block (for example, the second order mentioned above, which can be referred to in Figure 5 ) is different. The memory controller 110 may first temporarily store the data read from the source super block in the buffer memory 116, and then store the data according to the following example: Figure 6 After rearranging the order shown, the data is written into the target super block. Figure 6 The order shown reads data from a source superblock and then sequentially writes the read data to a target superblock.
[0094] In addition to the above-mentioned implementation, the present invention also provides another implementation, which can also achieve the result that data of two adjacent logical data pages in the source super block are written into two memory blocks in different memory chips in the target super block.
[0095] According to the second embodiment of the present invention, the arrangement order of the data page addresses of the target super block (or, the arrangement order of the data page addresses recognized by the memory controller 110) is directly modified so that the arrangement order of the data page addresses of the target super block is the same as the data arrangement order to be ultimately presented in the target super block. For example, the memory controller 110 also arranges the data page addresses of the target super block according to a second rule so that the arrangement of the data page addresses of the target super block has a second order, but in the second embodiment, the second rule is different from the first rule. In other words, in the second embodiment of the present invention, the first rule is to arrange the data page addresses according to the default data page index value, so that the data page addresses are assigned to the corresponding logical data pages in an increasing manner as the data page index value increases, but the second rule is not so, but rather arranges the order of the data page addresses according to the data arrangement order to be ultimately presented in the target super block.
[0096] Figure 7 A schematic diagram of a three-layer storage superblock according to another embodiment of the present invention is shown. In this embodiment, a TLC superblock 700 is formed by TLC memory blocks 710, 720, 730 and 740 located in different flash memory chips. Figure 7 As shown, each TLC memory block includes a plurality of logical data pages L_Page, each logical data page is marked with a number, and the number is the data page address Page_add corresponding to the logical data page.
[0097] In this embodiment, the memory controller 110 does not arrange the data page addresses according to the default data page index value, so that the data page addresses are assigned to the corresponding logical data pages in an increasing manner as the data page index value increases, but arranges the order of the data page addresses according to the data arrangement order that is ultimately intended to be presented in the target super block. Since the memory controller 110 has directly arranged the order of the data page addresses according to the data arrangement order that is ultimately intended to be presented in the target super block, when executing a predetermined program, the memory controller 110 can directly write data into the target super block according to the arrangement order of the data page addresses, and ultimately can also achieve the following Figure 6 The data is shown in the order in which it is arranged.
[0098] For example, in the second embodiment of the present invention, the memory controller 110 can read data from the source super block in sequence according to the first order (the order in which the data page addresses of the source super block are arranged), and then write the data into the target super block in accordance with the second order (the order in which the data page addresses of the target super block are arranged). Since the order of the data page addresses of the target super block has been arranged in advance according to the required data arrangement order, the memory controller 110 only needs to write the read data into the corresponding logical data page in sequence according to the order of the data page addresses of the target super block.
[0099] In other words, in the second embodiment of the present invention, when moving data from a source super block to a target super block, the memory controller 110 can write the data into a plurality of logical data pages corresponding to the target super block in sequence according to a predetermined order, wherein the predetermined order is the same as the arrangement order of the data page addresses of the target super block (e.g., the second order mentioned above). In this way, the result that the data of two adjacent logical data pages in the source super block are written into two memory blocks located in different memory chips in the target super block can also be achieved.
[0100] Figure 8 An exemplary flow chart of a data processing method according to an embodiment of the present invention is shown. The data processing method of the present invention is executed by the memory controller 110 and includes:
[0101] Step S802: configure a plurality of first memory blocks for receiving data from a host device, wherein the plurality of first memory blocks form at least one first super block, the first super block including a first predetermined number of first memory blocks located in different memory chips, for example but not limited to, the first predetermined number can be set to 4.
[0102] Step S804: When a data amount of data stored in the first memory block reaches a specific value, the data is moved from the first memory block to a plurality of second memory blocks in a predetermined procedure, wherein the plurality of second memory blocks form at least one second super block, and the second super block includes a second predetermined number of second memory blocks located in different memory chips. For example but not limited to, the second predetermined number can be set to 4.
[0103] It is worth noting that the memory controller 110 can execute step S804 according to the implementation method introduced in the first embodiment or the second embodiment mentioned above, so that the data of two adjacent logical data pages stored in the first super block are written into two second memory blocks in the second super block located in different memory chips, or, the data of two logical data pages stored in the first super block and assigned with continuous data page addresses are written into two second memory blocks in the second super block located in different memory chips.
[0104] In addition, it is worth noting that the data of two adjacent logical data pages stored in the first super block are written into two second memory blocks located in different memory chips, or the data in the second super block (target super block) is arranged as follows: Figure 6 The purpose of the sequence shown is that the above operation enables the memory controller 110 to read data from the second super block in the interleaved reading manner when it needs to read data from the second super block, so as to improve the access efficiency of the memory device. However, the present invention is not limited to arranging the data in the second super block (target super block) as follows. Figure 6 As long as the data in the target super block is arranged in such a way that the memory controller 110 can read the target super block in an interleaved manner when the memory controller 110 needs to read the data in the future by changing the arrangement order of the data (source data) read from the source super block, or by properly arranging the data page address of the target super block, the memory controller 110 can read the target super block in an interleaved manner according to the different Figure 6 The sequence shown arranges the source data in an order of arrangement or the data page address of the target super block.
[0105] In addition, as described above, the application of the present invention is not limited to moving data from an SLC memory block to a TLC memory block, but can also be applied to any type of application in which the number of data bits stored in a memory cell of a target memory block is greater than or equal to the number of data bits stored in a memory cell of a source memory block. Since those skilled in the art can make corresponding adjustments to the concepts described in the first or second embodiment to apply to other types of data migration, the relevant contents will not be described in detail herein.
[0106] In addition, the above embodiments use a single-channel memory controller as an example, but the present invention is not limited thereto. The concepts and data processing methods proposed in the present invention can also be applied to a multi-channel memory controller, where one channel corresponds to one data bus.
[0107] For example, assuming that the memory controller is a dual-channel memory controller, Figure 2 Taking the SLC super block including four SLC memory blocks as an example, SLC memory blocks 210 and 230 can be coupled to the first channel, and SLC memory blocks 220 and 240 can be coupled to the second channel. Figure 6Taking the TLC superblock including four TLC memory blocks as an example, TLC memory blocks 610 and 630 can be coupled to the first channel, and TLC memory blocks 620 and 640 can be coupled to the second channel. By writing the data of two adjacent logical data pages stored in the source superblock into two memory blocks in the target superblock that are located in different memory chips and coupled to different channels, the access efficiency can be further improved. For example, Figure 6 As shown, since the data SLC_P(0) and the data SLC_P(1) are respectively written into the memory block 610 coupled to the first channel and the memory block 620 coupled to the second channel, greater parallel processing benefits can be obtained during writing and reading.
[0108] Fig. 9 A timing diagram of flash memory interleaving writing in a dual-channel architecture according to another embodiment of the present invention is shown. In this embodiment, four memory blocks located in different flash memory chips (referred to as the first chip, the second chip, the third chip and the fourth chip in this example) form a super block. The first chip and the third chip are coupled to the memory controller via a shared data bus BUS_1, and the second chip and the fourth chip are coupled to the memory controller via a shared data bus BUS_2. Fig. 9 The write operations of the first chip, the second chip, the third chip and the fourth chip are shown in the figure. The time interval marked with the write instruction PGM_CMD represents that the memory controller sends a write instruction to the corresponding chip through the data bus BUS_1 or BUS_2 to inform it of the data to be written. The time interval marked with data DATA represents that the memory controller provides the data to be stored to the corresponding chip through the data bus BUS_1 or BUS_2. The time interval marked with busy BUSY represents that the corresponding chip is performing the data write operation, so its status is busy. Since the above-mentioned write instructions and data are transmitted to the corresponding chip through the data bus BUS_1 or BUS_2, Fig. 9 It also shows the actual instructions and data transmitted on the data buses BUS_1 and BUS_2. Fig. 9 It can be seen that compared with Figure 3 The single-channel example shown can further improve writing efficiency through dual-channel configuration.
[0109] Fig.10 A timing diagram of flash memory interleaving read in a dual-channel architecture according to another embodiment of the present invention is shown. Similarly, in this embodiment, the first chip and the third chip are coupled to the memory controller via a shared data bus BUS_1, and the second chip and the fourth chip are coupled to the memory controller via a shared data bus BUS_2. Fig.10The read operations of the first chip, the second chip, the third chip and the fourth chip are respectively shown in the figure, wherein the time interval marked with the read instruction Read_CMD represents that the memory controller sends a read instruction to the corresponding chip through the data bus BUS_1 or BUS_2 to inform it that it wants to read data, and the time interval marked with busy BUSY represents that the corresponding chip is preparing the data that the memory controller wants to read, for example, finding the data according to the read address and storing it in the internal buffer of the chip, so its status is busy. The time interval marked with data DATA represents that the corresponding chip provides data to the memory controller through the data bus BUS_1 or BUS_2. Since the above-mentioned read instructions and data are transmitted to the corresponding chip through the data bus BUS_1 or BUS_2, Fig.10 It also shows the actual instructions and data transmitted on the data buses BUS_1 and BUS_2. Fig.10 It can be seen that compared with Figure 4 The single-channel example shown can further improve writing efficiency through dual-channel configuration.
[0110] As described above, according to an embodiment of the present invention, when executing a data migration program, the memory controller can write the data of two adjacent logical data pages stored in the source super block into two memory blocks located in different memory chips in the target super block. Even in the application of a multi-channel memory controller, the memory controller can write the data of two adjacent logical data pages stored in the source super block into two memory blocks located in different memory chips and coupled to different channels in the target super block. By changing the arrangement order of the data (source data) read from the source super block, or by properly arranging the data page address of the target super block, the data of two adjacent logical data pages stored in the source super block will eventually be written into two memory blocks located in different memory chips in the target super block, or two memory blocks located in different memory chips and coupled to different channels. With this arrangement, when the memory controller needs to read data in the future, it can use an interleaved reading method to read the target super block. In this way, parallel processing benefits can be obtained, thereby greatly improving the access efficiency of the memory device.
[0111] The use of ordinal numbers such as "first", "second", "third", etc. in the claims to modify components does not itself imply any priority, precedence, sequence between components, or order of steps performed by the method, but is only used as an identifier to distinguish different components with the same name (with different ordinal numbers).
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data storage device, comprising: A memory device comprising a plurality of memory chips, wherein the plurality of memory chips comprises a plurality of memory blocks; as well as a memory controller coupled to the memory device for accessing the memory device, the memory controller configuring a plurality of first memory blocks for receiving data from a host device, wherein the plurality of first memory blocks form at least one first super block, the first super block including a first predetermined number of first memory blocks located in different memory chips, The first super block corresponds to a plurality of logical data pages, and the plurality of logical data pages of the first super block are respectively assigned a corresponding data page address according to a first rule, so that the arrangement of the plurality of data page addresses of the first super block has a first sequence, and when receiving the data from the host device, the memory controller sequentially writes the data into the corresponding plurality of logical data pages according to the first sequence, When a data amount of the data stored in the plurality of first memory blocks reaches a specific value, the memory controller moves the data from the plurality of first memory blocks to a plurality of second memory blocks in a predetermined procedure, wherein the plurality of second memory blocks form at least one second super block, the second super block includes a second predetermined number of second memory blocks located in different memory chips, and In the predetermined procedure, the memory controller writes the data stored in the first memory blocks into the second memory blocks in sequence, wherein the data of two adjacent logical data pages stored in the first super block are written into the second memory blocks located in two different memory chips.
2. The data storage device according to claim 1, wherein: The second super block corresponds to multiple logical data pages, and the multiple logical data pages of the second super block are respectively assigned corresponding data page addresses according to a second rule, so that the arrangement of the multiple data page addresses of the second super block has a second order, and the second rule is the same as the first rule.
3. The data storage device according to claim 2, wherein: When moving the data from the multiple first memory blocks to the multiple second memory blocks, the memory controller reads the data from the multiple logical data pages corresponding to the first super block in sequence according to the multiple data page addresses of the first super block, and writes the data to the multiple logical data pages corresponding to the second super block in sequence according to a predetermined order, wherein the predetermined order is different from the second order.
4. The data storage device according to claim 1, wherein: Two adjacent logical data pages in the first super block are allocated with continuous data page addresses.
5. The data storage device according to claim 1, wherein: The second super block corresponds to multiple logical data pages, and the multiple logical data pages of the second super block are respectively assigned corresponding data page addresses according to a second rule, so that the arrangement of the multiple data page addresses of the second super block has a second order, and the second rule is different from the first rule.
6. The data storage device according to claim 5, characterized in that When moving the data from the multiple first memory blocks to the multiple second memory blocks, the memory controller reads the data from the multiple logical data pages corresponding to the first super block in sequence according to the multiple data page addresses of the first super block, and writes the data to the multiple logical data pages corresponding to the second super block in sequence according to a predetermined order, wherein the predetermined order is the same as the second order.
7. The data storage device according to claim 1, wherein: The plurality of first memory blocks are a plurality of single-level cell (SLC) memory blocks, and the plurality of second memory blocks are a plurality of multi-level cell (MLC) memory blocks, a triple-level cell (TLC) memory blocks, or a quad-level cell (QLC) memory blocks.
8. The data storage device according to claim 1, wherein: The number of data bits stored in a memory cell of the second memory blocks is greater than or equal to the number of data bits stored in a memory cell of the first memory blocks.
9. A data processing method, applicable to a memory device, wherein the memory device comprises a plurality of memory chips, wherein the plurality of memory chips comprises a plurality of memory blocks, the method comprising: configuring a plurality of first memory blocks for receiving data from a host device, wherein the plurality of first memory blocks form at least one first super block, the first super block includes a first predetermined number of first memory blocks located in different memory chips, the first super block corresponds to a plurality of logical data pages, the plurality of logical data pages of the first super block are respectively allocated with a corresponding data page address according to a first rule, so that the arrangement of the plurality of data page addresses of the first super block has a first sequence, and when the data is received from the host device, the data is sequentially written into the corresponding plurality of logical data pages according to the first sequence; as well as When a data amount of the data stored in the plurality of first memory blocks reaches a specific value, the data is moved from the plurality of first memory blocks to a plurality of second memory blocks in a predetermined procedure, wherein the plurality of second memory blocks form at least one second super block, the second super block includes a second predetermined number of second memory blocks located in different memory chips, and The data of two logical data pages allocated with consecutive data page addresses and stored in the first super block are written into the plurality of second memory blocks located in two different memory chips.
10. The method according to claim 9, characterized in that The second super block corresponds to multiple logical data pages, and the multiple logical data pages of the second super block are respectively assigned corresponding data page addresses according to a second rule, so that the arrangement of the multiple data page addresses of the second super block has a second order, and the second rule is the same as the first rule.
11. The method according to claim 10, characterized in that When moving the data from the first memory blocks to the second memory blocks, the method further includes: Reading the data from the plurality of logical data pages corresponding to the first super block in sequence according to the plurality of data page addresses of the first super block; and The data are sequentially written into the plurality of logical data pages corresponding to the second super block according to a predetermined sequence, wherein the predetermined sequence is different from the second sequence.
12. The method according to claim 9, characterized in that The second super block corresponds to multiple logical data pages, and the multiple logical data pages of the second super block are respectively assigned corresponding data page addresses according to a second rule, so that the arrangement of the multiple data page addresses of the second super block has a second order, and the second rule is different from the first rule.
13. The method according to claim 12, characterized in that When moving the data from the first memory blocks to the second memory blocks, the method further includes: Reading the data from the plurality of logical data pages corresponding to the first super block in sequence according to the plurality of data page addresses of the first super block; and The data are sequentially written into the plurality of logical data pages corresponding to the second super block according to a predetermined sequence, wherein the predetermined sequence is the same as the second sequence.
