Flash memory read-write method, electronic equipment and storage medium

By dividing the crystal grains in the flash memory device into multiple sub-crystals and performing interleaved write or read operations in parallel, the problem of low read and write performance of a single crystal grain is solved, and the read and write performance of the storage device is improved.

CN120669898APending Publication Date: 2025-09-19ZHONGSHAN JIANGBOLONG ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410311377.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-18
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Single-die flash memory products lack interleaving functionality and insufficient memory space, resulting in poor read and write performance and the inability to perform multi-plane and interleaving operations.

Method used

The crystal grain in the flash memory device is divided into multiple sub-crystal grains, and interleaved writing or reading operations are performed through a pre-set page buffer, and the parallel execution of multiple sub-crystal grains is used to improve the read and write performance.

Benefits of technology

This allows new read and write commands to be executed without waiting for the previous read and write operation to complete, improving the timeliness of read and write command execution and the overall performance of the storage device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120669898A_ABST
    Figure CN120669898A_ABST
Patent Text Reader

Abstract

The invention relates to the field of storage equipment, and provides a flash memory read-write method, electronic equipment and a storage medium. The method comprises the following steps: dividing a crystal grain into a plurality of sub crystal grains based on a plurality of page buffers preset in the storage equipment; and performing interlaced write operation or read operation on the plurality of sub-dies. The method can improve the read-write performance of the storage device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of storage devices, and in particular to a flash memory reading and writing method, an electronic device, and a storage medium. Background Art

[0002] As the capacity of single-die flash memory increases, some products featuring only a single die (DIE) have emerged. Due to the lack of interleaving functionality and limitations such as insufficient memory space, single-die products cannot utilize multi-plane and interleaved operations, resulting in poor read and write performance. Summary of the Invention

[0003] In view of the above, it is necessary to provide a flash memory reading and writing method, electronic device and storage medium that can solve the technical problem of low reading and writing performance of single-die products.

[0004] On the one hand, the present application proposes a flash memory reading and writing method, which is applied to an electronic device, wherein the electronic device includes a storage device, the storage device includes a grain, and the grain includes multiple planes. The flash memory reading and writing method includes: based on multiple page buffers pre-set in the storage device, dividing the grain into multiple sub-grains; performing interleaved write operations or read operations on the multiple sub-grains.

[0005] According to an embodiment of the present application, dividing the grain into multiple sub-grains based on multiple page buffers pre-set in the storage device includes: grouping the physical blocks in the multiple planes according to a preset number to obtain multiple groups; connecting the physical blocks in each group with any page buffer to determine the sub-grain corresponding to each group.

[0006] According to an embodiment of the present application, performing an interleaved write operation on the multiple sub-grains includes: determining an execution order of the multiple sub-grains based on the operating status of the multiple sub-grains; and performing a write operation on the physical pages in the physical blocks of the multiple sub-grains according to the execution order.

[0007] According to an embodiment of the present application, performing a write operation on the physical pages in the physical blocks of the multiple sub-grains according to the execution order includes: determining a target sub-grain from the multiple sub-grains according to the execution order; when performing a write operation on the first physical page in any physical block of the target sub-grain, detecting whether other physical pages in any physical block receive a write command; if the second physical page in any physical block receives a write command, executing the write command on the second physical page.

[0008] According to an embodiment of the present application, before dividing the grain into multiple sub-grains based on multiple page buffers pre-set in the storage device, the method also includes: counting the total number of planes in the grain; determining the total number of buffers of the multiple page buffers based on the total number of planes and a preset multiple; or determining the total number of buffers of the multiple page buffers based on the total number of planes and the device area of ​​the storage device.

[0009] According to an embodiment of the present application, determining the total number of buffers of the multiple page buffers based on the total number of planes and the device area of ​​the storage device includes: determining the used area based on a preset ratio and the device area; determining the number of first buffers based on the occupied area of ​​each page buffer and the used area; determining the number of second buffers based on the total number of planes and the preset multiple; and determining the total number of buffers based on the number of first buffers and the number of second buffers.

[0010] According to an embodiment of the present application, a page buffer is provided for each plane. Before dividing the grain into multiple sub-grains based on multiple page buffers pre-set in the storage device, the method further includes: disconnecting the multiple physical blocks in each plane from the corresponding page buffers.

