JPH0797335B2 - Computer runaway detection device - Google Patents

Computer runaway detection device

Info

Publication number
JPH0797335B2
JPH0797335B2 JP61071165A JP7116586A JPH0797335B2 JP H0797335 B2 JPH0797335 B2 JP H0797335B2 JP 61071165 A JP61071165 A JP 61071165A JP 7116586 A JP7116586 A JP 7116586A JP H0797335 B2 JPH0797335 B2 JP H0797335B2
Authority
JP
Japan
Prior art keywords
data
cpu
program
area
read
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 - Fee Related
Application number
JP61071165A
Other languages
Japanese (ja)
Other versions
JPS6324331A (en
Inventor
章 大庭
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 JP61071165A priority Critical patent/JPH0797335B2/en
Publication of JPS6324331A publication Critical patent/JPS6324331A/en
Publication of JPH0797335B2 publication Critical patent/JPH0797335B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、コンピュータの異常動作を検知する暴走検知
装置の改良に関する。
TECHNICAL FIELD The present invention relates to an improvement of a runaway detection device for detecting abnormal operation of a computer.

〔従来の技術〕[Conventional technology]

マイクロコンピュータを利用した装置の基本的な構成
は、第3図に示すように中央演算処理ユニット1(以
下、CPUと指称する)から出力されるアドレスバス2お
よびデータバス3にROM(リード・オンリー・メモリ)
4およびRAM(ランダム・アクセス・メモリ)5が接続
され、このCPU1によりROM4またはRAM5に記憶されたプロ
グラムデータを読出し、そのデータに基づいて必要な処
理が行われている。
As shown in FIG. 3, the basic configuration of a device using a microcomputer is such that a ROM (read only) is output to an address bus 2 and a data bus 3 output from a central processing unit 1 (hereinafter referred to as CPU). ·memory)
4 and a RAM (random access memory) 5 are connected, the CPU 1 reads out program data stored in the ROM 4 or the RAM 5, and necessary processing is performed based on the data.

ところで、以上のようなマイクロコンピュータの利用装
置においてはCPU1が外的ノイズやプログラムの不良等に
より異常動作を行うことがよく見受けられる。通常、こ
れをCPU1の暴走と読んでいる。
By the way, in the above-described device using the microcomputer, it is often found that the CPU 1 performs an abnormal operation due to external noise, defective programs, or the like. This is usually read as a runaway CPU1.

従来、かかるCPUの暴走検知には種々の検知方式が開発
されているが、その中でもウオッチドッグタイマ(WD
T)を用いた方式がよく用いられている。これは第4図
に示すように予めプログラムで一定時間T1以内であるエ
リアを図示イの如くアクセスする形式とし、一定時間T1
を越えて例えば時間T2(T1<T2)になってもアクセスが
無いときにはCPU1が暴走していると判断する方式であ
る。
Conventionally, various detection methods have been developed for detecting such a CPU runaway. Among them, the watchdog timer (WD
The method using T) is often used. This is the form to access as illustrated Lee area is within a predetermined time T 1 at pre-programmed as shown in FIG. 4, a predetermined time T 1
This is a method of determining that the CPU 1 is out of control when there is no access even after the time T 2 (T 1 <T 2 ) is exceeded, for example.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

しかし、以上のような暴走検知方式を用いた場合、CPU1
の異常を迅速に検知できない問題がある。すなわち、ウ
オッチドッグタイマ(WDT)を用いた場合にはCPU1の異
常にも拘らず最低限T2の時間後でないと異常を検知でき
ないことである。従って、この間、CPU1の異常によって
プログラムデータ等を破損し、このCPU1で制御される他
の装置および制御対象に重大な事故を発生させる危険が
ある。そこで、CPU1の暴走を迅速に検知する必要があ
り、このために例えば時間T1を小さくすることが考えら
れるが、この場合には第4図のロに示す如くプログラム
の処理時間が短くなり、処理能力の低下をきたす問題が
出てくる。一方、時間T2を時間T1に近づけることも考え
られるが、一寸としたタイミングの遅れによって正常で
あるにも拘らず異常であると判断する恐れがあり、コン
ピュータ利用装置としては非常に信頼性の低いものとな
らざるを得ない。
However, when using the above runaway detection method, CPU1
There is a problem that abnormalities of can not be detected quickly. That is, when the watchdog timer (WDT) is used, the abnormality can be detected only after the minimum time T 2 despite the abnormality of the CPU 1. Therefore, during this period, there is a risk that the program data and the like will be damaged due to the abnormality of the CPU 1, and a serious accident will occur in other devices controlled by the CPU 1 and the controlled object. Therefore, it is necessary to detect the runaway of the CPU 1 promptly, and for this reason, it is conceivable to reduce the time T 1 , for example, but in this case, the processing time of the program becomes short as shown in Fig. 4B, Problems arise that reduce the processing capacity. On the other hand, it is conceivable to make the time T 2 closer to the time T 1 , but there is a risk that it may be judged to be abnormal although it is normal due to a slight delay in timing, and it is extremely reliable as a computer-using device. Inevitably it will be low.

