Control method of flash memory controller, flash memory controller and memory device

By using the read count and timestamp in the flash memory controller to determine the read frequency and time difference of the block, and using the mapping table to decide whether to perform garbage collection, the problem of data errors caused by read interference in the flash memory is solved. Improved memory read performance and data accuracy.

CN118732939APending Publication Date: 2024-10-01SILICON MOTION INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410350943.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-30
Filing Date
2024-03-26
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The threshold voltage distribution of memory cells in flash memory changes due to read interference, which may lead to data errors. It is difficult for existing technology to effectively identify and handle this interference.

Method used

By using the read count and timestamp in the flash memory controller to determine whether the block requires garbage collection, use the read count and threshold time mapping table to determine the read frequency and time difference of the block, and decide whether to Arrange it in the garbage collection pool.

Benefits of technology

Effectively identify and process blocks that may encounter read interference, reduce data errors, and improve memory read performance and data accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118732939A_ABST
    Figure CN118732939A_ABST
Patent Text Reader

Abstract

The invention relates to a control method of a flash memory controller, the flash memory controller and a memory device. The control method comprises the following steps: obtaining a read count of a specific block; obtaining a time stamp of the specific block, wherein the time stamp is a write-in time of the specific block; calculating a time difference between a current system time and the time stamp of the specific block; and determining whether to arrange the specific block in a garbage collection pool by using the read count of the specific block and the time difference and referring to a read count and threshold time mapping table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to flash memory, and more particularly to a control method of a flash memory controller, which can determine blocks that may encounter read disturbance problems and arrange these blocks for garbage collection operations, and related devices. Background Art

[0002] Flash memory can be used to store data through electronic erasure and writing / programming, and is widely used in memory cards, solid-state hard drives, portable multimedia players, etc. Since flash memory is a non-volatile memory, no additional power is required to maintain the content stored in the flash memory. In addition, flash memory provides high-speed data access and excellent vibration resistance, which is the reason why flash memory is popular.

[0003] Flash memory can be classified into two categories: NOR flash memory and NAND flash memory. For the latter, the erase time and programming time are shorter, and the die size of each memory cell is smaller. Therefore, compared with NOR flash memory, NAND flash memory has a higher storage density per bit and a lower cost. Generally speaking, a flash memory includes a memory cell array, wherein each memory cell is actually implemented by a floating gate transistor, and the threshold voltage of the memory cell is configured by appropriately controlling the amount of charge in the floating gate of the floating gate transistor to store single-bit data or multi-bit data. Therefore, when one or more predetermined control gate voltages are applied to the control gate of the floating gate transistor, the conduction state of the floating gate transistor indicates one or more binary digits stored in the floating gate transistor.

[0004] However, due to some reasons, the original charge quantity of the flash memory may be affected / disturbed, for example, the disturbance mainly comes from retention disturbance and read disturbance, and the charge quantity stored in the flash memory may change due to high temperature. Therefore, the threshold voltage distribution of the memory cell of the flash memory may change due to the influence of retention time and / or temperature, and since the threshold voltage distribution may be different from the original threshold voltage, the data read from the memory cell may be wrong. Summary of the invention

[0005] Therefore, one of the objectives of the present invention is to provide a control method for a flash memory controller, which can determine blocks that may encounter read disturbance problems and arrange these blocks for garbage collection operations to solve the above-mentioned problem.

[0006] According to one 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, and the flash memory module includes a plurality of blocks. The control method includes: obtaining a read count of a specific block; obtaining a timestamp of the specific block, wherein the timestamp is a write time of the specific block; calculating a time difference between a current system time and the timestamp of the specific block; and using the read count and the time difference of the specific block and referring to a read count and threshold time mapping table to determine whether to arrange the specific block in a garbage collection pool.

