A safety detection circuit and a safety detection method

By designing the safety detection circuit of the delay chain and output unit in the security chip, and using the clock signal to generate a status value to determine the alarm signal, the problem of false positives and false negatives of analog sensors in overall environment detection is solved, and the reliability of detection is improved. performance and concealment, adapting to the needs of different process nodes.

CN115130151BActive Publication Date: 2024-10-29HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210630871.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-06
Publication Date
2024-10-29
Estimated Expiration
2042-06-06

AI Technical Summary

Technical Problem

Existing analog sensors cannot comprehensively evaluate the overall working environment of security chips, and are prone to false positives and false negatives. They also have poor process portability, large board areas, and are easy to be identified by attackers, and their performance is degraded in harsh environments.

Method used

Design a safety detection circuit that uses a delay chain and an output unit to generate delay signals and sampling signals through the rising and falling edges of the clock signal, latch the status value to determine whether to issue an alarm signal, and solve the problem of false alarms and missed alarms. , and improve reliability and concealment through a fully digital design.

Benefits of technology

It effectively solves the problem of false positives and false negatives caused by environmental changes, improves the reliability and concealment of detection, reduces R&D costs, and adapts to the needs of different process nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130151B_ABST
    Figure CN115130151B_ABST
Patent Text Reader

Abstract

The present invention discloses a safety detection circuit and a safety detection method. The safety detection circuit includes: a delay chain, which receives a clock signal and outputs a delay signal based on the rising edge signal of the clock signal, wherein the total delay of the delay signal represents the environmental state; an output unit, which is connected to the delay chain, latches the delay signal based on a sampling signal, and outputs a state value; wherein the state value represents whether an alarm signal is generated, and the sampling signal is generated based on the falling edge of the clock signal. The safety detection circuit can comprehensively consider the impact of the external environment on the target circuit to be protected, and can output an alarm signal to the outside world when the output state value is less than a threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of information security technology, and in particular to a security detection circuit and a security detection method. Background Art

[0002] Security chips can encrypt various information data that are easy to leak and crack. In order to prevent these information data from being cracked, they need to be encrypted with high-performance and high-reliability encryption algorithms to ensure that these information data can interact safely and reliably. However, the means of cracking security chips are also developing. Commonly used cracking means include side channel attacks and fault injection attacks. These two methods can change the working environment of the security chip and destroy the normal operation of the encryption circuit to achieve the purpose of obtaining information. Therefore, the security chip should be integrated with a security detection circuit for detecting the working environment, which can issue an alarm when the external environment affects the operation of the encryption circuit.

[0003] Analog sensors used to detect the external environment include temperature sensors, voltage sensors, clock frequency sensors, and laser sensors. However, these sensors can only detect a single environment (such as voltage, temperature) and cannot comprehensively evaluate the overall working environment. Local false alarms or local missed alarms often occur during alarms, so the use of analog sensors is less effective. In addition, analog sensors have poor process portability. The structure of the same analog sensor is difficult to adapt to different process nodes. When the process is changed, the original circuit structure needs to be redesigned and adjusted, which increases the R&D cost. In addition, analog sensors have a large board area and are easy to be identified. When the security chip is attacked, the attacker can easily avoid this part of the circuit and make it ineffective. At the same time, the performance of analog sensors is also easily affected by the working environment, and the accuracy will decrease when the working environment deteriorates.

[0004] In view of the defects of the above analog sensors, it is necessary to design a new safety detection circuit structure. Usually, the working environment can be detected by designing a fully digital sensor. First of all, since digital sensors are designed with a fully digital process, they are less affected by the process and have higher reliability. Secondly, digital sensors have a smaller board area and are completely composed of digital devices like the security chip that needs to be protected. They are not easily directly identified by attackers in the board. Finally, digital sensors can output state values ​​based on various variables in the environment, and can simultaneously detect multiple conditions such as voltage, temperature, and clock frequency.

[0005] Most of the mainstream digital sensors are based on delay chains. The working principle of digital sensors based on delay chains is that changes in the working environment cause changes in the delay chain delay. Different working environments will cause timing violations in different timing paths. However, this structure has very high requirements for the wiring of the clock tree. An unreasonable clock line has a greater impact on the state value. When the external environment changes significantly, the same state value is prone to flip multiple times. The emergence of this situation may cause false alarms and missed alarms during alarms. Summary of the invention

[0006] The present invention provides a safety detection circuit and a safety detection method, which can solve the problems of false alarm and missed alarm caused by environmental changes.

