JPS61112251A - Runaway detecting system - Google Patents

Runaway detecting system

Info

Publication number
JPS61112251A
JPS61112251A JP59232520A JP23252084A JPS61112251A JP S61112251 A JPS61112251 A JP S61112251A JP 59232520 A JP59232520 A JP 59232520A JP 23252084 A JP23252084 A JP 23252084A JP S61112251 A JPS61112251 A JP S61112251A
Authority
JP
Japan
Prior art keywords
ram
jump
watchdog timer
runaway
ram area
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
JP59232520A
Other languages
Japanese (ja)
Inventor
Miwako Hashimoto
橋本 美和子
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 JP59232520A priority Critical patent/JPS61112251A/en
Publication of JPS61112251A publication Critical patent/JPS61112251A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs

Abstract

PURPOSE:To detect quickly a defect of an RAM by having a jump to a prescribed address within an RAM area when an interruption is produced and executing interruption processing before a watchdog timer completes its counting action. CONSTITUTION:When a CPU has an interruption (110), a jump is given to a prescribed address within an RAM area before the interruption processing is carried out. A jump instruction to be given to another address with the RAM area is already set at the jump destination. The control is shifted (130) finally to the interruption processing after such RAM jump processing 120 is repeated several times. A normal state 135 is discriminated with the RAM if the interruption processing is reset. Otherwise a runaway signal is delivered 140 to discriminate a defective state 140 of the RAM.

Description

【発明の詳細な説明】 [発明の技術分野] この発明は、プログラムがRAMエリアをアクセスした
場合にRAMの不良により発生するプログラムの暴走を
低減すべく、RAMの不良を早急に検出するようにした
暴走検出方式に関する。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention provides a method for quickly detecting a RAM defect in order to reduce program runaway caused by a RAM defect when a program accesses a RAM area. This paper relates to a runaway detection method.

[発明の技術的背景] コンピュータの主メモリは、例えばマイクロコンピュー
タなどにおいては通常プログラムを記憶するROMと情
報を一次的に記憶するRAMから構成されている。RO
Mに記憶されたプログラムは、ROMの部分的な不良や
その他種々の原因により暴走し、所定の動作を行なわな
い場合がある。
[Technical Background of the Invention] The main memory of a computer, for example in a microcomputer, is usually composed of a ROM that stores programs and a RAM that temporarily stores information. R.O.
The program stored in M may run out of control due to a partial defect in the ROM or various other causes, and may not perform the prescribed operation.

コンピュータが暴走した場合には、例えばRAMなどに
記憶されている重要な情報などを破壊する恐れがあるの
で、極力速くコンピュータの暴走を検出し、必要な処置
を行なうことが必要である。
If a computer goes out of control, there is a risk of destroying important information stored in, for example, RAM, so it is necessary to detect the computer out of control as quickly as possible and take necessary measures.

従来、このようなコンピュータの暴走を検出するために
、ウォッチドッグタイマを設け、このウォッチドッグタ
イマをROMに記憶されたプログラムの所定の命令など
で所定の時間間隔以下でリセットし、コンピュータが正
常である場合にはウォッチドッグタイマの計数時間が常
に所定の時間以下であるようにしている。そして、例え
ばコンピュータが暴走した場合には、ウォッチドッグタ
イマに対するリセット動作が所定の時間間隔以下で行な
われなくなるかまたは全く行なわれないため、ウォッチ
ドッグタイマの計数時間は前記所定の時間以上になり、
ウォッチドッグタイマから暴走を検出したことを識別す
る信号が出力される。 ゛ところで、コンピュータが暴
走する原因としては、RAMに不良などがあってRAM
の内容、例えばRAMに記憶されている飛越し先のアド
レスが破壊されてい・ることによるものがあるが、上述
したような従来におけるコンピュータの暴走を検出する
方法においては、このようなRAMの不良などに起因す
るRAMの内容の破壊を考慮しているものは少なく、こ
れによるコンピュータの暴走が多発する上、重要な情報
が破壊される恐れがあった。
Conventionally, in order to detect such runaway of a computer, a watchdog timer is provided, and this watchdog timer is reset at a predetermined time interval or less using a predetermined command of a program stored in a ROM to determine if the computer is operating normally. In some cases, the count time of the watchdog timer is always set to be less than or equal to a predetermined time. For example, if the computer goes out of control, the reset operation for the watchdog timer is not performed at a predetermined time interval or less, or is not performed at all, so that the counting time of the watchdog timer exceeds the predetermined time,
A signal identifying that a runaway has been detected is output from the watchdog timer.゛By the way, one of the reasons why a computer runs out of control is due to a defect in the RAM.
For example, this may be due to the jump destination address stored in RAM being destroyed.However, in the conventional method for detecting computer runaway as described above, such RAM failures cannot be detected. There are few systems that take into account the destruction of RAM contents caused by such problems, and there is a risk that computers will frequently run out of control due to this, and important information may be destroyed.