[0007] According to one embodiment of the present invention, a flash memory controller including a read-only memory and a microprocessor is provided, wherein the flash memory controller is used to access a flash memory module, and the flash memory module includes a plurality of blocks. The read-only memory is used to store a program code, and the microprocessor is used to execute the program code to control the access of the flash memory module. The microprocessor is used to: obtain a read count of a specific block; obtain a timestamp of the specific block, wherein the timestamp is a write time of the specific block; calculate a time difference between a current system time and the timestamp of the specific block; and use the read count and time difference of the specific block and refer to a read count and threshold time mapping table to determine whether to arrange the specific block in a garbage collection pool.

[0008] According to one embodiment of the present invention, a memory device including a flash memory module and a flash memory controller is provided. The flash memory module includes a plurality of blocks, and the flash memory controller is used to access the flash memory module. The flash memory controller is used to: obtain a read count of a specific block; obtain a timestamp of the specific block, wherein the timestamp is a write time of the specific block; calculate a time difference between a current system time and the timestamp of the specific block; and use the read count and time difference of the specific block and refer to a read count and threshold time mapping table to determine whether to arrange the specific block in a garbage collection pool. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 is a schematic diagram of an electronic device according to an embodiment of the present invention.

[0010] Figure 2 FIG. 4 is a schematic diagram of a flash memory module according to an embodiment of the present invention.

[0011] Figure 3 FIG. 4 is a schematic diagram of a reading counter table according to an embodiment of the present invention.

[0012] Figure 4FIG. 4 is a schematic diagram of a reading count and threshold time mapping table according to an embodiment of the present invention.

[0013] Figure 5 FIG. 4 is a flow chart of a control method of a memory device according to an embodiment of the present invention.

[0014] Figure 6 FIG. 4 is a flow chart of a control method of a memory device according to another embodiment of the present invention.

[0015]

Explanation of symbols

[0016] 10: Electronic devices

[0017] 50: Host device

[0018] 52: Processor

[0019] 54: Power supply circuit

[0020] 100: memory device

[0021] 110: Flash memory controller

[0022] 112: Microprocessor

[0023] 112C: Program code

[0024] 112M: Read-only memory

[0025] 114: Control logic circuit

[0026] 116: Random Access Memory

[0027] 118: Transmission interface circuit

[0028] 120: Flash memory module

[0029] 122-1~122-N: Flash memory chip

[0030] 132: Encoder

[0031] 134:Decoder

[0032] 136: Randomizer

[0033] 138:De-Randomizer

[0034] B1~BA: Block

[0035] P1~PM: Page

[0036] 300: Read the count table

[0037] 400: Read count and threshold time mapping table

[0038] 500~514,600~608: Steps DETAILED DESCRIPTION

[0039] Figure 1 1 is a schematic diagram of an electronic device 10 according to an embodiment of the present invention, wherein the electronic device 10 may include a host device 50 and a memory device 100. The host device 50 may include at least one processor (e.g., one or more processors, which may be collectively referred to as a processor 52), and may further include a power supply circuit 54 coupled to the processor 52. The processor 52 may be used to control the operation of the host device 50, and the power supply circuit 54 may be used to provide power to the processor 52 and the memory device 100, and output one or more driving voltages to the memory device 100. The memory device 100 may be used to provide storage space for the host device 50, and obtain the one or more driving voltages from the host device 50 as a power supply for the memory device 100. Examples of the host device 50 may include, but are not limited to: a multi-function mobile phone, a wearable device, a tablet computer, and a personal computer (e.g., a desktop computer and a notebook computer). Examples of the memory device 100 may include, but are not limited to, a solid state drive (SSD) and various types of embedded memory devices (e.g., embedded memory devices that comply with the Peripheral Component Interconnect Express (PCIe) specification). According to this embodiment, the memory device 100 may include a flash memory controller 110 and may further include a flash memory module 120, wherein the flash memory controller 110 may be used to control the operation of the memory device 100 and access the flash memory module 120, and the flash memory module 120 is used to store information. The flash memory module 120 may include at least one flash memory chip, such as a plurality of flash memory chips 122-1, 122-2, ..., 122-N, wherein "N" may represent a positive integer greater than 1.

