JPH02307134A - Detecting method for program abnormality - Google Patents

Detecting method for program abnormality

Info

Publication number
JPH02307134A
JPH02307134A JP1129102A JP12910289A JPH02307134A JP H02307134 A JPH02307134 A JP H02307134A JP 1129102 A JP1129102 A JP 1129102A JP 12910289 A JP12910289 A JP 12910289A JP H02307134 A JPH02307134 A JP H02307134A
Authority
JP
Japan
Prior art keywords
program
processor
abnormality
time
host processor
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
JP1129102A
Other languages
Japanese (ja)
Inventor
Takakazu Shinoda
篠田 隆和
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP1129102A priority Critical patent/JPH02307134A/en
Publication of JPH02307134A publication Critical patent/JPH02307134A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the detecting ability for the program abnormality by detecting the abnormality of a host processor real-time monitor program with a time-over state of the change time of the time data and detecting the task abnormality with a time-over state of the change time of a status respectively. CONSTITUTION:A host processor 1 outputs the monitor data to a data signal line 3, and a monitor processor 2 fetches cyclically the latched data. Then the time data and the status information on each task are given to the processor 2 from an internal program of the processor 1. These information are compared with each other via an internal program of the processor 2. Thus the program abnormality of the processor 1 is detected. As a result, the program abnormality detecting ability is improved compared with a system applying a watch dog timer.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はプログラム異常検出方法に関し、特にマイクロ
コンピュータを使用したホストプロセッサにおけるプロ
グラム異常検出方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program abnormality detection method, and more particularly to a program abnormality detection method in a host processor using a microcomputer.

〔従来の技術〕[Conventional technology]

従来のプログラム障害検出方法としては第5図に示すよ
うなウォッチドッグタイマーがある。第5図において、
平常時はホストプロセッサ1のプログラムが発振器13
により定まるタイマー値より短かい周期でカウンター1
2をリセットするため異常信号は出力されないが、プロ
グラム異常時には、カウンター12をリセットしないた
め、異常信号を出力するようになっている。しかしなが
ら、ホストプロセッサ1のプログラムが異常を起しても
カウンター12をリセットする部分のプログラムが正常
に動作している場合にはウォッチドッグタイマによる方
法ではプログラムの異常は検出できない欠点を有してい
る。
As a conventional program failure detection method, there is a watchdog timer as shown in FIG. In Figure 5,
Under normal conditions, the program of the host processor 1 is the oscillator 13.
Counter 1 at a cycle shorter than the timer value determined by
However, when a program error occurs, the counter 12 is not reset, so an error signal is output. However, even if the program of the host processor 1 causes an error, if the program that resets the counter 12 is operating normally, the method using the watchdog timer has the disadvantage that the program error cannot be detected. .

また別の方法として、特開昭58−37753「プログ
ラム異常検出方法」がある、これは第6図に示すように
ホストプロセッサ1の外部にアドレス検出回路22とデ
ータ更新検出回路23とをもうけ、アドレス検出回路2
2はホストプロセッサ1内のプログラムの実行をアドレ
ス移動順序に置換し、連続性あるデータとしてデータ更
新検出回路23に出力し、このデータ更新検出回路23
にて、データの連続性を検出することにより、ホストプ
ロセッサ1内のプログラム異常を検出する方法がる。こ
の方法はウォッチドッグタイマーよりも異常検出能力は
高い。
Another method is ``Program Abnormality Detection Method'' disclosed in Japanese Patent Application Laid-Open No. 58-37753, which includes an address detection circuit 22 and a data update detection circuit 23 outside the host processor 1, as shown in FIG. Address detection circuit 2
2 replaces the execution of the program in the host processor 1 with the address movement order and outputs it as continuous data to the data update detection circuit 23.
There is a method for detecting a program abnormality in the host processor 1 by detecting data continuity. This method has higher anomaly detection ability than the watchdog timer.

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