本発明は上記実情に鑑みてなされたもので、CPUの暴走
を迅速に検知してその弊害を最少限に抑え、速やかに正
常動作に復帰させ得るコンピュータの暴走検知装置を提
供することを目的とする。
The present invention has been made in view of the above circumstances, and an object thereof is to provide a computer runaway detection device capable of quickly detecting a runaway of a CPU and suppressing its adverse effects to a minimum and promptly returning to normal operation. To do.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は以上のような目的を達成するために、CPUがプ
ログラムデータを読み出すタイミングで前記プログラム
データをデータラッチ手段でラッチし、またデータ記憶
部に予めプログラムエリア以外の部分に書き込まれる固
定データまたはプログラムエリア以外を読み出したとき
に読出される固定データを記憶し、前記データ記憶部の
データと前記データラッチ手段でラッチされたデータと
を比較し、その一致回数が所定回数になったとき前記CP
Uへ異常である旨の割込信号を送出するようにしたもの
である。
In order to achieve the above-mentioned object, the present invention latches the program data with a data latch means at the timing when the CPU reads the program data, and the fixed data which is written in a portion other than the program area in the data storage unit in advance. Fixed data that is read when the area other than the program area is read is stored, the data in the data storage unit is compared with the data latched by the data latch means, and when the number of coincidence reaches a predetermined number, the CP
An interrupt signal indicating that there is an abnormality is sent to U.

〔作用〕[Action]

従って、以上のような手段とすることにより、CPUの異
常によって前記ラッチ手段でラッチされたデータと固定
データが連続して所定回数一致したとき、CPUが異常で
あると検知するためにCPUの暴走を迅速に検知でき、そ
の弊害を最少限にとどめて正常な動作に復帰できるもの
である。
Therefore, by using the above means, when the data latched by the latch means and the fixed data match a predetermined number of times consecutively due to the abnormality of the CPU, the CPU runs out to detect that it is abnormal. Can be quickly detected, the adverse effect can be minimized, and normal operation can be restored.

〔実施例〕〔Example〕

以下、本発明の一実施例について第1図を参照して説明
する。同図においてCPU11からはアドレスバス12および
データバス13が導出され、これらのバス12,13にはROM14
およびRAM15が接続されている。これらのROM14およびRA
M15の何れか一方または両方にプログラムデータが少な
くとも一部分のエリアを専有して記憶されている。
An embodiment of the present invention will be described below with reference to FIG. In the figure, an address bus 12 and a data bus 13 are derived from the CPU 11, and a ROM 14 is provided on these buses 12 and 13.
And RAM15 is connected. These ROM14 and RA
Program data is stored in one or both of the M15s by occupying at least a partial area.

