CN106383751B - Improved random access memory self-checking method - Google Patents
Improved random access memory self-checking method Download PDFInfo
- Publication number
- CN106383751B CN106383751B CN201610846177.2A CN201610846177A CN106383751B CN 106383751 B CN106383751 B CN 106383751B CN 201610846177 A CN201610846177 A CN 201610846177A CN 106383751 B CN106383751 B CN 106383751B
- Authority
- CN
- China
- Prior art keywords
- memory
- crc value
- crc
- test
- segment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
- G06F11/0727—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1004—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention relates to an improved random access memory self-checking method, which comprises the following steps: step S1, dividing the memory to be tested into a plurality of memory segments which are not overlapped; step S2, each segment of memory adopts an Abraham algorithm to carry out self-check; step S3, pre-calculating the CRC value of the XOR result of each section of test data in the memory to be tested; step S4, before starting the memory test, filling all the test data into the memory to be tested in sequence; step S5, after each segment of memory is tested, calculating the CRC value of the data XOR result in each segment of memory at one time; and step S6, comparing the on-line calculated CRC value with the pre-calculated CRC value, if the calculated CRC value is the same as the pre-calculated CRC value, determining that the memory section is not coupled with other memory sections, continuing to test the memory section of the next section, repeating the step S5, and if the calculated CRC value is different from the pre-calculated CRC value, determining that the coupling is found, and terminating the algorithm. Compared with the prior art, the method has the advantages of finding out the coupling failure condition among the sections of the RAM after the RAM is subjected to the sectional test, improving the RAM self-checking execution efficiency and the like.
Description
Technical Field
The present invention relates to a self-checking method for a memory, and more particularly, to an improved self-checking method for a Random Access Memory (RAM).
Background
The modern rail transit industry relies on various signaling systems to monitor the status of lines and vehicles, the distance between vehicles, etc. to avoid hazards such as collisions and derailments. The error of the signal system can cause the function of avoiding the damage to the signal system to be lost, so that the signal system has extremely high safety requirements on the signal system in the rail transit industry.
As a kind of security critical system, the signal system must satisfy multiple security requirements, and the self-checking technique is one of the most basic security techniques.
The Abraham algorithm is a high-coverage memory self-checking technology recommended by IEC61508, and if the technology is directly applied to a safety critical system, the defects of long time consumption and poor system real-time performance exist, and the IEC61508 proposes that a memory is segmented and then tested section by section (see fig. 1), but the method enables the effect of detecting the coupling failure (2-coupling failure) of all two memory units in the memory by the algorithm to be nearly lost.
In order to solve the problem, the current mainstream device providers add the memory segments in a certain proportion (see fig. 2), but the effect of this method is almost not improved compared with the method that the memory segments are not added, and the efficiency is sharply reduced along with the increase of the proportion of the memory segments added.
Disclosure of Invention
The present invention is directed to overcome the above-mentioned drawbacks of the prior art and provide an improved self-checking method for a random access memory, which finds out the coupling failure between the memory segments after the RAM segment test and improves the execution efficiency of the RAM self-checking.
The purpose of the invention can be realized by the following technical scheme:
an improved random access memory self-checking method comprises the following steps:
step S1, dividing the memory to be tested into a plurality of memory segments which are not overlapped;
step S2, each segment of memory adopts an Abraham algorithm to carry out self-check;
step S3, pre-calculating the CRC value of the XOR result of each section of test data in the memory to be tested;
step S4, before starting the memory test, filling all the test data into the memory to be tested in sequence;
step S5, after each segment of memory is tested, calculating the CRC value of the data XOR result in each segment of memory at one time;
and step S6, comparing the CRC value calculated on line with the CRC value calculated by budget, if the CRC values are the same, determining that the memory section is not coupled with other memory, continuing to test the next memory section, repeating the step S5, and if the CRC values are different, determining that coupling is found, and terminating the algorithm.
In step S2, each segment of memory uses different test data.
The test data comprises 32 or 64 bits.
The CRC value in step S3 is calculated as: the memory is divided into three sections, and if the test data are a, b and c respectively, CRC (a XOR b XOR c) is calculated.
The CRC value in step S5 is calculated as: and calculating CRC (a 'XOR b' XOR c ') when the data in each segment of the memory is a', b 'and c'.
Compared with the prior art, the invention has the following advantages:
1. the method adopts 32 or 64 bits of test data and has the same memory size, so that the time for executing the Abraham algorithm once can be shortened, and the algorithm execution efficiency is improved;
2. the segmented memories are not overlapped, so that the test time is shortened, and the memory fault can be found out more timely;
3. the method ensures that the effect of the Abraham algorithm used for memory segment testing is the same as the effect of the Abraham algorithm used for testing the whole memory segment.
Drawings
FIG. 1 is a diagram of a situation where coupling failures are not discoverable when memory segments are not overlaid;
FIG. 2 is a diagram of a situation where coupling failure is not found when memory segments are overlapped;
FIG. 3 is an immunization of multi-byte test data against 2-coupling failure;
fig. 4 is a flow chart of an application mode of the Abraham algorithm.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
The invention is realized from two aspects of improving test data and an Abraham algorithm segmentation application mode.
1. Improvement of test data:
algorithm a reads and writes 1 byte at a time, i.e., 8 bits of test data. If a plurality of bytes are read/written at a time, i.e. using 32 bits or even 64 bits of test data, it can be proved that the same effect as algorithm a can still be achieved after a little change: in algorithm a, the memory cells are 1 byte, and correspondingly 4 memory cells are taken as a whole, the proving method is the same as the validity proof of algorithm a, and the failure mode of 0/1 solidification and 2-coupling protection among 4 bytes can be obtained. But now also 4 memory cells have to be detected, only 4 bytes of coupling can be detected by the difference in test data between bytes, e.g. 0x5AA53CC3, see fig. 3.
The algorithm complexity is reduced from 30n to 7.5n for single word test data and about 4n for double word test data.
2. Novel algorithm segmentation application mode
Step S1, dividing the memory to be tested into a plurality of memory segments which are not overlapped;
step S2, each segment of memory adopts an Abraham algorithm and uses different test data (32 or 64 bits);
step S3, calculating a CRC value of the XOR result of each segment of test data in the memory to be tested in advance, for example, if the memory is divided into three segments, and the test data are a, b, and c, calculating a CRC (a XOR b XOR c);
step S4, before starting the memory test, filling all the test data into the memory to be tested in sequence;
step S5, after testing each segment of memory, calculating a CRC value of the XOR result of the data in each segment of memory once, for example, calculating a CRC (a 'XOR b' XOR c ') if the data in each segment of memory is a', b ', c';
step S6, comparing the CRC value calculated on line with the calculated CRC value calculated in budget, if the calculated CRC value is the same, determining that the memory segment is not coupled to other memory segments, continuing to test the memory segment of the next segment, repeating step S5, otherwise, determining that coupling is found, and terminating the algorithm, as shown in fig. 4.
The algorithm principle is as follows: because the coupling failure self-test shown in fig. 1 after segmentation cannot be found, it is necessary to check whether other segments of memory are coupled by reading and writing of the segment of memory after a certain segment of memory is tested, because test data of different segments are different, once the segments are coupled, it can be found by checking data in other segments, because one segment has more data and the comparison efficiency is too low one by one, a unique CRC manner is generated for each segment of test data, whether the CRC changes is checked to determine whether the coupling occurs, and the characteristic of CRC linearity is utilized, CRC (a) XOR CRC (b) ═ CRC (a XOR b), the CRC calculation times are reduced, the length of a CRC calculation object is shortened by utilizing an exclusive or (XOR), and the efficiency loss is reduced.
Specific examples
Scene: a certain board card in a certain real-time system is provided with a memory 1G, online self-checking needs to be carried out on a 128M appointed memory, and due to the fact that the system has the characteristics of periodicity and real-time performance, the Abraham algorithm is executed within the time given to a memory testing task in one period and only 32M memory can be tested. The method can be used for completing the self-test of the 128M memory 4 times under the condition of only testing the 32M memory per cycle, the detection effect of the method is the same as the effect of completing the test of the 128M memory once by adopting an Abraham algorithm A, and the curing failure of all the memory cells 0/1 and the coupling failure of any two memory cells can be found.
The method comprises the following implementation steps:
step 2, generating non-repeated 32-bit random numbers as test data by using a random number generator, wherein the generated data are divided into 4 groups, namely data a, b, c and d, which are respectively test data of seg1, seg2, seg3 and seg 4;
step 3, calculating CRC (CRC) ((a XOR b XOR c XOR d)) offline, wherein CRC () is a CRC calculation function and is used in subsequent online, so that the CRC calculation function is realized by using a table look-up method to improve online calculation efficiency, and XOR is exclusive or operation;
step 4, when the system starts to call the memory self-test task, backing up the data in the memory 128M to be tested to another memory area;
step 5, copying the test data a, b, c and d to seg1, seg2, seg3 and seg4 respectively;
step 6, performing an Abraham algorithm on seg 1;
after the Abraham algorithm is executed on seg1, assuming that data in seg1, seg2, seg3 and seg4 are a ', b', c 'and d', respectively, if there is no error in the memory, then a is a ', b is b', c is c ', d is d', then there is CRC (a 'XOR b' XOR c 'XOR d') is CRC, where CRC is calculated in advance in step 3;
step 8, calculating CRC (a 'XOR b' XOR c 'XOR d');
step 9, comparing whether crc and crc' are equal:
1) if the data are equal, copying the original backup data back to the tested memory, telling the system that the memory is normal, ending the self-checking task in the period, returning to the main task, and waiting for calling in the next period;
2) if the memory is not equal, the memory is abnormal, the system is told that the memory is abnormal, and the main task is returned;
step 10, if the memory in the previous cycle is normal, the system in this cycle needs to continue testing the memory seg2, and execute the Abraham algorithm once on the seg2 by using the data b according to the methods from the step 4 to the step 9, and so on.
The above describes particular embodiments of the invention requiring the skilled person to understand the Abrahams algorithm, the CRC algorithm, the coupling failure etc., which are only examples, and the scope of protection of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (3)
1. An improved random access memory self-checking method is characterized by comprising the following steps:
step S1, dividing the memory to be tested into a plurality of memory segments which are not overlapped;
step S2, each segment of memory adopts an Abraham algorithm to carry out self-check;
step S3, pre-calculating the CRC value of the XOR result of each section of test data in the memory to be tested;
step S4, before starting the memory test, filling all the test data into the memory to be tested in sequence;
step S5, after each segment of memory is tested, calculating the CRC value of the data XOR result in each segment of memory at one time;
step S6, comparing the CRC value calculated on line with the CRC value calculated in advance, if the CRC value is the same as the CRC value, determining that the memory section is not coupled with other memory sections, continuing to test the memory section of the next section, repeating the step S5, and if the CRC value is different from the CRC value, determining that the coupling is found, and terminating the algorithm;
in the step S2, each segment of memory uses different test data; the method has the advantages that the coupling failure condition between the sections of the RAM after the RAM section test is found, and the RAM self-checking execution efficiency is improved;
the CRC value in step S3 is calculated as: the memory is divided into three sections, and if the test data are a, b and c respectively, CRC (aXOR b XOR c) is calculated;
after the memory test is finished, checking whether other memory sections are coupled by the read-write of the memory section, wherein the test data of different sections are different, once the test data are coupled, the data of the other memory sections are checked, so that the data can be found, a unique CRC mode is generated for each section of test data, whether the coupling occurs is judged by checking whether the CRC changes, the CRC calculation frequency is reduced by using the characteristic of CRC linearity, and the length of a CRC calculation object is shortened by using the XOR operation.
2. The improved random access memory self-test method as claimed in claim 1, wherein said test data comprises 32 or 64 bits.
3. The improved random access memory self-test method as claimed in claim 1, wherein the CRC value in step S5 is calculated as: and calculating CRC (a 'XOR b' XOR c ') when the data in each segment of the memory is a', b 'and c'.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610846177.2A CN106383751B (en) | 2016-09-23 | 2016-09-23 | Improved random access memory self-checking method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610846177.2A CN106383751B (en) | 2016-09-23 | 2016-09-23 | Improved random access memory self-checking method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106383751A CN106383751A (en) | 2017-02-08 |
CN106383751B true CN106383751B (en) | 2020-10-20 |
Family
ID=57937124
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610846177.2A Active CN106383751B (en) | 2016-09-23 | 2016-09-23 | Improved random access memory self-checking method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106383751B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107943611B (en) * | 2017-11-08 | 2021-04-13 | 天津国芯科技有限公司 | Control device for quickly generating CRC |
CN108153611B (en) * | 2018-01-10 | 2021-02-23 | 芜湖美的厨卫电器制造有限公司 | Fault self-checking method, fault self-checking device, microcontroller and readable storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1677576A (en) * | 2005-02-01 | 2005-10-05 | 苏州超锐微电子有限公司 | Method for realizing memory data check using look-up function instruction |
CN100468349C (en) * | 2005-08-24 | 2009-03-11 | 英业达股份有限公司 | Method of testing memory |
US20150039823A1 (en) * | 2013-07-30 | 2015-02-05 | Mediatek Inc. | Table lookup apparatus using content-addressable memory based device and related table lookup method thereof |
-
2016
- 2016-09-23 CN CN201610846177.2A patent/CN106383751B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106383751A (en) | 2017-02-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9818492B2 (en) | Method for testing a memory and memory system | |
US7555699B2 (en) | Storage control circuit, and method for address error check in the storage control circuit | |
US20130139008A1 (en) | Methods and apparatus for ecc memory error injection | |
CN102135925B (en) | Method and device for detecting error check and correcting memory | |
CN106383751B (en) | Improved random access memory self-checking method | |
US20160328285A1 (en) | Error vector readout from a memory device | |
US20150378630A1 (en) | Method and Device of Data Protection, Storage Equipment | |
US9733870B2 (en) | Error vector readout from a memory device | |
US20170293514A1 (en) | Handling repaired memory array elements in a memory of a computer system | |
CN115831213A (en) | Detection method and device for checking processor, electronic equipment and storage medium | |
CN111428280B (en) | SoC (System on chip) security chip key information integrity storage and error self-repairing method | |
CN101770813B (en) | Detection method for detecting interference phenomenon of adjacent blocks of non-volatile storage | |
CN103823637B (en) | A kind of data processing method and equipment | |
US9104568B2 (en) | Detection of memory cells that are stuck in a physical state | |
US20150100827A1 (en) | Method of Detecting Bit Errors, An Electronic Circuit for Detecting Bit Errors, and a Data Storage Device | |
TWI390537B (en) | Method for detecting disturb phenomena between neighboring blocks in non-volatile memory | |
CN109710445B (en) | Memory correction method and electronic equipment | |
CN103514071A (en) | Nondestructive internal storage online testing method | |
CN103971750B (en) | Sensitive fault detection method of 9 adjacent units of RAM | |
US9092315B2 (en) | Method and software program product for determining the quality of an information technology system | |
US20170199785A1 (en) | Memory controller | |
CN115904797B (en) | CPU memory diagnosis method, system and equipment based on field programmable gate array | |
CN117687833A (en) | Method, device and storage medium for testing data security | |
CN102543210A (en) | Error check and correction repairing method of flash memory | |
CN111352754A (en) | Data storage error detection and correction method and data storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |