Timeout monitoring circuit and chip
By designing a timeout monitoring circuit in the chip and using a normally-on slow clock and a state controller to monitor the low-power mode in real time, the problem of timeout monitoring failure in the low-power mode is solved, the hardware cost is reduced and the monitoring performance is improved.
Patent Information
- Application Number
- CN202410898731.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-05
AI Technical Summary
In complex and harsh chip application scenarios, in commonly used low-power modes, the system clock is turned off, causing watchdog timeout monitoring to fail, which may lead to misjudgment of timeouts or the need to add an external watchdog, increasing hardware costs.
A timeout monitoring circuit is designed, including a normally open slow clock, a state controller and an entry/exit timeout monitoring module. It is triggered by the system's low power consumption request signal and monitors the chip's entry/exit into the low power consumption mode in real time to avoid timeout reset signals. latency, reducing hardware costs.
It realizes timeout monitoring of normal operation in low-power mode, reduces hardware costs, avoids misjudgments of watchdog timeouts, and improves the real-time performance and performance of monitoring.
Smart Images

Figure CN118425749B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip technology, and in particular to a timeout monitoring circuit and a chip. Background Art
[0002] In general integrated circuit chip systems, there are often multiple different built-in LDO (Low Dropout Regulaor, low voltage difference linear regulator) power supplies. In order to achieve lower power consumption indicators, different low power modes (including power-down mode and non-power-down mode) are often defined according to different power consumption application scenarios. When facing complex and harsh chip application scenarios, unexpected power supply interference, jitter, temperature change, electromagnetic noise interference, etc. are often encountered during the process of entering and exiting the commonly used low power consumption mode, resulting in abnormal chip execution.
[0003] To this end, the related technology generally uses a built-in normally open watchdog to intervene in advance through software. Before entering the low power mode, a maximum preset timeout time is set in advance, and the software turns on the built-in watchdog. After the preset timeout time is reached, a timeout reset signal is generated to reset the entire chip system. However, this technology has the following problems:
[0004] 1) Common system watchdog timeout monitoring requires regular dog feeding operations. In low power mode, such dog feeding operations cannot be performed because the system clock is generally turned off;
[0005] 2) It is impossible to turn on the watchdog's timeout monitoring function in real time according to the randomly generated system low-power entry signal, which may lead to misjudgment of the watchdog timeout;
[0006] 3) Some chips require an external watchdog to be added to the chip to monitor the working status of the chip power supply in real time to prevent abnormal stuck timeout problems caused by accidental power failure of the chip power supply. However, the disadvantage of this method of adding an external watchdog to the chip is that it will greatly increase the user's additional hardware cost. Summary of the invention
[0007] The present invention aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the first object of the present invention is to provide a timeout monitoring circuit to achieve normal operation in a low power consumption mode, reduce hardware costs, and achieve real-time monitoring.
[0008] The second objective of the present invention is to provide a chip.
[0009] To achieve the above-mentioned purpose, the first aspect of the present invention proposes a timeout monitoring circuit, comprising: a normally open slow clock, a state controller, an entry timeout monitoring module and a reset module; wherein the state controller is used to output a low-power entry counter enable signal to the entry timeout monitoring module after receiving a system low-power request signal, and output a low-power entry success signal to the entry timeout monitoring module when detecting that the chip enters the low-power mode successfully; the entry timeout monitoring module is used to start timing when receiving the low-power entry counter enable signal, obtain a first timing time, and when the first timing time is greater than or equal to the low-power monitoring preset time and the low-power entry success signal is not received, output an entry timeout monitoring reset signal to the reset module; the reset module is used to output a timeout monitoring reset signal to reset the chip when receiving the entry timeout monitoring reset signal; the normally open slow clock is used to provide working clocks for the state controller and the entry timeout monitoring module respectively.
[0010] In addition, the timeout monitoring circuit according to the embodiment of the present invention may also have the following additional technical features:
[0011] According to one embodiment of the present invention, the timeout monitoring circuit also includes: an exit timeout monitoring module; wherein the state controller is further used to output a low-power exit counter enable signal to the exit timeout monitoring module when receiving a system low-power wake-up signal, and output a low-power exit success signal to the exit timeout monitoring module when detecting that the chip successfully exits the low-power mode; the exit timeout monitoring module is used to start timing when receiving the low-power exit counter enable signal to obtain a second timing time, and when the second timing time is greater than or equal to the exit low-power monitoring preset time and the low-power exit success signal is not received, output an exit timeout monitoring reset signal to the reset module; the reset module is also used to output the timeout monitoring reset signal to reset the chip when receiving the exit timeout monitoring reset signal; the normally open slow clock is also used to provide a working clock for the exit timeout monitoring module.
[0012] According to one embodiment of the present invention, the entry timeout monitoring module includes: an entry low power consumption monitoring counter and a first comparator; wherein the entry low power consumption monitoring counter is respectively connected to the normally open slow clock, the state controller and the first comparator, and is used to start timing when receiving the low power consumption entry counter enable signal, obtain the first timing time, and output the first timing time to the first comparator, and clear the first timing time when receiving the low power consumption entry success signal; the first comparator is also connected to the reset module, and is used to compare the first timing time with the entry low power consumption monitoring preset time, and when the first timing time is greater than or equal to the entry low power consumption monitoring preset time, output the entry timeout monitoring reset signal to the reset module.
[0013] According to one embodiment of the present invention, the exit timeout monitoring module includes: an exit low power monitoring counter and a second comparator; wherein the exit low power monitoring counter is respectively connected to the normally open slow clock, the state controller and the second comparator, and is used to start timing when receiving the low power exit counter enable signal, obtain the second timing time, and output the second timing time to the second comparator, and clear the second timing time when receiving the low power exit success signal; the second comparator is also connected to the reset module, and is used to compare the second timing time with the exit low power monitoring preset time, and when the second timing time is greater than or equal to the exit low power monitoring preset time, output the exit timeout monitoring reset signal to the reset module.
[0014] According to an embodiment of the present invention, when a system power-on reset signal is received, the timeout monitoring reset signal is output.
[0015] According to one embodiment of the present invention, the reset module is also used to: output the timeout monitoring reset signal to the state controller, the entry timeout monitoring module and the exit timeout monitoring module respectively, so as to reset the state controller, the entry timeout monitoring module and the exit timeout monitoring module.
[0016] According to one embodiment of the present invention, the entry timeout monitoring module is also connected to the system bus of the chip so as to configure the preset time for entering low power consumption monitoring and configure the entry low power consumption monitoring enable signal through the system bus; wherein, the entry timeout monitoring module performs timeout monitoring when the entry low power consumption monitoring enable signal is valid.
[0017] According to one embodiment of the present invention, the exit timeout monitoring module is also connected to the system bus of the chip so as to configure the exit low power consumption monitoring preset time and the exit low power consumption monitoring enable signal through the system bus; wherein, the exit timeout monitoring module performs timeout monitoring when the exit low power consumption monitoring enable signal is valid.
[0018] According to one embodiment of the present invention, the reset module includes: a three-input OR gate, wherein three input terminals of the three-input OR gate are respectively used to receive the entry timeout monitoring reset signal, the exit timeout monitoring reset signal and the system power-on reset signal.
[0019] To achieve the above object, a second embodiment of the present invention provides a chip, including: the above timeout monitoring circuit.
[0020] According to the timeout monitoring circuit and chip of the embodiment of the present invention, it includes: a normally open slow clock, a state controller, an entry timeout monitoring module and a reset module; wherein the state controller is used to output a low-power entry counter enable signal to the entry timeout monitoring module after receiving a system low-power request signal, and output a low-power entry success signal to the entry timeout monitoring module when detecting that the chip enters the low-power mode successfully; the entry timeout monitoring module is used to start timing when receiving the low-power entry counter enable signal, obtain a first timing time, and when the first timing time is greater than or equal to the entry low-power monitoring preset time, and the low-power entry success signal is not received, output an entry timeout monitoring reset signal to the reset module; the reset module is used to output a timeout monitoring reset signal to reset the chip when receiving the entry timeout monitoring reset signal; the normally open slow clock is used to provide a working clock for the state controller and the entry timeout monitoring module respectively. By setting the above-mentioned timeout monitoring circuit that does not require the use of a watchdog, normal operation can be achieved in low-power mode, and hardware costs can be reduced at the same time. Furthermore, since the above-mentioned timeout monitoring circuit only needs to be triggered by a system low-power request signal to perform monitoring, it can respond to randomly generated system low-power entry signals, realize real-time monitoring, and have better performance.
[0021] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a structural block diagram of a timeout monitoring circuit according to an embodiment of the present invention;
[0023] Figure 2 is a structural block diagram of a timeout monitoring circuit according to an embodiment of the present invention;
[0024] Figure 3is a schematic diagram of the structure of a timeout monitoring circuit according to an embodiment of the present invention;
[0025] Figure 4 is a schematic structural diagram of a timeout monitoring circuit according to another embodiment of the present invention;
[0026] Figure 5 is a schematic structural diagram of a timeout monitoring circuit according to another embodiment of the present invention;
[0027] Figure 6 is a waveform diagram of a timeout monitoring circuit according to an example of the present invention;
[0028] Figure 7 is a waveform diagram of a timeout monitoring circuit according to another example of the present invention;
[0029] Figure 8 is a waveform diagram of a timeout monitoring circuit according to another example of the present invention;
[0030] Fig. 9 is a waveform diagram of a timeout monitoring circuit according to another example of the present invention;
[0031] Fig.10 It is a structural block diagram of a chip according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0033] The timeout monitoring circuit and chip according to the embodiments of the present invention are described below with reference to the accompanying drawings.
[0034] Figure 1 4 is a structural block diagram of a timeout monitoring circuit according to an embodiment of the present invention.
[0035] like Figure 1As shown, the timeout monitoring circuit 10 includes: a normally open slow clock 100, a state controller 200, an entry timeout monitoring module 300 and a reset module 400; wherein the state controller 200 is used to output a low power entry counter enable signal to the entry timeout monitoring module 300 after receiving a system low power request signal, and output a low power entry success signal to the entry timeout monitoring module 300 when detecting that the chip enters the low power mode successfully; the entry timeout monitoring module 300 is used to start timing when receiving the low power entry counter enable signal to obtain a first timing time, and when the first timing time is greater than or equal to the low power monitoring preset time and the low power entry success signal is not received, output an entry timeout monitoring reset signal to the reset module 400; the reset module 400 is used to output a timeout monitoring reset signal to reset the chip when receiving the entry timeout monitoring reset signal; the normally open slow clock 100 is used to provide a working clock for the state controller 200 and the entry timeout monitoring module 300 respectively.
[0036] Specifically, since the maximum time required for the chip to enter the low power mode is known, in order to avoid the problems existing in the related art using a built-in normally-on watchdog, a timeout monitoring circuit 10 as described above is set up, including a normally-on slow clock 100, a state controller 200, a timeout monitoring module 300 and a reset module 400.
[0037] The normally open slow clock 100 is a normally open slow clock for generating a clock signal. The above-mentioned entry timeout monitoring module 300 can be configured in advance to be turned on or off, and the entry timeout monitoring module 300 is actually started by following the low power entry counter enable signal generated inside the state controller 200.
[0038] When the chip needs to enter the low power mode, a system low power request signal is sent to the state controller 200. After receiving the system low power request signal, the state controller 200 determines that the chip needs to enter the low power mode, and then sends a low power entry counter enable signal to the entry timeout monitoring module 300 to enable the entry timeout monitoring module 300 to start timing.
[0039] When the state controller 200 detects that the chip enters the low power mode, the state controller 200 outputs a low power entry success signal to the entry timeout monitoring module 300. The entry timeout monitoring module 300 stops timing when receiving the low power entry success signal.
[0040] That is to say, if the chip enters the low power mode abnormally due to a fault or other reasons, the state controller 200 will not generate or delay the low power entry success signal after generating the low power entry counter enable signal, that is, the state controller 200 will not control or delay the control entry timeout monitoring module 300 to stop timing after the control entry timeout monitoring module 300 starts timing.
[0041] Therefore, if the first timing time obtained by entering the timeout monitoring module 300 is greater than or equal to the predicted time for entering the low power consumption monitoring, and no low power consumption entry success signal is received, it means that an abnormality occurs when the chip enters the low power consumption mode. At this time, the timeout monitoring module 300 will output an entry timeout monitoring reset signal to the reset module 400, so that the reset module 400 outputs a timeout monitoring reset signal. This signal will reset the chip, thereby avoiding the continued impact of the abnormality of entering the low power consumption mode on the chip.
[0042] Therefore, by setting the above-mentioned timeout monitoring circuit 10 that does not require the use of a watchdog, normal operation can be achieved in low-power mode, and the hardware cost can be reduced. In addition, since the above-mentioned timeout monitoring circuit 10 only needs to be triggered by the system low-power request signal to perform monitoring, it can respond to randomly generated system low-power entry signals, and monitor in real time, with better performance.
[0043] In some embodiments of the present invention, see Figure 2 The timeout monitoring circuit 10 also includes: an exit timeout monitoring module 500; wherein the state controller 200 is also used to output a low-power exit counter enable signal to the exit timeout monitoring module 500 when receiving a system low-power wake-up signal, and output a low-power exit success signal to the exit timeout monitoring module 500 when detecting that the chip exits the low-power mode successfully; the exit timeout monitoring module 500 is used to start timing when receiving the low-power exit counter enable signal, obtain a second timing time, and when the second timing time is greater than or equal to the exit low-power monitoring preset time and the low-power exit success signal is not received, output an exit timeout monitoring reset signal to the reset module 400; the reset module 400 is also used to output a timeout monitoring reset signal when receiving the exit timeout monitoring reset signal, so as to reset the chip through the signal; the normally open slow clock 100 is also used to provide a working clock for the exit timeout monitoring module 500.
[0044] The above-mentioned exit timeout monitoring module 500 can be configured in advance to be turned on or off, and the actual start of the exit timeout monitoring module 500 is to follow the low power exit counter enable signal generated inside the state controller 200.
[0045] Specifically, when the maximum time required for the chip to exit the low power mode is known, in order to avoid the problems existing in the related art using a built-in normally-on watchdog, the above-mentioned timeout monitoring circuit 10 is set, including a state controller 200, a normally-on slow clock 100, a reset module 400, and an exit timeout monitoring module 500.
[0046] When the chip needs to exit the low power mode, a system low power wake-up signal is sent to the state controller 200 . After receiving the system low power wake-up signal, the state controller 200 outputs a low power exit counter enable signal to the exit timeout monitoring module 500 .
[0047] After receiving the low power consumption exit counter enable signal, the exit timeout monitoring module 500 starts timing.
[0048] When the state controller 200 detects that the chip exits the low power mode, the state controller 200 outputs a low power exit success signal to the exit timeout monitoring module 500. The exit timeout monitoring module 500 stops timing when receiving the low power exit success signal.
[0049] That is to say, if the chip exits the low power mode abnormally due to a fault or other reasons, the state controller 200 will not generate or delay the low power exit success signal after generating the low power exit counter enable signal, that is, the state controller 200 will not control or delay the control exit monitoring module to stop timing after the control exit timeout monitoring module 500 starts timing.
[0050] If the second timing time obtained by the exit timeout monitoring module 500 is greater than or equal to the predicted time for exiting the low power consumption monitoring, and no low power consumption exit success signal is received, it indicates that an abnormality occurs when the chip exits the low power consumption mode. At this time, the exit timeout monitoring module 500 will output an exit timeout monitoring reset signal to the reset module 400, so that the reset module 400 outputs a timeout monitoring reset signal, and resets the chip through the signal, thereby avoiding the continued impact of the abnormality in exiting the low power consumption mode on the chip.
[0051] In some embodiments of the present invention, see Figure 3, the entry timeout monitoring module 300 includes: an entry low power monitoring counter 301 and a first comparator 302; wherein the entry low power monitoring counter 301 is connected to the normally open slow clock 100, the state controller 200 and the first comparator 302 respectively, and is used to start timing when receiving a low power entry counter enable signal, obtain a first timing time, and output the first timing time to the first comparator 302, and clear the first timing time when receiving a low power entry success signal; the first comparator 302 is also connected to the reset module 400, and is used to compare the first timing time with the low power monitoring preset time, and when the first timing time is greater than or equal to the low power monitoring preset time, output an entry timeout monitoring reset signal to the reset module 400.
[0052] The state controller 200 is provided with a CLK1 interface for receiving a working clock provided by the normally-on slow clock 100 .
[0053] The low power consumption monitoring counter 301 is provided with a CLK2 interface, a SET1 interface, a CLR1 interface and a Q1 interface. The CLK2 interface is connected to the output port of the normally open slow clock 100, and is used to receive the working clock provided by the normally open slow clock 100. The SET1 interface is connected to the first output port of the state controller 200, and is used to receive the in1 signal output by the state controller 200, and the in1 signal is the above-mentioned low power consumption entry counter enable signal. The CLR1 interface is connected to the second output port of the state controller 200, and is used to receive the in2 signal output by the state controller 200, and the in2 signal is the above-mentioned low power consumption entry success signal. The Q1 interface is the output port of the low power consumption monitoring counter 301, and is used to output the first timing result. The reset module 400 is provided with a POR port, and a POR signal is output through the POR port, and the POR signal is the above-mentioned timeout monitoring reset signal.
[0054] Specifically, in order to achieve real-time and accurate judgment on whether a fault occurs when the chip enters the low power consumption mode, an entry timeout monitoring module 300 is set to include an entry low power consumption monitoring counter 301 and a first comparator 302. The entry timeout monitoring module 300 performs timing when receiving a low power consumption entry technology enable signal, and provides the first timing result obtained to the first comparator 302 in real time, so that the first comparator 302 outputs an entry timeout monitoring reset signal to the reset module 400 when the first timing result is greater than or equal to the preset time for entering the low power consumption monitoring.
[0055] exist Figure 3A first memory 303 is also provided, in which the above-mentioned preset time for entering low power consumption monitoring is stored. The first comparator 302 obtains the preset time for entering low power consumption monitoring through the first memory 303, and uses it as VAL1, and obtains the first timing result, and uses it as VAL2, so as to compare the size relationship between VAL2 and VAL1. When VAL2≥VAL1, the Out1 signal is output to the reset module 400, and the Out1 signal is the above-mentioned reset signal for entering timeout monitoring.
[0056] It should be noted that Figure 3 This is only a specific embodiment. In actual applications, the storage of the preset time for entering low power consumption monitoring is not limited to this. For example, the preset time for entering low power consumption monitoring can be stored in devices such as the first comparator 302 and the low power consumption monitoring counter 301.
[0057] The low power consumption monitoring counter 301 is also provided with an EN1 interface, through which the user can configure whether the low power consumption monitoring counter 301 is started, and the configuration can be performed by software or hardware. Figure 3 In the specific embodiment shown, a low power consumption monitoring preset enable module 304 is set, and the user can configure the signal output by the low power consumption monitoring preset enable module 304. When the user configures the low power consumption monitoring preset enable module 304 to output a high level signal, the low power consumption monitoring counter 301 is started, and the timing is started after receiving the low power consumption entry counter enable signal.
[0058] Since the first comparator 302 can track the dynamically changing first timing result in real time, and react immediately when the first timing result is greater than or equal to the preset time for entering low power monitoring, real-time response is achieved and efficiency is improved. Moreover, by using the first comparator 302 to directly compare the size relationship between the first timing result and the preset time for entering low power monitoring, it is possible to accurately determine whether the dynamically changing first timing result is greater than or equal to the preset time for entering low power monitoring, thereby achieving accurate judgment. In addition, it is only necessary to design the low power monitoring counter 301 and the first comparator 302, and then set a storage device for storing the preset time for low power monitoring, thereby simplifying the logic design, and only the stored preset time for low power monitoring needs to be adjusted to change the comparison condition, and flexible configuration can be achieved.
[0059] Moreover, the low power consumption monitoring counter 301 is configured to reset the first timing time when receiving a low power consumption entry success signal, thereby avoiding the problem in related technologies that methods such as watchdogs require additional software settings to achieve reset, thereby reducing software overhead.
[0060] In some embodiments of the present invention, see Figure 4 The exit timeout monitoring module 500 includes: an exit low power monitoring counter 501 and a second comparator 502; wherein the exit low power monitoring counter 501 is respectively connected to the normally open slow clock 100, the state controller 200 and the second comparator 502, and is used to start timing when receiving a low power exit counter enable signal, obtain a second timing time, and output the second timing time to the second comparator 502, and clear the second timing time when receiving a low power exit success signal; the second comparator 502 is also connected to the reset module 400, and is used to compare the second timing time with the exit low power monitoring preset time, and when the second timing time is greater than or equal to the exit low power monitoring preset time, output an exit timeout monitoring reset signal to the reset module 400.
[0061] The exit low power consumption monitoring counter 501 is provided with a CLK3 interface, a SET2 interface, a CLR2 interface and a Q2 interface. The CLK3 interface is connected to the output port of the normally open slow clock 100, and is used to receive the working clock provided by the normally open slow clock 100. The SET1 interface is connected to the third output port of the state controller 200, and is used to receive the in3 signal output by the state controller 200, and the in3 signal is the above-mentioned low power consumption exit counter enable signal. The CLR2 interface is connected to the fourth output port of the state controller 200, and is used to receive the in4 signal output by the state controller 200, and the in4 signal is the above-mentioned low power consumption exit success signal. The Q2 interface is the output port of the exit low power consumption monitoring counter 501, and is used to output the second timing result.
[0062] Specifically, in order to realize real-time and accurate judgment on whether a fault occurs when the chip exits the low power consumption mode, an exit timeout monitoring module 500 is set to include an exit low power consumption monitoring counter 501 and a second comparator 502. The exit timeout monitoring module 500 performs timing when receiving a low power consumption exit technology enable signal, and provides the obtained second timing result to the second comparator 502 in real time, so that the second comparator 502 outputs an exit timeout monitoring reset signal to the reset module 400 when the second timing result is greater than or equal to the preset time for exiting the low power consumption monitoring.
[0063] exist Figure 4 A second memory 503 is also provided, in which the above-mentioned preset time for exiting low power consumption monitoring is stored. The second comparator 502 obtains the preset time for exiting low power consumption monitoring through the second memory 503, and uses it as VAL3, and obtains the second timing result, and uses it as VAL4, so as to compare the size relationship between VAL3 and VAL4. When VAL4≥VAL3, the Out2 signal is output to the reset module 400, and the Out2 signal is the above-mentioned exit timeout monitoring reset signal.
[0064] It should be noted that Figure 4 This is only a specific embodiment. In actual applications, the storage of the preset time for exiting low power consumption monitoring is not limited to this. For example, the preset time for exiting low power consumption monitoring can be stored in devices such as the second comparator 502 and the low power consumption monitoring counter 501.
[0065] The exit low power consumption monitoring counter 501 is also provided with an EN2 interface, through which the user can configure whether the exit low power consumption monitoring counter 501 is started, and the configuration can be executed by software or hardware. Figure 4 In the specific embodiment shown, a low power consumption monitoring preset enable module 504 is set up, and the user can configure the signal output by the low power consumption monitoring preset enable module 504. When the user configures the low power consumption monitoring preset enable module 504 to output a high level signal, the low power consumption monitoring counter 501 is started, and the timing is started after receiving the low power consumption exit counter enable signal.
[0066] As can be seen from the above description of the entry timeout monitoring module 300, setting the above exit timeout monitoring module 500 can achieve real-time response, improve efficiency, achieve accurate judgment, simplify logic design, flexibly change configuration, and reduce software overhead.
[0067] In some embodiments of the present invention, the reset module 400 is further configured to: output a timeout monitoring reset signal when receiving a system power-on reset signal. The reset can be performed when the power-on reset signal is set to pulse (high level).
[0068] Therefore, by outputting a timeout monitoring reset signal when receiving a system power-on reset signal, it is ensured that when a device using the above-mentioned timeout monitoring circuit 10 is powered on, the chip is restored to a known initial state, thereby ensuring that no unpredictable errors occur during the startup process of the device, thereby ensuring stable operation of the device.
[0069] In some embodiments of the present invention, the reset module 400 is further used to: output a timeout monitoring reset signal to the state controller 200, the entry timeout monitoring module 300, and the exit timeout monitoring module 500, respectively, to reset the state controller 200, the entry timeout monitoring module 300, and the exit timeout monitoring module 500. The above-mentioned reset of the state controller 200, the entry timeout monitoring module 300, and the exit timeout monitoring module 500 can be performed after exiting the low power consumption mode.
[0070] Specifically, an RST1 interface is set on the state controller 200, an RST2 interface is set on the entry timeout monitoring module 300, and an RST3 interface is set on the exit timeout monitoring module 500. The above RST1 interface, RST2 interface, and RST3 interface are all used to receive the POR signal output by the POR port of the reset module 400, and the POR signal is the above-mentioned timeout monitoring reset signal.
[0071] In some embodiments of the present invention, the entry timeout monitoring module 300 is also connected to the system bus of the chip to configure the preset time for entering low power consumption monitoring and configure the entry low power consumption monitoring enable signal through the system bus; wherein, the entry timeout monitoring module 300 performs timeout monitoring when the entry low power consumption monitoring enable signal is valid.
[0072] In some embodiments of the present invention, the exit timeout monitoring module 500 is also connected to the system bus of the chip to configure the preset time for exiting low-power monitoring and configure the exit low-power monitoring enable signal through the system bus; wherein, the exit timeout monitoring module 500 performs timeout monitoring when the exit low-power monitoring enable signal is valid.
[0073] In some embodiments of the present invention, see Figure 5 , the reset module 400 includes: a three-input OR gate, the three input ends of the three-input OR gate are used to receive the entry timeout monitoring reset signal, the exit timeout monitoring reset signal and the system power-on reset signal respectively. That is, when VAL2≥VAL1, the first comparator 302 outputs a high level signal, and when VAL4≥VAL3, the second comparator 502 outputs a high level signal, and as long as there is a high level signal among the entry timeout monitoring reset signal, the exit timeout monitoring reset signal and the system power-on reset signal, the POR signal output by the POR port of the reset module 400 is a high level signal, driving the reset.
[0074] Figure 5 This is only a specific embodiment. Optionally, the reset module 400 can also be set to include a three-input AND gate. In this case, when VAL2≥VAL1, the first comparator 302 outputs a low level signal, and when VAL4≥VAL3, the second comparator 502 outputs a low level signal. As long as there is a low level signal among the three signals of entering the timeout monitoring reset signal, exiting the timeout monitoring reset signal, and the system power-on reset signal, the POR signal output by the POR port of the reset module 400 is a low level signal, driving the reset.
[0075] Combine the following Figure 5 The system is applied to the specific embodiment shown in FIG. Figure 5 The system of the timeout monitoring circuit 10 shown in FIG. 1 is a system including an application Figure 5The timeout monitoring circuit 10 is a system on a chip.
[0076] The entire timeout monitoring circuit 10 has three inputs, which are the system low power request signal, system low power wake-up signal, and system power-on reset signal from the chip; one output is the timeout monitoring reset signal (high level pulse indicates reset) output by the POR port, which resets the entire core circuit logic and the entire system. The RST reset port inside the entire circuit all comes from the POR signal output by the reset module 400. The system bus is used to configure some basic preset times and preset enables in advance.
[0077] The normally open slow clock 100 is required to work in any low power mode. Its output will be connected to the clock CLK terminal appearing inside all timeout monitoring circuits 10, including CLK1 of the state controller 200, entering the CLK2 terminal of the low power monitoring counter 301, and exiting the CLK3 terminal of the low power monitoring counter 501.
[0078] The state controller 200 can generate four different output signals for the timeout monitoring modules at different stages according to the system low power request signal and the system low power wake-up signal, which are low power entry counter enable signal (high level indicates that the counter starts counting), low power entry success signal, low power exit counter enable signal (high level indicates that the counter starts counting), and low power exit success signal. They can accurately and automatically control the timeout monitoring circuit 10 at different low power mode entry and exit stages.
[0079] When entering the low power mode, the timeout monitoring circuit 10 can automatically start the timeout monitoring function according to the low power entry counter enable signal given by the state controller 200 when the system enters the real low power mode. When the first timing result obtained by the internal low power entry monitoring counter 301 exceeds or equals the preset time for entering the low power monitoring, an entry timeout monitoring reset signal will be generated, and the entry timeout monitoring reset signal will be output and reported to the chip to reset the entire timeout monitoring circuit 10 and the chip. When the chip successfully enters the low power mode and there is no timeout, the low power entry monitoring counter 301 will automatically clear to zero after receiving the low power entry success signal, without software intervention, and will start counting again when the next low power entry counter enable signal is received.
[0080] In the stage of exiting the low power mode, the timeout monitoring circuit 10 can automatically start the exit timeout monitoring function when the system exits the real low power mode according to the low power exit counter enable signal given by the state controller 200. When the second timing result obtained by the internal exit low power monitoring counter 501 exceeds or equals the preset time of exiting the low power monitoring, an exit timeout monitoring reset signal will be generated, and the exit timeout monitoring reset signal will be output and reported to the chip to reset the entire timeout monitoring circuit 10 and the chip. When the chip successfully exits the low power mode and there is no timeout, the exit low power monitoring counter 501 will automatically clear to zero after receiving the low power exit success signal, without software intervention, and will start counting again when the next low power exit counter enable signal is received.
[0081] The reset module 400 mainly monitors when any timeout monitoring reset signal (high level indicates reset) is generated inside the timeout monitoring circuit 10 or when the system power-on reset signal is high, it will generate a timeout monitoring reset signal (high level indicates reset) through its output port POR to reset the entire timeout monitoring circuit 10 and the chip.
[0082] Combine the following Figure 5 , Figure 6 , Figure 7 , Figure 8 , Fig. 9 Provide specific instructions. Figure 6 , Figure 7 , Figure 8 , Fig. 9 Both Figure 5 The waveform diagrams of the timeout monitoring circuit 10 in different situations are shown. Figure 6 , Figure 7 , Figure 8 , Fig. 9 In the figure, FSM_STATE represents the state controller 200, CLK represents the working clock output by the normally open slow clock 100, the low power entry success pulse is the low power entry success signal, the low power exit success pulse is the low power exit success signal, the low power monitoring preset enable / EN is the signal received through EN1, and the low power monitoring preset enable / EN is the signal received through EN2. The entry preset time is the low power monitoring preset time, and the exit preset time is the low power monitoring preset time.
[0083] in, Figure 6 , Figure 7 It is an application Figure 5 The circuit shown is a schematic diagram of two waveforms during the system low power mode entry phase, when the circuit fails to enter the low power mode, and when the circuit successfully enters the low power mode. Figure 8 , Fig. 9 It is an application Figure 5 The circuit shown in the figure shows two waveform diagrams of the system low power mode exit stage, failure to exit the low power mode, and successful exit from the low power mode. The meanings of the different states S0, S1, S2, and S3 corresponding to the state controller 200 are as follows:
[0084] S0: indicates that the current system is in normal working mode. When the chip successfully exits from the low power mode, the state controller 200 will also return to the S0 state.
[0085] S1: Indicates that the system actually begins to enter low power consumption mode.
[0086] S2: Indicates that the system has successfully entered the low power consumption mode.
[0087] S3: Indicates the state in which the system actually begins to exit the low power mode.
[0088] It should be noted that S0, S1, S2, and S3 are only key control states, and more control states may be considered in practical applications.
[0089] exist Figure 6 , Figure 7 , Figure 8 , Fig. 9 middle, The symbol indicates that a time interval has passed.
[0090] Figure 6 It indicates that the low power consumption mode has not been successfully entered, and a timeout reset occurs through the above-mentioned timeout monitoring circuit 10, so that the system returns to a normal working state. Figure 6 and Figure 7 The low power entry counter enable signal in the state controller 200 starts the low power monitoring count according to the time when the system actually enters low power consumption, and stops the low power monitoring count until the system successfully enters the low power consumption mode or an entry timeout detection reset occurs. Figure 7 Indicates successful entry into low power mode without timeout reset. Figure 7 The val in the low power consumption monitoring counter 301 indicates that the current value is less than the low power consumption monitoring preset time. The system bus needs to configure the low power consumption monitoring preset time in advance, and configure the low power consumption monitoring preset enable / EN to be high, indicating that the low power consumption mode is turned on to enter the timeout monitoring function. When the system low power consumption request occurs, Figure 6 It means that if the low power mode is not successfully entered within the preset low power monitoring preset time, the entry timeout monitoring module 300 will generate an entry timeout monitoring reset signal to reset the entire system and the above-mentioned timeout monitoring circuit 10, effectively preventing the problem of getting stuck during the entry stage of the low power mode. Figure 7 It means that if the low power mode has been successfully entered within the preset low power monitoring time, the low power monitoring counter 302 will be automatically cleared through the low power entry success pulse, and the system successfully enters the low power mode.
[0091] Figure 8 Indicates that the low power consumption mode is not successfully exited, and a timeout reset occurs through the timeout monitoring circuit 10 so that the system returns to a normal working state; Fig. 9 Indicates that the chip successfully exits low power mode without a timeout reset. val1 indicates a value less than the preset time for entering low power monitoring, and val2 indicates a value less than the preset time for exiting low power monitoring. Figure 8 and Fig. 9 The low-power entry counter enable signal in the state controller 200 starts to monitor and count the system to enter low power consumption according to the time when the system actually enters low power consumption, and will not stop the monitoring and counting of exiting low power consumption until the system successfully enters low power consumption mode or an exit timeout detection reset occurs. The low-power exit counter enable signal is the state controller 200 starts to monitor and count the system to exit low power consumption according to the time when the system actually exits low power consumption, and will not stop the monitoring and counting of exiting low power consumption until the system successfully exits low power consumption mode or an exit timeout detection reset occurs.
[0092] The system bus needs to configure the preset time for exiting low power monitoring in advance, and configure the preset enable / EN for exiting low power monitoring to be high, indicating that the low power mode exit timeout monitoring function is turned on. When the system low power wake-up signal occurs, Figure 8 Indicates that if the low power mode is not successfully exited within the preset exit low power monitoring preset time, then the exit timeout monitoring module 500 will generate an exit timeout monitoring reset signal to reset the entire system and the above-mentioned timeout monitoring circuit 10, effectively preventing the stuck problem in the low power mode exit stage; Fig. 9 It means that if the low power mode has been successfully exited within the preset exit low power monitoring preset time, the exit low power monitoring counter 502 will be automatically cleared through the low power exit success pulse, and the system successfully exits the low power mode.
[0093] In summary, the timeout monitoring circuit of the embodiment of the present invention includes: a normally open slow clock, a state controller, an entry timeout monitoring module and a reset module; wherein the state controller is used to output a low-power entry counter enable signal to the entry timeout monitoring module after receiving a system low-power request signal, and output a low-power entry success signal to the entry timeout monitoring module when detecting that the chip enters the low-power mode successfully; the entry timeout monitoring module is used to start timing when receiving the low-power entry counter enable signal, obtain a first timing time, and when the first timing time is greater than or equal to the entry low-power monitoring preset time, and the low-power entry success signal is not received, output an entry timeout monitoring reset signal to the reset module; the reset module is used to output a timeout monitoring reset signal to reset the chip when receiving the entry timeout monitoring reset signal; the normally open slow clock is used to provide a working clock for the state controller and the entry timeout monitoring module respectively. By setting the above-mentioned timeout monitoring circuit that does not require the use of a watchdog, normal operation can be achieved in low-power mode, and hardware costs can be reduced at the same time. Moreover, since the above-mentioned timeout monitoring circuit can perform monitoring only by triggering the system low-power request signal, it can respond to the randomly generated system low-power entry signal, realize monitoring in real time, and have better performance. Moreover, according to the randomly generated system low-power entry signal or system wake-up signal, the low-power mode entry and exit timeout monitoring can be automatically turned on in real time through hardware, and accurate hardware timeout monitoring can be performed. When the system successfully enters the low-power mode and no timeout monitoring occurs, the entry low-power monitoring counter will automatically clear to zero, stop counting, and wait until the next low-power entry counter enable signal is turned on again; when the system successfully exits the low-power mode and no timeout monitoring occurs, the exit low-power monitoring counter will automatically clear to zero, stop counting, and wait until the next low-power exit counter enable signal is turned on again. No software intervention is required, software overhead is reduced, and no misjudgment of monitoring circuit timeout is caused. There is no need to add an additional external watchdog to the chip to realize the stuck timeout problem of the low-power mode, and the cost is very low. The entire timeout monitoring process is all pure digital logic design, and the hardware overhead is small, which is easy to implement in circuit design. It supports flexible configuration, and you can choose to turn this function on or off separately when entering or exiting.
[0094] Furthermore, the present invention provides a chip.
[0095] Fig.10 It is a structural block diagram of a chip according to an embodiment of the present invention.
[0096] like Fig.10 As shown, the chip 1000 includes the timeout monitoring circuit 10 of the above embodiment.
[0097] The chip of the embodiment of the present invention can realize normal operation in low power consumption mode through the timeout monitoring circuit of the above embodiment, and can reduce hardware cost at the same time. In addition, since the above timeout monitoring circuit only needs to be triggered by the system low power consumption request signal to perform monitoring, it can respond to the randomly generated system low power consumption entry signal, realize monitoring in real time, and have better performance. In addition, according to the randomly generated system low power consumption entry signal or system wake-up signal, the low power consumption mode entry and exit timeout monitoring can be automatically turned on in real time through hardware, and accurate hardware timeout monitoring can be performed. The low power consumption monitoring counter will automatically clear to zero when the system successfully enters the low power consumption mode and no timeout monitoring occurs, and will no longer count, and will start counting again when the next low power consumption entry counter enable signal is received; the low power consumption monitoring counter will automatically clear to zero when the system successfully exits the low power consumption mode and no timeout monitoring occurs, and will no longer count, and will start counting again when the next low power consumption exit counter enable signal is received. No software intervention is required, software overhead is reduced, and the monitoring circuit timeout misjudgment will not be caused. There is no need to add an additional external watchdog to the chip to solve the problem of stuck timeout in low power consumption mode, and the cost is very low. The entire timeout monitoring process is designed with pure digital logic, with low hardware overhead and easy to implement in circuit design. It supports flexible configuration and can choose to turn on or off this function separately when entering or exiting.
[0098] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0099] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0100] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0101] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0102] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0103] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like 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 a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0104] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0105] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A timeout monitoring circuit, characterized in that: include: Normally open slow clock, state controller, entry timeout monitoring module and reset module; among them, The state controller is used to output a low power entry counter enable signal to the entry timeout monitoring module after receiving a system low power request signal, and output a low power entry success signal to the entry timeout monitoring module when detecting that the chip enters the low power mode successfully; The entry timeout monitoring module is used to start timing when receiving the low-power entry counter enable signal to obtain a first timing time, and when the first timing time is greater than or equal to the low-power entry monitoring preset time and the low-power entry success signal is not received, output an entry timeout monitoring reset signal to the reset module; The reset module is used to output a timeout monitoring reset signal to reset the chip when receiving the entry timeout monitoring reset signal; The normally-on slow clock is used to provide working clocks for the state controller and the entry timeout monitoring module respectively.
2. The timeout monitoring circuit according to claim 1, characterized in that: Also includes: Exit the timeout monitoring module; where, The state controller is further configured to output a low-power exit counter enable signal to the exit timeout monitoring module upon receiving a system low-power wake-up signal, and output a low-power exit success signal to the exit timeout monitoring module upon detecting that the chip successfully exits the low-power mode; The exit timeout monitoring module is used to start timing when receiving the low-power exit counter enable signal, obtain a second timing time, and output an exit timeout monitoring reset signal to the reset module when the second timing time is greater than or equal to the low-power exit monitoring preset time and the low-power exit success signal is not received; The reset module is further configured to output the timeout monitoring reset signal to reset the chip upon receiving the exit timeout monitoring reset signal; The normally-on slow clock is also used to provide a working clock for the exit timeout monitoring module.
3. The timeout monitoring circuit according to claim 1, characterized in that: The entry timeout monitoring module includes: an entry low power consumption monitoring counter and a first comparator; wherein, The low power consumption entry monitoring counter is connected to the normally open slow clock, the state controller and the first comparator respectively, and is used to start timing when receiving the low power consumption entry counter enable signal, obtain the first timing time, and output the first timing time to the first comparator, and clear the first timing time when receiving the low power consumption entry success signal; The first comparator is also connected to the reset module, and is used to compare the first timing time with the preset time for entering low power consumption monitoring, and when the first timing time is greater than or equal to the preset time for entering low power consumption monitoring, output the entry timeout monitoring reset signal to the reset module.
4. The timeout monitoring circuit according to claim 2, characterized in that: The exit timeout monitoring module includes: an exit low power consumption monitoring counter and a second comparator; wherein, The low power consumption exit monitoring counter is connected to the normally-on slow clock, the state controller and the second comparator respectively, and is used to start timing when receiving the low power consumption exit counter enable signal, obtain the second timing time, and output the second timing time to the second comparator, and clear the second timing time to zero when receiving the low power consumption exit success signal; The second comparator is also connected to the reset module, and is used to compare the second timing time with the preset time for exiting low power consumption monitoring, and when the second timing time is greater than or equal to the preset time for exiting low power consumption monitoring, output the exit timeout monitoring reset signal to the reset module.
5. The timeout monitoring circuit according to claim 2, characterized in that: The reset module is further configured to output the timeout monitoring reset signal when receiving a system power-on reset signal.
6. The timeout monitoring circuit according to claim 5, characterized in that: The reset module is also used to: output the timeout monitoring reset signal to the state controller, the entry timeout monitoring module and the exit timeout monitoring module respectively, so as to reset the state controller, the entry timeout monitoring module and the exit timeout monitoring module.
7. The timeout monitoring circuit according to claim 1, characterized in that: The entry timeout monitoring module is also connected to the system bus of the chip to configure the entry low power monitoring preset time and the entry low power monitoring enable signal through the system bus; Wherein, the entry timeout monitoring module performs timeout monitoring when the entry low power consumption monitoring enable signal is valid.
8. The timeout monitoring circuit according to claim 2, characterized in that: The exit timeout monitoring module is also connected to the system bus of the chip to configure the exit low power monitoring preset time and the exit low power monitoring enable signal through the system bus; Wherein, the exit timeout monitoring module performs timeout monitoring when the exit low power consumption monitoring enable signal is valid.
9. The timeout monitoring circuit according to claim 5, characterized in that: The reset module comprises: a three-input OR gate, wherein three input terminals of the three-input OR gate are respectively used to receive the entry timeout monitoring reset signal, the exit timeout monitoring reset signal and the system power-on reset signal.
10. A chip, characterized in that: include: A timeout monitoring circuit according to any one of claims 1 to 9.