[0007] To solve the above technical problems, the first technical solution provided by the present invention is: to provide a safety detection circuit, comprising: a delay chain, receiving a clock signal, and outputting a delay signal based on the rising edge signal of the clock signal, wherein the total delay of the delay signal represents the environmental state; an output unit, connected to the delay chain, wherein the output unit latches the delay signal based on a sampling signal, and outputs a state value; wherein the state value represents whether an alarm signal is generated, and the sampling signal is generated based on the falling edge of the clock signal.

[0008] Among them, the delay chain includes: a first delay chain, the first delay chain receives the clock signal, delays the clock signal, and outputs the delayed clock signal; a second delay chain, connected to the first delay chain, receives the delayed clock signal, and outputs the delayed signal based on the rising edge of the delayed clock signal; the greater the total delay of the first delay chain, the later the second delay chain detects the rising edge signal.

[0009] Among them, the output unit includes: a sampling signal generating unit, which receives the clock signal and outputs the sampling signal based on the falling edge of the clock signal; a latch unit, which is connected to the sampling signal generating unit, receives the sampling signal, latches the delay signal based on the sampling signal, and outputs the state value.

[0010] The first delay chain includes: X first delay units, and the X first delay units are connected in series in sequence.

[0011] Wherein, the second delay chain includes: M sub-delay modules, the M sub-delay modules are cascaded in sequence, and some of the sub-delay modules include: a first trigger, the first trigger includes a first voltage terminal, a first clock terminal and a first data terminal, and the first voltage terminal receives a power supply voltage; a second delay unit, the second delay unit includes an input terminal and an output terminal; the first clock terminal of the first trigger in the M-1th sub-delay module is connected to the output terminal of the second delay unit in the M-2th sub-delay module, and the output terminal of the second delay unit in the M-1th sub-delay module is connected to the first clock terminal of the first trigger in the Mth sub-delay module; wherein the second clock terminal of the first trigger in the first sub-delay module is connected to the first delay chain; the remaining sub-delay modules include: the first trigger, and the remaining sub-delay modules are the Mth sub-delay modules; wherein the first data terminals of the first triggers all output the delay signal, and the time difference of the rising edges of adjacent delay signals is the same.

[0012] Among them, the latch unit includes: M second triggers, each of the second triggers is connected to a corresponding first trigger, receives the delay signal sent by the corresponding first trigger, and the M second triggers respectively receive the sampling signals, each of the second triggers latches the received delay signal based on the sampling signal, and outputs the state value.

[0013] Among them, the second trigger includes: a second voltage terminal, a second clock terminal and a second data terminal, the second voltage terminal is connected to the corresponding first data terminal of the first trigger, the second clock terminal is connected to the sampling signal generating unit to receive the sampling signal, and the second data terminal outputs the state value.

[0014] Wherein, the sampling signal generating unit includes: a first inverter, the input end of the first inverter receives the clock signal; a third trigger, the third trigger includes a third voltage end, a third clock end, a third data end and a first reset end; the third voltage end receives the power supply voltage, and the third clock end is connected to the output end of the first inverter; a third delay unit, the first end of the third delay unit is connected to the third data end; a second inverter, the input end of the second inverter is connected to the second end of the third delay unit, and the output end of the second inverter is connected to the first reset end; a third inverter, the input end of the third inverter is connected to the third data end, and the output end of the third inverter is connected to the latch unit to output the sampling signal.

[0015] Among them, the first trigger also includes a second reset terminal; the detection circuit also includes: a reset unit, the first input terminal of the reset unit is connected to the first data terminal of the first trigger in the Mth sub-delay module, the second input terminal of the reset unit receives a reset enable signal, and the output terminal of the reset unit is connected to the second reset terminal to output the reset signal.

[0016] To solve the above technical problems, the second technical solution provided by the present invention is: to provide a safety detection method, which is based on the safety detection circuit described in any one of the above items, and the safety detection method includes: determining the state value output by the safety detection circuit; in response to the state value being less than a threshold, issuing an alarm; wherein the safety detection circuit and the target detection circuit have the same working environment; and the threshold is obtained by deploying the safety detection circuit and the target detection circuit in the same test environment.

