JPH04323740A - Wdt circuit - Google Patents

Wdt circuit

Info

Publication number
JPH04323740A
JPH04323740A JP3094108A JP9410891A JPH04323740A JP H04323740 A JPH04323740 A JP H04323740A JP 3094108 A JP3094108 A JP 3094108A JP 9410891 A JP9410891 A JP 9410891A JP H04323740 A JPH04323740 A JP H04323740A
Authority
JP
Japan
Prior art keywords
cpu
wdt
signal
abnormality
request 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.)
Pending
Application number
JP3094108A
Other languages
Japanese (ja)
Inventor
Masahiko Kuwano
桑野 雅彦
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP3094108A priority Critical patent/JPH04323740A/en
Publication of JPH04323740A publication Critical patent/JPH04323740A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To easily apply the WDT circuit to various systems by continuing the processing without shutdown in the case of a slight abnormality and sufficiently securing abnormality information regardless of reset of a CPU. CONSTITUTION:An up/down counter 10 is provided which can vary the abnormality monitor time based on write data of the CPU; and when the duration of access from the CPU exceeds the abnormality monitor time of the up/down counter 10, operation abnormality is decided to send a count value zero signal S2, and an NMI request signal is sent from an NMI request signal generating means 13 to the CPU. When the CPU performs access within a prescribed time after reception of the NMI request signal, the NMI request is released; but it does not perform access then, a reset signal is sent from a reset signal generating means 14 to the CPU to reset the CPU.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、種々の技術分野で使用
されるコンピュータの中央演算処理装置(以下、CPU
と指称する)の動作状態を監視するWDT回路に係わり
、特に監視時間に融通性をもたせたWDT回路に関する
[Industrial Application Field] The present invention relates to a central processing unit (hereinafter referred to as CPU) of a computer used in various technical fields.
The present invention relates to a WDT circuit that monitors the operating state of a device (referred to as ``WDT''), and particularly relates to a WDT circuit that has flexibility in monitoring time.

【0002】0002

【従来の技術】WDT(ウオッチドッグタイマ:wat
ch dog timer )回路は、CPUが正常に
動作しているとき一定周期ごとにカウンタをリセットし
、CPUからのアクセス時間が一定周期を越えたときプ
ログラムが異常ないしは暴走中であると検出するもので
ある。通常、リアルタイム処理や制御システムでは、あ
る定められた時間を経過したときオーバーフロー信号を
外部に報告してシステムの切換えやシステムの安全性を
確保するためにWDT回路が使用されている。また、こ
のWDT回路は、1回目のオーバーフローで監視プログ
ラムに割込みをかけ、一定時間経過後に再びオーバーフ
ローが発生したときその旨を外部に報告し、アプリケー
ションプログラムの異常とシステムプログラムとの異常
を区別することが行われている。
[Prior art] WDT (watchdog timer: wat
The ch dog timer) circuit resets a counter at fixed intervals when the CPU is operating normally, and detects that the program is abnormal or running out of control when the access time from the CPU exceeds a fixed cycle. be. Normally, in real-time processing and control systems, a WDT circuit is used to report an overflow signal to the outside after a certain predetermined time has elapsed to ensure system switching and system safety. In addition, this WDT circuit interrupts the monitoring program when the first overflow occurs, and when an overflow occurs again after a certain period of time, it reports this to the outside, and distinguishes between abnormalities in the application program and abnormalities in the system program. things are being done.

【0003】ところで、従来のこの種のWDT回路は、
前述したように予めハード的にCPUからのアクセス時
間が固定され、当該CPUからアクセス時間を経過して
もWDTポートにアクセスがないとき、CPUにリセッ
トをかけるとか、或いはソフトウェア制御によって禁止
できないマスク不能な割込みNMI(non mask
ableinterrupt)をかけた後、一定時間経
過後にCPUを強制的にリセットする方式となっている
By the way, the conventional WDT circuit of this type is
As mentioned above, the access time from the CPU is fixed in advance by hardware, and when there is no access from the CPU to the WDT port even after the access time has elapsed, it is impossible to mask the CPU by resetting it or prohibiting it by software control. Interrupt NMI (non mask
ableinterrupt) and then forcefully resets the CPU after a certain period of time has elapsed.

【0004】0004

【発明が解決しようとする課題】しかし、以上のような
WDT回路では、予めWDT監視時間(アクセス時間)
が固定されていることから融通性に欠け、ソフトウェア
の処理方法いかんにより、或いはシステム的な動作処理
の場合には必ずしも好適な方式とは言えない。
[Problem to be solved by the invention] However, in the above WDT circuit, the WDT monitoring time (access time) is set in advance.
Since this method is fixed, it lacks flexibility, and is not necessarily suitable for system-based operation processing, depending on the software processing method.