16はプログラムデータをラッチするデータラッチ手段で
あって、これはCPU11から命令語フェッチサイクルの信
号つまりプログラムデータを読み出すタイミング信号M
を取り出す信号線17と、前記データバス13上のプログラ
ムデータKをラッチするデータラッチ回路18とを有し、
CPU11から信号線17を通して入力されるタイミング信号
Mを受けてラッチ回路18がデータバス13上のプログラム
データKをラッチする構成となっている。19は固定デー
タ記憶部であって、これはCPU11がROM14またはRAM15の
通常アクセスする以外の番地つまりプログラムデータエ
リア以外のエリアに記憶されるべき固定データを記憶す
るものである。その理由は、例えば対応命令語の先取り
機能をもつCPU、その他のCPUでは、CPUの異常時にプロ
グラムデータエリア以外のエリアをリードする可能性が
あるためである。従って、固定データ記憶部19に記憶さ
れるデータはCPU11が正常時に数回続けて命令語として
読出すことのないデータであり、かつ前記プログラムデ
ータエリア以外のエリアに書き込まれ、或いはプログラ
ムデータエリア以外を読出したときに読出されるデータ
を用いるものとする。20はプログラムデータ出力タイミ
ング信号Mでラッチされるラッチ回路18のラッチデータ
と固定データ記憶部19の固定データとを比較し、一致し
たとき一致信号Sを出力する比較部である。21は比較部
20から出力される一致信号S2をタイミング信号Mにより
カウントし、予め定めた回数に達した時に外的ノイズや
プログラムの不良等による異常動作つまり暴走であると
判断してCPU11へ割込信号Iを送出する計数部である。
つまり、CPU11は、プログラムなしエリアをリードする
が、これは必ずしも異常ではないが、CPU11に何らかの
異常が発生したときに毎回続けてプログラムなしエリア
を読む可能性があるので、予め計数部21に所定の値を設
定している。
Reference numeral 16 is a data latch means for latching program data, which is a timing signal M for reading out a command fetch cycle signal from the CPU 11, that is, program data.
And a data latch circuit 18 for latching the program data K on the data bus 13,
The latch circuit 18 receives the timing signal M input from the CPU 11 through the signal line 17 and latches the program data K on the data bus 13. Reference numeral 19 denotes a fixed data storage unit, which stores fixed data to be stored in an address other than the normal access of the ROM 14 or the RAM 15 of the CPU 11, that is, an area other than the program data area. The reason is that, for example, a CPU having a prefetching function for the corresponding command word and other CPUs may read an area other than the program data area when the CPU is abnormal. Therefore, the data stored in the fixed data storage unit 19 is data that the CPU 11 does not read as an instruction word several times in succession during normal operation, and is written in an area other than the program data area or other than the program data area. The data read when is read is used. Reference numeral 20 is a comparison unit that compares the latched data of the latch circuit 18 latched by the program data output timing signal M with the fixed data of the fixed data storage unit 19, and outputs a coincidence signal S when they coincide. 21 is the comparison section
The coincidence signal S2 output from 20 is counted by the timing signal M, and when the predetermined number of times is reached, it is determined that the operation is an abnormal operation, that is, a runaway due to external noise or program failure, and the interrupt signal I is sent to the CPU 11. This is a counting unit for sending.
That is, the CPU 11 reads the no-program area, but this is not necessarily an abnormality, but since there is a possibility that the CPU 11 may continuously read the no-program area every time when some abnormality occurs in the CPU 11, the counting section 21 is predetermined. The value of is set.

次に、以上のように構成された装置の動作について第2
図を参照して説明する。CPU11がアドレスを指定してROM
14またはRAM15からプログラムデータを読み出してデー
タバス13に送出すると、このプログラムデータ読み出し
タイミング信号Mがラッチ回路18および計数部21に入力
され、これによりラッチ回路18がデータバス13上のプロ
グラムデータKをラッチする。そして、このラッチ回路
18のラッチデータKは比較部20に送られる。ここで、比
較部20はタイミング信号Mでラッチされるラッチ回路18
のラッチデータKと固定データ記憶部19の固定データと
を比較し、この比較結果により一致したときに一致信号
Sを出力する。この一致信号Sは計数部21により計数さ
れ、これがタイミング信号Mが入力されるごとに連続し
て所定回数計数されると、計数部21から割込み信号Iが
COPU11へ送出される。この割込信号Iは、通常、緊急用
割込としてCPU11に入るが、ここでCPU11は異常処理のル
ーチンへプログラムをジャンプさせる。なお、第2図に
示すラッチデータKの×印はラッチデータKと固定デー
タとが一致していることを示す。
Next, regarding the operation of the apparatus configured as described above,
It will be described with reference to the drawings. CPU11 specifies address and ROM
When the program data is read out from the RAM 14 or the RAM 15 and sent out to the data bus 13, the program data read timing signal M is inputted to the latch circuit 18 and the counting section 21, whereby the latch circuit 18 outputs the program data K on the data bus 13. To latch. And this latch circuit
The latch data K of 18 is sent to the comparison unit 20. Here, the comparison unit 20 is a latch circuit 18 latched by the timing signal M.
Of the latch data K and the fixed data in the fixed data storage unit 19 are compared, and when the result of the comparison indicates that they match, a match signal S is output. The coincidence signal S is counted by the counter 21, and when the coincidence signal S is counted a predetermined number of times each time the timing signal M is input, the counter 21 outputs an interrupt signal I.
It is sent to COPU11. This interrupt signal I normally enters the CPU 11 as an emergency interrupt, but here the CPU 11 causes the program to jump to a routine for abnormal processing. The cross mark of the latch data K shown in FIG. 2 indicates that the latch data K and the fixed data match.