[0017] The beneficial effects of the present invention are different from those of the prior art. The safety detection circuit of the present invention is provided with a delay chain, which receives a clock signal and outputs a delay signal based on the rising edge signal of the clock signal, wherein the total delay of the delay signal represents the environmental state; an output unit is connected to the delay chain, and the output unit latches the delay signal based on a sampling signal and outputs a state value; wherein the state value represents whether an alarm signal is generated, and the sampling signal is generated based on the falling edge of the clock signal. The present application generates a delay signal based on the environmental state through a delay chain, and finally generates a state value to determine whether an alarm signal is generated, thereby solving the problems of false alarms and missed alarms caused by environmental changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of a first embodiment of a safety detection circuit provided by an embodiment of the present invention;

[0019] Figure 2 A schematic diagram of a second embodiment of a safety detection circuit provided by an embodiment of the present invention;

[0020] Figure 3 A detailed circuit diagram of a safety detection circuit provided by an embodiment of the present invention;

[0021] Figure 4 A timing diagram of the safety detection circuit operation when the external working conditions change, provided by an embodiment of the present invention;

[0022] Figure 5 Schematic diagram of a safety detection method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The terms "first", "second", "third" in this application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the embodiments of this application, all directional indications (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0024] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] Analog sensors used to detect the external environment include temperature sensors, voltage sensors, clock frequency sensors, and laser sensors. However, these sensors can only detect a single environment (such as voltage, temperature) and cannot comprehensively evaluate the overall working environment. Local false alarms or local missed alarms often occur during alarms, so the use of analog sensors is less effective. In addition, analog sensors have poor process portability. The structure of the same analog sensor is difficult to adapt to different process nodes. When the process is changed, the original circuit structure needs to be redesigned and adjusted, which increases the R&D cost. In addition, analog sensors have a large board area and are easy to be identified. When the security chip is attacked, the attacker can easily avoid this part of the circuit and make it ineffective. At the same time, the performance of analog sensors is also easily affected by the working environment, and the accuracy will decrease when the working environment deteriorates.

[0027] In view of the defects of the above analog sensors, a new safety detection circuit structure needs to be designed. Usually, the working environment can be detected by designing a fully digital sensor. First of all, since digital sensors are designed with a fully digital process, they are less affected by the process and have higher reliability. Secondly, digital sensors have a smaller board area and are completely composed of digital periods like the security chip that needs to be protected. They are not easily directly identified by attackers in the board. Finally, digital sensors can output state values ​​based on various variables in the environment, and can detect multiple conditions such as voltage, temperature, and clock frequency at the same time.

[0028] Most of the mainstream digital sensors are based on delay chains. The working principle of digital sensors based on delay chains is that changes in the working environment cause changes in the delay chain delay. Different working environments will cause timing violations in different timing paths. However, this structure has very high requirements for the wiring of the clock tree. An unreasonable clock line has a greater impact on the state value. When the external environment changes significantly, the same state value is prone to flip multiple times. The emergence of this situation may cause false alarms and missed alarms during alarms.

[0029] Based on the above, the present application proposes a safety detection circuit, which can output a state value in combination with the external environment to determine whether to generate an alarm signal, and can solve the problems of false alarms and missed alarms caused by changes in the external environment.

[0030] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0031] See also Figure 1, is a schematic diagram of the structure of an embodiment of the safety detection circuit of the present invention, including: a delay chain 11 and an output unit 12, wherein the delay chain 11 is connected to the output unit 12, specifically, the delay chain 11 receives the clock signal CLK, and outputs a delay signal PULSE based on the rising edge signal of the clock signal CLK, and the total delay of the delay signal PULSE represents the environmental state. The output unit 12 latches the delay signal PULSE based on the sampling signal, and outputs a state value DATAOUT. Among them, the state value DATAOUT represents whether an alarm signal is generated, and the sampling signal is generated based on the falling edge of the clock signal CLK.

[0032] For details, please combine Figure 2 The delay chain 11 includes a first delay chain 111 and a second delay chain 112. The first delay chain 111 receives the clock signal CLK, delays the clock signal CLK, and outputs the delayed clock signal PULSE_IN. The second delay chain 112 is connected to the first delay chain 111, receives the delayed clock signal PULSE_IN, and outputs the delayed signal PULSE based on the rising edge of the delayed clock signal PULSE_IN. The greater the total delay of the first delay chain 111, the later the second delay chain 112 detects the rising edge signal.

[0033] Specifically, the output unit 12 includes a sampling signal generating unit 121 and a latch unit 122. The sampling signal generating unit 121 receives the clock signal CLK and outputs the sampling signal HIT_IN based on the falling edge of the clock signal CLK. The latch unit 122 is connected to the sampling signal generating unit 121, receives the sampling signal HIT_IN, latches the delay signal PULSE based on the sampling signal HIT_IN, and outputs the state value DATAOUT.