しかしながら、通常ホストプロセッサ1内プログラムの
アドレスの移動順序は一定ではなく、分岐、飛び越しに
より変化するものである。従って、アドレス検出回路2
2内部のアドレス移動順序データは複数通り設けなけれ
ばならないという欠点を有している。さらにホストプロ
セッサ1内プログラムのアドレス変更に際しては、アド
レス検出回路22内部のアドレス移動順序データも同時
に変更しなければならないという欠点を有している。
However, the order in which the addresses of the program within the host processor 1 are moved is usually not constant, but changes due to branching and jumping. Therefore, address detection circuit 2
The disadvantage is that the address movement order data within 2 must be provided in a plurality of ways. Furthermore, when changing the address of the program in the host processor 1, there is a drawback that the address movement order data inside the address detection circuit 22 must be changed at the same time.

特にホストプロセッサのプログラム構造が単一プログラ
ムではなく、リアルタイムモニタープログラムとマルチ
タスクにより構成されている場合は、ウォッチドッグタ
イマーを用いる方式ではプログラム異常の検出抜けの可
能性が大きく、アドレス検出回路とデータ更新検出回路
構成による方式では、アドレス移動順序データは美大と
なり実用向きではない。
In particular, if the program structure of the host processor is not a single program but consists of a real-time monitor program and multitasking, the method using a watchdog timer has a high possibility of failing to detect program abnormalities, and the address detection circuit and data In the method using the update detection circuit configuration, the address movement order data becomes an art form and is not suitable for practical use.

本発明の目的はウォッチドッグタイマーを用いる方式よ
りもプログラムの異常検出能力が高く、アドレス検出回
路とデータ更新検出回路構成による方式のようにホスト
プロセッサのプログラムのアドレス変更に影響されるこ
とのないプログラム異常検出方法を提供することにある
An object of the present invention is to provide a program that has a higher ability to detect abnormalities in a program than a system using a watchdog timer, and that is not affected by changes in the program address of a host processor, unlike a system that uses an address detection circuit and a data update detection circuit configuration. The object of the present invention is to provide an anomaly detection method.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は、ホストプロセッサのプログラム異常検出を行
う専用の監視プロセッサを用意し、ホストプロセッサ内
部のプログラムから時刻データと各タスクのステータス
情報を監視プロセッサに随時渡し、監視プロセッサ内部
のプログラムがこれら情報を以前の情報と比較すること
により、ホストプロセッサのプログラム異常を検出する
方法を提供する。
The present invention provides a dedicated monitoring processor that detects program abnormalities in the host processor, passes time data and status information of each task from the program inside the host processor to the monitoring processor as needed, and the program inside the monitoring processor receives this information. A method is provided for detecting program abnormalities in a host processor by comparing with previous information.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例によるプログラム異常検出方
法を説明するための構成図、第2図は、第1図における
ホストプロセッサ1から監視プロセッサ2へ出力する監
視用データの一実施例の構成図、第3図および第4図は
ホストプロセッサ1のプログラム構成がリアルタイムモ
ニタープログラムの場合とマルチタスクの場合の監視プ
ロセッサ2のプログラムフローチャート例である。
FIG. 1 is a block diagram for explaining a program abnormality detection method according to an embodiment of the present invention, and FIG. 2 shows an embodiment of monitoring data output from the host processor 1 to the monitoring processor 2 in FIG. The configuration diagrams, FIG. 3, and FIG. 4 are examples of program flowcharts of the monitoring processor 2 when the program configuration of the host processor 1 is a real-time monitor program and a multitasking program.

第1図において、ホストプロセッサ1は監視用データを
データ信号線3へ出力し、監視プロセッサ2ではラッチ
されたデータをサイクリックに取り込む、第2図におい
て、401,402はそれぞれホストプロセッサ1内部
の分と秒の時刻データで、分2秒がインクリメントされ
るごとに出力される。403は、ホストプロセッサ1内
部のタスクの状態を表わすステータスで、本例では4つ
のステータスフラグとサイクルカウンタから構成されて
いる。4つのステータスフラグはACT IVEフラグ
、l10WAITフラグ、TIMERWAITフラグ、
およびWA I Tフラグであり、これらのフラグをリ
アルタイムモニターが更新するときにサイクルカウンタ
をインクリメントして監視プロセッサに出力する。
In FIG. 1, the host processor 1 outputs monitoring data to the data signal line 3, and the monitoring processor 2 cyclically takes in the latched data. In FIG. Minute and second time data, output every minute and second increment. A status 403 represents the state of a task inside the host processor 1, and in this example, it is composed of four status flags and a cycle counter. The four status flags are ACT IVE flag, l10WAIT flag, TIMERWAIT flag,
and WAIT flags, and when the real-time monitor updates these flags, it increments a cycle counter and outputs it to the monitoring processor.

