Electronic circuit and method for self-testing a data memory - Patents.com
The electronic circuit and method efficiently monitor error correction code units in data memory by using existing units to detect latent failures during write cycles, ensuring high diagnostic coverage and protecting against errors without additional hardware or time delay.
Patent Information
- Application Number
- JP2022572415
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2024-09-12
- Estimated Expiration
- 2041-09-29
AI Technical Summary
Existing systems for monitoring error correction code units in data memory do not effectively detect latent failures, which can lead to undetected errors in safety-critical applications, and require additional hardware and time for diagnostics.
An electronic circuit and method that utilizes existing error correction code and checking units to monitor each other during write cycles, using multiplexers to switch data and codes, and error checking units to detect potential failures without additional hardware, setting flags for correctable and uncorrectable errors.
Enables efficient and safe monitoring of error correction code units for data memory, ensuring high diagnostic coverage without additional resources or time delay, protecting against both transient and permanent failures, especially in safety-critical applications.
Smart Images

Figure 2024532975000001
Abstract
Description
[Technical field]
[0001] The present invention relates to an electronic circuit for self-testing of data memories, a first error correction code unit for generating an error correction code from user data to be written in the data memory, where the electronic circuit is configured to write the user data and the associated error correction code in the data memory; an error checking unit for calculating a counter check code from user data read from the data memory and for comparing the counter check code with an error correction code read from the memory together with the associated user data, wherein the error checking unit is configured to provide an error flag if there is a difference between the error check code and the counter check code; Equipped with.
[0002] The invention further relates to a method for self-testing a data memory, a) a write cycle, - calculating an error correction code from user data provided to be written into a data memory; - storing the calculated error correction code and associated user data in a data memory; a write cycle comprising the steps of: b) a read cycle, - reading user data and associated stored error correction codes from a data memory; - calculating a counter check code from user data read from the data memory; comparing the error correction code read from the data memory with the counter check code and providing an error flag indicating a malfunction of the data memory if there is a mismatch; a read cycle comprising the steps of: Equipped with. [Background technology]
[0003] When storing data electronically in a data memory, malfunctions can occur due to a number of reasons.
[0004] To detect memory data corruption, error-correcting codes are used to detect and correct n-bit data corruption occurring in the data memory. Such errors can be caused by bit flips due to several reasons.
[0005] It is known to write extra memory bits to record the parity of a data string (e.g., a single byte or multiple bytes), which allows for the detection of any single-bit errors. It is further known to use error correcting codes (ECC), which are calculated from the user data written into the data memory and stored together with the user data in the data memory. Error correcting codes, such as single error correcting and double error correcting Hamming codes, allow single bit errors to be corrected and double bit errors to be detected. This can be combined with the use of extra parity bits. Error correcting codes are also known to correct multi-bit errors. The error correcting code function can be implemented in hardware together with the logic of the data memory device.
[0006] G. Tosenovjan: Error correction codes implemented on MPC55XX and MPC56XX devices, NXP-free scale semiconductor Application note, Document no. AN5200, rev. 1, 12 / 2015 describes error correction code features used in data memories in applications where data corruption via soft errors cannot be easily tolerated. For example, single errors are corrected and double errors are detected and indicated by an ECC error interrupt.
[0007] Single-bit errors can be "physically" repaired by reading the data from the data memory and writing them back after correction.
[0008] JP-H-08263391 A discloses a memory device with a test method for a random access memory (RAM) for storing an error correction code (ECC). The memory device includes an ECC generation circuit and a RAM for storing the ECC in an error correction / detection circuit. In the memory device, the ECC is generated by the ECC generation circuit from write data received from a memory control device. In the error correction / detection circuit, a syndrome is generated from the ECC of an address indicated by a signal line of the RAM. If the result of the error detected by the syndrome is a 1-bit error, the error-corrected data is set in a register and the 1-bit error information is set in an error flag. In the case of a 2-bit error, the 2-bit error information is set in an error flag and the content of the error flag is reported to the memory control device by a signal line.
[0009] US 2020 / 0167230 A1 discloses a method and apparatus for self-diagnosis of RAM errors detecting logic of a powertrain controller comprising an error correcting code (ECC) module including an ECC comparator.
[0010] A self-test of the RAM error detection logic is provided to diagnose whether an error occurs in the RAM error detection logic or in the error correction code ECC module. A test is performed on the error correction code module corresponding to the RAM operating in conjunction with the second core of the microcontroller unit during a specific test operation in the test mode.
[0011] When testing of each ECC module is performed, the tests performed by each core include checking whether the error detection function is operating properly through a first task for performing an OR input against a specified value so that an error occurs in the test bit input port of the ECC comparator, checking whether the error detection function is operating properly through a second task for correctable error testing in which the input port of the ECC comparator is flipped and input so that one bit of input data is actually input, and checking whether the error detection function is operating properly through a third task for uncorrectable error testing in which the input port of the ECC comparator is flipped and input so that two bits of input data are actually input. Summary of the Invention
[0012] The object of the present invention is to provide an improved electronic circuit and method for easy and safe monitoring of malfunctions of an error correcting code unit provided for generating an error correcting code (ECC) from user data. This object is achieved by an electronic circuit having the features of claim 1 and by a method having the features of claim 5.
[0013] Preferred embodiments are set forth in the dependent claims.
[0014] The electronic circuit as claimed in the preamble of claim 1 is further configured to provide the user data written in the data memory and the associated error correction code written in the error check unit in a write cycle of writing the user data and the associated error correction code in the data memory, and to provide a latent fault flag if a difference is determined between the error correction code and the counter check code.
[0015] The latent fault flag indicates errors occurring in the error correcting code unit, so that the functionality of the error correcting code unit can be easily monitored without requiring additional time and with only small hardware and / or software resources.
[0016] Hence, according to the invention, the error checking unit designed for a read cycle to check the stored error correction codes and the counter check code calculated from the user data read from the data memory is, according to the invention, further used for a write cycle to check the error correction code generated by the error correction code unit in the write cycle, which makes it possible to protect the memories and registers according to the ISO standard 26262 against permanent and transient failures, especially in safety-critical applications.
[0017] Error correcting code units and error checking units are security mechanisms within the meaning of this ISO 26262 standard.
[0018] By monitoring the error correction code unit by using an error checking unit in the write cycle, both safety mechanisms are monitored for the occurrence of latent failures. ISO standard 26262 speaks of latent failures, for example, when the safety mechanisms themselves are defective, which means that errors in the functional logic are no longer recognized.
[0019] Whereas the prior art safety mechanisms are not only checked for permanent errors when the system is powered up via the Logic Bist (LBist), in the present invention the safety mechanisms are monitored frequently by comparing the error correction code with an associated counter check code not only during read cycles but also during write cycles of the data memory.
[0020] The data memory may be any data memory, in particular a random access memory, a register, etc. The data memory may be provided in a separate integrated circuit or may be part of an integrated circuit such as a microprocessor, a microcontroller, an FPGA, an ASIC, etc.
[0021] The electronic circuits can be easily implemented since the present invention monitors each other using existing security mechanisms comprising an error correction code unit (ECCGEN) and an error checking unit (ECCCHK / CORR).
[0022] Preferably, the electronic circuit comprises at least one multiplexer unit so that the error correction code (ECC) generated from the error correction code unit and the write user data of the memory are switched to the error check unit (ECCCHK / CORR) by the multiplexer unit in a write cycle.
[0023] For this reason, the electronic circuit preferably comprises: a first multiplexer having a first and second input and an output, where user data to be written into the data memory is provided at the second input of the first multiplexer and user data provided from the data memory when reading from the data memory is provided at the first input of the first multiplexer, the output of the first multiplexer being connected to the input of the error checking unit when the first multiplexer is controlled by the data memory read / write flag to provide to the input of the error checking unit user data read from the data memory in a read cycle and to provide to the input of the error checking unit user data provided to be written into the data memory in a write cycle, a second multiplexer having first and second inputs and an output, wherein the error correction code generated by the error correction code unit for user data to be written into the data memory is provided at a second input of the second multiplexer, and the error correction code read from the data memory when reading associated user data from the data memory in a read cycle is provided at a first input of the second multiplexer, the output of the second multiplexer being connected to an input of the error checking unit, the second multiplexer being controlled by the data memory read / write flag to provide the error checking unit with the error correction code obtained directly from the error correction code unit in a write cycle and to provide the error correction code obtained directly from the data memory in a read cycle, Equipped with.
[0024] The first and second multiplexers can be provided as separate electronic circuits, which may be separate electronic components or separate functional units in a common integrated circuit. The first and second multiplexers can also be preferably designed to be integrally formed in a common multiplexer unit. The switching between data from the data memory in a read cycle (stored error correction code and stored user data) and data written into the data memory in a write cycle (generated error correction code and user data) is controlled by read and write commands applied to the data memory, for example available on signal lines of the electronic circuit. This read / write flag is a 1-bit signal, which is used to control the first and second multiplexers.
[0025] The purpose of the first and second multiplexers is to supply the error checking unit with the error correction code and user data provided at the input of the data memory, which are written into the data memory during a write cycle, and the stored error correction code and stored user data at the output of the data memory, which are read from the data memory during a read cycle.
[0026] Except for the multiplexer unit, there is no additional hardware required to achieve the improved electronic circuit. Furthermore, since the function of the error checking unit can be performed in parallel to write data into the data memory, there is no time delay caused by additional safety checks.
[0027] The output of the error checking unit may be provided to an input of at least one multiplexer, the at least one multiplexer being controlled by a read / write flag to provide a latency flag at the output of the multiplexer in a write cycle and to provide an error flag as a result of a comparison between a stored error correcting code (ECC) read from the data memory and a counter check code (CCC) calculated from the user data, which are read from the data memory in a read cycle.
[0028] Preferably, the error check unit of the electronic circuit further comprises a second error code generating unit provided for calculating a counter check code. The check code comparing unit is configured to compare the error correction code with the counter check code and, in case of a mismatch between the compared error correction code and the counter check code, either set a correctable error flag if a correctable error is detected or set an uncorrectable error flag if an uncorrectable error is detected. The correctable and uncorrectable flags are set during a read cycle, while the latent fault flag is set during a write cycle.
[0029] These error flags can be signaled externally and also used internally to monitor the functionality of the error code generation unit during write cycles.
[0030] In a further improved embodiment, the error checking unit comprises an error location unit configured to locate at least one bit position of the detected failing bit by comparing the error correction code with the respective counter check code. Said error checking unit is configured to set a latent failure flag when locating at least one bit position of the failing bit, or a correctable error flag or an uncorrectable error flag is set. Thus, the result of monitoring the function of the error code generating unit in a write cycle by using the correctable and uncorrectable error flags is combined with the result of locating the bit positions of the failing bits to provide a latent failure flag.
[0031] This can be implemented by the use of OR gates, where the error checking unit comprises a first OR gate providing a flag if the bit position of at least one of the faulty bits is indicated by the bit vector at the input of the first OR gate, and a second OR gate providing a latent fault flag as an output of the second OR gate if at least one of the error flag, the correctable error flag, or the uncorrectable error flag provided by the first OR gate is set at the input of the second OR gate.
[0032] The error location unit is adapted to function in both write and read cycles.
[0033] In a preferred embodiment, the electronic circuit further comprises an error correction unit designed to provide corrected user data at its output as a function of an error location vector indicating the location of the faulty bits of the user data at the input of the error correction unit. The error checking unit further comprises a comparator unit designed to compare the user data at the input of the error correction unit with the corrected user data at the output of the error correction unit and to indicate an error flag if there is a mismatch between the compared user data and the corrected user data in a write cycle. This allows an easy safety check of the functionality of the correction unit during data processing without any time delay.
[0034] The method for self-diagnosis of data memory is a) a write cycle, - calculating an error correction code from user data provided to be written into a data memory; - storing the calculated error correction code and associated user data in a data memory; a write cycle comprising the steps of: b) a read cycle, - reading user data and associated stored error correction codes from a data memory; - calculating a counter check code from user data read from the data memory; comparing the error correction code read from the data memory with the counter check code and providing an error flag indicating a malfunction of the data memory if there is a mismatch; a read cycle comprising the steps of: Equipped with.
[0035] In the write cycle, - calculating a counter check code from user data provided to be written into a data memory; providing a latent failure flag for comparing the calculated error correction code with the calculated counter check code and indicating a latent failure of the function provided for calculating the error correction code to be stored in the data memory during a write cycle in case of a mismatch; There is provided an additional step of:
[0036] The method implemented in the electronic circuit described above preferably comprises the steps of: - transferring to the error checking unit during a write cycle an error correction code provided at the output of the error correction code unit and associated user data provided at the input of the error correction code unit, and providing a latent fault flag in case of a mismatch during the write cycle; - transferring to an error checking unit, during a read cycle, the stored error correction code and the associated stored user data read from the data memory, and providing an error flag indicating a malfunction of the data memory during the read cycle; The method further comprises the step of:
[0037] The latent failure flag indicates a latent failure of the safety functions provided by the error correction code unit and the error check unit used to control the data memory to indicate any malfunction of the data memory. The use of both the error correction code unit and the error check unit in the write cycle allows a safety check of these safety functions themselves. This works because the direct input of the error correction code unit, i.e. the user data, and the direct output of the error correction code unit, i.e. the calculated error correction code, are fed directly into the error check unit without intermediate storage in the data memory that could result in a failure. If a latent failure is monitored by a mismatch between the error correction code and the calculated counter check code, the error is either caused by the error correction code unit when calculating the error correction code or by the error check unit when calculating the counter check code. Another latent failure in the error correction code unit or the error check unit can be caused by a flip of a bit in a register of the error correction code unit and the error check unit.
[0038] Preferably, one bit error in the user data is corrected and a correctable error flag is set by the error checking unit. Any error with more than one bit in the user data can be indicated as an uncorrectable error by the error flag without correcting the user data.
[0039] Such correction of a single bit error may be limited to a read cycle in which data is read from the memory.
[0040] In a preferred embodiment, the data memory is additionally monitored frequently by performing a read cycle after the write cycle to immediately check the correctness of the write cycle.
[0041] In a write cycle, the method preferably comprises: - User data (D) provided to be written into data memory (RAM) IN ) to Error Correcting Code (ECCIN ) and - Error Correction Code (ECC) calculated in data memory (RAM) IN ) and related user data (D IN ) and - User data (D) provided to be written into data memory (RAM) IN ) to counter check code (CCC IN ) and - Calculated Error Correcting Code (ECC IN ) is the calculated counter check code (CCC IN ) and if there is a mismatch, the error correction code (ECC IN ) or in the third step, the counter check code (CCC IN providing at least one error flag (CERR, UNCERR) indicating a malfunction in the calculation of -Counter Check Code (CCC IN ) caused by a malfunction when calculating the processed user data (D IN ) detecting bit locations of bits identified as faulty in checking whether at least one of a correctable error flag (CERR), an uncorrectable error flag (UNCERR) is set or at least one bit position with a faulty bit is detected, and setting a latent fault flag if at least one of a correctable error flag (CERR) or an uncorrectable error flag (UNCERR) is set or at least one bit position with a faulty bit is detected; The method includes the step of:
[0042] For this reason, the write cycle is also used to monitor the functionality of the error correction code and the calculation of the counter check code.
[0043] In a read cycle, the method preferably comprises: - Data memory (RAM) to user data (DOUT ) and associated stored error correcting codes (ECC OUT ) and - User data (D) read from data memory (RAM) OUT ) to counter check code (CCC OUT ) and -Error Correction Code (ECC) read from data memory (RAM) OUT ) is the calculated counter check code (CCC OUT ) and providing at least one error flag (CERR, UNCERR) indicating a malfunction of the data memory (RAM) if there is a mismatch; - User data (D) read from data memory (RAM) OUT ) detecting a bit position of a failing bit in the - checking whether at least one of a correctable error flag (CERR), an uncorrectable error flag (UNCERR) is set or at least one bit position with a faulty bit is detected, and setting a latent fault signal if at least one of a correctable error flag (CERR) or an uncorrectable error flag (UNCERR) is set or at least one bit position with a faulty bit is detected; The method includes the step of:
[0044] For this reason, the read cycle is also used to monitor the functionality of the detection of the bit location of the failing bit.
[0045] Preferably, the method further comprises: reading user data (D) from a data memory (RAM) in a read cycle at the indicated bit position; OUT ) correcting the failed bit.
[0046] Undetected errors may occur in the detection or correction logic when unintentionally correcting user data, for example by toggling a bit due to a fault in the detection or correction logic. Such errors can be detected in subsequent processing of the corrected user data on the receiver side. OUT ) is read from the data memory (RAM) and sent to the receiver as an error correction code (ECC OUT ) in a read cycle. The user data can be transferred, for example, by using an ECC protected data bus. The received corrected user data (D OUT Unintended corrections of the received corrected user data (D) can be detected by an error correction check ECCCHK on the receiver side. OUT ) and the received error correction code (ECC OUT If ECC protected memory is not used at the transmitter, the transmitter will OUT ) based on error correction code ECC GEN In this case, the data bus generates the corrected user data (D OUT ) and the corresponding error correcting code ECC GEN is protected by
[0047] In another embodiment, the user data (D IN ,D OUT ) is the corrected user data (D OUT, CORR ) and they are compared with the user data (D IN ,D OUT The error flag is corrected in the step of correcting the failed bit in the compared user data (D IN ,D OUT ) and corrected user data (D OUT, CORR) is indicated. This allows an easy safety check of the functionality of the correction unit during data processing without any time delay, and also allows the write cycle to be used to monitor the functionality of the detection and correction of the bit positions of faulty bits.
[0048] The invention is disclosed by means of illustrative embodiments in the enclosed drawings. [Brief description of the drawings]
[0049] [Figure 1] FIG. 1 is a block diagram of an electronic circuit according to the prior art. [Diagram 2] 1 is a block diagram of an illustrative embodiment of an electronic circuit in accordance with the present invention; [Figure 3a)] 3 is a block diagram of an illustrative embodiment of an error checking unit comprising an error correction unit for the electronic circuit in FIG. 2; [Figure 3b)] FIG. 3b is a block diagram of the error checking unit in FIG. 3a with an additional comparator for safety checking of the error correction unit. [Figure 4] FIG. 2 is a flow diagram of a method for self-testing a data memory. [Figure 5a)] FIG. 5 is a flow diagram of the improved method of FIG. 4 with a correction step in the write cycle. [Figure 5b] FIG. 5 is a flow diagram of the improved method of FIG. 4 with a correction step in the read cycle. [Figure 6] FIG. 1 is a block diagram of the interconnection of the electronic circuitry and the receiver by a data bus with an additional error checking unit on the receiver side.
[0050] FIG. 1 presents a block diagram of a prior art electronic circuit for self-testing a data memory RAM according to the prior art. IN (31...0) are provided by the user to be written into the data memory RAM to store data in a specific location. User Data D INis a data packet comprising a number of bits, i.e., one byte, or, as shown, a number of bytes each comprising 8 bits (e.g., a 4-byte data packet). The data packet also contains user data D along with a storage address in the data memory RAM. IN It may comprise:
[0051] User data D stored in the data memory RAM IN can be read out, which in the following will be referred to as the stored user data D OUT It is called (31...0).
[0052] To continuously check the functionality of the data memory RAM, a first error correction code unit ECCGEN1 is provided, which IN (31...0) to Error Correcting Code ECC IN which is provided to be written into a data memory RAM.
[0053] The written user data D IN (31...0) are fed into a first error correction code unit ECCGEN1, which encodes the user data D stored in the data memory RAM. IN Error Correction Code ECC as a function of (31...0) IN The function can be, for example, a Hamming code, an HSIAO code, a Reed-Solomon code, etc. It can be implemented in hardware as a programmable logic unit controlled by a software algorithm, or entirely in software running on a data processor in electronic circuits.
[0054] The error correcting code ECC calculated by the first error correcting code unit ECCGEN1 IN Then, the relevant user data D IN (31...0) in the data memory RAM.
[0055] This is controlled by a write flag WR on the signal line which indicates a write cycle for storing data in the data memory RAM.
[0056] Reading data from the data memory RAM is controlled by a read flag, which is, for example, the inversion of the write flag WR on a signal line.
[0057] In a read cycle, the user data D OUT (31...0) is the associated stored error correction code ECC OUT The error check unit checks the user data D read from the data memory RAM together with the OUT (31...0) to counter check code CCC OUT Calculate the counter check code CCC OUT In the read cycle, the relevant user data D OUT Error Correcting Code ECC read from data memory RAM with (31...0) OUT It is designed to be compared with
[0058] Therefore, the error check unit ECCCHK detects the read flag on the signal line
number
[0059] The check and read cycle is performed by storing and reading the error correction code ECC OUT is the user data D read from the data memory RAM. OUT Calculated counter check code CCC calculated as a function of (31...0) OUT Determine whether it is similar to
[0060] If a malfunction occurs in the data memory RAM, for example due to at least one bit flip, the error correction code ECC OUT The calculated counter check code CCC OUT There is a difference between the error checking unit ECCCHK and the error flags for corrected errors CERR and uncorrectable errors UNCERR.
[0061] In a preferred embodiment, the error checking unit ECCCHK checks the user data D if there is an error. OUT It has a correction unit that corrects (31...0). A single bit error can be easily corrected as the error flag ERR indicates a corrected error CERR. If the error is not correctable this is indicated by the uncorrectable error flag UNCERR.
[0062] The error flags CERR and UNCERR are read flags.
number
[0063] At the output of the error checking unit ECCCHK, the user data D OUT (31...0) is provided, which is read from the data memory RAM and possibly corrected by the correction logic.
[0064] This prior art electronic circuit is designed to protect data memory RAMs against transient and permanent errors by protection with error correcting codes.
[0065] The use of an error correcting code ECC makes it possible to detect and correct single bit errors in a data memory RAM and to detect more than one bit error, ie two bit errors.
[0066] For example, the corresponding 7-bit error correction code ECC is, for example, 32-bit user data DIN (31...0), which is provided to be written into the data memory RAM by the hardware ECCGEN, and the error correction code ECC is IN (31...0) is written into the data memory RAM.
[0067] For example, when reading a memory line from the data memory RAM, the read user data D OUT (31...0) is the error correction code ECC read out in the same way. OUT are checked in another hardware unit, the error checking unit ECCCHK.
[0068] User Data D OUT If there is a 1-bit error in (31...0), it is recognized via the error checking unit ECCCHK, corrected via the hardware ECCORR, and the correctable error flag CERR is set.
[0069] User Data D OUT If there is any double bit error in (31...0), it will be recognized via the error checking unit ECCCHK and the uncorrectable error flag UNCERR will be set.
[0070] The first error correction code unit ECCGEN1 and the error checking unit ECCCHK are safety mechanisms within the meaning of ISO standard 26262. The function of the error correction unit ECCCORR is safety-critical in read cycles, since unintended correction of the output data would result in the following system functioning with incorrect data. The standard only requires that an error must be reported, but not that it must be corrected, so that the correction unit in the electronic circuit and the respective safety monitoring procedures for controlling the function of the correction unit in write cycles are optional.
[0071] According to ISO standard 26262, a latent failure exists, for example, when the safety mechanism itself is defective, which causes errors in the functional logic to no longer be recognized. The prior art safety mechanism according to Fig. 1 does not check the safety mechanism, or only checks the safety mechanism for permanent errors, when the system is activated via the Logic Bist (LBist).
[0072] 2 presents a block diagram of an electronic circuit according to the invention. The electronic circuit comprises a data memory RAM, a first error correcting code unit ECCGEN1 and an error checking unit ECCCHK together with an AND logic (&_1) according to the prior art electronic circuit according to FIG.
[0073] Additionally, a first multiplexer MUX_1 and a second multiplexer MUX_2 are provided, the outputs of both the first and second multiplexers MUX_1 and MUX_2 being connected to inputs of an error checking unit ECCCHK.
[0074] The first input of the first multiplexer MUX_1 is connected to the data memory RAM, and the read user data D from the data memory RAM is input to the input of the first multiplexer. OUT Provide (31...0).
[0075] The second input of the first multiplexer MUX_1 is the write user data D IN (31...0), which are provided by the user to be written into the data memory RAM.
[0076] A first input of the second multiplexer MUX_2 is connected to the data memory RAM to store the error correction code ECC OUT which is provided to the second input of the first multiplexer MUX_1, and OUT Related to (31...0).
[0077] A second input of the second multiplexer MUX_2 is connected to the output of the first error correction code unit ECCGEN1 to provide the calculated error correction code ECC IN to provide.
[0078] The first and second multiplexers MUX_1 and MUX_2 are controlled by write and read flags on signal lines in addition to a chip select CS signal associated with the data memory RAM.
[0079] When a write flag is present on the data memory RAM and the first and second multiplexers MUX_1 and MUX_2 along with the chip select CS command, the second input is selected for a write cycle and is obtained directly from the first error correction code unit ECCGEN1 and is used as the user data D IN The user data D calculated as a function of (31...0) and written into the data memory RAM IN (31...0) and an error correction code ECC are provided to the input of the error check unit ECCCHK. In this write cycle, the error check unit checks the user data D offered to be written in the data memory RAM. IN It calculates a counter check code CCC as a function of (31...0) and checks the error correction code ECC obtained directly from the first error correction code unit ECCGEN1 against this counter check code CCC. The error checking unit calculates an error flag, which is treated as a latent fault flag by using a second AND logic &_2, which is controlled by a write flag and a chip select flag (WR and CS) on signal lines, which indicate the actual write cycle to write to the digital memory RAM.
[0080] If a mismatch is detected by the error checking unit ECCCHK, a latent failure flag, ie a digital "1" bit, is set indicating a malfunction of the safety mechanism provided by the first error correcting code unit ECCGEN1 and the error checking unit ECCCHK.
[0081] In a read cycle, the second AND logic is disabled due to the read flag (the inversion of the write flag). Hence, the first AND logic &_1 is enabled when the error check unit ECCCHK indicates an uncorrectable error in the error flag at the output of the error check unit. Thus, the output of the first AND logic provides an indication of a correctable error CORR and an uncorrectable error UNCORR. Repeated indications of correctable memory errors indicate a latent failure in the memory with a risk of uncorrectable errors.
[0082] In this read cycle, the stored error correction code ECC read from the data memory (RAM) OUT and stored user data D OUT (31...0) are transferred to the input of the error checking unit ECCCHK to store and read out user data D OUT The error correction code ECC stored against the counter check code CCC calculated as a function of (31...0) OUT Counter check is performed.
[0083] This is the function that corresponds to the prior art solution described in FIG.
[0084] 2 therefore uses the existing safety mechanism established by the first error correction code unit ECCGEN1 and the error check unit ECCCHK to monitor each other during the write cycle. IN (31...0) is switched in a write cycle to the error checking unit ECCCHK by a multiplexer unit comprising a first and a second multiplexer.
[0085] If there is a single bit error or a double bit error in the first error correcting code unit ECCGEN1 or the error checking unit ECCCHK, it will be identified and signaled via a latent fault flag.
[0086] At every write access to the data memory RAM, the safety mechanism is checked without any need for software with high diagnostic coverage (DC). The diagnostic coverage DC is 100%.
[0087] The monitoring of the safety mechanism is simply performed by the error check unit ECCCHK checking the existing error correction code ECC and the user data D IN (31...0) and executes this error check unit ECCCHK in this write cycle, so that the user data D IN This is done in a write cycle in parallel with writing (31...0).
[0088] The electronic circuit can be fully implemented in hardware as part of a data memory RAM integrated circuit or as part of a larger logic structure such as a microcontroller, microprocessor, FPGA, ASIC, or other logic circuit comprising a memory unit. A memory unit within the meaning of the present invention also includes a data register. The electronic circuit can be designed in combination with any type of memory, including RAM memory, registers, non-volatile memory, etc.
[0089] FIG. 3a) is a block diagram of an illustrative embodiment of an error checking unit ECCCHK / CORR comprising an error correction unit ECCCOR for the electronic circuit in FIG.
[0090] The safety objectives of ISO26262 do not stipulate that errors signed by error flags (CORR, UNCORR, latent faults) must be corrected. However, incorrect corrections may not be performed during reads if no errors are present.
[0091] An error in the error correction logic ECCCOR or the error checking logic ECCCHK resulting in an "unintended" correction on the first day would be a violation of the safety objectives of ISO 26 262, since the system would continue to operate with incorrect data. It is therefore advantageous to monitor a large part of the correction logic ECCCOR already during the write cycle, which can be part of the error checking unit ECCCHK / CORR.
[0092] A simple and fast check of the two error cases during a write cycle can be performed by the logic illustratively shown in the block diagram of FIG.
[0093] The error check unit ECCCHK / CORR uses the error correction code ECC shown in FIG. IN A counter check code CCC, which is similar to the first error correction code unit ECCGEN1, is provided to calculate OUT This is done by computing, in each cycle, i.e. read and write cycle, the user data D written in the data memory in the write cycle. IN (31...0) and the user data D read from the memory RAM during a read cycle. OUT (31...0) and the error check function ECCCHK checks the error correction code ECC IN Counter check code CCC OUT and sets a correctable error flag CERR if a correctable, e.g., 1-bit error, is detected, or sets an uncorrectable error flag UNCERR if an uncorrectable, e.g., multi-bit error, is detected.
[0094] The flags may be digital states (0 or 1), where a digital 0 may indicate no error, i.e., no correctable error for the CORR flag and no uncorrectable error for the UNCORR flag, respectively, and a digital 1 may indicate an error, i.e., a correctable error for the CORR flag or an uncorrectable error for the UNCORR flag, respectively.
[0095] On a read cycle, these CORR and UNCORR flags are indicated at the output of the &_1 logic.
[0096] The error checking unit ECCCHK / CORR further comprises an error location unit ERRLOC configured to locate at least one bit position of the failing bit. IN The respective counter check codes CCC OUT and provides a bit vector (31...0) indication, e.g., digital 1 in the bit vector at the failing bit position and digital 0 at the corrected bit position. The error location unit ERRLOC receives as input data an 8-bit error correction code ECC IN and 8-bit counter check code CCC OUT , as well as a 32-bit vector gate with a 32-bit error locator vector as output.
[0097] The error location vector is transferred to an input of the error correction unit ECCCOR to obtain the user data D provided to a second input of the error correction unit ECCCOR. IN The error correction unit ECCCOR can be designed to toggle each bit indicated as faulty by the error location vector. The output of the error correction unit ECCCOR is the corrected user data D OUT Provide (31...0).
[0098] The (eg, 32-bit) error location vector is forwarded to the input of a first OR gate OR1, which indicates an error flag at its output if at least one bit of the error location vector indicates the presence of a failing bit.
[0099] To monitor the functioning of the error control logic, an error check function is performed for both read and write cycles, providing a CORR / UNCORR flag. The CORR / UNCORR flag is used internally as an input to a second OR gate OR2 to provide a latent fault flag if an error, i.e. a correctable or uncorrectable error, is detected by the error check logic in a read or write cycle indication. Such an error is detected by the first or second error code generation unit ECCGEN. 1 / 2 This indicates a malfunction of one of the following:
[0100] The output of the first OR gate OR1, which indicates an error flag, is also transferred to the input of the second OR gate OR2 to provide a latent fault flag if an error is detected by the error location unit ECCLOC.
[0101] At least the error location unit ERRLOC is executed in the read and write cycles. The error correction unit ECCCOR also detects the resulting corrected user data D at its output. OUT Even though (31...0) are unused for this write cycle, they can function in the write cycle.
[0102] Two errors can be distinguished.
[0103] a) Error Correcting Code (ECC) during both write and read cycles IN The first error code generation unit ECCGEN1 is provided to generate an error and counter check code CCC OUT The error in the second error code generation unit ECCGEN2 is provided for calculating
[0104] b) a first and a second error code generation unit ECCGEN 1 / 2 is error-free, but the error location unit ECCLOC is faulty, which will lead to incorrect correction of the data.
[0105] For the first error type a), in either case, either a correctable error CORR or an uncorrectable error UNCORR flag will be recognized internally in the ECCCHK / CORR module, which then results in the setting of a latent fault flag due to the second OR gate OR2.
[0106] For the second error type b), a latent fault flag will also be set. IN and counter check code CCC OUT However, the error location unit ERRLOC does not indicate any errors by comparing with the same error correction code ECC IN and counter check code CCC OUT When locating the failing bit location by analyzing the CERR flag, the UNCERR flag, and the error flag, there is a malfunction in the error location unit ERRLOC, which is detected by the second OR logic OR2 for the CERR flag, the UNCERR flag, and the error flag at the output of the first OR gate OR1.
[0107] In general, it can be said that every correction during a write cycle leads to the setting of a latent fault flag, regardless of whether the error is in the ECCGEN logic, or in the ECCCHK logic, or in the ERRLOC logic.
[0108] Fig. 3b is a block diagram of an exemplary improved embodiment of the error checking unit ECCCHK / CORR shown in Fig. 3a). In addition, the error checking unit ECCCHK / CORR comprises an optional comparator COMP, which is provided for a function check of the error correction unit ECCCOR in a write cycle. The user data D at the input of the error correction unit ECCCOR IN ,D OUT and the corrected user data D at the output of the error correction unit ECCCOR. OUT, CORR is provided at the input of the comparator, which is the user data D IN ,D OUT Corrected user data D OUT, CORR If there is a mismatch between these two user data in the write cycle WR and the corrected user data, an error flag is indicated, which is transferred to the input of the second OR gate OR2.
[0109] Any malfunction of the error correction logic ECCCOR is detected by a second OR logic OR2 for the CERR flag, the UNCERR flag, the error flag at the output of the first OR gate OR1 as well as for the error flag of the comparator COMP.
[0110] FIG. 4 shows a write cycle WR for writing user data to the data memory RAM and a read cycle for reading the output data of the data memory RAM.
number
number
[0111] Figure 5 shows W4) comparing the calculated error correction code ECC with the calculated counter check code CCC and providing, in case of a mismatch, in a write cycle WR, at least one error flag CERR, UNCERR indicating a malfunction in the calculation of the error correction code ECC in step W1) or in the calculation of the counter check code CCC in step W3); W5 / R4) User data D provided to be written into the data memory RAM in a write cycleIN (31...0), or the user data D read from the data memory RAM during a read cycle. OUT Detecting the bit location of the failing bit in (31...0); W6 / R5) checking whether at least one of the correctable error flags CORR, UNCORR is set in step W4 / R3) or whether at least one bit position with a faulty bit is detected in step W5 / R5); 5 shows an improved flowchart of the method in FIG. 4 with a corrected additional step of performing
[0112] In step W6 / R5, a latent fault flag is set if at least one of a correctable error flag (CERR) or an uncorrectable error flag (UNCERR) is set, or at least one bit position with a faulty bit is detected.
[0113] For the read cycle, a further improved method is W7 / R6: User data D read from the data memory RAM in a read cycle at the bit positions indicated in step W5 / R4, for example by toggling the respective bits. OUT Correcting the failing bits in (31...0).
[0114] Step W7 / R6 is not monitored and a malfunction can occur in this step, for example due to a faulty memory or register or due to a toggle error in the correction step W7. This is because the error correction code (ECC) read out from the data memory (RAM) OUT ) at the output of step W7 / R6, the corrected user data D OUT(31...0). Such a pair of user data and the associated error correction code can be transferred to the receiver, for example on an ECC protected data bus, where the receiver performs the ECC check ECCCHK described above. In this case, a faulty connection on the sender side will be detected by the receiver system.
[0115] 6 shows a block diagram of a part of an electronic circuit comprising a data memory RAM and an interconnection of an error checking unit ECCCHK including an error correction unit CORR. The output of the error checking unit ECCCHK / CORR is connected to a data bus B, so that the error correction code ECC OUT and related corrected user data D OUT (31...0) are communicated via a data bus B to at least one receiver. The receiver is shown with parts of it at the bottom of the data bus B, which are relevant to the present invention. The receiver comprises an additional error checking unit ECCCHK on the receiver side.
[0116] The error correction code ECC calculated by the error correction code unit ECCGEN of the transmitter as configured by using the configuration signal CONFIG that controls the multiplexer OUT or the generated error correction code ERR GEN or OUT (31...0) is present at the other input of the error checking unit ECCCHK. From this, the error checking unit ECCCHK checks the error correcting code ECC OUT and the received corrected user data D OUT It is possible to check the validity of (31...0).
[0117] If additional ECCGEN logic is provided at the input of the data bus to provide an ECC-controlled data bus, for example as an implemented feature in the data memory unit, a pair of corrected user data D is transmitted to the receiver via the data bus. OUT (31...0) and Error Correcting Code (ECC OUT It is advisable to disable this ECCGEN logic when communicating with the data bus. The use of additional ECC checking logic at the input of the data bus ensures that a pair of corrected user data D OUT and E.C.C. OUT This is counterproductive because it would result in the data being constantly corrected.
[0118] Unintended corrections of user data can be monitored by an ECC check logic ECCCHK at the receiver side, which protects the data bus. OUT will be detected by the destination. If there is no fault in the correction logic, the data bus is protected with the use of the corrected data and the associated corrective error checking code.
Claims
1. An electronic circuit for self-test of a data memory (RAM), comprising: - User data (D) written into the data memory (RAM) IN ) to error correction code (ECC IN A first error correction code unit (ECCGEN) for generating 1 ), wherein the electronic circuit stores the user data (D IN ) and the associated error correction code (ECC IN ) - User data (D OUT ) to counter check code (CCC OUT ) and calculate the counter check code (CCC OUT ) to the associated user data (D OUT ) and the error correction code (ECC OUT an error check unit (ECCCHK / CORR) for comparing said error check code (ECC OUT ) and the counter check code (CCC OUT ) and providing an error flag (CERR / UNCERR) if there is a difference between the In an electronic circuit comprising: The electronic circuit stores the user data and the associated error correction code (ECC) in the data memory (RAM). IN The user data (D IN ) and the associated error correction code (ECC) written in the error check unit (ECCCHK / CORR). IN ) to provide the error correction code (ECC IN ), and the user data (D IN ) the counter check code (CCC IN 5. The electronic circuit of claim 1, further comprising: a first input for generating a Latent_Fault flag when a difference between the first input and the second input is determined.
2. The electronic circuit includes: a first multiplexer (MUX_1) with first and second inputs and an output, in which the user data (D IN ) is provided at the second input of the first multiplexer (MUX_1) and is the user data (D OUT ) is provided at the first input of the first multiplexer (MUX_1), and the output of the first multiplexer (MUX_1) is provided to an input of the error check unit (ECCCHK / CORR) to receive the user data (D) read from the data memory (RAM) in a read cycle. OUT ) and providing to the input of the error checking unit (ECCCHK / CORR) the user data (D) provided to be written into the data memory (RAM) in the write cycle. IN ) connected to the input of the error checking unit (ECCCHK / CORR) when the first multiplexer (MUX_1) is controlled by a data memory read / write flag to provide a second multiplexer (MUX_2) having a first and a second input and an output, in which the user data (D IN ) for the first error correction code unit (ECCGEN 1 ) generated by the error correction code (ECC IN ) is provided at the second input of the second multiplexer (MUX_2) for reading the associated user data (D OUT The error correction code (ECC) read from the data memory (RAM) when reading OUT ) is provided at the first input of the second multiplexer (MUX_2), the output of the second multiplexer (MUX_2) is connected to an input of the error check unit (ECCCHK / CORR), and the second multiplexer (MUX_2) provides the first error correction code unit (ECCGEN) to the error check unit (ECCCHK / CORR) in a write cycle. 1 ) IN ) and in a read cycle, the error correction code (ECC) obtained directly from the data memory (RAM) OUT ) controlled by said data memory read / write flag to provide 2. The electronic circuit of claim 1, comprising:
3. 3. The electronic circuit of claim 2, wherein said first and second multiplexers (MUX_1, MUX_2) are integrally formed in a common multiplexer unit.
4. The output of the error check unit (ECCCHK / CORR) is provided to an input of at least one logic unit (&_1, &_2), which in a write cycle receives the user data (D IN ) the calculated error correction code (ECC IN ) and the user data (D IN ) the counter check code (CCC IN ) to provide the Latent_Fault flag at the output of the at least one logic unit (&_1, &_2) during the write cycle, and the stored error correction code (ECC) read from the data memory during the read cycle. OUT ) and the user data (D OUT ) the counter check code (CCC OUT 4. An electronic circuit according to claim 1, characterized in that it is controlled by said read / write flag so as to provide an error flag (CERR / UNCERR) as a result of a comparison with said read / write flag.
5. The error check unit (ECCCHK / CORR) OUT A second error code generation unit (ECCGEN 2 ), and the error correction code (ECC IN ) to the counter check code (CCC OUT ) and comparing the compared error correction codes (ECC IN ) and counter check code (CCC OUT 5. The electronic circuit according to claim 1, further comprising a check code comparison unit (ECCCHK) configured to either set a correctable error flag (CERR) if a correctable error is detected or to set an uncorrectable error flag (UNCERR) if an uncorrectable error is detected, in case of a mismatch between the check code and the
6. The error check unit (ECCCHK / CORR) is IN ) to the respective counter check codes (CCC OUT 6. The electronic circuit of claim 5, further comprising an error location unit (ERRLOC) configured to locate the at least one bit position of a faulty bit detected by comparing the at least one bit position of the faulty bit with a corresponding bit position of the ...
7. The error check unit (ECCCHK / CORR) is configured to check whether at least one bit position of the faulty bit is connected to a first OR gate (OR 1 The first OR gate (OR 1 ), and the first OR gate (OR 1 At least one of the error flags provided by the first OR gate (OR 2 ) is set at the input of the second OR gate (OR 2 the second OR gate (OR 2 7. The electronic circuit of claim 6, further comprising:
8. The error check unit (ECCCHK / CORR) detects the user data (D IN , D OUT ) as a function of the error location vector indicating the location of the failing bit of OUT, CORR ) at the input of the error correction unit (ECCCOR), the error check unit (ECCCHK / CORR) being designed to provide the user data (D IN , D OUT ) to the corrected user data (D OUT, CORR ) and the compared user data (D IN , D OUT ) and the corrected user data (D OUT, CORR 8. An electronic circuit according to claim 1, further comprising a comparator unit designed to indicate an error flag in case of a discrepancy between said first and second inputs.
9. 1. A method for self-testing a data memory, comprising: a) a write cycle, - user data (D) provided to be written into said data memory (RAM) IN ) to error correction code (ECC IN ) and - storing the calculated error correction code (ECC) in the data memory (RAM) IN ) and the associated user data (D IN ) and a write cycle comprising the steps of: b) a read cycle, - User data (D OUT ) and the associated stored error correction code (ECC OUT ) and The user data (D OUT ) to counter check code (CCC OUT ) and The error correction code (ECC) read from the data memory (RAM) OUT ) to the counter check code (CCC OUT ) and providing an error flag indicating malfunction of said data memory (RAM) if there is a discrepancy. a read cycle comprising the steps of: In the write cycle, - the user data (D) provided to be written into the data memory (RAM) IN ) to counter check code (CCC IN ) and - the calculated error correction code (ECC IN ) to the calculated counter check code (CCC IN ) and, if there is a mismatch, the error correction code (ECC) stored in the data memory (RAM) during the write cycle. IN providing a Latent_Fault flag indicating a latent fault of said function provided for calculating The method of claim 1, further comprising the additional step of:
10. - the error checking unit (ECCCHK / CORR) receives, during a write cycle, the error correction code (ECCGEN) provided at the output of the error correction code unit (ECCGEN); IN ) and the associated user data (D) provided at the input of the error correction code unit (ECCGEN). IN ) to provide a Latent_Fault flag if there is a mismatch in the write cycle; - the error checking unit (ECCCHK / CORR) receives the stored error correction code (ECCCHK / CORR) read from the data memory (RAM) during the read cycle; OUT ) and the associated stored user data (D OUT ) to provide an error flag indicating a malfunction of said data memory (RAM) during a read cycle; The method according to claim 9, implemented in an electronic circuit according to any one of claims 1 to 8, characterized in that
11. The user data (D IN , D OUT ) is corrected, a correctable error flag is set, and the user data (D IN , D OUT Any error with more than one bit in the user data (D IN , D OUT 11. The method of claim 9 or 10, wherein the error flag indicates an uncorrectable error without correcting the first error.
12. The write cycle comprises: - user data (D) provided to be written into said data memory (RAM) IN ) to error correction code (ECC IN ) and - storing the calculated error correction code (ECC) in the data memory (RAM) IN ) and the associated user data (D IN ) and - the user data (D) provided to be written into the data memory (RAM) IN ) to counter check code (CCC IN ) and - the calculated error correction code (ECC IN ) to the calculated counter check code (CCC IN ) in the first step, and if there is a mismatch, IN ) or in the third step, IN providing at least one error flag (CERR, UNCERR) indicating a malfunction in said calculation of - the counter check code (CCC IN The processed user data (D IN detecting said bit positions of bits identified as faulty in checking whether at least one of the correctable error flag (CERR), the uncorrectable error flag (UNCERR) is set or at least one bit position with a fault bit is detected, and setting a Latent_Fault flag if at least one of the correctable error flag (CERR) or the uncorrectable error flag (UNCERR) is set or at least one bit position with a fault bit is detected; A method according to any one of claims 9 to 11, characterized in that it comprises the step of:
13. The read cycle comprises: - User data (D OUT ) and the associated stored error correction code (ECC OUT ) and The user data (D OUT ) to counter check code (CCC OUT ) and The error correction code (ECC) read from the data memory (RAM) OUT ) to the calculated counter check code (CCC OUT ) and providing at least one error flag (CERR, UNCERR) indicating a malfunction of said data memory (RAM) in case of a discrepancy; The user data (D OUT Detecting the bit location of a failing bit in the checking whether at least one of the correctable error flag (CERR), the uncorrectable error flag (UNCERR) is set or at least one bit position with a failing bit is detected, and setting a latent failure signal if at least one of the correctable error flag (CERR) or the uncorrectable error flag (UNCERR) is set or at least one bit position with a failing bit is detected; A method according to any one of claims 9 to 12, characterized in that it comprises the step of:
14. The user data (D OUT 14. The method according to claim 12 or 13, characterized in that the step of correcting the failing bit in
15. The error correction code (ECC) read from the data memory (RAM) is OUT ) and the corrected user data (D OUT ) on the receiver side, and OUT 15. The method according to claim 9, further comprising checking the correctness of
16. The user data (D IN , D OUT ) to the corrected user data (D OUT, CORR ), which are compared with the user data (D IN , D OUT ) and corrects the failed bit in the compared user data (D IN , D OUT ) and the corrected user data (D OUT, CORR 16. The method according to claim 14 or 15, characterized in that in the step of indicating a potential fault signal, any discrepancy between the
Citation Information
Patent Citations
LSI memory with self-correcting function
JP1989290200A
Storage device and memory card
JP2000305861A
Memory system, and memory error cause specifying method
JP2010026896A
Error correction hardware with defect detection
JP2019525362A
