Storage device and data block erasing method thereof

By performing data block erasing operations in a storage device in step by step and allowing high-priority data access after each step, the problem of extended data block erasing time in traditional storage devices is solved, and the performance of storage devices is improved and reliability.

CN119248189AActive Publication Date: 2025-01-03T-HEAD (SHANGHAI) SEMICON CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411305781.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-03
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

Traditional storage devices do not support insertion and write operations during data block erasing, resulting in an extended erase time of data blocks, affecting the data storage and access performance of storage devices.

Method used

The erase operation reliability is ensured by recording data blocks in different erase steps in a list of multiple data blocks, performing erase operations in steps, and allowing high-priority data access operations after each step is completed.

Benefits of technology

It reduces data access latency, improves the overall performance of storage devices, and supports high-priority data access during erasing operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248189A_ABST
    Figure CN119248189A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a storage device and a data block erasing method thereof, and the method comprises the steps: determining a target data block from a plurality of data block lists, issuing a target erasing instruction of the target data block, and executing an erasing operation corresponding to a target step indicated by the target erasing instruction on the target data block. The target data blocks subjected to the erasure operation are recorded in target data block lists, and the multiple data block lists comprise the first data block list used for recording the data blocks not subjected to the erasure operation and at least one second data block list used for recording the data blocks subjected to one-step or multi-step erasure operation. Therefore, according to the embodiment of the invention, the data blocks in different erasing steps can be recorded through the data block lists, so that step-by-step erasing of the data blocks is realized, and the storage equipment can execute high-priority data access operation after executing the erasing operation of a certain step; and the data access time delay is reduced while the reliability of the erasing operation is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of semiconductor technology, and more particularly to a storage device and a data block erasing method thereof. Background Art

[0002] As the stack height corresponding to the storage device increases, the height of the metal through-hole becomes higher, resulting in reduced data block erasure efficiency and longer data block erasure time in the storage device. Traditional data erasure solutions do not support insert write operations during the data block erasure process, causing the erase operation to block related data write operations, affecting the data storage and access performance of the storage device. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a storage device and a data block erasing method thereof, so as to record data blocks in different erasing steps through each data block list, thereby realizing step-by-step erasing of data blocks, so that the storage device can perform a high-priority data access operation after executing an erasing operation of a certain step, while ensuring the reliability of the erasing operation, reducing the data access delay and improving the overall performance of the storage device.

[0004] In a first aspect, an embodiment of the present invention provides a method for erasing a data block of a storage device, the method comprising:

[0005] Determine a target data block from a plurality of data block lists, wherein the plurality of data block lists include a first data block list and at least one second data block list, wherein the first data block list is used to record data blocks on which no erasing operation is performed, and the second data block list is used to record data blocks on which one or more erasing operations are performed;

[0006] issuing a target erasing instruction of the target data block to perform a corresponding erasing operation on the target data block, wherein the target erasing instruction has a corresponding target step;

[0007] The target data block after the erasing operation is performed is recorded in a target data block list, and the target data block list is a second data block list that records the erasing operation that completes the target step.

[0008] Furthermore, the method further comprises:

[0009] Query execution status;

[0010] In response to the execution status being execution completed, the received data operation request is executed, and the instruction type corresponding to the data operation request is a write operation or a read operation.

[0011] Furthermore, the query execution status includes:

[0012] The execution status is queried from the corresponding status register, and the execution status is switched when the target erase instruction is started to be executed or the verification of the erase operation corresponding to the target step is executed, and the verification of the erase operation is used to determine whether the target data block reaches the expected erase state.

[0013] Further, determining the target data block from the plurality of data block lists comprises:

[0014] Determine a list of data blocks to be erased according to the number of data blocks in each of the data block lists;

[0015] The target data block is determined from the list of data blocks to be erased.

[0016] Furthermore, the target step is the last erasing operation, and the target data block list is a second data block list for recording free data blocks.

[0017] Furthermore, the method further comprises:

[0018] The execution result of the target data block is queried, the execution result including erasure success and erasure failure, and the execution result is updated after verification of the erasure operation corresponding to the target step is executed.

[0019] In a second aspect, an embodiment of the present invention provides a storage device, the storage device comprising:

[0020] A storage medium, the storage medium comprising a plurality of data blocks for storing data;

[0021] A controller is used to execute the method as described above.

[0022] Furthermore, the storage medium has a corresponding status register, and the status register is used to store the execution status and / or execution result of the erasing operation of the data block in the storage medium.

[0023] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0024] In a fourth aspect, an embodiment of the present invention provides a computer program product, which, when executed on a computer, enables the computer to execute the method described above.

