NAND FLASH group swap method, device, equipment and medium

By dividing the NAND FLASH blocks into groups in address order and generating packet switching information, setting the first first block as a good block as the first packet, the problem of bad blocks when NAND FLASH memory leaves the factory is solved, and the improvement of the Chip operation efficiency and reduce production costs.

CN114968106BActive Publication Date: 2024-11-05XTX TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210594820.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2024-11-05
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

Existing NAND FLASH memory may have bad blocks when leaving the factory. The existing processing methods require increasing chip area or increasing design complexity and table lookup time, which affects efficiency, and no effective solution has been available.

Method used

By dividing all blocks of NAND FLASH into multiple packets in address order, obtaining target address information according to the bad block table, generating packet switching information, and setting the first first block as a good block as a first packet, thus ensuring that The first block of NAND FLASH is a good block from the factory, which improves chip operation efficiency and reduces production costs.

Benefits of technology

It realizes that the first block is a good block in NAND FLASH, simplifies hardware design, improves chip operation efficiency, reduces production costs, and avoids increasing the need for address mapping tables and table lookup time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968106B_ABST
    Figure CN114968106B_ABST
Patent Text Reader

Abstract

This invention relates to the field of semiconductor memory technology, specifically disclosing a NAND FLASH group swapping method, apparatus, device, and medium. The method includes the following steps: dividing all blocks of the NAND FLASH into two or more sequentially arranged groups according to their block address information; obtaining target address information from a bad block table, wherein the target address information is the group address information of the first group whose first block is a good block; generating group swapping information based on the target address information, and setting the first group whose first block is a good block as the first group based on the group swapping information. This method ensures that the first block of the NAND FLASH is a good block during use, thus ensuring that the first block of the NAND FLASH is a factory-made good block, and effectively improving chip operating efficiency and reducing production costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of semiconductor memory technology, and in particular to a NAND FLASH group swapping method, device, equipment and medium. Background Art

[0002] Due to process and manufacturing technology reasons, NAND FLASH (SPI NAND FLASH and PARALLEL NAND FLASH) is allowed to have a certain number of bad blocks before leaving the factory. These bad blocks are randomly distributed in the NAND FLASH.

[0003] NAND FLASH generally requires the first block to be designed as a factory-good block so that customers can store some important data or code in the first block.

[0004] There are two main existing processing methods for ensuring that the first block of NAND FLASH is a good block. The first is to add one or more reserved blocks that can be used to replace the first block in the NAND FLASH storage array. The second is to add an address mapping table module to map the adjacent good block address to the address of the defective first block. The former processing method requires an increase in chip area, resulting in increased costs, while the latter will complicate the software and hardware design, and increase the additional table lookup time, affecting the chip operation efficiency.

[0005] There is currently no effective technical solution to the above problems. Summary of the invention

[0006] The purpose of the present application is to provide a NAND FLASH group replacement method, device, equipment and medium, so that the first NAND FLASH block is a good block before delivery, and the chip operation efficiency is improved and the production cost is reduced.

[0007] In a first aspect, the present application provides a NAND FLASH group replacement method for ensuring that the first NAND FLASH block is a factory good block, the method comprising the following steps:

[0008] Divide all blocks of the NAND FLASH into two or more sequentially arranged groups in equal amounts according to the order in which the block address information is arranged;

[0009] Acquire target address information according to the bad block table, where the target address information is the packet address information of the first packet whose first block is a good block;

[0010] The packet switching information is generated according to the target address information, and the packet whose first block is a good block is set as the first packet according to the packet switching information.

[0011] The NAND FLASH group swapping method of the present application divides all blocks in the NAND FLASH into multiple groups according to the address arrangement order. When the first block of the NAND FLASH is a bad block, group swapping information can be generated to swap the group whose first block is a good block with the first group, thereby ensuring that the first block of the NAND FLASH is a good block when it is used.

[0012] The NAND FLASH group exchange method, wherein the step of obtaining target address information according to the bad block table includes:

[0013] Identify in sequence whether the first block of each of the groups is a good block according to the bad block table and in the order in which the groups are arranged;

[0014] Get the destination address information of the first packet whose first block is a good block.

[0015] The NAND FLASH group swapping method, wherein the step of generating group swapping information according to the target address information comprises:

[0016] The packet swap information for marking the difference between the address bits of the target address information and the packet address information of the first packet is generated according to the target address information and the packet address information of the first packet.

[0017] In the NAND FLASH group swapping method of this example, the group swapping information generated based on the address bit difference can swap the group corresponding to the target address information and the first group according to the binary address bit, that is, swap the group address information of the target address information and the first group.

[0018] The NAND FLASH group swapping method, wherein when the group address information of the first group is an all-zero group address, the step of generating group swapping information according to the target address information comprises:

[0019] The target address information is set as the packet switching information.

[0020] The NAND FLASH group swapping method of this example sets the target address information as the group swapping information, that is, the target address information is directly extracted to generate the group swapping information without comparing the difference between the target address information and the group address information of the first group, which can effectively simplify the generation process of the group swapping information.

[0021] The NAND FLASH group swapping method, wherein the group address information is high-order address information in the block address information used to distinguish the groups.

[0022] The NAND FLASH group exchange method, wherein the number of groups is an even number, and the step of setting the group whose first block is a good block as the first group according to the group exchange information comprises:

[0023] The packet address information in all the block address information is transformed according to the packet swap information.

[0024] The NAND FLASH group swapping method, wherein the number of blocks in each of the groups is an even number.

[0025] In a second aspect, the present application further provides a NAND FLASH group exchange device for ensuring that the first NAND FLASH block is a factory good block, the device comprising:

[0026] A grouping module, used for equally dividing all blocks of the NAND FLASH into two or more sequentially arranged groups according to the order in which the block address information is arranged;

[0027] An acquisition module, used for acquiring target address information according to the bad block table, wherein the target address information is the group address information of the first group whose first block is a good block;

[0028] The group switching module is used to generate group switching information according to the target address information, and set the group whose first block is a good block as the first group according to the group switching information.

[0029] The NAND FLASH group swapping device of the present application divides all blocks in the NAND FLASH into multiple groups according to the address arrangement order. When the first block of the NAND FLASH is a bad block, it can generate group swapping information to swap the first group whose first block is a good block with the first group, thereby ensuring that the first block of the NAND FLASH is a good block when it is used.

[0030] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are executed.

[0031] In a fourth aspect, the present application further provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps in the method provided in the first aspect are executed.

[0032] As can be seen from the above, the present application provides a NAND FLASH group exchange method, device, equipment and medium, wherein the method divides all blocks in the NAND FLASH into multiple groups according to the address arrangement order, and when the first block of the NAND FLASH is a bad block, it can generate group exchange information to exchange the first group whose first block is a good block with the first group, thereby ensuring that the first block of the NAND FLASH is a good block when it is used, that is, the first block of the NAND FLASH is a factory good block, and effectively improves the chip operation efficiency and reduces production costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A flowchart of a NAND FLASH group swapping method provided in an embodiment of the present application.

[0034] Figure 2 This is a schematic diagram of a group in which the second group is the first group whose first block is a good block.

[0035] Figure 3 A schematic diagram of the group swapping relationship of the NANDFLASH group swapping method provided in an embodiment of the present application when the second group is the first group whose first block is a good block.

[0036] Figure 4 A schematic diagram of the group exchange relationship of the NAND FLASH group exchange method provided in an embodiment of the present application when the first group is the first group whose first block is a good block.

[0037] Figure 5 A schematic diagram of the structure of a NAND FLASH group swapping device provided in an embodiment of the present application.

[0038] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0039] Figure numerals: 201, grouping module; 202, acquisition module; 203, group changing module; 301, processor; 302, memory; 303, communication bus. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0041] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0042] First, please refer to Figure 1-Figure 4 , Figure 1-Figure 4 A NAND FLASH group replacement method in some embodiments of the present application is used to ensure that the first NAND FLASH block is a factory good block. The method includes the following steps:

[0043] S1. Divide all blocks of NAND FLASH into two or more sequentially arranged groups according to the order of block address information;

