CN203951451U - A kind of circuit that detects clock source failure - Google Patents
A kind of circuit that detects clock source failure Download PDFInfo
- Publication number
- CN203951451U CN203951451U CN201420194395.9U CN201420194395U CN203951451U CN 203951451 U CN203951451 U CN 203951451U CN 201420194395 U CN201420194395 U CN 201420194395U CN 203951451 U CN203951451 U CN 203951451U
- Authority
- CN
- China
- Prior art keywords
- signal
- low
- frequency pulse
- pulse signal
- clock source
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Manipulation Of Pulses (AREA)
Abstract
本实用新型公开了一种检测时钟源故障的电路,包括:用于循环计时的第一计时器,第一计时器的计时周期大于等于低频脉冲信号的时钟周期;分别与时钟源和第一计时器相连的第一寄存器,第一寄存器用于锁存每一计时周期开始计时点的时钟源产生的低频脉冲信号;分别与时钟源、第一计时器和第一寄存器相连的检测单元;检测单元用于在计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,输出第一指示信号,用于指示所述低频脉冲信号发生丢失;若否,输出第二指示信号,用于指示所述低频脉冲信号未发生丢失,本实用新型通过确定低频脉冲信号是否发生丢失,实现了对时钟源是否发生故障的检测。
The utility model discloses a circuit for detecting clock source faults, which comprises: a first timer for cycle timing, the timing period of the first timer is greater than or equal to the clock period of a low-frequency pulse signal; The first register connected to the timer, the first register is used to latch the low-frequency pulse signal generated by the clock source at the start timing point of each timing cycle; the detection unit connected to the clock source, the first timer and the first register respectively; the detection unit It is used to detect whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal within the timing period; if so, output the first indication signal to indicate that the low-frequency pulse signal is lost; if not, The second indication signal is output to indicate that the low-frequency pulse signal is not lost. The utility model realizes the detection of whether the clock source fails by determining whether the low-frequency pulse signal is lost.
Description
技术领域 technical field
本实用新型涉及电力自动化技术领域,更具体的说是涉及一种检测时钟源故障的电路。 The utility model relates to the technical field of electric power automation, in particular to a circuit for detecting clock source faults. the
背景技术 Background technique
在电力自动化技术领域中,通信设备与通信设备之间一般通过脉冲信号进行信息的传递,对于某一通信设备而言,一般具有多个时钟源,若当前所使用的时钟源发生故障时,可以切换到备份的另一个时钟源上。 In the field of power automation technology, communication equipment generally transmits information through pulse signals. For a certain communication equipment, there are generally multiple clock sources. If the currently used clock source fails, it can Switch to another backup clock source. the
由上述描述可知,当前所使用的时钟源是否发生故障,成为通信设备正常工作的重要问题,因此,如何对时钟源进行检测,以保证其使用性能为本领域的技术人员迫切需要解决的技术问题。 From the above description, it can be seen that whether the currently used clock source fails has become an important issue for the normal operation of communication equipment. Therefore, how to detect the clock source to ensure its performance is an urgent technical problem to be solved by those skilled in the art. . the
实用新型内容 Utility model content
有鉴于此,本实用新型提供一种检测时钟源故障的电路,以实现对当前所使用的时钟源是否发生故障进行检测。 In view of this, the utility model provides a circuit for detecting a clock source failure, so as to detect whether the currently used clock source fails. the
为实现上述目的,本实用新型提供如下技术方案: In order to achieve the above object, the utility model provides the following technical solutions:
一种检测时钟源故障的电路,所述时钟源用于产生低频脉冲信号,该电路包括: A circuit for detecting a clock source failure, the clock source is used to generate a low-frequency pulse signal, the circuit includes:
用于循环计时的第一计时器,所述第一计时器的计时周期大于等于所述低频脉冲信号的时钟周期; A first timer for cycle timing, the timing period of the first timer is greater than or equal to the clock period of the low-frequency pulse signal;
分别与所述时钟源和所述第一计时器相连的第一寄存器,所述第一寄存器用于锁存每一计时周期开始计时点的所述时钟源产生的低频脉冲信号; A first register connected to the clock source and the first timer respectively, the first register is used to latch the low-frequency pulse signal generated by the clock source at the start timing point of each timing cycle;
分别与所述时钟源、所述第一计时器和所述第一寄存器相连的检测单元; A detection unit connected to the clock source, the first timer and the first register respectively;
其中,所述检测单元用于在计时周期内,检测所述时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,输出第一指示信号,所述第一指示信号用于指示所述低频脉冲信号发生丢失;若否,输出第二指示信号,所述第二指示信号用于指示所述低频脉冲信号未发生丢失。 Wherein, the detection unit is used to detect whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal within the timing period; if so, output a first indication signal, and the first indication signal It is used to indicate that the low-frequency pulse signal is lost; if not, a second indication signal is output, and the second indication signal is used to indicate that the low-frequency pulse signal is not lost. the
优选的,所述检测单元包括: Preferably, the detection unit includes:
第一输入端与所述时钟源相连,第二输入端与所述第一寄存器相连的逻辑电路,所述逻辑电路用于比较所述时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号是否相同,并依据比较结果,输出第一信号; A logic circuit in which the first input end is connected to the clock source and the second input end is connected to the first register, and the logic circuit is used to compare the current low-frequency pulse signal generated by the clock source with the latched low-frequency pulse Whether the signals are the same, and output the first signal according to the comparison result;
分别与逻辑电路的输出端、所述第一计时器相连的第二寄存器,所述第二寄存器的输出信号在每一计时周期开始计时点时置为第二信号; The second register connected to the output terminal of the logic circuit and the first timer respectively, the output signal of the second register is set as the second signal when the timing point of each timing cycle is started;
所述第二寄存器用于在计时周期内,记录到所述逻辑电路输出的第一信号为用于表征过所述当前低频脉冲信号与所锁存的低频脉冲信号不同时,输出第三信号;记录到所述逻辑电路输出的第一信号为用于一直表征所述当前低频脉冲信号与所锁存的低频脉冲信号相同时,保持输出第二信号; The second register is used to output a third signal when it is recorded that the first signal output by the logic circuit is different from the latched low-frequency pulse signal during the timing period; It is recorded that the first signal output by the logic circuit is used to always indicate that the current low-frequency pulse signal is the same as the latched low-frequency pulse signal, and keep outputting the second signal;
分别与所述第一计时器和所述第二寄存器相连的第三寄存器,用于在每一计时周期的开始计时点锁存所述第二寄存器输出的信号,并在所锁存的信号为第二信号时,输出第一指示信号,在所锁存的信号为第三信号时,输出第二指示信号。 The third register connected to the first timer and the second register is used to latch the signal output by the second register at the start timing point of each timing cycle, and when the latched signal is When the signal is the second signal, the first indication signal is output, and when the latched signal is the third signal, the second indication signal is output. the
优选的,还包括与所述检测单元的相连的第二计时器; Preferably, it also includes a second timer connected to the detection unit;
所述第二计时器用于在所述检测单元输出第一指示信号时,开始计时; The second timer is used to start timing when the detection unit outputs the first indication signal;
在所述检测单元输出第二指示信号时,清零。 When the detection unit outputs the second indication signal, it is cleared. the
优选的,所述逻辑电路为异或门逻辑电路; Preferably, the logic circuit is an XOR gate logic circuit;
当所述当前低频脉冲信号与所锁存的低频脉冲信号相同时,所述第一信号为低电平信号; When the current low-frequency pulse signal is the same as the latched low-frequency pulse signal, the first signal is a low-level signal;
当所述当前低频脉冲信号与所锁存的低频脉冲信号不同时,所述第一信号为高电平信号; When the current low-frequency pulse signal is different from the latched low-frequency pulse signal, the first signal is a high-level signal;
所述第二信号为高电平信号;所述第三信号为低电平信号; The second signal is a high level signal; the third signal is a low level signal;
或,所述逻辑电路为同或门逻辑电路; Or, the logic circuit is an NOR gate logic circuit;
当所述当前低频脉冲信号与所锁存的低频脉冲信号相同时,所述第一信号为高电平信号; When the current low-frequency pulse signal is the same as the latched low-frequency pulse signal, the first signal is a high-level signal;
当所述当前低频脉冲信号与所锁存的低频脉冲信号不同时,所述第一信号为低电平信号; When the current low-frequency pulse signal is different from the latched low-frequency pulse signal, the first signal is a low-level signal;
所述第二信号为低电平信号;所述第三信号为高电平信号。 The second signal is a low level signal; the third signal is a high level signal. the
一种检测时钟源故障的电路,包括处理器,所述处理器具有输入端和输出端,所述输入端用于与所述时钟源相连,所述时钟源用于产生低频脉冲信号;所述输出端用于输出指示信号; A circuit for detecting a clock source failure, including a processor, the processor has an input terminal and an output terminal, the input terminal is used to be connected to the clock source, and the clock source is used to generate a low-frequency pulse signal; the The output terminal is used to output the indication signal;
所述处理器用于锁存每一计时周期开始计时点的所述时钟源产生的低频脉冲信号;并在计时周期内,检测所述时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,输出第一指示信号,所述第一指示信号用于指示所述低频脉冲信号发生丢失;若否,输出第二指示信号,所述第二指示信号用于指示所述低频脉冲信号未发生丢失; The processor is used to latch the low-frequency pulse signal generated by the clock source at the start timing point of each timing cycle; and detect whether the current low-frequency pulse signal generated by the clock source is consistent with the latched low-frequency pulse signal within the timing cycle. The pulse signals are the same; if so, output a first indication signal, and the first indication signal is used to indicate that the low-frequency pulse signal is lost; if not, output a second indication signal, and the second indication signal is used to indicate that the low-frequency pulse signal is lost. The pulse signal is not lost;
其中,所述计时周期大于等于所述低频脉冲信号的时钟周期。 Wherein, the timing period is greater than or equal to the clock period of the low-frequency pulse signal. the
优选的,所述处理器输出第一指示信号具体为: Preferably, the first indication signal output by the processor is specifically:
所述处理器在所述时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号持续相同的时间达到预设时间时,输出第一指示信号。 The processor outputs a first indication signal when the current low-frequency pulse signal generated by the clock source lasts for the same time as the latched low-frequency pulse signal for a preset time. the
经由上述的技术方案可知,与现有技术相比,本实用新型实施例公开了一种检测时钟源故障的电路,包括处理器,该处理器的输入端用于与时钟源相连,输出端用于输出指示信号,通过锁存每一计时周期开始计时点的所述时钟源产生的低频脉冲信号;并在计时周期内,检测所述时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,输出第一指示信号,所述第一指示信号用于指示所述低频脉冲信号发生丢失,当低频脉冲信号发生丢失时,可以确定时钟源发生了故障;若否,输出第二指示信号,所述第二指示信号用于指示所述低频脉冲信号未发生丢失,当低频脉冲信号未发生丢失时,则可以确定时钟源未发生故障,由此可见,本实用新型通过确定低频脉冲信号是否发生丢失,实现了对时钟源是否发生故障的检测。 It can be known from the above technical solutions that, compared with the prior art, the embodiment of the present invention discloses a circuit for detecting clock source faults, including a processor, the input end of the processor is used to connect with the clock source, and the output end is used to In outputting the indication signal, by latching the low-frequency pulse signal generated by the clock source at the start timing point of each timing cycle; and in the timing cycle, detecting whether the current low-frequency pulse signal generated by the clock source is always consistent with the The low-frequency pulse signals are the same; if so, output a first indication signal, the first indication signal is used to indicate that the low-frequency pulse signal is lost, and when the low-frequency pulse signal is lost, it can be determined that the clock source has failed; if not, output The second indication signal, the second indication signal is used to indicate that the low-frequency pulse signal is not lost. When the low-frequency pulse signal is not lost, it can be determined that the clock source has not failed. It can be seen that the utility model determines Whether the low-frequency pulse signal is lost realizes the detection of whether the clock source fails. the
附图说明 Description of drawings
为了更清楚地说明本实用新型实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本实用新型的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。 In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description It is only an embodiment of the utility model, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work. the
图1为本实用新型实施例公开的一种检测时钟源故障的电路的一个实施例的结构示意图; Fig. 1 is a schematic structural diagram of an embodiment of a circuit for detecting a clock source failure disclosed in an embodiment of the present invention;
图2为本实用新型实施例公开的一种检测时钟源故障的电路的另一个实施例的结构示意图; Fig. 2 is a schematic structural diagram of another embodiment of a circuit for detecting a clock source failure disclosed in an embodiment of the present invention;
图3为本实用新型实施例公开的一种检测时钟源故障的电路的又一个实施例的结构示意图; Fig. 3 is a schematic structural diagram of another embodiment of a circuit for detecting a clock source failure disclosed in an embodiment of the present invention;
图4为本实用新型实施例公开的另一种检测时钟源故障的电路的一个实施例的结构示意图。 FIG. 4 is a schematic structural diagram of an embodiment of another circuit for detecting a clock source failure disclosed in an embodiment of the present invention. the
具体实施方式 Detailed ways
下面将结合本实用新型实施例中的附图,对本实用新型实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本实用新型一部分实施例,而不是全部的实施例。基于本实用新型中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本实用新型保护的范围。 The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. example. Based on the embodiments of the present utility model, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of the present utility model. the
本实用新型公开了一种检测时钟源故障的电路,其中,该时钟源为通信设备的当前时钟源,用于产生低频脉冲信号,本实用新型并不对低频脉冲信号的时钟频率进行限定,例如,低频脉冲信号可以为秒脉冲信号。 The utility model discloses a circuit for detecting the failure of a clock source, wherein the clock source is the current clock source of communication equipment and is used to generate a low-frequency pulse signal. The utility model does not limit the clock frequency of the low-frequency pulse signal, for example, The low-frequency pulse signal can be a second pulse signal. the
如图1所示,该电路可以包括:第一计时器200、第一寄存器300、检测单元400,其中: As shown in Figure 1, the circuit may include: a first timer 200, a first register 300, and a detection unit 400, wherein:
第一计时器200用于循环计时,其中,第一计时器的计时周期大于等于所述低频脉冲信号的时钟周期;需要说明的是,该计时周期具体可以为该时钟源的时钟周期与允许该时钟源产生的最大频偏之和,具体可以根据实际情况设定,本实用新型并不进行限定。 The first timer 200 is used for cyclic timing, wherein the timing period of the first timer is greater than or equal to the clock period of the low-frequency pulse signal; The sum of the maximum frequency offsets generated by the clock source can be specifically set according to actual conditions, and the present invention does not limit it. the
例如,低频脉冲信号的时钟周期为1秒,允许该时钟源产生的最大频偏为时钟周期的百分之十,那么,该计时周期则为1.1秒。 For example, the clock period of the low-frequency pulse signal is 1 second, and the maximum frequency deviation allowed by the clock source is 10% of the clock period, then the timing period is 1.1 seconds. the
第一寄存器300分别与第一计时器200以及时钟源相连,第一寄存器用于锁存每一计时周期开始计时点的时钟源产生的低频脉冲信号;也就是说, 第一寄存器在第一计时器的每一计时周期的开始计时点锁存时钟源产生的低频脉冲信号。 The first register 300 is connected with the first timer 200 and the clock source respectively, and the first register is used for latching the low-frequency pulse signal produced by the clock source at the start timing point of each timing cycle; The low-frequency pulse signal generated by the clock source is latched at the start timing point of each timing cycle of the timer. the
检测单元400分别与第一计时器200、第一寄存器300以及时钟源相连; The detection unit 400 is connected to the first timer 200, the first register 300 and the clock source respectively;
其中,第一寄存器锁存时钟源产生的低频脉冲信号后,会将所锁存的低频脉冲信号发送给检测单元;而检测单元用于在计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,输出第一指示信号;若否,输出第二指示信号。 Wherein, after the first register latches the low-frequency pulse signal generated by the clock source, it will send the latched low-frequency pulse signal to the detection unit; and the detection unit is used to detect whether the current low-frequency pulse signal generated by the clock source is It is always the same as the latched low-frequency pulse signal; if yes, output the first indication signal; if not, output the second indication signal. the
需要说明的是,时钟源在正常工作状态下,即在未发生故障的情况下,不会丢失低频脉冲信号,即时钟源在每一时钟周期内均会产生低电平脉冲信号和高电平脉冲信号;那么,当前低频脉冲信号并不会一直与所锁存的低频脉冲信号相同,还会存在与所锁存的低频脉冲信号不同的情况。 It should be noted that the clock source will not lose the low-frequency pulse signal in the normal working state, that is, in the case of no failure, that is, the clock source will generate a low-level pulse signal and a high-level pulse signal in each clock cycle. pulse signal; then, the current low-frequency pulse signal will not always be the same as the latched low-frequency pulse signal, and may be different from the latched low-frequency pulse signal. the
例如,在某一时钟周期内,所锁存的低频脉冲信号为低电平脉冲信号,而在该时钟周期内,时钟源所产生的当前低频脉冲信号先为低电平脉冲信号后为高电脉冲信号。 For example, in a certain clock cycle, the latched low-frequency pulse signal is a low-level pulse signal, and in this clock cycle, the current low-frequency pulse signal generated by the clock source is first a low-level pulse signal and then a high-level pulse signal. Pulse signal. the
而时钟源在非正常工作状态下,即在发生故障的情况下,会丢失某些低频脉冲信号,即时钟源在某些时钟周期内可能仅产生低电平脉冲信号或仅产生高电平脉冲信号,在这种情况下,当前低频脉冲信号会一直与所锁存的低频脉冲信号相同。 However, when the clock source is in an abnormal working state, that is, in the event of a failure, some low-frequency pulse signals will be lost, that is, the clock source may only generate low-level pulse signals or only high-level pulses in certain clock cycles. signal, in this case, the current low-frequency pulse signal will always be the same as the latched low-frequency pulse signal. the
例如,在某一时钟周期内,所锁存的低频脉冲信号为低电平脉冲信号,而在该时钟周期内,时钟源所产生的当前低频脉冲信号一直为低电平脉冲信号。 For example, in a certain clock cycle, the latched low-frequency pulse signal is a low-level pulse signal, and in this clock cycle, the current low-frequency pulse signal generated by the clock source is always a low-level pulse signal. the
因此,检测单元可以通过在计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同,来确定时钟源所产生的低频脉冲信号是否发生丢失。 Therefore, the detection unit can determine whether the low-frequency pulse signal generated by the clock source is lost by detecting whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal within the timing period. the
其中,第一指示信号用于指示低频脉冲信号发生丢失,而第二指示信号用于指示低频脉冲信号未发生丢失。 Wherein, the first indication signal is used to indicate that the low-frequency pulse signal is lost, and the second indication signal is used to indicate that the low-frequency pulse signal is not lost. the
在本实用新型实施例中,检测时钟源故障的电路可以包括第一寄存器、第一计时器以及检测单元,第一计时器用于循环计时,第一寄存器用于锁存每一计时周期开始计时点的时钟源产生的低频脉冲信号;检测单元用于在计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉 冲信号相同;若是,输出第一指示信号,所述第一指示信号用于指示所述低频脉冲信号发生丢失,当低频脉冲信号发生丢失时,可以确认时钟源发生了故障;若否,输出第二指示信号,所述第二指示信号用于指示所述低频脉冲信号未发生丢失,当低频脉冲信号未发生丢失时,则可以确认时钟源未发生故障,由此可见,本实用新型通过确定低频脉冲信号是否发生丢失,实现了对时钟源是否发生故障的检测。 In the embodiment of the present utility model, the circuit for detecting the failure of the clock source may include a first register, a first timer and a detection unit, the first timer is used for cycle timing, and the first register is used for latching the start timing point of each timing cycle The low-frequency pulse signal generated by the clock source; the detection unit is used to detect whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal in the timing cycle; if so, output the first indication signal, and the The first indication signal is used to indicate that the low-frequency pulse signal is lost, and when the low-frequency pulse signal is lost, it can be confirmed that the clock source has failed; if not, a second indication signal is output, and the second indication signal is used to indicate the The low-frequency pulse signal is not lost. When the low-frequency pulse signal is not lost, it can be confirmed that the clock source has not failed. It can be seen that the utility model realizes whether the clock source fails by determining whether the low-frequency pulse signal is lost. detection. the
本实用新型另一实施例还提供了一种检测时钟源故障的电路,如图2所示,该电路可以包括第一计时器200、第一寄存器300以及检测单元400;检测单元400包括逻辑电路401、第二寄存器402、第三寄存器403;其中: Another embodiment of the utility model also provides a circuit for detecting clock source failure, as shown in Figure 2, the circuit may include a first timer 200, a first register 300, and a detection unit 400; the detection unit 400 includes a logic circuit 401, the second register 402, and the third register 403; wherein:
第一计时器200用于循环计时,其中,第一计时器的计时周期大于等于所述低频脉冲信号的时钟周期;需要说明的是,该计时周期具体可以为该时钟源的时钟周期与允许该时钟源产生的最大频偏之和,具体可以根据实际情况设定,本实用新型并不进行限定。 The first timer 200 is used for cyclic timing, wherein the timing period of the first timer is greater than or equal to the clock period of the low-frequency pulse signal; The sum of the maximum frequency offsets generated by the clock source can be specifically set according to actual conditions, and the present invention does not limit it. the
第一寄存器300分别与第一计时器200以及时钟源相连,第一寄存器用于锁存每一计时周期开始计时点的时钟源产生的低频脉冲信号;也就是说,第一寄存器在第一计时器的每一计时周期的开始计时点锁存时钟源产生的低频脉冲信号。 The first register 300 is connected with the first timer 200 and the clock source respectively, and the first register is used for latching the low-frequency pulse signal produced by the clock source at the start timing point of each timing cycle; The low-frequency pulse signal generated by the clock source is latched at the start timing point of each timing cycle of the timer. the
逻辑电路401的第一输入端与时钟源相连,第二输入端与第一寄存器300相连;该逻辑电路用于比较时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号是否相同,并依据比较结果,输出第一信号; The first input terminal of the logic circuit 401 is connected to the clock source, and the second input terminal is connected to the first register 300; the logic circuit is used to compare whether the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal, and Outputting the first signal according to the comparison result;
其中,该逻辑电路的具体实现形式并没有限定,例如,可以为异或门逻辑电路或同或门逻辑电路; Wherein, the specific implementation form of the logic circuit is not limited, for example, it may be an exclusive OR gate logic circuit or an exclusive OR gate logic circuit;
若逻辑电路为异或门逻辑电路,那么,当异或门逻辑电路比较当前低频脉冲信号与所锁存的低频脉冲信号相同时,输出的第一信号为低电平信号;当异或门逻辑电路比较当前低频脉冲信号与所锁存的低频脉冲信号不同时,输出的第一信号为高电平信号; If the logic circuit is an XOR gate logic circuit, then, when the XOR gate logic circuit compares the current low-frequency pulse signal with the latched low-frequency pulse signal to be the same, the first output signal is a low-level signal; When the circuit compares the current low-frequency pulse signal with the latched low-frequency pulse signal, the first output signal is a high-level signal;
若逻辑电路为同或门逻辑电路,那么,当同或门逻辑电路比较当前低频脉冲信号与所锁存的低频脉冲信号相同时,输出的第一信号为高电平信号; 当同或门逻辑电路比较当前低频脉冲信号与所锁存的低频脉冲信号不同时,输出的第一信号为低电平信号。 If the logic circuit is a NOR logic circuit, then, when the NOR logic circuit compares the current low-frequency pulse signal with the latched low-frequency pulse signal, the output first signal is a high-level signal; When the circuit compares that the current low-frequency pulse signal is different from the latched low-frequency pulse signal, the output first signal is a low-level signal. the
第二寄存器402分别与逻辑电路的输出端、第一计时器相连; The second register 402 is respectively connected with the output terminal of the logic circuit and the first timer;
该第二寄存器的输出信号在每一计时周期开始计时点置为第二信号; The output signal of the second register is set as the second signal at the start timing point of each timing cycle;
其中,第二寄存器用于在计时周期内,记录到逻辑电路输出的第一信号为用于表征过当前低频脉冲信号与所锁存的低频脉冲信号不同时,输出第三信号;记录到逻辑电路输出的第一信号为用于一直表征所述当前低频脉冲信号与所锁存的低频脉冲信号相同时,保持输出第二信号; Wherein, the second register is used to record the first signal output by the logic circuit in the timing cycle to output the third signal when the current low-frequency pulse signal is different from the latched low-frequency pulse signal; record to the logic circuit The first output signal is used to always indicate that when the current low-frequency pulse signal is the same as the latched low-frequency pulse signal, keep outputting the second signal;
其中,第二信号和第三信号的具体实现形式本实用新型并不做限定,可以根据实际情况进行设定; Wherein, the specific implementation form of the second signal and the third signal is not limited in the present invention, and can be set according to the actual situation;
例如,若第一信号为低电平信号时,用于表征当前低频脉冲信号与所锁存的低频脉冲信号相同;第一信号为高电平信号时,用于表征当前低频脉冲信号与所锁存的低频脉冲信号不同;那么,第二信号可以为高电平信号,第三信号可以为低电平信号; For example, if the first signal is a low-level signal, it is used to indicate that the current low-frequency pulse signal is the same as the locked low-frequency pulse signal; when the first signal is a high-level signal, it is used to indicate that the current low-frequency pulse signal is the same as the locked low-frequency pulse signal. The stored low-frequency pulse signals are different; then, the second signal can be a high-level signal, and the third signal can be a low-level signal;
或者,若第一信号为高电平信号时,用于表征当前低频脉冲信号与所锁存的低频脉冲信号相同;第一信号为低电平信号时,用于表征当前低频脉冲信号与所锁存的低频脉冲信号不同;那么,第二信号可以为低电平信号,第三信号可以为高电平信号。 Or, if the first signal is a high-level signal, it is used to indicate that the current low-frequency pulse signal is the same as the locked low-frequency pulse signal; when the first signal is a low-level signal, it is used to indicate that the current low-frequency pulse signal is the same as the locked low-frequency pulse signal. The stored low-frequency pulse signals are different; then, the second signal can be a low-level signal, and the third signal can be a high-level signal. the
需要说明的是,时钟源在正常工作状态下,即未发生故障情况下,时钟源在每一时钟周期均会产生高电平脉冲信号和低电平脉冲信号;那么,当前低频脉冲信号并不会一直与所锁存的低频脉冲信号相同,还会存在与所锁存的低频脉冲信号不同的情况。在这种情况下,逻辑电路输出的第一信号是发生变化的,即第一信号不仅表征过当前低频脉冲信号与所锁存的低频脉冲信号相同,还表征过当前低频脉冲信号与所锁存的低频脉冲信号不同。因此,第二寄存器在记录到第一信号为用于表征过当前低频脉冲信号与所锁存的低频脉冲信号不同时,则输出第三信号。 It should be noted that, when the clock source is in a normal working state, that is, when no fault occurs, the clock source will generate a high-level pulse signal and a low-level pulse signal in each clock cycle; then, the current low-frequency pulse signal does not It will always be the same as the latched low-frequency pulse signal, and may be different from the latched low-frequency pulse signal. In this case, the first signal output by the logic circuit changes, that is, the first signal not only indicates that the current low-frequency pulse signal is the same as the latched low-frequency pulse signal, but also indicates that the current low-frequency pulse signal is the same as the latched low-frequency pulse signal. The low-frequency pulse signal is different. Therefore, when the second register records that the first signal is used to indicate that the current low-frequency pulse signal is different from the latched low-frequency pulse signal, it outputs the third signal. the
例如,若第一信号为低电平信号时,用于表征当前低频脉冲信号与所锁存的低频脉冲信号相同;第一信号为高电平信号时,用于表征当前低频脉冲信号与所锁存的低频脉冲信号不同;那么,当第二寄存器记录到第一信号为过高电平信号时,则输出第三信号。 For example, if the first signal is a low-level signal, it is used to indicate that the current low-frequency pulse signal is the same as the locked low-frequency pulse signal; when the first signal is a high-level signal, it is used to indicate that the current low-frequency pulse signal is the same as the locked low-frequency pulse signal. The stored low-frequency pulse signals are different; then, when the second register records that the first signal is an over-high level signal, the third signal is output. the
需要说明的是,时钟源在非正常工作状态,即发生故障情况下,时钟源在某些时钟周期会仅产生高电平脉冲信号或低电平脉冲信号,那么,当前低频脉冲信号会一直与所锁存的低频脉冲信号相同。在这种情况下,逻辑电路输出的第一信号是不发生变化的,即第一信号为用于一直表征当前低频脉冲信号与所锁存的低频脉冲信号相同。因此,第二寄存器在记录到第一信号为用于一直表征当前低频脉冲信号与所锁存的低频脉冲信号相同时,保持输出第二信号。 It should be noted that when the clock source is in an abnormal working state, that is, when a fault occurs, the clock source will only generate a high-level pulse signal or a low-level pulse signal in some clock cycles, then the current low-frequency pulse signal will always be consistent with The latched low-frequency pulse signals are the same. In this case, the first signal output by the logic circuit does not change, that is, the first signal always indicates that the current low-frequency pulse signal is the same as the latched low-frequency pulse signal. Therefore, when the second register records that the first signal is used to always represent that the current low-frequency pulse signal is the same as the latched low-frequency pulse signal, it keeps outputting the second signal. the
例如,若第一信号为低电平信号时,用于表征当前低频脉冲信号与所锁存的低频脉冲信号相同;第一信号为高电平信号时,用于表征当前低频脉冲信号与所锁存的低频脉冲信号不同;那么,当第二寄存器记录到第一信号一直为低电平信号时,则保持输出第二信号。 For example, if the first signal is a low-level signal, it is used to indicate that the current low-frequency pulse signal is the same as the locked low-frequency pulse signal; when the first signal is a high-level signal, it is used to indicate that the current low-frequency pulse signal is the same as the locked low-frequency pulse signal. The stored low-frequency pulse signals are different; then, when the second register records that the first signal is always a low-level signal, it keeps outputting the second signal. the
第三寄存器403分别与第二寄存器402以及第一计时器200相连; The third register 403 is connected to the second register 402 and the first timer 200 respectively;
其中,第三寄存器用于在每一计时周期的开始计时点锁存第二寄存器输出的信号,并在所锁存的信号为第二信号时,输出第一指示信号,以指示低频脉冲信号发生了丢失;在所锁存的信号为第三信号时,输出第二指示信号,以指示低频脉冲信号未发生丢失。 Wherein, the third register is used to latch the signal output by the second register at the start timing point of each timing cycle, and when the latched signal is the second signal, output the first indication signal to indicate the occurrence of the low-frequency pulse signal When the latched signal is the third signal, a second indication signal is output to indicate that the low-frequency pulse signal is not lost. the
需注意的是,寄存器在跳变时存在延迟,因此,即便第二寄存器在计时周期的开始计时点由第三信号置为第二信号,第三寄存器也可以在计时周期的开始计时点锁存到第三信号。 It should be noted that there is a delay when the register jumps, so even if the second register is set to the second signal by the third signal at the start timing point of the timing cycle, the third register can also be latched at the start timing point of the timing cycle to the third signal. the
在实际应用中,检测时钟源故障的电路对不同的低频脉冲信号的敏感度可能不同,因此,在本实用新型中,确定低频脉冲信号是否发生丢失的标准也不同; In practical applications, the circuit for detecting clock source failure may have different sensitivities to different low-frequency pulse signals. Therefore, in the utility model, the criteria for determining whether the low-frequency pulse signal is lost are also different;
当检测时钟源故障的电路对低频脉冲信号敏感度高时,通过检测单元输出第一指示信号或者第二指示信号则可确定低频脉冲信号是否发生丢失。 When the circuit for detecting the failure of the clock source is highly sensitive to the low-frequency pulse signal, it can be determined whether the low-frequency pulse signal is lost through the detection unit outputting the first indication signal or the second indication signal. the
当检测时钟源故障的电路对低频脉冲信号敏感度低时,该电路还可以包括第二计时器,如图3所示,该电路可以包括:第一计时器200、第一寄存器300、检测单元400、第二计时器500,其中: When the circuit for detecting clock source failure has low sensitivity to low-frequency pulse signals, the circuit can also include a second timer, as shown in Figure 3, the circuit can include: a first timer 200, a first register 300, a detection unit 400, the second timer 500, wherein:
第一计时器200用于循环计时。 The first timer 200 is used for cycle timing. the
第一寄存器300分别与第一计时器200以及时钟源相连,第一寄存器用于锁存每一计时周期开始计时点的时钟源产生的低频脉冲信号; The first register 300 is connected to the first timer 200 and the clock source respectively, and the first register is used to latch the low-frequency pulse signal generated by the clock source at the start timing point of each timing cycle;
检测单元400分别与第一计时器200、第一寄存器300以及时钟源相连; The detection unit 400 is connected to the first timer 200, the first register 300 and the clock source respectively;
其中,第一寄存器锁存时钟源产生的低频脉冲信号后,会将所锁存的低频脉冲信号发送给检测单元;而检测单元用于在计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,输出第一指示信号;若否,输出第二指示信号; Wherein, after the first register latches the low-frequency pulse signal generated by the clock source, it will send the latched low-frequency pulse signal to the detection unit; and the detection unit is used to detect whether the current low-frequency pulse signal generated by the clock source is It is always the same as the latched low-frequency pulse signal; if yes, output the first indication signal; if not, output the second indication signal;
第二计时器500与检测单元400相连; The second timer 500 is connected with the detection unit 400;
其中,第二计时器用于在检测单元输出第一指示信号时,开始计时; Wherein, the second timer is used to start timing when the detection unit outputs the first indication signal;
在检测单元输出第二指示信号时,清零。 When the detection unit outputs the second indication signal, it is cleared to zero. the
需要说明的是,图3所对应的电路也可以包括第二计时器,那么,第二计时器可以与第三寄存器相连,用于在第三寄存器输出第一指示信号时,开始计时,在第三寄存器输出第二指示信号时,清零。 It should be noted that the circuit corresponding to FIG. 3 may also include a second timer. Then, the second timer may be connected with the third register for timing when the third register outputs the first indication signal. When the third register outputs the second indication signal, it is cleared. the
具体的,第二计时器在检测单元输出第一指示信号时开始计时,若检测单元连续多个计时周期一直输出第一指示信号,那么,该第二计时器会持续计时,当计时时间达到预设时间时,则可以认定低频脉冲信号发生了丢失,进而可以确定时钟源发生故障。 Specifically, the second timer starts counting when the detection unit outputs the first indication signal. If the detection unit outputs the first indication signal for a plurality of consecutive counting cycles, then the second timer will continue counting. When the counting time reaches the predetermined When setting the time, it can be determined that the low-frequency pulse signal is lost, and then it can be determined that the clock source is faulty. the
而在第二计时时间在未达到预设时间前,若在某一计时周期内,检测单元输出第二指示信号,那么第二计时器清零,此时,可以认定低频脉冲信号未发生丢失,进而可以确定时钟源未发生故障。 And before the second timing time does not reach the preset time, if within a certain timing period, the detection unit outputs the second indication signal, then the second timer is cleared, at this time, it can be determined that the low-frequency pulse signal is not lost, In turn, it can be determined that the clock source has not failed. the
本实用新型实施例还公开了另一种检测时钟源故障的电路,如图4所示,该电路可以包括处理器100,该处理器具有输入端101和输出端102,其中: The embodiment of the utility model also discloses another circuit for detecting clock source failure, as shown in Figure 4, the circuit may include a processor 100, the processor has an input terminal 101 and an output terminal 102, wherein:
处理器100的输入端101用于与时钟源相连,该时钟源为通信设备的当前时钟源,用于产生低频脉冲信号;本实用新型并不对低频脉冲信号的时钟频率进行限定,例如,低频脉冲信号可以为秒脉冲信号。 The input end 101 of the processor 100 is used to be connected with the clock source, and this clock source is the current clock source of communication equipment, is used for generating the low-frequency pulse signal; The utility model does not limit the clock frequency of the low-frequency pulse signal, for example, low-frequency pulse The signal can be a second pulse signal. the
处理器100的输出端100用于输出指示信号,该指示信号能够指示时钟源所产生的低频脉冲信号是否发生丢失。 The output terminal 100 of the processor 100 is used to output an indication signal, and the indication signal can indicate whether the low-frequency pulse signal generated by the clock source is lost. the
具体的,该处理器用于锁存每一计时周期开始计时点的时钟源产生的低频脉冲信号; Specifically, the processor is used to latch the low-frequency pulse signal generated by the clock source at the start timing point of each timing cycle;
其中,该处理器可以循环计时,计时周期大于等于低频脉冲信号的时钟周期,需要说明的是,该计时周期可以为该时钟源的时钟周期与允许该时钟源产生的最大频偏之和,具体可以根据实际情况设定,本实用新型并不进行限定。 Wherein, the processor can be cyclically timed, and the timing period is greater than or equal to the clock period of the low-frequency pulse signal. It should be noted that the timing period can be the sum of the clock period of the clock source and the maximum frequency deviation allowed to be generated by the clock source. Specifically It can be set according to the actual situation, and the utility model does not limit it. the
例如,低频脉冲信号的时钟周期为1秒,允许该时钟源产生的最大频偏为时钟周期的百分之十,那么,该计时周期则为1.1秒。 For example, the clock period of the low-frequency pulse signal is 1 second, and the maximum frequency deviation allowed by the clock source is 10% of the clock period, then the timing period is 1.1 seconds. the
该处理器用于锁存每一计时周期开始计时点的时钟源产生的低频脉冲信号后,可以在计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,输出第一指示信号;若否,输出第二指示信号; After the processor is used to latch the low-frequency pulse signal generated by the clock source at the start timing point of each timing cycle, it can detect whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal within the timing cycle; If yes, output the first indication signal; if not, output the second indication signal;
需要说明的是,时钟源在正常工作状态下,即在未发生故障的情况下,不会丢失低频脉冲信号,即在每一时钟周期内时钟源均会产生低电平脉冲信号和高电平脉冲信号;那么,当前低频脉冲信号并不会一直与所锁存的低频脉冲信号相同,还会存在与所锁存的低频脉冲信号不同的情况。 It should be noted that the clock source will not lose the low-frequency pulse signal in the normal working state, that is, in the case of no failure, that is, the clock source will generate a low-level pulse signal and a high-level pulse signal in each clock cycle. pulse signal; then, the current low-frequency pulse signal will not always be the same as the latched low-frequency pulse signal, and may be different from the latched low-frequency pulse signal. the
例如,在某一时钟周期内,所锁存的低频脉冲信号为低电平脉冲信号,而在该时钟周期内,时钟源所产生的当前低频脉冲信号先为低电平脉冲信号后为高电脉冲信号。 For example, in a certain clock cycle, the latched low-frequency pulse signal is a low-level pulse signal, and in this clock cycle, the current low-frequency pulse signal generated by the clock source is first a low-level pulse signal and then a high-level pulse signal. Pulse signal. the
而时钟源在非正常工作状态下,即在发生故障的情况下,则会丢失某些低频脉冲信号,即在某些时钟周期内时钟源可能仅产生低电平脉冲信号或仅产生高电平脉冲信号,在这种情况下,当前低频脉冲信号会一直与所锁存的低频脉冲信号相同。 While the clock source is in an abnormal working state, that is, in the event of a failure, some low-frequency pulse signals will be lost, that is, the clock source may only generate low-level pulse signals or only high-level pulses in certain clock cycles pulse signal, in this case, the current low-frequency pulse signal will always be the same as the latched low-frequency pulse signal. the
例如,在某一时钟周期内,所锁存的低频脉冲信号为低电平脉冲信号,而在该时钟周期内,时钟源所产生的当前低频脉冲信号一直为低电平脉冲信号。 For example, in a certain clock cycle, the latched low-frequency pulse signal is a low-level pulse signal, and in this clock cycle, the current low-frequency pulse signal generated by the clock source is always a low-level pulse signal. the
因此,处理器可以通过在计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同,来确定时钟源所产生的低频脉冲信号是否发生丢失。 Therefore, the processor can determine whether the low-frequency pulse signal generated by the clock source is lost by detecting whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal within the timing period. the
其中,第一指示信号用于指示低频脉冲信号发生丢失,而第二指示信号用于指示低频脉冲信号未发生丢失。 Wherein, the first indication signal is used to indicate that the low-frequency pulse signal is lost, and the second indication signal is used to indicate that the low-frequency pulse signal is not lost. the
在本实用新型实施例中,检测时钟源故障的电路可以包括处理器,该处理器的输入端用于与时钟源相连,输出端用于输出指示信号,通过锁存每一计时周期开始计时点的所述时钟源产生的低频脉冲信号;并在计时周期内,检测所述时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,输出第一指示信号,所述第一指示信号用于指示所述低频脉冲信号发生丢失,当低频脉冲信号发生丢失时,可以确认时钟源发生了故障;若否,输出第二指示信号,所述第二指示信号用于指示所述低频脉冲信号未发生丢失,当低频脉冲信号未发生丢失时,则可以确认时钟源未发生故障,由此可见,本实用新型通过确定低频脉冲信号是否发生丢失,实现了对时钟源是否发生故障的检测。 In the embodiment of the present invention, the circuit for detecting the failure of the clock source may include a processor, the input end of the processor is used to connect with the clock source, and the output end is used to output an indication signal, and the timing point is started by latching each timing cycle The low-frequency pulse signal generated by the clock source; and within the timing period, detect whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal; if so, output the first indication signal, the The first indication signal is used to indicate that the low-frequency pulse signal is lost, and when the low-frequency pulse signal is lost, it can be confirmed that the clock source has failed; if not, a second indication signal is output, and the second indication signal is used to indicate the The low-frequency pulse signal is not lost. When the low-frequency pulse signal is not lost, it can be confirmed that the clock source has not failed. It can be seen that the utility model realizes whether the clock source fails by determining whether the low-frequency pulse signal is lost. detection. the
在本实用新型中,处理器用于在计时周期内,检测所述时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同的具体实现方式有多种; In the utility model, the processor is used to detect whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal within the timing cycle.
作为一种实现方式: As a way of implementing:
处理器可以用于比较时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号是否相同,并依据比较结果,生成第一信号; The processor can be used to compare whether the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal, and generate the first signal according to the comparison result;
其中,第一信号为用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号是否相同的信号,具体实现方式并没有限定; Wherein, the first signal is a signal used to indicate whether the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal, and the specific implementation method is not limited;
例如,第一信号为低电平信号时,用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号相同;第一信号为高电平信号时,用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号不同; For example, when the first signal is a low-level signal, it is used to indicate that the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal; when the first signal is a high-level signal, it is used to indicate the current low-frequency pulse signal generated by the clock source. The current low-frequency pulse signal is different from the latched low-frequency pulse signal;
或者,第一信号为高电平信号时,用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号相同;第一信号为低电平信号时,用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号不同。 Or, when the first signal is a high-level signal, it is used to indicate that the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal; when the first signal is a low-level signal, it is used to indicate the current low-frequency pulse signal generated by the clock source. The current low-frequency pulse signal is different from the latched low-frequency pulse signal. the
当处理器确定到第一信号为用于表征过当前低频脉冲信号与所锁存的低频脉冲信号不同时,生成第三信号,并可以依据第三信号输出第二指示信号; When the processor determines that the first signal is used to represent that the current low-frequency pulse signal is different from the latched low-frequency pulse signal, a third signal is generated, and a second indication signal can be output according to the third signal;
需要说明的是,时钟源在正常工作状态下,即未发生故障情况下,时钟源在每一时钟周期均会产生高电平脉冲信号和低电平脉冲信号。也就是说,若时钟源未丢失低频脉冲信号,则可以确定在计时周期内第一信号是发生变 化的,即第一信号不仅表征过当前低频脉冲信号与所锁存的低频脉冲信号相同,还表征过当前低频脉冲信号与所锁存的低频脉冲信号不同。因此,只要处理器确定第一信号为用于表征过当前低频脉冲信号与所锁存的低频脉冲信号不同时,则生成第三信号;并依据该第三信号输出第二指示信号,以指示低频脉冲信号未发生丢失。 It should be noted that, when the clock source is in a normal working state, that is, when no fault occurs, the clock source will generate a high-level pulse signal and a low-level pulse signal in each clock cycle. That is to say, if the clock source does not lose the low-frequency pulse signal, it can be determined that the first signal changes within the timing period, that is, the first signal not only represents that the current low-frequency pulse signal is the same as the latched low-frequency pulse signal, It is also characterized that the current low-frequency pulse signal is different from the latched low-frequency pulse signal. Therefore, as long as the processor determines that the first signal is used to indicate that the current low-frequency pulse signal is different from the latched low-frequency pulse signal, a third signal is generated; and a second indication signal is output according to the third signal to indicate the low-frequency The pulse signal is not lost. the
当处理器确定到第一信号为用于一直表征过当前低频脉冲信号与所锁存的低频脉冲信号相同时,生成第二信号,并可以依据第二信号输出第一指示信号; When the processor determines that the first signal is used to always represent the current low-frequency pulse signal and the latched low-frequency pulse signal, a second signal is generated, and the first indication signal can be output according to the second signal;
需要说明的是,时钟源在非正常工作状态,即发生故障情况下,时钟源在某些时钟周期会仅产生高电平脉冲信号或低电平脉冲信号。也就是说,若时钟源产生的低频脉冲信号发生丢失,则可以确定在计时周期内第一信号是未发生变化的,即第一信号为用于一直表征当前低频脉冲信号与所锁存的低频脉冲信号相同。因此,处理器在确定第一信号为用于一直表征当前低频脉冲信号与所锁存的低频脉冲信号相同时,则生成第二信号;并依据该第二信号输出第一指示信号,以指示低频脉冲信号发生丢失。 It should be noted that, when the clock source is in an abnormal working state, that is, when a fault occurs, the clock source will only generate a high-level pulse signal or a low-level pulse signal in certain clock cycles. That is to say, if the low-frequency pulse signal generated by the clock source is lost, it can be determined that the first signal has not changed during the timing period, that is, the first signal is used to always represent the current low-frequency pulse signal and the latched low-frequency The pulse signal is the same. Therefore, when the processor determines that the first signal is used to always indicate that the current low-frequency pulse signal is the same as the latched low-frequency pulse signal, it generates a second signal; and outputs the first indication signal according to the second signal to indicate the low-frequency The pulse signal is lost. the
作为另一种实现方式: As another implementation:
处理器可以用于比较时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号是否相同,并依据比较结果,生成第一信号;并在计时周期内,检测第一信号是否一直与预设的标准信号相同; The processor can be used to compare whether the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal, and generate the first signal according to the comparison result; and detect whether the first signal is consistent with the preset The standard signal is the same;
其中,处理器预设有标准信号,该标准信号为表征所述时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号相同的信号,具体的实现方式并没有限定; Wherein, the processor is preset with a standard signal, which is a signal representing that the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal, and the specific implementation method is not limited;
例如,第一信号为低电平信号时,用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号相同;第一信号为高电平信号时,用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号不同;相应的,预设的标准信号则为低电平信号; For example, when the first signal is a low-level signal, it is used to indicate that the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal; when the first signal is a high-level signal, it is used to indicate the current low-frequency pulse signal generated by the clock source. The current low-frequency pulse signal is different from the latched low-frequency pulse signal; correspondingly, the preset standard signal is a low-level signal;
或者,第一信号为高电平信号时,用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号相同;第一信号为低电平信号时,用于表征时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号不同;相应的,预设的标准信号则为高电平信号。 Or, when the first signal is a high-level signal, it is used to indicate that the current low-frequency pulse signal generated by the clock source is the same as the latched low-frequency pulse signal; when the first signal is a low-level signal, it is used to indicate the current low-frequency pulse signal generated by the clock source. The current low-frequency pulse signal is different from the latched low-frequency pulse signal; correspondingly, the preset standard signal is a high-level signal. the
当处理器在在计时周期内检测到第一信号一直与预设的标准信号相同时,则输出第一指示信号,以指示低频脉冲信号发生丢失;当检测到第一信号并不是一直与预设的标准信号相同时,例如,可以第一信号与预设的标准信号可以先相同,后不同,则输出第二指示信号,以指示低频脉冲信号未发生丢失。 When the processor detects that the first signal is always the same as the preset standard signal within the time period, it outputs the first indication signal to indicate that the low-frequency pulse signal is lost; when it detects that the first signal is not always the same as the preset When the standard signals are the same, for example, the first signal and the preset standard signal may first be the same and then different, then output a second indication signal to indicate that the low-frequency pulse signal is not lost. the
在实际应用中,检测时钟源故障的电路对不同的低频脉冲信号的敏感度可能不同,因此,在本实用新型中,处理器确定低频脉冲信号是否发生丢失的标准也不同; In practical applications, the circuit for detecting clock source failure may have different sensitivities to different low-frequency pulse signals. Therefore, in the utility model, the standard for the processor to determine whether the low-frequency pulse signal is lost is also different;
当检测时钟源故障的电路对低频脉冲信号敏感度高时,处理器可以在每一计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同,若是,则输出第一指示信号;若否,则输出第二指示信号; When the circuit for detecting clock source failure is highly sensitive to low-frequency pulse signals, the processor can detect whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal in each timing cycle, and if so, then Output the first indication signal; if not, output the second indication signal;
在上述方式中,处理器只要确定在某一计时周期内,低频脉冲信号一直与所锁存的低频脉冲信号相同,则确定低频脉冲信号发生了丢失,此时,输出第一指示信号; In the above method, as long as the processor determines that the low-frequency pulse signal is always the same as the latched low-frequency pulse signal within a certain timing period, then it is determined that the low-frequency pulse signal is lost, and at this time, the first indication signal is output;
为了便于理解,以一实例进行说明,假设在某一计时周期开始计时点,处理器锁存低电平脉冲信号;并在该计时周期内,时钟源产生的当前低频脉冲信号一直为低电平脉冲信号,那么,可以确定低频脉冲信号发生了丢失,此时输出第一指示信号;而若在该计时周期内,时钟源产生的当前低频脉冲信号先为低电平脉冲信号后为高电平脉冲信号,那么,可以确定低频脉冲信号在该计时周期内未发生丢失,此时,输出第二指示信号。 In order to facilitate understanding, an example is used to illustrate, assuming that the processor latches the low-level pulse signal at the beginning of a certain timing period; and within the timing period, the current low-frequency pulse signal generated by the clock source is always low pulse signal, then it can be determined that the low-frequency pulse signal is lost, and the first indication signal is output at this time; and if within the timing period, the current low-frequency pulse signal generated by the clock source is first a low-level pulse signal and then a high-level pulse signal, then it can be determined that the low-frequency pulse signal is not lost within the timing period, and at this time, a second indication signal is output. the
当检测时钟源故障的电路对低频脉冲信号敏感度低时,处理器可以在时钟源产生的当前低频脉冲信号与所锁存的低频脉冲信号持续相同的时间达到预设时间时,输出第一指示信号;否则,输出第二指示信号。 When the circuit for detecting the failure of the clock source is less sensitive to the low-frequency pulse signal, the processor can output the first indication when the current low-frequency pulse signal generated by the clock source and the latched low-frequency pulse signal last for the same time and reach a preset time signal; otherwise, output a second indication signal. the
具体的,处理器在计时周期内,检测时钟源产生的当前低频脉冲信号是否一直与所锁存的低频脉冲信号相同;若是,则开始计时,而当计时时间达到预设时间时,输出第一指示信号;若否,则对计时时间进行清零,并输出第二指示信号。 Specifically, the processor checks whether the current low-frequency pulse signal generated by the clock source is always the same as the latched low-frequency pulse signal within the timing period; if so, it starts timing, and when the timing reaches the preset time, it outputs the first an indication signal; if not, the counting time is cleared, and a second indication signal is output. the
其中,预设时间可以根据实际情况进行设定,本实用新型并没有具体限定,例如,计时周期为1.1秒时,预设时间可以为10秒。 Wherein, the preset time can be set according to the actual situation, which is not specifically limited in the present invention. For example, when the timing period is 1.1 seconds, the preset time can be 10 seconds. the
例如,处理器在某一计时周期内,检测到时钟源产生的当前低频脉冲信号一直与在该计时周期开始计时点所锁存的低频脉冲信号相同时,则开始计时;而在此后多个连续的计时周期内,均检测到时钟源产生的当前低频脉冲信号一直与相应计时周期开始计时点所锁存的低频脉冲信号相同,那么持续计时,当确定计时时间达到预设时间时,输出第一指示信号;而在计时时间未达到预设时间前,若在某一计时周期内,检测到时钟源产生的当前低频脉冲信号未一直与相应计时周期内开始计时点所锁存的低频脉冲信号相同时,那么,则对计时时间进行清零,并输出第二指示信号 For example, in a certain timing period, when the processor detects that the current low-frequency pulse signal generated by the clock source is always the same as the low-frequency pulse signal latched at the start timing point of the timing period, it starts timing; In the timing period, it is detected that the current low-frequency pulse signal generated by the clock source is always the same as the low-frequency pulse signal latched at the start timing point of the corresponding timing period, then continue timing, and when it is determined that the timing time reaches the preset time, output the first Indication signal; before the timing time reaches the preset time, if within a certain timing period, it is detected that the current low-frequency pulse signal generated by the clock source is not always consistent with the low-frequency pulse signal latched at the start timing point in the corresponding timing period At the same time, then, the timing time is cleared, and the second indication signal is output
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。 Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related information, please refer to the description of the method part. the
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本实用新型。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本实用新型的精神或范围的情况下,在其它实施例中实现。因此,本实用新型将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。 The above description of the disclosed embodiments enables those skilled in the art to realize or use the utility model. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein. the
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201420194395.9U CN203951451U (en) | 2014-04-21 | 2014-04-21 | A kind of circuit that detects clock source failure |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201420194395.9U CN203951451U (en) | 2014-04-21 | 2014-04-21 | A kind of circuit that detects clock source failure |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN203951451U true CN203951451U (en) | 2014-11-19 |
Family
ID=51893466
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201420194395.9U Expired - Lifetime CN203951451U (en) | 2014-04-21 | 2014-04-21 | A kind of circuit that detects clock source failure |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN203951451U (en) |
-
2014
- 2014-04-21 CN CN201420194395.9U patent/CN203951451U/en not_active Expired - Lifetime
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TW200507396A (en) | Error detection and recovery within processing stages of an integrated circuit | |
| CN110647063B (en) | Microcontroller and EFT event protection method | |
| US10884448B1 (en) | Clock glitch detection circuit | |
| CN103064486A (en) | Computer device and method for resetting real-time clock signal thereof | |
| JP2018173990A (en) | Device and method for monitoring timer | |
| CN103227558B (en) | Wave-by-wave current limiting method and device | |
| TWI540908B (en) | Multimedia output device and audio output method thereof | |
| CN108872666A (en) | A kind of load switch event detecting method and system | |
| CN104049143A (en) | Commercial power detection device and detection method | |
| CN203951451U (en) | A kind of circuit that detects clock source failure | |
| CN107643817A (en) | A kind of server voltage pulsation protection circuit and guard method | |
| CN103888109A (en) | Circuit for detecting clock source fault | |
| JP2018514873A (en) | Communication between integrated circuits | |
| CN212231474U (en) | Real-time monitoring device for wireless communication module | |
| US8717066B2 (en) | Clock diagnosis circuit | |
| CN108872665A (en) | A kind of load switch event detecting method and system based on minimum information criterion | |
| TW201604679A (en) | Computer system | |
| CN108254644A (en) | ESD detection device, system and method | |
| TWI607222B (en) | Semiconductor device | |
| KR101671956B1 (en) | Device and method for resetting of system | |
| CN103675443A (en) | FPGA global clock detection technique for manned spacecraft | |
| CN209330091U (en) | A device for preventing signals from being detected | |
| TWI779930B (en) | Clock monitor circuit, microcontroller, and control method thereof | |
| CN107171456B (en) | Wireless charging method with anti-shake processing, watch and storage medium | |
| CN103698603A (en) | Chip, chip clock testing method and chip clock testing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CX01 | Expiry of patent term | ||
| CX01 | Expiry of patent term |
Granted publication date: 20141119 |