[0025] The embodiment of the present invention determines a target data block from a plurality of data block lists, issues a target erasing instruction for the target data block, performs an erasing operation corresponding to the target step indicated by the target erasing instruction on the target data block, and records the target data block after the erasing operation is performed in the target data block list, wherein the plurality of data block lists include a first data block list for recording data blocks for which the erasing operation has not been performed and at least one second data block list for recording data blocks for which one or more erasing operations have been performed. Thus, the embodiment of the present invention can record different erasing steps of data blocks through each data block list, and then issue and execute different next step instructions for data blocks in different erasing steps, thereby realizing step-by-step erasing of data blocks, so that the storage device can perform a high-priority data access operation after performing an erasing operation of a certain step, while ensuring the reliability of the erasing operation, reducing the delay of data access, and improving the overall performance of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0027] Figure 1 is a flow chart of a method for erasing a data block of a storage device according to an embodiment of the present invention;

[0028] Figure 2 is a flow chart of another method for erasing a data block of a storage device according to an embodiment of the present invention;

[0029] Figure 3 is a schematic diagram of an updating process of a data block list according to an embodiment of the present invention;

[0030] Figure 4 is a flow chart of another method for erasing a data block of a storage device according to an embodiment of the present invention;

[0031] Figure 5 is a schematic diagram of a storage device according to an embodiment of the present invention;

[0032] Figure 6 It is a schematic diagram of a data block erasing device of a storage device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.

[0034] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.

[0035] Unless the context clearly requires otherwise, the words "include", "comprising" and similar words throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is "including but not limited to".

[0036] In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.

[0037] The embodiments of the present invention are mainly described in detail by taking the storage device as a solid state hard disk as an example. It should be understood that the storage device of this embodiment may also be other solid state storage devices, such as an SD card.

[0038] A solid-state drive is a hard drive that uses non-volatile memory to store data, usually implemented using flash memory technology. The solid-state drive consists of a control unit and a storage unit. The storage unit uses flash memory, such as NAND flash memory. The control unit is responsible for data reading, writing, and erasing operations, as well as error correction, garbage collection, and wear leveling to ensure the life of the solid-state drive.

[0039] NAND flash memory is a non-volatile storage technology that keeps data unchanged even when the power is off. NAND flash memory is a common storage medium in solid-state storage devices (such as USB flash drives, solid-state drives SSDs, SD cards, etc.). The basic storage unit of NAND flash memory is composed of a metal-oxide-semiconductor field-effect transistor (MOSFET), which contains a floating gate or charge storage layer. The floating gate or charge storage layer is located below the control gate and is separated by an insulating layer. This floating gate or charge storage layer is where the charge is actually stored, and the presence or absence of charge determines the state of the storage unit.

[0040] Data is stored in NAND flash memory in the form of charge, and the amount of stored charge is controlled by the voltage applied to the control gate. When the voltage of the control gate is high enough, electrons can pass from the source through the thin oxide layer under the floating gate to the floating gate. This process is called programming (writing). If the voltage of the control gate is not enough for electrons to pass through the oxide layer, the charge of the floating gate will be retained until it is cleared by the erase operation. Data is read by detecting whether the charge on the floating gate exceeds a specific threshold voltage Vth. If there is enough charge on the floating gate, the threshold voltage increases, so that when the standard read voltage is applied to the control gate, the transistor is in the off state, which represents the data "0". Conversely, if there is no charge or very little charge on the floating gate, the transistor is in the on state, which represents the data "1". Furthermore, the erase operation of NAND is usually erased in units of data blocks.

[0041] Figure 1 1 is a flow chart of a method for erasing a data block of a storage device according to an embodiment of the present invention. The method for erasing a data block of a storage device according to an embodiment of the present invention can be executed by a controller of the storage device, such as Figure 1 As shown, the data block erasing method of the storage device according to the embodiment of the present invention comprises the following steps:

[0042] Step S110, determining a target data block from a plurality of data block lists, wherein the plurality of data block lists include a first data block list and at least one second data block list, wherein the first data block list is used to record data blocks that have not been erased, and the second data block list is used to record data blocks that have been erased in one or more steps.

[0043] The data block erasing process of the embodiment of the present invention is performed through a multi-step erasing operation, and each erasing operation has a corresponding verification operation (Verify). That is to say, the embodiment of the present invention divides the entire data block erasing process with a long execution time into multiple independent erasing steps, and the execution time of each erasing step is relatively short. After each erasing step is completed, the storage device can first execute a high-priority data operation request, such as a data write request or a data read request, etc. After executing the data operation corresponding to the data operation request, the data erasing operation of the relevant data block can be further executed according to the needs of the storage device. Therefore, this embodiment reduces the data access delay without affecting the data erasing operation and improves the overall performance of the storage device.

