CN-121681217-B - CRC structure logic self-checking device and self-checking method
Abstract
The application discloses a CRC structure logic self-checking device and a self-checking method, wherein the self-checking circuit comprises a self-checking control module and a self-checking execution module, the self-checking execution module is embedded in a CRC structure and is used for generating a logic self-checking driving signal after receiving a logic self-checking starting signal generated by a register control module, receiving a comparison result of a CRC comparator in real time and judging whether an error signal is generated or not according to whether the comparison result of the CRC comparator is an expected value or not, and the self-checking execution module is used for switching the input of the CRC comparator into different reference values after receiving the logic self-checking driving signal. The application can realize the real-time accurate self-checking of the CRC structure in a simple and low-cost mode.
Inventors
- HUANG YUBIN
- Han Nianpeng
- Gao Shujin
- WANG XUDONG
- LI TIAN
- LIU HAO
Assignees
- 芯洲科技(北京)股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260210
Claims (7)
- 1. A logic self-checking device of a CRC structure is characterized by comprising a self-checking control module and a self-checking execution module, wherein the self-checking execution module is embedded in the CRC structure and is used for generating a logic self-checking driving signal after receiving a logic self-checking starting signal generated by a register control module, receiving a comparison result of a CRC comparator in real time and judging whether an error signal is generated according to whether the comparison result of the CRC comparator is an expected value or not, the self-checking execution module is used for switching the input of the CRC comparator into different reference values after receiving the logic self-checking driving signal, the logic self-checking execution signal comprises a self-checking execution signal and a reference value switching signal, the self-checking execution signal is used for starting a self-checking process and controlling the input switching of the CRC comparator, the reference value switching signal is used for switching different reference values to generate different comparison results, when the reference value switching signal is low, the reference value is consistent with a CRC value stored in a register, when the reference value switching signal is high, the rest of the reference value switching signal is a reverse CRC stored in the register, and the reverse bit is kept unchanged.
- 2. The CRC structural logic self-test device of claim 1, wherein after the self-test execution signal is pulled high, the self-test execution module is configured to switch an input signal source of a CRC comparator from a real-time CRC calculation result to a reference value.
- 3. The CRC structure logic self-test device of claim 1, wherein the CRC comparator is configured to compare a current reference value to an original CRC logic output, and output a comparison result.
- 4. The CRC structural logic self-checking device according to claim 3, wherein the self-checking control module is configured to monitor the comparison result of the CRC comparator in real time, and if the comparison result of the CRC comparator is inconsistent with the expected value, generate a fault flag signal and report the fault flag signal to the system.
- 5. A CRC structure logic self-checking method, adapted to be executed in a CRC structure logic self-checking apparatus as claimed in any one of claims 1 to 4, comprising: the register control module generates a logic self-checking starting signal and informs the self-checking control module to enter a self-checking flow; the self-checking control module generates a logic self-checking driving signal after receiving the logic self-checking starting signal, wherein the logic self-checking driving signal comprises a self-checking executing signal and a reference value switching signal; after the self-checking execution module detects that the self-checking execution signal is pulled up, an input signal source of the CRC comparator is switched from a real-time CRC calculation result to a reference value, when the reference value switching signal is low, the reference value is consistent with the CRC value stored in the register, and when the reference value switching signal is high, the reference value is that the CRC value stored in the register is inverted at a turnover bit, and the rest bits are kept unchanged; And the self-checking control module receives the comparison result of the CRC comparator in real time, and if the comparison result of the CRC comparator is inconsistent with the expected value, a fault sign signal is generated and reported to the system.
- 6. The method according to claim 5, wherein the self-checking control module receives the comparison result of the CRC comparator in real time, and if the comparison result of the CRC comparator is inconsistent with the expected value, generates a fault flag signal and reports the fault flag signal to the system, and the method comprises: When the reference value switching signal is at a high level, the analog reference value is turned over to a certain bit, the output of the CRC comparator is unequal, the self-checking control module does not detect abnormality, and no fault sign signal is generated; When the reference value switching signal is in a low level, the output of the CRC comparator is unequal and is inconsistent with the expected value, and the self-checking control module identifies an abnormal state and triggers the generation of a fault sign signal; when the reference value switching signal is at a high level, the CRC comparator outputs equal signals, the output signals are inconsistent with the expected signals, and the self-checking control module identifies abnormal states and triggers generation of fault sign signals.
- 7. A chip comprising a CRC structure logic self-checking device as claimed in any one of claims 1 to 4.
Description
CRC structure logic self-checking device and self-checking method Technical Field The application relates to the field of signal processing, in particular to a CRC structure logic self-checking device and a self-checking method. Background A Power Management Integrated Circuit (PMIC) is used as a core component for Power supply and scheduling in a system, and is widely applied to various fields of embedded systems, mobile terminals, automobile electronics, industrial control and the like. To accommodate complex and diverse application requirements, modern PMICs typically flexibly configure power modes, fault responses, security policies, etc. through registers, and use registers as the primary interfaces for data interaction and instruction issue. Thus, the accuracy and integrity of the register data is directly related to the proper execution of the power management functions and the security of the system operation. Most PMICs currently use a cyclic redundancy check (Cyclic Redundancy Check, CRC) mechanism to check read and write data of registers in real time. However, the CRC mechanism itself also has potential limitations. Particularly, under the condition that the check logic circuit itself fails, for example, a logic gate is damaged, a register is overturned, a logic path is abnormal, and the like, a CRC check result is possibly wrong, so that abnormal register data cannot be found in time, the wrong data possibly directly enters a PMIC control flow, power supply abnormality, system restarting and even permanent damage are induced, and serious system safety risks are brought. To further improve the reliability of the system, a logic built-in self-test (Logic Built-IN SELF TEST, LBIST) mechanism is generally introduced in the prior art to perform periodic functional verification on the CRC check circuit. The LBIST tests a target logic area through a built-in pseudo-random test vector generator and a response compressor when the system runs or is idle to judge whether the functional logic is normal, but the LBIST has the following problems that firstly, the design complexity and the circuit area of a digital module are increased, secondly, extra power consumption expenditure is brought, the application scene of a low-power consumption system is not facilitated, thirdly, the test time is relatively long, the test is not suitable for frequent execution, and the quick verification requirement of the data integrity in a high-real-time scene is difficult to meet. Therefore, how to reduce circuit resource consumption and energy consumption cost and shorten detection period while guaranteeing reliability of CRC check function is a technical problem to be solved urgently. Disclosure of Invention The application mainly aims to provide a CRC structure logic self-checking device and a CRC structure logic self-checking method so as to realize accurate, simple and low-cost CRC structure self-checking. In order to achieve the above object, a first aspect of the present application provides a logic self-checking device with a CRC structure, including a self-checking control module and a self-checking execution module, wherein the self-checking execution module is embedded in the CRC structure, the self-checking control module is configured to generate a logic self-checking driving signal after receiving a logic self-checking start signal generated by the register control module, receive a comparison result of the CRC comparator in real time, determine whether an error signal is generated according to whether the comparison result of the CRC comparator is an expected value, and switch an input of the CRC comparator to different reference values after receiving the logic self-checking driving signal. Further, the logic self-checking driving signal comprises a self-checking executing signal and a reference value switching signal, wherein the self-checking executing signal is used for starting a self-checking process and controlling the CRC comparator to input and switch, and the reference value switching signal is used for switching different reference values to generate different comparison results. Further, the reference value is changed along with the reference value switching signal, when the reference value switching signal is low, the reference value is consistent with the CRC value stored in the register, and when the reference value switching signal is high, the reference value is that the CRC value stored in the register is inverted at the inversion bit, and the rest bits are kept unchanged. Further, after the self-checking execution signal is pulled up, the self-checking execution module is configured to switch the input signal source of the CRC comparator from the real-time CRC calculation result to the reference value. Further, the CRC comparator is configured to compare the current reference value with the original CRC logic output, and output a comparison result. Further, the self-checking control module i