【0005】しかも、NMIによる割込みをかけても、
一定時間後にCPUを強制的にリセットしてしまうので
、NMI発生後即時にシャットダウン処理を開始せざる
を得ず、さらにシャットダウン処理の時間が速いことか
ら異常情報を残す場合でも限度がある。
[0005] Moreover, even if an NMI interrupt is applied,
Since the CPU is forcibly reset after a certain period of time, it is necessary to start shutdown processing immediately after the NMI occurs, and furthermore, since the shutdown processing time is fast, there is a limit to how much abnormality information can be left.

【0006】本発明は上記実情にかんがみてなされたも
ので、軽度な異常に対してシャットダウンせずに処理を
継続させることができ、かつ、異常情報を残すに十分な
時間を確保しうるWDT回路を提供することを目的とす
る。
The present invention has been made in view of the above-mentioned circumstances, and provides a WDT circuit that can continue processing without shutting down in response to a minor abnormality, and that can secure sufficient time to leave abnormality information. The purpose is to provide

【0007】[0007]

【課題を解決するための手段】本発明に係わるWDT回
路は上記課題を解決するために、CPUによるデータの
書込みが一定時間行われないとき、前記CPUが動作異
常であると判定するWDT回路において、前記CPUか
ら送られてくる書込みデータに基づいて異常監視時間が
プリセットされる時間設定手段と、前記CPUからのア
クセスが前記時間設定手段によってプリセットされた異
常監視時間を越えたとき、動作異常と判定して前記CP
UへNMI要求信号を送出するNMI要求信号発生手段
と、このNMI要求信号発生手段からNMI要求信号を
発生した後、所定時間以内にアクセスがないとき前記C
PUへリセット信号を送出するリセット信号発生手段と
を備えた構成である。
[Means for Solving the Problems] In order to solve the above problems, the WDT circuit according to the present invention determines that the CPU is malfunctioning when the CPU does not write data for a certain period of time. , a time setting means for presetting an abnormality monitoring time based on write data sent from the CPU; and an operation abnormality is determined when an access from the CPU exceeds the abnormality monitoring time preset by the time setting means. Determine the CP
NMI request signal generating means for sending an NMI request signal to U, and when there is no access within a predetermined time after the NMI request signal generating means generates the NMI request signal, the C
This configuration includes reset signal generation means for sending a reset signal to the PU.

【0008】[0008]

【作用】従って、本発明は以上のような手段を講じたこ
とにより、CPUからのデータの書込みによって任意の
異常監視時間を設定でき、かつ、WDT異常発生時にC
PUへNMI要求信号を送出し、その後、所定時間以内
にCPUからアクセスがあればWDT監視を再開し、前
記所定時間経過してもCPUからアクセスがないときだ
けCPUをリセットすることにより、軽度な異常に対し
てシャットダウンせずに処理を継続させることができ、
またCPUを実際にリセットする場合でも異常情報を十
分に確保できる。
[Operation] Therefore, by taking the above-mentioned measures, the present invention can set any abnormality monitoring time by writing data from the CPU, and can also set the abnormality monitoring time when a WDT abnormality occurs.
By sending an NMI request signal to the PU, restarting WDT monitoring if there is an access from the CPU within a predetermined time, and resetting the CPU only when there is no access from the CPU after the predetermined time elapses. Processing can be continued without shutting down due to an abnormality,
Furthermore, even when actually resetting the CPU, sufficient abnormality information can be secured.

【0009】[0009]

【実施例】以下、本発明の一実施例について図1を参照
しながら説明する。同図において10はWDT監視時間
が任意にプリセット可能な時間設定手段としてのアップ
・ダウンカウンタ(ALS191)であって、このカウ
ンタ10はCPU(図示せず)からデータバス11の他
、WDT監視時間用基準クロック信号S1およびWDT
ポートセレクト信号S5が導入され、基準クロック信号
S1の立ち上がりごとにプリセット値をカウントダウン
して零となったときMIN端子からカウント値零信号S
2を出力し、かつ、カウント値を零とした基準クロック
信号S1の立ち下がりでRC端子からリプルクロック信
号S6を出力する機能をもっている。
Embodiment An embodiment of the present invention will be described below with reference to FIG. In the figure, reference numeral 10 denotes an up/down counter (ALS191) as a time setting means that can arbitrarily preset the WDT monitoring time. Reference clock signal S1 and WDT
When the port select signal S5 is introduced and the preset value is counted down every time the reference clock signal S1 rises and reaches zero, a count value zero signal S is sent from the MIN terminal.
2, and outputs a ripple clock signal S6 from the RC terminal at the falling edge of the reference clock signal S1 with the count value set to zero.