[0044] Specifically, the block address information is the address used to characterize the storage location of the corresponding block in NAND FLASH, and is also the common address of all sectors / storage units in the corresponding block. The block address information is arranged in ascending order of block addresses, which is the operation order when NAND FLASH is used normally. Among them, the first block of all blocks is the first block of the entire NAND FLASH, that is, the block generally used to store important data or code of NAND FLASH.

[0045] More specifically, the number of groups is preferably set to a number that can divide all blocks equally, so as to ensure that all blocks can be smoothly divided equally.

[0046] More specifically, after the splitting in step S1, each group has the same number of blocks, and the blocks in each group are arranged in the order of block address information, that is, the first block in each group is the block with the smallest block address information in the corresponding group.

[0047] S2. Obtain target address information according to the bad block table, where the target address information is the packet address information of the first packet whose first block is a good block;

[0048] Specifically, NAND FLASH will perform bad block scanning and establish a bad block table before leaving the factory. The method of the embodiment of the present application identifies whether the corresponding block is a good block by calling the bad block table established by the bad block scanning. If the block to be identified is not in the bad block table, it is a good block.

[0049] More specifically, the group address information can be the tag number of the group, or it can be the address feature of the corresponding group. In the embodiment of the present application, it is preferably used to characterize the address of the storage location of the corresponding group in NAND FLASH, which is also the common address of all blocks in the corresponding group.

[0050] More specifically, the first block in each group is the first block of the corresponding group. The target address information obtained by the method of the embodiment of the present application represents the storage location of the group whose first block in the arrangement order of the groups is a good block. If the first block of the first group is a bad block and the first block of the second group is a good block, the group address information of the second group is regarded as the target address information.

[0051] S3. Generate packet switching information according to the target address information, and set the first packet whose first block is a good block as the first packet according to the packet switching information.

[0052] Specifically, the group swap information is configuration information for swapping the group address information when the group is used, and the group whose first head block is a good block (i.e., the group corresponding to the target address information) is swapped with the original first group of the NAND FLASH to set it as the first group, that is, all blocks in the group corresponding to the target address information are swapped one-to-one with all blocks in the original first group of the NAND FLASH, so that when using the NAND FLASH, the first block of the first group of the NAND FLASH is a good block, so that the user can smoothly store and write important data or code into the first block of the NAND FLASH.

[0053] More specifically, the group swap information is generally written into the configuration area of ​​the NAND FLASH as configuration information, that is, written into the non-volatile configuration register of the NAND FLASH, so that when the NAND FLASH is enabled, the group swap information can be read first to swap the groups according to the group swap information, ensuring that when the NAND FLASH is enabled, the group corresponding to the target address information can be directly used as the first group. This swap method only relies on the group swap information as a single configuration information to achieve automatic swapping when the NAND FLASH is started. There is no need to add an address mapping table module to map the bad block addresses one by one to ensure that the first block is a good block. This ensures that the first block when the NAND FLASH is used is a good block while effectively simplifying the complexity of the software and hardware design of the NAND FLASH. In addition, there is no need to add an address mapping table, which also saves the table lookup time consumed by the table lookup operation of the corresponding address mapping table, thereby improving the startup and operation efficiency of the NAND FLASH.

[0054] More specifically, the packet swap information is stored in the NAND FLASH as configuration information, so that the NAND FLASH does not need to repeatedly execute steps S1-S3 to obtain the packet swap information for packet swap each time it is started, but can perform packet swap using the packet swap information stored in the NAND FLASH.

[0055] More specifically, the method of the embodiment of the present application also does not need to set up multiple additional reserved blocks for replacing the first block, which effectively simplifies the NAND FLASH circuit design and saves the occupied area and device cost corresponding to the reserved blocks.

[0056] The NAND FLASH group swapping method of the embodiment of the present application divides all blocks in the NAND FLASH into multiple groups according to the address arrangement order. When the first block of the NAND FLASH is a bad block, group swapping information can be generated to swap the first group whose first block is a good block with the first group, thereby ensuring that the first block of the NAND FLASH is a good block when it is used, that is, the first block of the NAND FLASH is a factory good block, and effectively improving the chip operation efficiency and reducing the production cost.

