Memory control method and memory storage device
By classifying the number and operation type of the NAND flash memory entity unit in the memory control method, the problem of decreased durability and reliability of the NAND flash memory memory, extending the service life of the memory and improving system performance and stability.
Patent Information
- Application Number
- CN202411440164.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-15
AI Technical Summary
With the thinning of the thickness of the internal oxide layer of NAND flash memory, the impact of erasing operations on the storage medium increases, resulting in a decrease in the durability and reliability of the memory. How to effectively manage NAND flash memory has become a core topic.
By classifying the number of executions and operation types of the solid unit in the memory control method, judge the type and make the corresponding mark, avoid error marks, and extend the service life of the memory.
On the basis of ensuring data reliability, the service life of the memory storage device is extended, and the overall performance and stability of the system will be improved, and a smoother and reliable experience experience is provided.
Smart Images

Figure CN119376625A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a memory control method and a memory storage device. Background Art
[0002] In recent years, with the rapid advancement of electronic product technology, consumers have increasingly higher requirements for the experience of electronic storage products, and the market demand for higher speed and more convenient storage solutions is also growing. NAND flash memory (FLASH) has shown outstanding advantages in mobile applications such as mobile phones and smart sensor devices due to its non-volatility, low power consumption, compact design, no moving parts, and fast read and write speeds.
[0003] With the rapid evolution of flash memory technology, NAND flash memory has undergone a transformation from two-dimensional (2D) to three-dimensional (3D), and in terms of storage units, it has also gradually evolved from single-layer storage units (SLC) to three-layer (TLC) and even four-layer (QLC) storage units. This series of technological innovations has greatly improved the storage density of NAND flash memory and reduced the cost per unit capacity. However, as the thickness of the oxide layer inside the flash memory continues to decrease, the impact of the erase and write operation on the storage medium has become more significant, thus affecting the durability and reliability of the flash memory.
[0004] In view of this, how to effectively manage NAND flash memory has become one of the core topics of concern to engineers in the industry. Summary of the invention
[0005] The exemplary embodiments of the present invention provide a memory control method and a memory storage device, which can extend the service life of the memory storage device while ensuring data reliability, and can further improve the overall performance and stability of the system, ensuring that users have a smoother and more reliable user experience.
[0006] An exemplary embodiment of the present invention provides a memory control method for a rewritable non-volatile memory module. The rewritable non-volatile memory module includes a plurality of physical units, and the plurality of physical units are respectively marked as a first type, a second type, a third type, or a fourth type. The memory control method includes: when an error occurs in a target operation performed on a first physical unit, obtaining the number of executions of the first physical unit; if the number of executions and the operation type of the target operation indicate that the first physical unit meets a first preset condition, determining whether the first physical unit is of the third type; if the first physical unit is not of the third type and the number of executions indicates that the first physical unit meets a second preset condition, determining whether the first physical unit is of the second type; and if the first physical unit is not of the second type, marking the first physical unit as the second type.
[0007] In an exemplary embodiment of the present invention, the first preset condition includes: the target operation is not a read operation, or the target operation is the read operation and the execution count is not greater than a read threshold, wherein the execution count is a read count.
[0008] In an exemplary embodiment of the present invention, the second preset condition includes: the execution number is not greater than an erasure threshold, wherein the execution number is an erasure number.
[0009] In an exemplary embodiment of the present invention, before the step of obtaining the execution number of the first physical unit, it also includes: determining whether the operating temperature or the operating voltage corresponding to the target operation is abnormal; and if at least one of the operating temperature and the operating voltage is abnormal, temporarily not marking the first physical unit.
[0010] In an exemplary embodiment of the present invention, the memory control method further includes: if the execution count and the operation type of the target operation indicate that the first physical unit does not satisfy the first preset condition, temporarily not marking the first physical unit.
[0011] In an exemplary embodiment of the present invention, the memory control method further includes: if the first physical unit is of the third type, marking the first physical unit as the fourth type.
[0012] In an exemplary embodiment of the present invention, the memory control method further includes: if the first physical unit is not of the third type and the execution number indicates that the first physical unit does not meet the second preset condition, marking the first physical unit as the third type.
[0013] In an exemplary embodiment of the present invention, the step of marking the first physical unit as the third type includes: determining whether the target operation is a read operation; if the target operation is a read operation, marking the first physical unit as the third type.
[0014] In an exemplary embodiment of the present invention, the memory control method further includes: if the target operation is not a read operation, marking the first physical unit as the fourth type.
[0015] In an exemplary embodiment of the present invention, the memory control method further includes: if the first physical unit is of the second type, marking the first physical unit as the third type.
[0016] In an exemplary embodiment of the present invention, the memory control method also includes: in an idle state, based on the access mode of the first physical unit marked as the second type, performing a target test operation on the first physical unit marked as the second type; and if the target test operation is successful, re-marking the first physical unit marked as the second type as the first type.
[0017] In an exemplary embodiment of the present invention, the memory control method further includes: if the target test operation fails and the access mode is a single-level memory cell access mode, marking the first physical cell marked as the second type as the fourth type.
[0018] In an exemplary embodiment of the present invention, the memory control method further includes: if the target test operation fails and the access mode is not the single-level memory cell access mode, marking the first physical cell marked as the second type as the third type.
[0019] In an exemplary embodiment of the present invention, the operation type is used to characterize that the target operation is an erase operation, a write operation, or a read operation.
[0020] In an exemplary embodiment of the present invention, the plurality of solid elements are initially all of the first type.
[0021] In an exemplary embodiment of the present invention, the first physical cell marked as the third type can only be used in a single-level memory cell access mode.
[0022] An exemplary embodiment of the present invention further provides a memory storage device, which includes a connection interface unit, a rewritable non-volatile memory module and a memory control circuit unit. The memory control circuit unit is coupled to the connection interface unit and the rewritable non-volatile memory module. The connection interface unit is used to couple to a host system. The rewritable non-volatile memory module includes a plurality of physical units, and the plurality of physical units are respectively marked as a first type, a second type, a third type or a fourth type. When an error occurs in a target operation performed on a first physical unit, the memory control circuit unit is used to obtain the number of executions of the first physical unit. If the number of executions and the operation type of the target operation indicate that the first physical unit meets a first preset condition, the memory control circuit unit is also used to determine whether the first physical unit is of the third type. If the first physical unit is not of the third type and the number of executions indicates that the first physical unit meets a second preset condition, the memory control circuit unit is also used to determine whether the first physical unit is of the second type. If the first physical unit is not of the second type, the memory control circuit unit is also used to mark the first physical unit as the second type.
[0023] In an exemplary embodiment of the present invention, before the step of obtaining the execution number of the first physical unit by the memory control circuit unit, the memory control circuit unit is further used to determine whether the operating temperature or the operating voltage corresponding to the target operation is abnormal. If at least one of the operating temperature and the operating voltage is abnormal, the memory control circuit unit is further used to temporarily not mark the first physical unit.
[0024] In an exemplary embodiment of the present invention, if the execution number and the operation type of the target operation indicate that the first physical unit does not meet the first preset condition, the memory control circuit unit is further configured to temporarily not mark the first physical unit.
[0025] In an exemplary embodiment of the present invention, if the first physical unit is of the third type, the memory control circuit unit is further configured to mark the first physical unit as the fourth type.
[0026] In an exemplary embodiment of the present invention, if the first physical unit is not of the third type and the execution number indicates that the first physical unit does not satisfy the second preset condition, the memory control circuit unit is further configured to mark the first physical unit as the third type.
[0027] In an exemplary embodiment of the present invention, the memory control circuit unit is further configured to determine whether the target operation is a read operation. If the target operation is a read operation, the memory control circuit unit is further configured to mark the first physical unit as the third type.
[0028] In an exemplary embodiment of the present invention, if the target operation is not a read operation, the memory control circuit unit is further configured to mark the first physical unit as the fourth type.
[0029] In an exemplary embodiment of the present invention, if the first physical unit is of the second type, the memory control circuit unit is further configured to mark the first physical unit as the third type.
[0030] In an exemplary embodiment of the present invention, in an idle state, the memory control circuit unit is further used to perform a target test operation on the first physical unit marked as the second type based on the access mode of the first physical unit marked as the second type. If the target test operation is successful, the memory control circuit unit is further used to re-mark the first physical unit marked as the second type as the first type.
[0031] In an exemplary embodiment of the present invention, if the target test operation fails and the access mode is a single-level memory cell access mode, the memory control circuit unit is further configured to mark the first physical cell marked as the second type as the fourth type.
[0032] In an exemplary embodiment of the present invention, if the target test operation fails and the access mode is not the single-level memory cell access mode, the memory control circuit unit is further configured to mark the first physical cell marked as the second type as the third type.
[0033] Based on the above, the present invention provides a memory control method and a memory storage device, which can temporarily not mark the physical unit corresponding to the target operation where the error occurs as a bad physical unit when the environmental factors are abnormal, so as to avoid the problem of mislabeling, and execute a classification management mechanism according to the actual usage status of the physical unit corresponding to the target operation where the error occurs, thereby extending the service life of the memory storage device while ensuring data reliability.
[0034] In order to make the above features and advantages of the present invention more clearly understood, embodiments are given below with reference to the accompanying drawings for detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1is a schematic diagram of a host system, a memory storage device, and an input / output (I / O) device according to an exemplary embodiment of the present invention;
[0036] Figure 2 is a schematic diagram of a host system, a memory storage device, and an I / O device according to an exemplary embodiment of the present invention;
[0037] Figure 3 is a schematic diagram of a host system and a memory storage device according to an exemplary embodiment of the present invention;
[0038] Figure 4 is a schematic diagram of a memory storage device according to an exemplary embodiment of the present invention;
[0039] Figure 5 is a schematic diagram of a memory control circuit unit according to an exemplary embodiment of the present invention;
[0040] Figure 6 is a schematic diagram of managing a rewritable non-volatile memory module according to an exemplary embodiment of the present invention;
[0041] Figure 7 is a flow chart of a memory control method according to an exemplary embodiment of the present invention;
[0042] Figure 8 is a flow chart of a memory control method according to an exemplary embodiment of the present invention;
[0043] Fig. 9 is a flow chart of a memory control method according to an exemplary embodiment of the present invention;
[0044] Fig.10 is a flow chart of a memory control method for a physical unit to be checked according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0045] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0046] Generally speaking, a memory storage device (also known as a memory storage system) includes a rewritable non-volatile memory module and a controller (also known as a control circuit). The memory storage device can be used together with a host system so that the host system can write data to the memory storage device or read data from the memory storage device.
[0047] Figure 1 is a schematic diagram of a host system, a memory storage device, and an input / output (I / O) device according to an exemplary embodiment of the present invention. Figure 2 is a schematic diagram of a host system, a memory storage device, and an I / O device according to an exemplary embodiment of the present invention.
[0048] Please refer to Figure 1 and Figure 2 The host system 11 may include a processor 111, a random access memory (RAM) 112, a read only memory (ROM) 113, and a data transmission interface 114. The processor 111, the random access memory 112, the read only memory 113, and the data transmission interface 114 may be coupled to a system bus 110.
[0049] In an exemplary embodiment, the host system 11 may be coupled to the memory storage device 10 via the data transmission interface 114. For example, the host system 11 may store data to the memory storage device 10 or read data from the memory storage device 10 via the data transmission interface 114. In addition, the host system 11 may be coupled to the I / O device 12 via the system bus 110. For example, the host system 11 may transmit an output signal to the I / O device 12 or receive an input signal from the I / O device 12 via the system bus 110.
[0050] In an exemplary embodiment, the processor 111, the random access memory 112, the read-only memory 113 and the data transmission interface 114 may be disposed on the motherboard 20 of the host system 11. The number of the data transmission interface 114 may be one or more. Through the data transmission interface 114, the motherboard 20 may be coupled to the memory storage device 10 via a wired or wireless manner.
[0051] In an exemplary embodiment, the memory storage device 10 may be, for example, a flash drive 201, a memory card 202, a solid state drive (SSD) 203, or a wireless memory storage device 204. The wireless memory storage device 204 may be, for example, a near field communication (NFC) memory storage device, a wireless fax (WiFi) memory storage device, a Bluetooth memory storage device, or a low power Bluetooth memory storage device (e.g., iBeacon) or other memory storage devices based on various wireless communication technologies. In addition, the motherboard 20 may also be coupled to various I / O devices such as a global positioning system (GPS) module 205, a network interface card 206, a wireless transmission device 207, a keyboard 208, a screen 209, a speaker 210, etc. through the system bus 110. For example, in an exemplary embodiment, the motherboard 20 may access the wireless memory storage device 204 through the wireless transmission device 207.
[0052] In one exemplary embodiment, the host system 11 is a computer system. In one exemplary embodiment, the host system 11 can be any system that can substantially cooperate with the memory storage device to store data. In one exemplary embodiment, the host system 11 is a vehicle-mounted system. In one exemplary embodiment, the memory storage device 10 and the host system 11 can respectively include Figure 3 A memory storage device 30 and a host system 31.
[0053] Figure 3 is a schematic diagram of a host system and a memory storage device according to an exemplary embodiment of the present invention.
[0054] Please refer to Figure 3 , the memory storage device 30 can be used in conjunction with a host system 31 to store data. For example, the host system 31 can be a system such as a digital camera, a video camera, a communication device, an audio player, a video player, or a tablet computer. For example, the memory storage device 30 can be various non-volatile memory storage devices such as a Secure Digital (SD) card 32, a Compact Flash (CF) card 33, or an embedded storage device 34 used by the host system 31. The embedded storage device 34 includes various types of embedded storage devices that directly couple the memory module to the substrate of the host system, such as an embedded Multi Media Card (eMMC) 341 and / or an embedded Multi Chip Package (eMCP) storage device 342.
[0055] Figure 4 is a schematic diagram of a memory storage device according to an exemplary embodiment of the present invention.
[0056] Please refer to Figure 4 The memory storage device 10 includes a connection interface unit 41 , a memory control circuit unit 42 and a rewritable non-volatile memory module 43 .
[0057] The connection interface unit 41 is used to couple the memory storage device 10 to the host system 11. The memory storage device 10 can communicate with the host system 11 via the connection interface unit 41. In an exemplary embodiment, the connection interface unit 41 is compatible with the Peripheral Component Interconnect Express (PCI Express) standard. In an exemplary embodiment, the connection interface unit 41 may also comply with the Serial Advanced Technology Attachment (SATA) standard, the Parallel Advanced Technology Attachment (PATA) standard, the Institute of Electrical and Electronic Engineers (IEEE) 1394 standard, the Universal Serial Bus (USB) standard, the SD interface standard, the Ultra High Speed-I (UHS-I) interface standard, the Ultra High Speed-II (UHS-II) interface standard, the Memory Stick (MS) interface standard, the MCP interface standard, the MMC interface standard, the eMMC interface standard, the Universal Flash Storage (UFS) interface standard, the eMCP interface standard, the CF interface standard, the Integrated Device Electronics (IDE) standard or other suitable standards. The connection interface unit 41 and the memory control circuit unit 42 may be packaged in one chip, or the connection interface unit 41 may be disposed outside a chip including the memory control circuit unit 42 .
[0058] The memory control circuit unit 42 is coupled to the connection interface unit 41 and the rewritable non-volatile memory module 43. The memory control circuit unit 42 is used to execute a plurality of logic gates or control instructions implemented in hardware or firmware and to perform operations such as writing, reading and erasing data in the rewritable non-volatile memory module 43 according to the instructions of the host system 11.
[0059] The rewritable non-volatile memory module 43 is used to store data written by the host system 11. The rewritable non-volatile memory module 43 may include a single-level cell (SLC) NAND flash memory module (i.e., a flash memory module that can store 1 bit in one storage cell), a multi-level cell (MLC) NAND flash memory module (i.e., a flash memory module that can store 2 bits in one storage cell), a triple-level cell (TLC) NAND flash memory module (i.e., a flash memory module that can store 3 bits in one storage cell), a quad-level cell (QLC) NAND flash memory module (i.e., a flash memory module that can store 4 bits in one storage cell), other flash memory modules, or other memory modules with the same characteristics.
[0060] Each memory cell in the rewritable non-volatile memory module 43 stores one or more bits by changing the voltage (hereinafter also referred to as the critical voltage). Specifically, there is a charge capture layer between the control gate and the channel of each memory cell. By applying a write voltage to the control gate, the amount of electrons in the charge capture layer can be changed, thereby changing the critical voltage of the memory cell. This operation of changing the critical voltage of the memory cell is also called "writing data to the memory cell" or "programming the memory cell". As the critical voltage changes, each memory cell in the rewritable non-volatile memory module 43 has multiple storage states. By applying a read voltage, it is possible to determine which storage state a memory cell belongs to, thereby obtaining one or more bits stored in this memory cell.
[0061] In an exemplary embodiment, the memory cells of the rewritable non-volatile memory module 43 may constitute a plurality of physical programming cells, and these physical programming cells may constitute a plurality of physical cells. Specifically, the memory cells on the same word line may constitute one or more physical programming cells. If each memory cell can store more than 2 bits, the physical programming cells on the same word line may be classified into at least a lower physical programming cell and an upper physical programming cell. For example, the least significant bit (LSB) of a memory cell belongs to the lower physical programming cell, and the most significant bit (MSB) of a memory cell belongs to the upper physical programming cell. Generally speaking, in an MLC NAND flash memory, the write speed of the lower physical programming cell is greater than the write speed of the upper physical programming cell, and / or the reliability of the lower physical programming cell is higher than the reliability of the upper physical programming cell.
[0062] In one exemplary embodiment, the physical programming unit is the smallest unit of programming. That is, the physical programming unit is the smallest unit for writing data. For example, the physical programming unit may be a physical page or a physical sector. If the physical programming unit is a physical page, these physical programming units may include a data bit area and a redundancy bit area. The data bit area includes a plurality of physical sectors for storing user data, and the redundancy bit area is used to store system data (for example, management data such as error correction codes). In this exemplary embodiment, the data bit area includes 32 physical sectors, and the size of a physical sector is 512 bytes (byte, B). However, in other exemplary embodiments, the data bit area may also include 8, 16 or more or less physical sectors, and the size of each physical sector may also be larger or smaller. On the other hand, the physical unit is the smallest unit of erasure. That is, each physical unit contains the minimum number of storage cells that are erased together. For example, the physical unit is a physical block.
[0063] Figure 5 FIG. 4 is a schematic diagram of a memory control circuit unit according to an exemplary embodiment of the present invention.
[0064] Please refer to Figure 5 The memory control circuit unit 42 includes a memory management circuit 51 , a host interface 52 and a memory interface 53 .
[0065] The memory management circuit 51 is used to control the overall operation of the memory control circuit unit 42. Specifically, the memory management circuit 51 has a plurality of control instructions, and when the memory storage device 10 operates, these control instructions are executed to perform operations such as writing, reading and erasing data. The following description of the operation of the memory management circuit 51 is equivalent to the description of the operation of the memory control circuit unit 42.
[0066] In an exemplary embodiment, the control instructions of the memory management circuit 51 are implemented in the form of firmware. For example, the memory management circuit 51 has a microprocessor unit (not shown) and a read-only memory (not shown), and these control instructions are recorded in the read-only memory. When the memory storage device 10 is operating, these control instructions are executed by the microprocessor unit to perform operations such as writing, reading and erasing data.
[0067] In an exemplary embodiment, the control instructions of the memory management circuit 51 can also be stored in a specific area of the rewritable non-volatile memory module 43 (for example, a system area in the memory module dedicated to storing system data) in the form of code. In addition, the memory management circuit 51 has a microprocessor unit (not shown), a read-only memory (not shown) and a random access memory (not shown). In particular, the read-only memory has a boot code, and when the memory control circuit unit 42 is enabled, the microprocessor unit will first execute the boot code to load the control instructions stored in the rewritable non-volatile memory module 43 into the random access memory of the memory management circuit 51. Afterwards, the microprocessor unit will run these control instructions to perform operations such as writing, reading and erasing data.
[0068] In an exemplary embodiment, the control instructions of the memory management circuit 51 can also be implemented in a hardware form. For example, the memory management circuit 51 includes a microcontroller, a storage unit management circuit, a memory write circuit, a memory read circuit, a memory erase circuit and a data processing circuit. The storage unit management circuit, the memory write circuit, the memory read circuit, the memory erase circuit and the data processing circuit are coupled to the microcontroller. The storage unit management circuit is used to manage the storage unit or storage unit group of the rewritable non-volatile memory module 43. The memory write circuit is used to issue a write instruction sequence to the rewritable non-volatile memory module 43 to write data into the rewritable non-volatile memory module 43. The memory read circuit is used to issue a read instruction sequence to the rewritable non-volatile memory module 43 to read data from the rewritable non-volatile memory module 43. The memory erase circuit is used to issue an erase instruction sequence to the rewritable non-volatile memory module 43 to erase data from the rewritable non-volatile memory module 43. The data processing circuit is used to process data to be written to the rewritable non-volatile memory module 43 and data to be read from the rewritable non-volatile memory module 43. The write command sequence, the read command sequence and the erase command sequence may each include one or more codes or instruction codes and are used to instruct the rewritable non-volatile memory module 43 to perform corresponding write, read and erase operations. In an exemplary embodiment, the memory management circuit 51 may also issue other types of command sequences to the rewritable non-volatile memory module 43 to instruct the execution of corresponding operations.
[0069] The host interface 52 is coupled to the memory management circuit 51. The memory management circuit 51 can communicate with the host system 11 through the host interface 52. The host interface 52 can be used to receive and identify instructions and data transmitted by the host system 11. For example, the instructions and data transmitted by the host system 11 can be transmitted to the memory management circuit 51 through the host interface 52. In addition, the memory management circuit 51 can transmit data to the host system 11 through the host interface 52. In this exemplary embodiment, the host interface 52 is compatible with the PCI Express standard. However, it should be understood that the present invention is not limited to this, and the host interface 52 can also be compatible with the SATA standard, the PATA standard, the IEEE 1394 standard, the USB standard, the SD standard, the UHS-I standard, the UHS-II standard, the MS standard, the MMC standard, the eMMC standard, the UFS standard, the CF standard, the IDE standard or other suitable data transmission standards.
[0070] The memory interface 53 is coupled to the memory management circuit 51 and is used to access the rewritable non-volatile memory module 43. For example, the memory management circuit 51 can access the rewritable non-volatile memory module 43 through the memory interface 53. That is, the data to be written to the rewritable non-volatile memory module 43 will be converted into a format acceptable to the rewritable non-volatile memory module 43 through the memory interface 53. Specifically, if the memory management circuit 51 wants to access the rewritable non-volatile memory module 43, the memory interface 53 will transmit a corresponding command sequence. For example, these command sequences may include a write command sequence indicating writing data, a read command sequence indicating reading data, an erase command sequence indicating erasing data, and corresponding command sequences for indicating various memory operations (for example, changing a read voltage level or performing a garbage collection operation, etc.). These command sequences are, for example, generated by the memory management circuit 51 and transmitted to the rewritable non-volatile memory module 43 through the memory interface 53. These command sequences may include one or more signals, or data on a bus. These signals or data may include instruction codes or codes. For example, in a read instruction sequence, information such as a read identification code, a memory address, etc. may be included.
[0071] In an exemplary embodiment, the memory control circuit unit 42 further includes an error checking and correction circuit 54 , a buffer memory 55 , and a power management circuit 56 .
[0072] The error checking and correction circuit 54 is coupled to the memory management circuit 51 and is used to perform error checking and correction operations to ensure the correctness of data. Specifically, when the memory management circuit 51 receives a write command from the host system 11, the error checking and correction circuit 54 generates a corresponding error correcting code (ECC) and / or error detecting code (EDC) for the data corresponding to the write command, and the memory management circuit 51 writes the data corresponding to the write command and the corresponding error correcting code and / or error detecting code into the rewritable non-volatile memory module 43. Afterwards, when the memory management circuit 51 reads data from the rewritable non-volatile memory module 43, the error correcting code and / or error detecting code corresponding to the data will be read at the same time, and the error checking and correction circuit 54 will perform error checking and correction operations on the read data according to the error correcting code and / or error detecting code.
[0073] The buffer memory 55 is coupled to the memory management circuit 51 and used for temporarily storing data. The power management circuit 56 is coupled to the memory management circuit 51 and used for controlling the power of the memory storage device 10 .
[0074] In an exemplary embodiment, Figure 4 The rewritable non-volatile memory module 43 may include a flash memory module. In an exemplary embodiment, Figure 4 The memory control circuit unit 42 may include a flash memory controller. In an exemplary embodiment, Figure 5 The memory management circuit 51 may include a flash memory management circuit.
[0075] Figure 6 is a schematic diagram of managing a rewritable non-volatile memory module according to an exemplary embodiment of the present invention.
[0076] Please refer to Figure 6 , the memory management circuit 51 can logically group the physical units 610(0)-610(B) in the rewritable non-volatile memory module 43 into a storage area 601 and a spare area 602. A physical unit refers to a virtual block (VB). A virtual block may include multiple physical programming units. For example, a virtual block may include one or more physical units.
[0077] The physical units 610(0)-610(A) in the storage area 601 are used to store user data (e.g. Figure 1 The user data of the host system 11 of the storage area 601). For example, the physical units 610(0)~610(A) in the storage area 601 can store valid data and invalid data. The physical units 610(A+1)~610(B) in the idle area 602 do not store data (such as valid data). For example, if a physical unit does not store valid data, this physical unit can be associated (or added) to the idle area 602. In addition, the physical units in the idle area 602 (or the physical units that do not store valid data) can be erased. When writing new data, one or more physical units can be extracted from the idle area 602 to store the new data. In an exemplary embodiment, the idle area 602 is also called a free pool.
[0078] The memory management circuit 51 can configure the logical units 612(0)-612(C) to map the physical units 610(0)-610(A) in the storage area 601. In an exemplary embodiment, each logical unit corresponds to a logical address. For example, a logical address may include one or more logical block addresses (LBAs) or other logical management units.
[0079] It should be noted that a logical unit can be mapped to one or more physical units. If a physical unit is currently mapped by a logical unit, it means that the data currently stored in this physical unit contains valid data. On the contrary, if a physical unit is not currently mapped by any logical unit, it means that the data currently stored in this physical unit does not contain any valid data.
[0080] The memory management circuit 51 may record management data describing the mapping relationship between the logical unit and the physical unit (also referred to as logical-to-physical mapping information) in at least one logical-to-physical mapping table. When the host system 11 wishes to read data from the memory storage device 10 or write data to the memory storage device 10, the memory management circuit 51 may perform a data access operation on the memory storage device 10 according to the information in the logical-to-physical mapping table.
[0081] When an error occurs in a data access operation, a conventional error handling method is to mark the physical unit corresponding to the data access operation as a bad physical unit and replace the physical unit to maintain the operation of the memory storage device 10. However, in the process of the memory management circuit 51 performing a data access operation on the memory storage device 10, it may be affected by environmental factors (for example, abnormal operating voltage or abnormal temperature), resulting in an error in the data access operation. In this case, the physical unit corresponding to the data access operation is not necessarily a damaged bad physical unit. Conventional error handling methods may mistakenly mark an undamaged physical unit as a bad physical unit, thereby reducing the service life of the memory storage device 10.
[0082] In order to avoid the above problems, the present invention provides a memory control method. When the memory storage device 10 is affected by environmental factors, the memory management circuit 51 may temporarily not mark the physical unit corresponding to the operation where the error occurs as a bad physical unit to avoid the problem of mis-marking, and establish a physical unit management mechanism for the physical unit according to the actual operation of the rewritable non-volatile memory module 43. By classifying and marking the physical units in different usage conditions, the misjudgment of the physical unit classification is reduced while ensuring data reliability, and the service life of the memory storage device 10 is extended.
[0083] In an exemplary embodiment, the rewritable non-volatile memory module 43 may include a plurality of physical units, and the plurality of physical units in the rewritable non-volatile memory module 43 are initially of the first type. That is, at the beginning of the service life of the memory storage device 10, the plurality of physical units in the rewritable non-volatile memory module 43 are of the first type. As the usage time goes by, the plurality of physical units in the rewritable non-volatile memory module 43 may be classified (or marked) as the first type, the second type, the third type, or the fourth type according to the actual usage.
[0084] For the definitions of the first type, the second type, the third type and the fourth type, please refer to Table 1 below.
[0085]
[0086] Table 1
[0087] As shown in Table 1, the first type and the second type of physical cells can be used in various access modes. The access mode may include but is not limited to a single-level cell (SLC) access mode, a second-level cell (MLC) access mode, a third-level cell (TLC) access mode, or a fourth-level cell (QLC) access mode. The access modes supported by the memory storage device 10 depend on its specifications. In an exemplary embodiment, the first type of physical cell is also called a good physical cell.
[0088] Furthermore, the second type of physical unit needs to be checked again in the idle state. That is, in the idle state, the memory management circuit 51 can perform a target test operation on a physical unit of the second type to determine whether the physical unit can be used for subsequent data access operations. In an exemplary embodiment, the second type of physical unit is also called an inspected physical unit.
[0089] Furthermore, the third type of physical cell can only be used in a single-level memory cell access mode. In an exemplary embodiment, the third type of physical cell is also called a weak physical cell.
[0090] Furthermore, the fourth type of physical unit is damaged and no longer used, that is, the fourth type of physical unit cannot be put into subsequent data access operations. In an exemplary embodiment, the fourth type of physical unit is also called a bad physical unit.
[0091] Figure 7 is a flow chart of a memory control method according to an exemplary embodiment of the present invention. Figure 7When an error occurs in a target operation (eg, an erase operation, a write operation, or a read operation) executed on the first physical unit, the memory management circuit 51 may, for example, execute the following Figure 7 The memory control method shown is used to extend the service life of the memory storage device 10.
[0092] In step S701, when an error occurs in a target operation executed on a first entity unit, the execution count of the first entity unit is obtained.
[0093] In an exemplary embodiment, the execution count may include but is not limited to the read count (ReadCount) and erase count (PE Count) of the first physical unit. Specifically, the memory management circuit 51 may obtain the execution count used to characterize the actual usage status of the first physical unit and classify and mark the first physical unit accordingly.
[0094] In step S702, if the execution times and the operation type of the target operation indicate that the first entity unit meets the first preset condition, it is determined whether the first entity unit is of the third type.
[0095] In an exemplary embodiment, the operation type may be used to characterize whether the target operation is an erase operation, a write operation, or a read operation. Specifically, the number of executions of the first physical unit and the operation type of the target operation may be used to indicate whether the first physical unit satisfies a first preset condition. In an exemplary embodiment, the first preset condition includes that the target operation is not a read operation, or the target operation is a read operation and the number of reads of the first physical unit is not greater than a read threshold. If the target operation is not a read operation, or the target operation is a read operation and the number of reads of the first physical unit is not greater than the read threshold, the memory management circuit 51 may further determine whether the first physical unit is of the third type (i.e., a weak physical unit in a worse condition).
[0096] The read threshold may be related to the service life of the rewritable non-volatile memory module 43 or designed by the user according to actual needs, and the present invention is not limited thereto.
[0097] In step S703, if the first entity unit is not of the third type and the execution number indicates that the first entity unit satisfies the second preset condition, it is determined whether the first entity unit is of the second type.
[0098] Specifically, the execution count of the first physical unit can be used to indicate whether the first physical unit meets the second preset condition. In an exemplary embodiment, the second preset condition includes that the number of erasures of the first physical unit is not greater than the erasure threshold. If the first physical unit is not of the third type (that is, the first physical unit is of the first type or the second type in good condition) and the number of erasures of the first physical unit is not greater than the erasure threshold, the memory management circuit 51 can further determine whether the first physical unit is of the second type (that is, a physical unit to be checked that is in good condition but has had an error).
[0099] The erasing threshold may be related to the service life of the rewritable non-volatile memory module 43 or may be designed by the user according to actual needs, and the present invention is not limited thereto.
[0100] In step S704, if the first entity unit is not of the second type, the first entity unit is marked as the second type.
[0101] Specifically, if the first physical unit that is not of the third type is also not of the second type (ie, the first physical unit is of the first type in good condition), the memory management circuit 51 may mark the first physical unit as the second type.
[0102] According to the above, if Figure 7 In the memory control method shown, the memory management circuit 51 can perform a classification management mechanism according to the actual usage status of the first physical unit, thereby extending the service life of the memory storage device 10 while ensuring data reliability.
[0103] Figure 8 is a flow chart of a memory control method according to an exemplary embodiment of the present invention. Figure 8 . Figure 8 The memory control method shown is Figure 7 When an error occurs in the target operation executed on the first physical unit, the memory management circuit 51 may, for example, execute the following Figure 8 The memory control method shown is used to extend the service life of the memory storage device 10.
[0104] In step S801 , the memory management circuit 51 may determine whether an operating temperature or an operating voltage corresponding to a target operation is abnormal.
[0105] Specifically, the memory management circuit 51 can determine whether the target operation in which the error occurs is interfered by environmental factors by determining whether the operating temperature or operating voltage corresponding to the target operation in which the error occurs is abnormal. If the operating temperature and / or operating voltage are abnormal, the process proceeds to step S802. On the contrary, if the operating temperature and operating voltage are both normal, the process proceeds to step S803.
[0106] In step S802 , the memory management circuit 51 may temporarily not mark the first physical unit.
[0107] In an exemplary embodiment, if the operating temperature and / or operating voltage corresponding to the target operation is abnormal, it means that the memory management circuit 51 is interfered by environmental factors when executing the target operation. Accordingly, when an error occurs in the target operation, the memory management circuit 51 may temporarily not mark the first physical unit corresponding to the operation (that is, the memory management circuit 51 temporarily does not change the type of the first physical unit) to avoid the problem of unnecessary reduction of the storage space of the rewritable non-volatile memory module 43 due to the erroneous marking of the first physical unit that is not worn out.
[0108] In step S803 , the memory management circuit 51 may determine whether the first physical unit satisfies a first preset condition.
[0109] In an exemplary embodiment, the memory management circuit 51 may obtain the number of executions of the target operation performed by the first physical unit. The execution number may include but is not limited to the number of reads and the number of erases of the first physical unit. The memory management circuit 51 may determine whether the first physical unit meets the first preset condition according to the number of executions of the first physical unit and the operation type of the target operation, wherein the operation type may be used to characterize whether the target operation is an erase operation, a write operation, or a read operation. In other words, the number of executions of the first physical unit and the operation type of the target operation may be used to indicate whether the first physical unit meets the first preset condition.
[0110] In an exemplary embodiment, the first preset condition includes that the target operation is not a read operation, or the target operation is a read operation and the number of read times of the first physical unit is not greater than a read threshold.
[0111] The read threshold may be related to the service life of the rewritable non-volatile memory module 43 or designed by the user according to actual needs, and the present invention is not limited thereto.
[0112] If the execution count of the first physical unit and the operation type of the target operation indicate that the first physical unit does not meet the first preset condition (ie, the target operation is a read operation and the read count is greater than the read threshold), then step S802 is entered and the memory management circuit 51 may temporarily not mark the first physical unit.
[0113] Specifically, the first physical unit has a high read count (i.e., the read count is greater than the read threshold), which only indicates that the first physical unit is used at a high frequency, and does not indicate that the first physical unit is a damaged physical unit. Therefore, the memory management circuit 51 may not change the type of the first physical unit temporarily to avoid the problem of unnecessary reduction of the storage space of the rewritable non-volatile memory module 43 caused by the mislabeling.
[0114] On the contrary, if the execution times of the first physical unit and the operation type of the target operation indicate that the first physical unit meets the first preset condition, the process proceeds to step S804 , where the memory management circuit 51 determines whether the first physical unit is of the third type.
[0115] In an exemplary embodiment, the memory management circuit 51 may further determine whether the first physical cell satisfying the first preset condition is a weak physical cell in a poor condition.
[0116] If the first physical unit is of the third type, the process proceeds to step S805 , where the memory management circuit 51 may mark the first physical unit as of the fourth type.
[0117] Specifically, when an error occurs in a first physical unit in a worse condition (i.e., a first physical unit of the third type), the memory management circuit 51 may determine that the first physical unit is a damaged physical unit. Accordingly, the memory management circuit 51 may mark the first physical unit as a fourth type. In other words, the memory management circuit 51 may mark the first physical unit as a bad physical unit so that the first physical unit is no longer used in subsequent data access operations to maintain data reliability.
[0118] On the contrary, if the first physical unit is not of the third type (ie, the first physical unit is of the first type or the second type in good condition), the process proceeds to step S806 , where the memory management circuit 51 further determines whether the first physical unit satisfies the second preset condition.
[0119] In an exemplary embodiment, the second preset condition includes that the number of erasures of the first physical unit is not greater than an erasure threshold. In other words, the number of executions of the first physical unit can be used to indicate whether the first physical unit meets the second preset condition.
[0120] The erasing threshold may be related to the service life of the rewritable non-volatile memory module 43 or may be designed by the user according to actual needs, and the present invention is not limited thereto.
[0121] If the execution count of the first physical unit indicates that the first physical unit does not satisfy the second preset condition (ie, the erasure count of the first physical unit is greater than the erasure threshold), the process proceeds to step S707 , where the memory management circuit 51 may mark the first physical unit as the third type.
[0122] Specifically, the first physical cell has a high erase count (i.e., the erase count is greater than the erase threshold), which indicates that the first physical cell has been used multiple times. Therefore, when an error occurs in the operation corresponding to the first physical cell that has been used multiple times, the memory management circuit 51 may mark the first physical cell as a third type with a worse condition.
[0123] In contrast, if the execution count of the first physical unit indicates that the first physical unit satisfies the second preset condition, the process proceeds to step S808 , where the memory management circuit 51 may further determine whether the first physical unit is of the second type.
[0124] If the first entity element is not of the second type, proceed to step S809.
[0125] On the contrary, if the first entity element is of the second type, the process proceeds to step S807.
[0126] Specifically, the first physical unit has a low erase count (i.e., the erase count is not greater than the erase threshold), which indicates that the first physical unit has not been used multiple times. Therefore, when an error occurs in an operation corresponding to the first physical unit that has not been used multiple times, the memory management circuit 51 can further determine whether the first physical unit is of the first type or the second type, and accordingly perform corresponding marking on the first physical unit.
[0127] If the first physical unit is of the second type and is in good condition but has experienced errors, then in step S807 , the memory management circuit 51 may mark the first physical unit as a third type.
[0128] On the contrary, if the first physical unit is of the first type and is in good condition and has not experienced any error, then in step S809 , the memory management circuit 51 may mark the first physical unit as the second type.
[0129] It is worth mentioning that the second type of physical unit is the physical unit to be checked. In the idle state, the memory management circuit 51 can perform a target test operation on a physical unit of the second type to determine whether the physical unit can be used for subsequent data access operations, which can improve data reliability.
[0130] According to the above, if Figure 8In the memory control method shown, when the memory is affected by environmental factors (i.e., abnormal operating temperature and / or abnormal operating voltage) or the first physical unit has a high number of read times, the memory management circuit 51 may temporarily not mark the first physical unit corresponding to the target operation where an error occurs as a bad physical unit, so as to avoid the problem of unnecessary reduction of storage space caused by incorrect marking, and execute a classification management mechanism based on the actual usage status of the first physical unit, thereby extending the service life of the memory storage device 10 while ensuring data reliability.
[0131] Fig. 9 is a flow chart of a memory control method according to an exemplary embodiment of the present invention. Fig. 9 . Fig. 9 The memory control method shown is Figure 7 When an error occurs in the target operation executed on the first physical unit, the memory management circuit 51 can be used to perform the following Fig. 9 The memory control method shown is used to extend the service life of the memory storage device 10.
[0132] In step S901 , the memory management circuit 51 may determine whether an operating temperature or an operating voltage corresponding to a target operation is abnormal, so as to determine whether the target operation in which the error occurs is interfered by environmental factors.
[0133] If the operating temperature and / or operating voltage are abnormal (i.e., the erroneous target operation is interfered with by environmental factors), the process proceeds to step S902, and the memory management circuit 51 may temporarily not mark the first physical unit to avoid unnecessary reduction of the storage space of the rewritable non-volatile memory module 43 due to erroneous marking.
[0134] On the contrary, if the operating temperature and the operating voltage are both normal (ie, the target operation in which the error occurs is not interfered by environmental factors), the process proceeds to step S903.
[0135] In step S903 , the memory management circuit 51 may determine whether the first physical unit satisfies a first preset condition.
[0136] In an exemplary embodiment, the memory management circuit 51 may obtain the execution count of the first physical unit. For example, the execution count may include but is not limited to the read count and the erase count of the first physical unit. The memory management circuit 51 may determine whether the first physical unit meets the first preset condition according to the execution count of the first physical unit and the operation type of the target operation, wherein the operation type may be used to characterize whether the target operation is an erase operation, a write operation, or a read operation.
[0137] In an exemplary embodiment, if the target operation is a read operation and the number of reads of the first physical unit is greater than the read threshold, the memory management circuit 51 may determine that the first physical unit does not meet the first preset condition and enter step S902. The memory management circuit 51 may temporarily not mark the first physical unit to avoid the problem of unnecessary reduction of storage space due to incorrect marking.
[0138] On the contrary, if the target operation is not a read operation, or the target operation is a read operation and the read count of the first physical unit is not greater than the read threshold, the memory management circuit 51 can determine that the first physical unit meets the first preset condition and enter step S904, the memory management circuit 51 can determine whether the first physical unit is of the third type.
[0139] If the first physical unit is of the third type with a worse condition, the process proceeds to step S905 , where the memory management circuit 51 may mark the first physical unit as the fourth type so that the first physical unit is no longer used in subsequent data access operations to maintain data reliability.
[0140] On the contrary, if the first physical unit is not of the third type (ie, the first physical unit is of the first type or the second type in good condition), the process proceeds to step S906 , where the memory management circuit 51 further determines whether the first physical unit satisfies the second preset condition.
[0141] If the erase count of the first physical unit is greater than the erase threshold, the memory management circuit 51 may determine that the first physical unit does not meet the second preset condition and proceed to step S907 , where the memory management circuit 51 may determine whether the target operation is a read operation.
[0142] If the target operation is a read operation, the process proceeds to step S909 ; otherwise, if the target operation is not a read operation, the process proceeds to step S905 .
[0143] Specifically, the first physical cell has a high erase count (i.e., the erase count is greater than the erase threshold), which indicates that the first physical cell has been used multiple times. If the target operation in which the error occurs is a read operation, and the first physical cell has been used multiple times, then in step S909, the memory management circuit 51 may mark the first physical cell as the third type.
[0144] The memory management circuit 51 may mark the first physical cells as the third type instead of marking the first physical cells that have been used multiple times and correspond to erroneous target operations as the fourth type (ie, bad physical cells) to try to extend the useful life of the memory storage device 10 .
[0145] On the contrary, if the target operation in which the error occurs is an erase operation or a write operation, and the first physical unit has been used multiple times, then in step S905, the memory management circuit 51 may mark the first physical unit as the fourth type so that the first physical unit is no longer used in subsequent data access operations to maintain data reliability.
[0146] On the other hand, if the erase count of the first physical unit is not greater than the erase threshold, the memory management circuit 51 may determine that the first physical unit meets the second preset condition and proceed to step S908 , where the memory management circuit 51 may further determine whether the first physical unit is of the second type.
[0147] If the first entity unit is of the second type, the process proceeds to step S909 ; otherwise, if the first entity unit is not of the second type, the process proceeds to step S910 .
[0148] Specifically, the first physical unit has a low erase count (ie, the erase count is not greater than an erase threshold), which indicates that the first physical unit is not used multiple times.
[0149] If the first physical unit is of the second type and is in good condition but has experienced errors, then in step S909 , the memory management circuit 51 may mark the first physical unit as the third type.
[0150] On the contrary, if the first physical unit is of the first type and is in good condition and has not experienced any error, then in step S909 , the memory management circuit 51 may mark the first physical unit as the second type.
[0151] According to the above, if Fig. 9 In the memory control method shown, when the memory is affected by environmental factors (i.e., abnormal operating temperature and / or abnormal operating voltage) or the first physical unit has a high number of read times, the memory management circuit 51 may temporarily not mark the first physical unit corresponding to the target operation where an error occurs as a bad physical unit, so as to avoid the problem of unnecessary reduction of storage space caused by incorrect marking, and execute a classification management mechanism based on the actual usage status of the first physical unit, thereby extending the service life of the memory storage device 10 while ensuring data reliability.
[0152] It should be noted that if the target operation where the error occurs is an erase operation or a write operation, in addition to the following Figures 7 to 9 In addition to the memory control method shown, the memory management circuit 51 can also select a second physical unit different from the first physical unit from the rewritable non-volatile memory module 43 to re-execute the erroneous erase operation or erroneous write operation so that the operation of the memory storage device 10 is not interrupted.
[0153] In addition, if the target operation in which the error occurs is a read operation and the first physical unit is not marked as the fourth type, except for Figures 7 to 9 In addition to the memory control method shown, the memory management circuit 51 can also further confirm whether the read operation corresponding to the first physical unit has an error again after a data consolidation operation (for example, a garbage collection operation) when there is no abnormality in the environmental factors and the number of reads does not exceed the read threshold. If so, the memory management circuit 51 can mark the first physical unit of the second type (or third type) as the third type (or fourth type) to ensure the reliability of the data; if not, the memory management circuit 51 can mark the first physical unit as the first type to increase the service life of the memory storage device 10.
[0154] Fig.10 is a flow chart of a memory control method for a physical unit to be checked according to an exemplary embodiment of the present invention. Fig.10 It is worth mentioning that Fig.10 The memory control method for the physical unit to be checked is executed in an idle state and / or a background state.
[0155] In step S1001 , the memory management circuit 51 may perform a target test operation on the first physical cell marked as the second type based on an access pattern of the first physical cell marked as the second type.
[0156] In an exemplary embodiment, the target test operation may include, for example, but is not limited to, an erase operation, a write operation, and a read verify operation. For example, the access mode of the first physical cell marked as the second type (i.e., the physical cell to be checked) is a three-level storage cell access mode. The memory management circuit 51 may first perform an erase operation on the first physical cell marked as the second type, then write the test data into the first physical cell marked as the second type based on the three-level storage cell access mode, and then perform a read verify operation on the first physical cell marked as the second type based on the three-level storage cell access mode to determine whether the test data is correctly written.
[0157] In step S1002 , the memory management circuit 51 may determine whether the target test operation is successful.
[0158] In an exemplary embodiment, if the read verification operation is successful, ie, it indicates that the test data is correctly written into the first physical cell marked as the second type, the memory management circuit 51 may determine that the target test operation is successful.
[0159] In contrast, if the read verification operation fails, that means the test data is not correctly written into the first physical unit marked as the second type. Accordingly, the memory management circuit 51 may determine that the target test operation fails.
[0160] If the target test operation is successful, then go to step S1003; otherwise, if the target test operation is failed, then go to step S1004.
[0161] In step S1003 , the memory management circuit 51 may re-mark the first physical unit marked as the second type as the first type.
[0162] Specifically, if the target test operation for the first physical unit marked as the second type is successful, it indicates that the error previously occurring in the operation corresponding to the first physical unit marked as the second type is a temporary error. Accordingly, the memory management circuit 51 can re-mark the first physical unit marked as the second type as the first type in good condition (i.e., a good physical unit) to increase the service life of the first physical unit, thereby extending the service life of the memory storage device 10 while ensuring the reliability of data.
[0163] On the other hand, in step S1004 , the memory management circuit 51 may further determine whether the access mode of the first physical unit marked as the second type is a single-level memory cell access mode.
[0164] If yes, the process proceeds to step S1005 , where the memory management circuit 51 may mark the first physical unit marked as the second type as the fourth type.
[0165] In an exemplary embodiment, the third type of physical cell can only be used in the single-level memory cell access mode. Therefore, if the target test operation of the first physical cell marked as the second type fails and the access mode is the single-level memory cell access mode, that is, at least in the single-level memory cell access mode, the first physical cell marked as the second type cannot be correctly accessed, the memory management circuit 51 will mark it as the fourth type (that is, a bad physical cell) so that it will no longer be used in subsequent data access operations to avoid data loss and / or data corruption.
[0166] On the contrary, if not, the process proceeds to step S1006 , where the memory management circuit 51 may mark the first physical unit marked as the second type as the third type.
[0167] Specifically, if the target test operation of the first physical cell marked as the second type fails and the access mode is not a single-level storage cell access mode (for example, a third-level storage cell access mode), that is, perhaps in the single-level storage cell access mode, the first physical cell marked as the second type can be correctly accessed, the memory management circuit 51 will mark it as the third type (that is, a weak physical cell) to use it to store data of lower importance.
[0168] According to the above, if Fig.10 The memory control method shown can perform a target test operation on the physical unit to be inspected (i.e., the second type of physical unit) in an idle state, restore the physical unit to be inspected for which the target test operation is successful to a good physical unit, and mark the physical unit to be inspected for which the target test operation is failed as a weak physical unit or a bad physical unit. By further executing a classification management mechanism for the physical unit to be inspected, it is possible to establish a physical unit management mechanism according to the actual operation of the storage device, classify and mark the physical units in different usage conditions, thereby reducing the misjudgment of the physical unit classification and extending the service life of the memory storage device 10 while ensuring data reliability.
[0169] In summary, the memory control method and memory storage device proposed in the exemplary embodiments of the present invention can temporarily not execute the marking action when the environmental factors are abnormal to avoid the problem of incorrect marking, and execute the classification management mechanism according to the actual usage status of the physical unit corresponding to the target operation where the error occurs, and in the idle state, execute the target test operation for the physical unit to be checked to perform further classification management mechanism on it, which can effectively extend the service life of the memory storage device while ensuring data reliability.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A memory control method, characterized in that: For a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module includes a plurality of physical units, and the plurality of physical units are respectively marked as a first type, a second type, a third type or a fourth type, and the memory control method includes: When an error occurs in a target operation executed on a first entity unit, obtaining the execution count of the first entity unit; If the execution count and the operation type of the target operation indicate that the first entity unit satisfies a first preset condition, determining whether the first entity unit is of the third type; If the first entity unit is not of the third type and the execution number indicates that the first entity unit satisfies a second preset condition, determining whether the first entity unit is of the second type; and If the first entity element is not of the second type, the first entity element is marked as the second type.
2. The memory control method according to claim 1, wherein: The first preset condition includes: The target operation is not a read operation, or the target operation is the read operation and the execution count is not greater than a read threshold, wherein the execution count is a read count.
3. The memory control method according to claim 1, wherein: The second preset condition includes: The execution times are not greater than an erasure threshold, wherein the execution times are erasure times.
4. The memory control method according to claim 1, wherein: Before the step of obtaining the execution number of the first entity unit, the method further includes: determining whether an operating temperature or an operating voltage corresponding to the target operation is abnormal; and If at least one of the operating temperature and the operating voltage is abnormal, the first physical unit is temporarily not marked.
5. The memory control method according to claim 1 , further comprising: If the execution count and the operation type of the target operation indicate that the first entity unit does not meet the first preset condition, the first entity unit is not marked temporarily.
6. The memory control method according to claim 1, further comprising: If the first entity element is of the third type, the first entity element is marked as the fourth type.
7. The memory control method according to claim 1, further comprising: If the first entity unit is not of the third type and the execution number indicates that the first entity unit does not meet the second preset condition, the first entity unit is marked as the third type.
8. The memory control method according to claim 7, wherein the step of marking the first physical unit as the third type comprises: Determining whether the target operation is a read operation; If so, the first entity element is marked as the third type.
9. The memory control method according to claim 8, further comprising: If not, the first entity element is marked as the fourth type.
10. The memory control method according to claim 1, further comprising: If the first entity element is of the second type, the first entity element is marked as the third type.
11. The memory control method according to claim 1 , further comprising: In an idle state, based on an access pattern of the first physical unit marked as the second type, performing a target test operation on the first physical unit marked as the second type; as well as If the target test operation is successful, the first entity element marked as the second type is re-marked as the first type.
12. The memory control method according to claim 11, further comprising: If the target test operation fails and the access mode is a single-level memory cell access mode, the first physical cell marked as the second type is marked as the fourth type.
13. The memory control method according to claim 11, further comprising: If the target test operation fails and the access mode is not a single-level memory cell access mode, the first physical cell marked as the second type is marked as the third type.
14. The memory control method according to claim 1, wherein: The operation type is used to indicate whether the target operation is an erase operation, a write operation, or a read operation.
15. The memory control method according to claim 1, wherein: The plurality of entity elements are initially all of the first type.
16. The memory control method according to claim 1, wherein: The first physical cell marked as the third type can only be used in a single-level memory cell access mode.
17. A memory storage device, characterized in that: include: A connection interface unit for coupling to a host system; A rewritable non-volatile memory module, wherein the rewritable non-volatile memory module comprises a plurality of physical units, and the plurality of physical units are respectively marked as a first type, a second type, a third type or a fourth type; and A memory control circuit unit is coupled to the connection interface unit and the rewritable non-volatile memory module. The memory control circuit unit is used to: When an error occurs in a target operation executed on a first entity unit, obtaining the execution count of the first entity unit; If the execution count and the operation type of the target operation indicate that the first entity unit satisfies a first preset condition, determining whether the first entity unit is of the third type; If the first entity unit is not of the third type and the execution number indicates that the first entity unit satisfies a second preset condition, determining whether the first entity unit is of the second type; as well as If the first entity element is not of the second type, the first entity element is marked as the second type.
18. The memory storage device of claim 17, wherein: The first preset condition includes: The target operation is not a read operation, or the target operation is the read operation and the execution count is not greater than a read threshold, wherein the execution count is a read count.
19. The memory storage device of claim 17, wherein: The second preset condition includes: The execution times are not greater than an erasure threshold, wherein the execution times are erasure times.
20. The memory storage device of claim 17, wherein: Before the memory control circuit unit obtains the execution number of the first physical unit, the memory control circuit unit is further configured to determine whether an operating temperature or an operating voltage corresponding to the target operation is abnormal, and If at least one of the operating temperature and the operating voltage is abnormal, the memory control circuit unit is further configured to temporarily not mark the first physical unit.
21. The memory storage device of claim 17, wherein: If the execution count and the operation type of the target operation indicate that the first physical unit does not meet the first preset condition, the memory control circuit unit is further configured to temporarily not mark the first physical unit.
22. The memory storage device of claim 17, wherein: If the first physical unit is of the third type, the memory control circuit unit is further configured to mark the first physical unit as the fourth type.
23. The memory storage device of claim 17, wherein: If the first physical unit is not of the third type and the execution number indicates that the first physical unit does not meet the second preset condition, the memory control circuit unit is further configured to mark the first physical unit as the third type.
24. The memory storage device according to claim 23, wherein the memory control circuit unit is further configured to determine whether the target operation is a read operation, If the target operation is a read operation, the memory control circuit unit is further configured to mark the first physical unit as the third type.
25. The memory storage device of claim 24, wherein: If the target operation is not a read operation, the memory control circuit unit is further configured to mark the first physical unit as the fourth type.
26. The memory storage device of claim 17, wherein: If the first physical unit is of the second type, the memory control circuit unit is further configured to mark the first physical unit as the third type.
27. The memory storage device of claim 17, wherein: In an idle state, the memory control circuit unit is further configured to perform a target test operation on the first physical unit marked as the second type based on an access mode of the first physical unit marked as the second type, and If the target test operation is successful, the memory control circuit unit is further configured to re-mark the first physical unit marked as the second type as the first type.
28. The memory storage device of claim 27, wherein: If the target test operation fails and the access mode is a single-level memory cell access mode, the memory control circuit unit is further configured to mark the first physical cell marked as the second type as the fourth type.
29. The memory storage device of claim 27, wherein: If the target test operation fails and the access mode is not a single-level memory cell access mode, the memory control circuit unit is further configured to mark the first physical cell marked as the second type as the third type.
30. The memory storage device of claim 17, wherein: The operation type is used to indicate whether the target operation is an erase operation, a write operation, or a read operation.
31. The memory storage device of claim 17, wherein: The plurality of entity elements are initially all of the first type.
32. The memory storage device of claim 17, wherein: The first physical cell marked as the third type can only be used in a single-level memory cell access mode.
Citation Information
Patent Citations
Memory management method, memory storage device and memory controlling circuit unit
CN106205699A
Data programming method, memory storage device and memory control circuit unit
CN106951186A
Memory management method, memory control circuit unit and memory storage device
CN107102814A
Memory management method, memory storage device and memory control circuit unit
CN118051182A
Apparatus, system and method for determining a configuration parameter for solid-state storage media
EP2549482A1