[0034] Please combine Figure 2 The safety detection circuit further includes a reset unit 13, which is connected to the second delay chain 112 to output a reset signal RN_C to reset the second delay chain 112.

[0035] For details, see Figure 3 , Figure 3 for Figure 2 The schematic diagram of the structure of a specific embodiment of the detection circuit shown in FIG. Specifically, the first delay chain 111 includes X first delay units A, and the X first delay units A are connected in series in sequence. Specifically, as Figure 2 As shown, the first delay chain 111 includes four first delay units A, which are connected in series in sequence. The input end of the first delay chain 111 is the clock signal CLK_IN, and the output end drives the second delay chain 112. The first delay chain 111 has different total delays in different working environments, and senses the external environment and converts it into a time difference signal.

[0036] The second delay chain 112 includes: M sub-delay modules 113, the M sub-delay modules 113 are cascaded in sequence, and some of the sub-delay modules 113 include: a first trigger L and a second delay unit B, the first trigger L includes a first voltage terminal D1, a first clock terminal C1 and a first data terminal Q1, the first voltage terminal D1 receives a power supply voltage VDD. The second delay unit B includes an input terminal and an output terminal.

[0037] The first clock terminal C1 of the first trigger L in the M-1th sub-delay module 113 is connected to the output terminal of the second delay unit B in the M-2th sub-delay module 113, and the output terminal of the second delay unit B in the M-1th sub-delay module 113 is connected to the first clock terminal C1 of the first trigger L in the Mth sub-delay module 113; wherein, the first clock terminal C1 of the first trigger L in the first sub-delay module 113 is connected to the first delay chain 111. The remaining sub-delay modules 113 include: the first trigger L, and the remaining sub-delay modules 113 are the Mth sub-delay modules 113; wherein, the first data terminals of the first triggers all output the delay signal, and the time difference of the rising edges of adjacent delay signals is the same.

[0038] Specifically, Figure 3 As shown, the last sub-delay module 113 only includes a first trigger L. It should be noted that the delay of the first delay unit A in the first delay chain 111 is greater than the delay of the second delay unit B in the second delay chain 112. In a more severe working environment, the total delay of the first delay chain 111 is greater, and the first clock terminal C1 of the first trigger L in the first sub-delay module 113 of the second delay chain 112 detects the rising edge later.

[0039] In the second delay chain 112, the first voltage terminal D1 of each first trigger L is always connected to a high level (power supply voltage VDD), and the first data terminal Q1 of each first trigger L outputs a delay signal PULSE. Specifically, Figure 2As shown, the first data terminal Q1 of the first first trigger L outputs the delayed signal PULSE[0], the first data terminal Q1 of the second first trigger L outputs the delayed signal PULSE[1], the first data terminal Q1 of the third first trigger L outputs the delayed signal PULSE[2], and the first data terminal Q1 of the Mth first trigger L outputs the delayed signal PULSE[M-1]. It should be noted that after the reset signal RN_C arrives, the delayed signals PULSE[0]~PULSE[M-1] are all low level, waiting for the rising edge of the delayed clock signal PULSE_IN to arrive. In particular, the first clock terminal C1 of the first first trigger L is directly driven by the PULSE_IN signal. When the rising edge of the PULSE_IN signal arrives, the PULSE[0] signal output by the first data terminal Q1 jumps to a high level. The first clock terminals C1 of the 2nd to M-1st first triggers L are driven by PULSE[0]~PULSE[M-2] respectively after passing through the first-stage second delay unit B. Specifically, for the kth first trigger L, after PULSE[k-1] jumps to a high level, after the delay of the first-level second delay unit B, the rising edge reaches the first clock terminal C1 of the kth first trigger L, and PULSE[k] jumps to a high level, and then continues to drive the next level. Finally, after PULSE[M-1] jumps to a high level, PULSE[M-1] drives the reset unit 13, and generates a reset signal RN_C after passing through the reset unit 13. The reset signal RN_C resets the delay signal PULSE[0]~PULSE[M-1] to a low level through the second reset terminal RN1 of each first trigger L. The pulses PULSE[0]~PULSE[M-1] generated in each clock cycle are arranged in a stepped manner as shown in the figure. Figure 4 As shown in the example, since the delay of the second delay unit B is small and hardly changes with the environment, the time interval for PULSE[0] to PULSE[M-1] to jump to a high level hardly changes with the external environment. Figure 4As shown in the example, under normal working conditions, the time interval from the rising edge of the input clock to the time when PULSE[0] jumps to a high level is Δt. It is assumed that PULSE[0]~PULSE[i] have already jumped to a high level when the sampling signal HIT_IN arrives. When the external working conditions change (deteriorate), the total delay of the first delay chain 111 changes significantly, and the time interval from the rising edge of the input clock to the time when PULSE[0] jumps to a high level becomes Δt+Δt′. At this time, the change in delay will cause the time for PULSE[0]~PULSE[M-1] to jump to a high level to be delayed. Since the time when the sampling signal HIT_IN arrives is fixed, the number of first triggers L whose output ends jump to a high level when the sampling signal HIT_IN arrives is reduced. At this time, PULSE[0]~PULSE[j] outputs a high level, and PULSE[j+1]~PULSE[M] outputs a low level (where j <i)。

