Background
Chips in the memory are tested in batch before being shipped out of a factory to detect whether the memory cells are faulty or not, and when the fault is detected, the faulty memory cells are repaired.
Therefore, when a memory fails during the use of the memory by a user, how to repair the memory is an urgent problem to be solved.
At present, the memory tends to have higher and higher density, internal routing is more and more dense, and short circuit and disconnection phenomena between bit lines or word lines are more serious. Therefore, before the memory leaves the factory, a large number of tests are required, the market-oriented period of the product is influenced by the processes, and a large amount of manpower and material resources are consumed. In addition, the repair result of the memory before leaving the factory is solidified in the memory, and repair information can be automatically loaded every time the memory is powered on, so that normal use of a user is guaranteed. However, when a memory fails during use, a user can only correct the memory by using the ECC, but the ECC correction capability is limited.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for automatically detecting and repairing a memory, which can automatically detect and repair the memory when a user uses the memory, so as to prolong the service life of the memory.
In a first aspect, an embodiment of the present invention provides a method for automatic detection and repair of a memory, where the method includes:
recording the operation type and the operation frequency of a user aiming at the storage unit in the memory, and acquiring the time interval of any two times of operation of the user;
detecting a storage unit of the memory in the time interval to generate a detection result;
and repairing the memory according to the detection result.
Optionally, the operation types include a program operation, an erase operation, and a read operation.
Optionally, when recording the operation type and the operation frequency of the user for the memory unit in the memory, the method further includes tracking and recording a data type error occurring in the memory unit in the memory, a frequency of the data type error occurring, and an address of the memory unit in which the data type error occurs during the use of the memory by the user;
and detecting the memory unit with the data type error in the time interval according to the data type error of the memory unit in the memory, the frequency of the data type error and the address of the memory unit with the data type error.
Optionally, in the time interval, detecting a storage unit of the memory, and generating a detection result specifically includes:
performing a programming operation on a memory cell of the memory during the time interval;
after programming operation is carried out on the storage unit of the memory, reading operation is carried out on the storage unit of the memory to obtain an actual reading result;
and if the actual reading result is not consistent with the expected reading result of the programming operation of the storage unit of the memory, judging that the storage unit fails, and generating a detection result, wherein the detection result is the address of the failed storage unit.
Optionally, the repairing the memory according to the detection result further includes:
and after the failed storage unit is repaired, carrying out re-detection on the failed storage unit, and if the repair is successful, deleting the address of the failed storage unit in the detection result.
In a second aspect, an embodiment of the present invention provides an apparatus for automatic detection and repair of a memory, where the apparatus includes: the recording module is connected with the detection module and is used for recording, tracking and recording the operation type and the operation frequency of a user aiming at the storage unit in the memory and acquiring the time interval of any two times of operation of the user;
the detection module is used for detecting the storage unit of the memory in the time interval to generate a detection result, and the detection module is connected with the repair module;
and the repairing module is used for repairing the memory according to the detection result.
Optionally, the operation types include a program operation, an erase operation, and a read operation.
Optionally, the recording module is further configured to record data type errors occurring in storage units in the memory, a frequency of the data type errors occurring, and addresses of the storage units where the data type errors occur during the use of the memory by a user;
the detection module is used for detecting the memory unit with the data type error in the time interval according to the data type error of the memory unit in the memory, the frequency of the data type error and the address of the memory unit with the data type error.
Optionally, the detection module further includes a programming unit, configured to perform a programming operation on a storage unit of the memory in the time interval;
the detection module further comprises a reading unit, wherein the reading unit is connected with the programming unit and is used for reading the storage unit of the memory after the programming operation is carried out on the storage unit of the memory to obtain an actual reading result;
the detection module further comprises a detection result generation unit, wherein the detection result generation unit is connected with the reading unit and used for judging that the storage unit fails to generate a detection result if the actual reading result is not consistent with an expected reading result of programming operation of the storage unit of the memory, and the detection result is the address of the failed storage unit.
Optionally, the repair module is further configured to, after repairing the memory according to the detection result,
and detecting the failed storage unit again, and deleting the address of the failed storage unit in the detection result if the repair is successful.
The embodiment of the invention provides a method and a device for automatically detecting and repairing a memory, which are characterized in that the operation type and the operation frequency of a user aiming at a storage unit in the memory are recorded, the time interval of any two operations of the user is obtained, the time interval of the user not operating the memory is utilized to detect the storage unit of the memory, a detection result is generated, the memory is repaired according to the detection result, the detection and repair time is fragmented, the test and repair efficiency is improved, the purposes of automatically maintaining and repairing the storage unit of the memory in the process of using the memory by the user are achieved, and the service life of the memory is prolonged.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
The method and the device for automatically detecting and repairing the memory provided by the embodiment of the invention aim at automatically detecting and repairing the memory by the method and the device for automatically detecting and repairing the memory in the using process of a user. Example one
Fig. 1 is a flowchart illustrating an automatic detection and repair method for a memory according to an embodiment of the present invention. The method can be executed by a device for automatic detection and repair of a memory, wherein the device can be realized by hardware and/or software, and comprises the following steps:
andstep 110, recording the operation type and the operation frequency of the user for the storage unit in the memory, and acquiring the time interval of any two operations of the user.
In this embodiment, the operation type and the operation frequency of the memory unit in the memory by the user may be referred to as a user habit, that is, the user habitually performs one operation on some memory units, optionally, the operation type includes a programming operation, an erasing operation, and a reading operation, and each type of operation and the operation frequency may be relatively fixed. It should be noted that any two operations may be the same type of operation or different types of operations, depending on the habits of the user. The time interval of any two operations of the user is acquired, and some detection and repair can be performed in the subsequent operation process in the time interval.
And 120, detecting the storage unit of the memory within a time interval to generate a detection result.
In this embodiment, the detection is performed on the storage unit of the memory, and the detection result is generated. The purpose of the detection is to troubleshoot memory cells in the memory. The failure of the storage unit may exemplarily include a hardware failure and a software failure. Hardware failures typically include the following 4 cases: 1. some or all of the addresses are not addressable due to internal shorts or opens in the decoder. 2. Transistors within the input/output circuitry of the memory fail. 3. Memory cell damage, which may occur during manufacturing or during aging, is manifested as a memory cell being fixed in a certain state and not being able to change. 4. The wire breaks due to insufficient metallization or excessive stress. Software failures typically include the following 8 cases: 1. the value in the memory cell is fixed at logic 1 or at logic 0 and cannot be changed. 2. When programming, the memory cell cannot transition from 0 to 1 or 1 to 0. 3. The access speed is slow. 4. If the switching time in the row or column address decoding circuit is too long, one bit of data may not be written to only one memory cell but may be repeatedly written to two or more memory cells; in a read operation, it is then possible to read out not only the contents of one memory cell at a time, but the contents of two or more memory cells. 5. The recovery time after a programming operation is too long, which is read immediately after the programming operation, and the memory cannot provide the correct signal. 6. The address decoding fault comprises four conditions, namely: an address cannot access any memory location; a certain address can simultaneously access a plurality of memory units; a certain memory cell cannot be accessed by any address; a certain memory location may be accessed by a plurality of addresses. 7. A change in data in one cell of the memory results in a change in data in another adjacent memory cell. Since the memory cells in the memory are very dense and may be electromagnetically mismatched, the content of one memory cell may be affected by the read/write operations in the neighboring memory cells. 8. If the storage capacitor leaks too quickly, the contents of the storage are lost before a specified minimum time.
And step 130, repairing the memory according to the detection result.
In the present embodiment, the memory is repaired based on the detection result. Failures of the storage unit due to the memory include hardware failures and software failures. Accordingly, repairs to memory illustratively include hardware repairs and software repairs. Hardware repair may illustratively replace a failed memory cell with a redundant memory cell. This approach may save test repair time. In the operation of the storage unit, if the data type of the storage unit has an Error, the algorithm module is exemplarily used to correct the Error through an Error Correction Code (ECC) module, that is, the algorithm module controls the Error within the fault tolerance of the ECC module, which is a scheme that can be adopted by software repair.
The embodiment of the invention provides a method for automatically detecting and repairing a memory, which comprises the steps of recording the operation type and the operation frequency of a user aiming at a storage unit in the memory, acquiring the time interval of any two operations of the user, detecting the storage unit of the memory by utilizing the time interval of no operation of the user on the memory, generating a detection result, and repairing the memory according to the detection result.
Example two
Fig. 2 is a flowchart illustrating an automatic detection and repair method for a memory according to a second embodiment of the present invention.
On the basis of the above embodiments, the embodiment of the present invention provides an automatic detection and repair method, referring to fig. 2, the method includes the following steps:
step 210, recording the operation type and operation frequency of the user for the storage unit in the memory, acquiring the time interval of any two operations of the user, and recording the operation type and operation frequency of the user for the storage unit in the memory, wherein the method further comprises recording data type errors, the frequency of the data type errors and the address of the storage unit with the data type errors which occur in the storage unit in the memory when the user uses the memory.
Step 220, detecting the memory cell with the data type error in a time interval according to the data type error of the memory cell in the memory, the frequency of the data type error and the address of the memory cell with the data type error.
As described in the above embodiments, the memory generally includes an ECC module, and the ECC module has a certain error correction capability, and then the data type error occurred for the memory cell in the memory within the ECC error correction capability, the frequency of the data type error occurred, and the address of the memory cell in which the data type error occurred are recorded. In order to avoid that the memory cells can not be detected in time and repaired in time when a hardware fault occurs in the subsequent use process or a software fault occurs but exceeds the error correction range of the ECC module, thereby influencing the use of the memory by a user, the subsequent detection and repair can also be carried out on the memory cells.
And step 230, repairing the memory according to the detection result.
The embodiment of the invention provides a method for automatically detecting and repairing a memory, which records the operation type, the operation frequency and the address of a memory unit in the using process of a user, and detects and repairs the memory unit aiming at the error within the time interval of two arbitrary operations of the user. The detection and repair process detects and repairs the memory cells with data type errors in the ECC correction capability, on one hand, the detection and repair process is more targeted, and meanwhile, the memory cells can be prevented from being detected in time and repaired in time due to hardware faults or software faults which exceed the error correction range of an ECC module in the subsequent use process. On the other hand, in the detection and repair process, compared with the method of intensively planning a time period to detect and repair the memory in a time interval when the user does not use the memory, the detection and repair time is fragmented, the test and repair efficiency is improved, the automatic maintenance and repair purpose of the storage unit of the memory is achieved, and the service life of the memory is prolonged.
EXAMPLE III
Fig. 3 is a flowchart illustrating an automatic detection and repair method for a memory according to a third embodiment of the present invention.
On the basis of the above embodiments, the embodiment of the present invention provides an automatic detection and repair method, referring to fig. 3, which includes the following steps:
and step 310, recording the operation type and the operation frequency of the user for the storage unit in the memory, and acquiring the time interval of any two operations of the user.
Step 320, programming the memory cells of the memory in a time interval; after programming operation is carried out on the storage unit of the memory, reading operation is carried out on the storage unit of the memory to obtain an actual reading result; and if the actual reading result is not consistent with the expected reading result of the programming operation of the memory unit of the memory, judging that the memory unit fails, and generating a detection result, wherein the detection result is the address of the failed memory unit.
In this embodiment, the detection method may detect a hardware failure or a software failure. For example, the hardware failure and the software failure may be determined according to a type that an actual read result does not coincide with an expected read result of a program operation performed on a memory cell of the memory.
And step 330, repairing the memory according to the detection result.
And 340, after the failed storage unit is repaired, re-detecting the failed storage unit, and if the repair is successful, deleting the address of the failed storage unit in the detection result.
If the repair is successful, the address of the memory unit which fails before the repair is deleted, so that the utilization rate of the memory unit in the memory is improved, and the power consumption is reduced.
The embodiment of the invention provides a method for automatically detecting and repairing a memory, which comprises the steps of recording the operation type and the operation frequency of a user aiming at a storage unit in the memory, acquiring the time interval of any two times of operations of the user, detecting the storage unit of the memory by utilizing the time interval of no operation of the user on the memory, generating a detection result, and repairing the memory according to the detection result. The specific detection technical scheme is as follows: performing a program operation on a memory cell of a memory; after programming operation is carried out on the storage unit of the memory, reading operation is carried out on the storage unit of the memory to obtain an actual reading result; and if the actual reading result is not consistent with the expected reading result of the programming operation of the memory unit of the memory, judging that the memory unit fails, and generating a detection result, wherein the detection result is the address of the failed memory unit. The hardware fault and the software fault can be judged according to the type that the actual reading result is inconsistent with the expected reading result of programming operation on the storage unit of the memory, the detection scheme is quick and convenient, and the time is strived for subsequent repair.
Example four
FIG. 4 is a schematic structural diagram of an apparatus for automatic detection and repair of a memory according to a fourth embodiment of the present invention; fig. 5 is a schematic structural diagram of another apparatus for automatically detecting and repairing a memory according to a fourth embodiment of the present invention.
Based on the same concept, the embodiment of the invention provides a device for automatically detecting and repairing a memory, and referring to fig. 4 and 5, the device comprises:
therecording module 410, therecording module 410 and the detectingmodule 420 are connected to record, track and record the operation type and the operation frequency of the user for the storage unit in the memory, and obtain the time interval between any two operations of the user.
The detectingmodule 420 is configured to detect a storage unit of the memory at a time interval to generate a detection result, and the detectingmodule 420 is connected to the repairingmodule 430.
And arepair module 430, configured to repair the memory according to the detection result.
Optionally, the operation types include a program operation, an erase operation, and a read operation.
Optionally, therecording module 410 is further configured to record data type errors occurring in memory units in the memory, a frequency of the data type errors occurring, and addresses of the memory units where the data type errors occur during the memory usage process of the user.
Thedetection module 420 detects the memory cell with the data type error at a time interval according to the data type error of the memory cell in the memory, the frequency of the data type error and the address of the memory cell with the data type error.
Optionally, thedetection module 420 further includes aprogramming unit 4201 for performing a programming operation on the memory cells of the memory during the time interval.
The detectingmodule 420 further includes areading unit 4202, which is connected to the programming unit and configured to perform a reading operation on the memory cell of the memory after performing a programming operation on the memory cell of the memory, so as to obtain an actual reading result.
The detectingmodule 420 further includes a detectingresult generating unit 4203, where the detecting result generating unit is connected to the reading unit and is used to determine that the memory cell is faulty if the actual reading result does not match the expected reading result of the programming operation performed on the memory cell of the memory, and generate a detecting result, where the detecting result is the address of the faulty memory cell.
Optionally, the repairingmodule 430 is further configured to, after repairing the memory according to the detection result, perform another detection on the failed memory cell, and if the repair is successful, delete the address of the failed memory cell in the detection result.
The embodiment of the invention provides a device for automatically detecting and repairing a memory, which records the operation type and the operation frequency of a user aiming at a storage unit in the memory through a recording module, acquires the time interval of any two operations of the user, detects the storage unit of the memory through a detection module by utilizing the time interval of no operation of the user on the memory, generates a detection result, and repairs the memory through the repair module according to the detection result.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious modifications, rearrangements, combinations and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.