[0044] Furthermore, in the present embodiment, data blocks at various erasing progress are recorded through different data block lists. For example, assuming that the predetermined erasing steps of the data blocks include N steps (N≥2), data blocks with an erasing progress of 0 (i.e., data blocks that need to be erased but have not yet been erased) can be recorded through data block list list-0, data blocks with an erasing progress of 1 (i.e., data blocks that have performed the first erasing operation) can be recorded through data block list list-1, and data blocks with an erasing progress of i (i.e., data blocks that have performed the i-th erasing operation) can be recorded through data block list list-i (1≤i≤N). Furthermore, if a group of data blocks undergoes N steps of erasing operations and passes verification (i.e., the group of data blocks reaches the expected erasing state), the group of data blocks is recorded in data block list list-N, that is, data blocks in a free state (Free Block) are recorded in data block list list-N.

[0045] In an optional implementation, an embodiment of the present invention can determine the execution end node of each step by setting the erase time of each erase operation. For example, when the time for controlling the data block to perform the erase operation (such as the voltage holding time of the word line where the data block is located) reaches the erase time threshold of the corresponding step, it is determined that the erase operation of the current step is completed, and the data blocks performing the erase operation are verified, and the execution status of these data blocks is updated to the execution completion state. In other optional implementations, this embodiment can also determine that the erase operation of the current step is completed by the number of erase pulses. This embodiment does not limit how to set the end node of each erase step, and it can be set according to specific needs. Among them, the process of maintaining the voltage of the word line (Word Line, WL) where the data block is located for a period of time to allow electrons to escape from the floating gate (Floating Gate, FG) to the substrate (Substrate) through the tunnel oxide layer is called an erase pulse.

[0046] For another example, when the erase pulse ends, it is determined that the erase operation of the current step is completed, and the data blocks on which the erase operation is performed are verified, and the execution status of the data blocks is updated to the execution completion status.

[0047] In an optional implementation, the embodiment of the present invention can determine the target data blocks for the current erasing operation according to the current performance requirements of the storage device and / or the number of data blocks in each data block list. Optionally, the embodiment of the present invention can determine the data block list to be erased according to the number of data blocks in each data block list, and determine the target data blocks from the data block list to be erased. For example, if the number of data blocks in the data block list list-N is small, that is, the number of data blocks in the idle state is small, and the number of data blocks in the data block list list-N-1 is relatively large, then in order to increase the number of required idle data blocks as soon as possible, the current erasing operation can select a corresponding number of target data blocks from the data block list list-N-1, and perform the Nth step of the erasing operation. Further optionally, the embodiment of the present invention can select a predetermined number of target data blocks from the data block list with the most data blocks, or select a predetermined number of target data blocks from the previous data block list corresponding to the data block list with the least data blocks, or calculate the difference between the i-th data block list and the i+1-th data block list, and determine the predetermined number of target data blocks from the i-th data block list corresponding to the maximum difference. It should be understood that this embodiment does not limit how to select which data block list to determine the target data block from, which can be set according to the specific application scenario and the needs of the storage device. Further, this embodiment does not limit the number of selected target data blocks, which can be determined based on the number supported by the performance of the storage device or the number currently required.

[0048] Step S120, a target erasing instruction of a target data block is issued to perform a corresponding erasing operation on the target data block, wherein the target erasing instruction has a corresponding target step and further comprises address information of the target data block.

[0049] In this embodiment, after selecting a predetermined number of target data blocks from the data block list list-i to be erased, the controller sends a target erase instruction of the target data blocks to the storage medium, wherein the target erase instruction has the corresponding target step (i+1) and the address information of the target data blocks.

[0050] Optionally, after receiving the target erase instruction, the storage medium determines the target data block according to the address information in the target erase instruction, updates the execution state to a busy state (Busy), and initializes the circuit required for the erase operation of the target data block, and then performs precharging, that is, setting the voltage of the control gate (ControlGate, CG) of the storage unit in the target data block to a first voltage (e.g., 0V, or set according to actual needs), and precharging the bit lines (Bit Lines, BL) where the storage unit in the target data block is located to a second voltage (e.g., 0V or other intermediate voltages, that is, between 0-third voltages) to reduce current consumption during erasure, and then enters the erase phase, that is, raising the word line to a third voltage, and maintaining it at the third voltage for a period of time to allow electrons to escape from the floating gate to the substrate through the tunnel oxide layer. It should be understood that the above-mentioned first voltage, second voltage, and third voltage are set according to the erase operation requirements of the actual data block.

[0051] Further, when the erasure time of the current erasure operation of the target data block reaches the erasure time threshold corresponding to the target step (i+1), the verification operation of the current erasure step is performed, and it is determined that the current erasure operation is completed, and the storage medium updates the execution state to the execution completion state (Ready), that is, it can execute the next erasure operation or other data operation request. Further optionally, the verification operation corresponding to each erasure step is to verify whether the target data block has reached the expected erasure state, such as whether all storage units in the target data block are completely erased. After the verification, the execution result (Pass / Fail) is updated, that is, the execution result of the storage medium is updated after the verification of the erasure operation corresponding to the above target step is performed. Among them, the execution result includes erasure success (Pass) and erasure failure (Fail), and the erasure success indicates that the target data block has reached the expected erasure state after the erasure operation of the target step, and the erasure failure indicates that the target data block has not reached the expected erasure state after the erasure operation of the target step.

