JPH06222961A - Watchdog timer - Google Patents

Watchdog timer

Info

Publication number
JPH06222961A
JPH06222961A JP5008659A JP865993A JPH06222961A JP H06222961 A JPH06222961 A JP H06222961A JP 5008659 A JP5008659 A JP 5008659A JP 865993 A JP865993 A JP 865993A JP H06222961 A JPH06222961 A JP H06222961A
Authority
JP
Japan
Prior art keywords
value
set value
time
count value
trigger signal
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.)
Withdrawn
Application number
JP5008659A
Other languages
Japanese (ja)
Inventor
Makoto Endo
誠 遠藤
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.)
IHI Corp
Original Assignee
IHI Corp
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 IHI Corp filed Critical IHI Corp
Priority to JP5008659A priority Critical patent/JPH06222961A/en
Publication of JPH06222961A publication Critical patent/JPH06222961A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To provide the watchdog time(WDT) which can detect both of the case when being triggered before a set value and the case when the set value elapses after being triggered as abnormality. CONSTITUTION:When a trigger signal TRIG showing the execution start of a program is inputted, counting is started from a count value CNT '0' and a counter 2 outputting a count value CNT at each time point outputs an abnormality signal OUT when the trigger signal TRIG is inputted while the count value CNT is less than a set value T1 and when the count value CNT reaches a set value T2.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータの暴走を
検知するウォッチドッグタイマに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a watchdog timer for detecting runaway of a computer.

【0002】[0002]

【従来の技術】マイクロプロセッサ(以下、MPUと略
す)を利用したシステムにおいてプログラムの暴走を止
めるための手段として、ウォッチドッグタイマが利用さ
れる。このウォッチドッグタイマは、MPUがプログラ
ムの実行を開始する毎、トリガ信号によりリセットさ
れ、所定時間の計時を行う。そして、MPUが暴走状態
となってプログラムの実行時間が異常に長くなると、ウ
ォッチドッグタイマの計時が終了してタイマアウト信号
が出力され、このタイマアウト信号に基づいて、MPU
の動作異常が検知される。
2. Description of the Related Art A watchdog timer is used as a means for stopping runaway of a program in a system using a microprocessor (hereinafter abbreviated as MPU). The watchdog timer is reset by a trigger signal every time the MPU starts executing a program, and measures a predetermined time. When the MPU goes into a runaway state and the program execution time becomes abnormally long, the watchdog timer finishes counting and a timer-out signal is output. Based on this timer-out signal, the MPU
The abnormal operation of is detected.

【0003】[0003]

【発明が解決しようとする課題】さて、一般的にMPU
を用いたシステムにおいては、上述したようなプログラ
ムの実行時間が異常に長くなる異常動作の他、本来、実
行されるべき処理が実行されず、短時間でプログラムの
実行が終了してしまう異常動作を発生し得る。しかしな
がら、上述した従来のウォッチドッグタイマは後者の異
常動作を検出することができず、このため、システムの
動作の保護が万全ではなかった。
Generally, an MPU is generally used.
In a system that uses, in addition to the abnormal operation in which the execution time of the program becomes abnormally long as described above, the processing that should be executed originally is not executed and the execution of the program ends in a short time. Can occur. However, the above-described conventional watchdog timer cannot detect the abnormal operation of the latter, and thus the operation of the system is not completely protected.

【0004】本発明は、このような事情に鑑みてなされ
たものであり、設定値以前にトリガされた場合及び最後
にトリガされてから設定値が経過した場合のいずれの場
合をも異常として検出することができるウォッチドッグ
タイマを提供することを目的とする。
The present invention has been made in view of the above circumstances, and detects an abnormality in both cases of being triggered before the set value and when the set value has passed since the last trigger. The purpose is to provide a watchdog timer that can.

【0005】[0005]

【課題を解決するための手段】上記課題を解決するため
に本発明にあっては、プログラムの実行開始を示すトリ
ガ信号が入力されることにより計時値が「0」から計時
を開始し、各時点における計時値を出力する計時手段
と、前記計時値が第1の設定値以下の時に前記トリガ信
号が入力された場合及び前記計時値が前記第1の設定値
より大きな値の第2の設定値に達した場合に異常信号を
出力する異常検知手段とを具備することを特徴とする。
In order to solve the above problems, according to the present invention, a trigger signal indicating the start of execution of a program is input to start time counting from "0". Timing means for outputting a time value at a time point, and a second setting in which the trigger signal is input when the time value is less than or equal to a first set value and the time value is greater than the first set value. And an abnormality detection means for outputting an abnormality signal when the value is reached.

【0006】[0006]

【作用】上記構成をとったため、この発明によれば、設
定値以前にトリガされた場合及び最後にトリガされてか
ら設定値が経過した場合のいずれの場合をも異常として
検出することができる。
According to the present invention, because of the above configuration, it is possible to detect an abnormality both in the case where the set value is triggered before the set value and when the set value has elapsed since the last trigger.

【0007】[0007]

【実施例】以下、図面を参照して本発明の一実施例につ
いて説明する。 A:実施例の構成 図1は本実施例によるウォッチドッグタイマの構成を示
すブロック図である。このウォッチドッグタイマはMP
Uによるプログラムの実行が設定値T1以内に終了した
場合及び設定値T2(>T1)を越えても終了しなかっ
た場合に異常信号を出力するタイマである。図1におい
て1は発振器であり、所定周期毎(例えば、1ミリ秒)
にパルス信号S1を順次出力する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. A: Configuration of Embodiment FIG. 1 is a block diagram showing the configuration of a watchdog timer according to this embodiment. This watchdog timer is MP
It is a timer that outputs an abnormal signal when the execution of the program by U is completed within the set value T1 or when it is not completed even after exceeding the set value T2 (> T1). In FIG. 1, reference numeral 1 denotes an oscillator, which has a predetermined cycle (for example, 1 millisecond).
Then, the pulse signal S1 is sequentially output.

【0008】3及び6は設定器である。まず、設定器3
は設定値T1を設定するものであり、この設定値T1を
大小比較器4に出力する。次に、6は設定値T2を設定
するものであり、この設定値T2を後述するカウンタ2
に出力する。
3 and 6 are setting devices. First, the setting device 3
Sets the set value T1, and outputs the set value T1 to the magnitude comparator 4. Next, 6 is for setting a set value T2, and this set value T2 is set in a counter 2 which will be described later.
Output to.

【0009】カウンタ2はMPU(図示略)がプログラ
ムを実行中に発生するトリガ信号TRIGによりリセッ
トされ、発振器1から供給されるパルス信号S1をカウ
ントする。当該カウンタ2のカウント値CNTは大小比
較器4に出力される。また、カウント値CNTの値が設
定器6の設定値T2に到達すると、カウンタ2はカウン
ト動作を停止し、値が「1」の信号S2をオアゲート7
に出力する。
The counter 2 is reset by a trigger signal TRIG generated during execution of a program by an MPU (not shown) and counts a pulse signal S1 supplied from the oscillator 1. The count value CNT of the counter 2 is output to the magnitude comparator 4. Further, when the value of the count value CNT reaches the set value T2 of the setter 6, the counter 2 stops the counting operation and outputs the signal S2 having the value "1" to the OR gate 7.
Output to.

【0010】大小比較器4はカウンタ2のカウント値C
NTと設定器3から供給される設定値T1との値の大き
さを比較する。そして、その比較の結果、カウント値C
NT≦設定値T1という関係を満たす場合には、値が
「1」の信号S4をアンドゲート5に出力し、カウント
値CNT>設定値T1という関係を満たす場合には、値
が「0」の信号S4をアンドゲート5に出力する。
The magnitude comparator 4 has a count value C of the counter 2.
The magnitudes of NT and the set value T1 supplied from the setter 3 are compared. Then, as a result of the comparison, the count value C
When the relationship of NT ≦ setting value T1 is satisfied, the signal S4 having a value of “1” is output to the AND gate 5, and when the relationship of count value CNT> setting value T1 is satisfied, the value is “0”. The signal S4 is output to the AND gate 5.

【0011】アンドゲート5は信号S4及びトリガ信号
TRIGがいずれも「1」になった時に値が「1」の信
号S5をオアゲート7に出力する。すなわち、アンドゲ
ート5はカウンタ2が設定値T1に到達する以前にトリ
ガ信号TRIGの値が「1」になったことを検出するた
めのものである。オアゲート7は、信号S5及び信号S
2のうち、少なくとも一方が「1」になった場合に値が
「1」の異常信号OUTを出力する。
The AND gate 5 outputs the signal S5 having the value "1" to the OR gate 7 when both the signal S4 and the trigger signal TRIG become "1". That is, the AND gate 5 is for detecting that the value of the trigger signal TRIG becomes "1" before the counter 2 reaches the set value T1. The OR gate 7 has signals S5 and S
When at least one of the two becomes "1", the abnormal signal OUT having a value of "1" is output.

