JPS6341094B2 - - Google Patents

Info

Publication number
JPS6341094B2
JPS6341094B2 JP56043711A JP4371181A JPS6341094B2 JP S6341094 B2 JPS6341094 B2 JP S6341094B2 JP 56043711 A JP56043711 A JP 56043711A JP 4371181 A JP4371181 A JP 4371181A JP S6341094 B2 JPS6341094 B2 JP S6341094B2
Authority
JP
Japan
Prior art keywords
signal
program
abnormality detection
outputs
output
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
Application number
JP56043711A
Other languages
Japanese (ja)
Other versions
JPS57157364A (en
Inventor
Yutaka Harada
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
Tokyo Shibaura Electric Co 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 Tokyo Shibaura Electric Co Ltd filed Critical Tokyo Shibaura Electric Co Ltd
Priority to JP56043711A priority Critical patent/JPS57157364A/en
Publication of JPS57157364A publication Critical patent/JPS57157364A/en
Publication of JPS6341094B2 publication Critical patent/JPS6341094B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Retry When Errors Occur (AREA)

Description

【発明の詳細な説明】 本発明は、電子計算機、特に小型電子計算機に
おいて雑音等による一時的な誤動作の異常を検出
する異常検出回路に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an abnormality detection circuit for detecting abnormalities such as temporary malfunctions caused by noise or the like in electronic computers, particularly small-sized electronic computers.

第1図に従来の異常検出回路の例を示す。この
回路は一般にウオツチドツグタイマと呼ばれてい
る。その構成ならびに動作を第2図を参照して説
明する。
FIG. 1 shows an example of a conventional abnormality detection circuit. This circuit is generally called a watchdog timer. Its configuration and operation will be explained with reference to FIG.

小型計算機に格納されるプログラムには、プロ
グラム実行サイクルの1周期毎に必ず出力ポート
11にクリア信号CLを出力させる命令が含まれ
ている。このクリア信号CLはカウンタ13に入
力されて一定周期T0毎にカウンタ13をクリア
する。一方、カウンタ13には予め前記1周時間
T0よりも大なる時間に対応するカウント値K0
プリセツトされている。したがつて、通常時、カ
ウンタは発振器12からの基準クロツク信号CK
をカウントしていて一定周期T0毎に入力される
クリア信号CLでクリアされる。このことは、プ
ログラムの実行が正常に行われていることを意味
する。
A program stored in a small computer includes an instruction to output a clear signal CL to the output port 11 every program execution cycle. This clear signal CL is input to the counter 13 and is cleared at every fixed period T0 . On the other hand, the counter 13 stores the one-round time in advance.
A count value K 0 corresponding to a time greater than T 0 is preset. Therefore, under normal conditions, the counter receives the reference clock signal CK from the oscillator 12.
is counted and cleared by the clear signal CL that is input every fixed period T0 . This means that the program is being executed normally.

ところが、何らかの原因によりプログラムが暴
走、あるいは停止した場合、出力ポート11から
はクリア信号CLが出力されないこととなる。す
ると、カウンタ13は計数を続行しそのカウント
値は上昇する。カウント値がプリセツトされたカ
ウント値K0に達するとカウンタ13からはセツ
ト信号SETが出され、このセツト信号SETはR
―Sフリツプフロツプ14をセツトする。フリツ
プフロツプ14はこの状態を保持するとともに、
セツトされると同時にQ出力より異常信号WDT
を出力する。
However, if the program goes out of control or stops for some reason, the clear signal CL will not be output from the output port 11. Then, the counter 13 continues counting and its count value increases. When the count value reaches the preset count value K0 , the counter 13 outputs a set signal SET, and this set signal SET is R
-Set flip-flop 14. The flip-flop 14 maintains this state, and
At the same time as the Q output is set, an abnormal signal WDT is generated from the Q output.
Output.

異常信号WDTは計算機のソフトウエア、ハー
ドウエア上の異常にかかわらず出力され、計算機
ならびにその周辺装置の動作を停止させることと
なる。
The abnormality signal WDT is output regardless of any abnormality in the software or hardware of the computer, and causes the operation of the computer and its peripheral devices to stop.

このような異常が発生する原因には次のような
場合が考えられる。
Possible causes of such an abnormality are as follows.

(i) 純粋にハードウエア上での故障による場合 (ii) 虫(バツグ)と言われるソフトウエア上での
特殊条件におけるプログラムエラーによる場合 (iii) ノイズによる誤動作による場合 上記(i)については最近の半導体技術の進歩によ
り、その故障発生率はほとんどないといえる。(ii)
についてはプログラムが実装される前にデバツグ
(虫とり)が行われるため、この現象が起こるの
は非常に特殊な条件下に限定され、再起動させて
も再度発生する可能性はきわめて低い。(iii)につい
ては、単なる誤動作であるため再起動させても問
題はないが、特に産業機器として用いられる場合
には雑音が発生しやすい環境で用いられることが
多いことから誤動作そのものの発生頻度は比較的
高い。
(i) Cases caused purely by hardware failures (ii) Cases caused by program errors under special conditions in the software known as bugs (iii) Cases caused by malfunctions due to noise Regarding (i) above, there has been a recent Due to advances in semiconductor technology, the failure rate can be said to be almost negligible. (ii)
Because the program is debugged before it is implemented, this phenomenon only occurs under very specific conditions, and it is extremely unlikely to occur again even after restarting. Regarding (iii), it is a simple malfunction and there is no problem in restarting it, but especially when used as industrial equipment, it is often used in environments where noise is likely to occur, so the frequency of occurrence of malfunction itself is low. Relatively expensive.

以上の原因のうち(i)の場合はハードウエアその
ものの故障であるため致命的であるが、(ii),(iii)の
場合はいわばソフトウエア上の問題であるので原
因を確認すれば再起動は可能である。
Among the above causes, (i) is fatal because it is a failure of the hardware itself, but cases (ii) and (iii) are software problems, so once the cause is confirmed, it can be remedied. Activation is possible.

この場合、従来では異常検出回路の動作によつ
て制御装置が停止すると、オペレータ等が故障確
認の上、イニシヤルリセツト信号INTによりフ
リツプフロツプ14をリセツトして再起動を行な
つていた。しかし、かかる作業は煩雑であり、ま
た復旧時間も多く必要とする。
In this case, conventionally, when the control device is stopped due to the operation of the abnormality detection circuit, an operator or the like confirms the failure and then resets the flip-flop 14 using the initial reset signal INT to restart the control device. However, such work is complicated and requires a lot of recovery time.

そこで本発明は、CPUの割込処理を利用して
自動的かつ容易に再起動することを可能とする異
常検出回路を提供することを目的とする。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide an abnormality detection circuit that enables automatic and easy restart using CPU interrupt processing.

以下本発明を図示する実施例に基づいて詳述す
る。第3図は本発明による異常検出回路の実施例
を示す。なお、第1図、第2図と同一部分には同
一の符号を付し、その詳細は同様なので説明を省
略する。
The present invention will be described in detail below based on illustrated embodiments. FIG. 3 shows an embodiment of the abnormality detection circuit according to the present invention. Note that the same parts as in FIGS. 1 and 2 are given the same reference numerals, and the details are the same, so the explanation will be omitted.

第1図と異る部分は、リセツト信号RSを出力
する出力ポート15、リセツト信号RSおよび電
源再投入時の手動イニシヤルリセツト信号INT
を入力としてリセツト信号をフリツプフロツプ1
4に出力するOR回路16が設けられている点で
ある。また、図示しないが異常信号WDTは制御
装置の安全回路の他、CPUに対し割込信号とし
て与えられるようになつており、さらに後述する
ようにCPUからは異常状態の点検終了後出力ポ
ート15にリセツト信号出力命令が与えられるよ
うになつている。
The parts that differ from Figure 1 are the output port 15 that outputs the reset signal RS, the reset signal RS, and the manual initial reset signal INT when the power is turned on again.
The reset signal is input to flip-flop 1.
4 is provided with an OR circuit 16 that outputs an output to 4. Although not shown, the abnormality signal WDT is given to the CPU as an interrupt signal in addition to the safety circuit of the control device, and as will be described later, the CPU sends it to the output port 15 after checking for abnormal conditions. A reset signal output command is given.

第3図において、異常検出動作そのものは第1
図の場合と同様である。すなわち、カウンタ13
でのカウント値がK0に達し、フリツプフロツプ
14からは異常信号WDTが出力される。
In Figure 3, the abnormality detection operation itself is the first
This is the same as the case shown in the figure. That is, counter 13
The count value reaches K0 , and the flip-flop 14 outputs an abnormal signal WDT.

異常信号WDTはCPUの割込入力に入力され、
CPUは次に述べる割込み処理を開始する。第4
図はCPUの割込処理のフローチヤートである。
異常検出信号WDTがCPUに割込み要求信号とし
て入力されると、まず、CPUは全ての割込みを
禁止する。このとき異常信号WDTにより既に制
御装置の運転は休止されているが、CPUは出力
状態をより安全な状態へ変更する命令を実行す
る。次いで、この異常状態が何回目かをチエツク
する。本実施例では1回だけの再起動を許可する
こととし、したがつて異常状態が2回目であれば
ここで停止状態となる。一方、異常状態が1回目
の場合に限りメインプログラムのチエツクサムを
実行する。ここで、チエツクサムというのはプロ
グラムを全て数とみなし、最初から最後まで加算
してその値と予め与えられている総加算値とを比
較することである。したがつて、チエツクサムで
は、書込み時のプログラムがその後変化している
か否かをチエツクすることとなる。チエツクサム
の結果、プログラム数の総加算値が一致していな
い場合、プログラムが破壊されていることになる
ので停止される。正しければ、CPUからは出力
ポート11からクリア信号CLを出力させるとと
もに、出力ポート15よりリセツト信号RSを出
させる。
The abnormal signal WDT is input to the CPU interrupt input,
The CPU starts the interrupt processing described below. Fourth
The figure is a flowchart of CPU interrupt processing.
When the abnormality detection signal WDT is input to the CPU as an interrupt request signal, the CPU first prohibits all interrupts. At this time, although the control device has already stopped operating due to the abnormal signal WDT, the CPU executes a command to change the output state to a safer state. Next, check how many times this abnormal state has occurred. In this embodiment, only one restart is permitted, and therefore, if the abnormal state occurs for the second time, the system will be in a stopped state. On the other hand, a checksum of the main program is executed only when the abnormal state occurs for the first time. Here, checksum means to treat all programs as numbers, add them from the beginning to the end, and compare that value with a pre-given total addition value. Therefore, in the checksum, it is checked whether the program at the time of writing has changed since then. As a result of the checksum, if the total addition value of the number of programs does not match, it means that the program has been destroyed and is stopped. If correct, the CPU outputs a clear signal CL from the output port 11 and outputs a reset signal RS from the output port 15.

これにより、カウンタ13はクリアされ、かつ
フリツプフロツプ14はリセツトされる。このと
き、図示しないがメモリ、CPU、バスラインに
故障がなければフリツプフロツプ14はリセツト
されることになる。
As a result, the counter 13 is cleared and the flip-flop 14 is reset. At this time, if there is no failure in the memory, CPU, or bus line (not shown), the flip-flop 14 will be reset.

次に、先に禁止された割込み処理のうち、異常
信号WDTに関する割込み入力のみ許可される。
もし、前回の異常信号WDTのリセツト動作が失
敗していた場合、異常信号WDTは出力されたま
まなので、再びこの割込み処理が繰返され、その
結果異常状態が2度目ということになるので停止
状態となり、安全性が確保される。
Next, among the previously prohibited interrupt processes, only the interrupt input related to the abnormal signal WDT is permitted.
If the previous reset operation of the abnormal signal WDT has failed, the abnormal signal WDT remains output, so this interrupt processing is repeated again, and as a result, the abnormal state occurs for the second time, so the system is stopped. , safety is ensured.

異常信号WDTがリセツトされていれば、メイ
ンプログラムの最初へジヤンプし、初期状態より
命令の実行が開始される。
If the abnormal signal WDT has been reset, the program jumps to the beginning of the main program and starts executing instructions from the initial state.

さて、異常信号WDTがリセツトされると、運
転可能状態となり、計算機は再び起動し、運転を
開始する。
Now, when the abnormality signal WDT is reset, the computer becomes ready for operation, and the computer starts up again and starts operation.

以上の通り、一度異常検出が行われて異常検出
信号WDTが出力されて制御装置の運転が停止さ
れても、CPUの割込処理により再起動可能性の
有無判断結果に基づく信号により致命的故障以外
の場合自動的に停止又は再起動されることとな
る。故障原因として大きな割合をもつ雑音による
誤動作またはソフトウエア上のエラーによる誤動
作の場合に迅速に対応することが可能となる。
As mentioned above, even if an abnormality is detected once and the abnormality detection signal WDT is output and the operation of the control device is stopped, a signal based on the result of determining whether restarting is possible due to CPU interrupt processing will cause a fatal failure. Otherwise, it will be automatically stopped or restarted. It becomes possible to quickly respond to malfunctions caused by noise or software errors, which account for a large proportion of failures.

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

第1図は従来の異常検出回路、第2図はその動
作タイミングチヤート、第3図は本発明により異
常検出回路の実施例を示す回路図、第4図は割込
み処理のフローチヤートである。 11…出力ポート、12…発振器、13…カウ
ンタ、14…フリツプフロツプ、16…OR回
路、CL…クリア信号、CK…クロツク信号、
WDT…異常検出信号、SET…セツト信号、RS
…リセツト信号、INT…イニシヤルリセツト信
号。
FIG. 1 is a conventional abnormality detection circuit, FIG. 2 is an operation timing chart thereof, FIG. 3 is a circuit diagram showing an embodiment of the abnormality detection circuit according to the present invention, and FIG. 4 is a flowchart of interrupt processing. 11... Output port, 12... Oscillator, 13... Counter, 14... Flip-flop, 16... OR circuit, CL... Clear signal, CK... Clock signal,
WDT...Abnormality detection signal, SET...Set signal, RS
...Reset signal, INT...Initial reset signal.

Claims (1)

【特許請求の範囲】 1 プログラムの実行サイクルの1周期ごとに
CPUからの命令でクリア信号を出力する第1の
出力ポートと、 このクリア信号によりクリアされ、前記1周期
時間よりも大なるカウント値を計数したときセツ
ト信号を出力するカウンタと、 このカウンタに基準クロツク信号を出力する発
振器と、 前記セツト信号を受けてこれを保持するととも
に、前記プログラムの実行を中止させるための異
常検出信号を出力するフリツプフロツプと、 を備えた電子計算機の異常検出回路において、 前記異常検出信号が出力されたときに、前記プ
ログラムの内容を検査し、誤りがない場合にはリ
セツト信号を出力する第2の出力ポートと、 前記リセツト信号、または電源投入時を示すイ
ニシヤルリセツト信号のいずれかが与えられたと
きに、前記プログラムを再開すべく前記フリツプ
フロツプをリセツトするOR回路と、 を設けたことを特徴とする電子計算機の異常検出
回路。 2 プログラムの内容の検査を、プログラムを構
成するデジタルデータ列のチエツクサムを調べる
ことを特徴とする特許請求の範囲第1項記載の電
子計算機の異常検出回路。 3 異常検出信号が所定回数異常出力された場合
には、第2の出力ポートがリセツト信号を出力し
ないように構成したことを特徴とする特許請求の
範囲第1項または第2項記載の電子計算機の異常
検出回路。
[Claims] 1 For each program execution cycle
a first output port that outputs a clear signal in response to a command from the CPU; a counter that is cleared by the clear signal and outputs a set signal when it counts a count value greater than the one cycle time; An abnormality detection circuit for an electronic computer, comprising: an oscillator that outputs a clock signal; and a flip-flop that receives and holds the set signal and outputs an abnormality detection signal for stopping execution of the program. a second output port that inspects the contents of the program when an abnormality detection signal is output and outputs a reset signal if there is no error; and an initial reset signal that indicates when the power is turned on. An anomaly detection circuit for a computer, comprising: an OR circuit that resets the flip-flop in order to restart the program when any of the above is given. 2. An abnormality detection circuit for a computer according to claim 1, wherein the content of the program is checked by checking a checksum of a digital data string constituting the program. 3. The computer according to claim 1 or 2, wherein the second output port is configured not to output the reset signal when the abnormality detection signal is abnormally output a predetermined number of times. abnormality detection circuit.
JP56043711A 1981-03-25 1981-03-25 Fault detecting circuit of electronic computer Granted JPS57157364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56043711A JPS57157364A (en) 1981-03-25 1981-03-25 Fault detecting circuit of electronic computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56043711A JPS57157364A (en) 1981-03-25 1981-03-25 Fault detecting circuit of electronic computer

Publications (2)

Publication Number Publication Date
JPS57157364A JPS57157364A (en) 1982-09-28
JPS6341094B2 true JPS6341094B2 (en) 1988-08-15

Family

ID=12671382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56043711A Granted JPS57157364A (en) 1981-03-25 1981-03-25 Fault detecting circuit of electronic computer

Country Status (1)

Country Link
JP (1) JPS57157364A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS52119836A (en) * 1976-04-02 1977-10-07 Hitachi Ltd Calculator control system
JPS5451744A (en) * 1977-09-30 1979-04-23 Canon Inc Monitor system for fault factor
JPS5547544A (en) * 1978-09-29 1980-04-04 Toshiba Corp Automatic reinitiating circuit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS52119836A (en) * 1976-04-02 1977-10-07 Hitachi Ltd Calculator control system
JPS5451744A (en) * 1977-09-30 1979-04-23 Canon Inc Monitor system for fault factor
JPS5547544A (en) * 1978-09-29 1980-04-04 Toshiba Corp Automatic reinitiating circuit

Also Published As

Publication number Publication date
JPS57157364A (en) 1982-09-28

Similar Documents

Publication Publication Date Title
US8954801B2 (en) Microcomputer and method of operation thereof
JPS61163447A (en) Non-action state detector
US5257269A (en) Error controller for use in debugging microprocessor
JPS6341094B2 (en)
JPH11259340A (en) Reactivation control circuit for computer
JPS6363935B2 (en)
JPS59148961A (en) Monitoring system of operation of processor
JPH04195437A (en) Program runaway monitoring device
JPH0375882B2 (en)
JPH0149975B2 (en)
JPS63282857A (en) System for preventing program runaway
JPS63255742A (en) Data processor
JPS632922Y2 (en)
JPS6298435A (en) Defecting method for abnormality of computer
JPS61101845A (en) Test system of information processor
JP2001242901A (en) Device for detecting malfunction of programmable controller
JPS6252647A (en) Monitoring system for run away of microprocessor
JPH037965B2 (en)
JPH01166145A (en) Cpu monitor
JPH06103467B2 (en) Preventing malfunction of automobile computer
JPS6132147A (en) Fault detection system of computer
JPS6162941A (en) Inspection system of information processor
JPS61145650A (en) Test system of information processing unit
JPS63150742A (en) Computer system
JPH0374879B2 (en)