[0052] In an optional implementation, the present embodiment records the execution status and execution result of the storage medium through a status register. Optionally, the execution status and execution result of the storage medium can be stored in the same status register or in different status registers, and the present embodiment does not limit this. Further, after the verification of the target step is triggered, the storage medium updates the execution status in the corresponding status register from a busy state (Busy) to an execution completion state (Ready).

[0053] Step S130, recording the target data blocks after the erasing operation is performed in a target data block list, wherein the target data block list is a second data block list recording the erasing operation that completes the target step.

[0054] In an optional implementation, the controller of the storage device queries the execution status of the storage medium, and in response to the execution status being completed, records the target data block after the erasing operation is completed in the target data block list. For example, assuming that the target data block is a data block in the data block list list-0, after the first step of the erasing operation is completed, the target data block is recorded in the data block list list-1, and the target data block is deleted from the data block list list-0.

[0055] Furthermore, if the execution status of the storage medium is recorded in the corresponding status register, the controller of the storage device can periodically query the status register to query the execution status of the storage medium from the status register. The execution status of the storage medium switches when the target erase instruction starts to be executed or the verification of the erase operation corresponding to the target step is executed. The storage medium controls the execution status in the status register to switch to a busy state (Busy) when the target erase instruction starts to be executed, and controls the execution status in the status register to switch to a completed state (Ready) when the verification of the erase operation corresponding to the target step is executed. When the controller of the storage device finds that the execution status stored in the status register is a completed state (Ready), it determines that the erase operation of the current target step is completed, and records the target data block on which the erase operation has been executed in the target data block list.

[0056] Further optionally, if there is a high-priority data operation request to be processed in the storage device, when the controller of the storage device inquires that the execution status of the storage medium is in the completed state (Ready), the received data operation request can be executed. Among them, the instruction type corresponding to the data operation request is a write operation or a read operation, or it can be other data operation requests. This embodiment does not limit the type of data operation request. Therefore, the embodiment of the present invention can record data blocks in different erasure steps through each data block list, thereby realizing step-by-step erasure of data blocks, so that the storage device can perform a high-priority data access operation after executing an erasure operation of a certain step, thereby reducing the latency of data access.

[0057] Further, in this embodiment, the erasing step of the predetermined data block includes N steps. If the above target step is the last erasing operation, that is, the Nth erasing operation, the target data block list is a second data block list for recording free data blocks. Further optionally, since the entire erasing process of the data block is divided into N steps, before the data block performs the Nth erasing operation, the data block usually cannot reach the expected erasing state, that is, the execution result corresponding to the verification operation of each step is usually an erasing failure. Therefore, the controller of the storage device can only query the execution result of the data block after the data block performs the last erasing operation (that is, the Nth erasing operation) to determine whether the data block is successfully erased after the entire erasing process is completed. In other optional implementations, this embodiment can also query the execution result after the execution of the erasing operation of each step is completed. This embodiment does not limit the query timing or query cycle of the execution result of the controller of this storage device.

[0058] The embodiment of the present invention determines a target data block from a plurality of data block lists, issues a target erasing instruction for the target data block, performs an erasing operation corresponding to the target step indicated by the target erasing instruction on the target data block, and records the target data block after the erasing operation is performed in the target data block list, wherein the plurality of data block lists include a first data block list for recording data blocks for which the erasing operation has not been performed and at least one second data block list for recording data blocks for which one or more erasing operations have been performed. Thus, the embodiment of the present invention can record different erasing steps of data blocks through each data block list, and then issue and execute different next step instructions for data blocks in different erasing steps, thereby realizing step-by-step erasing of data blocks, so that the storage device can perform a high-priority data access operation after performing an erasing operation of a certain step, while ensuring the reliability of the erasing operation, reducing the delay of data access, and improving the overall performance of the storage device.

[0059] Figure 2 The present invention is a flowchart of another method for erasing a data block of a storage device according to an embodiment of the present invention. Figure 3 Schematic diagram of the updating process of the data block list of the embodiment of the present invention. The embodiment of the present invention is used to describe the entire erasing process of the same group of target data blocks including N erasing steps, taking N=2, that is, dividing the entire erasing process of the data block into 2 steps as an example. Figure 3 As shown, the controller of the storage device maintains a list of data blocks list-0 that have not been erased, a list of data blocks list-1 that have completed the first step of the erase operation, and a list of data blocks list-2 in an idle state. It should be understood that this embodiment does not limit the specific value of N, which can be set according to actual application requirements. Figure 2 and Figure 3The data block erasing method of the storage device according to the embodiment of the present invention comprises the following steps:

