Pulse signal monitoring circuit, chip and electronic device
By designing a pulse signal monitoring circuit, including pulse period and duty cycle monitoring module, the problem that the prior art cannot monitor pulse signals with a duty cycle of not 50% is solved, real-time monitoring and abnormal detection of any duty cycle signals are realized, and the stability and applicability of the system are improved.
Patent Information
- Application Number
- CN202311263663.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art cannot effectively monitor pulse signals with a duty cycle of not 50%, resulting in pulse signals failure may cause safety accidents.
A pulse signal monitoring circuit is designed, including a pulse period monitoring module and a pulse duty cycle monitoring module. The period and duty cycle of the pulse signal to be measured are monitored by reference to the clock signal, and the changes in the adjacent two periods and duty cycle are compared, and the period change alarm signal and duty cycle change alarm signal are output.
Real-time monitoring of the period and duty cycle of pulse signals with any duty cycle is realized, and signal abnormalities can be detected in a timely manner, improving system stability and applicability.
Smart Images

Figure CN119766207A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic circuits, and in particular to a pulse signal monitoring circuit, chip and electronic device. Background Art
[0002] With the development trend of automobile electrification, intelligence and Internet of Things, automotive chips need to integrate more and more functions to meet market demand, and integrated circuit (IC) design, especially system-on-chip (SOC) design, needs to integrate more and more intellectual property (IP) to meet more complex market demands. On the other hand, automobile products are closely related to life safety as a means of transportation, so such chips have higher requirements in terms of safety and reliability.
[0003] In order to ensure the stability of pulse signals on digital vehicle-mounted chips, the pulse sources in digital chips are mainly generated by on-chip oscillators, phase-locked loops and external crystal oscillators. Long-term operation or noise interference from the external environment is very likely to cause pulse signal failure, resulting in relatively large safety accidents and threatening personal safety.
[0004] At present, the monitoring of chip pulse signals mainly monitors clock signals with a duty cycle of 50%, and there is no monitoring of pulse signals with a duty cycle of non-50%. In terms of clock monitoring, there are mainly two categories. One is to monitor clock frequency deviation. The relevant technology uses three links to monitor frequency deviation, which is cumbersome to implement and cannot detect clock loss. The second is to monitor clock loss. When there is a clock signal, a periodic pulse signal will be output. When the clock signal is lost, a high or low level signal will be output. However, when the frequency of the clock signal to be measured changes, a high or low level signal will also be output, so it is impossible to determine whether the clock is locked.
[0005] In summary, there is no good solution to the above problems. Summary of the invention
[0006] The embodiments of the present application provide a pulse signal monitoring circuit, a chip and an electronic device to at least solve the problem in the related art that a pulse signal with a duty cycle other than 50% cannot be monitored.
[0007] According to one embodiment of the present application, a pulse signal monitoring circuit is provided, the pulse signal monitoring circuit comprising:
[0008] A pulse cycle monitoring module, used for monitoring the cycle of the pulse signal to be measured and the cycle change between two adjacent cycles based on the reference clock signal;
[0009] A pulse duty cycle monitoring module is used to monitor the duty cycle of the pulse signal to be tested and the duty cycle change between two adjacent cycles based on the reference clock signal.
[0010] In some embodiments, the pulse monitoring module further includes: a first synchronizer, configured to synchronize the input pulse signal to be tested to the clock domain of the reference clock signal to output a synchronization pulse signal.
[0011] In some embodiments, the pulse period monitoring module includes:
[0012] A rising edge monitoring module, whose input end is connected to the output end of the first synchronizer, is used to monitor the rising edge of the synchronization pulse signal and output a first trigger signal when the rising edge of the synchronization pulse signal arrives;
[0013] A period calculation module, whose input end is connected to the output end of the rising edge monitoring module, is used to start counting the reference clock signal when the first trigger signal arrives, and end counting when the first trigger signal arrives next time, and output the pulse signal period.
[0014] In some embodiments, the pulse period monitoring module also includes: a period change monitoring module, whose input end is connected to the output end of the period calculation module, for comparing whether two adjacent pulse signal periods are the same, and outputting a second trigger signal when the two adjacent pulse signal periods are different.
[0015] In some embodiments, the pulse period monitoring module further includes: a change period counting module, whose input end is connected to the output end of the period change monitoring module, and is used to count the second trigger signal.
[0016] In some embodiments, the pulse period monitoring module is also used to compare the number of second trigger signals output by the change period counting module with a preset period change threshold, and output a period change alarm signal when the number of the second trigger signals is greater than the period change threshold.
[0017] In some embodiments, the pulse duty cycle monitoring module includes:
[0018] A falling edge monitoring module, whose input end is connected to the output end of the first synchronizer, is used to monitor the falling edge of the synchronization pulse signal and output a third trigger signal when the falling edge of the synchronization pulse signal arrives;
[0019] A duty cycle calculation module, whose input end is connected to the output end of the rising edge monitoring module and the output end of the falling edge monitoring module, is used to start counting the reference clock signal when the first trigger signal arrives, and end counting when the third trigger signal arrives to obtain the number of high-level pulses, determine the ratio of the number of high-level pulses to the pulse signal period as the pulse signal duty cycle, and output the pulse signal duty cycle.
[0020] In some embodiments, the pulse duty cycle monitoring module also includes: a duty cycle change monitoring module, whose input end is connected to the output end of the duty cycle calculation module, for comparing whether the duty cycles of two adjacent pulse signals are the same, and outputting a fourth trigger signal when the duty cycles of the two adjacent pulse signals are different.
[0021] In some embodiments, the pulse duty cycle monitoring module further includes: a duty cycle change counting module, whose input end is connected to the output end of the duty cycle change monitoring module, and is used to count the fourth trigger signal.
[0022] In some embodiments, the pulse duty cycle monitoring module is also used to compare the number of fourth trigger signals output by the duty cycle change counting module with a preset duty cycle change threshold, and output a duty cycle change alarm signal when the number of the fourth trigger signals is greater than the duty cycle change threshold.
[0023] In some embodiments, when the pulse period monitoring module and the pulse duty cycle monitoring module share an edge monitoring module, the rising edge monitoring module and the falling edge monitoring module belong to the same edge monitoring module.
[0024] In some embodiments, the circuit further includes a clock monitoring module, and the clock monitoring module includes:
[0025] A clock frequency deviation monitoring module, used to monitor the frequency and frequency deviation of the clock signal to be measured based on the reference clock signal;
[0026] The clock presence monitoring module is used to monitor the presence status of the clock signal to be tested based on the reference clock signal.
[0027] In some embodiments, the clock monitoring module further includes:
[0028] A frequency divider, used for dividing the input clock signal to be measured based on a preset frequency division coefficient, and outputting a frequency division signal;
[0029] A second synchronizer, whose input end is connected to the output end of the frequency divider, is used to synchronize the frequency-divided signal to the clock domain of the reference clock signal and output a synchronized clock signal;
[0030] A second edge monitoring module, whose input end is connected to the output end of the second synchronizer, is used to monitor the rising edge of the synchronization clock signal and output a fifth trigger signal when the rising edge of the synchronization clock signal arrives;
[0031] A counting module, whose input end is connected to the output end of the second edge monitoring module, is used to start counting the reference clock signal when the fifth trigger signal arrives, and to end counting when the fifth trigger signal arrives next time, and output the count value.
[0032] In some embodiments, the clock frequency deviation monitoring module includes: a frequency deviation detection module, whose input end is connected to the output end of the counting module, and is used to output a frequency deviation alarm signal when the counting value is greater than a preset frequency deviation upper limit or less than a preset frequency deviation lower limit.
[0033] In some embodiments, the clock frequency deviation monitoring module further includes: a frequency detection module, whose input end is connected to the output end of the counting module, and is used to determine the frequency of the clock signal to be measured based on the counting value, the frequency division coefficient and the reference clock frequency.
[0034] In some embodiments, the clock in-place monitoring module includes: an in-place detection module, whose input end is connected to the output end of the counting module, and is used to determine that the in-place state of the clock signal to be measured is a lost state when the counting value is greater than a preset in-place detection threshold, and output an in-place alarm signal.
[0035] In some embodiments, when the clock frequency deviation monitoring module and the clock presence monitoring module share the frequency divider, the second synchronizer, the second edge monitoring module and the counting module, the input end of the clock frequency deviation monitoring module and the input end of the clock presence monitoring module are connected to the output end of the same counting module;
[0036] In some embodiments, when the clock frequency deviation monitoring module and the clock presence monitoring module do not share the frequency divider, the second synchronizer, the second edge monitoring module and the counting module, the clock frequency deviation monitoring module and the clock presence monitoring module respectively include a group of the frequency divider, the second synchronizer, the second edge monitoring module and the counting module.
[0037] In some embodiments, the circuit includes a plurality of the clock monitoring modules, and the circuit further includes a frequency deviation monitoring summary module and an in-position monitoring summary module, wherein:
[0038] The multiple clock monitoring modules are used to output multiple frequency deviation detection signals and multiple in-place detection signals, wherein each of the clock signals to be measured is input into one of the clock monitoring modules, and a frequency deviation detection signal is output from the clock frequency deviation monitoring module of each of the clock monitoring modules, and a in-place detection signal is output from the clock in-place monitoring module of each of the clock monitoring modules, wherein the frequency deviation detection signal includes a frequency deviation alarm signal and a normal frequency deviation signal, and the in-place detection signal includes an in-place alarm signal and a normal in-place signal;
[0039] The frequency deviation monitoring and summarizing module, whose input end is connected to the output ends of the multiple clock monitoring modules, receives the input multiple frequency deviation detection signals and a preset frequency deviation detection mask, determines whether each frequency deviation detection signal is output according to the frequency deviation detection mask, and performs an OR operation on the multiple frequency deviation detection signals after mask processing, and outputs a summarized frequency deviation detection result;
[0040] The in-place monitoring summary module has an input end connected to the output ends of the multiple clock monitoring modules, receives the input multiple in-place detection signals and a preset in-place detection mask, determines whether each of the multiple in-place detection signals is output according to the in-place detection mask, performs an OR operation on the multiple in-place detection signals after mask processing, and outputs a summarized in-place detection result.
[0041] According to another embodiment of the present application, a chip is provided, comprising the pulse signal monitoring circuit in any one of the above embodiments.
[0042] According to another embodiment of the present application, an electronic device is provided, comprising the pulse signal monitoring circuit in any one of the above embodiments.
[0043] Through the embodiments of the present application, a pulse signal monitoring circuit is designed. By comparing the duty cycle and period of two adjacent pulse signals, period monitoring and duty cycle monitoring of pulse signals with any duty cycle can be realized, which solves the problem in the related technology that pulse signals with a duty cycle other than 50% cannot be monitored, thereby improving the applicability of the system and enhancing the system stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a structural block diagram of a pulse signal monitoring circuit according to an embodiment of the present application;
[0045] Figure 2 is a structural block diagram of a pulse period monitoring module in an embodiment of the present application;
[0046] Figure 3 is a structural block diagram of a pulse duty cycle monitoring module of an embodiment of the present application;
[0047] Figure 4 is a structural block diagram of a pulse signal monitoring circuit according to an embodiment of the present application;
[0048] Figure 5 is a structural block diagram of a clock frequency deviation monitoring module in an embodiment of the present application;
[0049] Figure 6 is a structural block diagram of a clock presence monitoring module in an embodiment of the present application;
[0050] Figure 7 is a structural block diagram of a pulse signal monitoring circuit according to another embodiment of the present application;
[0051] Figure 8 is a schematic diagram of a processing flow of a pulse monitoring module according to an embodiment of the present application;
[0052] Fig. 9 is a schematic diagram of a processing flow of a clock monitoring module according to an embodiment of the present application;
[0053] Fig.10 is a schematic diagram of a signal aggregation process of multiple clock monitoring modules in an embodiment of the present application;
[0054] Fig.11 is a waveform diagram of a pulse period monitoring module according to an embodiment of the present application;
[0055] Fig.12 It is a waveform diagram of the pulse duty cycle monitoring module in the embodiment of the present application. DETAILED DESCRIPTION
[0056] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0058] The pulse signal monitoring circuit in the embodiment of the present application is mainly used in chips to realize real-time monitoring of pulse signals in the chip. Chip products may include but are not limited to automotive electronic chips, consumer electronic chips, communication chips, etc.
[0059] A pulse signal monitoring circuit is provided in an embodiment of the present application. Figure 1 is a structural block diagram of a pulse signal monitoring circuit according to an embodiment of the present application. Figure 1 As shown, the pulse signal monitoring circuit includes a pulse monitoring module 10 .
[0060] In this embodiment, the pulse monitoring module 10 may include the following structure:
[0061] A pulse period monitoring module 12, used for monitoring the period of the pulse signal to be measured and the period change between two adjacent periods based on the reference clock signal;
[0062] The pulse duty cycle monitoring module 14 is used to monitor the duty cycle of the pulse signal to be tested and the change of the duty cycle between two adjacent cycles based on the reference clock signal.
[0063] In this embodiment, the pulse signal to be measured may be a pulse signal with any duty cycle.
[0064] Through the embodiments of the present application, pulse signals with any duty cycle can be monitored, and period abnormality monitoring and duty cycle abnormality monitoring of pulse signals can be realized, which solves the problem in the related technology that pulse signals with duty cycles other than 50% cannot be monitored. Signal abnormalities in the chip can be discovered in time to ensure stable operation of the chip system.
[0065] In some embodiments, the pulse monitoring module 10 may include a first synchronizer 16 for synchronizing the input pulse signal to be tested to the clock domain of the reference clock signal to output a synchronized pulse signal.
[0066] In some embodiments, the pulse monitoring module 10 may further include a first edge monitoring module 18, whose input end is connected to the output end of the first synchronizer, for monitoring the rising edge of the synchronization pulse signal and outputting a first trigger signal when the rising edge of the synchronization pulse signal arrives.
[0067] In some embodiments, the first edge monitoring module 18 is further used to monitor the falling edge of the synchronization pulse signal, and output a third trigger signal when the falling edge of the synchronization pulse signal arrives.
[0068] In some embodiments, the pulse period monitoring module and the pulse duty cycle monitoring module may share a synchronizer and an edge detection module, or may each independently use a synchronizer and an edge detection module.
[0069] In this embodiment, the synchronizer is used to realize the synchronous release of the asynchronous signal in the input clock domain through synchronization processing. The synchronizer can synchronize the reset signal to the desired clock domain for release, and reduce the probability of metastable state that may occur when the reset signal is released due to crossing the clock domain.
[0070] Figure 2 is a structural block diagram of the pulse period monitoring module of the embodiment of the present application, such as Figure 2 As shown, the pulse period monitoring module 12 may include the following structure:
[0071] The period calculation module 122, whose input end is connected to the output end of the first edge monitoring module, is used to start counting the reference clock signal when the first trigger signal arrives, and end counting when the first trigger signal arrives next time, and output the pulse signal period.
[0072] The period change monitoring module 124 has an input end connected to the output end of the period calculation module and is used to compare whether the periods of two adjacent pulse signals are the same, and output a second trigger signal when the periods of the two adjacent pulse signals are different.
[0073] The change cycle counting module 126 has an input end connected to the output end of the period change monitoring module and is used to count the second trigger signal.
[0074] In some embodiments, the pulse period monitoring module is also used to compare the number of second trigger signals output by the change period counting module 126 with a preset period change threshold, and output a period change alarm signal when the number of the second trigger signals is greater than the preset period change threshold.
[0075] In an exemplary embodiment, the pulse period monitoring module uses a single edge detection module. In this case, the pulse period monitoring module also includes a rising edge monitoring module 128, whose input end is connected to the output end of the first synchronizer, for monitoring the rising edge of the synchronization pulse signal and outputting a first trigger signal when the rising edge of the synchronization pulse signal arrives.
[0076] In this embodiment, the input end of the period calculation module 122 is connected to the output end of the rising edge monitoring module.
[0077] In some embodiments, according to monitoring requirements, the pulse period monitoring module may include a combination of one or more of the above structures. The pulse period monitoring module may only support real-time monitoring of the pulse period or pulse frequency, or may generate an indication signal when the pulse changes to a certain value, and the central control determines whether to respond.
[0078] In some embodiments, the cycle calculation module 122 and the change cycle counting module 126 can be implemented by a counter. The cycle calculation module can use the rising edge of the first trigger signal, i.e., the synchronous pulse signal, as a counting mark, start at a counting mark, end at the next counting mark, record the current value and then clear it. The change cycle counting module can use the rising edge of the second trigger signal as a counting mark, and clear it when the alarm signal is output or the pulse signal cycle returns to normal.
[0079] In some embodiments, the period variation threshold may be set according to the sensitivity of the alarm abnormality. The smaller the period variation threshold, the higher the sensitivity to the pulse signal period abnormality.
[0080] Through the embodiments of the present application, real-time monitoring of the pulse period of a pulse signal with any duty cycle can be achieved, and abnormal period conditions of the pulse signal can be discovered in time, thereby ensuring the normal operation of the chip system.
[0081] In some other embodiments, the first edge monitoring module 18 is further used to monitor the falling edge of the synchronization pulse signal, and output a third trigger signal when the falling edge of the synchronization pulse signal arrives.
[0082] Figure 3 is a structural block diagram of the pulse duty cycle monitoring module of the embodiment of the present application, such as Figure 3 As shown, the pulse duty cycle monitoring module 14 may include the following structure:
[0083] The duty cycle calculation module 142, whose input end is connected to the output end of the first edge monitoring module, is used to start counting the reference clock signal when the first trigger signal arrives, and end counting to obtain the number of high-level pulses when the third trigger signal arrives, and determine the ratio of the number of high-level pulses to the pulse signal period as the pulse signal duty cycle, and output the pulse signal duty cycle.
[0084] The duty cycle change monitoring module 144 has an input end connected to the output end of the duty cycle calculation module and is used to compare whether the duty cycles of two adjacent pulse signals are the same. When the duty cycles of the two adjacent pulse signals are different, a fourth trigger signal is output.
[0085] The duty cycle change counting module 146 has an input end connected to the output end of the duty cycle change monitoring module and is used to count the fourth trigger signal.
[0086] In some embodiments, the pulse duty cycle monitoring module can also compare the number of fourth trigger signals output by the duty cycle change counting module 146 with a preset duty cycle change threshold, and output a duty cycle change alarm signal when the number of the fourth trigger signals is greater than the preset duty cycle change threshold.
[0087] In an exemplary embodiment, the pulse duty cycle monitoring module uses a single edge detection module. In this case, the pulse period monitoring module also includes a falling edge monitoring module 148, whose input end is connected to the output end of the first synchronizer, for monitoring the falling edge of the synchronization pulse signal and outputting a third trigger signal when the falling edge of the synchronization pulse signal arrives.
[0088] In this embodiment, the duty cycle calculation module 142 has an input end connected to the output end of the rising edge monitoring module and the output end of the falling edge monitoring module.
[0089] In some embodiments, according to monitoring requirements, the pulse duty cycle monitoring module may include a combination of one or more of the above structures. The pulse duty cycle monitoring module may only support real-time monitoring of the duty cycle, or may generate an indication signal when the duty cycle changes to a certain value, and the central control determines whether to respond.
[0090] In some embodiments, the duty cycle calculation module 142 and the duty cycle change counting module 146 may be implemented using counters.
[0091] In this embodiment, the duty cycle calculation module can use the rising edge of the first trigger signal, i.e., the synchronization pulse signal, as the count start mark, and the falling edge of the third trigger signal, i.e., the synchronization pulse signal, as the count end mark, record the current value and then clear it to zero. Then, the duty cycle is calculated by combining the pulse signal period obtained in the period calculation module 122.
[0092] In this embodiment, the duty cycle change counting module may use the rising edge of the fourth trigger signal as a counting mark, and clear it when an alarm signal is output or the duty cycle of the pulse signal returns to normal.
[0093] In some embodiments, the duty cycle change threshold can be set according to the sensitivity of the alarm abnormality. The smaller the duty cycle change threshold, the higher the sensitivity to the abnormal duty cycle of the pulse signal.
[0094] Through the embodiments of the present application, pulse signals of any duty cycle can be monitored, abnormal duty cycle monitoring of pulse signals can be achieved, signal anomalies in the chip can be discovered in time, and stable operation of the chip system can be ensured.
[0095] In another embodiment, when the pulse period monitoring module and the pulse duty cycle monitoring module share an edge monitoring module, the rising edge monitoring module and the falling edge monitoring module are the same edge monitoring module, namely, the first edge monitoring module 18 .
[0096] Figure 4 is a structural block diagram of a pulse signal monitoring circuit according to an embodiment of the present application, such as Figure 4 As shown, the pulse signal monitoring circuit may further include a clock monitoring module 20 .
[0097] In this embodiment, the clock monitoring module 20 includes the following structure:
[0098] A clock frequency deviation monitoring module 22, configured to monitor the frequency and frequency deviation of a clock signal to be measured based on the reference clock signal;
[0099] The clock presence monitoring module 24 is used to monitor the presence status of the clock signal to be tested based on the reference clock signal.
[0100] In this embodiment, the clock signal to be measured may be a pulse signal with a duty cycle of 50%.
[0101] In this embodiment, the reference clock signal is the only reference of the clock monitoring module and may be derived from an external crystal oscillator or a stable clock generating unit. The stability of the reference clock must be ensured.
[0102] Through the embodiments of the present application, flexible monitoring of pulse signals and clock signals with duty cycles other than 50% can be achieved, and different monitoring modules can be called or connected for processing according to monitoring requirements, thereby expanding the scope of application of the chip monitoring system.
[0103] In some embodiments, the clock monitoring module further includes:
[0104] A frequency divider, used for dividing the input clock signal to be measured based on a preset frequency division coefficient, and outputting a frequency division signal;
[0105] A second synchronizer, whose input end is connected to the output end of the frequency divider, is used to synchronize the frequency-divided signal to the clock domain of the reference clock signal and output a synchronized clock signal;
[0106] A second edge monitoring module, whose input end is connected to the output end of the second synchronizer, is used to monitor the rising edge of the synchronization clock signal and output a fifth trigger signal when the rising edge of the synchronization clock signal arrives;
[0107] A counting module, whose input end is connected to the output end of the second edge monitoring module, is used to start counting the reference clock signal when the fifth trigger signal arrives, and to end counting when the fifth trigger signal arrives next time, and output the count value.
[0108] In some embodiments, if the frequency of the clock signal to be measured is correct, the count value is the frequency ratio of the reference clock signal and the synchronous clock signal (or the divided clock signal to be measured).
[0109] In some embodiments, the clock frequency deviation monitoring module and the clock presence monitoring module may share a frequency divider, a synchronizer, an edge detection module, and a counting module, or may be used independently.
[0110] Figure 5 is a structural block diagram of a clock frequency deviation monitoring module in an embodiment of the present application, such as Figure 5 As shown, the clock frequency deviation monitoring module 22 may include the following structure:
[0111] The frequency deviation detection module 222 has an input end connected to the output end of the counting module, and is used to output a frequency deviation alarm signal when the count value is greater than a preset frequency deviation upper limit or less than a preset frequency deviation lower limit.
[0112] The frequency detection module 224 has an input end connected to the output end of the counting module and is used to determine the frequency of the clock signal to be measured according to the counting value, the frequency division coefficient and the reference clock frequency.
[0113] In this embodiment, the upper limit value of the frequency deviation and the lower limit value of the frequency deviation can be flexibly configured according to the requirements of the frequency deviation detection accuracy. The upper limit value of the frequency deviation is the sum of the standard count value when no frequency deviation occurs and the frequency deviation detection accuracy, and the lower limit value of the frequency deviation is the difference between the standard count value and the frequency deviation detection accuracy.
[0114] In some embodiments, the frequency detection module requires a stable clock source as a reference clock, which can come from an external crystal oscillator, an off-chip clock chip, or other stable clock sources. According to the Nyquist sampling theorem, in order to ensure accurate sampling, the reference clock frequency must be greater than twice the frequency of the clock to be measured.
[0115] Figure 6 is a structural block diagram of a clock presence monitoring module in an embodiment of the present application, such as Figure 6 As shown, the clock presence monitoring module 24 may include the following structure:
[0116] The in-place detection module 242 has an input end connected to the output end of the counting module, receives the input count value and a preset in-place detection threshold, and is used to determine that the in-place state of the clock signal to be measured is a lost state when the count value is greater than the in-place detection threshold, and output an in-place alarm signal.
[0117] In some embodiments, the presence detection threshold may be set according to a frequency range of the clock signal to be detected.
[0118] In an exemplary embodiment, if the clock signal to be tested is not lost, the signal width after frequency division ranges from 0.5M to 2M, where M is the pulse width of the stable and non-lost low-speed clock source, and the in-place detection threshold can also be set to 0.5M to 2M.
[0119] In an exemplary embodiment, when the clock frequency deviation monitoring module and the clock presence monitoring module share the frequency divider, the second synchronizer, the second edge monitoring module and the counting module, the input end of the clock frequency deviation monitoring module and the input end of the clock presence monitoring module are connected to the output end of the same counting module;
[0120] In another exemplary embodiment, when the clock frequency deviation monitoring module and the clock presence monitoring module do not share the frequency divider, the second synchronizer, the second edge monitoring module and the counting module, the clock frequency deviation monitoring module and the clock presence monitoring module respectively include a group of the frequency divider, the second synchronizer, the second edge monitoring module and the counting module.
[0121] In this embodiment, the input ends of the frequency deviation detection module, the frequency detection module, and the presence detection module may be connected to the counting modules in the corresponding groups.
[0122] Figure 7 is a structural block diagram of a pulse signal monitoring circuit according to another embodiment of the present application. Figure 7 As shown, the pulse signal monitoring circuit may also include the following structure:
[0123] The plurality of clock monitoring modules 20 , the frequency deviation monitoring and summarizing module 30 and the in-position monitoring and summarizing module 40 .
[0124] In this embodiment, a plurality of the clock monitoring modules are used to output multiple frequency deviation detection signals and multiple in-place detection signals, wherein each of the clock signals to be measured is input into one of the clock monitoring modules, and a frequency deviation detection signal is output from the clock frequency deviation monitoring module of each of the clock monitoring modules, and a in-place detection signal is output from the clock in-place monitoring module of each of the clock monitoring modules, wherein the frequency deviation detection signal includes a frequency deviation alarm signal and a normal frequency deviation signal, and the in-place detection signal includes an in-place alarm signal and a normal in-place signal;
[0125] In this embodiment, the frequency deviation monitoring summary module has an input end connected to the output ends of the multiple clock monitoring modules, receives the input multiple frequency deviation detection signals and a preset frequency deviation detection mask, determines whether each frequency deviation detection signal is output according to the frequency deviation detection mask, and performs an OR operation on the multiple frequency deviation detection signals after mask processing, and outputs a summarized frequency deviation detection result;
[0126] In this embodiment, the input end of the in-place monitoring summary module is connected to the output ends of the multiple clock monitoring modules, receives the input multiple in-place detection signals and a preset in-place detection mask, determines whether each of the multiple in-place detection signals is output according to the in-place detection mask, performs an OR operation on the multiple in-place detection signals after mask processing, and outputs a summarized in-place detection result.
[0127] Through the embodiments of the present application, it is possible to monitor multiple clock inputs, and the monitoring results can be reported after being summarized by the summary logic. According to the sensitivity of the monitoring scenario to the clock frequency deviation or the in-position state, the frequency deviation detection mask and the in-position detection mask can be configured to determine whether the monitoring results are output.
[0128] Figure 8 is a schematic diagram of the processing flow of the pulse monitoring module in an embodiment of the present application, such as Figure 8 As shown, the pulse monitoring module includes the following structure:
[0129] The synchronizer realizes the synchronous release of the asynchronous signal in the input clock domain through synchronization processing. In this embodiment, it is used to synchronize the clock domain of the input pulse (in_pulse), that is, the pulse signal to be measured, with the clock domain of the reference clock.
[0130] The rising edge sampler samples the rising edge of the input pulse under the control of the working clock gating signal (wclk_gate).
[0131] The period calculation module calculates the number of reference clocks between two adjacent rising edges of the pulse signal to be measured, that is, the period of the pulse signal.
[0132] The cycle change monitoring module compares whether the number of cycles has changed between two cycles.
[0133] The change cycle counting module records the number of changes in the cycle number.
[0134] The falling edge sampler samples the falling edge of the input pulse under the control of the working clock gating signal (wclk_gate).
[0135] The duty cycle calculation module calculates the number of reference clocks between the rising edge and the falling edge of the pulse signal to be measured, and calculates the duty cycle of the pulse to be measured in combination with the cycle output by the cycle calculation module.
[0136] The duty cycle change monitoring module compares the duty cycles calculated twice before and after to see if they have changed.
[0137] The duty cycle change counting module records the number of duty cycle changes.
[0138] In this embodiment, the synchronizer is equivalent to the first synchronizer in the above embodiment, and the rising edge sampler and the falling edge sampler are equivalent to the first edge monitoring module in the above embodiment.
[0139] In some embodiments, the pulse monitoring module also includes registers for storing processing results of other modules.
[0140] In this embodiment, the workflow of the pulse monitoring module may include the following steps:
[0141] Step S101, synchronizing input pulses in a reference clock domain.
[0142] Step S102, sampling the rising edge of the input pulse to identify the range of a single cycle.
[0143] Step S103, calculate the number of cycles, determine the number of reference clocks between two rising edges, clear the counter when a rising edge is encountered, perform the next round of counting, and store the current count value in the register. The reference clock divided by the current value is the frequency value of the pulse.
[0144] Step S104, start counting the number of cycles of the reference clock when the pulse high level is valid, and record the current value after counting to the maximum value. Since the number of pulses in the entire cycle has been obtained in step S103, the duty cycle can be obtained by dividing it.
[0145] Step S105, monitoring the count values of step S103 and step S104, and comparing them with the count values of the next cycle, and reporting an interrupt when the difference is greater than a threshold, indicating that the cycle and duty cycle have changed.
[0146] In some embodiments, the threshold value in step S105 can be set according to the sensitivity of monitoring, and the minimum threshold value can be zero. As long as the number of cycles or duty cycles of two adjacent ones are different, an interrupt signal is reported.
[0147] In some embodiments, after step S105, the process further includes counting the number of period changes or the number of duty cycle changes, and comparing the number of changes with a period change threshold or a duty cycle change threshold, and generating a corresponding alarm signal when the threshold is exceeded.
[0148] In an exemplary embodiment, the pulse monitoring module is used to perform period monitoring and duty cycle monitoring on pulse signals with any duty cycle, and the clock monitoring module is used to perform frequency deviation monitoring and in-position monitoring on pulse signals (ie, clock signals) with a duty cycle of 50%.
[0149] Fig. 9 is a schematic diagram of the processing flow of the clock monitoring module in an embodiment of the present application, such as Fig. 9 As shown, the clock monitoring module includes the following structure:
[0150] The frequency divider provides clocks of different frequencies and divides the original clock frequency to be tested to achieve the purpose of frequency reduction.
[0151] The synchronizer realizes the synchronous release of asynchronous signals in the input clock domain through synchronous processing. The clock signal to be tested can be synchronized to the desired clock domain for release, and the probability of metastable state that may occur when the clock signal to be tested is released due to crossing clock domains can be reduced.
[0152] The rising edge sampler is used to monitor the rising edge of the clock signal to be measured.
[0153] The counter is used to realize the counting function, mainly to calculate the number of reference clocks between two adjacent rising edges of the clock to be measured.
[0154] The frequency deviation detection module is used to compare the count value with the frequency deviation lower limit value and the frequency deviation upper limit value to determine whether the clock is out of lock and output the frequency deviation status (ie, the frequency deviation detection signal).
[0155] The frequency detection module is used to calculate the frequency of the clock signal.
[0156] The presence detection module is used to compare the count value with the presence detection threshold value, thereby determining whether clock loss occurs and outputting a presence status (ie, a presence detection signal).
[0157] In this embodiment, the synchronizer is equivalent to the second synchronizer, the rising edge sampler is equivalent to the second edge monitoring module, and the counter is equivalent to the calculation module.
[0158] In some embodiments, the clock monitoring module also includes registers for storing processing results of other modules.
[0159] In some embodiments, the clock monitoring module supports three functions, namely, clock frequency deviation monitoring and reporting, clock presence monitoring and reporting, and clock frequency monitoring.
[0160] In an exemplary embodiment, the workflow of the clock monitoring module for monitoring and reporting clock frequency deviation may include the following steps:
[0161] Step S201, generating a configurable frequency division coefficient, which may be derived from other clock domains, and then needs to be synchronized to the clock domain to be tested, and then used in subsequent frequency division units after the signal is stable.
[0162] In step S202, the clock to be tested is divided, wherein the division coefficient comes from step S201, and the clock to be tested is divided to at least one half of the reference clock. The reference clock serves as the only reference for the clock monitoring module and can be derived from an external crystal oscillator or a stable clock generating unit. The stability of the reference clock must be ensured.
[0163] Step S203, synchronize the divided clock to be tested in the reference clock domain, synchronize it in the reference clock domain, and use it for the rising edge sampler. Each cycle after the division is used as a cycle of the counter. If the frequency of the clock to be tested is normal, then the count value will be the frequency ratio of the reference clock and the divided clock to be tested.
[0164] Step S204, generating a counting flag, counting to the frequency division flag being pulled high and then cleared and counting again, this flag is the rising edge of the clock to be measured after frequency division in the reference clock domain, and the high level duration is one reference clock cycle.
[0165] Step S205, counting starts from zero in the reference clock domain, and when the counting flag is pulled high, it is cleared and restarted.
[0166] Step S206, judging whether the counting period is within an acceptable range. According to the requirements for clock quality, the frequencies of the clock to be measured and the reference clock can provide upper and lower threshold values for counting. If the counting value is lower than the lower limit or higher than the upper limit, a clock frequency abnormality will be reported.
[0167] In the embodiment of the present application, the division coefficient and threshold of the clock to be tested can be flexibly configured. For different chips and scenarios, it is only necessary to modify the parameters according to the actual situation, and the system has greater flexibility and maintainability.
[0168] In an exemplary embodiment, the workflow of the clock monitoring module for monitoring and reporting the clock in place may include the following steps:
[0169] Step S301, generate a configurable frequency division coefficient, which can be derived from other clock domains, and then need to be synchronized to the clock domain to be tested, and then used in subsequent frequency division units after the signal is stable.
[0170] In step S302, the clock to be tested is divided, wherein the division coefficient comes from step S301, and the clock to be tested is divided to at least one half of the reference clock. The reference clock serves as the only reference of this monitoring unit and can be derived from an external crystal oscillator or a stable clock generating unit. The stability of the reference clock must be guaranteed.
[0171] Step S303, synchronize the divided clock to be tested in the reference clock domain, synchronize it in the reference clock domain, and use it for the rising edge sampler. Each cycle after the division is used as a cycle of the counter. If the frequency of the clock to be tested is normal, then the count value will be the frequency ratio of the reference clock and the divided clock to be tested.
[0172] Step S304, generating a counting flag, counting to the frequency division flag being pulled high and then cleared and counting again, this flag is the rising edge of the clock to be measured after frequency division in the reference clock domain, and the high level duration is one reference clock cycle.
[0173] Step S305, counting starts from zero in the reference clock domain, and clears to zero and restarts when the counting flag is pulled high.
[0174] Step S306, compare the count value in step S305 with the set threshold. When the count value is greater than the threshold, it means that the clock has not flipped as expected, and the loss alarm is raised.
[0175] In an exemplary embodiment, the workflow of the clock monitoring module for performing clock frequency monitoring may include the following steps:
[0176] Step S401, generating a configurable frequency division coefficient, which may be derived from other clock domains, and then needs to be synchronized to the clock domain to be tested, and then used in subsequent frequency division units after the signal is stable.
[0177] In step S402, the clock to be tested is divided, wherein the division coefficient comes from step S401, and the clock to be tested is divided to at least one-half of the reference clock. The reference clock serves as the only reference of this monitoring unit and can be derived from an external crystal oscillator or a stable clock generating unit. The stability of the reference clock must be guaranteed.
[0178] Step S403, synchronize the divided clock to be tested in the reference clock domain, synchronize it in the reference clock domain, and use it for the rising edge sampler. Each cycle after the division is used as a cycle of the counter. If the frequency of the clock to be tested is normal, then the count value will be the frequency ratio of the reference clock and the divided clock to be tested.
[0179] Step S404, generating a counting flag, counting to the frequency division flag being pulled high and then cleared and counting again, this flag is the rising edge of the clock to be measured after frequency division in the reference clock domain, and the high level duration is one reference clock cycle.
[0180] Step S405, counting starts from zero in the reference clock domain, and when the count flag is pulled high, it is cleared and restarted, and the count value is output. According to the reference clock frequency and the frequency division coefficient, the frequency of the clock to be measured can be calculated from the count value.
[0181] Fig.10 is a schematic diagram of a signal aggregation process of multiple clock monitoring modules in an embodiment of the present application, such as Fig.10 As shown, multiple clock signals to be tested can be monitored by instantiating the clock monitoring module multiple times.
[0182] In this embodiment, the monitoring result of the clock monitoring module can be sent by register reading and writing. If the output status of multiple clock sources needs to be summarized, a one-bit status bit can be generated through the summary logic for reporting.
[0183] In some embodiments, if certain scenarios are not sensitive to clock frequency deviation or in-bit status, mask bits can be added to determine whether the monitoring results are output by configuring the mask bits. However, the mask value does not affect the operation of the monitoring module. The clock monitoring module is only affected by the internal enable signal of the module.
[0184] In this embodiment, the mask includes a frequency deviation detection mask and a presence monitoring mask.
[0185] In some embodiments, the effective level and level of the mask can be set according to actual needs.
[0186] In an exemplary embodiment, taking the two-level mask high level as an example, when the mask bit is 1, the detection signal is shielded, and the detection signal is 1, which can indicate the output of an alarm signal. Each mask bit is inverted bit by bit and then ANDed with the corresponding frequency deviation / in-place detection signal. Only when the mask bit is 0 and the detection signal is 1, an alarm signal is output, and no alarm signal is output in other cases. When the signal is aggregated, an OR operation can be performed on multiple masked frequency deviation / in-place detection signals. As long as any frequency deviation / in-place alarm signal is output, the aggregated frequency deviation / in-place detection result is output as 1, generating an alarm.
[0187] In some embodiments, the logic operation process of the mask high level is as follows:
[0188] Y 0 =clock_unlock 0 &&(~mask 0 ) ...
[0190] Y N =clock_unlock N &&(~mask N )
[0191] Y total =|{Y 0 ,Y 1 ,Y 2 ,Y 3 ...Y N}
[0192] Among them, Y 0 , Y NIndicates the frequency deviation / in-place detection signals after mask processing. Since the frequency deviation abnormality can also be called clock lock, clock_un lock0 to clock_un lockN respectively represent the frequency deviation detection signals. The frequency deviation detection signal can be replaced by the in-place detection signal. Mask 0 、mask N Indicates the mask bit corresponding to each detection signal, Y total Indicates the summarized frequency deviation / presence detection results.
[0193] In an exemplary embodiment, taking the two-level mask low level as an example, when the mask bit is 0, the detection signal is shielded, and when the detection signal is 1, an alarm signal is output. An AND operation is performed on each mask bit and the corresponding frequency deviation / in-place detection signal. Only when the mask bit is 1 and the detection signal is 1, an alarm signal is output, and no alarm signal is output in other cases. When the signal is aggregated, an OR operation can be performed on multiple masked frequency deviation / in-place detection signals. As long as any frequency deviation / in-place alarm signal is output, the aggregated frequency deviation / in-place detection result is output as 1, generating an alarm.
[0194] In some embodiments, the logic operation process of the mask low level is as follows:
[0195] Y 0 =clock_unlock 0 &&(mask 0 ) ...
[0197] Y N =clock_unlock N &&(mask N )
[0198] Y total =|{Y 0 ,Y 1 ,Y 2 ,Y 3 ...Y N}
[0199] Among them, Y 0 , Y N Indicates the frequency deviation / in-place detection signals after mask processing. Since the frequency deviation is abnormal, it can also be called clock unlock. clock_unlock0 to clock_unlockN represent the frequency deviation detection signals respectively. Mask 0 、mask N Indicates the mask bit corresponding to each detection signal, Y total Indicates the summarized frequency deviation / presence detection results.
[0200] In some embodiments, when summarizing the clock presence status, the frequency deviation detection signal clock_unlock may be replaced by the presence detection signal.
[0201] Fig.11 is a waveform diagram of the pulse period monitoring module in the embodiment of the present application, such as Fig.11 As shown, the pulse cycle monitoring module involves the following signals:
[0202] Reference clock (ref_clk), input pulse (in_pulse), input pulse synchronization signal (in_pulse_sync), input frequency count flag (in_freq_cnt_flag), input frequency count (in_freq_cnt).
[0203] In this embodiment, the reference clock may come from a stable clock source such as an external crystal oscillator, an off-chip clock chip, etc. To ensure the accuracy of sampling, the reference clock frequency must be greater than twice the pulse frequency.
[0204] In this embodiment, the input pulse (in_pulse) is synchronized to the clock domain of the reference clock (ref_clk) to obtain an input pulse synchronization signal (in_pulse_sync). The input frequency count flag (in_freq_cnt_flag) is used as a cycle completion mark, which is triggered by the rising edge of the input pulse synchronization signal (in_pulse_sync) and can last for a reference signal cycle.
[0205] In this embodiment, the input frequency count (in_freq_cnt) is used to count the number of reference clocks between two adjacent input frequency count flags. After the counter counts from one flag bit to the next flag bit, it saves the current count value cnt and then clears it to start the next round of counting.
[0206] In some embodiments, if the frequency of the reference clock is known to be Fref, the frequency of the input pulse (i.e., the pulse signal to be measured) can be calculated using Fref / cnt or Fref / (cnt+1), where the specific use of cnt or cnt+1 is determined by the initial value of the counter. If the counter starts counting from 0, the input pulse frequency is Fref / cnt, and if the counter starts counting from 1, the input pulse frequency is Fref / (cnt+1).
[0207] Fig.12 is a waveform diagram of the pulse duty cycle monitoring module in the embodiment of the present application, such as Fig.12 As shown in the figure, the pulse duty cycle monitoring module involves the following signals:
[0208] Reference clock (ref_clk), input pulse (in_pulse), input pulse synchronization signal (in_pulse_sync), input frequency count flag (in_freq_cnt_flag), input duty cycle count (in_duty_cnt).
[0209] In this embodiment, the calculation of the duty cycle is similar to the frequency calculation, and both are performed by counting the reference clock to calculate the pulse length. The difference is that the pulse duty cycle monitoring module counts the high level of the pulse, and uses the rising edge sampling and falling edge clearing method to store the input duty cycle count (in_duty_cnt) into the register. Then, the duty cycle can be calculated based on the reference clock frequency and the input frequency count value (in_freq_cnt).
[0210] In an exemplary embodiment, assuming that the frequency count value of a single cycle is data_freq and the duty cycle count value is data_duty, the duty cycle can be expressed as: data_duty / data_freq or (data_duty+1) / (data_freq+1), and whether to add 1 depends on the initial value of the counter.
[0211] Through the embodiments of the present application, the duty cycle of any pulse signal can be calculated, thereby improving the applicability of the chip monitoring system. At the same time, fault monitoring can be performed by comparing the count values before and after the duty cycle / period of the pulse signal, thereby increasing the stability of the system.
[0212] An embodiment of the present application further provides a chip, which includes the pulse signal monitoring circuit in any one of the above embodiments.
[0213] In some embodiments, the chip can be applied to various scenarios such as automotive electronics, consumer electronics, and communications, etc. This application does not limit this.
[0214] An embodiment of the present application further provides an electronic device, which includes the pulse signal monitoring circuit in any one of the above embodiments.
[0215] In some embodiments, the device may also include the chip in the above embodiments.
[0216] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0217] The above is only an exemplary 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 principles of the present application shall be included in the protection scope of the present application.
Claims
1. A pulse signal monitoring circuit, characterized in that: The circuit includes a pulse monitoring module, and the pulse monitoring module includes: A pulse cycle monitoring module, used for monitoring the cycle of the pulse signal to be measured and the cycle change between two adjacent cycles based on the reference clock signal; A pulse duty cycle monitoring module is used to monitor the duty cycle of the pulse signal to be tested and the duty cycle change between two adjacent cycles based on the reference clock signal.
2. The circuit according to claim 1, characterized in that The pulse monitoring module also includes: A first synchronizer, used for synchronizing the input pulse signal to be tested to the clock domain of the reference clock signal to output a synchronization pulse signal; The pulse period monitoring module comprises: A rising edge monitoring module, whose input end is connected to the output end of the first synchronizer, is used to monitor the rising edge of the synchronization pulse signal and output a first trigger signal when the rising edge of the synchronization pulse signal arrives; The cycle calculation module, whose input end is connected to the output end of the rising edge monitoring module, is used to start counting the reference clock signal when the first trigger signal arrives, and end counting when the first trigger signal arrives next time, and output the pulse signal cycle.
3. The circuit according to claim 2, characterized in that The pulse period monitoring module also includes: The period change monitoring module has an input end connected to the output end of the period calculation module and is used to compare whether the periods of two adjacent pulse signals are the same. When the periods of the two adjacent pulse signals are different, a second trigger signal is output.
4. The circuit according to claim 3, characterized in that The pulse period monitoring module also includes: A change cycle counting module, whose input end is connected to the output end of the period change monitoring module, is used to count the second trigger signal.
5. The circuit according to claim 4, characterized in that The pulse cycle monitoring module is also used to compare the number of second trigger signals output by the change cycle counting module with a preset cycle change threshold, and output a cycle change alarm signal when the number of the second trigger signals is greater than the cycle change threshold.
6. The circuit according to claim 2, characterized in that The pulse duty cycle monitoring module comprises: A falling edge monitoring module, whose input end is connected to the output end of the first synchronizer, is used to monitor the falling edge of the synchronization pulse signal and output a third trigger signal when the falling edge of the synchronization pulse signal arrives; A duty cycle calculation module, whose input end is connected to the output end of the rising edge monitoring module and the output end of the falling edge monitoring module, is used to start counting the reference clock signal when the first trigger signal arrives, and end counting when the third trigger signal arrives to obtain the number of high-level pulses, determine the ratio of the number of high-level pulses to the pulse signal period as the pulse signal duty cycle, and output the pulse signal duty cycle.
7. The circuit according to claim 6, characterized in that The pulse duty cycle monitoring module also includes: The duty cycle change monitoring module has an input end connected to the output end of the duty cycle calculation module and is used to compare whether the duty cycles of two adjacent pulse signals are the same. When the duty cycles of the two adjacent pulse signals are different, a fourth trigger signal is output.
8. The circuit according to claim 7, characterized in that The pulse duty cycle monitoring module also includes: A duty cycle change counting module, whose input end is connected to the output end of the duty cycle change monitoring module, is used to count the fourth trigger signal.
9. The circuit according to claim 8, characterized in that The pulse duty cycle monitoring module is also used to compare the number of fourth trigger signals output by the duty cycle change counting module with a preset duty cycle change threshold, and output a duty cycle change alarm signal when the number of the fourth trigger signals is greater than the duty cycle change threshold.
10. The circuit according to claim 6, characterized in that In the case where the pulse period monitoring module and the pulse duty cycle monitoring module share an edge monitoring module, the rising edge monitoring module and the falling edge monitoring module are the same edge monitoring module.
11. The circuit according to claim 1, characterized in that The circuit further includes a clock monitoring module, and the clock monitoring module includes: A clock frequency deviation monitoring module, used to monitor the frequency and frequency deviation of the clock signal to be measured based on the reference clock signal; The clock presence monitoring module is used to monitor the presence status of the clock signal to be tested based on the reference clock signal.
12. The circuit according to claim 11, characterized in that The clock monitoring module also includes: A frequency divider, used for dividing the input clock signal to be measured based on a preset frequency division coefficient, and outputting a frequency division signal; A second synchronizer, whose input end is connected to the output end of the frequency divider, is used to synchronize the frequency-divided signal to the clock domain of the reference clock signal and output a synchronized clock signal; A second edge monitoring module, whose input end is connected to the output end of the second synchronizer, is used to monitor the rising edge of the synchronization clock signal and output a fifth trigger signal when the rising edge of the synchronization clock signal arrives; A counting module, whose input end is connected to the output end of the second edge monitoring module, is used to start counting the reference clock signal when the fifth trigger signal arrives, and to end counting when the fifth trigger signal arrives next time, and output the count value.
13. The circuit according to claim 12, characterized in that The clock frequency deviation monitoring module comprises: The frequency deviation detection module has an input end connected to the output end of the counting module and is used to output a frequency deviation alarm signal when the count value is greater than a preset frequency deviation upper limit or less than a preset frequency deviation lower limit.
14. The circuit according to claim 12, characterized in that The clock frequency deviation monitoring module comprises: A frequency detection module, whose input end is connected to the output end of the counting module, is used to determine the frequency of the clock signal to be measured according to the counting value, the frequency division coefficient and the reference clock frequency.
15. The circuit according to claim 12, characterized in that The clock presence monitoring module comprises: The in-place detection module has an input end connected to the output end of the counting module and is used to determine that the in-place state of the clock signal to be measured is a lost state and output an in-place alarm signal when the count value is greater than a preset in-place detection threshold.
16. The circuit according to claim 12, characterized in that In the case where the clock frequency deviation monitoring module and the clock presence monitoring module share the frequency divider, the second synchronizer, the second edge monitoring module and the counting module, the input end of the clock frequency deviation monitoring module and the input end of the clock presence monitoring module are connected to the output end of the same counting module; When the clock frequency deviation monitoring module and the clock presence monitoring module do not share the frequency divider, the second synchronizer, the second edge monitoring module and the counting module, the clock frequency deviation monitoring module and the clock presence monitoring module respectively include a group of the frequency divider, the second synchronizer, the second edge monitoring module and the counting module.
17. The circuit according to claim 11, characterized in that The circuit includes a plurality of the clock monitoring modules, and the circuit also includes a frequency deviation monitoring summary module and an in-position monitoring summary module, wherein: The multiple clock monitoring modules are used to output multiple frequency deviation detection signals and multiple in-place detection signals, wherein each of the clock signals to be measured is input into one of the clock monitoring modules, and a frequency deviation detection signal is output from the clock frequency deviation monitoring module of each of the clock monitoring modules, and a in-place detection signal is output from the clock in-place monitoring module of each of the clock monitoring modules, wherein the frequency deviation detection signal includes a frequency deviation alarm signal and a normal frequency deviation signal, and the in-place detection signal includes an in-place alarm signal and a normal in-place signal; The frequency deviation monitoring and summarizing module, whose input end is connected to the output ends of the multiple clock monitoring modules, receives the input multiple frequency deviation detection signals and a preset frequency deviation detection mask, determines whether each frequency deviation detection signal is output according to the frequency deviation detection mask, and performs an OR operation on the multiple frequency deviation detection signals after mask processing, and outputs a summarized frequency deviation detection result; The in-place monitoring summary module has an input end connected to the output ends of the multiple clock monitoring modules, receives the input multiple in-place detection signals and a preset in-place detection mask, determines whether each of the multiple in-place detection signals is output according to the in-place detection mask, performs an OR operation on the multiple in-place detection signals after mask processing, and outputs a summarized in-place detection result.
18. A chip, characterized in that: The chip includes the pulse signal monitoring circuit described in any one of claims 1 to 17.
19. An electronic device, characterized in that: The device comprises the pulse signal monitoring circuit described in any one of claims 1 to 17.