[0011] According to an embodiment of the present application, when performing an interleaved write operation or read operation on the multiple sub-dies, the method further includes: interrupting the write operation or read operation on the multiple sub-dies when an interrupt command is received.

[0012] On the other hand, the present application also proposes a flash memory read and write device that runs on an electronic device, wherein the electronic device includes a storage device, the storage device includes a grain, and the grain includes multiple planes. The flash memory read and write device includes: a division unit for dividing the grain into multiple sub-grains based on multiple page buffers pre-set in the storage device; and an execution unit for performing interleaved write operations or read operations on the multiple sub-grains.

[0013] On the other hand, the present application also proposes an electronic device, which includes: a storage device storing computer-readable instructions; and a processor executing the computer-readable instructions stored in the storage device to implement a flash memory reading and writing method.

[0014] On the other hand, the present application also proposes a storage medium storing computer-readable instructions, which are executed by a processor in an electronic device to implement a flash memory read and write method. As can be seen from the above technical solutions, the present application embodiment divides a single die in the storage device into multiple sub-dies, thereby enabling parallel read and write operations on multiple sub-dies in the storage device. This eliminates the need to wait for the storage device to complete the previous read and write operation before executing a new read and write command, thereby improving the timeliness of the execution of read and write commands and thereby improving the read and write performance of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a structural diagram of an electronic device for implementing a flash memory reading and writing method provided in an embodiment of the present application.

[0016] Figure 2 This is a flowchart of the flash memory reading and writing method provided in an embodiment of the present application.

[0017] Figure 3 This is a schematic diagram of the generation of sub-grains provided in an embodiment of the present application.

[0018] Figure 4 This is a schematic diagram of performing a write operation on a physical page in any physical block provided in an embodiment of the present application.

[0019] Figure 5 This is a flowchart of a flash memory reading and writing method provided by another embodiment of the present application.

[0020] Figure 6 This is a functional module diagram of the flash memory read-write device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the objectives, technical solutions and advantages of this application clearer, this application is described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0023] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner. The following embodiments and features in the embodiments may be combined with each other unless there is a conflict.

[0024] like Figure 1 , which is a schematic diagram of the structure of an electronic device for implementing a flash memory reading and writing method provided in an embodiment of the present application.

[0025] In an embodiment of the present application, a flash memory reading and writing method is applied to one or more electronic devices 1. The electronic device 1 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored computer-readable instructions. Its hardware includes but is not limited to a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.

[0026] The electronic device 1 can be any electronic product that can interact with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.

[0027] The electronic device 1 may include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network electronic device, a group of electronic devices consisting of multiple network electronic devices, or a cloud based on cloud computing consisting of a large number of hosts or network electronic devices.

[0028] The network where the electronic device 1 is located includes, but is not limited to: the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0029] In the embodiment of the present application, the electronic device 1 includes, but is not limited to, a storage device 12, a processor 13, and computer-readable instructions stored in the storage device 12 and executable on the processor 13, such as a flash memory read and write program.

[0030] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. The electronic device 1 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 1 may also include input and output devices, network access devices, buses, etc.

[0031] The processor 13 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, a processor, or any conventional processor. The processor 13 is the computing core and control center of the electronic device 1, connecting various parts of the entire electronic device 1 using various interfaces and lines, and executing the operating system of the electronic device 1 as well as various installed applications and program codes.

[0032] The storage device 12 may be an external storage device and / or an internal storage device of the electronic device 1. Furthermore, the storage device 12 may be a physical storage device, such as a memory stick, a TF card (Trans-flash Card), and the like.

[0033] Combine Figure 2 The storage device 12 in the electronic device 1 stores computer-readable instructions, and the processor 13 can execute the computer-readable instructions stored in the storage device 12 to implement the following Figure 2 The flash memory reading and writing method is shown.

[0034] like Figure 2 FIG2 is a flowchart of a flash memory read and write method provided by an embodiment of the present invention. The flash memory read and write method is applied to electronic devices, including storage devices. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0035] 201 , based on a plurality of page buffers pre-set in a storage device, divide a die into a plurality of sub-dies.