[0060] In step S210, the controller of the storage device determines the target data blocks b1-bm (m≥1) to be erased from the data block storage list list-0 (i.e., the data block list that has not been erased) according to the demand, and sends the first step erase operation instruction of the target data blocks b1-bm to the storage medium.

[0061] Step S220: The storage medium determines the target data blocks b1-bm according to the address information in the erase operation instruction in step 1.

[0062] Step S230, executing the first erase operation instruction on the target data blocks b1-bm.

[0063] Step S240, performing a verification operation on the erase operation instruction in step 1 and updating the execution status and execution result.

[0064] Optionally, the storage medium receives the erase instruction of step 1, determines the target data block b1-bm according to the address information in the erase instruction of step 1, updates the execution status to a busy status (Busy), and initializes the circuit required for the erase operation of the target data block b1-bm, and then performs precharging, that is, setting the voltage of the control gate (Control Gate, CG) of the storage cell in the target data block b1-bm to a first voltage (for example, 0V, or set according to actual needs), and precharging the bit lines (Bit Lines, BL) where the storage cells in the target data block are located to a second voltage (for example, 0V or other intermediate voltages, that is, between 0-third voltages) to reduce current consumption during erasure, and then enters the erase phase, that is, raising the word line to a third voltage, and maintaining this third voltage for a period of time to allow electrons to escape from the floating gate to the substrate through the tunnel oxide layer. Furthermore, when the erasure time of the current erasure operation of the target data block b1-bm reaches the erasure time threshold corresponding to the first erasure operation, the verification operation of the first erasure operation is performed, and it is determined that the current erasure operation is completed, and the storage medium updates the execution status to the execution completion status (Ready), that is, it can execute the next erasure operation or other data operation request.

[0065] Further optionally, it is verified whether the target data blocks b1 -bm have reached the expected erasure state, for example, whether all storage units in the target data blocks b1 -bm are completely erased, etc. After the verification, the execution result (Pass / Fail) is updated.

[0066] Step S250, the controller queries the execution status of the storage medium, and when the execution status is the execution completion status (Ready), the target data blocks b1-bm are recorded in the data block list list-1, and the target data blocks b1-bm are deleted from the data block list list-0 to update the data block list list-0. Figure 3 .

[0067] Step S260, in response to the execution status being completed, sending the second step erase operation instruction of the target data blocks b1-bm. It should be understood that after step S250 is completed, the erase operation of other target data blocks may be executed, and the high priority data operation request may also be executed and completed, and the storage medium is in the execution completed state.

[0068] Furthermore, the controller determines the target data blocks b1 -bm from the data block list list-1 according to the current demand, and sends the second step erasing operation instruction of the target data blocks b1 -bm to the storage medium.

[0069] Step S270: The storage medium determines the target data blocks b1-bm according to the address information in the erase operation instruction in step 2.

[0070] Step S280, executing the second erase operation instruction on the target data blocks b1-bm.

[0071] Step S290, perform a verification operation on the second step erasing operation instruction and update the execution status and execution result. The specific erasing operation and the updating method of the execution status and execution result are similar to the first step erasing operation, and will not be repeated here.

[0072] Step S2A0, the controller queries the execution status and execution result of the storage medium, and when the execution status is Ready and the execution result is erased successfully, the target data block b1-bm is recorded in the data block list list-2 (that is, the data block list list-2 that records the free state blocks), and the target data block b1-bm is deleted from the data block list list-1 to update the data block list list-1. Figure 3 .

[0073] In an optional implementation, if the controller inquires that the execution status of the storage medium is a busy state (Busy), the storage medium is currently in the process of erasing operation or executing other data operation request.

[0074] Further optionally, if after the data block performs the last step of erasing operation, the execution result obtained by verification is that the erasing fails, the controller can control the data block to be retried, for example, the data block is re-added to the data block list list-0 to re-execute the erasing operation on the data block. In another optional implementation, the controller can also determine the data block that finally fails to be erased as a bad block and add it to the bad block list. It should be understood that this embodiment does not limit the processing method of the data block that finally fails to be erased.

[0075] The embodiment of the present invention is mainly explained by taking the example of the target erasure instruction issued by the controller carrying the erasure steps of the target data block. In other optional implementation methods, the storage medium of the embodiment of the present invention can also record the erasure steps corresponding to the data block. After receiving the target erasure instruction of the data block, the corresponding erasure operation is performed according to the erasure steps of the data block recorded by the storage medium.