[発明の目的] この発明の目的は、上記に鑑みてなされたもので、その
目的とするところは、RAMの不良を早急に検出し、コ
ンピュータの暴走を低減するようにした暴走検出方式を
提供することにある。
[Object of the Invention] The object of the present invention has been made in view of the above, and the object thereof is to provide a runaway detection method that promptly detects a defective RAM and reduces runaway of a computer. It's about doing.

[発明の概要] 上記目的を達成するために、この発明は、プログラムを
記憶したROMおよび情報を一次的に記憶するRAMを
有し、ROMに記憶されたプログラムによって所定の時
間間隔以下でリセットされるウォッチドッグタイマの計
数時間が所定の時間に達したときにはプログラムの暴走
が発生したものと判断する暴走検出方式において、割込
みが発生したときには、RAMエリアの所定の番地にジ
ャンプさせ、前記ウォッチドッグタイマの計数時間が前
記所定の時間に達する前に、RAMエリア内において所
定の処理を行ない、所定の処理条件を満足したことを検
出して前記割込み処理を開始させることを要旨とする。
[Summary of the Invention] In order to achieve the above object, the present invention has a ROM that stores a program and a RAM that temporarily stores information, and that is reset at predetermined time intervals or less by the program stored in the ROM. In a runaway detection method that determines that a program runaway has occurred when the count time of a watchdog timer reaches a predetermined time, when an interrupt occurs, the watchdog timer jumps to a predetermined address in the RAM area. The gist is to perform a predetermined process in the RAM area before the counting time reaches the predetermined time, detect that a predetermined processing condition is satisfied, and then start the interrupt process.

[発明の実施例] 以下、この発明の実施例を図面を用いて説明づる。[Embodiments of the invention] Embodiments of the present invention will be described below with reference to the drawings.

第1図はこの発明の暴走検出方式を実施するための暴走
検出装置の一例を示すものである。同図において、CP
U1にはプログラムを記憶したROM3および情報を一
次的に記憶する複数のRAM5が接続されている。また
、CPU1にはウォッチドッグタイマくWD下)7が+
i続されている。
FIG. 1 shows an example of a runaway detection device for implementing the runaway detection method of the present invention. In the same figure, CP
A ROM 3 that stores programs and a plurality of RAMs 5 that temporarily store information are connected to U1. In addition, CPU1 has a watchdog timer (WD lower) 7 is +
It is continued.

このウォッチドッグタイマ7は、第2図に示すように、
cpuiがROM3に記憶したプログラムから読み出し
た所定の命令から形成されるリセット信号Srによりセ
ッ゛トされるようになっている。
This watchdog timer 7, as shown in FIG.
The cpui is set by a reset signal Sr formed from a predetermined command read from a program stored in the ROM 3.