[0036] In at least one embodiment of the present application, a storage device includes a die (DIE), the die includes multiple planes (Plane), each plane includes multiple physical blocks (blocks), for example, Plane2 includes block0-block15, each plane corresponds to a page buffer, each physical block includes multiple physical pages (page), and the physical page is the basic unit for the storage device to perform read and write. Multiple page buffers are pre-soldered on the circuit board corresponding to the storage device, and the total number of buffers of the page buffers soldered on the circuit board is greater than the total number of planes in the die. After the electronic device groups the physical blocks in the multiple planes, it connects the physical blocks in each group to the same page buffer to realize dividing the multiple planes in a single die into multiple sub-dies. Each sub-die includes multiple physical blocks and a page buffer. The number of physical blocks in the sub-die is equal to the preset number, and the preset number is less than the number of physical blocks in each plane. The multiple physical blocks in each sub-die are connected to corresponding page buffers. For example, sub-die DIE0 includes block0, block1, block2, block3, and page buffer pagebuffer0. Then, block0 is connected to page buffer0, block1 is connected to page buffer0, block2 is connected to pagebuffer0, and block3 is connected to page buffer0. The number of physical blocks in each sub-die is equal to the preset number.

[0037] In at least one embodiment of the present application, upon detecting that a preset function program is enabled, the electronic device divides a die into multiple sub-dies based on a plurality of page buffers pre-configured in the storage device. The preset function program is used to control the activation and deactivation of interleaved access operations, which may include write operations and read operations.

[0038] In at least one embodiment of the present application, the electronic device divides a grain into a plurality of sub-grains based on a plurality of page buffers pre-set in a storage device, including: the electronic device groups the physical blocks in a plurality of planes according to a preset number to obtain a plurality of groups, and connects the physical blocks in each group to any page buffer to determine the sub-grains corresponding to each group. The preset number refers to the number of physical blocks in each group. The page buffers connected to the physical blocks of each group are different. This embodiment groups the physical blocks in a plurality of planes by a preset number, thereby improving the efficiency of determining the plurality of groups and thereby improving the efficiency of dividing the sub-grains.

[0039] Specifically, for any plane, the electronic device randomly groups all physical blocks in any plane to obtain multiple groups. Figure 3 Explain the generation of multiple groups. Figure 3As shown, the electronic device randomly groups block0-block15 in Plane2 of the storage device, obtaining multiple groups, such as a first group, a second group, a third group, and a fourth group. The first group and the second group are obtained by grouping Plane2 of the storage device based on one division method, and the third group and the fourth group are obtained by grouping Plane2 of the storage device based on another division method. By grouping Plane2 of the storage device using different division methods, the first group, the second group, the third group, and the fourth group obtained are also different. For example, after grouping Plane2 of the storage device using different division methods, the first group obtained includes block0, block2, block4, and block6; the second group includes block1, block3, block5, and block7; the third group includes block0, block1, block4, block5, block8, and block9; the fourth group includes block2, block3, block6, and block7; and so on. The number of blocks in the groups obtained by the same division method is the same. For example, the number of blocks in the first group is 4, and the number of blocks in the second group is also 4. The number of blocks is 4 for example only. The number of blocks in the groups obtained by the division in this embodiment can also be 2, 5, 6, etc. This embodiment can improve the efficiency of determining multiple groups by randomly grouping all physical blocks in any plane. Figure 3 To illustrate the generation of sub-dices, the first group is connected to the page buffer to obtain sub-dices DIE0 in the first group. The second group is connected to the page buffer to obtain sub-dices DIE1 in the first group. The third group is connected to the page buffer to obtain sub-dices DIE0 in the second group. The fourth group is connected to the page buffer to obtain sub-dices DIE1 in the second group. Sub-dices DIE0 in the first group, DIE1 in the first group, DIE0 in the second group, and DIE1 in the second group are each connected to the flash memory controller 13 via the DQS pin. The first group and the second group each correspond to one channel.

