JPS63307547A - Cpu monitor circuit - Google Patents
Cpu monitor circuitInfo
- Publication number
- JPS63307547A JPS63307547A JP62143524A JP14352487A JPS63307547A JP S63307547 A JPS63307547 A JP S63307547A JP 62143524 A JP62143524 A JP 62143524A JP 14352487 A JP14352487 A JP 14352487A JP S63307547 A JPS63307547 A JP S63307547A
- Authority
- JP
- Japan
- Prior art keywords
- reset
- output
- cpu
- register
- watchdog timer
- 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
Links
- 238000012544 monitoring process Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000013256 coordination polymer Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000002262 irrigation Effects 0.000 description 1
- 238000003973 irrigation Methods 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明はCPU監視回路に関し、特にCPUの不動作お
よび暴走の監視に関する。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a CPU monitoring circuit, and particularly to monitoring of CPU inoperation and runaway.
(従来の技術)
従来、この種のCPU監視回路は第2図に示すよう【、
正常時にはソフトウェアの各タスク221〜224に分
散して配置されたリセットコマンドにより制御の流れ2
31〜234に従ってリセットワードがボートを介して
CPU監視回路24に出力され、その内部のウォッチド
ッグタイマ2Sが一定時間以内にリセットされる。しか
し、CPU2フあるいは周辺回路(図示していない。)
に異常があると、リセットワード231〜234により
ウォッチドッグタイマ2Sをリセットすることができな
くなる。このとき、発振器26の入力によりカウンタの
歩進が進んでタイムアウト出力がCPU27に入力され
ると、CPU2フがリセットされる。(Prior Art) Conventionally, this type of CPU monitoring circuit has the following structure as shown in FIG.
During normal operation, the control flow 2 is executed by reset commands distributed among the software tasks 221 to 224.
31 to 234, the reset word is output to the CPU monitoring circuit 24 via the port, and the internal watchdog timer 2S is reset within a certain period of time. However, the CPU 2 or peripheral circuits (not shown)
If there is an abnormality in the watchdog timer 2S, it becomes impossible to reset the watchdog timer 2S using the reset words 231-234. At this time, when the counter is incremented by the input from the oscillator 26 and a timeout output is input to the CPU 27, the CPU 2 is reset.
(発明が解決しようとする問題点)
上述した従来のCPUIR’!回路は、ソフトウェアの
各所に配置されたAづれのリセットコマンドによっても
ウォッチドッグタイマがリセットされるため、CPUや
周辺回路の障害による機能停止の検出には有効であるが
、ソフトウェアの予期しないジャンプや、暴走に対して
必ずしも有効ではないという欠点がある。(Problems to be Solved by the Invention) The above-mentioned conventional CPUIR'! In the circuit, the watchdog timer is also reset by A-shifted reset commands placed in various parts of the software, so it is effective in detecting a malfunction due to a failure in the CPU or peripheral circuits, but it is also effective in detecting an unexpected jump in the software, The drawback is that it is not necessarily effective against runaway behavior.
本発明の目的は、スケジュールから書込まハるキーワー
ドをキーワードレジスタに保持するとともに、各タスク
から書込まれるリセットワードをリセットワードレジス
タに保持し、これら一対のレジスタの出力を比較してお
き、比較の一致出力によってリセットされ、且つ発振器
の出力パルスを計数するためのウォッチドッグカウンタ
を使い、比較の不一致出力と上記カウンタのタイムアウ
ト出力との論理和を求め、その出力によってCPUをリ
セットすることによって上記欠点を除去し、ソフトウェ
アの予期1−ないジャンプや暴走に対1−ても有効な動
作をすることができるように構成したCPU監視回路f
t提供することにある。An object of the present invention is to hold a keyword written from a schedule in a keyword register, hold a reset word written from each task in a reset word register, and compare the outputs of these pair of registers. By using a watchdog counter that is reset by the coincidence output of the oscillator and counts the output pulses of the oscillator, the discordance output of the comparison is logically summed with the timeout output of the counter, and the CPU is reset by that output. A CPU monitoring circuit designed to eliminate defects and operate effectively against unexpected software jumps and runaways.
The goal is to provide the following.
(間頌点を解決するための手段)
本発明によるCPU監視回路は、キーワードレジスタと
、リセットワードレジスタと、比較器と、9オツチドツ
グタイマと、ORゲートとを具備して構成したものであ
る。(Means for Solving the Node Point) The CPU monitoring circuit according to the present invention includes a keyword register, a reset word register, a comparator, a 9-way dog timer, and an OR gate. be.
キーワードレジスタはスケジューラから書込まれる午−
ワードを°保持するためのものでちり、リセットワード
レジスタは各タスクから書込まれるリセットワードを保
持するためのものである。The keyword register is written by the scheduler.
The reset word register is used to hold the reset word written by each task.
比較器は、キーワードレジスタの内容とリセットワード
レジスタの内容を比較するためのものである。The comparator is for comparing the contents of the keyword register and the contents of the reset word register.
ウォッチドッグタイマは、比較器の一致出力によってリ
セットされ、発TB、器の出力パルスを計数して計時す
るためのものである。The watchdog timer is reset by the coincidence output of the comparator and is used to count and time the output pulses of the TB and the TB.
ORゲートは、比較器の不一致出力とウォッチドッグタ
イマの出力との論哩和全求めるだめのものである。The OR gate is used to calculate the logical sum of the mismatch output of the comparator and the output of the watchdog timer.
(実施例) 次に、本発明について図面を参照して説明する。(Example) Next, the present invention will be explained with reference to the drawings.
第1図は、本発明fてよるCPU監視回路の一実施例を
示すブロック図でちる。FIG. 1 is a block diagram showing an embodiment of a CPU monitoring circuit according to the present invention.
第11において、1はスケジューラ、21〜24はそれ
ぞれタスク領域、31〜34はそれぞれリセットワード
信号路、13はソフトウェアシステムであり、SはCP
U監視回路、6はリセットワードレジスタ、7はキーワ
ードレジスタ、8は比較4.9はウォッチドッグタイマ
、10は発振器、11はCPU、12はORゲートであ
る。11, 1 is a scheduler, 21 to 24 are task areas, 31 to 34 are reset word signal paths, 13 is a software system, and S is a CP
6 is a reset word register, 7 is a keyword register, 8 is a comparison 4.9 is a watchdog timer, 10 is an oscillator, 11 is a CPU, and 12 is an OR gate.
ソフトウェア7ステム13はスケジューラ1のもとで動
作し、各タスク21〜24は順次、動作する。スケジュ
ーラ1は各タスク21〜24を起・□J+する際、起動
するタスクに対して一意に割付けられたキーワードを制
御の流f′L4に従ってキーワードレジスタフに書込む
。キーワードレジスタ7の内容は、次にスケジューラ1
により別の午−ワードが書込まれるまで保持される。し
念がって、別のタスクに制御を移すまで、上記内容を表
わすキーワードはキーワードレジスタ7に保持される。The software 7 system 13 operates under the scheduler 1, and each task 21 to 24 operates in sequence. When the scheduler 1 starts each of the tasks 21 to 24, it writes a keyword uniquely assigned to the task to be started into the keyword register according to the control flow f'L4. The contents of keyword register 7 are then stored in scheduler 1.
is held until another word is written. As a precaution, the keyword representing the above content is held in the keyword register 7 until control is transferred to another task.
、1−d Qされたタスクには、その内部にコマンドが
配置されている。上記コマンドてよって、一定時間以内
に、スケジューラ1のキーワードに相当するリセットワ
ードが、制御の流れ31〜34に従つてリセットワード
レジスタ6に書込まれる。書込まれ走リセットワードは
比較器8によってキーワードレジスタ7の内容と比較さ
れる。両者が一致していれば、一致出力が信号1線14
からウォッチドッグタイマ9のリセット端子に出力され
、不一致であるならば、不一致出力が信号線15からC
PUリセット信号として出力される。, 1-d A command is placed inside the Q task. According to the above command, a reset word corresponding to the keyword of the scheduler 1 is written to the reset word register 6 within a certain period of time according to the control flows 31 to 34. The written running reset word is compared with the contents of keyword register 7 by comparator 8. If both match, the match output is signal 1 line 14
is output from the signal line 15 to the reset terminal of the watchdog timer 9, and if there is a mismatch, the mismatch output is sent from the signal line 15 to the reset terminal of the watchdog timer 9.
Output as a PU reset signal.
ウォッチドッグタイマ9は発振器10からのクロックパ
ルスtカウントし、比較器8からの一致出力があればタ
イムアウトしてCPUリセット個号個当全出力。The watchdog timer 9 counts the clock pulses from the oscillator 10, and if there is a matching output from the comparator 8, it times out and resets the CPU to output all outputs.
比較器8およびウォッチドッグタイマ9より出力された
CPUリセット信号は、ORゲート12で加嫁されてか
らCPU11に入力される。The CPU reset signal output from the comparator 8 and the watchdog timer 9 is combined by an OR gate 12 and then input to the CPU 11.
CPU11が正常に句作していれば、ウォッチドッグタ
イマ9がタイムアウトする前に各タスクから正しくリセ
ットワードがリセットワードレジスタ6へ書込まれ、こ
れに工ってウォッチドッグタイマ9がリセットされる。If the CPU 11 is operating normally, each task will correctly write a reset word to the reset word register 6 before the watchdog timer 9 times out, and the watchdog timer 9 will be reset accordingly.
このため、正常効咋時にはCPU11はリセットされな
い。一方、CPUl 1あるいは同辺回路に異常が生じ
てリセットワードが書込めないならば、ウオッチドタイ
マ9がタイムアウトしてCPUI 1がリセットされる
。Therefore, the CPU 11 is not reset during normal operation. On the other hand, if an abnormality occurs in the CPU 1 or the circuit on the same side and the reset word cannot be written, the watched timer 9 times out and the CPU 1 is reset.
また、CPU11が暴走して不正に別のタスクが実行さ
れれば、キーワードと一致しないリセットワードが書込
まれて、比較器8により信号線15上に不一致信号が出
力され、直ちにCPU11がリセットされる。Furthermore, if the CPU 11 goes out of control and another task is executed illegally, a reset word that does not match the keyword is written, a mismatch signal is outputted to the signal line 15 by the comparator 8, and the CPU 11 is immediately reset. Ru.
(発明の効果)
以上説明したように本発明は、スケジューラにより書込
まれるキーワードと各タスク内部のリセットコマンドに
より書込まれるリセットワードと全比較し、上記両者が
一致した場合に限ってウォッチドッグタイマとリセット
し、上記両者が不一致の場合には直ちにCPUのリセッ
トを実行することによって、CPUが暴走しているにも
かかわらず、ウォッチドッグタイマのタイムアウトまで
CPUがリセットされず、この間にデータを破壊したり
、あるいは誤ったI10出力を送出する可能性が削減で
きるという効果がある。(Effects of the Invention) As explained above, the present invention completely compares the keyword written by the scheduler with the reset word written by the reset command inside each task, and only when the above two match, the watchdog timer By resetting the CPU immediately if the above two do not match, the CPU will not be reset until the watchdog timer times out, even if the CPU is running out of control, and data will be destroyed during this time. This has the effect of reducing the possibility of transmitting an erroneous I10 output.
第1図は、本発明によるCPU1fi視回路の一実施例
を示すブロック図である。
第2パ4は、従来技術によるCPU監視回路の一例を示
すブロック図である。
1.21・・・スケジューラ
21〜24.221〜224・・・タスクS、24・・
・CPUI盃視回路
6・・・リセットワードレジスタ
フ・・・キーワードレジスタ
811・・比較器
9.25・・やウォッチドッグタイマ
10.26・@−発振器
11.27−−@CPU
12・・・ORゲート
13・・・ソフトウェアシステム
31〜34,4,231〜234−・処理の流れFIG. 1 is a block diagram showing an embodiment of the CPU1fi visual circuit according to the present invention. The second page 4 is a block diagram showing an example of a CPU monitoring circuit according to the prior art. 1.21...Scheduler 21-24.221-224...Task S, 24...
・CPU Irrigation circuit 6...Reset word register...Keyword register 811...Comparator 9.25...and watchdog timer 10.26@-Oscillator 11.27--@CPU 12... OR gate 13...Software systems 31-34, 4, 231-234--Processing flow
Claims (1)
のキーワードレジスタと、各タスクから書込まれるリセ
ットワードを保持するためのリセットワードレジスタと
、前記キーワードレジスタの内容と前記リセットワード
レジスタの内容を比較するための比較器と、前記比較器
の一致出力によってリセットされ、発振器の出力パルス
を計数して計時するためのウォッチドッグタイマと、前
記比較器の不一致出力と前記ウォッチドッグタイマの出
力との論理和を求めるためのORゲートとを具備して構
成したことを特徴とするCPU監視回路。A keyword register for holding keywords written from the scheduler, a reset word register for holding reset words written from each task, and a register for comparing the contents of the keyword register and the reset word register. a comparator, a watchdog timer that is reset by the coincidence output of the comparator and for counting and timing the output pulses of the oscillator, and calculating the logical sum of the mismatch output of the comparator and the output of the watchdog timer. A CPU monitoring circuit characterized in that it is configured to include an OR gate for.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62143524A JPS63307547A (en) | 1987-06-09 | 1987-06-09 | Cpu monitor circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62143524A JPS63307547A (en) | 1987-06-09 | 1987-06-09 | Cpu monitor circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS63307547A true JPS63307547A (en) | 1988-12-15 |
Family
ID=15340742
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP62143524A Pending JPS63307547A (en) | 1987-06-09 | 1987-06-09 | Cpu monitor circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS63307547A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2503459A (en) * | 2012-06-26 | 2014-01-01 | Nordic Semiconductor Asa | Multiple hardware registers for watchdog timer preventing erroneous microprocessor system reset |
-
1987
- 1987-06-09 JP JP62143524A patent/JPS63307547A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2503459A (en) * | 2012-06-26 | 2014-01-01 | Nordic Semiconductor Asa | Multiple hardware registers for watchdog timer preventing erroneous microprocessor system reset |
US10191793B2 (en) | 2012-06-26 | 2019-01-29 | Nordic Semiconductor Asa | Microprocessor device with reset timer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5491787A (en) | Fault tolerant digital computer system having two processors which periodically alternate as master and slave | |
US6374364B1 (en) | Fault tolerant computing system using instruction counting | |
US5640508A (en) | Fault detecting apparatus for a microprocessor system | |
EP0461792B1 (en) | Master/slave checking system | |
JPH0792765B2 (en) | Input / output controller | |
JPS5968004A (en) | Fail-safe method of on-vehicle computer | |
JP3301992B2 (en) | Computer system with power failure countermeasure and method of operation | |
EP3629176B1 (en) | Fault detection circuit with progress register and status register | |
JPS63307547A (en) | Cpu monitor circuit | |
US5652837A (en) | Mechanism for screening commands issued over a communications bus for selective execution by a processor | |
JPH1115661A (en) | Self-diagnosis method for cpu | |
US11604709B2 (en) | Hardware control path redundancy for functional safety of peripherals | |
JP2002229811A (en) | Control method of logical partition system | |
Proerzza et al. | A low-cost fail-safe circuit for fault-tolerant control systems | |
JPH07230432A (en) | Calculating device | |
JP2738348B2 (en) | Multiprocessor system | |
JPH03222020A (en) | Reset system for multi-micro processor system | |
JPH01310422A (en) | Resetting circuit for microcomputer | |
JPS60124734A (en) | Interruption processing circuit to cpu | |
JPH02206866A (en) | Reset signal generator in multiprocessor system | |
JP2000330798A (en) | Interrupt controller and method for verifying interrupt control | |
JPS6136641B2 (en) | ||
JPH03198136A (en) | Check system for dma transfer data | |
JPH01292562A (en) | Multi-cpu system | |
JPS6074052A (en) | History memory control system |