Control method of flash memory controller, flash memory controller and storage device
By configuring the partition namespace and generating parameter information in the flash memory controller, the problem of low memory management efficiency in the non-volatile memory host controller interface specification is solved, fast and correct data processing is achieved, and memory performance is improved. .
Patent Information
- Application Number
- CN202410213661.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-20
- Filing Date
- 2024-02-27
- Publication Date
- 2024-09-20
AI Technical Summary
In the non-volatile memory host controller interface specification, how to effectively manage the partition namespace of flash memory to achieve fast and correct memory processing is an important topic, especially since the partition namespace and its area are viewed from the host device's point of view It seems to be pure and lacks effective memory management methods.
Provide a flash memory controller and related control method. By receiving a setting command, the flash memory module is configured as a partition namespace, ensuring that each area has the same size and logical addresses are continuous and non-overlapping, and generates parameter information transmission Give the host device a zone to set.
Effective memory management is achieved, ensuring the efficiency and accuracy of data writing operations, and improving memory performance and reliability.
Smart Images

Figure CN118672937A
Abstract
Description
Technical Field
[0001] The present invention relates to a flash memory, and more particularly to a flash memory controller and a related control method. Background Art
[0002] In the non-volatile memory express (NVMe) host controller interface specification, a zoned namespace is standardized. However, since the zoned namespace and each area therein are purely viewed from the perspective of a host device, how to provide an effective memory management method to correctly and quickly perform appropriate processing is an important issue. Summary of the invention
[0003] Therefore, one of the objectives of the present invention is to provide a flash memory controller capable of transmitting at least one configuration setting to a host device for determining a region size and a related control method to solve the above-mentioned problem.
[0004] According to an embodiment of the present invention, a control method of a flash memory controller is provided, wherein the flash memory controller is used to access a flash memory module, the flash memory module includes a plurality of blocks, and the control method includes: receiving a setting command from a host device; in response to the setting command, configuring at least a portion of the flash memory module as a partition namespace, wherein the partition namespace logically includes a plurality of regions, the host device performs a region-based data write operation on the partition namespace, each of the plurality of regions has a same size, a plurality of logical addresses corresponding to each region are continuous, and the plurality of logical addresses do not overlap between the plurality of regions; generating parameter information according to a configuration of the partition namespace; and transmitting the parameter information to the host device, so that the host device uses the parameter information to set the plurality of regions.
[0005] According to an embodiment of the present invention, a flash memory controller is provided, wherein the flash memory controller is used to access a flash memory module, the flash memory module includes a plurality of blocks, and the flash memory controller includes a read-only memory for storing a program code and a microprocessor for executing the program code to control the access of the flash memory module. The microprocessor is also used to: receive a setting command from a host device; in response to the setting command, configure at least a portion of the flash memory module into a partition namespace, wherein the partition namespace logically includes a plurality of regions, the host device performs a region-based data write operation on the partition namespace, each of the plurality of regions has a same size, a plurality of logical addresses corresponding to each region are continuous, and a plurality of logical addresses do not overlap between the plurality of regions; generate parameter information according to a configuration of the partition namespace; and transmit the parameter information to the host device so that the host device uses the parameter information to set the plurality of regions.
[0006] According to an embodiment of the present invention, a storage device is provided, wherein the storage device includes a flash memory module and a flash memory controller. The flash memory module includes a plurality of blocks, and the flash memory controller is used to access the flash memory module and is also used to: receive a setting command from a host device; in response to the setting command, configure at least a portion of the flash memory module into a partition namespace, wherein the partition namespace logically includes a plurality of regions, the host device performs a region-based data write operation on the partition namespace, each of the plurality of regions has a same size, a plurality of logical addresses corresponding to each region are continuous, and a plurality of logical addresses do not overlap between the plurality of regions; generate parameter information according to a configuration of the partition namespace; and transmit the parameter information to the host device so that the host device uses the parameter information to set the plurality of regions. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0008] Figure 2 FIG. 4 is a schematic diagram of a flash memory controller in a storage device according to an embodiment of the present invention.
[0009] Figure 3 FIG. 4 is a schematic diagram of a block in a flash memory module according to an embodiment of the present invention.
[0010] Figure 4 A schematic diagram of a flash memory module including a general storage space and a partition name space.
[0011] Figure 5 A diagram of a partitioned namespace divided into multiple regions.
[0012] Figure 6 FIG. 4 is a flow chart of an initialization procedure of a storage device according to a first embodiment of the present invention.
[0013] Figure 7 A configuration of a storage device according to an embodiment of the present invention.
[0014] Figure 8 FIG. 4 is a schematic diagram of a super block configuration of a flash memory module according to an embodiment of the present invention.
[0015] Fig. 9 FIG. 4 is a schematic diagram of a super page configuration of a flash memory module according to an embodiment of the present invention.
[0016] Fig.10 FIG. 4 is a flow chart of an initialization procedure of a storage device according to a second embodiment of the present invention.
[0017] Fig.11 FIG. 4 is a schematic diagram of a super block configuration of a flash memory module according to another embodiment of the present invention.
[0018] Fig.12 FIG. 4 is a schematic diagram of a super page configuration of a flash memory module according to another embodiment of the present invention.
[0019] Fig.13 FIG. 4 is a flow chart of an initialization procedure of a storage device according to a third embodiment of the present invention.
[0020]
Explanation of symbols
[0021] 100: Electronic devices
[0022] 110: Host device
[0023] 120_1~120_B: Storage device
[0024] 122: Flash memory controller
[0025] 124: Flash memory module
[0026] 212: Microprocessor
[0027] 212C: Program code
[0028] 212M: Read-only memory
[0029] 214: Control Logic
[0030] 216: Buffer memory
[0031] 218: Interface Logic
[0032] 232: Encoder
[0033] 234:Decoder
[0034] 240: Dynamic Random Access Memory
[0035] 200,B1~BK: Block
[0036] 202: Floating Gate Transistor
[0037] BL1~BL3: bit lines
[0038] WL0~WL6: word line
[0039] 410_1,410_2: Partition namespace
[0040] 420_1,420_2: General storage space
[0041] Z0~Z3: Area
[0042] LBA_k~LBA_(k+x-1): logical address
[0043] 600~608,1000~1008,1300~1314: Steps
[0044] CH_1~CH_N: Channel
[0045] CE_1~CE_M: Chip enable signal
[0046] 710_1~710_M,710_(M*(N-1)+1)~710_(M*N): logical unit 810_1~810_K,1110_1~1110_K,1120_1~1120_K: super block P1~PA: page
[0047] 910_1~910_A,1210_1~1210_A:Super page DETAILED DESCRIPTION
[0048] Figure 1 FIG. 1 is a schematic diagram of an electronic device 100 according to an embodiment of the present invention. Figure 1As shown, the electronic device 100 may include a host device 110 and a plurality of storage devices 120_1 to 120_B. Each storage device (e.g., storage device 120_1) may include a flash memory controller 122 and a flash memory module 124. In this embodiment, each storage device in the storage devices 120_1 to 120_B may be a solid-state drive (SSD) or any storage device having a flash memory module. The host device 110 may be a central processing unit (CPU) or other electronic device or component that can be used to access the storage devices 120_1 to 120_B. The electronic device 100 may be a server, a personal computer, a laptop computer, or any portable electronic device. It should be noted that although Figure 1 Storage devices 120_1 - 120_B are shown, but in some embodiments, the electronic device 100 may only have a single storage device 120_1 .
[0049] Figure 2 FIG. 1 is a schematic diagram of a storage device 120_1 according to an embodiment of the present invention. Figure 2 As shown, the flash memory controller 122 may include a microprocessor 212, a read only memory (ROM; for simplicity ... Figure 2 The microprocessor 212 may include a ROM 212M, a control logic 214, a buffer memory 216, and an interface logic 218. The ROM 212M may be used to store program code 212C, and the microprocessor 212 may be used to execute the program code 212C to control access to the flash memory module 124. The control logic 214 may include an encoder 232 and a decoder 234, wherein the encoder 232 may be used to encode data written to the flash memory module 124 to generate a corresponding check code (i.e., an error correction code (ECC)), and the decoder 234 may be used to decode data read from the flash memory module 124.
[0050] In general, the flash memory module 124 may include a plurality of flash memory chips, and each flash memory chip may include a plurality of blocks. The flash memory controller 122 may perform a block-based erase operation on the flash memory module 124. In addition, a block may have a specific number of pages, wherein the flash memory controller 122 may perform a page-based write operation on the flash memory module 124. In the present embodiment, the flash memory module 124 may be a 3D-NAND type flash memory module.
[0051] In fact, through the microprocessor 212 executing the program code 212C, the flash memory controller 122 can use its own internal components to perform many control operations. For example, the flash memory controller 122 can use the control logic 214 to control the access of the flash memory module 124 (especially, the access of at least one block or at least one page), use the buffer memory 216 to perform the required buffering operations, and use the interface logic 218 to communicate with the host device 110. The buffer memory 216 can be implemented by a random access memory (RAM). For example, the buffer memory 216 can be a static random access memory (SRAM), but the present invention is not limited to this. In addition, the flash memory controller 122 can be coupled to a dynamic random access memory (DRAM; for simplicity, in Figure 2 It should be noted that the dynamic random access memory 240 can be included in the flash memory controller 122. For example, the dynamic random access memory 240 and the flash memory controller 122 can coexist in the same package.
[0052] In one embodiment, the storage device 120_1 may comply with the non-volatile memory express (NVMe) specification, that is, the interface logic 218 may comply with a specific communication specification, such as the Peripheral Component Interconnect (PCI) specification or the Peripheral Component Interconnect Express (PCIe) specification, and may communicate according to the specific communication specification. For example, the interface logic 218 may communicate with the host device 110 via a connector.
[0053] Figure 3 FIG. 2 is a schematic diagram of a block 200 in a flash memory module 124 according to an embodiment of the present invention, wherein the flash memory module 124 may be a 3D NAND flash memory module. Figure 3 As shown, block 200 may include a plurality of memory cells, such as Figure 3 As shown in FIG. 1 , a floating gate transistor 202 or other charge trapping component is used. A 3D NAND flash memory architecture can be implemented through multiple bit lines. Figure 3 Only bit lines BL1 to BL3 and a plurality of word lines (wordlines; in Figure 3 Only word lines WL0 to WL2 and word lines WL4 to WL6 are shown in FIG. Figure 3 Taking the top plane as an example, all floating gate transistors on word line WL0 form at least one page, all floating gate transistors on word line WL1 form at least another page, and all floating gate transistors on word line WL2 form at least yet another page, and so on. In addition, the definition between the word line WL0 and the page (e.g., the logic page) may vary according to the writing method of the flash memory. Specifically, when a single-level cell (SLC) method is used to store data, all floating gate transistors on the word line WL0 correspond to only a single logic page; when a multi-level cell (MLC) method is used to store data, all floating gate transistors on the word line WL0 correspond to two logic pages; when a triple-level cell (TLC) method is used to store data, all floating gate transistors on the word line WL0 correspond to three logic pages; and when a quad-level cell (QLC) method is used to store data, all floating gate transistors on the word line WL0 correspond to four logic pages. The 3D NAND flash memory architecture and the relationship between the word line and the page are well known to those skilled in the art. For the sake of brevity, the relevant details will not be repeated here.
[0054] In this embodiment, the host device 110 can configure at least a portion of the flash memory module 124 into a zoned namespace by sending a settling command set (such as a zoned namespace command set). Figure 4, the host device 110 may transmit a configuration command set to the flash memory controller 122 so that the flash memory module 124 has at least one partition namespace (in this embodiment, the partition namespace 410_1 and the partition namespace 410_2 are taken as examples) and at least one general storage space (in this embodiment, the general storage space 420_1 and the general storage space 420_2 are taken as examples). The partition namespace 410_1 may be divided into a plurality of zones for access, and the host device 110 must perform a data write operation based on a logical block address (LBA) in the partition namespace 410_1. A logical block address (referred to as a logical address) may represent a 512-byte data or a 4-kilobyte (KB) data, and the host device 110 needs to write data into a zone by continuous logical addresses. Specifically, please refer to Figure 5 , the partition namespace 410_1 can be divided into a plurality of zones (e.g., zone Z0 to zone Z3), wherein the zone size is set by the host device 110, and the size of each zone is equal. In addition, the logical addresses in each zone must be continuous, and there is no overlapping logical address between zones (i.e., a logical address can only exist in one zone). For example, if the size of each zone is "x" logical addresses and the starting logical address of zone Z3 is the logical address LBA_k, then zone Z3 is used to store data using the logical address LBA_k, the logical address LBA_(k+1), the logical address LBA_(k+2), the logical address LBA_(k+3) ... and the logical address LBA_(k+x-1). In one embodiment, the logical addresses of adjacent regions may also be continuous. For example, region Z0 is used to store data using logical addresses LBA_1-LBA_2000, region Z1 is used to store data using logical addresses LBA_2001-LBA_4000, region Z2 is used to store data using logical addresses LBA_4001-LBA_6000, region Z3 is used to store data using logical addresses LBA_6001-LBA_8000, and so on. In addition, the amount of data corresponding to a logical address may be determined by the host device 110. For example, the amount of data corresponding to a logical address may be 4 kilobytes.
[0055] In addition, when data is written to each area, the data is written according to the order of the logical addresses of the data. Specifically, the flash memory controller 122 can set a write point according to the written data to control the writing order of the data. Assuming that the area Z1 is used to store data using logical addresses LBA_2001 to LBA_4000, after the host device 110 transmits data corresponding to the logical addresses LBA_2001 to LBA_2051 to the flash memory controller 122, the flash memory controller 122 may set the write point to the next logical address LBA_2052. If the host device 110 subsequently transmits data belonging to the same area but not having the logical address LBA_2052 (for example, the host device 110 transmits data having the logical address LBA_3000), the flash memory controller 122 may reject the data write operation and return a write failure message to the host device 110. In other words, the flash memory controller 122 will allow the data write operation only when the logical address of the received data is the same as the logical address indicated by the write point. In addition, if data in multiple areas are written alternately, each area may have its own write point.
[0056] In order to allow the partition namespaces 410_1 and 410_2 to operate normally under the control of the host device 110 and the storage device 120-_1, the size of each area needs to be appropriately determined. Figure 6 FIG. 1 is a flow chart of an initialization procedure of the storage device 120_1 according to the first embodiment of the present invention.
[0057] In step 600, the process starts and the flash memory module 124 has not yet started to be configured.
[0058] In step 602 , the host device 110 starts to activate the storage device 120_1 , and transmits a configuration command set to the flash memory controller 122 .
[0059] In step 604, the flash memory controller 122 begins to configure the flash memory module 124 based on an optimal performance or bandwidth setting to generate parameter information. Specifically, assuming that the flash memory module 124 includes a plurality of channels CH_1-CH_N, and each of the channels CH_1-CH_N corresponds to a plurality of logical units (LUNs) enabled by using chip enable signals CE_1-CE_M, for example, Figure 7 For example, Figure 7A configuration of a storage device according to an embodiment of the present invention is shown, wherein channel CH_1 corresponds to logic units 710_1-710_M enabled by using chip enable signals CE_1-CE_M, and channel CH_N corresponds to logic units 710_(M*(N-1)+1)-710_(M*N) enabled by using chip enable signals CE_1-CE_M. In this embodiment, channels CH_1-CH_N may be processed in parallel to access one of the corresponding logic units simultaneously. For example, when chip enable signal CE_1 is enabled and other chip enable signals are disabled, the first logic unit of each channel is allowed to be accessed by the host device 110; when chip enable signal CE_2 is enabled and other chip enable signals are disabled, the second logic unit of each channel is allowed to be accessed by the host device 110; and so on. In addition, each logic unit may be a die within the flash memory module 124, or a die may include two or more logic units.
[0060] In one embodiment, the number of channels and the number of chip enable signals may be determined according to design requirements. For example, the storage device 120_1 may have 16 channels and 4 chip enable signals (ie, N=16 and M=4).
[0061] Since the flash memory module 124 supports channels CH_1 ˜CH_N and the channels CH_1 ˜CH_N can be accessed simultaneously, the flash memory controller 122 can configure the flash memory module 124 based on the number of channels supported by the flash memory module 124 .
[0062] Figure 8 FIG. 1 is a schematic diagram of a super block configuration of a flash memory module according to an embodiment of the present invention. Figure 8 As shown, each of the logical units 710_1 to 710_(M*N) may include a plurality of blocks B1 to BK. During the super block configuration process, the flash memory controller 122 may configure the block B1 in all the logical units 710_1 to 710_(M*N) as a super block 810_1, configure the block B2 in all the logical units 710_1 to 710_(M*N) as a super block 810_2, configure the block B3 in all the logical units 710_1 to 710_(M*N) as a super block 810_3, ..., and configure the block BK in all the logical units 710_1 to 710_(M*N) as a super block 810_K. The super block is a logical collection block set by the flash memory controller 122 to facilitate the management of the storage device 120_1, and is not a physical collection block. Figure 8In the embodiment, the super block 810_1 may include M*N blocks B1, and when accessing the super block 810_1, the flash memory controller 122 may regard the super block 810_1 as a normal block. For example, the super block 810_1 itself is an erase unit, that is, although the M*N blocks B1 of the super block 810_1 can be erased individually, the flash memory controller 110 still needs to erase the M*N blocks B1 together. In this embodiment, the flash memory controller 122 may temporarily determine an area equal to the size of a super block.
[0063] Fig. 9 Schematic diagram of super page configuration of a flash memory module according to an embodiment of the present invention. Taking super block 810_1 as an example, each block B1 may include multiple pages P1-PA. During super page configuration, the flash memory controller 122 may configure the page P1 of the block B1 of all logical units 710_1-710_(M*N) as a super page 910_1, configure the page P2 of the block B1 of all logical units 710_1-710_(M*N) as a super page 910_2, configure the page P3 of the block B1 of all logical units 710_1-710_(M*N) as a super page 910_3, ..., and configure the page PA of the block B1 of all logical units 710_1-710_(M*N) as a super page 910_A. In addition, for the data write operation of the super block 810_1 , the super pages 910_1 - 910_A are written sequentially by the flash memory controller 122 . In other words, the flash memory controller 122 will not start the data write operation of the super page 910_2 until the data write operation of the super page 910_1 is completed.
[0064] After the configuration of the flash memory module 124 is completed, the flash memory controller 122 may generate parameter information, wherein the parameter information includes a region size (i.e., the size of a super block), a block size, a page size, a super page size, the number of pages in a block, the number of logical units corresponding to a super block, and the number of regions supported by the flash memory module 124 (i.e., the number of super blocks in the partition namespace, e.g., Figure 8 The value “K” in the
[0065] In step 606 , the flash memory controller 122 transmits the parameter information to the host device 110 .
[0066] In step 608, the host device receives parameter information from the flash memory controller 122 and uses the parameter information to set the region. For example, when transmitting data of the region, the host device 110 directly uses the region size (ie, the size of a super block) provided by the flash memory controller 122 as subsequent settings.
[0067] exist Figures 6 to 9 In the illustrated embodiment, the flash memory controller 122 is used to actively detect the number of channels of the flash memory module 124 to determine the region size with the best performance or the best bandwidth, and the flash memory controller 122 directly notifies the host device 110 to use the region size for subsequent region settings and data transmission. The host device 110 can access the storage device 120_1 with better efficiency and performance.
[0068] Fig.10 FIG. 4 is a flow chart of an initialization procedure of a storage device according to a second embodiment of the present invention.
[0069] In step 1000 , the process starts and the flash memory module 124 has not yet started to be configured.
[0070] In step 1002 , the host device 110 starts to boot up the storage device 120_1 , and transmits a configuration command set to the flash memory controller 122 .
[0071] In step 1004 , the flash memory controller 122 transmits a plurality of configuration settings to the host device 110 , wherein the plurality of configuration settings include at least two different region sizes.
[0072] In one embodiment, a configuration setting in the plurality of configuration settings may be Figure 8 The superblock configuration shown and Fig. 9 The super page configuration shown in FIG. 1 may include a region size (super block size) equal to M*N blocks. In addition, the configuration setting may further include a block size, a page size, a super page size, the number of pages in a block, the number of logical units corresponding to a super fast, and the number of regions supported by the flash memory module 124 (e.g., Figure 8 The value “K” in the
[0073] In one embodiment, the plurality of configuration settings may have a super block configuration corresponding to only a portion of the plurality of channels. Fig.11For example, each of the logic units 710_1 to 710_(M*N / 2) corresponding to the channels CH_1 to CH_(N / 2) may include a plurality of blocks B1 to BK. During the super block configuration, the flash memory controller 122 may configure the block B1 of all the logic units 710_1 to 710_(M*N / 2) as a super block 1110_1, configure the block B2 of all the logic units 710_1 to 710_(M*N / 2) as a super block 1110_2, configure the block B3 of all the logic units 710_1 to 710_(M*N / 2) as a super block 1110_3, ..., and configure the block BK of all the logic units 710_1 to 710_(M*N / 2) as a super block 1110_K. In addition, each of the logic units 710_(M*N / 2+1)~710_(M*N) corresponding to the channels CH_(N / 2+1)~CH_(N) may include a plurality of blocks B1~BK, and the flash memory controller 122 may configure the block B1 in all the logic units 710_(M*N / 2+1)~710_(M*N) as a super block 1120_1, configure the block B2 in all the logic units 710_(M*N / 2+1)~710_(M*N) as a super block 1120_2, configure the block B3 in all the logic units 710_(M*N / 2+1)~710_(M*N) as a super block 1120_3, ..., and configure the block BK in all the logic units 710_(M*N / 2+1)~710_(M*N) as a super block 1120_K. exist Fig.11 In the embodiment, the super block 1110_1 includes M*N / 2 blocks B1, and when accessing the super block 1110_1, the flash memory controller 122 may regard the super block 1110_1 as a normal block. For example, the super block 1110_1 itself is an erase unit, that is, although the M*N / 2 blocks B1 of the super block 1110_1 can be erased individually, the flash memory controller 122 needs to erase the M*N / 2 blocks B1 together. In this embodiment, the flash memory controller 122 may temporarily determine an area equal to the size of a super block.
[0074] Fig.12FIG. 1 is a schematic diagram of super page configuration of a flash memory module according to another embodiment of the present invention. Taking super block 1110_1 as an example, each of the multiple blocks B1 may include multiple pages P1-PA. During the super page configuration, the flash memory controller 122 may configure the page P1 of the block B1 of all the logical units 710_1-710_(M*N / 2) as super page 1210_1, configure the page P2 of the block B1 of all the logical units 710_1-710_(M*N / 2) as super page 1210_2, configure the page P3 of the block B1 of all the logical units 710_1-710_(M*N / 2) as super page 1210_3, ..., and configure the page PA of the block B1 of all the logical units 710_1-710_(M*N / 2) as super page 1210_A. In addition, for data writing of super block 1110_1, super pages 1210_1-1210_A are written sequentially by the flash memory controller 122, that is, the flash memory controller 122 will not start writing data of super page 1210_2 until the data writing of super page 1210_1 is completed.
[0075] In this embodiment, a configuration setting among the plurality of configuration settings may be Fig.10 The superblock configuration shown and Fig.11 The super page configuration shown in FIG. 1 may include a region size equal to M*N / 2 blocks (e.g., the size of a super block). In addition, the configuration setting may further include a block size, a page size, a super page size, the number of pages in a block, the number of logical units corresponding to a super block, the number of regions supported by the flash memory module 124 (i.e., "2K", where "K" is the number of regions supported by the flash memory module 124). Figure 8 The values shown).
[0076] In some embodiments, the plurality of configuration settings may have super block configurations corresponding to different channels. For example, each super block may include blocks of 2 or 3 channels, that is, the area size may be equal to 2*M blocks or 3*M blocks.
[0077] In step 1006, after receiving the plurality of configuration settings from the flash memory controller 122, the host device 110 may select one of the plurality of configuration settings according to its own application. For example, if the host device 110 writes data to the storage device 120_1 via consecutive logical addresses, the host device 110 may select a configuration setting with a higher bandwidth (e.g. Figure 8 and Fig. 9and if the host device 110 writes random data to the storage device 120_1, the host device 110 may select a configuration setting with a smaller bandwidth (eg Fig.11 and Fig.12 Then, the host device 110 may send a response indicating which of the plurality of configuration settings is to be selected by the flash memory controller 122.
[0078] In step 1008, the flash memory controller 122 receives the response from the host device 110 and begins to configure the flash memory module 124 using the selected configuration setting. For example, if the host device 110 selects a configuration setting with a region size equal to M*N blocks, the flash memory controller 122 may configure the flash memory module 124 as Figure 8 and Fig. 9 If the host device 110 selects a configuration setting in which the region size is equal to M*N / 2 blocks, the flash memory controller 122 may configure the flash memory module 124 as Fig.11 and Fig.12 The embodiment shown.
[0079] exist Figures 10 to 12 In the embodiment shown, by using the flash memory controller 122 to provide multiple configuration settings, the host device 110 can select the most suitable configuration setting based on its own application for the flash memory controller 122 to perform super block configuration and super page configuration. Therefore, the host device 110 can access the storage device 120_1 with better efficiency and performance.
[0080] Fig.13 FIG. 4 is a flow chart of an initialization procedure of a storage device according to a third embodiment of the present invention.
[0081] In step 1300 , the process starts and the flash memory module 124 has not yet started to be configured.
[0082] In step 1302 , the host device 110 starts to activate the storage device 120_1 and transmits a configuration command set to the flash memory controller 122 .
[0083] In step 1304, the flash memory controller 122 begins to configure the flash memory module 124 based on an optimal performance or bandwidth setting to generate parameter information. For example, the flash memory controller 122 may configure the flash memory module 124 to Figure 8 and Fig. 9After completing the configuration of the flash memory module 124, the flash memory controller 122 may generate parameter information, wherein the parameter information includes a region size (i.e., the size of a super block), a block size, a page size, a super page size, the number of pages in a block, the number of logical units corresponding to a super block, the number of regions supported by the flash memory module 124 (i.e., the size of a super block), and the number of logical units corresponding to a super block. Figure 8 The value "K" is shown).
[0084] In step 1306 , the flash memory controller 122 may transmit the parameter information to the host device 110 .
[0085] In step 1308, the flash memory controller 122 may transmit a plurality of configuration settings to the host device 110, wherein the plurality of configuration settings may include at least two different region sizes, and the contents of the plurality of configuration settings may refer to the above Fig.10 The embodiment shown.
[0086] In step 1310 , the host device 110 may determine whether to directly use the parameter information or select a configuration setting whose area size is different from the parameter information. If the host device 110 selects one of the multiple configuration settings, then the process proceeds to step 1312 ; otherwise, the process proceeds to step 1314 .
[0087] In step 1312, the host device 110 may transmit a response indicating which of the plurality of configuration settings is to be selected by the flash memory controller 122, and the flash memory controller 112 may format the partition namespace (e.g., partition namespace 410_1) and configure the partition namespace of the flash memory module 124 using the selected configuration setting. For example, Figure 8 The superblock configuration shown is formatted and Fig.11 The new superblock configuration is shown.
[0088] In step 1314, the host device 110 receives parameter information from the flash memory controller 122 and uses the parameter information to set the region. For example, when transmitting data of the region, the host device 110 directly uses the region size (such as the size of a super block) provided by the flash memory controller 122 as subsequent settings.
[0089] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A control method of a flash memory controller, wherein the flash memory controller is used to access a flash memory module, the flash memory module includes a plurality of blocks, and the control method includes: receiving a configuration command from a host device; In response to the set command, at least a portion of the flash memory module is configured as a partition namespace, wherein the partition namespace logically includes a plurality of regions, the host device performs a region-based data write operation on the partition namespace, each of the plurality of regions has a same size, a plurality of logical addresses corresponding to each of the regions are continuous, and the plurality of logical addresses do not overlap between the plurality of regions; generating parameter information according to a configuration of the partition namespace; as well as The parameter information is transmitted to the host device so that the host device uses the parameter information to set the plurality of areas.
2. The control method according to claim 1, characterized in that: The parameter information includes a region size of each region.
3. The control method according to claim 2, characterized in that: The step of configuring at least a portion of the flash memory module as the partition namespace comprises: The partition namespace is configured to have a plurality of super blocks, wherein each of the plurality of super blocks includes a plurality of blocks respectively located in different logical units; as well as The size of the region is determined to be equal to a size of each super block.
4. The control method according to claim 3, characterized in that: The flash memory controller is used to access the flash memory module through a plurality of channels, and each of the plurality of channels corresponds to a plurality of logic units respectively enabled by using a plurality of chip enable signals; And each of the super blocks includes the multiple blocks respectively located in all the multiple logical units.
5. The control method according to claim 1, characterized in that: Also included: transmitting a plurality of configuration settings to the host device; receiving a response indicating which of the plurality of configuration settings is to be selected; If the selected configuration setting is different from a current configuration of the partition namespace, formatting the partition namespace; as well as The partition namespace is configured using the selected configuration settings.
6. The control method according to claim 5, characterized in that: The plurality of configuration settings have at least two different region sizes.
7. A flash memory controller, wherein the flash memory controller is used to access a flash memory module, the flash memory module includes a plurality of blocks, and the flash memory controller includes: A read-only memory for storing a program code; as well as a microprocessor for executing the program code to control access to the flash memory module; The microprocessor is also used for: receiving a configuration command from a host device; In response to the set command, at least a portion of the flash memory module is configured as a partition namespace, wherein the partition namespace logically includes a plurality of regions, the host device performs a region-based data write operation on the partition namespace, each of the plurality of regions has a same size, a plurality of logical addresses corresponding to each of the regions are continuous, and the plurality of logical addresses do not overlap between the plurality of regions; generating parameter information according to a configuration of the partition namespace; as well as The parameter information is transmitted to the host device so that the host device uses the parameter information to set the plurality of areas.
8. The flash memory controller according to claim 7, wherein: The parameter information includes a region size of each region.
9. The flash memory controller according to claim 8, wherein: The step of configuring at least a portion of the flash memory module as the partition namespace comprises: The partition namespace is configured to have a plurality of super blocks, wherein each of the plurality of super blocks includes a plurality of blocks respectively located in different logical units; as well as The size of the region is determined to be equal to a size of each super block.
10. The flash memory controller according to claim 9, wherein: The flash memory controller is used to access the flash memory module through a plurality of channels, and each of the plurality of channels corresponds to a plurality of logic units respectively enabled by using a plurality of chip enable signals; And each of the super blocks includes the multiple blocks respectively located in all the multiple logical units.
11. The flash memory controller according to claim 7, wherein: The microprocessor is also used to: transmitting a plurality of configuration settings to the host device; receiving a response indicating which of the plurality of configuration settings is to be selected; If the selected configuration setting is different from a current configuration of the partition namespace, formatting the partition namespace; as well as The partition namespace is configured using the selected configuration settings.
12. The flash memory controller according to claim 11, wherein: The plurality of configuration settings have at least two different region sizes.
13. A storage device comprising: a flash memory module comprising a plurality of blocks; and a flash memory controller for accessing the flash memory module; The flash memory controller is further used for: receiving a configuration command from a host device; In response to the set command, at least a portion of the flash memory module is configured as a partition namespace, wherein the partition namespace logically includes a plurality of regions, the host device performs a region-based data write operation on the partition namespace, each of the plurality of regions has a same size, a plurality of logical addresses corresponding to each of the regions are continuous, and the plurality of logical addresses do not overlap between the plurality of regions; generating parameter information according to a configuration of the partition namespace; as well as The parameter information is transmitted to the host device so that the host device uses the parameter information to set the plurality of areas.
14. The storage device according to claim 13, characterized in that The parameter information includes a region size of each region.
15. The storage device according to claim 14, characterized in that The step of configuring at least a portion of the flash memory module as the partition namespace comprises: The partition namespace is configured to have a plurality of super blocks, wherein each of the plurality of super blocks includes a plurality of blocks respectively located in different logical units; as well as The size of the region is determined to be equal to a size of each super block.
16. The storage device according to claim 15, characterized in that The flash memory controller is used to access the flash memory module through a plurality of channels, and each of the plurality of channels corresponds to a plurality of logic units respectively enabled by using a plurality of chip enable signals; And each of the super blocks includes the multiple blocks respectively located in all the multiple logical units.
17. The storage device according to claim 13, characterized in that The flash memory controller is further used to: transmitting a plurality of configuration settings to the host device; receiving a response indicating which of the plurality of configuration settings is to be selected; If the selected configuration setting is different from a current configuration of the partition namespace, formatting the partition namespace; as well as The partition namespace is configured using the selected configuration settings.
18. The storage device according to claim 17, characterized in that The plurality of configuration settings have at least two different region sizes.