[0040] The electronic device may also randomly group the physical blocks in multiple planes to obtain multiple groups, each group including physical blocks from at least two planes. For example, the electronic device may randomly group the physical blocks in Plane0 and Plane2 in the storage device to obtain multiple groups, such as the fifth group and the sixth group, where the fifth group includes block0 of Plane0, block2 of Plane0, block0 of Plane2, and block2 of Plane2; the sixth group includes block1 of Plane0, block3 of Plane0, block1 of Plane2, and block3 of Plane2, and so on. By randomly grouping the physical blocks in multiple planes, this embodiment can increase the number of groups in the multiple groups, thereby improving the performance of the storage device.

[0041] In at least one embodiment of the present application, before dividing a die into a plurality of sub-dies based on a plurality of page buffers pre-set in a storage device, an electronic device counts the total number of planes in the die, and determines the total number of buffers of the plurality of page buffers based on the total number of planes and a preset multiple. The total number of planes indicates the total number of all planes in the die of the storage device. The preset multiple can be a multiple set according to actual production requirements, for example, the preset multiple can be set to 2. The total number of buffers indicates the number of page buffers pre-set on the circuit board of the storage device. The total number of buffers can be determined based on the product of the total number of planes and the preset multiple. The total number of buffers can also be determined based on the sum of the total number of planes and the preset multiple. In this embodiment, by combining the total number of planes and the preset multiple to determine the total number of buffers, the total number of buffers can be made greater than the total number of planes, thereby enabling a single die to be successfully divided into a plurality of sub-dies.

[0042] In at least one embodiment of the present application, the electronic device may further determine the total number of buffers of the plurality of page buffers based on the total number of planes and the device area of ​​the storage device. This embodiment can reasonably determine the total number of buffers by combining the total number of planes and the device area of ​​the storage device.

[0043] Specifically, the electronic device determines the usable area based on a preset ratio and the device area, and determines the number of first buffers based on the occupied area and the usable area of ​​each page buffer. The electronic device determines the number of second buffers based on the total number of planes and the preset multiple, and determines the total number of buffers based on the number of first buffers and the number of second buffers. The preset ratio can be set according to actual production needs, for example, the preset ratio can be 0.1. The usable area can be determined based on the product of the device area and the preset ratio. The number of first buffers can be determined based on the ratio of the usable area to the occupied area. The number of second buffers can be determined based on the product of the total number of planes and the preset multiple, or the number of second buffers can be determined based on the sum of the total number of planes and the preset multiple. The total number of buffers can be determined based on the weighted sum of the number of first buffers and the number of second buffers, or the total number of buffers can be determined based on the sum of the number of first buffers and the number of second buffers. The total number of buffers can also be any value in a number range, and the number range can be determined based on the number of first buffers and the number of second buffers. This embodiment determines the number of first buffers by combining a preset ratio, the device area of ​​the storage device, and the occupied area of ​​each page buffer, thereby avoiding setting the number of first buffers too large and occupying a large area of ​​the storage device. By combining the total number of planes and the preset multiple, the number of second buffers is determined, thereby avoiding setting the number of second buffers too small and resulting in insufficient improvement in the performance of the storage device. Furthermore, by combining the number of first buffers and the number of second buffers, the rationality of determining the total number of buffers is improved.

[0044] 202 , performing an interleaved write operation or read operation on a plurality of sub-dies.

[0045] In at least one embodiment of the present application, the write operation includes multiple write commands, each of which includes write data and a page address corresponding to a physical page storing the write data.

[0046] In at least one embodiment of the present application, when the operating state of a sub-grain is in a busy state, the electronic device performs a write operation or a read operation on another sub-grain. The electronic device performs an interleaved write operation on multiple sub-grains, including: the electronic device determines the execution order of the multiple sub-grains based on the operating states of the multiple sub-grains, and performs a write operation on the physical pages in the physical blocks of the multiple sub-grains according to the execution order. The operating state includes a busy state and an idle state. The priority of the execution order of the sub-grain whose operating state is the idle state is higher than the priority of the execution order of the sub-grain whose operating state is the busy state. For example, if the operating state of the sub-grain DIE0 is a busy state and the operating state of the sub-grain DIE1 is an idle state, the write operation is performed on the sub-grain DIE1 first, and then the write operation is performed on the sub-grain DIE0. This embodiment determines the corresponding execution order through the operating status of each sub-grain, and performs write operations on multiple sub-grains according to the execution order. Since there is no need to wait for the entire storage device to complete the read and write operations of the previous byte, the write operation can be performed on the sub-grain in the idle state, thereby improving the read and write performance of the storage device.