【0010】12はWDTポートセレクト信号S5の有
無に応じてWDT禁止/許可信号S3を出力する例えば
D−FF(ALS74)等を用いたWDT許可判定回路
であって、この回路12の判定結果であるWDT禁止信
号またはWDT許可信号S3が後続のアンド論理回路(
ALS08)等のNMI要求信号発生手段13に送られ
る。このNMI要求信号発生手段13は、WDT許可判
定回路12からWDT許可信号S3を受けているとき、
アップ・ダウンカウンタ10からのカウント値零信号S
2に基づいてCPUにNMI要求信号S4を発生する機
能をもっている。14はアップ・ダウンカウンタ10の
RC端子から出力するリプルクロック信号S6の立ち上
りでCPUリセット信号S7を出力する例えばD−FF
などを用いたリセット信号発生手段である。
Reference numeral 12 denotes a WDT permission determination circuit using, for example, a D-FF (ALS74), which outputs a WDT prohibition/permission signal S3 depending on the presence or absence of the WDT port select signal S5. A certain WDT prohibition signal or WDT enable signal S3 is activated by a subsequent AND logic circuit (
The signal is sent to the NMI request signal generating means 13 such as ALS08). When this NMI request signal generation means 13 receives the WDT permission signal S3 from the WDT permission determination circuit 12,
Count value zero signal S from up/down counter 10
2, it has a function of generating an NMI request signal S4 to the CPU based on the NMI request signal S4. 14 is a D-FF, for example, which outputs the CPU reset signal S7 at the rising edge of the ripple clock signal S6 output from the RC terminal of the up/down counter 10.
This is a reset signal generation means using, etc.

【0011】次に、以上のようなWDT回路の動作につ
いて図2を参照しながら説明する。先ず、CPUからア
ップ・ダウンカウンタ10にWDTポートセレクト信号
S5を送出し、またCPUからデータバス11を介して
アップ・ダウンカウンタ10にデータの書込みを行うと
、このアップ・ダウンカウンタ10ではそのデータに応
じたWDT監視時間,つまりプリセット値が設定され、
さらにWDT許可判定回路12からWDT許可信号S3
が送出される。
Next, the operation of the WDT circuit as described above will be explained with reference to FIG. First, when the CPU sends the WDT port select signal S5 to the up/down counter 10 and the CPU writes data to the up/down counter 10 via the data bus 11, the up/down counter 10 receives the data. The WDT monitoring time, that is, the preset value, is set according to the
Further, a WDT permission signal S3 is sent from the WDT permission determination circuit 12.
is sent.

【0012】この状態においてCPUのプログラム実行
中に基準クロック信号S1が入ってくると、このアップ
・ダウンカウンタ10はその基準クロック信号S1を受
けるごとにそのクロックの立ち上がりでプリセット値の
ダウン動作を実行する。ここで、アップ・ダウンカウン
タ10は、ダウン動作によってプリセット値,つまりカ
ウント値が零になったとき、MIN(ミニマム)端子か
らカウント値零信号S2を出力する。そこで、NMI要
求信号発生手段13はカウント値零信号S2を受けてC
PUへNMI要求信号S4を送出する。
In this state, when the reference clock signal S1 is input while the CPU is executing a program, the up/down counter 10 executes a down operation of the preset value at the rising edge of the clock every time it receives the reference clock signal S1. do. Here, when the preset value, that is, the count value becomes zero due to the down operation, the up/down counter 10 outputs a count value zero signal S2 from the MIN (minimum) terminal. Therefore, the NMI request signal generating means 13 receives the count value zero signal S2 and outputs the C
Sends an NMI request signal S4 to the PU.

【0013】ここで、CPUは、NMI要求信号S4を
受付けた後、その処理プログラムの中で図2のA区間に
示すようにWDTポートに対しアクセスし、アップ・ダ
ウンカウンタ10に零以外の値を書込めれば、NMI要
求信号発生手段13のMIN(ミニマム)端子からNM
I要求信号S4がなくなって元に戻り、これに伴ってR
C端子からリプルクロック信号S6が出力されず、よっ
てリセット信号発生手段14からCPUへリセット信号
S7が出力されない。従って、このWDT回路は軽度な
異常と判断し、引き続き、異常監視を継続する。
After receiving the NMI request signal S4, the CPU accesses the WDT port in the processing program as shown in section A in FIG. If NM can be written, the NM
The I request signal S4 disappears and returns to normal, and along with this, R
The ripple clock signal S6 is not output from the C terminal, and therefore the reset signal S7 is not output from the reset signal generating means 14 to the CPU. Therefore, this WDT circuit is determined to have a slight abnormality, and abnormality monitoring continues.