[0040] Please continue to see Figure 3 , the latch unit 122 includes: M second triggers P, each of which is connected to a corresponding first trigger L, receives the delay signal PULSE sent by the corresponding first trigger L, and the M second triggers P respectively receive the sampling signal HIT_IN, each of which latches the received delay signal PULSE based on the sampling signal HIT_IN, and outputs the state value DATAOUT. Specifically, the second trigger P includes: a second voltage terminal D2, a second clock terminal C2 and a second data terminal Q2, the second voltage terminal D2 is connected to the first data terminal Q1 of the corresponding first trigger L, the second clock terminal C2 is connected to the sampling signal generating unit 121, receives the sampling signal HIT_IN, and the second data terminal Q2 outputs the state value DATAOUT.

[0041] like Figure 3As shown, the first second trigger P is connected to the first first trigger L, specifically, the second voltage terminal D2 of the first second trigger P is connected to the first data terminal Q1 of the first first trigger L; the second second trigger P is connected to the second first trigger L, specifically, the second voltage terminal D2 of the second second trigger P is connected to the first data terminal Q1 of the second first trigger L; the Mth second trigger P is connected to the first first trigger L, specifically, the second voltage terminal D2 of the Mth second trigger P is connected to the first data terminal Q1 of the Mth first trigger L. The second clock terminals C2 of all the second triggers P are connected to the sampling signal generating unit 121, receive the sampling signal HIT_IN, and the second data terminal Q2 of the first second trigger P outputs the state value DATAOUT[0], the second data terminal Q2 of the second second trigger P outputs the state value DATAOUT[1], the second data terminal Q2 of the third second trigger P outputs the state value DATAOUT[2], and the second data terminal Q2 of the Mth second trigger P outputs the state value DATAOUT[M-1]. Specifically, when the rising edge of the sampling signal HIT_IN arrives (roughly slightly later than the falling edge of the clock signal CLK_IN), these second triggers P will latch the state of PULSE[0]~PULSE[M-1] at this time and output the state values ​​DATAOUT[0]~DATAOUT[M-1].

[0042] Please continue to see Figure 3 , the sampling signal generating unit 121 includes: a first inverter F1, a third trigger G, a third delay unit E, a second inverter F2 and a third inverter F3. The input end of the first inverter F1 receives the clock signal CLK_IN; the third trigger G includes a third voltage terminal D3, a third clock terminal C3, a third data terminal Q3 and a first reset terminal RN3; the third voltage terminal D3 receives the power supply voltage VDD, and the third clock terminal C3 is connected to the output end of the first inverter F1. The first end of the third delay unit E is connected to the third data terminal Q3; specifically, the number of the third delay units E is 2, and the two third delay units E are connected in series. The input end of the second inverter F2 is connected to the second end of the third delay unit E, and the output end of the second inverter F2 is connected to the first reset terminal RN3. The input end of the third inverter F3 is connected to the third data terminal Q3, and the output end of the third inverter F3 is connected to the latch unit 122 to output the sampling signal HIT_IN. The sampling signal generating unit 121 detects the falling edge of the clock signal CLK_IN to generate the sampling signal HIT_IN at a fixed time. It should be noted that in the reset state, the sampling signal HIT_IN is a high level signal. Figure 4As shown, when the falling edge of the clock signal CLK_IN arrives, it will briefly jump to a low level, and after a delay time of two third delay units E, the first reset terminal RN3 will be reset, and the third data terminal Q3 of the third trigger G will be reset to a low level. The sampling signal HIT_IN will jump to a high level again and generate a rising edge of sampling.