[0047] In some embodiments, the electronic device detects whether the write command in the write operation includes the page address corresponding to other physical pages in any physical block. If it is detected that the write command in the write operation includes the page address of the second physical page in any physical block, it is determined that the second physical page in any physical block receives the write command.

[0048] In some embodiments, the electronic device performing a write operation on physical pages in physical blocks of multiple sub-dies according to an execution order includes: the electronic device determining a target sub-die from the multiple sub-dies according to the execution order, and when performing a write operation on a first physical page in any physical block of the target sub-die, the electronic device detecting whether other physical pages in any physical block have received a write command. If a second physical page in any physical block has received a write command, the electronic device executing the write command on the second physical page.

[0049] Combine Figure 4 This describes the process of executing a write operation on a physical page in any physical block. When the RBX voltage on physical page PB0 transitions from high to low, the write command is executed on physical page PB0. During the process of writing data to physical page PB0, when the RBX voltage on physical page PB1 transitions from high to low, the write command is executed on physical page PB1. tProg represents the duration of executing the write command on the corresponding physical page.

[0050] This embodiment can implement write commands for different physical pages in the same physical block by performing write operations on physical pages in physical blocks of multiple sub-dies, thereby further improving the write performance of the storage device.

[0051] In at least one embodiment of the present application, the physical blocks of each sub-grain correspond to different planes. For example, block 1 and block 3 of sub-grain DIE0 correspond to plane 3 of sub-grain DIE0, and block 0 and block 4 of sub-grain DIE0 correspond to plane 4 of sub-grain DIE0. When performing a write operation on a sub-grain, the electronic device performs the write operation on multiple planes in the sub-grain in parallel. For example, when the electronic device performs a write operation on sub-grain DIE0, it performs the write operation on plane 3 and plane 4 in parallel. This embodiment can reduce the overall time of the write operation through parallel processing, thereby improving the performance of the storage device.

[0052] In other embodiments, the process of performing an interleaved read operation on multiple sub-dies by an electronic device is similar to the process of performing an interleaved write operation on multiple sub-dies by an electronic device, and is not repeated herein. By performing an interleaved read operation on multiple sub-dies, the present application can improve the read performance of a storage device.

[0053] In at least one embodiment of the present application, when an interrupt command is received during the interleaved write or read operation on multiple sub-dies, the electronic device interrupts the write or read operation on the multiple sub-dies. This embodiment, by interrupting the write or read operation upon receiving the interrupt command, can avoid interrupt function malfunctions that may occur when a single die is divided into multiple sub-dies.

[0054] It can be seen from the above technical solution that the embodiment of the present application can realize parallel read and write operations on multiple sub-grains in the storage device by dividing a single grain in the storage device into multiple sub-grains, without having to wait for the storage device to complete the previous read and write operation before executing a new read and write command, thereby improving the timeliness of the execution of the read and write commands, thereby improving the read and write performance of the storage device.

[0055] like Figure 5 FIG2 is a flowchart of a flash memory read / write method according to another embodiment of the present invention. The flash memory read / write method is applied to an electronic device 1, which includes a storage device 12. The storage device includes a die, which includes multiple planes, each of which is provided with a page buffer. The order of the steps in the flowchart may be changed, and some steps may be omitted, depending on different requirements.

[0056] 501 , disconnect multiple physical blocks in each plane from corresponding page buffers.

[0057] In at least one embodiment of the present application, the electronic device controls each physical block in any plane to be disconnected from the corresponding page buffer. For example, plane 1 is provided with page buffer 1, and plane 1 includes block 1 and block 2. The electronic device controls block 1 to be disconnected from page buffer 1, and controls block 2 to be disconnected from page buffer 1.

[0058] 502 , based on a plurality of page buffers pre-set in a storage device, divide a die into a plurality of sub-dies.

[0059] 503 , performing an interleaved write operation or read operation on multiple sub-dies.

