Memory management method and memory controller
By calculating the critical temperature of the storage device in the memory management method, setting the total power threshold, measuring and designing the test plan, the overheating problem caused by power accumulation during parallel testing of flash memory chips is solved, and a safe and efficient test process is achieved.
Patent Information
- Application Number
- CN202410879018.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-07-02
AI Technical Summary
When testing multiple flash chips in parallel, the accumulation of total power can cause the system to overheat, damaging the particles and affecting the accuracy of test results.
Design a memory management method that sets the total power threshold by calculating the critical temperature of the storage device, performs erase, write, and read operations on multiple chips, measures the power of each chip, and designs multiple chips based on these data. test plans to ensure that the total power of each test plan is less than the threshold, thereby executing test operations in sequence.
All test procedures are executed safely and efficiently without exceeding the total power threshold to ensure the safety and efficiency of the test.
Smart Images

Figure CN118838544A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a memory management technology, and in particular to a memory controller for a storage device equipped with a non-volatile memory and a memory management method used therein. Background Art
[0002] Non-volatile memory refers to computer memory in which the stored data does not disappear when the current is cut off. It has the advantages of non-volatility, power saving, small size and no mechanical structure, and is widely used in various electronic devices.
[0003] Common non-volatile memory uses flash memory chips for storage, and its performance and reliability directly affect the quality of the final product. The mass production test program is a key step to ensure that each chip meets industrial standards. The mass production test program will erase, write, and read the flash memory chip to verify that it meets the predetermined performance indicators.
[0004] However, when testing multiple chips in parallel, since each chip consumes power during the test operation, the accumulation of total power may cause the system to overheat, which will not only damage the chip but also cause inaccurate test results. Summary of the invention
[0005] The purpose of the present invention is to solve the above-mentioned problem and to design a test process to execute multiple test plans in sequence. When the total power does not cause overheating, parallel test operations are performed on multiple chips to safely and efficiently execute all test programs on the storage device.
[0006] One or more embodiments of the present invention provide a memory management method for a memory controller of a storage device configured with a rewritable non-volatile memory module, comprising: calculating a total power threshold according to a critical temperature of the storage device; performing an erase operation, a write operation, and a read operation on a plurality of chips of a plurality of chip enable pins respectively, so as to measure the erase power, the write power, and the read power of a single chip corresponding to each chip enable pin of the rewritable non-volatile memory module of the storage device; designing a plurality of test plans according to the erase power, the write power, and the read power, executing the plurality of test plans, and measuring a plurality of total powers of the storage device when executing the plurality of test plans, wherein each test plan is a total power of the storage device. The test plan instructs multiple test chips among the multiple chips to perform test operations respectively, wherein the test operations include the erase operation, the write operation or the read operation, and the test operations performed by each test chip are the same or different; according to the multiple total powers and the total power threshold, multiple candidate test plans among the multiple test plans are determined, wherein the total power corresponding to each candidate test plan in the multiple total powers is less than the total power threshold; and multiple target test plans are selected from the multiple candidate test plans, and the multiple target test plans are sorted so as to sequentially execute multiple test operations corresponding to the multiple target test plans to the multiple chips based on the sorted multiple target test plans.
[0007] In one or more embodiments of the present invention, the method also includes: setting an idle period in which the storage device does not perform any operation, and measuring the power consumed by the storage device during the idle period as idle power; when the erase operation is performed on the first physical block of the first chip corresponding to the first chip enable pin, measuring the first power consumed by the storage device as the first erase power of the first physical block; when the write operation is performed on the first physical block, measuring the second power consumed by the storage device as the first write power of the first physical block; and when the read operation is performed on the first physical block, measuring the third power consumed by the storage device as the first read power of the first physical block.
[0008] In one or more embodiments of the present invention, executing the multiple test plans and measuring the multiple total powers of the storage device when executing the multiple test plans includes: for a first test plan among the multiple test plans, identifying the multiple first test chips corresponding to the first test plan; according to the first test plan, setting a first test operation to be performed by each first test chip, wherein the first test operation includes the erase operation, the write operation or the read operation; when the corresponding first test operation is performed on the first test entity block of each first test chip at the same time, measuring the fourth power consumed by the storage device as the first test total power of the first test plan.
[0009] In one or more embodiments of the present invention, the method further includes calculating the total power threshold according to the device critical temperature of the storage device based on the following formula:
[0010] P=kT n
[0011] Wherein, P represents the total power threshold, T represents the critical temperature of the device, and k and n are predetermined constants.
[0012] In one or more embodiments of the present invention, the multiple target test plans are selected from the multiple candidate test plans, and the step of sorting the multiple target test plans is based on the following benchmarks: the test entity block of each target test plan must first be subjected to an erase test operation corresponding to the erase operation; the write test operation corresponding to the write operation performed on the test entity block must be performed after the erase operation on the test entity block is completed; the read test operation corresponding to the read operation performed on the test entity block must be performed after the write operation on the test entity block is completed; the write test operation and the read test operation must be performed in parallel on multiple test entity blocks of multiple test chips corresponding to multiple chip enable pins; and the write test operation and the read test operation are performed on the test entity block of each test chip according to the physical block order of each test chip.
[0013] One or more embodiments of the present invention also provide a memory controller for controlling a storage device configured with a rewritable non-volatile memory module. The memory controller includes: a memory interface control circuit for electrically connecting to the rewritable non-volatile memory module; a buffer memory; and a processor electrically connected to the memory interface control circuit and the buffer memory, wherein the processor is further electrically connected to a connection interface circuit of the storage device to electrically connect to a host system. The processor is configured to: calculate a total power threshold according to a critical temperature of the storage device; perform erase operations, write operations, and read operations on multiple chips of multiple chip enable pins respectively to measure the erase power, write power, and read power of a single chip corresponding to each chip enable pin of the rewritable non-volatile memory module of the storage device; design multiple test plans according to the erase power, the write power, and the read power, execute the multiple test plans, and measure multiple total powers of the storage device when executing the multiple test plans, wherein each test plan instructs multiple test chips among the multiple chips to perform the erase power, the write power, and the read power respectively. A test operation, wherein the test operation includes the erase operation, the write operation or the read operation, and the test operation performed by each test chip is the same or different; determining multiple candidate test plans among the multiple test plans according to the multiple total powers and the total power threshold, wherein the total power corresponding to each candidate test plan in the multiple total powers is less than the total power threshold; and selecting multiple target test plans from the multiple candidate test plans, sorting the multiple target test plans, so as to sequentially execute multiple test operations corresponding to the multiple target test plans to the multiple chips based on the sorted multiple target test plans.
[0014] Based on the above, the memory management method and memory controller provided by the embodiment of the present invention can set multiple test plans according to the total power threshold corresponding to the critical temperature of the calculated memory device, so as to perform test operations on multiple chips corresponding to multiple chip enable pins in sequence, so as to perform test operations on multiple chips in parallel without exceeding the total power threshold. In this way, not only can the security of the overall test program be guaranteed, but all chips of the memory device can also be tested efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings are included to provide a further understanding of the present invention and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the present invention and together with the description serve to explain the principles of the present invention.
[0016] Figure 1 is a block diagram of a host system and a storage device according to an embodiment of the present invention;
[0017] Figure 2 is a flowchart of a memory management method according to an embodiment of the present invention;
[0018] Figure 3 A schematic diagram of multiple test plans according to an embodiment of the present invention;
[0019] Figure 4 A schematic diagram of performing multiple test operations on multiple chip enable pins in sequence according to a plurality of sorted target test plans according to an embodiment of the present invention;
[0020] Figure 5 It is a schematic diagram showing how to sequentially perform multiple test operations on multiple chip enable pins according to multiple sorted target test plans according to another embodiment of the present invention.
[0021] Description of Figure Numbers
[0022] 10: Host system
[0023] 20: Storage device
[0024] 211: First processor
[0025] 110: Second processor
[0026] 120: Host memory
[0027] 130: Data transmission interface circuit
[0028] 210: Memory Controller
[0029] 212: Data management circuit
[0030] 213: Memory interface control circuit
[0031] 214: Buffer memory
[0032] 220: Rewritable non-volatile memory module
[0033] 230: Connecting interface circuit
[0034] S210, S220, S230, S240, S250: Process steps of the memory management method
[0035] TB1~TB4:Table
[0036] CE0~CE3: Chip enable pins
[0037] TP1~TP9: Test plan
[0038] P1~P9: total power DETAILED DESCRIPTION
[0039] 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.
[0040] Figure 1 FIG. 1 is a block diagram of a host system and a storage device according to an embodiment of the present invention. Figure 1 , the host system 10 is, for example, a personal computer, a notebook computer, or a server. The host system 10 includes a processor 110 (also referred to as a second processor), a host memory 120, and a data transfer interface circuit 130. In the present embodiment, the processor 110 is coupled (also referred to as electrically connected) to the host memory 120 and the data transfer interface circuit 130. In another embodiment, the processor 110, the host memory 120, and the data transfer interface circuit 130 are electrically connected to each other using a system bus. In the present embodiment, the processor 110, the host memory 120, and the data transfer interface circuit 130 may be disposed on a motherboard of the host system 10.
[0041] The storage device 20 includes a storage controller 210, a rewritable non-volatile memory module 220, and a connection interface circuit 230. The storage controller 210 includes a processor 211 (also called a first processor), a data management circuit 212, and a memory interface control circuit 213.
[0042] In this embodiment, the host system 10 is electrically connected to the storage device 20 through the data transmission interface circuit 130 and the connection interface circuit 230 of the storage device 20 to perform data access operations. For example, the host system 10 can store data to the storage device 20 or read data from the storage device 20 via the data transmission interface circuit 130.
[0043] In this embodiment, the number of the data transmission interface circuit 130 can be one or more. Through the data transmission interface circuit 130, the motherboard can be electrically connected to the storage device 20 via a wired or wireless manner. The storage device 20 can be, for example, a USB flash drive, a memory card, a solid state drive (SSD) or a wireless memory storage device. The wireless memory storage device can 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 consumption Bluetooth memory storage device (e.g., iBeacon) and other memory storage devices based on various wireless communication technologies. In addition, the motherboard can also be electrically connected to various I / O devices such as a global positioning system (GPS) module, a network interface card, a wireless transmission device, a keyboard, a screen, a speaker, etc. through a system bus.
[0044] In this embodiment, the data transmission interface circuit 130 and the connection interface circuit 230 are interface circuits compatible with the high-speed peripheral component interconnect interface (Peripheral Component Interconnect Express, PCI Express) standard. In addition, the data transmission interface circuit 130 and the connection interface circuit 230 use the fast non-volatile memory interface standard (Non-Volatile Memory express, NVMe) communication protocol to transmit data.
[0045] Furthermore, in another embodiment, the connection interface circuit 230 and the memory controller 210 may be packaged in one chip, or the connection interface circuit 230 may be disposed outside a chip including the memory controller 210 .
[0046] In the present embodiment, the host memory 120 is used to temporarily store instructions or data executed by the processor 110. For example, in the present embodiment, the host memory 120 may be a dynamic random access memory (DRAM), a static random access memory (SRAM), etc. However, it should be understood that the present invention is not limited thereto, and the host memory 120 may also be other suitable memories.
[0047] The memory controller 210 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 220 according to instructions of the host system 10 .
[0048] In more detail, the processor 211 in the memory controller 210 is hardware with computing capabilities, which is used to control the overall operation of the memory controller 210. Specifically, the processor 211 is programmed by a plurality of control instructions / program codes, and when the storage device 20 operates, these control instructions / program codes are executed to perform operations such as writing, reading and erasing data. In addition, in this embodiment, the control instructions / program codes can be further executed to perform data reading operations to implement the data reading method provided by the present invention. The control instructions / program codes corresponding to the data reading method can be further implemented as a circuit unit in the form of hardware to implement the data reading method provided by the present invention.
[0049] It is worth mentioning that in the present embodiment, the processor 110 and the processor 211 are, for example, a central processing unit (CPU), a microprocessor, or other programmable processing units (Microprocessor), a digital signal processor (DSP), a programmable controller, an application specific integrated circuit (ASIC), a programmable logic device (PLD) or other similar circuit components, but the present invention is not limited thereto.
[0050] In this embodiment, as described above, the memory controller 210 further includes a data management circuit 212 and a memory interface control circuit 213. It should be noted that the operations performed by the various components of the memory controller 210 can also be regarded as the operations performed by the memory controller 210.
[0051] The data management circuit 212 is electrically connected to the processor 211, the memory interface control circuit 213 and the connection interface circuit 230. The data management circuit 212 is used to receive instructions from the processor 211 to transmit data. For example, data is read from the host system 10 (e.g., the host memory 120) via the connection interface circuit 230, and the read data is written to the rewritable non-volatile memory module 220 via the memory interface control circuit 213 (e.g., the write operation is performed according to the write instruction from the host system 10). For another example, data is read from one or more physical units of the rewritable non-volatile memory module 220 via the memory interface control circuit 213 (the data can be read from one or more storage units in the one or more physical units), and the read data is written to the host system 10 (e.g., the host memory 120) via the connection interface circuit 230 (e.g., the read operation is performed according to the read instruction from the host system 10). In another embodiment, the data management circuit 212 can also be integrated into the processor 211.
[0052] The memory interface control circuit 213 is used to receive instructions from the processor 211 and cooperate with the data management circuit 212 to perform a write (also called programming) operation, a read operation or an erase operation on the rewritable non-volatile memory module 220 .
[0053] In addition, the data to be written to the rewritable non-volatile memory module 220 will be converted into a format acceptable to the rewritable non-volatile memory module 220 via the memory interface control circuit 213. Specifically, if the processor 211 wants to access the rewritable non-volatile memory module 220, the processor 211 will transmit a corresponding instruction sequence to the memory interface control circuit 213 to instruct the memory interface control circuit 213 to perform a corresponding operation. For example, these instruction sequences may include a write instruction sequence indicating writing data, a read instruction sequence indicating reading data, an erase instruction sequence indicating erasing data, and corresponding instruction sequences for indicating various memory operations. These instruction sequences may include one or more signals, or data on the bus. These signals or data may include instruction codes or program codes. For example, in the read instruction sequence, information such as the read identification code, memory address, and physical address will be included.
[0054] In addition, the memory controller 210 establishes a logical to physical address mapping table (Logical To Physical address mapping table) and a physical to logical address mapping table (Physical To Logical address mapping table) to record the mapping relationship between the logical address of the logical unit (e.g., logical block, logical page) configured for the rewritable non-volatile memory module 220 and the physical address (physical address) of the physical unit (e.g., physical erase unit / physical block, physical page). In other words, the memory controller 210 can search for the physical unit mapped by a logical unit (e.g., search for the physical page mapped by a logical page; search for the physical address mapped by a logical address) through the logical to physical address mapping table (also called the logical to physical mapping table), and the memory controller 210 can search for the logical unit mapped by a physical unit (e.g., search for the logical page mapped by a physical page; search for the logical address mapped by a physical address) through the physical to logical address mapping table (also called the physical to logical mapping table).
[0055] In one embodiment, the memory controller 210 further includes a buffer memory 214. The buffer memory is electrically connected to the processor 211 and is used to temporarily store data and instructions from the host system 10, data from the rewritable non-volatile memory module 220, or other system data for managing the storage device 20 (e.g., various mapping tables, test plan information, critical temperature values, total power thresholds), so that the processor 211 can quickly access the data, instructions or system data from the buffer memory 216. In one embodiment, the memory controller 210 can establish one or more write mapping tables in the buffer memory 214 to indicate the target physical address for writing valid data.
[0056] The rewritable non-volatile memory module 220 is electrically connected to the memory controller 210 (memory interface control circuit 213 ) and is used to store user data sent by the host system 10 .
[0057] In the present embodiment, each memory grain (chip) of the multiple memory grains of the rewritable non-volatile memory module 220 has multiple planes, and each plane has multiple physical blocks. Each physical block includes multiple physical programming units (also called physical pages). Each physical page has multiple storage cells (also called physical bytes or bytes), and each storage cell corresponds to a physical address. The physical address is used to record the physical location of the data stored in the storage cell. It should be noted that the present invention is not limited to the size of each physical page and logical page.
[0058] The chip enable (CE) signal plays a vital role in controlling the access and operation of the memory chip. It acts as a gate controller, regulating when and how data is read from or written to the chip. The rewritable non-volatile memory module 220 typically includes multiple CE pins, each of which is capable of independently controlling a separate physical chip within the chip. This enables parallel processing of read and write operations, thereby increasing data transmission speeds. For example, using multiple CE pins, data can be read or written from multiple chips or blocks at the same time, significantly increasing data throughput. In addition, simultaneous read and write operations on the same CE pin can cause data conflicts.
[0059] Figure 2 The figure is a flowchart of a memory management method according to an embodiment of the present invention.
[0060] Please refer to Figure 2 In step S210, the memory controller 210 calculates the total power threshold according to the critical temperature of the storage device 20. The critical temperature of the storage device 20 is a preset specification of the storage device 20, which can be provided by the manufacturer of the storage device.
[0061] In one embodiment, the memory controller 210 calculates the total power threshold according to the critical temperature of the memory device based on the following formula:
[0062] P=kT n
[0063] Wherein, P represents the total power threshold, T represents the critical temperature of the device, and k and n are predetermined constants.
[0064] For example, k and n can be calculated through experiments based on the known temperature and total power of the storage device. Then, according to this formula, the corresponding power P can be calculated according to the critical temperature of the device.
[0065] Next, in step S220, the memory controller 210 performs erase operations, write operations and read operations on multiple chips of multiple chip enable pins respectively to measure the erase power, write power and read power of a single chip corresponding to each chip enable pin of the rewritable non-volatile memory module 220 of the storage device.
[0066] That is, in this step, for the chip corresponding to each chip enable pin (CE), the memory controller 210 will select a physical block from them to perform a test operation to measure the power consumed by each physical block of each CE when performing different test operations. For example, if there are four CEs, the memory controller 210 will select a physical block for each CE to perform an erase operation to obtain / measure the erase power, perform a write operation to obtain / measure the write power, and perform a read operation to obtain / measure the read power, and then determine whether the power consumed by each physical block of each CE when performing different test operations exceeds a threshold.
[0067] More specifically, in one embodiment, the memory controller 210 sets an idle period in which the storage device 20 does not perform any operation, and measures the power consumed by the storage device 20 during the idle period as the idle power. When the memory controller 210 performs an erase operation on the physical block of the chip of each chip enable pin separately, the first power consumed by the storage device 20 corresponding to each chip is obtained as the corresponding erase power. When the memory controller 210 performs a write operation on the physical block of the chip of each chip enable pin separately, the second power consumed by the storage device 20 corresponding to each chip is obtained as the corresponding write power. When the memory controller 210 performs a read operation on the physical block of the chip of each chip enable pin separately, the third power consumed by the storage device 20 corresponding to each chip is obtained as the corresponding read power.
[0068] In step S230, the memory controller 210 designs multiple test plans based on the erase power, the write power, and the read power, executes the multiple test plans, and measures multiple total powers of the storage device 20 when executing the multiple test plans, wherein each test plan instructs multiple test chips among the multiple chips to perform test operations respectively, wherein the test operations include the erase operation, the write operation, or the read operation, and the test operations performed by each test chip are the same or different.
[0069] That is to say, in this step, the memory controller 210 selects one or more CEs from all CEs to add to a test plan, and the test operations to be performed by each CE can be the same or different. Taking 4 CEs (CE0-CE3) as an example, the test plan can be: CE0-CE3 perform an erase operation together; CE0-CE3 perform a write operation together; CE0-CE3 perform a read operation together; CE0 and CE1 perform a write operation, CE2 and CE3 perform a read operation; CE0 and CE1 perform a read operation, CE2 and CE3 perform a write operation, and so on. In addition, when the memory controller 210 performs test operations on different CEs according to each test plan, the total power of the storage device 20 corresponding to different test plans is measured.
[0070] More specifically, in one embodiment, executing the multiple test plans and measuring the multiple total powers of the storage device when executing the multiple test plans includes: for a first test plan among the multiple test plans, identifying the multiple first test chips corresponding to the first test plan; according to the first test plan, setting a first test operation to be performed by each first test chip, wherein the first test operation includes the erase operation, the write operation or the read operation; and when the corresponding first test operation is performed on the first test entity block of each first test chip at the same time, measuring the fourth power consumed by the storage device, and taking the fourth power as the first test total power of the first test plan.
[0071] Figure 3 Schematic diagram of multiple test plans according to an embodiment of the present invention. For example, please refer to Figure 3 , assuming that the rewritable non-volatile memory module 220 has 4 CEs.
[0072] As shown in Table TB1, test plan TP1 indicates that an erase operation is performed on the physical blocks of chips CE0, CE1, CE2, and CE3 at the same time; test plan TP2 indicates that a write operation is performed on the physical blocks of chips CE0, CE1, CE2, and CE3 at the same time; test plan TP3 indicates that a read operation is performed on the physical blocks of chips CE0, CE1, CE2, and CE3 at the same time; test plan TP4 indicates that an erase operation is performed on the physical blocks of chips CE0 and CE1 at the same time, and no test operation is performed on chips CE2 and CE3 (CE2 and CE3 are in an idle state); test plan TP5 indicates that an erase operation is performed on the physical blocks of chips CE2 and CE3 at the same time, and no test operation is performed on chips CE0 and CE1 (CE0, CE1 are in an idle state). E1 is in idle state); test plan TP6 indicates that a write operation is performed on the physical blocks of the chips of CE0 and CE1 at the same time, and no test operation is performed on the chips of CE2 and CE3 (CE2 and CE3 are in idle state); test plan TP7 indicates that a write operation is performed on the physical blocks of the chips of CE2 and CE3 at the same time, and no test operation is performed on the chips of CE0 and CE1 (CE0 and CE1 are in idle state); test plan TP8 indicates that a write operation is performed on the physical blocks of the chips of CE0 and CE1 at the same time, and a read test operation is performed on the physical blocks of the chips of CE2 and CE3; test plan TP9 indicates that a read operation is performed on the physical blocks of the chips of CE0 and CE1 at the same time, and a write test operation is performed on the physical blocks of the chips of CE2 and CE3.
[0073] In addition, during the execution of each of the above test plans by the memory controller 210, the total power of the memory device 20 corresponding to each test plan is measured. For example, the total power P1-P9 corresponding to the test plans TP1-TP9 is measured.
[0074] Please come back Figure 2 In step S240, the memory controller 210 determines multiple candidate test plans among the multiple test plans based on the multiple total powers and the total power threshold, wherein the total power corresponding to each candidate test plan among the multiple total powers is less than the total power threshold. That is to say, after obtaining the total power of each test plan, the memory controller 210 will eliminate the test plans whose total power is greater than the total power threshold, and retain the test plans whose total power is greater than the total power threshold as candidate test plans, so that these retained test plans can be used for subsequent test procedures for all physical blocks of the entire storage device 20. In this way, it can be ensured that when the candidate test plan is applied, the total power of the storage device 20 will not exceed the total power threshold, that is, the temperature of the storage device 20 will not exceed the critical temperature of the device, thereby ensuring the safety of the test procedure.
[0075] Next, in step S250, the memory controller 210 selects multiple target test plans from the multiple candidate test plans, sorts the multiple target test plans, and sequentially executes multiple test operations corresponding to the multiple target test plans to the multiple chips based on the sorted multiple target test plans.
[0076] In one embodiment, the multiple target test plans are selected from the multiple candidate test plans, and the step of sorting the multiple target test plans is based on the following benchmark (also called test benchmark) to design a reasonable test process: the test entity block of each target test plan must first be subjected to an erase test operation corresponding to the erase operation; the write test operation corresponding to the write operation performed on the test entity block must be performed after the erase operation on the test entity block is completed; the read test operation corresponding to the read operation performed on the test entity block must be performed after the write operation on the test entity block is completed; the write test operation and the read test operation must be performed in parallel on multiple test entity blocks of multiple test chips corresponding to multiple chip enable pins; and the write test operation and the read test operation are performed on the test entity block of each test chip according to the physical block order of each test chip.
[0077] Specifically, when a test operation is performed on a physical block (also called a test physical block), an erase operation (also called an erase test operation) is performed first, followed by a write operation (also called a write test operation), and finally a read operation (also called a read test operation). In addition, in order to speed up the running of the test program, the test operation is performed on at least two physical blocks of CEs at the same time (when the power threshold allows, parallel testing is selected as much as possible to improve the test efficiency), and the order in which the physical blocks of a CE are tested is based on the physical block arrangement order of the CE (the order of the physical addresses).
[0078] Figure 4 The schematic diagram of performing multiple test operations on multiple chip enable pins in sequence according to the sorted multiple target test plans shown in an embodiment of the present invention. For example, assuming that there are test plans TP1-TP9, and the total power P2 of the test plan TP2 in the test plans TP1-TP9 is greater than the total power threshold, the memory controller 210 will determine the test plans TP1 and TP3-TP9 as candidate test plans (the total powers P1 and P3-P9 are not greater than the total power threshold).
[0079] After determining the candidate test plans TP1, TP3-TP9, the memory controller 210 selects the multiple target test plans from the multiple candidate test plans according to the above-mentioned benchmark, and sorts the multiple target test plans.
[0080] For example, in one embodiment, as shown in Table TB2, the memory controller 210 selects target test plans TP1, TP6, TP8, TP9 and TPN (not shown) from the candidate test plans TP1, TP3-TP9, and sorts and applies these target test plans to perform test operations on the physical blocks of each CE. It should be noted that the test plan TPN is used to indicate that the read test operation is performed on the physical blocks of CE2 and CE3 at the same time.
[0081] Initially, the memory controller 210 performs an erase test operation on all physical blocks CE0 ˜ CE3 according to the test plan TP1 .
[0082] Next, the test plan TP6 is selected, and a write test operation is performed on the physical block B0 of CE0 ˜ CE1 according to the test plan TP6 .
[0083] Next, the test plan TP9 is selected, and according to the test plan TP9, a read test operation is performed on the physical block B0 of CE0 ˜ CE1 , and a write test operation is performed on the physical block B0 of CE2 ˜ CE3 .
[0084] Next, the test plan TP8 is selected, and according to the test plan TP8, a write test operation is performed on the physical block B1 of CE0 ˜ CE1 , and a read test operation is performed on the physical block B0 of CE2 ˜ CE3 .
[0085] And so on, until all physical blocks have completed the read test operation (for example, applying the test plan TPN to the last physical block of CE2 and CE3), while ensuring that the total power of the storage device 20 is not higher than the total power threshold, the entire test procedure for the storage device 20 is completed by executing test operations on multiple CEs in parallel.
[0086] Figure 5 It is a schematic diagram showing how to sequentially perform multiple test operations on multiple chip enable pins according to multiple sorted target test plans according to another embodiment of the present invention.
[0087] Similar to Figure 4 For example, assuming that there are test plans TP1~TP9, and the total powers P1 and P2 of test plans TP1 and TP2 in test plans TP1~TP9 are greater than the total power threshold, the memory controller 210 will select test plans TP3~TP9 as candidate test plans (total powers P3~P9 are not greater than the total power threshold).
[0088] After determining the candidate test plans TP3-TP9, the memory controller 210 selects the multiple target test plans from the multiple candidate test plans according to the above-mentioned benchmark, and sorts the multiple target test plans.
[0089] For example, in one embodiment, as shown in Table TB2, the memory controller 210 selects target test plans TP4-6, TP8-TP9 and TPN (not shown) from the candidate test plans TP3-TP9, and sorts and applies these target test plans to perform test operations on the physical blocks of each CE. It should be noted that the test plan TPN is used to indicate that the read test operation is performed on the physical blocks of CE2 and CE3 at the same time.
[0090] Initially, the memory controller 210 performs an erase test operation on all physical blocks of CE0 and CE1 according to the test plan TP4 ; and performs an erase test operation on all physical blocks of CE2 and CE3 according to the test plan TP5 .
[0091] After all physical blocks have completed the erase operation, the memory controller 210 then selects the test plan TP6 and performs a write test operation on the physical block B0 of CE0 ˜ CE1 according to the test plan TP6 .
[0092] Next, the test plan TP9 is selected, and according to the test plan TP9, a read test operation is performed on the physical block B0 of CE0 ˜ CE1 , and a write test operation is performed on the physical block B0 of CE2 ˜ CE3 .
[0093] Next, the test plan TP8 is selected, and according to the test plan TP8, a write test operation is performed on the physical block B1 of CE0 ˜ CE1 , and a read test operation is performed on the physical block B0 of CE2 ˜ CE3 .
[0094] And so on, until all physical blocks have completed the read test operation (for example, applying the test plan TPN to the last physical block of CE2 and CE3), and the entire test procedure of the storage device 20 is completed by executing test operations on multiple CEs in parallel while ensuring that the total power of the storage device 20 is not higher than the total power threshold.
[0095] It should be noted that the present invention is not limited to the above-mentioned Figure 4 , Figure 5 In other words, as long as the above test benchmarks are met, the designed / arranged multiple test plans are within the scope of the present invention.
[0096] This embodiment also provides a computer program product, including a computer readable code, or a non-volatile computer readable storage medium carrying the computer readable code, when the computer readable code runs in the processor of the storage device, the processor in the storage device executes the steps of the above-mentioned memory management method. The computer program product can be implemented in hardware, firmware, software or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium, and in another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
[0097] Based on the above, the memory management method and memory controller provided by the embodiment of the present invention can set multiple test plans according to the total power threshold corresponding to the critical temperature of the calculated memory device, so as to perform test operations on multiple chips corresponding to multiple chip enable pins in sequence, so as to perform test operations on multiple chips in parallel without exceeding the total power threshold. In this way, not only can the security of the overall test program be guaranteed, but all chips of the memory device can also be tested efficiently.
[0098] 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 management method, applicable to a memory controller of a storage device equipped with a rewritable non-volatile memory module, characterized in that: include: Calculating a total power threshold according to a critical temperature of the storage device; Performing erase operations, write operations, and read operations on multiple chips corresponding to multiple chip enable pins respectively, so as to measure the erase power, write power, and read power of a single chip corresponding to each chip enable pin in the rewritable non-volatile memory module; Determine and execute a plurality of test plans according to the erase power, the write power, and the read power, and obtain a plurality of total powers of the storage device when executing the plurality of test plans, wherein each test plan instructs a plurality of test chips among the plurality of chips to respectively perform a test operation, wherein the test operation includes the erase operation, the write operation, or the read operation, and the test operation performed by each test chip is the same or different; Determine a plurality of candidate test plans among the plurality of test plans according to the plurality of total powers and the total power threshold, wherein the total power corresponding to each candidate test plan among the plurality of total powers is less than the total power threshold; as well as A plurality of target test plans are selected from the plurality of candidate test plans, and the plurality of target test plans are sorted so as to sequentially execute a plurality of test operations corresponding to the plurality of target test plans on the plurality of chips based on the sorted plurality of target test plans.
2. The memory management method according to claim 1, characterized in that: Measuring the erase power, write power and read power of a single chip corresponding to each chip enable pin in the rewritable non-volatile memory module includes: Performing the erase operation separately on the physical block of the chip of each chip enable pin, and acquiring the first power consumed by the storage device corresponding to each chip as the corresponding erase power; When the write operation is performed separately on the physical block of the chip of each chip enable pin, the second power consumed by the storage device corresponding to each chip is obtained as the corresponding write power; and When the read operation is performed separately on the physical blocks of the chip of each chip enable pin, the third power consumed by the storage device corresponding to each chip is obtained as the corresponding read power.
3. The memory management method according to claim 2, characterized in that: Executing the plurality of test plans and obtaining the plurality of total powers of the storage device when executing the plurality of test plans comprises: For a first test plan among the plurality of test plans, identifying a plurality of first test chips corresponding to the first test plan; According to the first test plan, setting a first test operation to be performed by each first test chip, wherein the first test operation includes the erase operation, the write operation or the read operation; and When the first test operation corresponding to each first test entity block of each first test chip is executed simultaneously, the fourth power consumed by the storage device is measured, and the fourth power is used as the first test total power of the first test plan.
4. The memory management method according to claim 1, characterized in that: Based on the following formula, the total power threshold is calculated according to the device critical temperature of the storage device: P=kT n Wherein, P represents the total power threshold, T represents the critical temperature of the device, and k and n are predetermined constants.
5. The memory management method according to claim 1, characterized in that: The step of selecting the plurality of target test plans from the plurality of candidate test plans, and sorting the plurality of target test plans is based on the following criteria: Each test entity block of the target test plan must first be subjected to an erase test operation corresponding to the erase operation; The write test operation corresponding to the write operation performed on the test entity block needs to be performed after the erase operation on the test entity block is completed; The read test operation corresponding to the read operation performed on the test entity block needs to be performed after the write operation on the test entity block is completed; The write test operation and the read test operation need to be performed in parallel on multiple test entity blocks of multiple test chips corresponding to multiple chip enable pins; as well as The write test operation and the read test operation are performed on the test physical blocks of each test chip according to the physical block sequence of each test chip.
6. A memory controller for controlling a storage device equipped with a rewritable non-volatile memory module, characterized in that: The memory controller comprises: A memory interface control circuit, for electrically connecting to the rewritable non-volatile memory module; and a processor, electrically connected to the memory interface control circuit, wherein the processor is configured to: Calculating a total power threshold according to a critical temperature of the storage device; Performing erase operations, write operations, and read operations on multiple chips of multiple chip enable pins respectively to measure the erase power, write power, and read power of a single chip corresponding to each chip enable pin of the rewritable non-volatile memory module of the storage device; Determine and execute a plurality of test plans according to the erase power, the write power, and the read power, and obtain a plurality of total powers of the storage device when executing the plurality of test plans, wherein each test plan instructs a plurality of test chips among the plurality of chips to respectively perform a test operation, wherein the test operation includes the erase operation, the write operation, or the read operation, and the test operation performed by each test chip is the same or different; Determine a plurality of candidate test plans among the plurality of test plans according to the plurality of total powers and the total power threshold, wherein the total power corresponding to each candidate test plan among the plurality of total powers is less than the total power threshold; and A plurality of target test plans are selected from the plurality of candidate test plans, and the plurality of target test plans are sorted so as to sequentially execute a plurality of test operations corresponding to the plurality of target test plans on the plurality of chips based on the sorted plurality of target test plans.
7. The memory controller according to claim 6, wherein: The processor is also configured to: Setting an idle period during which the storage device does not perform any operation, and measuring the power consumed by the storage device during the idle period as idle power; When performing the erase operation on the first physical block of the first chip corresponding to the first chip enable pin, measuring the first power consumed by the storage device as the first erase power of the first physical block; When performing the write operation on the first physical block, measuring a second power consumed by the storage device as a first write power of the first physical block; as well as When the read operation is performed on the first physical block, a third power consumed by the storage device is measured as a first read power of the first physical block.
8. The memory controller according to claim 7, wherein: Executing the plurality of test plans and measuring the plurality of total powers of the storage device when executing the plurality of test plans comprises: For a first test plan among the plurality of test plans, identifying a plurality of first test chips corresponding to the first test plan; According to the first test plan, setting a first test operation to be performed by each first test chip, wherein the first test operation includes the erase operation, the write operation or the read operation; and When the first test operation corresponding to the first test entity block of each first test chip is executed simultaneously, the fourth power consumed by the storage device is measured as the first test total power of the first test plan.
9. The memory controller according to claim 6, wherein: The processor is also configured to: Based on the following formula, the total power threshold is calculated according to the device critical temperature of the storage device: P=kT n Wherein, P represents the total power threshold, T represents the critical temperature of the device, and k and n are predetermined constants.
10. The memory controller according to claim 6, wherein: The step of selecting the plurality of target test plans from the plurality of candidate test plans, and sorting the plurality of target test plans is based on the following criteria: Each test entity block of the target test plan must first be subjected to an erase test operation corresponding to the erase operation; The write test operation corresponding to the write operation performed on the test entity block needs to be performed after the erase operation on the test entity block is completed; The read test operation corresponding to the read operation performed on the test entity block needs to be performed after the write operation on the test entity block is completed; The write test operation and the read test operation need to be performed in parallel on multiple test entity blocks of multiple test chips corresponding to multiple chip enable pins; as well as The write test operation and the read test operation are performed on the test physical blocks of each test chip according to the physical block sequence of each test chip.
Citation Information
Patent Citations
Chip automatic production method, computer device and computer readable storage medium
CN109784815A
Dynamic power analysis with per-memory instance activity customization
CN110299179A
Memory management method and memory controller
CN110795025A
Memory test method and memory test system
CN110875081A
Wireless board card automatic testing device and method based on throughput measurement
CN114726768A
Cited By
Memory management method and memory controller
CN121034375A
Memory management method and memory controller
CN121034375B