この所定の命令はプログラム内に適当に記憶され、所定
の時間間隔以下でウォッチドッグタイマ7をリセットす
るようになっている。従って、ウォッチドッグタイマ7
の計数時間TOは常に所定の時間T r以下になってい
る。しかしながら、例えばRAMの不良などによりCP
LI 1に誤った情報または命令が供給されてcpui
が暴走した場合には、前記所定の命令はウォッチドッグ
タイマ7を前記所定の時間間隔以下でリセットするよう
に適当に読み出されないため、ウォッチドッグタイマの
計数時間TOは前記所定の時間Trを越えてしまう。ウ
ォッチドッグタイマ7はその計数時間TOが所定の時間
Trを越えると、CPU1に暴走検出信号Sdを出力し
、CPU 1をリセットし暴走を停止させるようになっ
ている。
This predetermined instruction is suitably stored in the program and is adapted to reset the watchdog timer 7 at or below a predetermined time interval. Therefore, watchdog timer 7
The counting time TO is always less than the predetermined time Tr. However, due to, for example, a defective RAM, the CP
LI 1 is supplied with incorrect information or instructions and the cpui
If the clock runs out of control, the predetermined command is not read properly to reset the watchdog timer 7 at a time less than or equal to the predetermined time interval, so that the count time TO of the watchdog timer exceeds the predetermined time Tr. I end up. When the count time TO exceeds a predetermined time Tr, the watchdog timer 7 outputs a runaway detection signal Sd to the CPU 1 to reset the CPU 1 and stop the runaway.

第3図はこのようなつAツチドッグタイマ7を使用して
CPU 1の暴走を検出づる方法を刊用してRAMの不
良を検出しようとする場合の処理動作を説明するための
図である。この処理動作を第4図のフローチャートを参
照して説明する。まず、CPU 1は割込みがかけられ
る(ステップ110)と、この割込み動作を実行】る前
にすぐに、第3図に示づように、RAMエリアのアドレ
スAにジレンプする。このアドレスAにはRA Mエリ
アのアドレス已にジャンプせよという命令が記憶されて
おり、この命令により同様にRAMエリアのアドレスB
にジャンプする。このようなジャンプ動作を幾度か例え
ばN回(N≧1)RAMエリア内において繰り返した(
ステップ120)後、最後のアドレスCから上記割込み
処理を実行する所定のアドレスITCにジャンプし、こ
の刈込み動作を実行する。なお、RAMエリア内にジャ
ンプして入ってから出るまでのRAMエリア内における
ジャンプ動作時間は、ウォッチドッグタイマが直前にリ
セットされて計数開始してからRAMエリアにジャンプ
して入るまでの時間を加えても、前記所定の時間Tr以
下であるように、RAMエリア内におけるジャンプ命令
の数を設定しておくことが必要である。
FIG. 3 is a diagram for explaining the processing operation when trying to detect a defective RAM by using such a method of detecting a runaway of the CPU 1 using the double dog timer 7. This processing operation will be explained with reference to the flowchart in FIG. First, when the CPU 1 receives an interrupt (step 110), immediately before executing the interrupt operation, the CPU 1 executes an interrupt to address A in the RAM area, as shown in FIG. This address A stores an instruction to jump to address B in the RAM area, and this instruction similarly jumps to address B in the RAM area.
Jump to. Such a jump operation is repeated several times, for example, N times (N≧1) within the RAM area (
After step 120), the process jumps from the last address C to a predetermined address ITC for executing the above-mentioned interrupt processing, and executes this pruning operation. Note that the jump operation time in the RAM area from jumping into the RAM area to leaving it includes the time from when the watchdog timer was reset just before and started counting until jumping into the RAM area. However, it is necessary to set the number of jump instructions in the RAM area so that it is less than or equal to the predetermined time Tr.

このようにRAMエリア内において、ジャンプ動作を幾
度か繰り返したことにより、すなわちジャンプ動作を繰
り返した場合においても、ウォッチドッグタイマが暴走
検出信号3dを出力する前の前記所定の時間Tr内に最
終的に前配割込み用の所定のアドレスITCに戻ること
ができた場合には、RAMは正常であると判断し得る(
ステップ130,135>。しかしながら、RAMに不
良があり、RAMに記憶されていた各ジャンプ動作また
はそのジャンプ先アドレスが破壊されていたような場合
には、ウォッチドッグタイマが暴走検出信号Sdを出力
する前に前記アドレスITCに戻ることができないので
、ウォッチドッグタイマから暴走検出信号Sdが出力さ
れ、RAMに不良があることが検出できるのである(ス
テップ140.150)。
In this way, even if the jump operation is repeated several times in the RAM area, that is, even if the jump operation is repeated, the final result will be detected within the predetermined time Tr before the watchdog timer outputs the runaway detection signal 3d. If it is possible to return to the predetermined address ITC for predistributed interrupts, it can be determined that the RAM is normal (
Steps 130, 135>. However, if there is a defect in the RAM and each jump operation stored in the RAM or its jump destination address is destroyed, the watchdog timer outputs the runaway detection signal Sd to the address ITC. Since it is not possible to return, the runaway detection signal Sd is output from the watchdog timer, and it is possible to detect that there is a defect in the RAM (steps 140 and 150).

なお、上記実施例では割込みの場合について説明したが
、これに限らず、定周期のタスクの場合も同様でRAM
エリアの中をジャンプさせたあとでタスクの先頭へ戻す
ようにしてもよい。
Note that although the above embodiment describes the case of an interrupt, the case is not limited to this, and the same applies to the case of a fixed-cycle task.
You may also be able to return to the beginning of the task after jumping within the area.

また、上記実施例においては、RAM1リア内における
動作として、ジャンプ動作を取り上げて説明したが、こ
のジャンプ動作は複数回に限らず、    l)1回で
もよい。更に、ジャンプ動作に限らず、例えば所定の演
算動作などを行ない、その結果をチェックし、結果が正
しい場合に前記割込み用の所定のアドレスI王Cに戻る
ようにし、正しくない場合にはウォッチドッグタイマか
ら暴走検出信号3dを出力するようにしてもよい。
Further, in the above embodiment, the jump operation was explained as an operation in the RAM 1 rear, but the jump operation is not limited to a plurality of times, but may be performed once. Furthermore, in addition to jump operations, for example, a predetermined arithmetic operation is performed, the result is checked, and if the result is correct, the return is made to the predetermined address for the interrupt, and if the result is not correct, the watchdog The runaway detection signal 3d may be output from the timer.

[発明の効果コ     ′ 以上説明し1=ように、この発明によれば、割込みが発
生した場合、RA Mエリアの所定の番地にジャンプし
、ウォッチドッグタイマが暴走検出信号を発生する前に
RAMエリア内において所定の処理を行なった後、前記
割込み処理を開始さけているので、RAMに不良などが
あってRAMの内容が破壊されていた場合には前記所定
の処理を達成7−ることができないため、ウォッチドッ
グタイマから暴走検出信号が発生され、RAMに不良が
あることを識別することができ、もってコンピュータの
翼走を低減することができる。
[Effects of the Invention] As explained above, according to the present invention, when an interrupt occurs, a jump is made to a predetermined address in the RAM area, and the RAM is read before the watchdog timer generates the runaway detection signal. Since the interrupt processing is avoided after the predetermined processing is performed in the area, the predetermined processing can be accomplished even if the contents of the RAM are destroyed due to a defect in the RAM. Therefore, a runaway detection signal is generated from the watchdog timer, and it is possible to identify that the RAM is defective, thereby reducing the running of the computer.

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

第1図はこの発明の暴走検出方式を実施覆る暴走検出装
置の一例を示すブロック図、第2図は第1図の装置に使
用されるウォッチドッグタイマの動作波形図、第3図は
第1図の装置の作用を説明するメモリエリア内における
ジャンプ命令のロケーションおよび流れを説明する図、
第4図は第1図に示す装置の作用を示すフローヂャート
である。 1・・・CPU、3・・・ROM、5・・・RAM、7
・・・ウォッチドッグタイマ。
FIG. 1 is a block diagram showing an example of a runaway detection device that implements the runaway detection method of the present invention, FIG. 2 is an operation waveform diagram of a watchdog timer used in the device shown in FIG. 1, and FIG. a diagram illustrating the location and flow of a jump instruction within a memory area illustrating the operation of the device shown in the figure;
FIG. 4 is a flowchart showing the operation of the apparatus shown in FIG. 1...CPU, 3...ROM, 5...RAM, 7
...Watchdog timer.

Claims (2)

【特許請求の範囲】[Claims] (1)プログラムを記憶したROMおよび情報を一次的
に記憶するRAMを有し、ROMに記憶されたプログラ
ムによって所定の時間間隔以下でリセットされるウォッ
チドッグタイマの計数時間が所定の時間に達したときに
はプログラムの暴走が発生したものと判断する暴走検出
方式において、割込みが発生したときには、RAMエリ
アの所定の番地にジャンプさせ、前記ウォッチドッグタ
イマの計数時間が前記所定の時間に達する前に、RAM
エリア内において予めプログラムされている処理を実行
させ、その処理結果が所定の条件を満足したことを検出
して前記割込み処理を開始させることを特徴とする暴走
検出方式。
(1) It has a ROM that stores programs and a RAM that temporarily stores information, and the counting time of a watchdog timer that is reset at a predetermined time interval or less by the program stored in the ROM reaches a predetermined time. In a runaway detection method that sometimes determines that a program has runaway, when an interrupt occurs, the program jumps to a predetermined address in the RAM area, and before the count time of the watchdog timer reaches the predetermined time,
A runaway detection method characterized in that a preprogrammed process is executed within an area, and the interrupt process is started upon detecting that the process result satisfies a predetermined condition.
(2)特許請求の範囲第1項記載の暴走検出方式におい
て、前記RAMエリア内において予めプログラムされた
処理として、RAMエリア内において少なくとも1回の
ジャンプ動作を実行することを特徴とする前記暴走検出
方式。
(2) In the runaway detection method according to claim 1, the runaway detection is characterized in that at least one jump operation is executed in the RAM area as a process programmed in advance in the RAM area. method.
JP59232520A 1984-11-06 1984-11-06 Runaway detecting system Pending JPS61112251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59232520A JPS61112251A (en) 1984-11-06 1984-11-06 Runaway detecting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59232520A JPS61112251A (en) 1984-11-06 1984-11-06 Runaway detecting system

Publications (1)

Publication Number Publication Date
JPS61112251A true JPS61112251A (en) 1986-05-30

Family

ID=16940613

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59232520A Pending JPS61112251A (en) 1984-11-06 1984-11-06 Runaway detecting system

Country Status (1)

Country Link
JP (1) JPS61112251A (en)

Similar Documents

Publication Publication Date Title
JPH02156357A (en) Program destruction preventing method
JPH02294739A (en) Fault detecting system
JPS61112251A (en) Runaway detecting system
JPH04266141A (en) Stack overflow detection system
JP2870202B2 (en) Method and apparatus for mutual monitoring between processors
JPS61141047A (en) Saving system of trouble information
JPS62217335A (en) Monitor circuit for cpu runaway
JPH0469744A (en) Runaway detector for microcomputer
JPS62175834A (en) Detecting circuit for runaway of central processing unit
JPS6155748A (en) Electronic computer system
JPS632922Y2 (en)
JPH0580692B2 (en)
JPS59212959A (en) Instruction control system
JPS63150732A (en) Program running supervisory equipment
JPS60171544A (en) Self-diagnosis device for abnormality of computer system
JPH02148203A (en) Sequence controller
JPH01246638A (en) Area error decision system for write instruction
JPH039487B2 (en)
JPS5916058A (en) Program
JPS5975348A (en) Method and device for detecting abnormality of computer
JPH01166145A (en) Cpu monitor
JPH01156839A (en) Data processor
JPS63228232A (en) Abnormality of program detection system
JPH06161737A (en) Program development supporting device
JPH03256137A (en) Processing method and device for inspecting and recognizing unset variable