[0060] For details of steps 502-503, please refer to the above Figure 2 The detailed description of steps 201-202 is not repeated here.

[0061] The embodiment of the present application can avoid the situation where the same sub-die is connected to multiple different page buffers by disconnecting multiple physical blocks in each plane from the corresponding page buffers, thereby improving the execution accuracy of write operations or read operations.

[0062] like Figure 6 , which is a functional block diagram of a flash memory read / write device provided in an embodiment of the present application. The flash memory read / write device 11 operates on an electronic device, which includes a storage device, which includes a die, and which includes multiple planes. The flash memory read / write device 11 includes a partitioning unit 110, an execution unit 111, a statistics unit 112, a determination unit 113, a control unit 114, and an interruption unit 115. The modules / units referred to herein are a series of computer-readable instruction segments that can be accessed by the processor 131 and can perform a fixed function, and are stored in the memory 130.

[0063] The division unit 110 is used to divide a die into a plurality of sub-dies based on a plurality of page buffers pre-set in the storage device; the execution unit 111 is used to perform an interleaved write operation or a read operation on the plurality of sub-dies.

[0064] In some embodiments, the partitioning unit 110 is specifically configured to group the physical blocks in the multiple planes according to a preset number to obtain multiple groups; connect the physical blocks in each group to any page buffer, and determine the sub-die corresponding to each group.

[0065] In some embodiments, the execution unit 111 is specifically configured to determine an execution order of the multiple sub-dies based on the operation states of the multiple sub-dies; and perform write operations on the physical pages in the physical blocks of the multiple sub-dies according to the execution order.

[0066] In some embodiments, the execution unit 111 is specifically used to determine a target sub-grain from multiple sub-grains according to an execution order; when performing a write operation on the first physical page in any physical block of the target sub-grain, detect whether other physical pages in any physical block receive a write command; if the second physical page in any physical block receives a write command, execute the write command on the second physical page.

[0067] In some embodiments, before a grain is divided into multiple sub-grains based on multiple page buffers pre-set in a storage device, a counting unit 112 is used to count the total number of planes in the grain; a determination unit 113 is used to determine the total number of buffers of the multiple page buffers based on the total number of planes and a preset multiple; or the determination unit 113 is also used to determine the total number of buffers of the multiple page buffers based on the total number of planes and the device area of ​​the storage device.

[0068] In some embodiments, the determination unit 113 is specifically used to determine the used area based on a preset ratio and the device area; determine the number of first buffers based on the occupied area and the used area of ​​each page buffer; determine the number of second buffers based on the total number of planes and a preset multiple; and determine the total number of buffers based on the number of first buffers and the number of second buffers.

[0069] In some embodiments, each plane is provided with a page buffer. Before dividing a die into multiple sub-dies based on multiple page buffers pre-set in the storage device, the control unit 114 is used to disconnect multiple physical blocks in each plane from corresponding page buffers.

[0070] In some embodiments, when performing an interleaved write operation or a read operation on a plurality of sub-dies, when an interrupt command is received, the interrupt unit 115 is configured to interrupt the write operation or the read operation on the plurality of sub-dies.

[0071] If the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware to complete them through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-mentioned method embodiments can be implemented.

[0072] Computer-readable instructions include computer-readable instruction codes, which may be in source code form, object code form, executable files, or some intermediate form. Computer-readable media may include any entity or device capable of carrying computer-readable instruction codes, recording media, USB flash drives, mobile hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), and random access memory (RAM).

[0073] The memory 130 can be used to store computer-readable instructions and / or modules. The processor 131 implements various functions of the electronic device 1 by running or executing the computer-readable instructions and / or modules stored in the memory 130 and calling data stored in the memory 130. The memory 130 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the electronic device. The memory 130 may include non-volatile and volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other storage devices.

[0074] Exemplarily, the computer-readable instructions may be divided into one or more modules / units, one or more of which are stored in the memory 130 and executed by the processor 131 to complete the present application. One or more modules / units may be a series of computer-readable instruction segments capable of completing a specific function, and the computer-readable instruction segments are used to describe the execution process of the computer-readable instructions in the electronic device 1. For example, the computer-readable instructions may be divided into a division unit 110, an execution unit 111, a statistics unit 112, a determination unit 113, a control unit 114, and an interruption unit 115.