[0043] Please continue to see Figure 3 , the first trigger L also includes a second reset terminal RN1; the detection circuit also includes: a reset unit 13, the first input terminal of the reset unit 13 is connected to the first data terminal of the first trigger L in the Mth sub-delay module 113, the second input terminal of the reset unit 13 receives the reset enable signal RST_M, the output terminal of the reset unit 13 is connected to the second reset terminal RN1, and the reset signal RN_C is output. Specifically, the reset unit 13 is completely implemented by combinational logic, including 2-stage DLY1 delay units, a first-stage inverter and an AND gate, and its function is to output a short low-level effective reset signal RN_C after the first data terminal Q1 of each stage of the first trigger L in the second delay chain 112 jumps to a high level. Specifically, when PULSE[M-1] jumps to a high level, the high level is input after passing through two DLY1 delay units, and the reset signal RN_C becomes a low level after passing through the inverter and the AND gate. When the reset of the first trigger L of each level takes effect, PULSE[M-1] jumps to a low level again, and RN_C returns to a high level, so only a reset signal with a very short duration is generated, which lasts for about the delay of the 2nd level DLY1 delay unit. The role of the AND gate is to ensure that when the reset signal of the external input arrives, the RN_C signal can also be pulled low to reset the first trigger L of each level of the second delay chain 112.

[0044] Please combine Figure 4 , Figure 4 The timing diagram of the safety detection circuit of the present application is divided into two parts: normal working environment and deteriorated working environment. The process includes: from the completion of reset to the rising edge of the clock signal CLK_IN, the safety detection circuit is in a ready state, the delayed clock signal PULSE_IN signal remains at a low level, the first data terminal Q1 of the first trigger L of each stage of the second delay chain 112 remains at a low level, the reset signal RN_C, RN_HIT and the sampling signal HIT_IN maintain a high level, waiting for the rising edge of the clock to arrive.

[0045] After the rising edge of the clock signal CLK_IN arrives, it is input to the first delay chain 111, and then the rising edge reaches the second delay chain 112. At this time, the safety detection circuit is in a waiting sampling state. At this time, the safety detection circuit describes the external environmental conditions with the total delay of the second delay chain 112, and then converts the signal into the state of the first trigger L of each level of the second delay chain 112.

[0046] Then, when the falling edge of the clock signal CLK_IN arrives, the safety detection circuit is in the sampling signal generation state. The third clock terminal C3 of the third trigger G in the sampling signal generation module 121 detects the rising edge generated after the inversion (the first inverter F1 converts the falling edge of the clock signal CLK_IN into a rising edge), and the third data terminal Q3 jumps to a high level. After passing through the third inverter F3, HIT_IN begins to become a low level. At the same time, after a delay of about 2 levels of DLY1 delay units, the RN_HIT signal becomes a low level, the third trigger G is reset, and the HIT_IN signal jumps to a high level again. At this time, the HIT_IN signal will generate a rising edge.

[0047] After the rising edge of the HIT_IN signal reaches the second clock terminal C2 of each level of the second trigger P of the latch unit 122, the safety detection circuit enters the sampling state, and each level of the second trigger P will latch the level state of PULSE[0]~PULSE[M-1] at this time, and the output end generates the state value DATAOUT[M-1:0]. Generally, at this time, the rising edge usually has not reached the last level of the second trigger P of the second delay chain 112, PULSE[M-1] is usually still at a low level, and the reset signal RN_C still maintains a high level, and has not entered the re-reset state.

[0048] After the output state value is generated, the second trigger P of each level of the second delay chain 112 has not been reset or has not received a rising edge input, and the safety detection circuit is in a reset waiting state. Assume that PULSE[0]~PULSE[k] is at a high level and PULSE[k+1]~PULSE[M-1] is at a low level. After that, wait for the rising edge of PULSE[k] to jump to a high level to reach the second clock end C2 of the second trigger P corresponding to PULSE[k+1], PULSE[k+1] jumps to a high level, and after a delay of one level of the first delay unit B, drives PULSE[k+2]. This is done until PULSE[M-1] also jumps to a high level, the reset signal RN_C jumps to a low level, and the safety detection circuit enters a reset state.

[0049] When PULSE[M-1] also jumps to a high level, the safety detection circuit is in a reset state. PULSE[M-1] drives the reset control module. After PULSE[M-1] jumps to a high level, after about 2 DLY1 delay units, RN_C generates a valid low level, resetting the first triggers L of each level of the second delay chain 112. It usually takes less than one clock cycle from the arrival of the rising edge of the clock to the completion of the reset. After the reset operation is completed in this clock cycle, the safety detection circuit will wait for the arrival of the next rising edge of the clock.