[0076] The embodiment of the present invention determines a target data block from a plurality of data block lists, issues a target erasing instruction for the target data block, performs an erasing operation corresponding to the target step indicated by the target erasing instruction on the target data block, and records the target data block after the erasing operation is performed in the target data block list, wherein the plurality of data block lists include a first data block list for recording data blocks for which the erasing operation has not been performed and at least one second data block list for recording data blocks for which one or more erasing operations have been performed. Thus, the embodiment of the present invention can record different erasing steps of data blocks through each data block list, and then issue and execute different next step instructions for data blocks in different erasing steps, thereby realizing step-by-step erasing of data blocks, so that the storage device can perform a high-priority data access operation after performing an erasing operation of a certain step, while ensuring the reliability of the erasing operation, reducing the delay of data access, and improving the overall performance of the storage device.

[0077] Figure 4 1 is a flowchart of another data block erasing method of a storage device according to an embodiment of the present invention. The embodiment of the present invention is used to describe the process of the controller executing the data block erasing method, still taking N=2, that is, dividing the entire data block erasing process into 2 steps as an example. Figure 4 As shown, the data block erasing method of the storage device according to the embodiment of the present invention comprises the following steps:

[0078] Step S310, after executing a high priority data operation or a certain erasing operation of a data block and there is no unexecuted high priority data operation, determine a target data block from a data block list in each data block list according to demand.

[0079] Step S320, determine whether the list where the target data block is located is the data block list list-0, if the list where the target data block is located is not the data block list list-0, then it is located in the data block list list-1. If the list where the target data block is located is the data block list list-0, execute step S330, if the list where the target data block is located is the data block list list-1, execute step S410.

[0080] Step S330: When the list where the target data block is located is list-0, the first step erasing operation instruction is sent to the storage medium.

[0081] Step S340: the storage medium determines the target data block according to the address information in the erase operation instruction in step 1.

[0082] Step S350, executing the first erase operation instruction on the target data block.

[0083] Step S360, performing a verification operation on the erase operation instruction in step 1 and updating the execution status and execution result.

[0084] Step S370: The controller sends an instruction to query the execution status to the storage medium. In an optional implementation, the controller queries a status register corresponding to the storage medium to obtain the execution status. The status register is used to store the current execution status of the storage medium.

[0085] Step S380: The storage medium returns the execution status to the controller. After receiving the instruction from the controller to query the execution status, the storage medium obtains the execution status from the status register and feeds it back to the controller.

[0086] Step S390, in response to the current execution state of the storage medium being completed, the target data block is recorded in the data block list list-1. Further, when the current execution state of the storage medium is busy, it indicates that the storage medium is executing a corresponding operation and cannot execute a new data operation.

[0087] Step S400: receiving a data operation request.

[0088] Step S400', executing the data operation request.

[0089] If a high-priority data operation request, such as a data write request, is received between the execution of step S310 and step S390 or after step S390, the controller performs the data operation corresponding to the data operation request through the controller and the storage medium when the execution state of the storage medium is determined to be the execution completion state after querying. It should be understood that the specific data write operation and data read operation can adopt any data write operation and data read operation generated by existing or future technological developments, and the specific data operation process of the controller and the storage medium is not described in detail in this embodiment.

[0090] After the data operation request is executed, if the storage device still has a data block erasure requirement, the process is repeated starting from step S310.

[0091] Step S410: When the list where the target data block is located is list-1, the controller sends the second step erasing operation instruction.

[0092] Step S420: the storage medium determines the target data block according to the address information in the erase operation instruction in step 2.

[0093] Step S430, performing the second erasing operation on the target data block.

[0094] Step S440, performing a verification operation on the second step erasing operation, and updating the execution status and execution result.

[0095] Step S450: The controller sends an instruction to query the execution status and execution result to the storage medium.

[0096] Step S460: The storage medium returns the execution status and execution result to the controller.

[0097] Step S470, when the execution status is execution completion and the execution result is erasure success, the target data block is recorded in the data block list list-2; when the execution result is erasure failure, the target data block is recorded in the bad block list.

[0098] It should be understood that the process of the controller and the storage medium in this embodiment performing the erasing operation corresponding to each erasing step is similar to Figure 2 and Figure 3 The embodiments shown are similar and will not be described in detail here.

[0099] Furthermore, after step S470 is completed, if a high-priority data operation request is received, the controller and the storage medium can preferentially execute the data operation corresponding to the data operation request; if there is no unexecuted high-priority data operation request and there is a data block erasure operation requirement, the data block erasure process can be repeated starting from step S310.

[0100] The embodiment of the present invention determines a target data block from a plurality of data block lists, issues a target erasing instruction for the target data block, performs an erasing operation corresponding to the target step indicated by the target erasing instruction on the target data block, and records the target data block after the erasing operation is performed in the target data block list, wherein the plurality of data block lists include a first data block list for recording data blocks for which the erasing operation has not been performed and at least one second data block list for recording data blocks for which one or more erasing operations have been performed. Thus, the embodiment of the present invention can record different erasing steps of data blocks through each data block list, and then issue and execute different next step instructions for data blocks in different erasing steps, thereby realizing step-by-step erasing of data blocks, so that the storage device can perform a high-priority data access operation after performing an erasing operation of a certain step, while ensuring the reliability of the erasing operation, reducing the delay of data access, and improving the overall performance of the storage device.