[0040] like Figure 1 As shown, the flash memory controller 110 may include a processing circuit (eg, a microprocessor 112), a storage unit (eg, a read-only memory (ROM) 112M; for simplicity ... Figure 1 116 (denoted as "ROM" in FIG. 114 ), control logic circuit 114, random access memory (RAM) 116 (denoted as "ROM" in FIG. 116 for simplicity) Figure 1The random access memory 116 may be implemented by a static random access memory (SRAM), but the present invention is not limited thereto. The random access memory 116 may be used to provide internal storage space to the flash memory controller 110. For example, the random access memory 116 may be used as a buffer memory to buffer data. In addition, the read-only memory 112M of the present embodiment may be used to store program code 112C, and the microprocessor 112 may be used to execute the program code 112C to control the access of the flash memory module 120. It should be noted that, in some examples, the program code 112C may be stored in the random access memory 116 or any type of memory. In addition, the control logic circuit 114 can be used to control the flash memory module 120, and can include an encoder 132, a decoder 134, a randomizer 136, a de-randomizer 138, and other circuits. The transmission interface circuit 118 can comply with a specific communication specification (such as the Serial Advanced Technology Attachment (SATA) specification, the Peripheral Component Interconnect (PCI) specification, the Peripheral Component Interconnect Express specification, and the Universal Flash Storage (UFS) specification), and can communicate according to the specific communication specification. For example, the memory device 100 can communicate with the host device 50, wherein the host device 50 can include a corresponding transmission interface circuit that complies with the specific communication specification for the host device 50 to communicate with the memory device 100.

[0041] In the present embodiment, the host device 50 may transmit a host command and a corresponding logical address to the flash memory controller 110 to access the memory device 100. The flash memory controller 110 receives the host command and the logical address, converts the host command into a memory operation command (which may be simply referred to as an operation command), and further controls the flash memory module 120 through the operation command to perform operations such as reading, writing, and programming on memory cells (e.g., data pages) in the flash memory module 120 having certain physical addresses, wherein the physical addresses correspond to the logical addresses. When the flash memory controller 110 performs an erase operation on any flash memory chip 122-n among the multiple flash memory chips 122-1, 122-2, ... and 122-N (where "n" can represent any integer in the interval [1, N]), at least one block among the multiple blocks of the flash memory chip 122-n can be erased, wherein each of the multiple blocks can include multiple pages (e.g., multiple data pages), and an access operation (e.g., reading or writing) can be performed on one or more pages.

[0042] Figure 2 FIG. 1 is a schematic diagram of a flash memory module 120 according to an embodiment of the present invention. Figure 2 As shown, the flash memory module 120 may include a plurality of blocks (e.g., A blocks B1-BA), wherein each of the blocks B1-BA may include a plurality of pages (e.g., M pages P1-PM). In addition, when the flash memory controller 110 writes data into a block (e.g., block B1), the data is sequentially written into the pages P1-PM, and a time stamp representing the writing time is also written into a last page PM of the block B1.

[0043] The flash memory controller 110 has a read count table temporarily stored in the random access memory 116 . Figure 3 FIG. 3 is a schematic diagram of a read count table 300 according to an embodiment of the present invention. Figure 3As shown, the read count table 300 can record the serial numbers of blocks B1-BA and the corresponding read counts, wherein the read count is the number of times data is read from the corresponding memory block. When the read count of a block is higher, it means that there may be a more serious threshold voltage shift phenomenon. However, after multiple tests on the flash memory module 120, the applicant found that infrequent reading of blocks will cause serious threshold voltage shift, while frequent reading of blocks will only cause slight threshold voltage shift. Therefore, based on the above characteristics of the flash memory module 120, the applicant proposes a method for controlling the flash memory module 120, which can effectively determine the blocks with serious threshold voltage shift to avoid subsequent reading problems that may occur.

[0044] Specifically, the flash memory controller 110 may establish a read count and threshold time mapping table according to the plurality of measurement results, wherein the read count and threshold time mapping table is temporarily stored in the random access memory 116 . Figure 4 FIG. 4 is a schematic diagram of a reading count and threshold time mapping table 400 according to an embodiment of the present invention. Figure 4 As shown, the reading count and threshold time mapping table 400 may include multiple reading counts and corresponding multiple threshold times. For example, 10 million readings correspond to 4 months, 1 million readings correspond to 3 months, 30,000 readings correspond to 1 month, etc. It should be noted that Figure 4 The values ​​shown are for illustration purposes only and the present invention is not limited thereto. As long as more reading times correspond to longer threshold times, the values ​​in the table can be determined based on the measurement results.

[0045] Figure 5 FIG. 1 is a flow chart of a control method of the memory device 100 according to an embodiment of the present invention.

[0046] In step 500 , the process starts and the memory device 100 is started.

[0047] In step 502 , the flash memory controller 110 receives a read command including a logical address from the host device 50 , wherein the read command requires data corresponding to the logical address.

[0048] In step 504, after receiving the read command from the host device 50, the microprocessor 112 refers to a logical-to-physical (L2P) address mapping table to determine a physical address corresponding to the logical address in the read command, wherein the physical address includes a block address (e.g., a block number) and a page address.

[0049] In step 506 , the microprocessor 112 transmits a read command including the physical address to the flash memory module 120 via the control logic circuit 114 .

[0050] In step 508 , the flash memory module 120 reads data in one or more pages of a block using a physical address, reads a time stamp in the block, and transmits the data and the time stamp to the flash memory controller 110 .

[0051] In step 510, after receiving the data and the timestamp from the flash memory module 120, the microprocessor 112 updates the read count table 300 according to the physical address obtained in step 504. Specifically, if the physical address obtained in step 504 includes block B1, the microprocessor 112 updates the read count table 300 to increase the read count of block B1.

[0052] In step 512, the microprocessor 112 retrieves a system time from the host device 50, that is, the microprocessor 112 may receive a current system time from the host device 50 through a specific pin, or the microprocessor 112 may send a request to the host device 50 to request the current system time. Then, the microprocessor 112 calculates a time difference between the current system time and the timestamp.

[0053] In step 514, the microprocessor 112 uses the updated read count of the block in step 510 and the time difference obtained in step 512 and refers to the read count and threshold time mapping table 400 to determine whether to arrange the block in a garbage collection pool. Figure 4 , if the updated read count of block B1 is greater than 10 million, the threshold time "4 months" corresponding to the read count of 10 million is selected. If the time difference between the current system time and the timestamp of block B1 reaches 4 months, block B1 will be arranged in the garbage collection pool, that is, when the memory device 100 has an idle state (that is, the flash memory controller 110 does not receive a read / write command from the host device 50), the valid data in block B1 will be moved to another block. If the updated read count of block B1 is greater than 10 million, but the time difference between the current system time and the timestamp of block B1 does not reach 4 months, block B1 will not be arranged in the garbage collection pool.

[0054] exist Figure 5In the embodiment shown, since the flash memory controller 110 can use the read count of the block and the time difference between the current system time and the timestamp of the block and refer to the read count and threshold time mapping table 400 to determine whether to arrange the block in the garbage collection pool, the blocks that are not frequently read (which have serious threshold voltage deviations) will be selected and placed in the garbage collection pool, while the blocks that are frequently read (which have slight threshold voltage deviations) will not be selected for garbage collection operations. In this way, the blocks of the flash memory module 120 can have better quality to improve the reading performance.

[0055] Figure 6 FIG. 4 is a flow chart of a control method of the memory device 100 according to another embodiment of the present invention.

[0056] In step 600 , the process starts and the memory device 100 is started.

[0057] In step 602 , the flash memory controller 110 receives a read command including a logical address from the host device 50 , wherein the read command requires data corresponding to the logical address.

[0058] In step 604 , after receiving the read command from the host device 50 , the microprocessor 112 refers to a logical to physical address mapping table to determine a physical address corresponding to the logical address in the read command, wherein the physical address includes a block address (eg, block number) and a page address.

[0059] In step 606, the microprocessor 112 retrieves a system time from the host device 50, that is, the microprocessor 112 may receive a current system time from the host device 50 through a specific pin, or the microprocessor 112 may send a request to the host device 50 to request the current system time. In addition, the microprocessor 112 may also establish a table that records all blocks and the time stamps of these blocks, so that the microprocessor 112 can refer to the table to obtain the time stamp of the block. Then, the microprocessor 112 calculates a time difference between the current system time and the time stamp.

[0060] In step 608, the microprocessor 112 refers to the read count table 300 to obtain the read count of the block, and uses the read count and time difference of the block and refers to the read count and threshold time mapping table 400 to determine whether to arrange the block in the garbage collection pool. Figure 4, when block B2 is to be read and the threshold time "3 months" corresponding to a read count of 1 million is selected, if the read count of block B2 is between 1 million and 10 million, and the time difference between the current system time and the timestamp of block B2 reaches 3 months, block B2 is arranged in the garbage collection pool, that is, when the memory device 100 has an idle state (that is, the flash memory controller 110 does not receive a read / write command from the host device 50), the valid data in block B2 will be moved to another block. If the read count of block B2 is greater than 1 million, but the time difference between the current system time and the timestamp of block B2 does not reach 3 months, block B2 will not be arranged in the garbage collection pool.

[0061] In addition, the program / erase (P / E) count of the block can be adjusted. Figure 4 In one embodiment, if the block has a lower program / erase count (e.g., a program / erase count less than 100 times), the flash memory controller 110 may directly use the read count and threshold time mapping table 400 to determine an appropriate threshold time for the block read in response to the read command. If the block has a higher program / erase count (e.g., a program / erase count greater than 100 times), a lower threshold time is required for the block read in response to the read command. For example, if the block read in response to the read command has a read count greater than 10 million times, and the program / erase count of the block is greater than 100, the flash memory controller 110 may Figure 4 The threshold time "4 months" in is adjusted to "3.5 months", or the threshold time "3.5 months" can be obtained based on another read count and threshold time mapping table specially used for blocks with higher program / erase counts.

[0062] 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 comprises: Obtaining a read count of a specific block; Obtaining a timestamp of the specific block, wherein the timestamp is a writing time of the specific block; Calculating a time difference between a current system time and the timestamp of the specific block; and The read count and the time difference of the specific block are used and a read count and threshold time mapping table is referred to determine whether to arrange the specific block in a garbage collection pool.

2. The control method according to claim 1, It is characterized in that The steps of using the read count and the time difference of the specific block and referring to the read count and threshold time mapping table to determine whether to arrange the specific block in the garbage collection pool include: Selecting a threshold time from the reading count and threshold time mapping table using the reading count of the specific block; Determine whether the time difference reaches the threshold time; In response to the time difference reaching the threshold time, arranging the specific block in the garbage collection pool; as well as Because the time difference does not reach the threshold time, the specific block is not arranged in the garbage collection pool.

3. The control method according to claim 2, It is characterized in that The reading count and threshold time mapping table includes a plurality of reading counts and a plurality of corresponding threshold times, and more reading counts correspond to longer threshold times.

4. The control method according to claim 1, It is characterized in that Also included: receiving a read command from a host device, wherein the read command includes a logical address; and Using the logical address and referring to a logical to physical address mapping table, a physical address including a block address of the specific block is determined; The step of obtaining the read count of the specific block includes: A read count table is referenced to determine the read count for the specific block.

5. The control method according to claim 1, It is characterized in that Also included: Receiving a first read command from a host device, wherein the first read command includes a logical address; Using the logical address and referring to a logical to physical address mapping table, a physical address including a block address of the specific block is determined; Sending a second read command to the flash memory module, wherein the second read command includes the physical address; receiving data of the specific block from the flash memory module; as well as updating a read count table to add one to the read count of the specific block to generate an updated read count table; The step of obtaining the read count of the specific block includes: The updated read count table is referenced to determine the read count of the specific block.

6. 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 used to store a program code ; as well as a microprocessor for executing the program code to control access to the flash memory module; The microprocessor is used to: Obtaining a read count of a specific block; Obtaining a timestamp of the specific block, wherein the timestamp is a writing time of the specific block; Calculating a time difference between a current system time and the timestamp of the specific block; as well as The read count and the time difference of the specific block are used and a read count and threshold time mapping table is referred to determine whether to arrange the specific block in a garbage collection pool.

7. The flash memory controller according to claim 6, It is characterized in that The steps of using the read count and the time difference of the specific block and referring to the read count and threshold time mapping table to determine whether to arrange the specific block in the garbage collection pool include: Selecting a threshold time from the reading count and threshold time mapping table using the reading count of the specific block; Determine whether the time difference reaches the threshold time; In response to the time difference reaching the threshold time, arranging the specific block in the garbage collection pool; as well as Because the time difference does not reach the threshold time, the specific block is not arranged in the garbage collection pool.

8. The flash memory controller according to claim 7, It is characterized in that The reading count and threshold time mapping table includes a plurality of reading counts and a plurality of corresponding threshold times, and more reading counts correspond to longer threshold times.

9. The flash memory controller as claimed in claim 6, wherein at one point, the microprocessor is further used for: receiving a read command from a host device, wherein the read command includes a logical address; and Using the logical address and referring to a logical to physical address mapping table, a physical address including a block address of the specific block is determined; The step of obtaining the read count of the specific block includes: A read count table is referenced to determine the read count for the specific block.

10. The flash memory controller according to claim 6, It is characterized in that The microprocessor is also used to: Receiving a first read command from a host device, wherein the first read command includes a logical address; Using the logical address and referring to a logical to physical address mapping table, a physical address including a block address of the specific block is determined; Sending a second read command to the flash memory module, wherein the second read command includes the physical address; receiving data of the specific block from the flash memory module; as well as updating a read count table to add one to the read count of the specific block to generate an updated read count table; The step of obtaining the read count of the specific block includes: The updated read count table is referenced to determine the read count of the specific block.

11. A memory 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 used to: Obtaining a read count of a specific block; Obtaining a timestamp of the specific block, wherein the timestamp is a writing time of the specific block; Calculating a time difference between a current system time and the timestamp of the specific block; as well as The read count and the time difference of the specific block are used and a read count and threshold time mapping table is referred to determine whether to arrange the specific block in a garbage collection pool.

12. The memory device of claim 11, It is characterized in that The step of utilizing the read count and the time difference of the specific block and referring to the read count and threshold time mapping table to determine whether to arrange the specific block in the garbage collection pool includes: Selecting a threshold time from the reading count and threshold time mapping table using the reading count of the specific block; Determine whether the time difference reaches the threshold time; In response to the time difference reaching the threshold time, arranging the specific block in the garbage collection pool; as well as Because the time difference does not reach the threshold time, the specific block is not arranged in the garbage collection pool.

13. The memory device of claim 12, It is characterized in that The reading count and threshold time mapping table includes a plurality of reading counts and a plurality of corresponding threshold times, and more reading counts correspond to longer threshold times.

14. The memory device of claim 11, It is characterized in that The flash memory controller is further used to: receiving a read command from a host device, wherein the read command includes a logical address; and Using the logical address and referring to a logical to physical address mapping table, a physical address including a block address of the specific block is determined; The step of obtaining the read count of the specific block includes: A read count table is referenced to determine the read count for the specific block.

15. The memory device of claim 11, It is characterized in that The flash memory controller is further used to: Receiving a first read command from a host device, wherein the first read command includes a logical address; Using the logical address and referring to a logical to physical address mapping table, a physical address including a block address of the specific block is determined; Sending a second read command to the flash memory module, wherein the second read command includes the physical address; receiving data of the specific block from the flash memory module; as well as updating a read count table to add one to the read count of the specific block to generate an updated read count table; The step of obtaining the read count of the specific block includes: The updated read count table is referenced to determine the read count of the specific block.