JPS6368941A - Operation monitoring device for cpu - Google Patents

Operation monitoring device for cpu

Info

Publication number
JPS6368941A
JPS6368941A JP61211678A JP21167886A JPS6368941A JP S6368941 A JPS6368941 A JP S6368941A JP 61211678 A JP61211678 A JP 61211678A JP 21167886 A JP21167886 A JP 21167886A JP S6368941 A JPS6368941 A JP S6368941A
Authority
JP
Japan
Prior art keywords
cpu
count value
monitoring device
abnormality
memory
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
JP61211678A
Other languages
Japanese (ja)
Inventor
Makoto Matsumura
松村 眞
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 JP61211678A priority Critical patent/JPS6368941A/en
Publication of JPS6368941A publication Critical patent/JPS6368941A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To accurately monitor the operation of a CPU without reference to the configuration of operation abnormality by counting an oscillation output applied to the interruption input of the CPU with an interruption input which can not be masked, and detecting the operation abnormality and initializing the CPU. CONSTITUTION:Every time a pulse signal from an oscillator 13 is applied to the interruption input NMI which can not be masked, the CPU 11 performs interruption processing and also counts the pulse signal to store the result in a memory area 17 of a memory 15 and also store its inverted value in a memory area 19. Then when the interruption processing is performed, it is decided that the memory 15 is destroyed if the inversion contents in the area 17 do not coincide with the contents of the area 19, so that the CPU 1 is initialized. When their coincidence is obtained, on the other hand, it is decided that abnormal operation is performed if the counting contents exceeds a set value 2000, etc., corresponding to single-time interruption processing greatly and reaches a specific value 3000, etc., so that the CPU 1 is initialized. Consequently, the operation of the CPU is accurately monitored irrelevantly to the configuration of the operation abnormality by the simple constitution which requires no timer counter, etc.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、中央処理装置(CPU)の動作異常を監視す
るウォッチドッグタイマの如きCPUの動作監視装置に
関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to a CPU operation monitoring device such as a watchdog timer that monitors an abnormal operation of a central processing unit (CPU).