[0075] For details about the functions of each module / unit, please refer to the above Figure 2-5 The detailed description is not repeated here.

[0076] The embodiment of the present application divides a single grain in a storage device into multiple sub-grains, thereby enabling parallel read and write operations on multiple sub-grains in the storage device without having to wait for the storage device to complete the previous read and write operation before executing a new read and write command, thereby improving the timeliness of the execution of the read and write commands and thus improving the read and write performance of the storage device.

[0077] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is merely a logical function division, and other division methods may be used in actual implementation.

[0078] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to achieve the purpose of this embodiment based on actual needs.

[0079] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0080] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the present application is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.

[0081] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices may also be implemented by a single unit or device through software or hardware. Terms such as first and second are used to indicate names and do not imply any particular order.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. A flash memory reading and writing method, characterized in that: Applied to an electronic device, the electronic device includes a storage device, the storage device includes a crystal grain, the crystal grain includes multiple planes, and the flash memory reading and writing method includes: Dividing the die into a plurality of sub-dies based on a plurality of page buffers pre-set in the storage device; An interleaved write operation or a read operation is performed on the plurality of sub-dies.

2. The flash memory reading and writing method according to claim 1, wherein: The step of dividing the die into a plurality of sub-dies based on a plurality of page buffers pre-set in the storage device includes: Grouping the physical blocks in the multiple planes according to a preset number to obtain multiple groups; The physical blocks in each group are connected to any page buffer to determine the sub-die corresponding to each group.

3. The flash memory reading and writing method according to claim 1, wherein: The performing the interleaved write operation on the plurality of sub-dies comprises: determining an execution order of the plurality of sub-dices based on the operation states of the plurality of sub-dices; According to the execution order, a write operation is performed on the physical pages in the physical blocks of the plurality of sub-dies.

4. The flash memory reading and writing method according to claim 3, wherein: The performing of a write operation on the physical pages in the physical blocks of the plurality of sub-dies according to the execution order includes: determining a target sub-grain from the plurality of sub-grains according to the execution order; When performing a write operation on a first physical page in any physical block of the target sub-die, detecting whether other physical pages in the any physical block receive a write command; If a second physical page in any one of the physical blocks receives a write command, the write command is executed on the second physical page.

5. The flash memory reading and writing method according to claim 1, wherein: Before dividing the die into a plurality of sub-dies based on a plurality of page buffers pre-set in the storage device, the method further includes: Counting the total number of planes in the grain; Determine the total number of buffers of the plurality of page buffers according to the total number of planes and a preset multiple; or The total number of buffers of the plurality of page buffers is determined according to the total number of planes and the device area of ​​the storage device.

6. The flash memory reading and writing method according to claim 5, wherein: Determining the total number of buffers of the plurality of page buffers according to the total number of planes and the device area of ​​the storage device includes: Determining the usable area based on a preset ratio and the area of ​​the equipment; determining the number of first buffers according to the occupied area of ​​each page buffer and the used area; Determining the number of second buffers according to the total number of planes and the preset multiple; The total number of buffers is determined according to the first number of buffers and the second number of buffers.

7. The flash memory reading and writing method according to claim 1, wherein: Each plane is provided with a page buffer. Before dividing the die into a plurality of sub-dies based on a plurality of page buffers pre-set in the storage device, the method further includes: The plurality of physical blocks in each plane are disconnected from corresponding page buffers.

8. The flash memory reading and writing method according to claim 1, wherein: When performing an interleaved write operation or a read operation on the plurality of sub-dies, the method further includes: When the interrupt command is received, the write operation or the read operation in the plurality of sub-dies is interrupted.

9. An electronic device, characterized in that: The electronic device comprises: a storage device storing computer-readable instructions; and A processor executes the computer-readable instructions stored in the storage device to implement the flash memory reading and writing method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement the flash memory reading and writing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Memory device and manufacturing method

    CN104424134A

  • Data writing method, flash memory devices and storage equipment

    CN107908571A

  • Data processing method, flash memory and storage device

    CN116560564A

  • Virtual disk array configuration method, electronic equipment and storage medium

    CN117193646A