第3図は、監視プロセッサ内プログラムのメインフロー
チャートの一例である。分と秒の時刻データを入力し、
時刻データが更新されている場合はタスクのステータス
を入力し、タスク1からタスクnの異常チェックを行う
0時刻データが更新されていない場合で、その時間が、
監視プロセッサ内の既定時間を越えた場合は、ホストプ
ロセッサが正常に時刻データを出力できない状態、即ち
プログラム異常状態であるとみなせるので、第1図にお
いて監視プロセッサ2から異常信号出力処理を行う。
FIG. 3 is an example of a main flowchart of a program within the monitoring processor. Enter the minute and second time data,
If the time data has been updated, enter the task status and check for abnormalities from task 1 to task n.0 If the time data has not been updated, enter the task status
If the predetermined time in the monitoring processor is exceeded, it can be considered that the host processor is unable to output time data normally, that is, the program is in an abnormal state, so that the monitoring processor 2 performs abnormal signal output processing in FIG.

第4図は、第3図のタスク異常処理部505゜506の
フローチャートの一例である0本図において、まずステ
ータス403をロードし、4つのステータスフラグのチ
ェックを行ない、もしオンになってはならないステータ
スフラグがオンであれば異常信号を出力する0次にサイ
クルカウンタをもとに前のステータスフラグと比較し、
ステータスフラグが一定時間以上変化しない場合は、そ
のタスクは正常に動作していないとみなせるので異常信
号を出力して終わる。ステータスフラグが変化している
場合は、ステータスを更新し、メモリに格納して終わる
FIG. 4 is an example of a flowchart of the task abnormality processing unit 505 and 506 in FIG. If the status flag is on, it outputs an abnormal signal. Compare it with the previous status flag based on the 0th cycle counter,
If the status flag does not change for a certain period of time or more, it can be assumed that the task is not operating normally, so an abnormality signal is output and the task ends. If the status flag has changed, update the status, store it in memory, and end.

以上説明した実施例では、第2図の時刻データ401.
402はBCDコード8ビット、ステータス403のス
テータスフラグは4ビツトでサイクルカウンタは4ビツ
トとしているが、ホストプロセッサの種類により、当然
これらの語長が変わっても、本発明によるプログラム異
常検出方法は何ら変わりはない。
In the embodiment described above, the time data 401 .
The BCD code 402 is 8 bits, the status flag 403 is 4 bits, and the cycle counter is 4 bits, but even if these word lengths naturally change depending on the type of host processor, the program abnormality detection method according to the present invention will not work. There is no difference.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によればホストプロセッサ
リアルタイムモニタープログラムの異常は時刻データの
変化時間のタイムオーバーにより、またタスクの異常は
ステータスの変化時間のタイムオーバーにより、容易に
検出ができる。特にホストプロセッサ全体のシステムダ
ウンにまで至らないような一部タスクプログラムの異常
でも確実に検出が可能で、ホストプロセッサのプログラ
ムのアドレス変更が生じた場合でも監視プロセッサ内の
プログラムに何んち変更を必要としない利点を有する。
As described above, according to the present invention, an abnormality in the host processor real-time monitor program can be easily detected by the timeout of the time data change time, and a task abnormality can be easily detected by the timeout of the status change time. In particular, it is possible to reliably detect abnormalities in some task programs that do not lead to system down of the entire host processor, and even if the address of the program in the host processor changes, the program in the monitoring processor cannot be changed in any way. It has advantages that you don't need.