従って、以上のような実施例の構成によれば、プログラ
ムデータの送出タイミングによりデータバス13上のプロ
グラムデータをラッチし、このラッチデータとプログラ
ムエリア以外のエリアの固定データとを比較し、一致が
連続して所定回数となったときにCPU11へ割込信号Iを
送出するようにしたので、CPU11がプログラム実行中に
何らかの不具合が発生して暴走した時にプログラムエリ
ア以外を命令フェッチしたら直ちに検知することが可能
である。よって、異常発生を迅速に検知でき、この異常
発生後の処理が迅速かつ適確に行え、他の装置や制御対
象への影響を最少限に抑えることができる。また、プロ
グラムデータの読出しタイミング信号を用い、かつ通常
一般的に用いるデータ比較手段を用いて暴走を検知する
ようにしたので、非常に簡単な構成で実現できる。ま
た、通常、ROMデータを用いてCPU11を動作させる時、例
えば固定データを16個の“1"……“1"よりなるFFに設定
しておけば、書込み前のROM14のデータが“FF"であるこ
とから固定データを作成しやすく、また暴走してROM14
のプログラムデータの書込みエリア以外を読み出したい
時に非常に有効である。
Therefore, according to the configuration of the above embodiment, the program data on the data bus 13 is latched at the timing of sending the program data, and the latched data is compared with the fixed data in the area other than the program area, and the coincidence is found. Since the interrupt signal I is sent to the CPU 11 when it reaches the predetermined number of times in succession, when the CPU 11 runs out of control due to some trouble during program execution, it immediately detects if an instruction other than the program area is fetched. Is possible. Therefore, the occurrence of an abnormality can be detected quickly, the processing after the occurrence of the abnormality can be performed quickly and accurately, and the influence on other devices and control targets can be suppressed to a minimum. Further, since the runaway is detected by using the read timing signal of the program data and the data comparing means which is usually used in general, it can be realized with a very simple configuration. In addition, when operating the CPU 11 using ROM data, for example, if the fixed data is set to FF consisting of 16 "1" ... "1", the data of ROM14 before writing is "FF". Therefore, it is easy to create fixed data, and runaway ROM14
It is very effective when you want to read out other than the program data write area.

なお、上記実施例はメモリから命令語を読み出して実行
するコンピュータ利用装置のすべてに適用できるもので
ある。その他、本発明はその要旨を逸脱しない範囲で種
々変形して実施できる。
It should be noted that the above-described embodiment can be applied to all computer utilizing devices that read and execute command words from the memory. In addition, the present invention can be modified in various ways without departing from the scope of the invention.

〔発明の効果〕〔The invention's effect〕

以上詳記したように本発明によれば、CPUがプログラム
実行中に何らかの異常が発生して暴走した時に直ちにそ
の異常を検知でき、その弊害を最少限に抑えて正常な動
作に復帰させ得るコンピュータの暴走検知装置を提供で
きる。
As described above in detail, according to the present invention, a computer that can detect an abnormality immediately when the CPU has run out of operation and some abnormalities occur during program execution, and can restore the normal operation by suppressing the adverse effects to a minimum. Can provide a runaway detection device.

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

