Bit flipping verification method and storage system for dedicated storage chip
By using two memory units and the XOR verification method in a dedicated automobile memory chip, the data error problem caused by bit flip is solved, and the correct output of data and the reliable operation of the automobile is achieved.
Patent Information
- Application Number
- CN202110171618.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-08
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-02-08
AI Technical Summary
The flip of bits in a dedicated memory chip for automobiles will lead to errors in the car driving data, affecting normal driving. The prior art cannot directly locate and correct the flipped bits.
Two storage units are used to store data at the same time, and XOR and encoding verification is performed during output. The wrong data is corrected through XOR results to ensure the correct storage data is output.
It effectively overcomes the problem of bit flip in the memory chip, ensures the correctness of the output data of the automobile storage system, ensures the reliable operation of the automobile, and simplifies the verification of the flipped bits in the memory unit.
Smart Images

Figure CN114911646B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data storage and protection technology, and in particular to a bit flipping verification method and a storage system for a dedicated storage chip. Background Art
[0002] A large number of vehicle driving parameters need to be recorded in the dedicated memory chip for automobiles, so they are particularly sensitive to the flipping of bits in the memory chip. Once a bit in the chip flips, the driving data of the car will be seriously wrong, and even affect the normal driving of the car.
[0003] The existing chip storage mechanism can only implement bit verification of the stored data, and judge whether the driving parameters are correct by checking whether the verification result is the same as the check bit stored in the driving parameters. However, this method cannot directly locate and correct the flipped bits, so it still affects the vehicle driving experience. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a bit flipping verification method and storage system for a dedicated storage chip. The present invention stores data simultaneously through two storage units, and can perform XOR and verification on the data when output, thereby overcoming the bit flipping in the storage chip and outputting the correct stored data. The present invention specifically adopts the following technical solutions.
[0005] First, to achieve the above-mentioned purpose, a bit flip check method for a dedicated storage chip is proposed, characterized in that the steps include: after receiving the data to be stored, synchronously storing the data to be stored in a first storage unit and a second storage unit according to the same storage rule; after receiving the data retrieval instruction, performing the following steps: the first step is to synchronously read the first storage data corresponding to the data retrieval instruction from the first storage unit according to the data retrieval instruction, and read the second storage data corresponding to the data retrieval instruction from the second storage unit; the second step is to perform an XOR operation and a coding check on the read first storage data and the second storage data, and save the storage data with correct coding check in the first address segment of the output cache, and save the storage data with incorrect coding check in the second address segment of the output cache; the third step is to correct the storage data in the second address segment according to the XOR result obtained by the XOR operation; the fourth step is to output the storage data in the second address segment when the data in the second address segment after correction is different from the first address segment, otherwise the storage data in the first address segment is output.
[0006] Optionally, a bit flip check method for a dedicated storage chip as described in any of the above, wherein, after receiving the data to be stored, the data to be stored is stored in the first and second storage units in the following specific steps: step c1, sequentially split the data to be stored according to a preset unit length L to obtain a number of data segments A1, A2, A3, ..., An, where n represents the number of the data segments after the sequential splitting; step c2, XOR each data segment with a number difference of l ⌊n / l⌋ according to a check interval l, and insert the check bit obtained by the XOR into the lth bit of the data to be stored, wherein the check interval l ≥ 2; step c3, increment the check interval l according to a fixed step size, repeat step c2 until l ≥ ⌊n / 2⌋, and obtain the actual stored data; step c4, sequentially store the actual stored data obtained after inserting all the check bits according to step c3 in the first storage unit and the second storage unit.
[0007] Optionally, in the bit flipping verification method of any of the above-described dedicated storage chips, in which, in the second step, the specific steps of performing coding verification on the read first storage data and second storage data include: step d1, extracting the corresponding check bits in the first storage data and the second storage data respectively according to each check interval l in step c3, to obtain first data to be verified corresponding to the first storage data and second data to be verified corresponding to the second storage data; step d2, sequentially splitting the first data to be verified according to a preset unit length L to obtain a plurality of check data segments B1, B2, B3, ..., Bn, and splitting the second data to be verified into the first data to be verified. According to the sequential splitting according to the preset unit length L, a number of verification data segments C1, C2, C3, ..., Cn are obtained; in step d3, each verification data segment with a number difference of l ⌊n / l⌋ is XORed according to each verification interval l in step d1, and the verification value obtained by the XOR is compared to see whether it is the same as the lth bit in the first stored data; if they are different, each verification data segment is sequentially stored in the second address segment of the output cache and each verification data segment is sequentially stored in the first address segment of the output cache; otherwise, each verification data segment is sequentially stored in the first address segment of the output cache and each verification data segment is sequentially stored in the second address segment of the output cache.
[0008] Optionally, in a bit flip check method for a dedicated storage chip as described in any of the above, wherein, in the third step, the specific steps of correcting the storage data in the second address segment according to the XOR result obtained by the XOR operation include: performing an XOR operation on the XOR result obtained by the XOR operation bit by bit with the storage data in the second address segment.
[0009] At the same time, in order to achieve the above-mentioned purpose, the present invention also provides a storage system, characterized in that it includes: a first storage unit, which is used to store the data to be stored according to the storage rule; a second storage unit, which is used to store the data to be stored synchronously with the first storage unit according to the same storage rule as the first storage unit; an XOR unit, which is used to receive the first storage data read from the first storage unit according to the data retrieval instruction and the second storage instruction read from the second storage unit, and perform an XOR operation on the first storage data and the second storage data; a coding verification unit, which is used to perform coding verification on the first storage data and the second storage data received by the XOR unit; an output cache, which is connected to the coding verification unit and has two mutually separated address segments for storing data, which are used to store the storage data with correct coding verification in the first address segment therein, and store the storage data with incorrect coding verification in the second address segment of the output cache; an output interface, which is used to correct the storage data in the second address segment according to the XOR result obtained by the XOR operation of the XOR unit, and when the data in the second address segment after correction is different from the first address segment, the storage data in the second address segment is output, otherwise the storage data in the first address segment is output.
[0010] Optionally, in a storage system as described above, the first storage unit and the second storage unit are also connected to a storage data processing unit, which is used to store the data to be stored in the first storage unit and the second storage unit according to the following steps: step c1, sequentially split the data to be stored according to a preset unit length L to obtain a number of data segments A1, A2, A3, ..., An, where n represents the number of the data segments after the sequential splitting; step c2, XOR each data segment with a number difference of l ⌊n / l⌋ according to a check interval l, and insert the check bit obtained by the XOR into the lth bit of the data to be stored, wherein the check interval l≥2; step c3, increment the check interval l according to a fixed step size, repeat step c2 until l≥⌊n / 2⌋, and obtain the actual storage data; step c4, sequentially store the actual storage data obtained after inserting all the check bits according to step c3 in the first storage unit and the second storage unit.
[0011] Optionally, in a storage system as described above, the coding verification unit specifically performs coding verification on the first storage data and the second storage data received by the XOR unit according to the following steps: step d1, extracting the corresponding check bits in the first storage data and the second storage data respectively according to each check interval l in step c3, to obtain first data to be verified corresponding to the first storage data and second data to be verified corresponding to the second storage data; step d2, sequentially splitting the first data to be verified according to a preset unit length L to obtain a plurality of verification data segments B1, B2, B3, ..., Bn, and splitting the second data to be verified according to the preset unit length L to obtain a plurality of verification data segments B1, B2, B3, ..., Bn, and splitting the second data to be verified according to the preset unit length L to obtain a plurality of verification data segments B1, B2, B3, ..., Bn, and splitting the first ... Sequentially split according to a preset unit length L to obtain a number of verification data segments C1, C2, C3, ..., Cn; step d3, respectively perform XOR on the verification data segments ⌊n / l⌋ with a number difference of l according to each verification interval l in step d1, and compare whether the verification value obtained by the XOR is the same as the lth bit in the first stored data; if different, sequentially save each verification data segment in the second address segment of the output cache and sequentially save each verification data segment in the first address segment of the output cache; otherwise, sequentially save each verification data segment in the first address segment of the output cache and sequentially save each verification data segment in the second address segment of the output cache.
[0012] Optionally, in a storage system as described above, the output interface corrects the storage data in the second address segment according to the XOR result obtained by the XOR operation of the XOR unit in the following steps: performing an XOR operation on the XOR result obtained by the XOR operation bit by bit with the storage data in the second address segment.
[0013] Beneficial Effects
[0014] The parameter data of the vehicle during driving is stored simultaneously by two storage units. Then, the data in the two storage units are first checked by an XOR unit to obtain possible bit flipping bits. After that, more reliable storage data is further selected by the cooperation between the coding check unit and the output buffer, and the flipping bits in the storage data are corrected and then the data is output. Therefore, the present invention can ensure that the output data in the automobile storage system will not have bit flipping, thereby further ensuring the reliable operation of the automobile, and simplifying the verification and elimination of the flipping bits that accidentally appear in the storage unit.
[0015] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0017] Figure 1 is a schematic diagram of a storage system of the present invention;
[0018] Figure 2 It is a schematic diagram of the error correction process of the bit flipping check method of the dedicated storage chip of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose and technical solution of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the field to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.
[0021] Figure 1 A storage system according to the present invention comprises:
[0022] A first storage unit, used to store the data to be stored according to the storage rule;
[0023] The second storage unit is used as an alternative and a comparison unit, and stores the same data to be stored in synchronization with the first storage unit according to the same storage rule as the first storage unit, so that after a bit flip occurs in any one of the two storage units, the correct data can still be obtained through the other storage unit that has not been flipped;
[0024] an XOR unit, used to receive first storage data read from the first storage unit according to the data retrieval instruction and a second storage instruction read from the second storage unit, and perform an XOR operation on the first storage data and the second storage data to determine whether there is a difference between the data of the two storage units caused by bit flipping;
[0025] A coding check unit, used for performing coding check on the first storage data and the second storage data received by the XOR unit to determine whether the check bit thereof contains erroneous data due to bit flipping;
[0026] An output buffer connected to the coding verification unit, wherein two mutually separated address segments for storing data are provided inside the output buffer, and the stored data with correct coding verification is stored in the first address segment, and the stored data with incorrect coding verification is stored in the second address segment of the output buffer;
[0027] The output interface is used to correct the storage data in the second address segment according to the XOR result obtained by the XOR operation of the XOR unit, and when the data in the second address segment after correction is different from the data in the first address segment, the storage data in the second address segment is output, otherwise the storage data in the first address segment is output.
[0028] Since the probability of two storage units flipping at the same time is low, and the probability of two storage units flipping at the same bit is almost zero. Therefore, once a bit flip occurs, the present invention can immediately know the anomaly through a simple XOR operation, thereby correcting the flipped data with coding verification errors through the XOR result, and then further judging whether the data in the other storage unit is also flipped based on whether the verified data is consistent with the data in the other storage unit. Therefore, the present invention can directly correct the flipped bit and output the correct data, avoiding accidents or alarms caused by failure of vehicle operation parameter data.
[0029] Specifically Figure 2 As shown, the specific steps of the above-mentioned storage system performing bit flip check on the vehicle-specific chip are described in detail.
[0030] Figure 2 In the example, after receiving the data to be stored of "10100111010", the storage system simultaneously stores the data to be stored in the first storage unit and the second storage unit according to the same storage rule. The storage rule generally includes the steps of generating a corresponding check bit and inserting the check bit into the storage data.
[0031] In one implementation, the step of inserting the check bit may be performed as follows:
[0032] Step c1, sequentially split the data to be stored according to a preset unit length L=3 to obtain a number of data segments A1=101, A2=001, A3=110, A4=100, where n=1,2,3,4 represents the serial number of the data segments after sequential splitting;
[0033] Step c2, performing XOR on each data segment with a number difference of ⌊n / l⌋ of l according to the check interval l, and inserting the check bit obtained by XOR into the lth bit of the data to be stored;
[0034] Step c3, gradually increasing the verification interval l starting from l=2 according to a fixed step length, repeating step c2 until l≥⌊n / 2⌋, to obtain the actual stored data;
[0035] Step c4, sequentially storing the actual storage data obtained after inserting all the check bits in step c3 into the first storage unit and the second storage unit.
[0036] In the subsequent storage process, the data bits are flipped to "10100111 1 10” as an example. Thereafter, when a data retrieval instruction is received, in order to verify whether the bit in the storage unit is flipped, the following steps are performed to correct the flipped bit:
[0037] The first step is to synchronously read the first storage data corresponding to the data retrieval instruction from the first storage unit and read the second storage data corresponding to the data retrieval instruction from the second storage unit according to the data retrieval instruction;
[0038] In the second step, an XOR operation and a coding check are performed on the first stored data and the second stored data read, and the stored data with correct coding check is saved in the first address segment of the output buffer to obtain "10100111010", and the stored data with incorrect coding check is saved in the second address segment of the output buffer to obtain "10100111 1 10”;
[0039] Corresponding to the above storage rules, in this step, the specific step of performing coding verification on the first stored data and the second stored data read can be set to be performed according to the inverse operation of inserting the check bit during storage:
[0040] Step d1, extracting the corresponding check bits in the first stored data and the second stored data respectively according to each check interval l in step c3, to obtain first data to be checked corresponding to the first stored data and second data to be checked corresponding to the second stored data;
[0041] Step d2, sequentially splitting the first data to be verified according to a preset unit length L to obtain a number of verification data segments B1, B2, B3, ..., Bn, and sequentially splitting the second data to be verified according to a preset unit length L to obtain a number of verification data segments C1, C2, C3, ..., Cn;
[0042] Step d3, respectively check the number of the difference l according to each check interval l in step d1 XOR is performed on each verification data segment, and the verification value obtained by the XOR is compared to see whether it is the same as the lth bit in the first stored data; if they are different, each verification data segment is sequentially saved in the second address segment of the output cache and each verification data segment is sequentially saved in the first address segment of the output cache; otherwise, each verification data segment is sequentially saved in the first address segment of the output cache and each verification data segment is sequentially saved in the second address segment of the output cache.
[0043] Then continue to the third step: According to the XOR result "00000000" obtained by the XOR operation 1 00", and correct the data stored in the second address segment by performing an XOR operation on it bit by bit with the data stored in the second address segment to obtain "10100111010";
[0044] In the fourth step, when the data in the second address segment after correction is different from the data in the first address segment, it can be determined that other bits in the data stored in the first address segment are flipped, or data errors occur due to the limitations of the XOR operation verification method after correction, and verification cannot be achieved. At this time, the stored data in the second address segment can be directly output as the most reliable data. Otherwise, it can be directly determined that the above problem does not exist, and the stored data "10100111010" in the first address segment can be directly output to obtain the unflipped data output.
[0045] The above is only an embodiment of the present invention, and its description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for checking the bit flipping of a dedicated memory chip, characterized in that the steps include: After receiving the data to be stored, the data to be stored is synchronously stored in the first storage unit and the second storage unit according to the same storage rule; After receiving the data retrieval instruction, perform the following steps: The first step is to synchronously read the first storage data corresponding to the data retrieval instruction from the first storage unit and read the second storage data corresponding to the data retrieval instruction from the second storage unit according to the data retrieval instruction; The second step is to perform an XOR operation and a coding check on the first stored data and the second stored data read, and save the stored data with correct coding check in the first address segment of the output cache, and save the stored data with incorrect coding check in the second address segment of the output cache; The third step is to correct the stored data in the second address segment according to the XOR result obtained by the XOR operation; The fourth step is to output the stored data in the second address segment when the data in the second address segment after correction is different from that in the first address segment, otherwise, output the stored data in the first address segment.
2. The bit flipping verification method for a dedicated memory chip according to claim 1, characterized in that: After receiving the data to be stored, the data to be stored is stored in the first and second storage units in the following specific steps: Step c1, sequentially split the data to be stored according to a preset unit length L to obtain a number of data segments A1, A2, A3, ..., An, where n represents the number of the data segment after sequential splitting; Step c2: check the numbers of the XOR is performed on each data segment, and the check bit obtained by XOR is inserted into the lth bit of the data to be stored, where the check interval l≥2; Step c3, increasing the verification interval l according to a fixed step length, repeating step c2 until Get the actual storage data; Step c4, sequentially storing the actual storage data obtained after inserting all the check bits in step c3 into the first storage unit and the second storage unit.
3. The bit flipping verification method for a dedicated memory chip according to claim 2, characterized in that: In the second step, the specific steps of performing coding verification on the first stored data and the second stored data read include: Step d1, extracting the corresponding check bits in the first stored data and the second stored data respectively according to each check interval l in step c3, to obtain first data to be checked corresponding to the first stored data and second data to be checked corresponding to the second stored data; Step d2, sequentially splitting the first data to be verified according to a preset unit length L to obtain a number of verification data segments B1, B2, B3, ..., Bn, and sequentially splitting the second data to be verified according to a preset unit length L to obtain a number of verification data segments C1, C2, C3, ..., Cn; Step d3, respectively check the number of the difference l according to each check interval l in step d1 XOR is performed on each verification data segment, and the verification value obtained by the XOR is compared to see whether it is the same as the lth bit in the first stored data; if they are different, each verification data segment is sequentially saved in the second address segment of the output cache and each verification data segment is sequentially saved in the first address segment of the output cache; otherwise, each verification data segment is sequentially saved in the first address segment of the output cache and each verification data segment is sequentially saved in the second address segment of the output cache.
4. The bit flipping verification method for a dedicated memory chip according to claim 3, characterized in that: In the third step, the specific steps of correcting the stored data in the second address segment according to the XOR result obtained by the XOR operation include: The XOR result obtained by the XOR operation is XORed bit by bit with the storage data in the second address segment.
5. A storage system, characterized in that: include: A first storage unit, used to store the data to be stored according to the storage rule; A second storage unit, used for storing the data to be stored synchronously with the first storage unit according to the same storage rule as the first storage unit; An XOR unit, used for receiving first storage data read from the first storage unit according to the data retrieval instruction and a second storage instruction read from the second storage unit, and performing an XOR operation on the first storage data and the second storage data; A coding verification unit, used for performing coding verification on the first storage data and the second storage data received by the XOR unit; An output buffer connected to the coding verification unit, wherein two mutually separated address segments for storing data are provided inside the output buffer, and the stored data with correct coding verification is stored in the first address segment, and the stored data with incorrect coding verification is stored in the second address segment of the output buffer; The output interface is used to correct the storage data in the second address segment according to the XOR result obtained by the XOR operation of the XOR unit, and when the data in the second address segment after correction is different from the data in the first address segment, the storage data in the second address segment is output, otherwise the storage data in the first address segment is output.
6. The storage system according to claim 5, characterized in that: The first storage unit and the second storage unit are also connected to a storage data processing unit, which is used to store the data to be stored in the first storage unit and the second storage unit according to the following steps: Step c1, sequentially split the data to be stored according to a preset unit length L to obtain a number of data segments A1, A2, A3, ..., An, where n represents the number of the data segment after sequential splitting; Step c2: check the numbers of the XOR is performed on each data segment, and the check bit obtained by XOR is inserted into the lth bit of the data to be stored, where the check interval l≥2; Step c3, increasing the verification interval l according to a fixed step length, repeating step c2 until Get the actual storage data; Step c4, sequentially storing the actual storage data obtained after inserting all the check bits in step c3 into the first storage unit and the second storage unit.
7. The storage system according to claim 6, characterized in that: The coding verification unit specifically performs coding verification on the first storage data and the second storage data received by the XOR unit according to the following steps: Step d1, extracting the corresponding check bits in the first stored data and the second stored data respectively according to each check interval l in step c3, to obtain first data to be checked corresponding to the first stored data and second data to be checked corresponding to the second stored data; Step d2, sequentially splitting the first data to be verified according to a preset unit length L to obtain a number of verification data segments B1, B2, B3, ..., Bn, and sequentially splitting the second data to be verified according to a preset unit length L to obtain a number of verification data segments C1, C2, C3, ..., Cn; Step d3, performing XOR on each verification data segment with a number difference of 1 according to each verification interval 1 in step d1, and comparing whether the verification value obtained by the XOR is the same as the 1st bit in the first stored data; if different, then storing each verification data segment in the second address segment of the output cache in sequence and storing each verification data segment in the first address segment of the output cache in sequence; otherwise, storing each verification data segment in the first address segment of the output cache in sequence and storing each verification data segment in the second address segment of the output cache in sequence.
8. The storage system according to claim 6, characterized in that: The output interface specifically corrects the stored data in the second address segment according to the XOR result obtained by the XOR operation of the XOR unit in the following steps: performing an XOR operation on the XOR result obtained by the XOR operation bit by bit with the stored data in the second address segment.
Citation Information
Patent Citations
Method for error correcting and detecting for memory anti-single particle overturn
CN101281481A
Method and system for monitoring single event upset effect of FPGA (field programmable gate array) and correcting reloading
CN103971732A