JP2001125663A - Cycle monitoring circuit - Google Patents

Cycle monitoring circuit

Info

Publication number
JP2001125663A
JP2001125663A JP30760599A JP30760599A JP2001125663A JP 2001125663 A JP2001125663 A JP 2001125663A JP 30760599 A JP30760599 A JP 30760599A JP 30760599 A JP30760599 A JP 30760599A JP 2001125663 A JP2001125663 A JP 2001125663A
Authority
JP
Japan
Prior art keywords
cpu
clock pulse
cycle
signal
flip
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.)
Granted
Application number
JP30760599A
Other languages
Japanese (ja)
Other versions
JP3396649B2 (en
Inventor
Ichiro Hirayama
一郎 平山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Industrial Devices SUNX Co Ltd
Original Assignee
Sunx Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Sunx Ltd filed Critical Sunx Ltd
Priority to JP30760599A priority Critical patent/JP3396649B2/en
Publication of JP2001125663A publication Critical patent/JP2001125663A/en
Application granted granted Critical
Publication of JP3396649B2 publication Critical patent/JP3396649B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a cycle monitoring circuit which enables two CPUs to monitor the cycles of output signals of the opposite-side CPUs both without lowering operation efficiency. SOLUTION: Clock pulses outputted from a 1st CPU 11 are supplied to the set terminal of an RS flip-flop 13 and clock pulses outputted from a 2nd CPU 12 are supplied to the reset terminal. The uninverted output signal Y1 from the RS flip-flop 13 is supplied to an input port 11N of the 1st CPU 11 and the inverted output signal Y2 from the 2nd CPU 12 is supplied to an input port 12N of the 2nd CPU 12. Right before outputting the clock pulses, the CPUs 11 and 12 input the output signal of the RS flip-flop 13, detect whether or not the signal is an ON signal, and detect whether or not the output cycles of the CPUs have varied.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、2つのCPUを備
えて、互いに相手側CPUの出力信号の周期の変動を検
出する周期監視回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cycle monitoring circuit which includes two CPUs and detects a change in the cycle of an output signal of a partner CPU.

【0002】[0002]

【従来の技術】近年の電気機器(例えば、多光軸光電ス
イッチ)の高機能・高性能化に伴い、膨大な量のデータ
を処理すべく、制御部に2個のCPUを備えたものが知
られている。そして、従来は、これら2個のCPUが、
互いに相手側のCPUの出力信号を取り込んで、その周
期を監視していた。
2. Description of the Related Art In recent years, as electric equipment (for example, a multi-optical axis photoelectric switch) has been improved in function and performance, an apparatus having two CPUs in a control unit to process an enormous amount of data has been developed. Are known. And conventionally, these two CPUs
The output signals of the other CPUs are taken in, and the cycle is monitored.

【0003】従来の周期監視回路は、その一例が図4に
示されており、2つのCPU1及びCPU2は、互いに
相手側の出力ポートの1つを、自分の入力ポートの1つ
に接続することで、相手側CPUから所定周期で出力さ
れたクロックパルスを取り込む。そして、これら各CP
U1,2から出力される両クロックパルスは、互いに同
一周期に設定され、各CPU1,2は、相手側CPUが
出力したクロックパルスの周期と、自分が出力したクロ
ックパルスの周期とが一致しているか否かを判断する構
成となっていた。
An example of a conventional cycle monitoring circuit is shown in FIG. 4, in which two CPUs 1 and 2 connect one of the output ports on the other side to one of their own input ports. Then, a clock pulse output from the partner CPU at a predetermined cycle is captured. And each of these CPs
The clock pulses output from U1 and U2 are set to have the same cycle as each other, and each of the CPUs 1 and 2 matches the cycle of the clock pulse output by the partner CPU with the cycle of the clock pulse output by itself. Or not.

【0004】なお、CPUは、一般にクロック回路から
受けた基準信号に基づいて一定の周期で動作しており、
その基準信号を分周した周期で、所定の信号を出力して
いるから、その出力信号の周期を診断すれば、CPUが
正常に動作しているか否かを判断することができる。
The CPU generally operates at a constant cycle based on a reference signal received from a clock circuit.
Since a predetermined signal is output at a frequency obtained by dividing the reference signal, it is possible to determine whether the CPU is operating normally by diagnosing the frequency of the output signal.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記し
た従来の周期監視回路では、相手側CPUからクロック
パルスがいつ入力されるかわからないため、割り込み処
理を行わなければならず、CPUの動作効率が低下して
しまう。また、割り込み処理を行わずに、常に入力ポー
トを監視するとしても、同様にCPUの動作効率が低下
する。
However, in the conventional cycle monitoring circuit described above, since it is not known when a clock pulse is input from the partner CPU, an interrupt process must be performed, and the operating efficiency of the CPU is reduced. Resulting in. Further, even if the input port is constantly monitored without performing the interrupt processing, the operation efficiency of the CPU is similarly reduced.

【0006】本発明は、上記事情に鑑みてなされたもの
で、2つのCPUが、共に動作効率を低下させることな
く、相手側CPUの出力信号の周期を監視することが可
能な周期監視回路の提供を目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and is directed to a cycle monitoring circuit in which two CPUs can monitor the cycle of an output signal of a partner CPU without lowering the operation efficiency of both. For the purpose of providing.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するた
め、請求項1の発明に係る周期監視回路は、所定周期の
クロックパルスを出力する2つのCPU間で周期変動の
有無を監視する周期監視回路において、一方のCPUか
ら出力されるクロックパルスの周期をT1とし、他方の
CPUから出力されるクロックパルスの周期をT2と
し、他方のクロックパルスの1パルス幅をdとしたとき
に、 T2+d≦T1≦1.5×T2+d の関係を有するように設定して、これら両クロックパル
スのいずれか一方をRSフリップフロップのセット端子
に与える一方、他方をリセット端子に与え、セット端子
にクロックパルスを与えるCPUは、そのクロックパル
スを出力する直前にRSフリップフロップの非反転出力
信号を取り込む一方、リセット端子にクロックパルスを
与えるCPUは、そのクロックパルスを出力する直前に
RSフリップフロップの反転出力信号を取り込むこと
で、両CPUは、共に、正常動作時には、RSフリップ
フロップから連続してオフ信号を取り込む構成とされ、
各CPUは、オフ信号に次いでオン信号を取り込む動作
を、2回連続して行ったときに、CPUがクロックパル
スを出力する周期に変動が生じたと判別するところに特
徴を有する。
In order to achieve the above object, a cycle monitoring circuit according to the first aspect of the present invention is a cycle monitoring circuit for monitoring the presence or absence of a cycle variation between two CPUs outputting clock pulses of a predetermined cycle. In the circuit, when the cycle of the clock pulse output from one CPU is T1, the cycle of the clock pulse output from the other CPU is T2, and one pulse width of the other clock pulse is d, T2 + d ≦ T1 ≦ 1.5 × T2 + d is set, and one of these two clock pulses is applied to the set terminal of the RS flip-flop, the other is applied to the reset terminal, and the clock pulse is applied to the set terminal. The CPU takes in the non-inverted output signal of the RS flip-flop immediately before outputting the clock pulse, and The CPU that applies the clock pulse captures the inverted output signal of the RS flip-flop immediately before outputting the clock pulse, so that both CPUs continuously capture the off signal from the RS flip-flop during normal operation. And
Each CPU is characterized in that when the operation of taking in the ON signal next to the OFF signal is performed twice consecutively, it is determined that the period in which the CPU outputs the clock pulse has changed.

【0008】請求項2の発明に係る周期監視回路は、所
定周期のクロックパルスを出力する2つのCPU間で周
期変動の有無を監視する周期監視回路において、一方の
CPUから出力されるクロックパルスの周期をT1と
し、他方のCPUから出力されるクロックパルスの周期
をT2とし、他方のクロックパルスの1パルス幅をdと
したときに、 T2+d≦T1≦1.5×T2+d の関係を有するように設定して、これら両クロックパル
スのいずれか一方をRSフリップフロップのセット端子
に与える一方、他方をリセット端子に与え、セット端子
にクロックパルスを与えるCPUは、そのクロックパル
スを出力する直前にRSフリップフロップの反転出力信
号を取り込む一方、リセット端子にクロックパルスを与
えるCPUは、そのクロックパルスを出力する直前にR
Sフリップフロップの非反転出力信号を取り込むこと
で、両CPUは、共に、正常動作時には、RSフリップ
フロップから連続してオン信号を取り込む構成とされ、
各CPUは、オン信号に次いでオフ信号を取り込む動作
を、2回連続して行ったときに、CPUがクロックパル
スを出力する周期に変動が生じたと判別するところに特
徴を有する。
According to a second aspect of the present invention, there is provided a cycle monitoring circuit for monitoring the presence or absence of a cycle variation between two CPUs outputting clock pulses of a predetermined cycle. When the period is T1, the period of a clock pulse output from the other CPU is T2, and the width of one pulse of the other clock pulse is d, the following relationship is established: T2 + d ≦ T1 ≦ 1.5 × T2 + d The CPU which sets one of these two clock pulses to the set terminal of the RS flip-flop, applies the other to the reset terminal, and applies the clock pulse to the set terminal, immediately before outputting the clock pulse, The CPU that applies the clock pulse to the reset terminal while receiving the inverted output signal of the Immediately before outputting a pulse.
By capturing the non-inverted output signal of the S flip-flop, both CPUs are configured to continuously capture the ON signal from the RS flip-flop during normal operation.
Each CPU is characterized in that it determines that a change has occurred in the cycle in which the CPU outputs the clock pulse when the operation of taking in the off signal next to the on signal is performed twice consecutively.

【0009】[0009]

【発明の作用】<請求項1の発明>請求項1の構成によ
れば、一方のクロックパルスの周期T1を、他方のクロ
ックパルスの周期T2より、T2+d≦T1≦1.5×
T2+d、(ここで、dは他方のクロックパルスのパル
ス幅)の関係を有するようにずらしてあるから、CPU
が正常に動作している場合には、各CPUからRSフリ
ップフロップのセット端子とリセット端子とに、交互に
クロックパルスが与えられ、各CPUがクロックパルス
を出力する毎に、セット動作とリセット動作とが繰り返
される。そして、各CPUは、クロックパルスを出力す
る直前に、RSフリップフロップからのオフ信号を取り
込む。ところが、CPUが異常動作して周期が変動した
場合には、セット端子とリセット端子に交互にクロック
パルスが与えられず、一方のCPUからRSフリップフ
ロップにクロックパルスを与えても、セット又はリセッ
ト動作が行われない事態が生じて、一方のCPUは、オ
フ信号に次いでオン信号を取り込む動作を行う。そし
て、この動作が2回連続して行いわれたところで、クロ
ックパルスを出力する周期に変動が生じたと判別され
る。
According to the first aspect of the present invention, the period T1 of one clock pulse is set to be T2 + d ≦ T1 ≦ 1.5 × from the period T2 of the other clock pulse.
T2 + d, where d is the pulse width of the other clock pulse, the CPU is shifted.
Is operating normally, a clock pulse is alternately supplied from each CPU to the set terminal and the reset terminal of the RS flip-flop, and each time each CPU outputs the clock pulse, the set operation and the reset operation are performed. Is repeated. Then, each CPU takes in the off signal from the RS flip-flop immediately before outputting the clock pulse. However, when the period of the CPU fluctuates due to abnormal operation of the CPU, the clock pulse is not alternately applied to the set terminal and the reset terminal. Is not performed, and one of the CPUs performs an operation of taking in the ON signal next to the OFF signal. Then, when this operation is performed twice consecutively, it is determined that the cycle of outputting the clock pulse has changed.

【0010】<請求項2の発明>請求項2の構成によれ
ば、一方のクロックパルスの周期T1を、他方のクロッ
クパルスの周期T2より、T2+d≦T1≦1.5×T
2+d、(ここで、dは他方のクロックパルスのパルス
幅)の関係を有するようにずらしてあるから、CPUが
正常に動作している場合には、各CPUからRSフリッ
プフロップのセット端子とリセット端子とに、交互にク
ロックパルスが与えられ、各CPUがクロックパルスを
出力する毎に、セット動作とリセット動作とが繰り返さ
れる。そして、各CPUは、クロックパルスを出力する
直前に、RSフリップフロップからのオン信号を取り込
む。ところが、CPUが異常動作して周期が変動した場
合には、セット端子とリセット端子に交互にクロックパ
ルスが与えられず、一方のCPUからRSフリップフロ
ップにクロックパルスを与えても、セット又はリセット
動作が行われない事態が生じて、一方のCPUは、オン
信号に次いでオフ信号を取り込む動作を行う。そして、
この動作が2回連続して行いわれたところで、クロック
パルスを出力する周期に変動が生じたと判別される。
According to the second aspect of the present invention, the cycle T1 of one clock pulse is set to be T2 + d ≦ T1 ≦ 1.5 × T from the cycle T2 of the other clock pulse.
2 + d, where d is the pulse width of the other clock pulse, so that when the CPU is operating normally, the set terminal of the RS flip-flop and the reset Clock pulses are alternately applied to the terminals and the set operation and the reset operation are repeated each time each CPU outputs the clock pulse. Then, each CPU takes in the ON signal from the RS flip-flop immediately before outputting the clock pulse. However, when the period of the CPU fluctuates due to abnormal operation of the CPU, the clock pulse is not alternately applied to the set terminal and the reset terminal. Is not performed, and one CPU performs an operation of taking in an off signal next to an on signal. And
When this operation is performed twice consecutively, it is determined that the period for outputting the clock pulse has changed.

【0011】[0011]

【発明の効果】上記請求項1及び請求項2の発明によれ
ば、CPUは、クロックパルスの出力に伴ったタイミン
グで、CPUの異常を検出するから、割り込み処理を必
要とせず、また、常に入力ポートを監視する必要もなく
なり、CPUの動作効率を向上させることができる。
According to the first and second aspects of the present invention, the CPU detects an abnormality of the CPU at the timing accompanying the output of the clock pulse, so that the CPU does not need interrupt processing, and always does not require any interrupt processing. It is not necessary to monitor the input port, and the operation efficiency of the CPU can be improved.

【0012】[0012]

【発明の実施の形態】以下、本発明の一実施形態を図1
〜図3に基づいて説明する。本実施形態の周期監視回路
は、図1に示されており、第1及び第2CPU11,1
2と、RSフリップフロップ13とを備え、RSフリッ
プフロップ13のセット端子に第1CPU11の出力ポ
ート11Pが接続され、リセット端子に第2CPU12
の出力ポート12Pが接続されている。また、第1CP
U11の入力ポート11Nには、RSフリップフロップ
13の非反転出力端子が接続されて、後述する所定のタ
イミングで、非反転出力信号Y1(図2及び図3参照)
が第1CPU11に取り込まれる一方、第2CPU12
の入力ポート12Nには、RSフリップフロップ13の
反転出力端子が接続されて、やはり後述する所定のタイ
ミングで、反転出力信号Y2(図2及び図3参照)が第
2CPU12に取り込まれる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to FIG.
This will be described with reference to FIG. The cycle monitoring circuit according to the present embodiment is shown in FIG. 1 and includes first and second CPUs 11 and 1.
2 and an RS flip-flop 13. The output terminal 11P of the first CPU 11 is connected to the set terminal of the RS flip-flop 13, and the second CPU 12 is connected to the reset terminal.
Output port 12P is connected. Also, the first CP
The non-inverting output terminal of the RS flip-flop 13 is connected to the input port 11N of U11, and the non-inverting output signal Y1 (see FIGS. 2 and 3) at a predetermined timing described later.
Is taken into the first CPU 11 while the second CPU 12
The inverted output terminal of the RS flip-flop 13 is connected to the input port 12N, and the inverted output signal Y2 (see FIG. 2 and FIG. 3) is taken into the second CPU 12 at a predetermined timing also described later.

【0013】各CPU11,12は、図示しない別々の
クロック回路から一定周期で基準信号を受けており、こ
の基準信号を受ける度に、図示しないメインプログラム
をランする。そして、それら各メインプログラムの設定
に従って、図2に示すように、第1CPU11は、周期
T1でクロックパルスを出力ポート11Pから出力し、
第2CPU12は、周期T2でクロックパルスを出力ポ
ート12Pから出力する。ここで、一方のクロックパル
スの周期T2は、他方のクロックパルスの周期T1に対
して、クロックパルスの1パルス幅d分、長くなるよう
に設定されている。なお、これら各周期T1,T2は、
前記基準信号を分周した周期となっており、また、両C
PU11,12から出力される両クロックパルスは、同
じパルス幅dとなっている。
Each of the CPUs 11 and 12 receives a reference signal from a separate clock circuit (not shown) at a constant cycle, and runs a main program (not shown) every time the CPU 11 and 12 receives this reference signal. Then, according to the settings of each of these main programs, as shown in FIG. 2, the first CPU 11 outputs a clock pulse from the output port 11P at a period T1,
The second CPU 12 outputs a clock pulse from the output port 12P in a cycle T2. Here, the cycle T2 of one clock pulse is set to be longer than the cycle T1 of the other clock pulse by one pulse width d of the clock pulse. Note that these periods T1 and T2 are:
The frequency of the reference signal is divided.
Both clock pulses output from the PUs 11 and 12 have the same pulse width d.

【0014】各CPU11,12は、各メインプログラ
ムに従い、クロックパルスを出力する直前に、それぞれ
のCPU11,12の入力ポート11N,12Nに与え
られている反転又は非反転出力信号Y1,Y2を取り込
む。具体的には、各CPU11,12は、クロックパル
スを出力する毎に、各メインプログラムにおけるタイマ
ーをスタートし、その計測時間がクロックパルスを出力
する1周期より僅かに短い設定時間に至ったタイミング
で、入力ポートに与えられている信号を取り込む。
Each of the CPUs 11, 12 takes in inverted or non-inverted output signals Y1, Y2 applied to the input ports 11N, 12N of the respective CPU 11, 12 just before outputting a clock pulse in accordance with each main program. Specifically, each of the CPUs 11 and 12 starts a timer in each main program every time a clock pulse is output, and at a timing when the measurement time reaches a set time slightly shorter than one cycle of outputting the clock pulse. , Take in the signal given to the input port.

【0015】そして、各CPU11,12は、取り込ん
だ信号が、オン信号(Hレベルの信号)又はオフ信号
(Lレベルの信号)のいずれであるかを判別し、「オフ
信号に次いでオン信号を取り込む動作」を2回連続して
行ったときに、いずれかのCPUの周期に変動が生じた
と判別するように設定されている。
Each of the CPUs 11 and 12 determines whether the received signal is an ON signal (H-level signal) or an OFF signal (L-level signal). The setting is made such that when the “fetching operation” is performed twice consecutively, it is determined that a fluctuation has occurred in any one of the CPU cycles.

【0016】次に、上記構成からなる本実施形態の動作
を説明する。図2の時刻S1〜S6に示すように、両C
PU11,12からRSフリップフロップ13に、交互
にクロックパルスが出力されたときには、以下のように
動作する。まず、第1CPU11は、図2の時刻S2
に、クロックパルス(図2(A)のCP11参照)をR
Sフリップフロップ13のセット端子へと出力すると共
に、その時刻S2の直前にRSフリップフロップ13の
非反転出力信号Y1(図2(C)参照)であるオフ信号
を取り込む。時刻S2では、第2CPU12は、RSフ
リップフロップ13のリセット端子に、クロックパルス
を与えていないから(図2(B)参照)、RSフリップ
フロップ13は、時刻S2にセット動作し、非反転出力
信号Y1(図2(C)参照)は、オフからオンに反転
し、反転出力信号Y2(図2(D)参照)は、オンから
オフに反転する。
Next, the operation of this embodiment having the above configuration will be described. As shown at times S1 to S6 in FIG.
When clock pulses are alternately output from the PUs 11 and 12 to the RS flip-flop 13, the following operation is performed. First, the first CPU 11 determines the time S2 in FIG.
The clock pulse (see CP11 in FIG. 2A)
The signal is output to the set terminal of the S flip-flop 13 and the off signal which is the non-inverted output signal Y1 (see FIG. 2C) of the RS flip-flop 13 is taken immediately before the time S2. At time S2, the second CPU 12 does not supply a clock pulse to the reset terminal of the RS flip-flop 13 (see FIG. 2B), so that the RS flip-flop 13 performs the set operation at time S2 and outputs the non-inverted output signal. Y1 (see FIG. 2C) is inverted from off to on, and the inverted output signal Y2 (see FIG. 2D) is inverted from on to off.

【0017】次いで、第2CPU12が時刻S3の直前
にRSフリップフロップ13の反転出力信号Y2である
オフ信号を取り込むと共に、時刻S3に、クロックパル
スをRSフリップフロップ13のリセット端子へと出力
する。この時刻S3では、第1CPU11はクロックパ
ルスをセット端子へと出力していないから、RSフリッ
プフロップ13がリセット動作し、非反転出力信号Y1
は、オンからオフに反転し、反転出力信号Y2は、オフ
からオンに反転する。これにより、RSフリップフロッ
プ13の出力信号Y1,Y2は、時刻S2の直前の状態
に戻る。
Next, the second CPU 12 takes in the off signal which is the inverted output signal Y2 of the RS flip-flop 13 immediately before time S3, and outputs a clock pulse to the reset terminal of the RS flip-flop 13 at time S3. At this time S3, since the first CPU 11 has not output the clock pulse to the set terminal, the RS flip-flop 13 performs a reset operation and the non-inverted output signal Y1
Is inverted from on to off, and the inverted output signal Y2 is inverted from off to on. As a result, the output signals Y1 and Y2 of the RS flip-flop 13 return to the state immediately before time S2.

【0018】そして、上記時刻S2,S3の場合と同様
にして、両CPU11,12からRSフリップフロップ
13に交互にクロックパルスが与えられる度に、セット
動作とリセット動作とが繰り返され、両CPU11,1
2に、RSフリップフロップ13からオフ信号が取り込
まれる。
Each time a clock pulse is alternately applied from the CPUs 11 and 12 to the RS flip-flop 13, the set operation and the reset operation are repeated, as in the case of the times S2 and S3. 1
2 receives the off signal from the RS flip-flop 13.

【0019】さて、各CPU11,12は、取り込んだ
信号が、オフ又はオフ信号のいずれであるかを判別し、
「オフ信号に次いでオン信号を取り込む動作」を2回連
続して行ったときに、いずれかのCPUの周期に変動が
生じたと判別する。
Each of the CPUs 11 and 12 determines whether the received signal is an off signal or an off signal.
When the “operation to take in the ON signal next to the OFF signal” is performed twice consecutively, it is determined that a fluctuation has occurred in one of the CPU cycles.

【0020】ここで、本実施形態では、第2CPU12
から出力されるクロックパルスの周期T2が第1CPU
11から出力されるクロックパルスの周期T1より1パ
ルス幅d分長く設定されているから、両CPU11,1
2が正常に動作している場合には、図2の時刻S1〜S
6に示すように、各CPU11,12からRSフリップ
フロップ13へと交互にクロックパルスが出力される状
態が連続して続く。そして、かりに、両CPU11,1
2から同時にクロックパルスがRSフリップフロップ1
3へと与えられる事態や(図2の時刻S0参照)、一方
のCPUだけから連続して2つ以上のクロックパルスが
与えられる事態が生じても、次に各CPU11,12か
らそれぞれ出力されたクロックパルスは、互いに1パル
ス幅d分、前回よりずれているから、上記のような事態
が2回連続して生じることはない。
Here, in the present embodiment, the second CPU 12
The period T2 of the clock pulse output from the first CPU
11 is set to be longer by one pulse width d than the cycle T1 of the clock pulse output from the CPU 11,
2 is operating normally, time S1 to S1 in FIG.
As shown in FIG. 6, a state in which clock pulses are alternately output from the CPUs 11 and 12 to the RS flip-flop 13 continues continuously. And both CPUs 11, 1
Clock pulse from RS flip-flop 1
3 (see time S0 in FIG. 2) or a situation in which two or more clock pulses are continuously supplied from only one of the CPUs. Since the clock pulses are shifted from each other by one pulse width d, the above situation does not occur twice consecutively.

【0021】従って、CPU11,12が正常動作して
いる場合は、各CPU11,12は、RSフリップフロ
ップ13から「オフ信号に次いでオン信号を取り込む動
作」を2回連続して行うことはなく、CPUの所定周期
に変動が生じたと判別することはない。
Therefore, when the CPUs 11 and 12 are operating normally, the CPUs 11 and 12 do not perform the “operation of taking in the ON signal next to the OFF signal” twice consecutively from the RS flip-flop 13. It is not determined that a change has occurred in the predetermined cycle of the CPU.

【0022】一方、図3に示すように、第1CPU11
に異常が生じて、第1CPU11から出力されるクロッ
クパルスの周期T1が、正常動作時の倍になった場合
は、以下のようである。この場合、例えば、同図の時刻
S10〜S16に示すように、第1CPU11から2つ
のクロックパルス(図3のCP1、CP1参照)が出力
される間に、CPU2から2つのクロックパルス(図3
のCP2,CP2参照)が出力されるという動作が、2
回以上連続して起きる。すると、本実施形態の周期監視
回路は、以下のように動作する。
On the other hand, as shown in FIG.
Is abnormal, and the cycle T1 of the clock pulse output from the first CPU 11 is twice as long as in the normal operation, as follows. In this case, for example, as shown at times S10 to S16 in the figure, while two clock pulses (see CP1 and CP1 in FIG. 3) are output from the first CPU 11, two clock pulses (see FIG.
The operation of outputting CP2 and CP2 of FIG.
Get up more than once in a row. Then, the cycle monitoring circuit of the present embodiment operates as follows.

【0023】即ち、第2CPU12は、時刻S11の直
前では、反転出力信号Y2をオフ信号として取り込み、
RSフリップフロップ13をリセット動作させて、反転
出力信号Y2をオフからオンに反転させるが、次に、第
2CPU12が、反転出力信号Y2を取り込む前に、第
1CPU11はクロックパルスを出力していないから、
RSフリップフロップ13はセット動作せず、第2CP
U12が、次に(時刻S12の直前に)取り込んだ反転
出力信号Y2は、オン信号となる。よって、第2CPU
12は、「オフ信号に次いでオン信号を取り込む動作」
を1回行い、例えばその旨のフラッグが立てられる。
That is, immediately before time S11, the second CPU 12 takes in the inverted output signal Y2 as an off signal,
The RS flip-flop 13 performs a reset operation to invert the inverted output signal Y2 from off to on. Next, before the second CPU 12 captures the inverted output signal Y2, the first CPU 11 does not output a clock pulse. ,
The RS flip-flop 13 does not perform the set operation, and the second CP
The inverted output signal Y2 captured next by U12 (immediately before time S12) becomes an ON signal. Therefore, the second CPU
12 is an operation of capturing an ON signal next to an OFF signal.
Once, for example, a flag is set to that effect.

【0024】次いで、時刻S13となると、第1CPU
11がクロックパルスを出力してRSフリップフロップ
13をセット動作させ、反転出力信号Y2がオンからオ
フに反転する。そして、第2CPU12は、時刻S14
の直前に反転出力信号Y2をオフ信号として取り込んで
から、RSフリップフロップ13をリセット動作させ、
反転出力信号Y2をオフからオンに反転させる。ところ
が、やはり、次に第2CPU12が、反転出力信号Y2
を取り込む前に、第1CPU11はクロックパルスを出
力しないから、RSフリップフロップ13はセット動作
せず、第2CPU12は、オン信号を取り込む。これに
より、第2CPU12は、「オフ信号に次いでオン信号
を取り込む動作」を2回連続して行い、CPUのクロッ
クパルスの出力周期に変動が生じたと判断して、例え
ば、警告信号を出力する。
Next, at time S13, the first CPU
11 outputs a clock pulse to cause the RS flip-flop 13 to perform a set operation, and the inverted output signal Y2 is inverted from on to off. Then, the second CPU 12 sets the time S14
, The inverted output signal Y2 is taken as an off signal, and the RS flip-flop 13 is reset.
The inverted output signal Y2 is inverted from off to on. However, again, the second CPU 12 next outputs the inverted output signal Y2.
Since the first CPU 11 does not output a clock pulse before capturing the ON signal, the RS flip-flop 13 does not perform the set operation, and the second CPU 12 captures the ON signal. As a result, the second CPU 12 continuously performs the “operation of capturing the ON signal next to the OFF signal” twice, determines that the output cycle of the clock pulse of the CPU has changed, and outputs, for example, a warning signal.

【0025】これと同様にして、第2CPU12のクロ
ックパルスの周期が正常時の2倍になった場合や、第1
又は第2CPU11,12のクロックパルスの周期が正
常時の半分になった場合も、一方のCPUが、クロック
パルスの出力周期に変動が生じたと判断することができ
る。
Similarly, when the cycle of the clock pulse of the second CPU 12 is twice as long as in the normal state,
Alternatively, also when the clock pulse cycle of the second CPUs 11 and 12 becomes half of the normal time, one of the CPUs can determine that the output cycle of the clock pulse has changed.

【0026】なお、第2CPU12が、「オフ信号に次
いでオン信号を取り込む動作」を1回行った後に、「オ
フ信号を2回連続して取り込むという動作」を行った場
合には、前記フラッグが取り消される。また、例えば、
第1CPU11のクロックパルスの周期が正常時の2倍
より長くなった場合は、第2CPU12が「1つのオフ
信号に次いで2つ以上のオン信号を取り込む動作」を2
回連続して行うこととなるが、この場合、上記した「オ
フ信号を2回連続して取り込むという動作」は行われな
いのでフラッグが取り消されず、周期の変動が生じたと
判断される。
When the second CPU 12 performs the "operation of taking in the off signal twice" successively after performing the "operation of taking in the on signal next to the off signal" once, the flag is reset. Canceled. Also, for example,
If the cycle of the clock pulse of the first CPU 11 is longer than twice as long as the normal state, the second CPU 12 executes the “operation of taking in one or more off signals next to one off signal”.
In this case, the flag is not canceled because the above-described “operation of continuously taking in the off signal twice” is not performed, and it is determined that the period has changed.

【0027】このように、本実施形態によれば、CPU
11,12は、自らのクロックパルスの出力に伴ったタ
イミングで、いずれかのCPU11,12の異常を検出
するから、割り込み処理を必要とせず、また、常に入力
ポートを監視する必要もなくなり、CPUの動作効率を
向上させることができる。
As described above, according to the present embodiment, the CPU
Each of the CPUs 11 and 12 detects an abnormality in one of the CPUs 11 and 12 at a timing associated with the output of its own clock pulse. Therefore, the CPU does not need to perform an interrupt process and does not need to constantly monitor an input port. Operation efficiency can be improved.

【0028】<他の実施形態>本発明は、前記実施形態
に限定されるものではなく、例えば、以下に説明するよ
うな実施形態も本発明の技術的範囲に含まれ、さらに、
下記以外にも要旨を逸脱しない範囲内で種々変更して実
施することができる。 (1)前記実施形態では、両CPU11,12が出力す
るクロックパルスは、同じパルス幅であったが、これら
を異なるパルス幅としてもよい。
<Other Embodiments> The present invention is not limited to the above embodiments. For example, the following embodiments are also included in the technical scope of the present invention.
In addition to the following, various changes can be made without departing from the scope of the invention. (1) In the above embodiment, the clock pulses output by both CPUs 11 and 12 have the same pulse width, but they may have different pulse widths.

【0029】(2)両CPUが出力するクロックパルス
の周期は、必ずしも、前記実施形態のように、1パルス
幅分だけずらした設定としなくてもよく、一方のCPU
から出力されるクロックパルスの周期T1と、他方のC
PUから出力されるクロックパルスの周期T2とそのク
ロックパルスの1パルス幅dとの間に、 T2+d≦T1≦1.5×T2+d の関係があればよい。
(2) The cycle of the clock pulse output from both CPUs does not necessarily have to be set to be shifted by one pulse width as in the above embodiment.
The period T1 of the clock pulse output from
The relationship T2 + d ≦ T1 ≦ 1.5 × T2 + d may be provided between the period T2 of the clock pulse output from the PU and one pulse width d of the clock pulse.

【0030】(3)前記実施形態において、セット端子
にクロックパルスを与える第1CPU11に、RSフリ
ップフロップ13の反転出力信号を取り込む一方、リセ
ット端子にクロックパルスを与える第2CPU12に、
非反転出力信号を取り込むように接続して、両CPU1
1,12が、共に正常動作時には、RSフリップフロッ
プから連続してオン信号を取り込むようにしてもよい。
また、この場合は、各CPU11,12が、オン信号に
次いでオフ信号を取り込む動作を、2回連続して行った
ときに、周期変動が生じたと判断すればよい。
(3) In the above embodiment, the first CPU 11 that applies a clock pulse to the set terminal receives the inverted output signal of the RS flip-flop 13, while the second CPU 12 that applies the clock pulse to the reset terminal.
Both CPUs 1 are connected so as to take in a non-inverted output signal.
When both 1 and 12 are operating normally, the on signal may be continuously taken in from the RS flip-flop.
In this case, when the CPUs 11 and 12 perform the operation of taking in the off signal next to the on signal twice in succession, it may be determined that the periodic fluctuation has occurred.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施形態に係る周期監視回路のブロ
ック図
FIG. 1 is a block diagram of a cycle monitoring circuit according to an embodiment of the present invention.

【図2】2つのCPUが共に正常動作している場合のタ
イムチャート
FIG. 2 is a time chart when both CPUs are operating normally;

【図3】第1CPUのクロックパルスの周期が倍になっ
たときのタイムチャート
FIG. 3 is a time chart when a cycle of a clock pulse of a first CPU is doubled.

【図4】従来の周期監視回路のブロック図FIG. 4 is a block diagram of a conventional cycle monitoring circuit.

【符号の説明】[Explanation of symbols]

13…RSフリップフロップ T1,T2…クロックパルスの周期 11,12…CPU Y1…非反転出力信号 Y2…反転出力信号 d…パルス幅 Reference numeral 13: RS flip-flop T1, T2: Clock pulse period 11, 12, CPU Y1: Non-inverted output signal Y2: Inverted output signal d: Pulse width

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 所定周期のクロックパルスを出力する2
つのCPU間で周期変動の有無を監視する周期監視回路
において、 一方の前記CPUから出力されるクロックパルスの周期
をT1とし、 他方のCPUから出力されるクロックパルスの周期をT
2とし、 前記他方のクロックパルスの1パルス幅をdとしたとき
に、 T2+d≦T1≦1.5×T2+d の関係を有するように設定して、これら両クロックパル
スのいずれか一方をRSフリップフロップのセット端子
に与える一方、他方をリセット端子に与え、 前記セット端子にクロックパルスを与えるCPUは、そ
のクロックパルスを出力する直前に前記RSフリップフ
ロップの非反転出力信号を取り込む一方、前記リセット
端子にクロックパルスを与えるCPUは、そのクロック
パルスを出力する直前に前記RSフリップフロップの反
転出力信号を取り込むことで、前記両CPUは、共に、
正常動作時には、前記RSフリップフロップから連続し
てオフ信号を取り込む構成とされ、 前記各CPUは、オフ信号に次いでオン信号を取り込む
動作を、2回連続して行ったときに、前記CPUがクロ
ックパルスを出力する周期に変動が生じたと判別するこ
とを特徴とする周期監視回路。
1. A method for outputting a clock pulse having a predetermined period
In a cycle monitoring circuit that monitors the presence or absence of a cycle variation between two CPUs, a cycle of a clock pulse output from one of the CPUs is T1, and a cycle of a clock pulse output from the other CPU is T1.
2, when one pulse width of the other clock pulse is d, the following relationship is established: T2 + d ≦ T1 ≦ 1.5 × T2 + d, and either one of these two clock pulses is set to an RS flip-flop. While giving the other to the reset terminal, giving the other to the reset terminal, and giving the clock pulse to the set terminal, the CPU takes in the non-inverted output signal of the RS flip-flop immediately before outputting the clock pulse, The CPU giving the clock pulse captures the inverted output signal of the RS flip-flop immediately before outputting the clock pulse, so that both CPUs
During a normal operation, the CPU is configured to take in an off signal continuously from the RS flip-flop. A cycle monitoring circuit for determining that a variation has occurred in a cycle of outputting a pulse.
【請求項2】 所定周期のクロックパルスを出力する2
つのCPU間で周期変動の有無を監視する周期監視回路
において、 一方の前記CPUから出力されるクロックパルスの周期
をT1とし、 他方のCPUから出力されるクロックパルスの周期をT
2とし、 前記他方のクロックパルスの1パルス幅をdとしたとき
に、 T2+d≦T1≦1.5×T2+d の関係を有するように設定して、これら両クロックパル
スのいずれか一方をRSフリップフロップのセット端子
に与える一方、他方をリセット端子に与え、 前記セット端子にクロックパルスを与えるCPUは、そ
のクロックパルスを出力する直前に前記RSフリップフ
ロップの反転出力信号を取り込む一方、前記リセット端
子にクロックパルスを与えるCPUは、そのクロックパ
ルスを出力する直前に前記RSフリップフロップの非反
転出力信号を取り込むことで、前記両CPUは、共に、
正常動作時には、前記RSフリップフロップから連続し
てオン信号を取り込む構成とされ、 前記各CPUは、オン信号に次いでオフ信号を取り込む
動作を、2回連続して行ったときに、前記CPUがクロ
ックパルスを出力する周期に変動が生じたと判別するこ
とを特徴とする周期監視回路。
2. A circuit for outputting a clock pulse having a predetermined period.
In a cycle monitoring circuit that monitors the presence or absence of a cycle variation between two CPUs, a cycle of a clock pulse output from one of the CPUs is T1, and a cycle of a clock pulse output from the other CPU is T1.
2, when one pulse width of the other clock pulse is d, the following relationship is established: T2 + d ≦ T1 ≦ 1.5 × T2 + d, and either one of these two clock pulses is set to an RS flip-flop. The CPU which supplies the other to the set terminal and the other to the reset terminal, and applies the clock pulse to the set terminal, takes in the inverted output signal of the RS flip-flop immediately before outputting the clock pulse, and outputs the clock to the reset terminal. The CPU giving the pulse captures the non-inverted output signal of the RS flip-flop immediately before outputting the clock pulse, so that both CPUs
During normal operation, the CPU is configured to continuously capture an ON signal from the RS flip-flop. When the CPU performs an operation of capturing an OFF signal next to an ON signal twice in succession, the CPU receives a clock. A cycle monitoring circuit for determining that a variation has occurred in a cycle of outputting a pulse.
JP30760599A 1999-10-28 1999-10-28 Period monitoring circuit Expired - Fee Related JP3396649B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30760599A JP3396649B2 (en) 1999-10-28 1999-10-28 Period monitoring circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30760599A JP3396649B2 (en) 1999-10-28 1999-10-28 Period monitoring circuit

Publications (2)

Publication Number Publication Date
JP2001125663A true JP2001125663A (en) 2001-05-11
JP3396649B2 JP3396649B2 (en) 2003-04-14

Family

ID=17971067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30760599A Expired - Fee Related JP3396649B2 (en) 1999-10-28 1999-10-28 Period monitoring circuit

Country Status (1)

Country Link
JP (1) JP3396649B2 (en)

Also Published As

Publication number Publication date
JP3396649B2 (en) 2003-04-14

Similar Documents

Publication Publication Date Title
JP2001125663A (en) Cycle monitoring circuit
CN114968681A (en) Method and device for monitoring I2C bus communication abnormity and I2C master device
JP2819898B2 (en) Monitoring circuit for communication equipment
JPH1051515A (en) Communication abnormality detector
JPH0846603A (en) Signal interrupt monitor circuit and signal period detection circuit
JPH0823326A (en) Clock fault detection circuit
JPH08316946A (en) Clock break detection circuit
JP3652910B2 (en) Device status monitoring method
US20030093725A1 (en) Method and circuit for monitoring microcomputer for onboard electronic control device
KR200334102Y1 (en) Clock monitoring circuit using shift register
JPH086822A (en) Cpu device with runaway monitoring function
JP2970690B2 (en) Synchronous control circuit
JPH08305611A (en) Cpu monitoring method and device
JP2003008558A (en) Frequency deviation monitoring device
JP2821438B2 (en) Microcomputer
JP2692576B2 (en) Multiple clock pulse monitor
JP2000269989A (en) Collision avoidance system
JPH04106637A (en) Stall detection circuit
JPH0736244U (en) Abnormality detection device for arithmetic processing unit
JPH07110019B2 (en) External input noise signal detector
JPH08171437A (en) Power supply voltage monitoring device for portable terminal equipment
JPH04252898A (en) Fan rotation monitoring circuit
JPH0277854A (en) Resetting system for microprocessor
JPS63141430A (en) Terminal equipment having fault detecting function
JPH1198221A (en) Serial signal processing circuit

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees