This application claims the benefit of Taiwan application Serial No. 107116350, filed May 14, 2018 and Taiwan application Serial No. 107119381, filed Jun. 5, 2018 the subject matters of which are incorporated herein by reference.
The disclosure relates in general to a data storage apparatus and a system information programming method.
Along with the advance in the manufacturing technology of memory, the unit storage capacity of the memory is getting larger and larger. In recent years, the internal structure of the memory is directed towards the trend of increasing the storage capacity of each block but decreasing the total amount of blocks. In other words, the memory is directed towards the trend of “less blocks but larger block capacity”. According to the method used in most of the existing technologies, the internal information of the memory is decentralized and stored to different blocks or super blocks. As the storage capacity of the block is getting larger and larger, this method will waste too much available space.
The disclosure is directed to a data storage apparatus and a system information programming method thereof.
According to one embodiment of the disclosure, a data storage apparatus includes a non-volatile memory and the memory controller. The non-volatile memory includes a logical unit number (LUN). The LUN includes a number of planes. Each plane includes a number of blocks. Each block includes a number of pages. The memory controller is coupled to the non-volatile memory and configured to select a number of member blocks from a number of blocks on each plane of the LUN to form a big block, divide the big block into a number of small blocks according to a plane amount parameter, group the pages on different planes of each small block to form a number of big pages according to a page or plane orientation, and write a system information to at least one of the big pages.
According to another embodiment of the disclosure, a data storage apparatus including a non-volatile memory and a memory controller is disclosed. The non-volatile memory includes a number of logical unit numbers (LUNs). Each LUN includes a number of planes. Each plane includes a number of blocks. Each block includes a number of pages. The memory controller is coupled to the non-volatile memory and configured to select a number of member blocks from a number of blocks on each plane of the LUNs to form a super block, divide the super block into a number of small blocks according to a plane amount parameter, group the pages on different planes of each small block to form a number of big pages according to a page or plane orientation, and write a system information to at least one of the big pages.
According to an alternate embodiment of the disclosure, a system information programming method for a data storage apparatus is disclosed. The programming method includes respectively selecting a member block from a number of blocks on each plane of a LUN of the non-volatile memory to form a big block, divide the big block into a number of small blocks according to a plane amount parameter, group the pages on different planes of each small block to form a number of big pages according to a page or plane orientation, and write a system information to at least one of the big pages.
According to another alternate embodiment of the disclosure, a system information programming method for a data storage apparatus, the programming method includes respectively selecting a member block from a number of blocks on each plane of a number of LUNs of the non-volatile memory to form a super block, divide the super block into a number of small blocks according to a plane amount parameter, group the pages on different planes of each small block to form a number of big pages according to a page or plane orientation, and write a system information to at least one of the big pages.
The data storage apparatus and the system information programming method of the disclosure effectively use the data storage space of the data storage apparatus. Furthermore, when recording the system information, the data storage apparatus and the system information programming method simultaneously record the system information code and the recording table to accelerate the data restoring procedure.
The above and other aspects of the disclosure will become better understood with regards to the following detailed description of the preferred but non-limiting embodiment (s). The following description is made with reference to the accompanying drawings.
Referring to
The non-volatile memory 102 can be a NAND flash memory. The memory controller 104 can be implemented as one or more than one control chip capable of transceiving data and instructions to or from the non-volatile memory 102 to perform operation to non-volatile memory 102, for example, to read, program, or erase the non-volatile memory 102.
The non-volatile memory 102 preferably has one or more than one logical unit number (LUN), which can be selected/enabled by a chip enable (CE) signal. Each logical unit number (LUN) includes, for example, four planes, namely, planes PL1˜PL4. Each of the planes PL1˜PL4 includes, for example, 2048 blocks, namely, blocks Bk1˜Bkn, wherein k=1, 2, 3, 4, n=2048. Each of the blocks Bk1˜Bkn includes, for example, 1024 pages, namely, pages P1˜Pm, wherein m=1024. Each page can be controlled by a word line, and each word line can control more than one page. A page includes, for example, 16768B data storage space, and can be divided into a 16 KB data area and 384B spare areas. The data area can store data (user data or system information). The spare area can store the metadata of data. Each word line includes, for example, 16 KB memory cells (not shown). Besides, the memory cells on the word line can be quad level cells (QLC), triple level cells (TLC), multiple level cells (MLC) or single level cells (SLC). It should be noted that the present embodiment is for exemplary purpose only, and the amount of chips, planes, blocks, pages, word lines and memory cells can be designed and arranged according to actual needs.
The data storage apparatus 100 can further be coupled to a host (not shown). The host can output a data access instruction (for example, an instruction to read or write data) to the data storage apparatus 100 to access (read or write) user data of the data storage apparatus 100. For example, in response to the data access instruction outputted from the host, the memory controller 104 of the data storage apparatus 100 can read data from one or more than one physical address in the non-volatile memory 102. The host can be, for example, a personal computer, a mobile phone, a PC tablet, an on-board unit, or a navigation device.
The system information of the data storage apparatus 100 can be, for example, system specification, operating parameter, bad block information, block linking table, block attribute table (recording, for example, the erase count or the amount of valid pages), debugging information table (for example, SMART information table) and/or logical to physical (L2P) mapping table. The mapping information table, also referred as advanced mapping information, records the address information of each sub-L2P mapping table of the L2P mapping table. Unlike the user data, the default (or maximum) size of the system information may not be identical. For example, the block linking table has a size of 380 KB, the mapping information table has a size of 90 KB, and the bad block information has a size of 4 KB. In the system information mentioned above, the block linking table records the order in which the blocks are used, and the block linking table is normally updated when the end of block (EOB) information is written to any block. In order to improve the data storage ability, the memory controller 104 preferably performs the system information programming in the non-predetermined mode or SLC mode. When the system information programming is performing in the SLC mode, a word line can control only one page. Also, along with the operation of the data storage apparatus 100, the memory controller 104 continuously updates the system information.
Logically, the L2P mapping table can be composed of a number of sub-L2P mapping tables, for example, 2048 sub-L2P mapping tables. Each sub-L2P mapping table preferably includes the mapping information of the physical address of a number of continuous logic addresses, for example, the mapping information of the physical address of 32K continuous logic addresses. When a sub-L2P mapping table is updated, the memory controller 104 stores the updated sub-L2P mapping table and records the updated storage address to the mapping information table.
For the efficiency of the data storage apparatus 100 to be maximized, during data (user data or system information) writing, the memory controller 104 normally writes data to the non-volatile memory 102 by performing an inter-leaving programming process since each LUN includes four planes. For example, data are simultaneously written to the blocks (pages of blocks) of all planes. For example, the data are simultaneously written to the block B11 on the plane PL1, the block B21 on the plane PL2, the block B31 on the plane PL3, and the block B41 on the plane PL4 to achieve a higher data write speed.
It is true that writing user data to the blocks of all planes by performing an inter-leaving programming process can achieve the expected effect. However, writing user data to the blocks of all planes by performing an inter-leaving programming process may cause waste in storage space. In the above example, with a conventional inter-leaving programming process, 4 pages of 4 blocks on 4 planes can store 64 KB (4 times of 16 KB) of data, but the system information only has 30 KB. Therefore, to perform the inter-leaving programming process, the memory controller 104 will form 34 KB of dummy data, and group 34 KB of dummy data and 30 KB of system information to form 64 KB of data, and further write the 64 KB data (including system information) to the blocks of all planes by performing an inter-leaving programming process. Therefore, each time when an item of system information is updated/written, the non-volatile memory 102 will store 34 KB of dummy data. With the increasing of the update count of the system information, the non-volatile memory 102 will store a large amount of dummy data, and a large amount of storage space of the non-volatile memory 102 will be occupied. Thus, the memory controller 104 performs the write operation of the system information by using the operating method described below.
It should be noted that in order to simplify the descriptions, only components relevant to the disclosure are shown in
Referring to
In step S202, a block is selected from the blocks on each plane of the LUN by the memory controller 104 to form a big block. The selected block is also referred as a member block which represents the block included in the big block. Refer to
In step S204, the big block is divided into a number of small blocks by the memory controller 104 according to a plane amount parameter. Let the plane amount parameter be exemplified by 2. The memory controller 104 divides the big block BB1 into 2 small blocks according to the plane amount parameter. The blocks B11˜B21 on the planes PL1˜PL2 are set as the first small block, and the blocks B31˜B41 on the planes PL3˜PL4 are set as the second small block. Also, for the blocks of the big block BB1, the memory controller 104 can set the blocks B11 and B31 on the planes PL1 and PL3 as the first small block, and set the blocks B21 and B41 on the planes PL2 and PL4 as the second small block, but the disclosure is not limited thereto.
In step S206, the pages on different planes of each small block are grouped by the memory controller 104 to form a number of big pages according to a page or plane orientation (for example, sequentially, but not limited thereto).
In step S208, the system information, the system information code, and the recording table are written to at least one of the big pages by the memory controller 104. The system information and the recording table preferably are written to the data areas of the big pages, and the system information code preferably is written to the spare areas of the big pages. Or, the system information is written to the data areas of the big page, and the system information code and the recording table are written to the spare areas of the big pages. The system information code is a designation or code assigned according to the type of system information. Table 1 is an example of the correspondence table between the system information code and the type of the system information. As indicated in Table 1, each type of system information has a system information code, different types of system information correspond to different system information codes, and the same type of system information corresponds to the same system information code. Moreover, different types of system information may have different maximum or different default data amount. Let the system information of basic specification type be taken for example. The system information code is A, the default data amount is 5 KB, and other types can be obtained by the same way.
Referring to
Table 2 is an embodiment of the recording table. The recording table is used to record the storage address of the most updated version of all types of system information, for example, the page number of the big page of the big block BB1. After the system information is updated, the updated recording table is also stored to the big pages. When the data storage apparatus 100 is activated again, the memory controller 104 can read the last valid big page of the big block BB1 (that is, the big page storing valid data, for example, the big page BP11) to obtain the storage address of the most updated version of each type of system information to accelerate the re-activation procedure of the data storage apparatus 100.
In an embodiment, when the storage of any type of system information (for example, the mapping information table) requires more than two big pages, the recording table can only be stored to the last page of the big pages used to store this type of system information. Let the mapping information table of previous embodiment be taken for example. The storage of the mapping information table only requires three big pages, and the recording table can be stored to the third page of the three big pages. For example, the big pages BP3˜BP5 can be used to store the mapping information table, and the recording table can be stored to the big page BP5 only.
Referring to
Referring to
Referring to
In step S404, the super block is divided into a number of small blocks by the memory controller 104 according to a plane amount parameter. Let the plane amount parameter be exemplified by 2. For the blocks of the super block SB1, the memory controller 104 can set the blocks B11˜B21 on the planes PL1˜PL2 of the LUN 102A as the first small block, set the blocks B31˜B41 on the planes PL3˜PL4 of the LUN 102A as the second small block, set the blocks B31˜B41 on the planes PL3˜PL4 of the LUN 102D as the 8-th small block. Also, for the blocks of the super block SB1, the memory controller 104 can set the blocks B11 and B31 on the planes PL1 and PL3 of the LUN 102A as the first small block and set the blocks B21 and B41 on the planes PL2 and PL4 as the second small block, but the disclosure is not limited thereto.
In step S406, all pages on different planes of each small block are grouped by the memory controller 104 according to a page or plane orientation (for example, sequentially) to form a number of big pages. When it is according to the plane orientation, the memory controller 104 groups the page P1 on the plane PL1 and the page P1 on the plane PL2 of the first small block to form a big page BP1, groups the page P1 on the plane PL3 and the page P1 on the plane PL4 of the second small block to form a big page BP2. For the third small block, the memory controller 104 groups the page P1 on the plane PL1 and the page P1 on the plane PL2 to form a big page BP3, and the rest can be obtained by the same way. At last, 8192 big pages are formed, and the big page numbers respectively are BP1˜BP8192. In another embodiment, when it is according to the page orientation, the memory controller 104 groups the page P1 on the plane PL1 and the page P1 on the plane PL2 of the first small block to form a big page BP1, groups the page P2 on the plane PL1 and the page P2 on the plane PL2 of the first small block to form a big page BP2, and the rest can be obtained by the same way. After all pages of the first small block are grouped to form the big pages, the memory controller 104 then groups the page P1 on the plane PL3 and the page P1 on the plane PL4 of the second small block to form a big page BP1025, groups the page P2 on the planes PL3 and the page P2 on the plane PL4 of the second small block to form a big page BP1026. Other pages on the planes can be grouped to form corresponding big pages by the same way. Similarly, 8192 big pages can also be formed.
In step S408, the system information, the system information code, and the recording table are written to at least one of the big pages by the memory controller 104. Like step S208, after the big pages are formed, the memory controller 104 can use the big pages to store the system information. The formats, details and variations by which the memory controller 104 writes the system information to the big pages of the super block are similar to the formats, details and variations of relevant embodiments of the apparatus information disclosed above, and are not repeated here.
The data storage apparatus and the system information programming method of the disclosure effectively use the data storage space of the data storage apparatus. Furthermore, when recording the system information, the data storage apparatus and the system information programming method also record the system information code and the recording table to accelerate the data restoring procedure.
While the disclosure has been described by way of example and in terms of the preferred embodiment (s), it is to be understood that the disclosure is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.
Number | Date | Country | Kind |
---|---|---|---|
107116350 | May 2018 | TW | national |
107119381 | Jun 2018 | TW | national |