(従来の技術) 一般にマイクロコンピユータにおいては、CPUの動作
異常を監視すべく所謂ウオッチドッグタイマがハードウ
ェアで設けられている。第5図はその概要を示す図であ
る。同図において、カウンタ回路101は発振器103
から供給されるパルス信号を計数するものであり、また
CPIJ 105に対して、そのクリア端子(CL)が
CPU 105の所定の出力端子(0)に、その所定の
カウント出力端子(C10”)がCPU105のリセッ
ト端子(R8T)にそれぞれ接続されているものである
。すなわち、この回路にあっては、カウンタ回路101
が発振器103から供給されるパルス信号を計数してい
る間にCPU105から正常動作に従い適宜のタイミン
クで供給されるはずであるクリア信号がクリア端子(C
L)に供給されない場合にはCP[105に何らかの動
作異常が発生したことになるので、カウンタ回路101
が所定カウント数に達すると同時にCPU105に対し
リセット信号を供給して初期状態に戻す。逆に、CPU
105が正常動作中であれば、カウンタ回路101は前
記所定カウント数に達する前にクリア信号により計数値
がクリアされるのでリセット信号が出力されることはな
い。
(Prior Art) Microcomputers are generally provided with a so-called watchdog timer in hardware to monitor abnormalities in the operation of the CPU. FIG. 5 is a diagram showing the outline thereof. In the figure, the counter circuit 101 is connected to the oscillator 103.
For the CPIJ 105, its clear terminal (CL) is connected to a predetermined output terminal (0) of the CPU 105, and its predetermined count output terminal (C10'') is They are respectively connected to the reset terminal (R8T) of the CPU 105. That is, in this circuit, the counter circuit 101
While counting the pulse signals supplied from the oscillator 103, a clear signal, which should be supplied from the CPU 105 at an appropriate timing according to normal operation, is sent to the clear terminal (C
If it is not supplied to the counter circuit 101, it means that some operational abnormality has occurred in the CP[105.
At the same time when the count reaches a predetermined number, a reset signal is supplied to the CPU 105 to return it to the initial state. On the contrary, the CPU
If the counter circuit 105 is in normal operation, the count value of the counter circuit 101 is cleared by a clear signal before reaching the predetermined count number, so that no reset signal is output.

(発明が解決しようとする問題点) しかしながら、上述したウォッチドッグタイマには次の
ような不具合がある。すなわち、上述した一般的な回路
では、CPU105の動作異常が発生するとクリア信号
が出力されないという前提のもとで設計されたものであ
るため、CPU 105の動作異常時には常にクリア信
号が出力される、あるいは極めて不規則にクリア信号が
出力されるといった事態には対処し得ないのである。
(Problems to be Solved by the Invention) However, the above-described watchdog timer has the following problems. That is, the above-mentioned general circuit is designed on the premise that a clear signal will not be output when an abnormal operation occurs in the CPU 105, so a clear signal is always output when an abnormal operation occurs in the CPU 105. Alternatively, it is impossible to deal with a situation where a clear signal is output extremely irregularly.

本発明は、上記に鑑みてなされたもので、その目的とし
ては、CPUの動作異常の態様に関係なくcpuの動作
監視を適確に行なえるようにしたCPUの動作監視装置
を提供することにある。
The present invention has been made in view of the above, and an object of the present invention is to provide a CPU operation monitoring device that can accurately monitor CPU operation regardless of the type of CPU operation abnormality. be.

[発明の構成] (問題点を解決するための手段) 上記目的を達成するため、本発明は第1図に示す如く、
マスク不可能な割込み入力を有するCPU1と、このC
PUIの当該割込み入力に適宜のタイミングで信号を供
給する発振手段3と、CPLllによる発振手段3から
供給された信号の計数値を記憶する計数値記憶手段5と
、CPUの正常動作中には当該計数値記憶手段5におけ
る計数値を前記適宜のタイミングより長い設定時間毎に
消去する消去手段7と、前記発振手段3による割込み入
力への信号供給により割込み起動され、計数値記憶手段
5における計数値に基づいてCPUの動作異常の発生を
検出してCPUを初期化する初期化手段9とを有するこ
とを要旨とする。
[Structure of the Invention] (Means for Solving the Problems) In order to achieve the above object, the present invention has the following features as shown in FIG.
CPU1 with a non-maskable interrupt input and this C
An oscillation means 3 supplies a signal to the interrupt input of the PUI at an appropriate timing, a count storage means 5 stores the count value of the signal supplied from the oscillation means 3 by the CPLll, and the count value storage means 5 stores the count value of the signal supplied from the oscillation means 3 by the CPLll. An erasing means 7 erases the counted value in the counted value storage means 5 at intervals of a set time longer than the appropriate timing, and an interrupt is activated by a signal supplied to the interrupt input by the oscillation means 3, and the counted value in the counted value storage means 5 is erased. The gist of the present invention is to include an initializing means 9 for detecting the occurrence of an operational abnormality in the CPU based on the above and initializing the CPU.

(作用) 本発明に係るCPUの動作監視装置は、特にマスク不可
能な割込み入力を有するCPUにおいて、この割込み入
力に発振手段からの信号が適宜のタイミングで供給され
る毎に強制割込み処理に移り、発振手段からの信号供給
数に基づいてCPUの動作異常を検出してCPCIを初
期化するようにしている。
(Function) The CPU operation monitoring device according to the present invention, especially in a CPU having a non-maskable interrupt input, shifts to forced interrupt processing every time a signal from the oscillation means is supplied to the interrupt input at an appropriate timing. Based on the number of signals supplied from the oscillation means, abnormal operation of the CPU is detected and the CPCI is initialized.

(実施例) 以下、図面を用いて本発明の詳細な説明する。(Example) Hereinafter, the present invention will be explained in detail using the drawings.

第2図は本発明の一実施例に係るCPUの動作監視装置
の概要図を示すものである。同図において、11はマス
ク不可能な割込み入力(NMI)を有するcpu、13
はこのNMI入力に適宜のタイミングでパルス信号を供
給する発振器、15はCPtJllに接続されCPU1
1による当該パルス信号の計数値を記憶するメモリであ
る。すなわち、CPU11においては、本来のメインプ
ログラム処理に加えてNMT入力への適宜のタイミング
毎のパルスの供給に伴ない強制割込みによる後述するN
MI処理を行ない、動作異常を監視するようにしている
FIG. 2 shows a schematic diagram of a CPU operation monitoring device according to an embodiment of the present invention. In the figure, 11 is a CPU having a non-maskable interrupt input (NMI);
is an oscillator that supplies a pulse signal to this NMI input at an appropriate timing; 15 is connected to CPtJll;
This is a memory that stores the count value of the pulse signal according to 1. That is, in the CPU 11, in addition to the original main program processing, the NMT (described later) is executed by a forced interrupt in conjunction with the supply of pulses to the NMT input at appropriate timings.
It performs MI processing and monitors for operational abnormalities.

なお、発振器13からのパルス信号の出力タイミングと
しては、前記メインプログラム処理が完了する時間より
も短く、例えばメインプログラム処理が完了する間に2
000パルスが出力されるようなタイミングである。
Note that the output timing of the pulse signal from the oscillator 13 is shorter than the time when the main program processing is completed, for example, the output timing of the pulse signal from the oscillator 13 is shorter than the time when the main program processing is completed.
The timing is such that 000 pulses are output.

また、メモリ15は、CPU11による発振器13から
の供給パルス数の計数結果を記憶しておくメモリ領域1
7.19を2つ有しており、メモリ領域17にはCPU
11による計数結果が、メモリ領域19にはメモリ領h
ili17内の計数結果に対する反転値がそれぞれ格納
される。これは、後述する処理にあるように、メモリ領
域17の計数値を反転後にメモリ領域19の値と比較し
同一であることを確認することで、CPUの動作異常に
よるメモリ15内のデータ破壊の発生を検出するためで
ある。
The memory 15 also includes a memory area 1 in which the CPU 11 stores the result of counting the number of pulses supplied from the oscillator 13.
7.19, and memory area 17 has a CPU
11 is stored in the memory area 19 in the memory area h.
The inverted values for the counting results in ili17 are respectively stored. As described in the process described later, by comparing the counted value in the memory area 17 with the value in the memory area 19 after inverting and confirming that they are the same, this prevents data corruption in the memory 15 due to abnormal CPU operation. This is to detect the occurrence.

次に、第3図および第4図を用いて本実施例の作用を説
明する。第3図はCPU11におけるメインプログラム
処理のフローチャートを示し、第4図はCPU11にお
ける強制割込みによる前記NMT処理のフローチャート
を示すものである。
Next, the operation of this embodiment will be explained using FIGS. 3 and 4. FIG. 3 shows a flowchart of main program processing in the CPU 11, and FIG. 4 shows a flowchart of the NMT processing by forced interrupt in the CPU 11.

cpuilにあっては、動作開始に際して所定のレジス
タ、フラグ等をクリアする等の初期化処理を行なった後
にメイン処理に入りそれが終了した時点でメモリ15の
メモリ領域17.19の内容をクリアする処理を実行後
、再びメイン処理に入るループを繰り返す。(ステップ
51〜55)。
In cpuil, after performing initialization processing such as clearing predetermined registers, flags, etc. at the start of operation, it enters main processing and clears the contents of memory area 17.19 of memory 15 when the main processing is completed. After executing the process, the loop returns to the main process and is repeated. (Steps 51-55).

このメイン処理(ステップ53)中においては、適宜の
タイミングで発振器13がらパルス信号がNMI入力を
介してCPU11に供給されて強制割込みがかけられ、
これに伴ない第4図に示すNMl処理がその都度行なわ
れる。
During this main processing (step 53), a pulse signal is supplied from the oscillator 13 to the CPU 11 via the NMI input at an appropriate timing to cause a forced interrupt.
Accompanying this, the NMl process shown in FIG. 4 is performed each time.

すなわち、NMI!l!1理にあっては、まずメモリ領
域17の値を反転後にメモリ領域19の値との一致を判
断する(ステップ61)。この判断処理において、一致
が検出されれば、CPU11の動作異常によるメモリ1
5の破壊は発生していないと判断してステップ63に進
み、逆に一致が検出されなければCPU11の動作異常
によるメモリ15の破壊が発生していると判断してステ
ップ69に進みCPU11の初期化を行なう。
In other words, NMI! l! In one theory, first, the value in the memory area 17 is inverted, and then it is determined whether it matches the value in the memory area 19 (step 61). In this judgment process, if a match is detected, the memory 1
If no match is detected, it is determined that the memory 15 has been destroyed due to abnormal operation of the CPU 11, and the process proceeds to step 69, where the CPU 11 is initialized. .

ステップ63に進むと、メモリ領域17の内容をインク
リメントし、その値が設定値(例えば3000)に達し
たか否か判断する(ステップ65)。すなわち、CPU
11が正常動作であれば第3図に示すメインプログラム
処理におけるステップ55の処理によりメモリ領域17
.19の内容は共にクリアされるはずであるので、1回
のステップ53.55の処理ではメモリ領域17.19
の内容は2000を越えることはなく、これを越えるよ
うであればCPU11に何らかの動作異常が発生してス
テップ55の処理が行なわれていないことになるのであ
る。したがって、メモリ領域17の内容が設定値(30
00)を越える状態が発生している場合には前述したス
テップ69に進んでCPU11を初期化することになる
。なお、メモリ領域17の内容が設定値を越えない場合
には、次のNMT処理のためにメモリ領域17の内容を
反転した値をメモリ領域19に新たに格納する(ステッ
プ67)。
Proceeding to step 63, the contents of the memory area 17 are incremented, and it is determined whether the value has reached a set value (for example, 3000) (step 65). That is, the CPU
If the memory area 11 is operating normally, the memory area 17 is
.. Since the contents of memory areas 17 and 19 should be cleared together, one processing of steps 53 and 55 clears memory areas 17 and 19.
does not exceed 2000, and if it does, it means that some operational abnormality has occurred in the CPU 11 and the process of step 55 is not being performed. Therefore, the contents of memory area 17 are the set value (30
00), the process proceeds to step 69 described above to initialize the CPU 11. Note that if the contents of the memory area 17 do not exceed the set value, a value obtained by inverting the contents of the memory area 17 is newly stored in the memory area 19 for the next NMT process (step 67).

以上のNMI処理が終了すると、CPU11は割込み前
のメイン処理(ステップ53)に戻ることになる。
When the above NMI processing is completed, the CPU 11 returns to the main processing (step 53) before the interrupt.

したがって、本実施例によれば、CPU11の動作監視
をNMI割込み入力によるソフトウェア処理で行なって
いるので、従来のウォッチドッグタイマのようにカウン
タ回路をCPUに対して外部接続する必要がなく、回路
構成が間中になると共に基板への実装部品の低減が図れ
コンパクト化に寄与することができる。
Therefore, according to this embodiment, since the operation of the CPU 11 is monitored by software processing using NMI interrupt input, there is no need to externally connect a counter circuit to the CPU as in the conventional watchdog timer, and the circuit configuration is This reduces the number of components mounted on the board and contributes to compactness.

なお、本実施例によればメモリ領域17.19を2つ持
ち両者の一致をみることによりメモリ破壊の検出を行な
うようにしているが、これに限らず、例えば両メモリ領
1ii!17.19の値を加えると常に一定値となるよ
うにメモリ領域19の値を変化させるようにしてもよい
。また、メモリ領域としては2つに限らず、例えば4つ
のメモリ領域を設けておき、夫々2つずつで2組のメモ
リ領域を設定し、上述した如ぎ方法でメモリ破壊の検出
を行なうことによっては検出の二重化により確実なチェ
ックが期待できる。
Note that according to this embodiment, there are two memory areas 17 and 19, and memory corruption is detected by checking the coincidence between the two areas. However, the present invention is not limited to this, for example, both memory areas 1ii! The value in the memory area 19 may be changed so that when the value of 17.19 is added, it always becomes a constant value. Furthermore, the number of memory areas is not limited to two; for example, four memory areas may be provided, two sets of two memory areas may be set, and memory corruption may be detected using the method described above. can be expected to be checked reliably by redundant detection.

[発明の効果コ 以上説明したように、本発明によれば、マスク不可能な
割込み入力を有するCPUを用いて、この割込み入力に
発振手段からの信号が適宜のタイミングで供給される毎
に強制割込み処理に移り、発振手段からの信号供給数に
基づいてCPUの動作異常を検出してCPUを初期化す
るようにしているので、CPUの動作異常の態様に関係
なくCPUの動作監視を適確に行なうことができる。
[Effects of the Invention] As explained above, according to the present invention, a CPU having a non-maskable interrupt input is used, and each time a signal from the oscillation means is supplied to the interrupt input at an appropriate timing, Moving on to interrupt processing, abnormality in CPU operation is detected based on the number of signals supplied from the oscillation means and the CPU is initialized, so that the CPU operation can be properly monitored regardless of the type of abnormality in CPU operation. can be done.

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

第1図はクレーム対応図、第2図は本発明の一実施例の
概要を示す図、第3図および第4図は第1図の動作を示
すフローチャート図、第5図は一般的なウォッチドッグ
タイマの概要を示す図である。 1・・・CPU         3・・・発振手段5
・・・計数値記憶手段    7・・・消去手段9・・
・初期化手段     11・・・CPU13・・・発
振器       15・・・メモリ17・・・メモリ
領域     19・・・メモリ領域101・・・カウ
ンタ回路   103・・・発振器105・・・CPU
Fig. 1 is a diagram corresponding to claims, Fig. 2 is a diagram showing an overview of an embodiment of the present invention, Figs. 3 and 4 are flowcharts showing the operation of Fig. 1, and Fig. 5 is a general watch. FIG. 2 is a diagram showing an overview of a dog timer. 1... CPU 3... Oscillation means 5
... Count value storage means 7 ... Erasing means 9 ...
- Initialization means 11... CPU 13... Oscillator 15... Memory 17... Memory area 19... Memory area 101... Counter circuit 103... Oscillator 105... CPU

Claims (4)

【特許請求の範囲】[Claims] (1)マスク不可能な割込み入力を有するCPUと、こ
のCPUの当該割込み入力に適宜のタイミングで信号を
供給する発振手段と、CPUによる発振手段から供給さ
れた信号の計数値を記憶する計数値記憶手段と、CPU
の正常動作中には当該計数値記憶手段における計数値を
前記適宜のタイミングより長い設定時間毎に消去する消
去手段と、前記発振手段による割込み入力への信号供給
により割込み起動され、計数値記憶手段における計数値
に基づいてCPUの動作異常の発生を検出してCPUを
初期化する初期化手段とを有することを特徴とするCP
Uの動作監視装置
(1) A CPU having a non-maskable interrupt input, an oscillation means that supplies a signal at an appropriate timing to the interrupt input of this CPU, and a count value that stores the count value of the signal supplied from the oscillation means by the CPU. storage means and CPU
During the normal operation of the count value storage means, the count value storage means is activated by an interrupt by an erasing means for erasing the count value in the count value storage means every set time longer than the appropriate timing, and a signal is supplied to the interrupt input by the oscillation means. A CPU characterized by having an initializing means for detecting the occurrence of an operational abnormality in the CPU based on the count value and initializing the CPU.
U operation monitoring device
(2)前記初期化手段は、CPUの動作異常の発生を、
計数値記憶手段における計数値が設定値に達したことで
検出することを特徴とする特許請求の範囲第1項に記載
のCPUの動作監視装置。
(2) The initialization means detects the occurrence of an abnormality in the operation of the CPU.
2. The CPU operation monitoring device according to claim 1, wherein the CPU operation monitoring device detects when the count value in the count value storage means reaches a set value.
(3)前記計数値記憶手段は、CPUによる計数値を記
憶する領域を複数有し、前記初期化手段は、CPUの動
作異常の発生を、当該複数の計数値の比較結果に基づく
計数値記憶手段の異常によって検出することを特徴とす
る特許請求の範囲第1項および第2項に記載のCPUの
動作監視装置。
(3) The count value storage means has a plurality of areas for storing count values by the CPU, and the initialization means stores the count values based on the comparison result of the plurality of count values to detect the occurrence of an operational abnormality of the CPU. 3. The CPU operation monitoring device according to claim 1, wherein the CPU operation monitoring device detects an abnormality based on the abnormality of the means.
(4)前記初期化手段は、計数値記憶手段の異常を、複
数の計数値が同一値にないことで検出することを特徴と
する特許請求の範囲第3項に記載のCPUの動作監視装
置。
(4) The CPU operation monitoring device according to claim 3, wherein the initialization means detects an abnormality in the count value storage means when a plurality of count values are not the same value. .
JP61211678A 1986-09-10 1986-09-10 Operation monitoring device for cpu Pending JPS6368941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61211678A JPS6368941A (en) 1986-09-10 1986-09-10 Operation monitoring device for cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61211678A JPS6368941A (en) 1986-09-10 1986-09-10 Operation monitoring device for cpu

Publications (1)

Publication Number Publication Date
JPS6368941A true JPS6368941A (en) 1988-03-28

Family

ID=16609776

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61211678A Pending JPS6368941A (en) 1986-09-10 1986-09-10 Operation monitoring device for cpu

Country Status (1)

Country Link
JP (1) JPS6368941A (en)

Similar Documents

Publication Publication Date Title
US4405982A (en) Arrangement for monitoring the function of a programmable electronic switching circuit
EP0125797A1 (en) Interrupt signal handling apparatus
JPH06168163A (en) Method and device for monitoring cpu
JPS6368941A (en) Operation monitoring device for cpu
US4710928A (en) Method and apparatus for detecting the uncontrollable operation of a control system
JPH11259340A (en) Reactivation control circuit for computer
JP2659067B2 (en) Microcomputer reset circuit
JP2870202B2 (en) Method and apparatus for mutual monitoring between processors
JP3163904B2 (en) CPU device with runaway monitoring function
KR920007509B1 (en) Micro-processor overrun supervising circuit
JP2954040B2 (en) Interrupt monitoring device
JPH02281343A (en) Cpu operation monitor system
JPS60198649A (en) Loop detection control system
JP4083954B2 (en) Anomaly monitoring apparatus and anomaly monitoring method
CN115237642A (en) Watchdog functional unit, programmable logic device and watchdog monitoring system
SU1709321A2 (en) Device for checking stability of program performance
JPH05143375A (en) Processor malfunction monitoring device
JPH08115234A (en) Automatic restoration method and automatic restoration circuit for central processing unit
JPH01156839A (en) Data processor
JPS60262252A (en) Monitor system for runaway of microprocessor
JPS63307547A (en) Cpu monitor circuit
JPS6075940A (en) Runaway detecting method for multi-computer system
JPS58221456A (en) Method for detecting abnormal of computer
JPH05108213A (en) Reset processing circuit by watchdog timer
JPH06222961A (en) Watchdog timer