[0057] In some preferred implementations, the step of acquiring target address information according to the bad block table includes:

[0058] S21, identifying whether the first block of each group is a good block in sequence according to the arrangement order of the groups according to the bad block table;

[0059] Specifically, since the method of the embodiment of the present application aims to replace the first block of NAND FLASH with a good block, and the group is the replacement object, for each group, it is only necessary to determine whether its first block is a good block, thereby effectively reducing the time required to obtain the target address information.

[0060] S22. Obtain the target address information of the first packet whose first block is a good block.

[0061] Specifically, this step is to obtain the packet address information of the first packet whose first block is a good block and regard it as the target address information.

[0062] More specifically, the process of executing steps S21-S22 can be to first identify whether the first block of all groups is a good block, and then extract the group address information of the first group whose first block is a good block as the target address information, or to identify whether the first block of each group is a good block one by one, suspend the identification process when a good block is identified, and regard the group address information of the group corresponding to the good block as the target address information. The latter processing method does not require good block identification for the first blocks of all groups, can effectively reduce the amount of identification data, and improve the efficiency of obtaining the target address information.

[0063] In some preferred implementations, the step of generating packet switching information according to the target address information includes:

[0064] S31. Generate packet swap information for marking the difference between the address bits of the target address information and the packet address information of the first packet according to the target address information and the packet address information of the first packet.

[0065] Specifically, in NAND FLASH, the address is generally composed of binary address bits, that is, the bit symbol of each address bit in the address is represented by data 0 or data 1, and the group address information is also composed of binary address symbols. Therefore, the address bit difference between the target address information and the group address information of the first group is manifested as the consistency of each bit symbol. The difference in bit symbols directly reflects the positional relationship between the group corresponding to the target address information and the first group. The group swap information generated based on the address bit difference can swap the group corresponding to the target address information and the first group according to the binary address bit, that is, swap the group address information of the target address information with the first group.

[0066] In some preferred embodiments, the number of bits of the packet swap information is the same as the number of bits of the target address information, and is used to characterize whether the bit symbols of different address bits of the target address information and the packet address information of the first group are the same, wherein data 0 represents the same and data 1 represents the different. For example, if the packet address information of the first group is 001 and the target address information is 101, then the packet swap information is 100. In this case, the packet swap information indicates that the group corresponding to the target address information can be swapped to the first group by inverting the bit symbols of the highest (leftmost) address bits of the target address information and the packet address information of the first group.

[0067] In some preferred implementations, when the packet address information of the first packet is an all-zero packet address, the step of generating the packet swap information according to the target address information can be simplified to include:

[0068] S31', setting the target address information as the packet switching information.

[0069] Specifically, in NAND FLASH, the address of the first storage unit is generally set to an all-zero address, so the block address information of the block where it is located is an all-zero block address, and the group address information of the block where the block is located is an all-zero group address; in this case, the bit symbol of the address bit of data 1 in the target address information is different from the group address information of the first group, and the group swap information generally uses data 1 to indicate that the bit symbol of the address bit is different, so the target address information can be set to the group swap information, that is, there is no need to compare the difference between the target address information and the group address information of the first group, and the target address information is directly extracted to generate the group swap information, so as to simplify the generation process of the group swap information. If the target address information is 101, the group swap information is set to 101 which is consistent with the target address information.

[0070] In some preferred implementations, the group address information is high-order address information in the block address information used to distinguish groups.

[0071] Specifically, the group address information is obtained based on the block address information, so that each group can have independent and unique group address information that can express the order of group arrangement and storage location.

[0072] More specifically, the number of address bits of the group address information is determined by the number of groups. For example, when the number of groups is 5-8, the address contained in 3 binary address bits is required to divide the groups. At this time, the high-order address information corresponding to the three highest-order address bits in the address of the NAND FLASH storage unit is the group address information.

[0073] More specifically, since the group address information is the high-order address information in the block address information that indicates in which group the block is located, the group address information in each group is obtained according to the number of groups and the block address information, and the number of address bits a of the group address information satisfies: 2 a-1 <N<2 a ,N is the number of groups.

[0074] More specifically, the method of the embodiment of the present application can extract the group address information of the corresponding group according to the block address information in the corresponding group after the grouping is completed in step S1, so that step S2 can obtain the target address information according to the group address information. It can also extract the group address information as the target address information according to the block address information of the good block when the first group whose first block is a good block is screened out in step S2; in order to facilitate subsequent group exchange, the method of the embodiment of the present application preferably adopts the former means to obtain the target address information.

[0075] In some preferred implementations, the number of groups is an even number, and the step of setting the group whose first block is a good block as the first group according to the group swap information includes:

[0076] S32. Transform the group address information in all block address information according to the group swap information.

[0077] Specifically, since the number of groups is an even number, all groups can be converted one-to-one. On this basis, the difference in address bits represented by the group exchange information is used to exchange all group address information, so that the group with the first block as a good block can be set as the first group, so that the first block of NAND FLASH is a good block.

[0078] More specifically, as can be seen from the foregoing content, the packet swap information uses data 1 to indicate the difference in address bits between the packet corresponding to the target address information and the first packet. Therefore, the packet swap can be realized by using data 1 in the packet swap information to perform an inversion operation on the corresponding address bits of all packet address information. For example: Figure 2 As shown in FIG. 1 , the packet address information of the second packet is the target address information, and the corresponding packet swap information is 001. Therefore, in this case, the third bit of all packet address information needs to be inverted to achieve Figure 3The swapping of all the groups shown makes the original second group set as the first group; wherein, the NAND FLASH has 64 blocks, which are equally divided into 8 groups, and the block address information is a 6-bit binary address bit, wherein the first three high-order addresses are the group address information, and the block address information of the block addresses 8 to 15 accessed by the customer is 001000-001111, that is, the corresponding target address information is 001, and the group swap information is 001. After swapping based on the group swap information, the target address information is swapped to 000, so that the block address information of the block addresses 8 to 15 accessed by the customer is swapped to 000000-000111.

[0079] More specifically, the group swap information in the embodiment of the present application exists as configuration information stored in NAND FLASH, so using the group swap information to swap all groups during the stage of NAND FLASH reading configuration information for startup is more in line with the operating logic of NAND FLASH.

[0080] More specifically, if the first block in the first group is a good block, the generated group swap information is as follows: Figure 4 If it is 000, the group address information will not be inverted, that is, after executing step S32, the group address information of each group will not be changed.

[0081] In some other implementations, the step of setting the first group whose first block is a good block as the first group according to the group swap information includes:

[0082] S32', swap the target address information and the packet address information of the first packet according to the packet swap information.

[0083] Specifically, in this processing method, there is no need to consider whether the group is an even number, and it has a wider scope of application, but it is necessary to design appropriate swap logic according to the target address information. Compared with step S32', step S32 only needs to configure the group swap information as a means of address inversion when NAND FLASH is started, and there is no need to lock the first group whose first block is a good block for swapping. It has the advantages of simple design logic and higher startup efficiency. Therefore, the method of the embodiment of the present application preferably uses step S32 to set the first group.

[0084] In some preferred embodiments, the number of blocks in each group is an even number, and is preferably an integer multiple of 8; in the process of executing step S2, it is necessary to identify whether the first block in each group is a good block. Therefore, the data of the blocks in each group determines the execution speed of step S2 to a certain extent. Therefore, it is not advisable to design the number of blocks in each group to be too small, and in order to comply with the binary arrangement design, the number of blocks in the group needs to be designed to be an even number. Therefore, in an embodiment of the present application, the number of blocks in each group is designed to be an integer multiple of 8, preferably 8.

[0085] Second, please refer to Figure 5 , Figure 5 A NAND FLASH group exchange device provided in some embodiments of the present application is used to ensure that the first NAND FLASH block is a factory-good block. The device includes:

[0086] The grouping module 201 is used to divide all the blocks of the NAND FLASH into two or more sequentially arranged groups according to the order in which the block address information is arranged;

[0087] An acquisition module 202 is used to acquire target address information according to the bad block table, where the target address information is the group address information of the first group whose first block is a good block;