図面の簡単な説明 第1図は本発明によるプログラム異常検出方法の一実施
例の構成図、第2図は第1図におけるホストプロセッサ
からデータ信号線を通って監視プロセッサに出力される
監視用データの一例の構成図、第3図は監視プロセッサ
内のプログラムの順序を示したメインフローチャート、
第4図は第3図のタスク異常チェック処理部505,5
06のフローチャートの一例、第5図は従来より行なわ
れているウォッチドッグタイマーによるプログラム異常
検出方法の構成図、第6図は従来のプログラム異常検出
方法の構成図である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an embodiment of the program abnormality detection method according to the present invention, and FIG. 2 shows monitoring data output from the host processor in FIG. 1 to the monitoring processor through the data signal line. A configuration diagram of an example, FIG. 3 is a main flowchart showing the order of programs in the monitoring processor,
FIG. 4 shows the task abnormality check processing unit 505, 5 in FIG.
FIG. 5 is a block diagram of a conventional program abnormality detection method using a watchdog timer, and FIG. 6 is a block diagram of a conventional program abnormality detection method.

1・・・ホストプロセッサ、2・・・監視プロセッサ、
3・・・データ信号線。
1... host processor, 2... monitoring processor,
3...Data signal line.

代理人 弁理士  内 原  音 第1図 窮3図 窮左図 第6凹Agent Patent Attorney Oto Uchihara Figure 1 3rd picture Kyuzuzu 6th concave

Claims (1)

【特許請求の範囲】[Claims] マイクロコンピュータを用いたホストプロセッサが正し
いプログラムの実行にしたがって動作しているか否かを
検出するプログラム異常検出方法において、前記ホスト
プロセッサに外部からプログラム異常検出のための監視
プロセッサを接続し、前記ホストプロセッサから時刻デ
ータとタスクのステータス情報を前記監視プロセッサに
送り、前記監視プロセッサのプログラムで前記情報を以
前の情報と比較することによりホストプロセッサのプロ
グラムの異常を検出することを特徴とするプログラム異
常検出方法。
In a program abnormality detection method for detecting whether a host processor using a microcomputer is operating according to correct program execution, a monitoring processor for detecting a program abnormality is externally connected to the host processor, and the host processor A method for detecting a program abnormality, characterized in that an abnormality in a program of a host processor is detected by sending time data and task status information from a host processor to the monitoring processor, and comparing the information with previous information in the program of the monitoring processor. .
JP1129102A 1989-05-22 1989-05-22 Detecting method for program abnormality Pending JPH02307134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1129102A JPH02307134A (en) 1989-05-22 1989-05-22 Detecting method for program abnormality

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1129102A JPH02307134A (en) 1989-05-22 1989-05-22 Detecting method for program abnormality

Publications (1)

Publication Number Publication Date
JPH02307134A true JPH02307134A (en) 1990-12-20

Family

ID=15001118

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1129102A Pending JPH02307134A (en) 1989-05-22 1989-05-22 Detecting method for program abnormality

Country Status (1)

Country Link
JP (1) JPH02307134A (en)

Similar Documents

Publication Publication Date Title
CA2292991C (en) Watch dog timer system
JPH02307134A (en) Detecting method for program abnormality
JPS6115239A (en) Processor diagnosis system
US5404499A (en) Semi-automatic program execution error detection
JP2001043201A (en) Multiprocessor fault detector
JPH1115661A (en) Self-diagnosis method for cpu
JPS62175834A (en) Detecting circuit for runaway of central processing unit
JPS6170645A (en) Data collecting device for analysis of trouble cause
JPH1011317A (en) Digital controller
JPH09128268A (en) Program fault detecting method
JPH03186937A (en) Cpu bus data diagnostic device
JPS62166449A (en) History storage device for logical unit
JPH04275664A (en) Mutual monitoring method and device between processors
JPH06266584A (en) Integrated circuit
JPH02297225A (en) Microprocessor
JPS6074052A (en) History memory control system
JPS61141043A (en) Abnormality detection system in system for making redundant
JPS6029128B2 (en) microprogram controller
JPH01209516A (en) System for monitoring timer working
JPH0448332A (en) Information processor
JPH01281540A (en) Fault detecting device
JPS60164814A (en) Abnormal input detector
JPH04138532A (en) Runaway detecting circuit
JPS59206944A (en) Microprogram supervisory device
JPS6359637A (en) Processor operation monitoring circuit