[0050] In particular, in order to ensure that the timing of the safety detection circuit will not be disordered, it is possible to meet Figure 4 As shown in the timing, before the falling edge of the clock arrives, the first triggers L of each level of the second delay chain 112 cannot all jump to a high level, and the reset operation needs to be completed before the next clock rising edge arrives after one clock cycle. To meet the above requirements, let the clock cycle of CLK_IN be T, and the delay of the first-level second delay unit B be Δt1, then the total delay of the first delay chain 111 and the second delay chain 112 needs to be greater than T / 2, and the total delay needs to be less than T-2Δt1.

[0051] In the first aspect, an embodiment of the present invention provides a safety detection circuit, which converts changes in environmental factors such as chip voltage and temperature into changes in the delay length of the first delay chain 111, so that the time when the output end of the first trigger L of each level of the second delay chain 112 changes to a high level. The corresponding sampling signal generation time is fixed at the falling edge of the clock, and different numbers of "0" and "1" will be obtained by sampling under different working environments. The smaller the output state value (the more bits are 0), the worse the corresponding working conditions, and the size of the state value can be used to characterize the impact of the current environment on the circuit.

[0052] Secondly, please combine Figure 5 The present invention also proposes a safety detection method, which is based on the safety detection circuit described above, and includes:

[0053] Step S11: Determine the state value output by the safety detection circuit.

[0054] Step S12: In response to the state value being less than a threshold, an alarm is issued.

[0055] Among them, the working environment of the safety detection circuit is the same as that of the target detection circuit; the threshold value is obtained by deploying the safety detection circuit and the target detection circuit in the same test environment. Specifically, the threshold value represents the value when the target detection circuit cannot work normally. That is, the safety detection circuit and the target detection circuit are first deployed in the same test environment, and the threshold value when the target circuit cannot work normally is tested. Then the safety detection circuit and the target detection circuit are deployed in the actual working environment, and the state value output by the safety detection circuit is detected in real time. If the state value is less than the threshold value, an alarm is issued, thereby achieving the purpose of safety detection.

[0056] It is understandable that the safety detection can set a threshold for the output state value. When the external conditions change, if the state value is lower than the threshold, it is considered to exceed the conditions for the circuit to work normally, and the safety detection circuit issues an alarm. When the safety detection circuit is deployed, it is wired in adjacent areas with the target circuit to be protected. The two work in the same working environment. Changes in the working environment affect the total delay of the primary delay chain of the safety detection circuit and output the corresponding state value, which is compared with the threshold to evaluate whether the current environment is suitable for the target circuit to work. Optionally, the safety detection circuit can be configured with different primary delay chain lengths and state value bits according to the sensitivity of the protected target circuit to the working environment. The sampling signal is generated based on the falling edge of the clock signal.

[0057] It can be understood that when the target circuit to be protected is operating normally, its normal operating range is determined. At the same time, the safety detection circuit and the target circuit to be protected are deployed in the same working environment, and its status value under normal working conditions is recorded as STATUS0. The working environment is changed so that the target circuit to be protected happens to not work normally, and the status value output by the safety detection circuit is recorded as STATUS1 at this time. At this time, it can be determined that the alarm threshold of the safety detection circuit is DATAOUT less than or equal to STATUS1. Furthermore, for different application scenarios, the safety detection circuit can be configured into structures with different ranges and accuracies. Preferably, the structure of the safety detection circuit is modified according to the working range in which the target circuit to be protected works normally, and the total delay of the first delay chain 111 and the number of stages of the first trigger L and the second delay unit B in the second delay chain are usually modified. If the initial state value STATUS0 is too small to cause insufficient range, it can be optimized by reducing the number of first delay units A in the first delay chain 111; on the contrary, if the output state value changes too little with the change of external conditions to meet the alarm requirements, it is necessary to increase the number of first delay units A in the first delay chain 111 or directly increase the number of first triggers L and second delay units B in the second delay chain 112. Optionally, for different target circuits to be protected, the first delay chain 111 is configured, and the total delay of the first delay chain 111 is set to adjust the sensitivity of the safety detection circuit. The greater the total delay of the first delay chain 111, the higher the sensitivity of the safety detection circuit.