[0088] The group switching module 203 is used to generate group switching information according to the target address information, and set the group whose first block is a good block as the first group according to the group switching information.

[0089] The NAND FLASH group swapping device of the embodiment of the present application divides all blocks in the NAND FLASH into multiple groups according to the address arrangement order. When the first block of the NAND FLASH is a bad block, it can generate group swapping information to swap the first group whose first block is a good block with the first group, thereby ensuring that the first block of the NAND FLASH is a good block when it is used, that is, the first block of the NAND FLASH is a factory good block, and effectively improves the chip operation efficiency and reduces the production cost.

[0090] In some preferred implementations, the NAND FLASH group swapping apparatus of the embodiments of the present application is used to execute the NAND FLASH group swapping method provided in the first aspect above.

[0091] Third, please refer to Figure 6 , Figure 6 This is a structural diagram of an electronic device provided in an embodiment of the present application. The present application provides an electronic device, including: a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not shown). The memory 302 stores a computer program executable by the processor 301. When the computing device is running, the processor 301 executes the computer program to execute the method in any optional implementation of the above-mentioned embodiment.

[0092] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method in any optional implementation of the above embodiment is executed. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk.

[0093] In summary, the embodiments of the present application provide a NAND FLASH group swapping method, apparatus, device and medium, wherein the method divides all blocks in the NAND FLASH into multiple groups according to the address arrangement order, and when the first block of the NAND FLASH is a bad block, it can generate group swapping information to swap the first group whose first block is a good block with the first group, thereby ensuring that the first block of the NAND FLASH is a good block when it is used, that is, the first block of the NAND FLASH is a factory good block, and effectively improves the chip operation efficiency and reduces the production cost.

[0094] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0095] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0096] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0097] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0098] The above description is only an embodiment of the present application and is not intended to limit the protection scope of 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 NAND FLASH grouping replacement method, characterized in that: The method is used to ensure that the first NAND FLASH block is a factory-good block, and the method comprises the following steps: Divide all blocks of the NAND FLASH into two or more sequentially arranged groups in equal amounts according to the order in which the block address information is arranged; Acquire target address information according to the bad block table, where the target address information is the packet address information of the first packet whose first block is a good block; The packet switching information is generated according to the target address information, and the packet whose first block is a good block is set as the first packet according to the packet switching information.

2. The NAND FLASH group swapping method according to claim 1, characterized in that: The step of obtaining target address information according to the bad block table includes: Identify in sequence whether the first block of each of the groups is a good block according to the bad block table and in the order in which the groups are arranged; Get the destination address information of the first packet whose first block is a good block.

3. The NAND FLASH group swapping method according to claim 1, characterized in that: The step of generating packet switching information according to the target address information comprises: The packet swap information for marking the difference between the address bits of the target address information and the packet address information of the first packet is generated according to the target address information and the packet address information of the first packet.

4. The NAND FLASH group swapping method according to claim 1, characterized in that: When the packet address information of the first packet is an all-zero packet address, the step of generating packet swap information according to the target address information comprises: The target address information is set as the packet switching information.

5. The NAND FLASH group swapping method according to claim 1, characterized in that: The group address information is high-order address information in the block address information used to distinguish the groups.

6. The NAND FLASH grouping replacement method according to claim 5, characterized in that: The number of groups is an even number, and the step of setting the group whose first block is a good block as the first group according to the group switching information comprises: The packet address information in all the block address information is transformed according to the packet swap information.

7. The NAND FLASH group swapping method according to claim 1, characterized in that: The number of blocks in each of the groups is an even number.

8. A NAND FLASH group swapping device, characterized in that: Used to ensure that the first NAND FLASH block is a factory-good block, the device includes: A grouping module, used for equally dividing all blocks of the NAND FLASH into two or more sequentially arranged groups according to the order in which the block address information is arranged; An acquisition module, used for acquiring target address information according to the bad block table, wherein the target address information is the group address information of the first group whose first block is a good block; The group switching module is used to generate group switching information according to the target address information, and set the group whose first block is a good block as the first group according to the group switching information.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 7 are executed.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are executed.