[0101] Figure 5 Schematic diagram of a storage device according to an embodiment of the present invention. Figure 5 As shown, the storage device 5 of the embodiment of the present invention includes a controller 51 and a storage medium 52. The storage medium 52 includes a plurality of data blocks for storing data. The controller 51 manages the erasing operation of the data blocks in the storage medium 52 in steps. Optionally, the controller 51 determines the target data block from the plurality of data block lists, sends the target erasing instruction of the target data block to the storage medium 52 to perform the corresponding erasing operation on the target data block, and records the target data block after the erasing operation is performed in the target data block list. Among them, the plurality of data block lists include a first data block list and at least one second data block list, the first data block list is used to record the data blocks that have not performed the erasing operation, and the second data block list is used to record the data blocks that have performed one or more erasing operations. The target erasing instruction has a corresponding target step. The target data block list is a second data block list that records the erasing operation that completes the target step. Among them, if the target step is the last step of the erasing operation, the target data block list is a second data block list for recording free data blocks.

[0102] In an optional implementation, the controller 51 queries the execution status of the storage medium 52, and in response to the execution status being completed, executes the received data operation request. The instruction type corresponding to the data operation request may be a write operation or a read operation, or other data access modes, which are not limited in this embodiment.

[0103] Further optionally, the execution state of the storage medium 52 can be stored in a status register (not shown in the figure) set inside it. The controller 51 can also query the execution state of the storage medium 52 from the corresponding status register. Among them, the execution state of the storage medium 52 is switched when the target erase instruction is started or the verification of the erase operation corresponding to the target step is executed. The verification of the erase operation is used to determine whether the target data block has reached the expected erase state. Optionally, when the storage medium 52 starts to execute the target erase instruction, the control status register switches the execution state to a busy state, and when the verification of the erase operation corresponding to the target step is executed, the control status register switches the execution state to an execution completion state.

[0104] Further optionally, the status register of this embodiment can also be used to record the execution result of the storage medium 52. Among them, the execution result includes erasure success and erasure failure, and the execution result is updated after the verification of the erasure operation corresponding to the target step is executed. Further, if the target data block reaches the expected erasure state after executing the target step, the execution result is erasure success, otherwise it is erasure failure. In another optional implementation, this embodiment can also use a register other than the status register to store the execution result, and this embodiment is not limited to this.

[0105] Furthermore, the controller 51 is also used to query the execution result of the target data block. After the last step of erasing the target data block is completed, if the corresponding execution result is successful erasure, the target data block is recorded in the data block list corresponding to the idle state data block. If the erasure fails, the target data block is recorded in the bad block list or recorded in the first data list so that the target data block re-executes the erasing operation.

[0106] It should be noted that the above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.

[0107] The storage device of the embodiment of the present invention determines the target data block from multiple data block lists, issues the target erasing instruction of the target data block, performs the erasing operation corresponding to the target step indicated by the target erasing instruction on the target data block, and records the target data block after the erasing operation is performed in the target data block list, wherein the multiple data block lists include a first data block list for recording data blocks that have not performed the erasing operation and at least one second data block list for recording data blocks that have performed one or more steps of the erasing operation. Thus, the embodiment of the present invention can record different erasing steps of data blocks in each data block list, and then issue and execute different next step instructions for data blocks in different erasing steps, thereby realizing step-by-step erasing of data blocks, so that the storage device can perform a high-priority data access operation after performing an erasing operation of a certain step, thereby reducing the delay of data access. At the same time, since the erasing operation of each step of the data block is independent, after each erasing step feedbacks the execution status of the execution completion, the high-priority data access operation is performed, which does not affect the reliability of data block erasing, that is, the storage device of this embodiment reduces the delay of data access while ensuring the reliability of data block erasing operation. Furthermore, in this embodiment, the controller actively manages erasing of data blocks in steps, thereby further improving data response efficiency.

[0108] Figure 6 Schematic diagram of a data block erasing device for a storage device according to an embodiment of the present invention. Figure 6 As shown, the data block erasing device 6 of the storage device according to the embodiment of the present invention includes a determining unit 61 , an instruction issuing unit 62 and an updating unit 63 .

[0109] The determination unit 61 is configured to determine a target data block from a plurality of data block lists, wherein the plurality of data block lists include a first data block list and at least one second data block list, wherein the first data block list is used to record data blocks that have not been subjected to an erasing operation, and the second data block list is used to record data blocks that have been subjected to one or more erasing operations. The instruction issuing unit 62 is configured to issue a target erasing instruction of the target data block to perform a corresponding erasing operation on the target data block, wherein the target erasing instruction has a corresponding target step. The updating unit 63 is configured to record the target data block that has completed the erasing operation in the target data block list, wherein the target data block list is a second data block list that records the erasing operation that has completed the target step. Optionally, the target step is the last erasing operation, and the target data block list is a second data block list that is used to record free data blocks.