【0014】しかし、図2のB区間に示すようにCPU
へのMI要求信号S4に対し、CPUから何ら応答がな
ければ、MI要求信号S4の発生後基準クロック信号S
1の半サイクル,つまりクロックの立ち上がりから立ち
下がりまでの時間を経過した後、アップ・ダウンカウン
タ10のRC端子からリプルクロック信号S6を送出し
、このリプルクロック信号S6の立ち上りでリセット信
号発生手段14からリセット信号S7を送出し、CPU
を強制的にリセットするものである。
However, as shown in section B of FIG.
If there is no response from the CPU to the MI request signal S4, the reference clock signal S
After one half cycle, that is, the time from the rising edge to the falling edge of the clock, the ripple clock signal S6 is sent from the RC terminal of the up/down counter 10, and the reset signal generating means 14 is activated at the rising edge of the ripple clock signal S6. Sends a reset signal S7 from the CPU
This is a forced reset.

【0015】従って、以上のような実施例の構成によれ
ば、CPUからWDTポートにアクセスを行ってデータ
を書き込むといった簡単な方式によってWDT監視時間
を任意に変更でき、これによって種々のシステムに利用
できる。また、WDT監視時間経過後にNMI要求信号
S4を発生した後、CPUから基準クロック信号S1の
半サイクル期間内にWDTポートへアクセスすればシャ
ットダウンせずに処理を継続することができ、WDT監
視時間の再延長はもとより、WDT監視の禁止処置を容
易に取りうることができる。
Therefore, according to the configuration of the embodiment as described above, the WDT monitoring time can be arbitrarily changed by a simple method of accessing the WDT port from the CPU and writing data, and this makes it possible to use it in various systems. can. Furthermore, after the NMI request signal S4 is generated after the WDT monitoring time has elapsed, if the CPU accesses the WDT port within the half cycle period of the reference clock signal S1, processing can be continued without shutting down. In addition to re-extension, it is possible to easily prohibit WDT monitoring.

【0016】なお、上記実施例では、NMI要求信号S
4の発生後、リセット信号S7を発生する時間を基準ク
ロック信号の半サイクル時間としたが、その時間に特定
されるものでないことは言うまでもない。その他、本発
明はその要旨を逸脱しない範囲で種々変形して実施でき
る。
Note that in the above embodiment, the NMI request signal S
Although the time for generating the reset signal S7 after the generation of the clock signal S7 is defined as the half cycle time of the reference clock signal, it goes without saying that this time is not specific. In addition, the present invention can be implemented with various modifications without departing from the gist thereof.

【0017】[0017]

【発明の効果】以上説明したように本発明によれば、W
DT監視時間を自在に変更でき、しかもNMI要求信号
を発生した後一定時間以内にCPUからWDTポートへ
アクセスすれば、CPUのリセットを未然に回避でき、
軽度な異常に対してシャットダウンせずに処理を継続で
き、またCPUをリセットする場合でも異常情報を十分
に確保できる。
[Effects of the Invention] As explained above, according to the present invention, W
You can freely change the DT monitoring time, and if you access the WDT port from the CPU within a certain time after generating the NMI request signal, you can avoid resetting the CPU.
Processing can be continued without shutting down when a minor abnormality occurs, and sufficient abnormality information can be secured even when resetting the CPU.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】  本発明に係わるWDT回路の一実施例を示
す構成図。
FIG. 1 is a configuration diagram showing an embodiment of a WDT circuit according to the present invention.

【図2】  図1のWDT回路の動作を説明するタイミ
ング図。
FIG. 2 is a timing diagram illustrating the operation of the WDT circuit in FIG. 1.

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