【0012】B:実施例の動作 図1及び図2を参照して本実施例の動作について説明す
る。図2においてt0はトリガ信号TRIGが発生され
た時刻、t1は時刻t0から設定値T1相当の時間だけ
経過した時刻、t3は、時刻t0から設定値T2相当の
時間だけ経過した時刻を示している。まず、時刻t0で
トリガ信号TRIGが出力されると、このトリガ信号T
RIGによりカウンタ2がリセットされ、以降、カウン
タ2のカウント値CNTは直線L1によって示すように
「0」から順次増加していく。
B: Operation of the Embodiment The operation of this embodiment will be described with reference to FIGS. 1 and 2. In FIG. 2, t0 indicates the time when the trigger signal TRIG is generated, t1 indicates the time when the time corresponding to the set value T1 has elapsed from time t0, and t3 indicates the time when the time corresponding to the set value T2 has elapsed from the time t0. . First, when the trigger signal TRIG is output at time t0, this trigger signal TIG
The counter 2 is reset by the RIG, and thereafter, the count value CNT of the counter 2 sequentially increases from "0" as indicated by the straight line L1.

【0013】時刻t0から時刻t1の間においてはカウ
ント値CNTが「カウント値CNT≦設定値T1」とい
う関係を満たしているため、信号S4の値は「1」であ
る。そのため、時刻t0から時刻t1の間にトリガ信号
TRIGが出力されると、アンドゲート5の出力値が
「1」になる。この結果、信号S5の値が「1」にな
り、オアゲート7から値が「1」の異常信号OUTが出
力される。このように、カウンタ2のカウント値CNT
が設定値T1に到達する以前にトリガ信号TRIGが
「1」になっても異常として検出される。
The value of the signal S4 is "1" since the count value CNT satisfies the relationship "count value CNT≤set value T1" between time t0 and time t1. Therefore, when the trigger signal TRIG is output from the time t0 to the time t1, the output value of the AND gate 5 becomes "1". As a result, the value of the signal S5 becomes "1", and the OR gate 7 outputs the abnormal signal OUT having the value "1". In this way, the count value CNT of the counter 2
Even if the trigger signal TRIG becomes "1" before reaches the set value T1, it is detected as an abnormality.

【0014】さて、上述のように、時刻t0からカウン
トを開始し、トリガ信号TRIGが検出されることなく
時刻t2になったとする。そして、時刻t2から時刻t
3の間においてトリガ信号TRIGが出力された場合に
は、カウンタ2のカウント値CNTは「カウント値CN
T<設定値T2」という関係を満たしているため、値が
「0」の信号S2を出力する。一方、大小比較器4は、
カウント値CNTが「カウント値CNT>設定値T1」
という関係を満たしているため、値が「0」の信号S4
を出力する。そのため、アンドゲート5の出力値、すな
わち、信号S5は「0」になる。これにより、オアゲー
ト7の出力値は「0」、すなわち、信号OUTは「0」
になる。このように、カウンタ2のカウント値CNTが
設定値T2に到達する以前にトリガ信号TRIGが検出
された場合には正常動作をしているとみなされる。
As described above, it is assumed that the counting is started from the time t0 and the time t2 is reached without detecting the trigger signal TRIG. Then, from time t2 to time t
When the trigger signal TRIG is output during the period of 3, the count value CNT of the counter 2 is “count value CN
Since the relation of T <set value T2 is satisfied, the signal S2 having a value of "0" is output. On the other hand, the size comparator 4
The count value CNT is "count value CNT> set value T1".
Signal S4 whose value is "0" because the relationship
Is output. Therefore, the output value of the AND gate 5, that is, the signal S5 becomes "0". As a result, the output value of the OR gate 7 is "0", that is, the signal OUT is "0".
become. As described above, when the trigger signal TRIG is detected before the count value CNT of the counter 2 reaches the set value T2, it is considered that the normal operation is performed.

【0015】次に、上述と同様にして時刻t0からカウ
ントを開始し、トリガ信号TRIGが検出されることな
く時刻t3になったとする。すると、カウンタ2のカウ
ント値CNTが設定値T2に達するため、信号S2が
「1」になる。そのためオアゲート7から、値が「1」
の異常信号OUTが出力される。このように、カウンタ
2のカウント値CNTが設定値T2に到達してもトリガ
信号TRIGが「1」にならない場合には異常とみなさ
れる。
Next, it is assumed that counting is started from time t0 in the same manner as described above, and time t3 is reached without detecting the trigger signal TRIG. Then, since the count value CNT of the counter 2 reaches the set value T2, the signal S2 becomes "1". Therefore, from OR gate 7, the value is "1".
The abnormal signal OUT is output. In this way, if the trigger signal TRIG does not become "1" even when the count value CNT of the counter 2 reaches the set value T2, it is considered to be abnormal.

【0016】[0016]