第1図および第2図は本発明の一実施例を説明するため
に示したもので、第1図は要部構成図、第2図は本発明
装置の動作を説明する動作タイミング図、第3図は従来
の一般的なコンピュータ利用装置の概略構成図、第4図
はウオッチドッグタイマを用いた方式の動作タイミング
図である。 11……CPU、13……データバス、14……ROM、15……RA
M、16……データラッチ手段、18……ラッチ回路、19…
…固定データ記憶部、20……比較部、21……計数部。
FIG. 1 and FIG. 2 are shown for explaining one embodiment of the present invention. FIG. 1 is a configuration diagram of main parts, and FIG. 2 is an operation timing chart for explaining the operation of the device of the present invention. FIG. 3 is a schematic configuration diagram of a conventional general computer utilizing apparatus, and FIG. 4 is an operation timing chart of a system using a watchdog timer. 11 …… CPU, 13 …… Data bus, 14 …… ROM, 15 …… RA
M, 16 ...... Data latch means, 18 …… Latch circuit, 19 ・ ・ ・
… Fixed data storage, 20 …… Comparison, 21 …… Counter.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】CPUがメモリから読み出したプログラムデ
ータに基づいてそのプログラム命令を実行するコンピュ
ータ利用装置において、 前記プログラムデータの読出しタイミング信号を用いて
データバスに送出されるデータをラッチするデータラッ
チ手段と、予めプログラムデータエリア以外のエリアに
書き込まれる固定データまたはプログラムデータエリア
以外のエリアを読み出したときに読出される固定データ
を記憶する固定データ記憶部と、この固定データ記憶部
のデータと前記データラッチ手段でラッチされたデータ
とを比較し、一致回数が所定回数になったとき前記コン
ピュータへ割込信号を送出する暴走検知手段とを備えた
ことを特徴とするコンピュータの暴走検知装置。
1. A computer utilizing device for executing a program command based on program data read from a memory by a CPU, wherein data latch means for latching data sent to a data bus using a read timing signal for the program data. A fixed data storage unit for storing fixed data written in an area other than the program data area in advance or fixed data read when an area other than the program data area is read; data in the fixed data storage unit; A runaway detecting device for a computer, comprising: runaway detecting means for comparing the data latched by the latch means and sending an interrupt signal to the computer when the number of coincidences reaches a predetermined number.
JP61071165A 1986-03-31 1986-03-31 Computer runaway detection device Expired - Fee Related JPH0797335B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61071165A JPH0797335B2 (en) 1986-03-31 1986-03-31 Computer runaway detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61071165A JPH0797335B2 (en) 1986-03-31 1986-03-31 Computer runaway detection device

Publications (2)

Publication Number Publication Date
JPS6324331A JPS6324331A (en) 1988-02-01
JPH0797335B2 true JPH0797335B2 (en) 1995-10-18

Family

ID=13452758

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61071165A Expired - Fee Related JPH0797335B2 (en) 1986-03-31 1986-03-31 Computer runaway detection device

Country Status (1)

Country Link
JP (1) JPH0797335B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS49115633A (en) * 1973-03-07 1974-11-05
JPS54139443A (en) * 1978-04-21 1979-10-29 Hitachi Ltd Information processor
JPS5783860A (en) * 1980-11-14 1982-05-25 Yokogawa Hokushin Electric Corp Working monitor circuit of processor

Also Published As

Publication number Publication date
JPS6324331A (en) 1988-02-01

Similar Documents

Publication Publication Date Title
US4839895A (en) Early failure detection system for multiprocessor system
JPH0797335B2 (en) Computer runaway detection device
JP2870202B2 (en) Method and apparatus for mutual monitoring between processors
JPS62175834A (en) Detecting circuit for runaway of central processing unit
JPS61279940A (en) Fault detector for computer
JPS6230105Y2 (en)
JPS6158054A (en) Run away detection of program
JPH06214831A (en) Abnormality detector for central processing unit
JP3344432B2 (en) Information processing device
JPS6118045A (en) Detecting system of program runaway
JPH0230060B2 (en)
JPS59112494A (en) Memory testing system
JPS5899841A (en) Address controlling system of partially mounted control memory
JPS6232544A (en) Abnormally detecting circuit for information processor
JPS5898900A (en) Microprocessor controlling system
JPS6057439A (en) Stack overflow detector
JPH0432935A (en) Microprocessor monitor circuit
JPH01228055A (en) Multi-processor system
JPH0258648B2 (en)
JPS6072040A (en) Monitoring system for executing time of program
JPS60193059A (en) Checking system for program action
JPH02163844A (en) Processor monitoring circuit
JPS5819096B2 (en) Computer abnormality detection timer circuit
JPS60193055A (en) Processing system for processor fault
JPH06295254A (en) Detecting for runaway of cpu

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees