Voltage drop detection circuit and system
By introducing timing violation detection, edge shaping and early warning feedback modules into the voltage drop detection circuit, the voltage drop detection response time is shortened to 1 clock cycle, solving the problem of excessive response time in the prior art, ensuring that it is low There is no timing violation under voltage conditions and the warning signal will be automatically restored.
Patent Information
- Application Number
- CN202410954581.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-08
AI Technical Summary
In the prior art, the response time of voltage drop detection usually exceeds 6 clock cycles, which cannot effectively mitigate the impact of high-frequency power supply voltage drop on chip performance.
A voltage drop detection circuit is designed, including a timing violation detection module, an edge shaper and an early warning feedback module. The signal output by the timing violation detection module is used to determine whether the supply voltage is normal. The edge shaper eliminates burrs and outputs it after 1 clock cycle. Early warning signal, the early warning feedback module outputs a high level when the voltage is lower than the threshold, triggering the glitch-free clock switching circuit to switch to the low-frequency clock.
The response time for voltage drop detection is shortened to 1 clock cycle, ensuring no timing violations under low voltage conditions, and automatically recovering the early warning signal when voltage recovery is restored, avoiding complex comparator and encoder designs.
Smart Images

Figure CN118914645A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of voltage detection, and in particular to a voltage drop detection circuit and system. Background Art
[0002] When the workload of the core processor in the chip changes, resulting in fast and large activity transitions, large current transients are induced in the power delivery network. These transient changes may cause the supply voltage to drop, resulting in timing violations in the critical paths in the chip.
[0003] Supply voltage drops can degrade the performance and energy efficiency of electronic circuits. To mitigate the effects of voltage drops, adaptive circuits are currently mostly used. The impact of supply voltage drops on performance is reduced by using an on-chip monitor to measure the change in supply voltage and adjust the clock frequency. However, this reactive design requires a certain response time to detect supply voltage drops and adjust the clock frequency to avoid timing margin failure of critical paths. Because the circuit uses comparators and precoding methods, the response time is usually more than 6 clock cycles, that is, response time is the key challenge that limits these adaptive circuits to mitigate the impact of high-frequency supply voltage drops.
[0004] Therefore, how to shorten the response time of voltage drop detection is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The purpose of the present application is to provide a voltage drop detection circuit and system to shorten the response time of voltage drop detection.
[0006] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] On the one hand, an embodiment of the present application provides a voltage drop detection circuit, the voltage drop detection circuit comprising a timing violation detection module, an edge shaper and a warning feedback module;
[0008] The input end of the timing violation detection module is connected to the reference clock and the reset signal respectively, and the input end of the edge shaper is also connected to the reference clock and the reset signal respectively; the output end of the timing violation detection module is connected to the input end of the edge shaper, the output end of the edge shaper is connected to the input end of the early warning feedback module, and the output end of the early warning feedback module is connected to the glitch-free clock switching circuit;
[0009] The timing violation detection module is used to output a stable first signal when the power supply voltage is normal; the timing violation detection module is also used to output a first signal with a continuously fluctuating level when the power supply voltage is lower than a voltage threshold;
[0010] The edge shaper is used to eliminate burrs from the first signal and output a second signal after one clock cycle; wherein, when the power supply voltage is normal, the second signal is at a low level;
[0011] The early warning feedback module is used to output a high-level early warning signal when receiving the rising edge of the second signal, so that the glitch-free clock switching circuit outputs a low-frequency clock; wherein the frequency of the low-frequency clock is lower than the frequency of the reference clock.
[0012] Optionally, the timing violation detection module includes: a first frequency division unit, a second frequency division unit and a first XOR gate;
[0013] The input end of the first frequency dividing unit and the input end of the second frequency dividing unit are both used to receive the reference clock and the reset signal, the output end of the first frequency dividing unit and the output end of the second frequency dividing unit are respectively connected to the first input end and the second input end of the first XOR gate, and the output end of the first XOR gate is connected to the input end of the edge shaper;
[0014] The first frequency division unit is used to output a first frequency division signal corresponding to an actual critical path of the chip in advance of the timing violation;
[0015] The second frequency division unit is used to output a second frequency division signal that is insensitive to changes in the power supply voltage.
[0016] Optionally, the first frequency division unit includes: a first trigger, a copy critical path module, an adjustable delay chain, and a first inverter;
[0017] The clock end and the low-level reset end of the first trigger are connected to the reference clock and the reset signal respectively, and the first trigger is triggered by the rising edge of the clock; the output end of the first trigger is connected to the input end of the copy critical path module and the first input end of the first XOR gate respectively, the output end of the copy critical path module is connected to the input end of the adjustable delay chain, the output end of the adjustable delay chain is connected to the input end of the first inverter, and the output end of the first inverter is connected to the input end of the first trigger;
[0018] The copy critical path module is used to copy the actual critical path of the chip and generate a copy critical path; wherein the input signal and the output signal of the copy critical path module are in phase;
[0019] The adjustable delay chain is used to compensate for the difference between the replica critical path and the actual critical path of the chip; the adjustable delay chain is also used to set an adjustable voltage threshold so that the replica critical path generates a timing violation before the actual critical path of the chip.
[0020] Optionally, the second frequency dividing unit includes a second trigger and a second inverter;
[0021] The clock terminal and the low-level reset terminal of the second trigger are respectively connected to the reference clock and the reset signal, and the second trigger is triggered by the rising edge of the clock; the output terminal of the second trigger is respectively connected to the input terminal of the second inverter and the second input terminal of the first XOR gate, and the output terminal of the second inverter is connected to the input terminal of the second trigger.
[0022] Optionally, the edge shaper includes a third trigger, a fourth trigger and a second XOR gate;
[0023] The clock ends of the third trigger and the fourth trigger are both used to receive the reference clock, the low-level reset ends of the third trigger and the fourth trigger are both used to receive the reset signal, and the third trigger and the fourth trigger are both triggered by the rising edge of the clock; the output end of the timing violation detection module is connected to the input end of the third trigger, the output end of the third trigger is respectively connected to the input end of the fourth trigger and the first input end of the second XOR gate, the output end of the fourth trigger is connected to the second input end of the second XOR gate, and the output end of the second XOR gate is connected to the input end of the early warning feedback module.
[0024] Optionally, the early warning feedback module includes a third inverter, a counter module and a fifth trigger; the output end of the edge shaper is respectively connected to the clock end of the fifth trigger and the input end of the third inverter; the output end of the third inverter is connected to the low level reset end of the counter module, and the output end of the counter module is connected to the low level reset end of the fifth trigger; the fifth trigger is triggered by the rising edge of the clock, the input end of the fifth trigger is fixed to a high level, and the output end of the fifth trigger is respectively connected to the enable end of the counter module and the glitch-free clock switching circuit.
[0025] Optionally, the counter module includes a two-bit binary adder counter, a sixth flip-flop and a fourth inverter; the clock terminal of the two-bit binary adder counter is connected to the reference clock, the low level reset terminal of the two-bit binary adder counter is connected to the output terminal of the third inverter, the enable terminal of the two-bit binary adder counter is connected to the output terminal of the fifth flip-flop, and the output terminal of the two-bit binary adder counter is connected to the input terminal of the sixth flip-flop;
[0026] The clock end and the low-level reset end of the sixth trigger are respectively connected to the reference clock and the reset signal, and the sixth trigger is triggered by the rising edge of the clock; the output end of the sixth trigger is connected to the input end of the fourth inverter, and the output end of the fourth inverter is connected to the low-level reset end of the fifth trigger.
[0027] Optionally, the counter module further includes a first AND gate and a second AND gate;
[0028] The first input terminal and the second input terminal of the first AND gate are connected to the reset signal and the output terminal of the third inverter respectively, and the output terminal of the first AND gate is connected to the low level reset terminal of the two-bit binary adder counter;
[0029] The first input terminal and the second input terminal of the second AND gate are connected to the reset signal and the output terminal of the fourth inverter respectively, and the output terminal of the second AND gate is connected to the low level reset terminal of the fifth trigger.
[0030] Optionally, the two-bit binary adder counter includes a seventh flip-flop, an eighth flip-flop, a third XOR gate, a fourth XOR gate, a third AND gate and a fourth AND gate;
[0031] The clock terminals of the seventh flip-flop and the eighth flip-flop are both used to receive the reference clock, the low-level reset terminals of the seventh flip-flop and the eighth flip-flop are both connected to the output terminal of the first AND gate, and the seventh flip-flop and the eighth flip-flop are both triggered by the rising edge of the clock;
[0032] The output end of the fifth trigger is connected to the first input end of the third AND gate and the first input end of the third XOR gate respectively; the output end of the seventh trigger is connected to the second input end of the third AND gate and the second input end of the third XOR gate respectively, and the output end of the third XOR gate is connected to the input end of the seventh trigger;
[0033] The output end of the third AND gate is connected to the first input end of the fourth AND gate and the first input end of the fourth XOR gate respectively; the output end of the eighth trigger is connected to the second input end of the fourth AND gate and the second input end of the fourth XOR gate respectively, and the output end of the fourth XOR gate is connected to the input end of the eighth trigger.
[0034] On the other hand, an embodiment of the present application further provides a voltage drop detection system, the voltage drop detection system comprising a glitch-free clock switching circuit and the voltage drop detection circuit as described in any one of the aforementioned embodiments, the output end of the voltage drop detection circuit is connected to the input end of the glitch-free clock switching circuit, and the voltage drop detection circuit is used to send a warning signal to the glitch-free clock switching circuit;
[0035] When the early warning signal is at a high level, the glitch-free clock switching circuit outputs a low-frequency clock;
[0036] When the early warning signal is at a low level, the glitch-free clock switching circuit outputs a reference clock; wherein the frequency of the low-frequency clock is lower than the frequency of the reference clock.
[0037] Compared with the prior art, this application has the following beneficial effects:
[0038] The present application provides a voltage drop detection circuit and system. Whether the power supply voltage is normal can be determined by the first signal output by the timing violation detection module. The edge shaper can not only eliminate the burrs of the first signal and output the second signal, but also ensure that the response time of the subsequent voltage drop detection is shortened from more than 6 clock cycles to 1 clock cycle, that is, the early warning feedback module can output a corresponding early warning signal according to the second signal output by the edge shaper after 1 clock cycle. When the power supply voltage is lower than the voltage threshold, the early warning signal output by the early warning feedback module is a high level, so that the glitch-free clock switching circuit switches the operating frequency to a relatively low frequency, thereby ensuring that there is no timing violation at a low voltage. When the power supply voltage is normal, the early warning signal output by the early warning feedback module is a low level, so that the glitch-free clock switching circuit outputs a normal reference clock. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians of the art without making creative work are within the scope of protection of the present application.
[0040] Figure 1 One of the structural schematic diagrams of a voltage drop detection circuit provided in an embodiment of the present application;
[0041] Figure 2 A second structural diagram of a voltage drop detection circuit provided in an embodiment of the present application;
[0042] Figure 3 A signal timing diagram provided in an embodiment of the present application;
[0043] Figure 4A third structural diagram of a voltage drop detection circuit provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the structure of a voltage drop detection system provided in an embodiment of the present application.
[0045] Figure markings: 10-voltage drop detection circuit; 20-glitch-free clock switching circuit; 100-timing violation detection module; 110-first frequency division unit; 111-copy critical path module; 112-adjustable delay chain; 120-second frequency division unit; 200-edge shaper; 300-early warning feedback module; 310-counter module; 311-two-bit binary adder counter; U1-first trigger; U2-second trigger; U3-third trigger; U4-fourth trigger; U5-fifth trigger; U6-sixth trigger; U7-seventh trigger; U8-eighth trigger; X1-first XOR gate; X2-second XOR gate; X3-third XOR gate; X4-fourth XOR gate; N1-first inverter; N2-second inverter; N3-third inverter; N4-fourth inverter; A1-first AND gate; A2-second AND gate; A3-third AND gate; A4-fourth AND gate. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0047] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0048] In the description of this application, it should be noted that relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The term "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be directly connected or indirectly connected through an intermediate medium.
[0049] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0050] As mentioned in the background technology, in order to solve the harm caused by the drop of the power supply voltage (VDD), the existing technology generally adopts the following six solutions:
[0051] Solution 1: Apply VDD protection band. By setting VDD higher than the minimum VDD (VMIN) during testing. However, this requires pre-testing each chip to obtain VMIN. It is also necessary to consider the deviation between the test conditions and the worst application scenario and leave a margin, which greatly reduces the effectiveness. For the problem of a sharp drop in instantaneous voltage, it can only be achieved by raising the overall VDD and sacrificing overall power consumption.
[0052] Solution 2: Apply clock frequency (FCLK) guard band. By setting FCLK lower than the maximum FCLK (FMAX) during testing, correct function during VDD drop events is ensured. However, this method greatly limits the performance of the chip.
[0053] Solution 3: Resilient timing error detection and recovery circuits. By allowing VDD drops to cause critical path timing margins to fail, the errors are isolated to prevent them from corrupting the architectural state, and the errors are corrected through recovery techniques. While resilient circuits are very effective in reducing the impact of high-frequency VDD drops, the complexity of incorporating error recovery into the architectural design of high-performance processors and ensuring that all fault scenarios are covered remains a significant challenge.
[0054] Option 4: As an alternative to resilient design, a unique class of adaptive circuits is integrated with analog voltage mixer circuits. The challenge for this design is to ensure that the phase-locked loop (PLL) adjusts to a lower FCLK by reconfiguring as VDD drops to minimize delays and avoid timing margin failures that would otherwise result in a higher FCLK.
[0055] Solution 5: Active design. By predicting VDD drop events in advance and responding to these events to reduce VDD drop, the response time limitation is eliminated. However, these active designs depend on the execution of data flow, which requires highly complex calibration of the empirical parameters of the on-chip power estimator.
[0056] Solution 6: Adaptive circuit. The impact of VDD drop on performance is reduced by using an on-chip monitor to measure the VDD change and adjust the clock frequency (FCLK). However, this reactive design requires a certain response time to detect VDD drop and adjust FCLK to avoid failure of the timing margin of the critical path. Due to the use of comparators and precoding methods, the response time is usually more than 6 clock cycles, that is, the response time is the key challenge that limits the adaptive circuit to mitigate the impact of high-frequency VDD drop.
[0057] In summary, how to solve the problems existing in the prior art and shorten the response time of voltage drop detection is a technical problem that needs to be solved urgently by those skilled in the art.
[0058] In view of this, please refer to Figure 1 The embodiment of the present application provides a voltage drop detection circuit 10. The voltage drop detection circuit 10 includes a timing violation detection module 100, an edge shaper 200 and an early warning feedback module 300.
[0059] The input end of the timing violation detection module 100 is connected to the reference clock and the reset signal respectively, and the input end of the edge shaper 200 is also connected to the reference clock and the reset signal respectively. The output end of the timing violation detection module 100 is connected to the input end of the edge shaper 200, the output end of the edge shaper 200 is connected to the input end of the early warning feedback module 300, and the output end of the early warning feedback module 300 is connected to the glitch-free clock switching circuit.
[0060] The timing violation detection module 100 is used to output a stable first signal when the power supply voltage is normal, that is, the first signal may be always at a low level or always at a high level. The timing violation detection module 100 is also used to output a first signal whose level keeps jumping when the power supply voltage is lower than the voltage threshold, that is, the first signal at this time is unstable.
[0061] The edge shaper 200 is used to eliminate burrs from the first signal and output a second signal after one clock cycle. When the power supply voltage is normal, the second signal is at a low level. When the power supply voltage is lower than the voltage threshold, the second signal is still a signal with a continuously fluctuating level.
[0062] The early warning feedback module 300 is used to output a high-level early warning signal when receiving the rising edge of the second signal, so that the glitch-free clock switching circuit outputs a low-frequency clock, wherein the frequency of the low-frequency clock is lower than the frequency of the reference clock.
[0063] Based on the above design, the first signal output by the timing violation detection module 100 can be used to determine whether the power supply voltage is normal. The edge shaper 200 can not only eliminate the burrs on the first signal and output the second signal, but also ensure that the response time of the subsequent voltage drop detection is shortened from more than 6 clock cycles to 1 clock cycle, that is, the early warning feedback module 300 can output a corresponding early warning signal according to the second signal output by the edge shaper 200 after 1 clock cycle. When the power supply voltage is lower than the voltage threshold, the early warning signal output by the early warning feedback module 300 is a high level, so that the glitch-free clock switching circuit switches the operating frequency to a relatively low frequency, thereby ensuring that there is no timing violation under low voltage. When the power supply voltage is normal, the early warning signal output by the early warning feedback module 300 is a low level, so that the glitch-free clock switching circuit outputs a normal reference clock.
[0064] As a possible implementation, the timing violation detection module 100 includes a first frequency division unit 110 , a second frequency division unit 120 , and a first XOR gate X1 .
[0065] The input end of the first frequency dividing unit 110 and the input end of the second frequency dividing unit 120 are both used to receive the reference clock and the reset signal. The output end of the first frequency dividing unit 110 and the output end of the second frequency dividing unit 120 are respectively connected to the first input end and the second input end of the first XOR gate X1, and the output end of the first XOR gate X1 is connected to the input end of the edge shaper 200.
[0066] The first frequency division unit 110 is used to output a first frequency division signal corresponding to an actual critical path of the chip where the timing violation is ahead of the actual critical path of the chip.
[0067] The second frequency division unit 120 is used to output a second frequency division signal that is insensitive to changes in the power supply voltage. That is, the second frequency division signal is equivalent to a reference signal. If the first frequency division signal and the second frequency division signal are inconsistent, it means that the power supply voltage is lower than the voltage threshold. If the first frequency division signal and the second frequency division signal are the same, it means that the power supply voltage is normal.
[0068] It can be understood that the first signal is the signal after the first frequency-divided signal and the second frequency-divided signal are XORed. When the supply voltage is lower than the voltage threshold, the first frequency-divided signal and the second frequency-divided signal are inconsistent, resulting in the level of the first signal output by the first XOR gate X1 constantly jumping.
[0069] In addition, it should be noted that when the power supply voltage is normal, the first frequency-divided signal and the second frequency-divided signal may have the same frequency and the same phase, and the first frequency-divided signal and the second frequency-divided signal may also have the same frequency but opposite phases. Therefore, the first signal output by the first XOR gate X1 may always be at a low level or a high level, that is, the level of the first signal is stable.
[0070] In order to better understand the meaning of the first frequency division signal and the second frequency division signal, Figure 2 The first frequency dividing unit 110 and the second frequency dividing unit 120 are described.
[0071] As an optional implementation, the first frequency dividing unit 110 includes a first trigger U1 , a critical path replica module 111 , an adjustable delay chain 112 , and a first inverter N1 .
[0072] The clock terminal and the low-level reset terminal of the first trigger U1 are connected to the reference clock and the reset signal respectively, and the first trigger U1 is triggered by the rising edge of the clock. The output terminal of the first trigger U1 is connected to the input terminal of the replication critical path module 111 and the first input terminal of the first XOR gate X1 respectively. The output terminal of the replication critical path module 111 is connected to the input terminal of the adjustable delay chain 112, the output terminal of the adjustable delay chain 112 is connected to the input terminal of the first inverter N1, and the output terminal of the first inverter N1 is connected to the input terminal of the first trigger U1.
[0073] The critical path duplication module 111 is used to duplicate the actual critical path of the chip and generate a duplicate critical path to maintain the same timing margin, basic logic unit type and basic logic unit load as the actual critical path of the chip. In addition, the input signal of the critical path duplication module 111 is in phase with the output signal.
[0074] It should be noted that the purpose of setting the copy critical path module 111 is to ensure that the first frequency division unit 110 has the same timing performance as the actual path of the chip. However, in actual operation, due to the inconsistency of the path and load, under different process, voltage and temperature conditions, the copy critical path will have certain differences from the actual critical path of the chip.
[0075] In order to compensate for the difference between the copied critical path and the actual critical path of the chip, in the embodiment of the present application, an adjustable delay chain 112 is connected to the output end of the copied critical path module 111 to ensure that the copied critical path is completely consistent with the actual critical path of the chip.
[0076] In addition, the adjustable delay chain 112 can also set an adjustable voltage threshold and make the replica critical path generate timing violation before the actual critical path. That is, the first frequency division unit 110 corresponding to the replica critical path can generate timing violation before the actual critical path of the chip due to the reduction of power supply voltage, thereby providing early warning.
[0077] It should be noted that the voltage threshold generated by the adjustable delay chain 112 is not an absolute threshold, but an adjustable relative voltage advance.
[0078] In the embodiment of the present application, the replica critical path module 111, the adjustable delay chain 112, the first inverter N1 and the first trigger U1 form a two-frequency division circuit. When the circuit corresponding to the power supply voltage meets the timing requirements and there is no timing violation, the first frequency division unit 110 can output a two-frequency division signal of the corresponding clock.
[0079] As an optional implementation, the second frequency dividing unit 120 includes a second trigger U2 and a second inverter N2. The clock terminal and the low-level reset terminal of the second trigger U2 are connected to the reference clock and the reset signal respectively, and the second trigger U2 is triggered by the rising edge of the clock. The output terminal of the second trigger U2 is connected to the input terminal of the second inverter N2 and the second input terminal of the first XOR gate X1 respectively, and the output terminal of the second inverter N2 is connected to the input terminal of the second trigger U2.
[0080] It should be noted that since the path between the output end of the second trigger U2 and the input end of the second inverter N2 is very short, the second frequency-divided signal output by the second frequency-dividing unit 120 is not affected by the drop in the power supply voltage, that is, the second frequency-divided signal is a two-frequency-divided signal that is insensitive to changes in the power supply voltage.
[0081] See also Figure 3 , when the power supply voltage is normal, that is, before time t1, the actual critical path of the chip has no timing violation. At this time, the first frequency-divided signal and the second frequency-divided signal are both divided by two of the reference clock, and the first signal output by the first XOR gate X1 is at a low level. When the power supply voltage is lower than the threshold voltage, that is, after time t1, the first frequency-divided signal will have a timing violation, and the first frequency-divided signal at this time may be divided by four or eight of the reference clock. The second frequency-divided signal remains unchanged and is still divided by two of the reference clock. The level of the first signal output by the first XOR gate X1 keeps jumping, and the length of the level is 1 to 2 clock cycles.
[0082] In order to shorten the response time of voltage drop detection to 1 clock cycle, the present application processes the first signal through the edge shaper 200 and outputs the second signal. Figure 2 In the embodiment of the present application, the edge shaper 200 includes a third trigger U3, a fourth trigger U4 and a second XOR gate X2.
[0083] Among them, the clock ends of the third trigger U3 and the fourth trigger U4 are both used to receive the reference clock, the low-level reset ends of the third trigger U3 and the fourth trigger U4 are both used to receive the reset signal, and the third trigger U3 and the fourth trigger U4 are both triggered by the rising edge of the clock.
[0084] The output end of the timing violation detection module 100 is connected to the input end of the third trigger U3, the output end of the third trigger U3 is respectively connected to the input end of the fourth trigger U4 and the first input end of the second XOR gate X2, the output end of the fourth trigger U4 is connected to the second input end of the second XOR gate X2, and the output end of the second XOR gate X2 is connected to the input end of the early warning feedback module 300.
[0085] Combination Figure 2 and Figure 3 It can be understood that the signal output by the third trigger U3 lags behind the first signal by one clock cycle, and the signal output by the fourth trigger U4 connected in series with the third trigger U3 lags behind the first signal by two clock cycles. After the signal output by the third trigger U3 and the signal output by the fourth trigger U4 are processed by the second XOR gate X2, the obtained second signal lags behind the first signal by one clock cycle (i.e., t1 to t2). It is ensured that the second signal can trigger the early warning feedback module 300 one clock cycle after the critical path generates a timing violation, so that the early warning feedback module 300 outputs a high-level early warning signal.
[0086] To better understand the principle of the second signal triggering the early warning feedback module 300, please refer to Figure 2 In the embodiment of the present application, the early warning feedback module 300 includes a third inverter N3, a counter module 310 and a fifth trigger U5.
[0087] The output end of the edge shaper 200 is connected to the clock end of the fifth trigger U5 and the input end of the third inverter N3 respectively. The output end of the third inverter N3 is connected to the low level reset end of the counter module 310. The clock end of the counter module 310 is used to receive the reference clock. The output end of the counter module 310 is connected to the low level reset end of the fifth trigger U5. The fifth trigger U5 is triggered by the rising edge of the clock. The input end of the fifth trigger U5 is fixed at a high level. The output end of the fifth trigger U5 is connected to the enable end of the counter module 310 and the glitch-free clock switching circuit respectively.
[0088] Combine the following Figure 4 , the specific structure of the counter module 310 is described. In the embodiment of the present application, the counter module 310 includes a two-bit binary adder counter 311, a sixth trigger U6 and a fourth inverter N4.
[0089] The clock terminal of the two-bit binary adder counter 311 is connected to the reference clock, the low level reset terminal of the two-bit binary adder counter 311 is connected to the output terminal of the third inverter N3, the enable terminal of the two-bit binary adder counter 311 is connected to the output terminal of the fifth flip-flop U5, and the output terminal of the two-bit binary adder counter 311 is connected to the input terminal of the sixth flip-flop U6.
[0090] The clock terminal and the low level reset terminal of the sixth trigger U6 are connected to the reference clock and the reset signal respectively, and the sixth trigger U6 is triggered by the rising edge of the clock. The output terminal of the sixth trigger U6 is connected to the input terminal of the fourth inverter N4, and the output terminal of the fourth inverter N4 is connected to the low level reset terminal of the fifth trigger U5.
[0091] Optionally, the counter module 310 may further include a first AND gate A1 and a second AND gate A2. The first input terminal and the second input terminal of the first AND gate A1 are respectively connected to the reset signal and the output terminal of the third inverter N3. The output terminal of the first AND gate A1 is connected to the low level reset terminal of the two-bit binary adder counter 311. The first input terminal and the second input terminal of the second AND gate A2 are respectively connected to the reset signal and the output terminal of the fourth inverter N4, and the output terminal of the second AND gate A2 is connected to the low level reset terminal of the fifth trigger U5.
[0092] Based on the above design, when the supply voltage is lower than the voltage threshold, the level of the second signal output by the edge shaper 200 is constantly changing. The fifth trigger U5 outputs a high-level warning signal when receiving the rising edge of the second signal. Since the output end of the fifth trigger U5 is connected to the enable end of the two-bit binary adder counter 311, when the warning signal is at a high level, the two-bit binary adder counter 311 is enabled. Since the fourth signal processed by the third inverter N3 is inverted with the second signal, the fourth signal will continuously reset the value of the two-bit binary adder counter 311, resulting in the two-bit binary adder counter 311 being unable to count to the maximum value 3. That is, the signal output by the two-bit binary adder counter 311 is always at a low level, and becomes a high level after passing through the fourth inverter N4, that is, the fifth signal output by the counter module 310 is always at a high level.
[0093] When the critical path no longer has a timing violation due to voltage increase, the first signal will remain at a low level or a high level (when the voltage is restored, the phases of the first frequency-divided signal and the second frequency-divided signal may be just opposite, so the first signal may remain at a high level) and no longer jump. After being processed by the edge shaper 200, the second signal remains at a low level and the fourth signal remains at a high level, so that the two-bit binary adder counter 311 can work normally and count to 3, so that the counter module 310 outputs a low-level fifth signal.
[0094] Since the output end of the counter module 310 is connected to the low-level reset end of the fifth trigger U5, when the fifth signal is at a low level, the fifth trigger U5 is reset to a low level, thereby pulling the warning signal down to a low level, indicating that the voltage has recovered to a level where there is no circuit timing violation. Since the warning signal is an enable signal of the two-bit binary adder counter 311, once the warning signal is pulled down to a low level, the two-bit binary adder counter 311 will be turned off, and the fifth signal will be restored to a high level, thereby releasing the reset of the fifth trigger U5 and preparing for the next voltage drop detection.
[0095] As an optional implementation, the 2-bit binary adder counter 311 includes a seventh flip-flop U7, an eighth flip-flop U8, a third XOR gate X3, a fourth XOR gate X4, a third AND gate A3 and a fourth AND gate A4.
[0096] Among them, the clock ends of the seventh trigger U7 and the eighth trigger U8 are both used to receive the reference clock, the low level reset ends of the seventh trigger U7 and the eighth trigger U8 are both connected to the output end of the first AND gate A1, and the seventh trigger U7 and the eighth trigger U8 are both triggered by the rising edge of the clock.
[0097] The output end of the fifth flip-flop U5 is connected to the first input end of the third AND gate A3 and the first input end of the third XOR gate X3 respectively. The output end of the seventh flip-flop U7 is connected to the second input end of the third AND gate A3 and the second input end of the third XOR gate X3 respectively, and the output end of the third XOR gate X3 is connected to the input end of the seventh flip-flop U7.
[0098] The output end of the third AND gate A3 is connected to the first input end of the fourth AND gate A4 and the first input end of the fourth XOR gate X4 respectively. The output end of the eighth flip-flop U8 is connected to the second input end of the fourth AND gate A4 and the second input end of the fourth XOR gate X4 respectively, and the output end of the fourth XOR gate X4 is connected to the input end of the eighth flip-flop U8.
[0099] Also, see Figure 5 The embodiment of the present application further provides a voltage drop detection system. The voltage drop detection system includes a glitch-free clock switching circuit 20 and a voltage drop detection circuit 10 as described in any one of the above embodiments.
[0100] The output end of the voltage drop detection circuit 10 is connected to the input end of the glitch-free clock switching circuit 20 , and the voltage drop detection circuit 10 is used to send an early warning signal to the glitch-free clock switching circuit 20 .
[0101] When the warning signal is at a high level, the glitch-free clock switching circuit 20 outputs a low-frequency clock, wherein the low-frequency signal may be a clock obtained by processing the reference clock through a frequency divider circuit.
[0102] When the warning signal is at a low level, the glitch-free clock switching circuit 20 outputs a reference clock, wherein the frequency of the low-frequency clock is lower than the frequency of the reference clock.
[0103] In summary, the embodiment of the present application provides a voltage drop detection circuit and system. The voltage detection circuit does not rely on a comparator and an encoder, but uses the first signal as the clock signal of the fifth trigger and the reset signal of the counter module, and generates a signal representing that the voltage drops beyond the voltage threshold in a feedback manner. When one clock cycle is reached, it represents whether the voltage exceeds the voltage threshold, which greatly reduces the response time of the voltage drop detection. In addition, the fourth signal, the fifth signal and the early warning signal form a feedback mechanism to restore the early warning signal from a high level to a low level, avoiding the use of complex judgment and comparison circuits. After the voltage recovers to above the voltage threshold, the early warning signal self-recovers, forming a corresponding relationship between the voltage threshold and the early warning signal: when the supply voltage is lower than the voltage threshold, the early warning signal is pulled up to a high level. When the supply voltage rises back to within the voltage threshold, the early warning signal is pulled down to a low level.
[0104] The embodiments of the present application have no strict restrictions on the rate of voltage drop and the depth of voltage drop. As long as the second frequency division unit does not produce a timing violation and the voltage is still above the transistor threshold voltage, it can be characterized normally, avoiding restrictions on the voltage drop rate and the maximum processable voltage drop. At the same time, the voltage threshold characterized by the embodiments of the present application does not need to be specified in advance, and can dynamically follow the critical path of the chip with process, temperature, aging and other conditions to maintain an adjustable relative voltage difference, ensuring that a warning signal can be issued before a violation occurs in the critical path. The warning signal can be used to trigger functions such as operating frequency switching, operating state switching, and even voltage regulation.
[0105] In addition, since the voltage drop detection circuit provided in the embodiment of the present application does not use comparison logic, encoding logic, etc., and the voltage drop detection circuit of the present application is a pure digital circuit, it avoids complex analog comparator circuits and reduces the circuit area.
[0106] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0107] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A voltage drop detection circuit, characterized in that: The voltage drop detection circuit includes a timing violation detection module, an edge shaper and an early warning feedback module; The input end of the timing violation detection module is connected to the reference clock and the reset signal respectively, and the input end of the edge shaper is also connected to the reference clock and the reset signal respectively; the output end of the timing violation detection module is connected to the input end of the edge shaper, the output end of the edge shaper is connected to the input end of the early warning feedback module, and the output end of the early warning feedback module is connected to the glitch-free clock switching circuit; The timing violation detection module is used to output a stable first signal when the power supply voltage is normal; the timing violation detection module is also used to output a first signal with a continuously fluctuating level when the power supply voltage is lower than a voltage threshold; The edge shaper is used to eliminate burrs from the first signal and output a second signal after one clock cycle; wherein, when the power supply voltage is normal, the second signal is at a low level; The early warning feedback module is used to output a high-level early warning signal when receiving the rising edge of the second signal, so that the glitch-free clock switching circuit outputs a low-frequency clock; wherein the frequency of the low-frequency clock is lower than the frequency of the reference clock.
2. The voltage drop detection circuit according to claim 1, characterized in that: The timing violation detection module includes: a first frequency division unit, a second frequency division unit and a first XOR gate; The input end of the first frequency dividing unit and the input end of the second frequency dividing unit are both used to receive the reference clock and the reset signal, the output end of the first frequency dividing unit and the output end of the second frequency dividing unit are respectively connected to the first input end and the second input end of the first XOR gate, and the output end of the first XOR gate is connected to the input end of the edge shaper; The first frequency division unit is used to output a first frequency division signal corresponding to an actual critical path of the chip in advance of the timing violation; The second frequency division unit is used to output a second frequency division signal that is insensitive to changes in the power supply voltage.
3. The voltage drop detection circuit according to claim 2, characterized in that: The first frequency division unit includes: a first trigger, a copy critical path module, an adjustable delay chain, and a first inverter; The clock end and the low-level reset end of the first trigger are connected to the reference clock and the reset signal respectively, and the first trigger is triggered by the rising edge of the clock; the output end of the first trigger is connected to the input end of the copy critical path module and the first input end of the first XOR gate respectively, the output end of the copy critical path module is connected to the input end of the adjustable delay chain, the output end of the adjustable delay chain is connected to the input end of the first inverter, and the output end of the first inverter is connected to the input end of the first trigger; The copy critical path module is used to copy the actual critical path of the chip and generate a copy critical path; wherein the input signal and the output signal of the copy critical path module are in phase; The adjustable delay chain is used to compensate for the difference between the replica critical path and the actual critical path of the chip; the adjustable delay chain is also used to set an adjustable voltage threshold so that the replica critical path generates a timing violation before the actual critical path of the chip.
4. The voltage drop detection circuit according to claim 2, characterized in that: The second frequency dividing unit includes a second trigger and a second inverter; The clock terminal and the low-level reset terminal of the second trigger are respectively connected to the reference clock and the reset signal, and the second trigger is triggered by the rising edge of the clock; The output end of the second trigger is connected to the input end of the second inverter and the second input end of the first XOR gate respectively, and the output end of the second inverter is connected to the input end of the second trigger.
5. The voltage drop detection circuit according to claim 1, characterized in that: The edge shaper includes a third flip-flop, a fourth flip-flop, and a second XOR gate; The clock ends of the third trigger and the fourth trigger are both used to receive the reference clock, the low-level reset ends of the third trigger and the fourth trigger are both used to receive the reset signal, and the third trigger and the fourth trigger are both triggered by the rising edge of the clock; the output end of the timing violation detection module is connected to the input end of the third trigger, the output end of the third trigger is respectively connected to the input end of the fourth trigger and the first input end of the second XOR gate, the output end of the fourth trigger is connected to the second input end of the second XOR gate, and the output end of the second XOR gate is connected to the input end of the early warning feedback module.
6. The voltage drop detection circuit according to claim 1, characterized in that: The early warning feedback module includes a third inverter, a counter module and a fifth trigger; The output end of the edge shaper is respectively connected to the clock end of the fifth trigger and the input end of the third inverter; the output end of the third inverter is connected to the low level reset end of the counter module, and the output end of the counter module is connected to the low level reset end of the fifth trigger; the fifth trigger is triggered by the rising edge of the clock, the input end of the fifth trigger is fixed at a high level, and the output end of the fifth trigger is respectively connected to the enable end of the counter module and the glitch-free clock switching circuit.
7. The voltage drop detection circuit according to claim 6, characterized in that: The counter module includes a two-bit binary adder counter, a sixth trigger and a fourth inverter; The clock terminal of the two-bit binary adder is connected to the reference clock, the low level reset terminal of the two-bit binary adder is connected to the output terminal of the third inverter, the enable terminal of the two-bit binary adder is connected to the output terminal of the fifth flip-flop, and the output terminal of the two-bit binary adder is connected to the input terminal of the sixth flip-flop; The clock terminal and the low-level reset terminal of the sixth trigger are connected to the reference clock and the reset signal respectively, and the sixth trigger is triggered by the rising edge of the clock; The output terminal of the sixth trigger is connected to the input terminal of the fourth inverter, and the output terminal of the fourth inverter is connected to the low level reset terminal of the fifth trigger.
8. The voltage drop detection circuit according to claim 7, characterized in that: The counter module also includes a first AND gate and a second AND gate; The first input terminal and the second input terminal of the first AND gate are connected to the reset signal and the output terminal of the third inverter respectively, and the output terminal of the first AND gate is connected to the low level reset terminal of the two-bit binary adder counter; The first input terminal and the second input terminal of the second AND gate are connected to the reset signal and the output terminal of the fourth inverter respectively, and the output terminal of the second AND gate is connected to the low level reset terminal of the fifth trigger.
9. The voltage drop detection circuit according to claim 8, characterized in that: The two-bit binary adder counter comprises a seventh trigger, an eighth trigger, a third XOR gate, a fourth XOR gate, a third AND gate and a fourth AND gate; The clock terminals of the seventh flip-flop and the eighth flip-flop are both used to receive the reference clock, the low-level reset terminals of the seventh flip-flop and the eighth flip-flop are both connected to the output terminal of the first AND gate, and the seventh flip-flop and the eighth flip-flop are both triggered by the rising edge of the clock; The output end of the fifth trigger is connected to the first input end of the third AND gate and the first input end of the third XOR gate respectively; the output end of the seventh trigger is connected to the second input end of the third AND gate and the second input end of the third XOR gate respectively, and the output end of the third XOR gate is connected to the input end of the seventh trigger; The output end of the third AND gate is connected to the first input end of the fourth AND gate and the first input end of the fourth XOR gate respectively; the output end of the eighth trigger is connected to the second input end of the fourth AND gate and the second input end of the fourth XOR gate respectively, and the output end of the fourth XOR gate is connected to the input end of the eighth trigger.
10. A voltage drop detection system, characterized in that: The voltage drop detection system comprises a glitch-free clock switching circuit and a voltage drop detection circuit according to any one of claims 1 to 9, wherein an output end of the voltage drop detection circuit is connected to an input end of the glitch-free clock switching circuit, and the voltage drop detection circuit is used to send an early warning signal to the glitch-free clock switching circuit; When the early warning signal is at a high level, the glitch-free clock switching circuit outputs a low-frequency clock; When the early warning signal is at a low level, the glitch-free clock switching circuit outputs a reference clock; wherein the frequency of the low-frequency clock is lower than the frequency of the reference clock.
