A method for repairing flash memory
By reading and comparing data in flash memory, it automatically determines whether the number of errors exceeds the redundant number, which solves the problem of difficulty in determining the flash memory in the prior art that it is impossible to perform redundant repair, and realizes the effect of automatic detection and judgment and reducing judgment costs.
Patent Information
- Application Number
- CN202011499220.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-17
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2040-12-17
AI Technical Summary
The prior art is difficult to effectively determine the situation in which the flash cannot be redundant repaired, resulting in high redundancy judgment costs.
By entering the redundancy judgment analysis mode, select the data to be written, write the data to the flash memory, read and compare the data, count the number of errors, and compare it with the number of redundancy. If the number of errors is greater than the number of redundancy, it is judged that the flash memory cannot be repaired with redundancy, and the analysis is immediately terminated.
Automatic detection and judgment are realized, reducing the judgment cost of redundant judgments, and avoiding waiting for all data analysis to obtain analysis results after all data analysis is completed.
Smart Images

Figure CN112562775B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuit technology, and in particular to a method for repairing flash memory. Background Art
[0002] Flash memory can still maintain the stored data information when the power is off, and is a non-volatile memory. Flash memory does not require special high voltage when electrically erased and reprogrammed, and has the characteristics of low manufacturing cost and high storage density, making it the mainstream of non-volatile semiconductor storage technology. Among them, dual-separated gate flash memory has high transmission efficiency and high cost-effectiveness at a small capacity of 1 to 4MB, making it one of the main non-volatile memories on the market.
[0003] In the design of the redundant protection circuit of the flash memory, it is necessary to determine which data errors can be repaired redundantly to improve the flash memory yield. For example, the prior art method for determining the errors existing in the flash memory and determining how to repair them redundantly is as follows. Figure 1 As shown, it includes: after entering the redundant analysis mode, selecting the mode for writing data (all 1, all 0, etc.), writing the data into the storage block that needs to be analyzed in the flash memory, then reading the written data from the beginning address and comparing it with the data to be written, re-reading the data after the address +1 and comparing it again, until all the data in the storage block are detected, writing the information such as the number of errors, the address related to the error, the bit position, whether the redundancy is used, etc. into the register, so that when the flash memory is read and written, the redundancy is used to replace the erroneous part for repair according to this information.
[0004] In another prior art, a method for using an external machine to perform redundant repair judgment is as follows: Figure 2 As shown, after entering the redundant analysis mode, select the mode for writing data (all 1, all 0, etc.) and write the data into the storage block that needs to be analyzed in the flash memory. Then read the written data from the beginning address to the external machine, and use the external machine to compare with the data to be written. The number of errors, the address related to the error, the bit position, whether redundancy is used, and other related information are recorded in the external machine. After the address +1, use the external machine to re-read the data, compare again and record the related information until all the data in the storage block is detected. All the related information is written into the register so that when the flash memory is read and written, redundancy is used to replace the erroneous part for repair according to this information. Compared with the first method, using an external machine can reduce the design and area cost of the flash memory chip, but the test judgment cost will increase. Summary of the invention
[0005] The purpose of the present invention is to provide a method for repairing flash memory, which can determine under what circumstances the flash memory cannot be repaired redundantly, and use this judgment basis to design a process for automatic detection and judgment, and immediately end the analysis after determining that redundant repair cannot be performed, thereby achieving the purpose of optimizing the judgment cost of the redundant judgment system.
[0006] In order to achieve the above objectives, the present invention is implemented by the following technical solutions:
[0007] A method for repairing a flash memory, comprising:
[0008] Step S1, enter the redundancy judgment analysis mode, and select the data to be written;
[0009] Step S2: writing the data into the storage block to be analyzed in the flash memory.
[0010] Step S3, reading data from the storage block to be analyzed starting from the initial flash memory address;
[0011] Step S4, comparing the read data with the data to be written, and counting the number of errors in the data;
[0012] Step S5: Compare the error number with the redundancy number. If the error number is greater than the redundancy number, the flash memory cannot be repaired using redundancy.
[0013] Preferably, it also includes: if the number of errors is less than or equal to the redundancy number, judging whether redundancy is available, and counting the available redundancy number; if the available redundancy number is less than the number of errors, the flash memory cannot be repaired using redundancy.
[0014] Preferably, it also includes: step S6, if the number of errors is less than or equal to the number of redundancies, and the available number of redundancies is greater than or equal to the number of errors, judging whether the available redundancy has been used, and judging whether the bit position of the error data and the corresponding flash memory address when the error occurs match the information recorded in the used redundancy, and counting the number of mismatched errors, and comparing the number of mismatched errors with the remaining unused redundancy. If the number of mismatched errors is greater than the remaining unused redundancy, proceeding to step S7; step S7, the flash memory cannot be repaired using redundancy.
[0015] Preferably, the method further comprises: if the number of unmatched errors is less than or equal to the number of remaining unused redundancies, proceeding to step S8;
[0016] Step S8: The flash memory may be repaired using redundancy.
[0017] Preferably, it also includes: step S9, writing the detection result of whether redundancy can be used for repair, the bit position of the error, the flash memory address corresponding to the error, and the redundant state that has been used into the register, and then proceeding to step S10;
[0018] Step S10, reading the register, if the read detection result shows that the flash memory cannot be repaired by using redundancy, then terminating the analysis mode.
[0019] Preferably, the method further comprises: if the read detection result shows that the flash memory can be repaired by using redundancy, entering step S11;
[0020] Step S11, adding 1 to the initial flash memory address, repeating steps S3 to S11, until the flash memory address is the last flash memory address, then all the storage blocks to be analyzed in the flash memory are detected and the analysis mode ends.
[0021] The present invention has at least one of the following advantages:
[0022] The present invention relates to determining under what circumstances a flash memory cannot be repaired redundantly, and designing a process for automatically detecting and judging based on this judgment basis, and immediately terminating the analysis after determining that redundant repair cannot be performed, so as to reduce the judgment cost of redundant judgment.
[0023] When performing redundancy judgment analysis, after each reading and comparison of data, it is automatically analyzed to determine whether the flash memory cannot be repaired by redundancy. If the flash memory cannot be repaired by redundancy, the redundancy analysis can be ended immediately. Compared with the traditional redundancy detection scheme, the present invention can automatically detect and judge, without having to wait until all the data in the storage block of the flash memory is analyzed before obtaining the analysis result. Redundancy is automatically detected and judged after each data is read. After determining that redundancy cannot repair the flash memory, the judgment is ended to reduce the judgment cost. The present invention is not limited by the number of redundancies and the capacity of the storage block to be analyzed. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a flow chart of a flash memory repair method in the prior art;
[0025] Figure 2 A flowchart of another flash memory repair method in the prior art;
[0026] Figure 3 A flowchart of a flash memory repair method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following is a further detailed description of a flash memory repair method proposed in the present invention in conjunction with the accompanying drawings and specific embodiments. According to the following description, the advantages and features of the present invention will become clearer. It should be noted that the drawings are in a very simplified form and are not in precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention. In order to make the purposes, features and advantages of the present invention more obvious and easy to understand, please refer to the accompanying drawings. It should be noted that the structure, proportion, size, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. Any structural modification, change in proportional relationship or adjustment of size, without affecting the effects that can be produced by the present invention and the purposes that can be achieved, should still fall within the scope of the technical content disclosed by the present invention.
[0028] like Figure 3 As shown, this embodiment provides a method for repairing a flash memory, specifically a method for determining whether a flash memory can be repaired using redundancy (redundant protection circuit) or an automatic detection method, including:
[0029] Step S1, enter the redundancy judgment analysis mode, and select the data to be written. In this embodiment, the data to be written are all 0 or all 1.
[0030] Step S2: writing the data into the storage block to be analyzed in the flash memory, where the storage block refers to a data module of any size that needs to be analyzed in the flash memory.
[0031] Step S3, reading data from the storage block to be analyzed starting from the initial flash address; because each flash address reads a corresponding batch of multi-bit data in the storage block, errors may occur in multiple bit positions in one read analysis, that is, the number of errors occurring simultaneously.
[0032] Step S4: Compare the read data with the data to be written, and count the number of errors in the data.
[0033] Step S5: compare the error number with the redundancy number (preset redundancy number). If the error number is greater than the redundancy number, the flash memory cannot be repaired using redundancy; otherwise, further judgment is required.
[0034] If the number of errors is less than or equal to the number of redundancies, a judgment is made as to whether redundancy is available (whether redundancy is in an available state), and the number of redundancies of the available redundancies is counted (the number of redundancies of the redundancies in an available state is counted); if the number of available redundancies is less than the number of errors, the flash memory (the storage block of the flash memory to be analyzed) cannot be repaired using redundancy.
[0035] This embodiment also includes: step S6, if the number of errors is less than or equal to the number of redundancies, and the available number of redundancies is greater than or equal to the number of errors, whether the available redundancy has been used is judged, and whether the bit position of the error data and the corresponding flash memory address when the error occurs match the information recorded in the used redundancy, and the number of mismatched errors is counted, and the number of mismatched errors is compared with the remaining unused redundancy. If the number of mismatched errors is greater than the remaining unused redundancy, step S7 is entered. Step S7, the flash memory cannot be repaired using redundancy.
[0036] This embodiment also includes: if the number of unmatched errors is less than or equal to the remaining unused redundancy number, proceeding to step S8.
[0037] Step S8: The flash memory may be repaired using redundancy.
[0038] This embodiment also includes: step S9, writing the detection result of whether redundancy can be used for repair, the bit position of the error, the error address (the flash memory address corresponding to the error) and the redundant status that has been used into the register, and entering step S10.
[0039] Step S10, reading the register, if the read detection result shows that the flash memory cannot be repaired by using redundancy, then terminating the analysis mode.
[0040] This embodiment also includes: if the read detection result shows that the flash memory can be repaired by using redundancy, then entering step S11.
[0041] Step S11, add 1 to the initial flash address, repeat the steps S3 to S11, until the flash address is the last flash address, it means that all the storage blocks to be analyzed in the flash memory have been detected, and the analysis mode is terminated. In summary, if you want to pre-judge whether the above redundancy can be repaired, you need to enter the analysis mode first, select which data mode needs to be written (the data to be written are all 0 or all 1), and then read the data, and compare it with the previously selected data mode to see if there is an error. Because the number of pre-designed redundancies (redundant storage blocks) is limited, if the errors that occur at the same time are not less than the assumed number of redundancies, redundancy cannot be used to repair the flash memory. At the same time, if the data read out of the redundant storage block itself is wrong compared to the written data, it means that the redundant storage block itself is unusable, and redundancy cannot be used to repair the flash memory. If the number of errors that occur at the same time is less than the preset number of redundancies, and the redundancy is in an available state, it is further determined whether the redundancy has been used. If the redundancy has been used, it is determined whether the bit position of the error in the flash output data matches. If it does not match, it means that the error that occurred this time is not in the same bit position as the error that occurred last time, which means that this is a new data error. At the same time, determine whether the flash address matches. If it does not match, it means that the error that occurred this time is not the same flash address as the error that occurred last time, which also means that this is a new error. If the bit position of the error and the number of errors that do not match the flash address and the used redundancy are greater than the remaining unused redundancy in the available state, it means that we do not have enough redundancy to repair the error, so it is unrepairable. If the bit position of the error and the number of errors that do not match the flash address and the used redundancy are less than the remaining unused redundancy, it means that there is enough redundancy to repair the error, so it is repairable. Then write the detection result or judgment result of whether redundancy can be used for repair, the bit position of the error and other information into the register, and then read this register. If the readout shows that it is unrepairable, the analysis mode is terminated directly. If it can be repaired, the flash address + 1 (that is, the next flash address of the current flash address) is re-read to read the analysis data until the last flash address of the storage block to be analyzed or the redundancy shows an unrepairable state.
[0042] It can be seen from this that this embodiment involves determining under what circumstances the flash memory cannot be repaired redundantly, and designing a process for automatic detection and judgment based on this judgment basis, and immediately ending the analysis after determining that redundant repair cannot be performed to reduce the judgment cost of redundant judgment.
[0043] When performing redundancy judgment analysis, after each reading and comparison of data, it is automatically analyzed to determine whether the flash memory cannot be repaired by redundancy. If the flash memory cannot be repaired by redundancy, the redundancy analysis can be ended immediately. Compared with the traditional redundancy detection scheme, this embodiment can automatically detect and judge, without waiting for all the data in the storage block of the flash memory to be analyzed before obtaining the analysis result. Redundancy is automatically detected and judged after each data is read. After determining that redundancy cannot repair the flash memory, the judgment is ended to reduce the judgment cost. This embodiment is not limited by the number of redundancies and the capacity of the storage block to be analyzed.
[0044] It can be understood that the above-mentioned redundant storage block is part of the redundant protection circuit. In the context of redundant quantity and the like in this article, redundancy refers to the redundant storage block, and in the context of using redundancy for repair and the like, redundancy refers to the redundant protection circuit.
[0045] It is understood that the devices and methods disclosed in the embodiments of this article can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of this article. In this regard, each box in the flowchart or block diagram can represent a part of a module, program or code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented by a dedicated hardware-based system for performing a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0046] Although the content of the present invention has been described in detail through the above preferred embodiments, it should be appreciated that the above description should not be considered as a limitation of the present invention. After reading the above content, it will be apparent to those skilled in the art that various modifications and substitutions of the present invention will occur. Therefore, the protection scope of the present invention should be limited by the appended claims.
Claims
1. A method for repairing a flash memory, characterized in that: The method is implemented by using a redundant protection circuit: the method comprises: Step S1, enter the redundancy judgment analysis mode, and select the data to be written; Step S2, writing the data into the storage block to be analyzed in the flash memory; Step S3, reading data from the storage block to be analyzed starting from the initial flash memory address; Step S4, comparing the read data with the data to be written, and counting the number of errors in the data; Step S5, comparing the error number with the redundancy number, when the error number is greater than the redundancy number, the flash memory cannot be repaired using redundancy; When reading each flash memory address, steps S3 to S5 are automatically used to determine whether redundancy can be used for repair. If redundancy cannot be used for repair, the result is directly output to end the determination test process.
2. The method for repairing a flash memory according to claim 1, characterized in that: Also includes: If the number of errors is less than or equal to the number of redundancies, whether redundancy is available is determined, and the number of available redundancies is counted; if the number of available redundancies is less than the number of errors, the flash memory cannot be repaired using redundancy.
3. The method for repairing a flash memory as claimed in claim 2, characterized in that: The method further comprises: step S6, if the number of errors is less than or equal to the number of redundancies, and the number of available redundancies is greater than or equal to the number of errors, judging whether the available redundancies have been used, and judging whether the bit position of the error data and the flash memory address corresponding to the error when the error occurs match the information recorded in the used redundancies, and counting the number of mismatched errors, and comparing the number of mismatched errors with the number of remaining unused redundancies; if the number of mismatched errors is greater than the number of remaining unused redundancies, entering step S7; Step S7: The flash memory cannot be repaired using redundancy.
4. The method for repairing a flash memory as claimed in claim 3, characterized in that: Also includes: If the number of unmatched errors is less than or equal to the remaining unused redundancy, proceed to step S8; Step S8: The flash memory may be repaired using redundancy.
5. The method for repairing a flash memory as claimed in claim 4, characterized in that: The method further includes: step S9, writing the detection result of whether redundancy can be used for repair, the bit position of the error, the flash memory address corresponding to the error, and the redundancy status that has been used into the register, and then proceeding to step S10; Step S10, reading the register, if the read detection result shows that the flash memory cannot be repaired by using redundancy, then terminating the analysis mode.
6. The method for repairing a flash memory as claimed in claim 5, characterized in that: Also includes: If the read detection result shows that the flash memory can be repaired by using redundancy, then the process goes to step S11; Step S11, adding 1 to the initial flash memory address, repeating steps S3 to S11, until the flash memory address is the last flash memory address, then all the storage blocks to be analyzed in the flash memory are detected and the analysis mode ends.
Citation Information
Patent Citations
Embedded architecture with serial interface for testing flash memories
CN101611456A
Semiconductor memory device and post package repair method thereof
KR1020140065218A