10…アップ・ダウンカウンタ、11…データバス、1
2…WDT許可判定回路、13…NMI要求信号発生手
段、14…リセット信号発生手段、S1…基準クロック
信号、S2…カウント値零信号、S3…WDT禁止/許
可信号、S4…NMI要求信号、S5…WDTポートセ
レクト信号、S6…リプルクロック信号、S7…リセッ
ト信号。
10...up/down counter, 11...data bus, 1
2...WDT permission determination circuit, 13...NMI request signal generation means, 14...Reset signal generation means, S1...Reference clock signal, S2...Count value zero signal, S3...WDT prohibition/permission signal, S4...NMI request signal, S5 ...WDT port select signal, S6...ripple clock signal, S7...reset signal.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  CPUによるデータの書込みが一定時
間行われないとき、前記CPUが動作異常であると判定
するWDT回路において、前記CPUから送られてくる
書込みデータに基づいて異常監視時間がプリセットされ
る時間設定手段と、前記CPUからのアクセスが前記時
間設定手段によってプリセットされた異常監視時間を越
えたとき、動作異常と判定して前記CPUへNMI要求
信号を送出するNMI要求信号発生手段と、このNMI
要求信号発生手段からNMI要求信号を発生した後、所
定時間以内にアクセスがないとき前記CPUへリセット
信号を送出するリセット信号発生手段とを備えたことを
特徴とするWDT回路。
1. In a WDT circuit that determines that the CPU is malfunctioning when data is not written by the CPU for a certain period of time, an abnormality monitoring time is preset based on write data sent from the CPU. NMI request signal generating means that determines that there is an operational abnormality and sends an NMI request signal to the CPU when the access from the CPU exceeds the abnormality monitoring time preset by the time setting means; This NMI
A WDT circuit comprising: a reset signal generating means for sending a reset signal to the CPU when there is no access within a predetermined time after generating the NMI request signal from the request signal generating means.
JP3094108A 1991-04-24 1991-04-24 Wdt circuit Pending JPH04323740A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3094108A JPH04323740A (en) 1991-04-24 1991-04-24 Wdt circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3094108A JPH04323740A (en) 1991-04-24 1991-04-24 Wdt circuit

Publications (1)

Publication Number Publication Date
JPH04323740A true JPH04323740A (en) 1992-11-12

Family

ID=14101247

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3094108A Pending JPH04323740A (en) 1991-04-24 1991-04-24 Wdt circuit

Country Status (1)

Country Link
JP (1) JPH04323740A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57166655A (en) * 1981-04-03 1982-10-14 Hitachi Ltd Monitoring device for data processing system
JPS6129239A (en) * 1984-07-19 1986-02-10 Nec Corp Processor fault restart system
JPS61249152A (en) * 1985-04-27 1986-11-06 Fujitsu Ltd Program run-away processing system
JPS6361043B2 (en) * 1979-05-18 1988-11-28
JPH01154258A (en) * 1987-12-10 1989-06-16 Matsushita Electric Ind Co Ltd Malfunction detecting device using watchdog timer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6361043B2 (en) * 1979-05-18 1988-11-28
JPS57166655A (en) * 1981-04-03 1982-10-14 Hitachi Ltd Monitoring device for data processing system
JPS6129239A (en) * 1984-07-19 1986-02-10 Nec Corp Processor fault restart system
JPS61249152A (en) * 1985-04-27 1986-11-06 Fujitsu Ltd Program run-away processing system
JPH01154258A (en) * 1987-12-10 1989-06-16 Matsushita Electric Ind Co Ltd Malfunction detecting device using watchdog timer

Similar Documents

Publication Publication Date Title
US6378083B1 (en) Watch dog timer device
JP2625402B2 (en) Microprocessor
US6321289B1 (en) Apparatus for automatically notifying operating system level applications of the occurrence of system management events
JPH04323740A (en) Wdt circuit
JPH11259340A (en) Reactivation control circuit for computer
Murphy et al. Watchdog timers
GB2310514A (en) Watchdog circuit
JP2659067B2 (en) Microcomputer reset circuit
JP2877138B2 (en) Microcomputer for software debugging
JPH0271357A (en) Processor circuit
JPH02293939A (en) Stack overflow detection time processing system
JP3090054B2 (en) Stall monitoring method
JPS62145336A (en) Program loop detection system for computer system
JPH0756774A (en) Watching timer
JPH01231128A (en) Fault processing system
JPS61226843A (en) Device for detecting interruption abnormality
JPS6389941A (en) Monitor and control equipment for microprocessor applied equipment
JPH06318159A (en) Device abnormality detecting system
JPH06131218A (en) Cpu control system
JP2731386B2 (en) Control device
JPH0477935A (en) Fault detection circuit
JP2613986B2 (en) Information processing device
JPH04236637A (en) Microprocessor fault detecting circuit
JPS63280345A (en) Detection of program abnormality
JPH06204856A (en) Count value setting circuit