[0058] The above is only an implementation method of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A safety detection circuit, characterized in that: include: A delay chain receives a clock signal and outputs a delayed pulse signal based on a rising edge signal of the clock signal, wherein the total delay of the pulse signal relative to the clock signal represents an environmental state; An output unit, connected to the delay chain, latches the pulse signal based on a sampling signal and outputs a state value; Wherein, the state value represents whether an alarm signal is generated, and the sampling signal is generated based on the falling edge of the clock signal; The delay chain comprises: a first delay chain, wherein the first delay chain receives the clock signal, performs delay processing on the clock signal, and outputs a delayed clock signal; a second delay chain, connected to the first delay chain, receiving the delayed clock signal, and outputting the pulse signal based on the rising edge of the delayed clock signal; the greater the total delay of the first delay chain, the later the second delay chain detects the rising edge signal; The output unit comprises: a sampling signal generating unit, wherein the sampling signal generating unit receives the clock signal and outputs the sampling signal based on a falling edge of the clock signal; a latch unit connected to the sampling signal generating unit, receiving the sampling signal, latching the pulse signal based on the sampling signal, and outputting the state value; The first delay chain comprises: X first delay units, the X first delay units are connected in series in sequence; The second delay chain comprises: M sub-delay modules, the greater the total delay of the first delay chain, the later the time when the first sub-delay module detects the rising edge of the pulse signal, the first sub-delay module is connected to the first delay chain; the M sub-delay modules are cascaded in sequence, and some of the sub-delay modules include: A first trigger, the first trigger comprising a first voltage terminal, a first clock terminal and a first data terminal, the first voltage terminal receiving a power supply voltage; A second delay unit, the second delay unit comprising an input end and an output end; The first clock end of the first trigger in the M-1th sub-delay module is connected to the output end of the second delay unit in the M-2th sub-delay module, and the output end of the second delay unit in the M-1th sub-delay module is connected to the first clock end of the first trigger in the Mth sub-delay module; wherein the first clock end of the first trigger in the first sub-delay module is connected to the first delay chain; The remaining part of the sub-delay module includes: the first trigger, the remaining part of the sub-delay module is the Mth sub-delay module; The first data terminals of the first triggers all output the pulse signals, and the time differences between the rising edges of adjacent pulse signals are the same.

2. The detection circuit according to claim 1, characterized in that: The latch unit comprises: M second triggers, each of which is connected to one first trigger, receives the pulse signal sent by the corresponding first trigger, and M second triggers respectively receive the sampling signals, each of which latches the received pulse signals based on the sampling signals and outputs the state value.

3. The detection circuit according to claim 2, characterized in that: The second trigger includes: a second voltage terminal, a second clock terminal and a second data terminal, the second voltage terminal is connected to the corresponding first data terminal of the first trigger, the second clock terminal is connected to the sampling signal generating unit to receive the sampling signal, and the second data terminal outputs the state value.

4. The detection circuit according to claim 1, characterized in that: The sampling signal generating unit comprises: A first inverter, wherein an input terminal of the first inverter receives the clock signal; A third trigger, the third trigger comprising a third voltage terminal, a third clock terminal, a third data terminal and a first reset terminal; the third voltage terminal receives a power supply voltage, and the third clock terminal is connected to the output terminal of the first inverter; A third delay unit, wherein a first end of the third delay unit is connected to the third data end; A second inverter, wherein an input end of the second inverter is connected to the second end of the third delay unit, and an output end of the second inverter is connected to the first reset end; A third inverter, wherein the input end of the third inverter is connected to the third data end, and the output end of the third inverter is connected to the latch unit to output the sampling signal.

5. The detection circuit according to claim 1, characterized in that: The first trigger also includes a second reset terminal; The detection circuit also includes: A reset unit, wherein the first input end of the reset unit is connected to the first data end of the first trigger in the Mth sub-delay module, the second input end of the reset unit receives a reset enable signal, and the output end of the reset unit is connected to the second reset end to output a reset signal.

6. A safety detection method, characterized in that: The safety detection method is based on the safety detection circuit according to any one of claims 1 to 5 above, and the safety detection method comprises: Determining a state value output by the safety detection circuit; In response to the state value being less than a threshold, an alarm is issued; The safety detection circuit and the target detection circuit have the same working environment; the threshold is obtained by deploying the safety detection circuit and the target detection circuit in the same test environment.

Citation Information

Patent Citations

  • Method for detecting working states of safety chips and detection circuit

    CN108073831A

  • Configurable locking detection circuit applicable to charge pump phase-locked loop

    CN108306638A