[0110] In an optional implementation, the erasing device 6 further includes a first query unit configured to query an execution status, and in response to the execution status being execution completed, execute a received data operation request, wherein the instruction type corresponding to the data operation request is a write operation or a read operation.

[0111] In an optional implementation, the first query unit is further configured to query the execution status from the corresponding status register, and the execution status is switched when the target erase instruction is started to be executed or the verification of the erase operation corresponding to the target step is executed, and the verification of the erase operation is used to determine whether the target data block reaches the expected erase state.

[0112] In an optional implementation, the determining unit 61 is further configured to determine a list of data blocks to be erased according to the number of data blocks in each of the data block lists, and determine the target data block from the list of data blocks to be erased.

[0113] In an optional implementation, the erasing device 6 also includes a second query unit, which is configured to query the execution result of the target data block, the execution result includes erasure success and erasure failure, and the execution result is updated after verifying the erasure operation corresponding to the target step.

[0114] The storage device of the embodiment of the present invention determines the target data block from multiple data block lists, issues the target erasing instruction of the target data block, performs the erasing operation corresponding to the target step indicated by the target erasing instruction on the target data block, and records the target data block after the erasing operation is performed in the target data block list, wherein the multiple data block lists include a first data block list for recording data blocks that have not performed the erasing operation and at least one second data block list for recording data blocks that have performed one or more steps of the erasing operation. Thus, the embodiment of the present invention can record different erasing steps of the data block through each data block list, and then issue and execute different next step instructions for the data blocks in different erasing steps, thereby realizing the step-by-step erasing of the data block, so that the storage device can perform a high-priority data access operation after performing an erasing operation of a certain step, thereby reducing the delay of data access. At the same time, since the erasing operation of each step of the data block is independent, after each erasing step feedbacks the execution status of the execution completion, the high-priority data access operation is performed, which does not affect the reliability of the data block erasing, that is, the storage device of this embodiment reduces the delay of data access while ensuring the reliability of the data block erasing operation. Furthermore, in this embodiment, the controller actively manages erasing of data blocks in steps, thereby further improving data response efficiency.

[0115] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above method embodiments.

[0116] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0117] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for erasing a data block of a storage device, characterized in that: The method comprises: Determine a target data block from a plurality of data block lists, wherein the plurality of data block lists include a first data block list and at least one second data block list, wherein the first data block list is used to record data blocks on which no erasing operation is performed, and the second data block list is used to record data blocks on which one or more erasing operations are performed; issuing a target erasing instruction of the target data block to perform a corresponding erasing operation on the target data block, wherein the target erasing instruction has a corresponding target step; The target data block after the erasing operation is performed is recorded in a target data block list, and the target data block list is a second data block list that records the erasing operation that completes the target step.

2. The method according to claim 1, characterized in that The method further comprises: Query execution status; In response to the execution status being execution completed, the received data operation request is executed, and the instruction type corresponding to the data operation request is a write operation or a read operation.

3. The method according to claim 2, characterized in that The query execution status includes: The execution status is queried from the corresponding status register, and the execution status is switched when the target erase instruction is started to be executed or the verification of the erase operation corresponding to the target step is executed, and the verification of the erase operation is used to determine whether the target data block reaches the expected erase state.

4. The method according to claim 1, characterized in that: Determining the target data block from the plurality of data block lists comprises: Determine a list of data blocks to be erased according to the number of data blocks in each of the data block lists; The target data block is determined from the list of data blocks to be erased.

5. The method according to claim 1, characterized in that The target step is the last erase operation, and the target data block list is a second data block list for recording free data blocks.

6. The method according to claim 1, characterized in that The method further comprises: The execution result of the target data block is queried, the execution result including erasure success and erasure failure, and the execution result is updated after verification of the erasure operation corresponding to the target step is executed.

7. A storage device, characterized in that: The storage device comprises: A storage medium, the storage medium comprising a plurality of data blocks for storing data; A controller, configured to execute the method according to any one of claims 1 to 6.

8. The storage device according to claim 7, characterized in that: The storage medium has a corresponding status register, and the status register is used to store the execution status and / or execution result of the erasing operation of the data block in the storage medium.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Non-volatile memory having a multiple block erase mode and method therefor

    CN101496109A

  • Adaptive Multi-Phase Erase

    CN107924700A

  • Dividing a flash memory operation into phases

    US20070156950A1

  • Nonvolatile Memory Devices and Methods of Operating Same to Inhibit Parasitic Charge Accumulation Therein

    US20090129165A1

  • Memory system performing multi-step erase operation based on stored metadata

    US20140226404A1