Memory exception judging and positioning method, system and device and readable storage medium
By performing parity checks on memory data in each program run cycle, calculating row check value and column check value to determine whether single-particle flips have occurred, it solves the difficulty in the existing technology when memory resource utilization is low and memory resources are insufficient. Memory self-test and repair problems are carried out to achieve efficient memory exception judgment and location.
Patent Information
- Application Number
- CN202310996512.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-08
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, memory self-checking and repair methods based on redundant backups will lead to a reduction in the utilization rate of the device's memory resource, and it is difficult to perform memory self-checking and repair when there is insufficient memory resources.
The memory exception judgment method of single-particle flip is used to judge whether it has occurred by parity checking the memory data in each program run cycle, calculating the row and column check values, and comparing the check values of the previous cycle. Single particle flip.
The single particle flip can be judged and positioned without additional memory space, which improves the utilization rate of device memory resources and can still effectively judge and locate memory exceptions when there is insufficient memory resources.
Smart Images

Figure CN119473697A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of relay protection memory self-checking, and specifically relates to a memory abnormality judgment and positioning method, system, device and readable storage medium. Background Art
[0002] The 0 / 1 logic state of nodes in modern CMOS integrated circuits is achieved through the discharge and charge of the nodes; if the node state is abnormally discharged or charged due to soft errors, it will cause state errors inside the circuit, which may eventually lead to the failure of the circuit function. In recent years, there have been many abnormal phenomena of relay protection devices caused by single-particle upsets in my country, which has brought huge safety hazards to the safe and stable operation of the power grid.
[0003] The memory self-check and repair currently used by relay protection mostly adopts the redundant backup method, that is, a copy of the data in the important data area is made as a backup, and the check code of the data area is recorded at the same time; the check code of the data area is calculated in real time during operation, and when it is inconsistent with the recorded check code, it is determined that a memory abnormality has occurred, and the abnormal position is located by comparing the memory data and the backup data; redundant backup of memory data usually requires double storage space. For memory data of any length, each data has 16 bits in hexadecimal. Assuming that there are n data in total, if redundant backup is used, a total of 16*n bits of memory space are required; the storage method of memory data in memory is usually as shown in Table 1 below:
[0004] Table 1
[0005] Row\bit 1 2 ... 15 16 1 X1,1 ... ... ... X1,16 2 ... ... ... ... ... ... ... ... ... ... ... n Xn,1 ... ... ... Xn,16
[0006] Therefore, the currently used memory self-check and repair method based on redundant backup will occupy a large amount of memory, which will lead to a reduction in the utilization rate of device memory resources; and when the device memory resources are insufficient, the use of redundant backup technology will be severely restricted, making memory self-check and repair difficult. Summary of the invention
[0007] The purpose of the present invention is to provide a memory anomaly judgment and location method, system, device and readable storage medium, which are used to solve the problem that the currently used memory self-check and repair method based on redundant backup will lead to reduced utilization of device memory resources and be limited by device memory resources when applied.
[0008] In order to achieve the above object, the present invention provides a memory abnormality judgment method of a single event upset, comprising the following steps:
[0009] 1) During the program running process, in each program running cycle, a parity check is performed between the bits of each memory data itself to obtain a self-check value with the same number as the number of memory data; a parity check is performed between the bits at the same position of each memory data to obtain a data check value with the same number as the number of bits of the memory data itself;
[0010] 2) Obtain the row check value of this cycle according to each self-check value, and obtain the column check value of this cycle according to each inter-data check value;
[0011] 3) Compare the row check value and column check value of this cycle with the row check value and column check value of the previous cycle respectively. If the row check value of this cycle is inconsistent with the row check value of the previous cycle, and the column check value of this cycle is inconsistent with the column check value of the previous cycle, it is determined that a single particle flip has occurred.
[0012] The beneficial effects of the above technical solution are: there is no need to use the check code of the redundant memory backup and the check code of the memory during operation. It is only necessary to compare the corresponding check values (row and column check values) calculated in the current cycle with those in the previous cycle to determine whether a single-particle flip has occurred. Therefore, there is no need to occupy additional memory, which can improve the utilization rate of the device's memory resources; and even when the device's memory resources are insufficient, the judgment and positioning of the memory anomaly of the single-particle flip will not be affected.
[0013] Furthermore, the row check value and the column check value are calculated as follows:
[0014] CR=CR1*2 0 +CR2*2 1 +...+CRn*2 n-1
[0015] CL=CL1*2 0 +CL2*2 1 +...+CLm*2 m-1
[0016] Among them, CR is the row check value of this cycle, CL is the column check value of this cycle; CRn is the self-check value obtained by performing parity check between the bits of the nth memory data itself; CLm is the inter-data check value obtained by performing parity check between the mth bits of each memory data.
[0017] The present invention also provides a memory anomaly judgment system of a single particle upset, comprising a processor, wherein the processor is used to execute program instructions to implement the memory anomaly judgment method of a single particle upset as described above.
[0018] The memory abnormality judgment system of the single-particle upset can achieve the same beneficial effects as the memory abnormality judgment method of the single-particle upset.
[0019] The present invention also provides a method for locating a memory anomaly caused by a single event upset, comprising the following steps:
[0020] 1) During the program running process, in each program running cycle, a parity check is performed on the bits of each memory data itself to obtain a self-check value with the same number as the number of memory data; a parity check is performed on the bits at the same position of each memory data to obtain an inter-data check value with the same number as the number of bits of the memory data itself;
[0021] 2) Obtain the row check value of this cycle according to each self-check value, and obtain the column check value of this cycle according to each inter-data check value;
[0022] 3) Compare the row check value and column check value of the current cycle with the row check value and column check value of the previous cycle respectively. If the row check value of the current cycle is inconsistent with the row check value of the previous cycle, and the column check value of the current cycle is inconsistent with the column check value of the previous cycle, it is determined that a single-particle upset occurs;
[0023] 4) According to the difference between the row check values of the current cycle and the previous cycle, the row position where the single particle upset occurs is obtained; according to the difference between the column check values of the current cycle and the previous cycle, the column position where the single particle upset occurs is obtained;
[0024] The row position where the single event upset occurs refers to the position of a single memory data where the single event upset occurs in the memory;
[0025] The column position where the single event upset occurs refers to the bit position where the single event upset occurs in a single memory data.
[0026] The beneficial effects of the above technical solution are: there is no need to use the check code of the redundant memory backup and the check code of the memory during operation, and it is only necessary to compare the corresponding check values (row and column check values) calculated in the current cycle with those in the previous cycle to determine whether a single-particle flip has occurred. Therefore, there is no need to occupy additional memory, which can improve the utilization rate of the device memory resources; and even in the case of insufficient device memory resources, the judgment and positioning of the memory anomaly of the single-particle flip is not affected; after determining that a single-particle flip has occurred in the memory, the abnormal position can be quickly and accurately located, and there is no need to compare a large amount of memory data and backup data to locate the abnormal position, which improves the efficiency of abnormal positioning while also improving the accuracy of positioning.
[0027] Furthermore, the row check value and the column check value are calculated as follows:
[0028] CR=CR1*2 0 +CR2*2 1 +...+CRn*2 n-1
[0029] CL=CL1*2 0 +CL2*2 1 +...+CLm*2 m-1
[0030] Among them, CR is the row check value of this cycle, CL is the column check value of this cycle; CRn is the self-check value obtained by performing parity check between the bits of the nth memory data itself; CLm is the inter-data check value obtained by performing parity check between the mth bits of each memory data.
[0031] Furthermore, according to the difference between the row check values of the current cycle and the previous cycle, the row position where the single event upset occurs is obtained as follows:
[0032] Row_num=log2|CR-CR_old|+1
[0033] Among them, Row_num is the row position where the single particle upset occurs, log is the logarithmic operator, || represents the absolute value operation, CR is the row check value of this cycle, and CR_old is the row check value of the previous cycle.
[0034] Furthermore, according to the difference between the column check values of the current cycle and the previous cycle, the column position where the single-event upset occurs is obtained as follows:
[0035] Line_num=log2|CL-CL_old|+1
[0036] Where Line_num is the column position where the single particle upset occurs, log is the logarithmic operator, || indicates absolute value operation, CL is the column check value of the current cycle, and CL_old is the column check value of the previous cycle.
[0037] The present invention also provides a memory anomaly locating system of a single particle upset, comprising a processor, wherein the processor is used to execute program instructions to implement the memory anomaly locating method of a single particle upset as described above.
[0038] The memory anomaly locating system using a single-particle upset can achieve the same beneficial effects as the memory anomaly locating method using a single-particle upset described above.
[0039] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed, the memory anomaly determination method of single-particle upset as described above is implemented.
[0040] The computer-readable storage medium can achieve the same beneficial effects as the above-mentioned single-particle upset memory abnormality judgment method.
[0041] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed, the memory anomaly locating method of the single-particle upset as described above is implemented.
[0042] The computer-readable storage medium can achieve the same beneficial effects as the above-mentioned single-particle upset memory anomaly locating method.
[0043] The present invention also provides a single-particle upset memory abnormality judgment device, comprising:
[0044] Check module: used in the process of program running, in each program running cycle, to perform parity check between the bits of each memory data itself, and obtain the same number of self-check values as the number of memory data; to perform parity check between the bits at the same position of each memory data, and obtain the same number of inter-data check values as the number of bits of the memory data itself; to obtain the row check value of this cycle according to each self-check value, and to obtain the column check value of this cycle according to each inter-data check value;
[0045] Comparison and judgment module: used to compare the row check value and column check value of this cycle with the row check value and column check value of the previous cycle respectively. If the row check value of this cycle is inconsistent with the row check value of the previous cycle, and the column check value of this cycle is inconsistent with the column check value of the previous cycle, it is determined that a single particle upset occurs.
[0046] The device can achieve the same beneficial effects as the above-mentioned single-particle upset memory anomaly judgment method.
[0047] The present invention also provides a single-particle upset memory anomaly locating device, comprising:
[0048] Check module: used to perform parity check on the bits of each memory data in each program running cycle during program running, and obtain the self-check value whose number is the same as the number of memory data; perform parity check on the bits at the same position of each memory data, and obtain the inter-data check value whose number is the same as the number of bits of the memory data itself; obtain the row check value of this cycle according to each self-check value, and obtain the column check value of this cycle according to each inter-data check value;
[0049] Comparison and judgment module: used to compare the row check value and column check value of this cycle with the row check value and column check value of the previous cycle respectively. If the row check value of this cycle is inconsistent with the row check value of the previous cycle, and the column check value of this cycle is inconsistent with the column check value of the previous cycle, it is determined that a single-particle upset occurs;
[0050] Positioning module: According to the difference between the row check value of the current cycle and the previous cycle, the row position where the single-particle upset occurs is obtained; according to the difference between the column check value of the current cycle and the previous cycle, the column position where the single-particle upset occurs is obtained;
[0051] The row position where the single particle upset occurs refers to the position of a single memory data where the single particle upset occurs in the memory; the column position where the single particle upset occurs refers to the bit position where the single particle upset occurs in the single memory data.
[0052] The device can achieve the same beneficial effects as the above-mentioned single-particle upset memory anomaly locating method. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flowchart of the method for locating a memory anomaly due to a single-particle upset in an embodiment of the method for locating a memory anomaly due to a single-particle upset of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0055] Implementation of a method for locating memory anomalies caused by a single event upset
[0056] This embodiment provides a technical solution for a method for locating a memory anomaly caused by a single-particle upset. The method for locating a memory anomaly only considers the abnormal situation of a single-particle upset, that is, the situation where a single bit is flipped (1→0 or 0→1); specifically, Figure 1 As shown, the following steps are included:
[0057] 1) During the program running process, in each program running cycle (hereinafter referred to as "cycle" refers to the program running cycle), a parity check is performed between the bits of each memory data itself to obtain a self-check value with the same number as the number of memory data; a parity check is performed between the bits at the same position of each memory data to obtain a data check value with the same number as the number of bits of the memory data itself;
[0058] In this embodiment, for memory data of any length, each data has 16 bits in hexadecimal, that is, the number of bits of a single memory data is m=16; according to the storage method of the memory data in the memory shown in Table 1, the self-check value and the inter-data check value obtained by performing the parity check are shown in Table 2 below:
[0059] Table 2
[0060]
[0061]
[0062] The parity check value CRn is the self-check value obtained by performing a parity check between the bits of the n-th memory data itself. For example, CR1 is the result of performing a parity check between all the bits of the first memory data itself (X1,1, X1,2, ..., X1,16, a total of 16); the parity check value CLm (m = 16) is the inter-data check value obtained by performing a parity check between the m-th bits of each memory data. For example, CL1 is the result of performing a parity check between the first bit of n memory data (X1,1, X2,1, ..., Xn,1, a total of n). In this embodiment, since the specific calculation method of the parity check value is a prior art, it will not be repeated here.
[0063] 2) Obtain the row check value of this cycle according to each self-check value, and obtain the column check value of this cycle according to each inter-data check value;
[0064] In this embodiment, the row check value and the column check value are calculated as follows:
[0065] CR=CR1*2 0 +CR2*2 1 +...+CRn*2 n-1
[0066] CL=CL1*2 0 +CL2*2 1 +...+CLm*2 m-1
[0067] Among them, CR is the row check value of this cycle, CL is the column check value of this cycle; CRn is the self-check value obtained by performing a parity check between the bits of the nth memory data itself; CLm is the inter-data check value obtained by performing a parity check between the mth bits of each memory data, and in this embodiment, m=16.
[0068] 3) Compare the row check value and column check value of the current cycle with the row check value and column check value of the previous cycle respectively. If the row check value of the current cycle is inconsistent with the row check value of the previous cycle, and the column check value of the current cycle is inconsistent with the column check value of the previous cycle, it is determined that a single-particle upset occurs;
[0069] It can be seen that the memory anomaly location method of a single-particle flip in this embodiment does not need to use the checksum of the redundant memory backup and the checksum of the memory during operation. It only needs to compare the corresponding checksum values calculated in the current cycle with the previous cycle to determine whether a single-particle flip has occurred. Therefore, there is no need to occupy additional memory, which can improve the utilization rate of device memory resources; and even in the case of insufficient device memory resources, the judgment and location of the memory anomaly of a single-particle flip is not affected. It should be noted that the memory anomaly location method only performs the calculation steps of the row checksum and column checksum values of steps 1)-2) in the first cycle of the program running (it is assumed that no single-particle flip has occurred in the memory in the first cycle of the program running), and the comparison and judgment of step 3) will be started in the next cycle.
[0070] 4) According to the difference between the row check values of the current cycle and the previous cycle, the row position where the single particle upset occurs is obtained; according to the difference between the column check values of the current cycle and the previous cycle, the column position where the single particle upset occurs is obtained;
[0071] The way to get the row position where the single event upset occurs is:
[0072] Row_num=log2|CR-CR_old|+1
[0073] Among them, Row_num is the row position where the single particle upset occurs, log is the logarithmic operator, || indicates taking the absolute value operation, CR is the row check value of the current cycle, and CR_old is the row check value of the previous cycle; the row position where the single particle upset occurs here refers to the position of the single memory data where the single particle upset occurs in the memory. Since Tables 1 and 2 correspond to the storage method of storing all bits of a single memory data in each row, it is called the row position; for example, if Row_num=1 is calculated, it means that the first row has a single particle upset, that is, there is a single particle upset in the first memory data;
[0074] The way to get the column position where the single event upset occurs is:
[0075] Line_num=log2|CL-CL_old|+1
[0076] Among them, Line_num is the column position where the single particle upset occurs, log is the logarithmic operator, || indicates taking the absolute value operation, CL is the column check value of this cycle, and CL_old is the column check value of the previous cycle; the column position where the single particle upset occurs here refers to the bit position where the single particle upset occurs in a single memory data. Since Tables 1 and 2 correspond to the storage method of storing the same bit position of each memory data in each column, it is called the column position; for example, if Line_num=1 is calculated, it means that a single particle upset occurs in the first column, that is, a single particle upset occurs in the first bit position of a certain memory data; due to the characteristics of the parity check code, when a single particle upset occurs, the CR and CL of this cycle must have corresponding differences with the CR and CL of the previous cycle.
[0077] Taking octal as an example, a specific example of abnormality location using the above single event upset memory abnormality location method is as follows (the selected parity check value is an even check value):
[0078] The memory data values and the corresponding parity check values of a certain program running cycle are shown in Table 3 below;
[0079] Table 3
[0080]
[0081]
[0082] Then the self-check value and inter-data check value obtained by parity check are calculated as follows:
[0083] CR_old=1*2 0 +1*2 1 +0*2 2 =3
[0084] CL_old=1*2 0 +1*2 1 +0*2 2 +0*2 3 +0*2 4 +0*2 5 +1*2 6 +0*2 7 =67
[0085] Assume that in the next program running cycle, a single particle mutation occurs in the 2nd row and 5th column of the memory data (i.e., the fifth bit of the second memory data), 1→0, then the memory data value and the corresponding even parity value at this time are shown in Table 4 below;
[0086] Table 4
[0087] Row\bit 1 2 3 4 5 6 7 8 Even parity 1 1 1 0 1 0 0 0 1 1 2 1 0 0 0 0 0 1 1 0 3 0 1 1 0 0 1 1 1 0 Even parity 1 1 0 0 1 0 1 0 /
[0088] The program running cycle is calculated based on the self-check value and the inter-data check value obtained by the parity check:
[0089] CR=1*2 0 +0*2 1 +0*2 2 =1
[0090] CL=1*2 0 +1*2 1 +0*2 2 +0*2 3 +1*2 4 +0*2 5 +1*2 6 +0*2 7 =83
[0091] Since the CR and CL calculated in this cycle are inconsistent with the calculated values CR_old and CL_old in the previous cycle, it can be determined that a single-particle upset has occurred. The row and column where the single-particle upset occurs are located as follows:
[0092] Row_num=log2|CR-CR_old|+1=log2|1-3|+1=2
[0093] Line_num=log2|CL-CL_old|+1=log2|83-67|+1=5
[0094] The positioning result is completely consistent with the set position where the single-particle mutation occurs, which can prove the accuracy of the memory anomaly positioning method of the single-particle upset in this embodiment.
[0095] In summary, it is determined that the memory data where the single-particle flip occurs is the nth memory data, and it is determined that the mth bit in a certain memory data has a single-particle flip, so the specific single-particle flip position can be accurately located as: the mth bit of the nth memory data; it can be seen that when a single-particle flip occurs in the memory, the memory abnormality locating method of the single-particle flip of this embodiment can quickly and accurately locate the abnormal position, without comparing a large amount of memory data and backup data to locate the abnormal position, thereby improving the abnormality locating efficiency while also improving the accuracy of locating.
[0096] Implementation example of a memory anomaly location system for single event upset
[0097] This embodiment provides a technical solution for a single-particle upset memory anomaly locating system, including a processor, which is used to execute program instructions to implement the single-particle upset memory anomaly locating method in the above-mentioned single-particle upset memory anomaly locating method embodiment.
[0098] Since the specific working mode and working principle of the memory anomaly locating system of this embodiment have been described in detail in the above-mentioned single-particle upset memory anomaly locating method embodiment, they will not be repeated here.
[0099] Memory abnormality judgment method embodiment of single event upset
[0100] This embodiment provides a technical solution for a memory abnormality judgment method of a single-particle upset. The memory abnormality judgment method only considers the abnormal situation of a single-particle upset, that is, the situation where a single bit is flipped (1→0 or 0→1); specifically, the following steps are included:
[0101] 1) During the program running process, in each program running cycle (hereinafter referred to as "cycle" refers to the program running cycle), a parity check is performed between the bits of each memory data itself to obtain a self-check value with the same number as the number of memory data; a parity check is performed between the bits at the same position of each memory data to obtain a data check value with the same number as the number of bits of the memory data itself;
[0102] In this embodiment, for memory data of any length, each data has 16 bits in hexadecimal, that is, the number of bits of a single memory data is m=16; according to the storage method of the memory data in the memory shown in Table 1, the self-check value and the inter-data check value obtained by performing the parity check are shown in Table 5:
[0103] Table 5
[0104]
[0105]
[0106] The parity check value CRn is the self-check value obtained by performing a parity check between the bits of the n-th memory data itself. For example, CR1 is the result of performing a parity check between all the bits of the first memory data itself (X1,1, X1,2, ..., X1,16, a total of 16); the parity check value CLm (m = 16) is the inter-data check value obtained by performing a parity check between the m-th bits of each memory data. For example, CL1 is the result of performing a parity check between the first bit of n memory data (X1,1, X2,1, ..., Xn,1, a total of n). In this embodiment, since the specific calculation method of the parity check value is a prior art, it will not be repeated here.
[0107] 2) Obtain the row check value of this cycle according to each self-check value, and obtain the column check value of this cycle according to each inter-data check value;
[0108] In this embodiment, the row check value and the column check value are calculated as follows:
[0109] CR=CR1*2 0 +CR2*2 1 +...+CRn*2 n-1
[0110] CL=CL1*2 0 +CL2*2 1 +...+CLm*2 m-1
[0111] Among them, CR is the row check value of this cycle, CL is the column check value of this cycle; CRn is the self-check value obtained by performing a parity check between the bits of the nth memory data itself; CLm is the inter-data check value obtained by performing a parity check between the mth bits of each memory data, and m=16 in this embodiment; since the calculation of the row check value and the column check value is based on the calculation result of the parity check, the row and column check values can characterize the impact of a single particle upset.
[0112] 3) Compare the row check value and column check value of the current cycle with the row check value and column check value of the previous cycle respectively. If the row check value of the current cycle is inconsistent with the row check value of the previous cycle, and the column check value of the current cycle is inconsistent with the column check value of the previous cycle, it is determined that a single-particle upset occurs;
[0113] It can be seen that the memory anomaly judgment method of a single-particle flip in this embodiment does not need to use the check code of the redundant memory backup and the check code of the memory during operation. It only needs to compare the corresponding check values calculated in the current cycle with the previous cycle to determine whether a single-particle flip has occurred. Therefore, there is no need to occupy additional memory, which can improve the utilization rate of device memory resources; and even in the case of insufficient device memory resources, the judgment of the memory anomaly of a single-particle flip is not affected. It should be noted that the memory anomaly judgment method only performs the calculation steps of the row check value and the column check value of steps 1)-2) in the first cycle of the program running (the default is that no single-particle flip occurs in the memory in the first cycle of the program running), and the comparison judgment of step 3) is started in the next cycle.
[0114] Implementation example of a memory abnormality judgment system for single event upset
[0115] This embodiment provides a technical solution for a single-particle upset memory abnormality judgment system, including a processor, which is used to execute program instructions to implement the single-particle upset memory abnormality judgment method in the above-mentioned single-particle upset memory abnormality judgment method embodiment.
[0116] Since the specific working mode and working principle of the memory abnormality judgment system of this embodiment have been described in detail in the above-mentioned single-particle upset memory abnormality judgment method embodiment, they will not be repeated here.
[0117] Computer readable storage medium first embodiment
[0118] A computer-readable storage medium embodiment of the present invention stores computer-executable instructions in the computer-readable storage medium, and the computer-executable instructions are used to implement a single-particle upset memory abnormality judgment method introduced in the system embodiment when being executed. The computer-readable storage medium can achieve the same beneficial effects as the above-mentioned single-particle upset memory abnormality judgment method.
[0119] Second embodiment of computer readable storage medium
[0120] A computer-readable storage medium embodiment of the present invention stores computer-executable instructions in the computer-readable storage medium, and the computer-executable instructions are used to implement a single-particle upset memory anomaly locating method introduced in the system embodiment when executed. The computer-readable storage medium can achieve the same beneficial effects as the above-mentioned single-particle upset memory anomaly locating method.
[0121] First device embodiment
[0122] This embodiment provides a single event upset memory abnormality judgment device, including:
[0123] Check module: used in the process of program running, in each program running cycle, to perform parity check between the bits of each memory data itself, and obtain the same number of self-check values as the number of memory data; to perform parity check between the bits at the same position of each memory data, and obtain the same number of inter-data check values as the number of bits of the memory data itself; to obtain the row check value of this cycle according to each self-check value, and to obtain the column check value of this cycle according to each inter-data check value;
[0124] Comparison and judgment module: used to compare the row check value and column check value of this cycle with the row check value and column check value of the previous cycle respectively. If the row check value of this cycle is inconsistent with the row check value of the previous cycle, and the column check value of this cycle is inconsistent with the column check value of the previous cycle, it is determined that a single-particle upset occurs. The specific calculation, comparison and control have been described in detail in the above-mentioned single-particle upset memory abnormality judgment method embodiment, and will not be repeated here.
[0125] The modules included in the device correspond to the steps of the above-mentioned method for determining memory anomaly due to a single particle upset. The device is actually a computer solution to the above-mentioned method for determining memory anomaly due to a single particle upset.
[0126] Second device embodiment
[0127] This embodiment provides a memory abnormality location device for a single event upset, including:
[0128] Check module: used to perform parity check on the bits of each memory data in each program running cycle during program running, and obtain the self-check value whose number is the same as the number of memory data; perform parity check on the bits at the same position of each memory data, and obtain the inter-data check value whose number is the same as the number of bits of the memory data itself; obtain the row check value of this cycle according to each self-check value, and obtain the column check value of this cycle according to each inter-data check value;
[0129] Comparison and judgment module: used to compare the row check value and column check value of this cycle with the row check value and column check value of the previous cycle respectively. If the row check value of this cycle is inconsistent with the row check value of the previous cycle, and the column check value of this cycle is inconsistent with the column check value of the previous cycle, it is determined that a single-particle upset occurs;
[0130] Positioning module: According to the difference between the row check value of the current cycle and the previous cycle, the row position where the single-particle upset occurs is obtained; according to the difference between the column check value of the current cycle and the previous cycle, the column position where the single-particle upset occurs is obtained;
[0131] The row position where the single event upset occurs refers to the position of a single memory data where the single event upset occurs in the memory;
[0132] The column position where the single event upset occurs refers to the bit position where the single event upset occurs in a single memory data.
[0133] The device can achieve the same beneficial effects as the above-mentioned single-particle upset memory anomaly location method. The specific calculation, comparison and control have been described in detail in the above-mentioned single-particle upset memory anomaly location method embodiment, and will not be repeated here.
[0134] The modules included in the device correspond to the steps of the above-mentioned single-particle upset memory anomaly location method. The device is actually a computer solution for the above-mentioned single-particle upset memory anomaly location method. The present invention has the following characteristics:
[0135] ① It is not necessary to use the checksum of redundant memory backup and the checksum of memory during operation. It is only necessary to compare the corresponding checksum values (row and column checksum values) calculated in the current cycle with those in the previous cycle to determine whether a single-particle upset has occurred. Therefore, it is not necessary to occupy additional memory, which can improve the utilization rate of device memory resources. Even if the device memory resources are insufficient, the judgment and location of memory anomalies caused by single-particle upsets are not affected.
[0136] ② After determining that a single-particle flip has occurred in the memory, the memory anomaly locating method of the single-particle flip of the present invention can quickly and accurately locate the abnormal position without comparing a large amount of memory data and backup data to locate the abnormal position, thereby improving the efficiency of abnormal location while also improving the accuracy of positioning.
[0137] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, but do not constitute a limitation to the present invention.
Claims
1. A memory abnormality judgment method for a single event upset, characterized in that: The steps include: 1) During the program running process, in each program running cycle, a parity check is performed between the bits of each memory data itself to obtain a self-check value with the same number as the number of memory data; Perform parity check on the bits at the same position of each memory data to obtain the same number of inter-data check values as the number of bits of the memory data itself; 2) Obtain the row check value of this cycle according to each self-check value, and obtain the column check value of this cycle according to each inter-data check value; 3) Compare the row check value and column check value of this cycle with the row check value and column check value of the previous cycle respectively. If the row check value of this cycle is inconsistent with the row check value of the previous cycle, and the column check value of this cycle is inconsistent with the column check value of the previous cycle, it is determined that a single particle flip has occurred.
2. The memory abnormality judgment method of single event upset according to claim 1 is characterized in that: The row check value and column check value are calculated as follows: CR=CR1*2 0 +CR2*2 1 +...+CRn*2 n-1 CL=CL1*2 0 +CL2*2 1 +...+CLm*2 m-1 Among them, CR is the row check value of this cycle, CL is the column check value of this cycle; CRn is the self-check value obtained by performing parity check between the bits of the nth memory data itself; CLm is the inter-data check value obtained by performing parity check between the mth bits of each memory data.
3. A memory abnormality judgment system for a single event upset, characterized in that: It includes a processor, and the processor is used to execute program instructions to implement the memory abnormality judgment method of single-particle upset as claimed in claim 1 or 2.
4. A method for locating memory anomalies due to a single event upset, characterized in that: The steps include: 1) During the program running process, in each program running cycle, the parity check is performed on the bit of each memory data itself, and the number of self-check values that is the same as the number of memory data is obtained; Perform parity check on the bits at the same position of each memory data to obtain the same number of inter-data check values as the number of bits of the memory data itself; 2) Obtain the row check value of this cycle according to each self-check value, and obtain the column check value of this cycle according to each inter-data check value; 3) Compare the row check value and column check value of the current cycle with the row check value and column check value of the previous cycle respectively. If the row check value of the current cycle is inconsistent with the row check value of the previous cycle, and the column check value of the current cycle is inconsistent with the column check value of the previous cycle, it is determined that a single-particle upset occurs; 4) According to the difference between the row check values of the current cycle and the previous cycle, the row position where the single particle upset occurs is obtained; according to the difference between the column check values of the current cycle and the previous cycle, the column position where the single particle upset occurs is obtained; The row position where the single event upset occurs refers to the position of a single memory data where the single event upset occurs in the memory; The column position where the single event upset occurs refers to the bit position where the single event upset occurs in a single memory data.
5. The memory anomaly location method of single event upset according to claim 4, characterized in that: The row check value and column check value are calculated as follows: CR=CR1*2 0 +CR2*2 1 +...+CRn*2 n-1 CL=CL1*2 0 +CL2*2 1 +...+CLm*2 m-1 Among them, CR is the row check value of this cycle, CL is the column check value of this cycle; CRn is the self-check value obtained by performing parity check between the bits of the nth memory data itself; CLm is the inter-data check value obtained by performing parity check between the mth bits of each memory data.
6. The memory anomaly location method of a single event upset according to claim 4 or 5, characterized in that: According to the difference between the row check values of the current cycle and the previous cycle, the row position where the single-event upset occurs is obtained as follows: Row_num=log2|CR-CR_old|+1 Among them, Row_num is the row position where the single-particle upset occurs, log is the logarithmic operator, || represents absolute value operation, CR is the row check value of this cycle, and CR_old is the row check value of the previous cycle.
7. The memory anomaly location method of a single event upset according to claim 4 or 5, characterized in that: Based on the difference between the column check values of this cycle and the previous cycle, the column position where the single-event upset occurs is obtained as follows: Line_num=log2|CL-CL_old|+1 Among them, Line_num is the column position where the single-particle upset occurs, log is the logarithmic operator, || represents the absolute value operation, CL is the column check value of the current cycle, and CL_old is the column check value of the previous cycle.
8. A memory anomaly location system for a single event upset, characterized in that: It includes a processor, which is used to execute program instructions to implement the memory anomaly locating method of single-particle upset as described in any one of claims 4-7.
9. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer executable instructions are used to implement the memory abnormality judgment method of single-particle upset as claimed in claim 1 or 2 when executed.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer executable instructions are used to implement the memory anomaly locating method of a single-particle upset as described in any one of claims 4-7 when executed.
11. A memory abnormality judgment device for a single event upset, characterized in that: include: Verification module: used in the process of program running, in each program running cycle, to perform parity check between the bits of each memory data itself, and obtain the self-verification value with the same number as the number of memory data; Perform parity check on the bits at the same position of each memory data to obtain inter-data check values that are the same as the number of bits of the memory data itself; obtain the row check value of this cycle based on each self-check value, and obtain the column check value of this cycle based on the inter-data check value; Comparison and judgment module: used to compare the row check value and column check value of this cycle with the row check value and column check value of the previous cycle respectively. If the row check value of this cycle is inconsistent with the row check value of the previous cycle, and the column check value of this cycle is inconsistent with the column check value of the previous cycle, it is determined that a single particle upset occurs.
12. A memory anomaly location device for a single event upset, characterized in that: include: Verification module: used to perform parity check on the bits of each memory data in each program running cycle during program running, and obtain the self-verification value with the same number as the number of memory data; Perform parity check on the bits at the same position of each memory data to obtain the same number of inter-data check values as the number of bits of the memory data itself; obtain the row check value of this cycle based on each self-check value, and obtain the column check value of this cycle based on the inter-data check value; Comparison and judgment module: used to compare the row check value and column check value of this cycle with the row check value and column check value of the previous cycle respectively. If the row check value of this cycle is inconsistent with the row check value of the previous cycle, and the column check value of this cycle is inconsistent with the column check value of the previous cycle, it is determined that a single-particle upset occurs; Positioning module: According to the difference between the row check value of the current cycle and the previous cycle, the row position where the single-particle upset occurs is obtained; according to the difference between the column check value of the current cycle and the previous cycle, the column position where the single-particle upset occurs is obtained; The row position where the single event upset occurs refers to the position of a single memory data where the single event upset occurs in the memory; The column position where the single event upset occurs refers to the bit position where the single event upset occurs in a single memory data.