【発明の効果】以上説明したように、この発明によれ
ば、プログラムの実行開始を示すトリガ信号が入力され
ることにより計時値が「0」から計時を開始し、各時点
における計時値を出力する計時手段と、前記計時値が第
1の設定値以下の時に前記トリガ信号が入力された場合
及び前記計時値が前記第1の設定値より大きな値の第2
の設定値に達した場合に異常信号を出力する異常検知手
段とを設けたので、設定時間以前にトリガされた場合及
びトリガされてから設定時間が経過した場合のいずれの
場合をも異常として検出することができる。
As described above, according to the present invention, the timekeeping value is started from "0" by the input of the trigger signal indicating the start of execution of the program, and the timekeeping value at each time point is output. And a second timer having a time value greater than the first set value when the trigger signal is input when the time value is less than or equal to the first set value.
Since an abnormality detection unit that outputs an abnormal signal when the set value of is reached, is detected as an abnormality both in the case of being triggered before the set time and when the set time has elapsed since the trigger. can do.

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

【図1】本発明の一実施例における構成を示すブロック
図である。
FIG. 1 is a block diagram showing a configuration in an embodiment of the present invention.

【図2】本発明の一実施例における時刻tとカウント値
CNTとの関係を示す図である。
FIG. 2 is a diagram showing a relationship between time t and a count value CNT in one embodiment of the present invention.

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

1 発振器(計時手段) 2 カウンタ(計時手段) 3 設定器(計時手段) 4 大小比較器(異常検知手段) 5 アンドゲート(異常検知手段) 6 設定器(計時手段) 7 オアゲート(異常検知手段) T1,T2 設定値。 1 Oscillator (time measuring means) 2 Counter (time measuring means) 3 Setting device (time measuring means) 4 Large / small comparator (abnormality detecting means) 5 AND gate (abnormality detecting means) 6 Setting device (time measuring means) 7 OR gate (abnormality detecting means) T1, T2 set value.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 プログラムの実行開始を示すトリガ信号
が入力されることにより計時値が「0」から計時を開始
し、各時点における計時値を出力する計時手段(1,
2,3,6)と、 前記計時値が第1の設定値(T1)以下の時に前記トリ
ガ信号が入力された場合及び前記計時値が前記第1の設
定値より大きな値の第2の設定値(T2)に達した場合
に異常信号を出力する異常検知手段(4,5,7)と、 を具備することを特徴とするウォッチドッグタイマ。
1. A clocking means (1, 1) for starting clocking from a clock value "0" by inputting a trigger signal indicating the start of program execution and outputting the clock value at each time point.
2, 3, 6), and when the trigger signal is input when the time count value is equal to or lower than the first set value (T1) and the second set value in which the time count value is larger than the first set value. A watchdog timer, comprising: abnormality detection means (4, 5, 7) that outputs an abnormality signal when the value (T2) is reached.
JP5008659A 1993-01-21 1993-01-21 Watchdog timer Withdrawn JPH06222961A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5008659A JPH06222961A (en) 1993-01-21 1993-01-21 Watchdog timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5008659A JPH06222961A (en) 1993-01-21 1993-01-21 Watchdog timer

Publications (1)

Publication Number Publication Date
JPH06222961A true JPH06222961A (en) 1994-08-12

Family

ID=11699064

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5008659A Withdrawn JPH06222961A (en) 1993-01-21 1993-01-21 Watchdog timer

Country Status (1)

Country Link
JP (1) JPH06222961A (en)

Similar Documents

Publication Publication Date Title
US4072852A (en) Digital computer monitoring and restart circuit
JPH06168163A (en) Method and device for monitoring cpu
JPH06222961A (en) Watchdog timer
JPS62145440A (en) Runaway detection circuit
JPH09114541A (en) Interruption generation time confirming circuit and processor
JPH05189271A (en) Detecting device for abnormality of central processing unit
JPS6051141B2 (en) Program runaway detection method
JPH06195245A (en) Monitor timer device
JPS60198649A (en) Loop detection control system
JPS6242205A (en) Detecting circuit for abnormal working
JP2731386B2 (en) Control device
JP3144811B2 (en) Monitoring timer circuit
JPS63280345A (en) Detection of program abnormality
JPH04182743A (en) Restarting method for microprocessor
JPS6242206A (en) Detecting circuit for abnormal working
JP2516711B2 (en) Watchdog timer device
JPS6059447A (en) Microcomputer system
JPH05225359A (en) Microcomputer device
JPS5827559B2 (en) Ijiyou Kanshi Cairo
JP2004126731A (en) Abnormal operation monitoring circuit for cpu
JPH04225432A (en) Interruption processing time control system for one-chip microcomputer
JPH0561694A (en) Program stall generation detecting system
JPH02259845A (en) Processor
JPH0973404A (en) Watchdog timer circuit
JPS59206957A (en) Device for supervising execution of instruction

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000404