JPH06222960A - Cpu reset circuit - Google Patents

Cpu reset circuit

Info

Publication number
JPH06222960A
JPH06222960A JP5031296A JP3129693A JPH06222960A JP H06222960 A JPH06222960 A JP H06222960A JP 5031296 A JP5031296 A JP 5031296A JP 3129693 A JP3129693 A JP 3129693A JP H06222960 A JPH06222960 A JP H06222960A
Authority
JP
Japan
Prior art keywords
reset
cpu
circuit
timer
address
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
JP5031296A
Other languages
Japanese (ja)
Inventor
Shoji Endo
昭次 遠藤
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 JP5031296A priority Critical patent/JPH06222960A/en
Publication of JPH06222960A publication Critical patent/JPH06222960A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve efficiency for using a CPU by eliminating necessity to use any special program for cyclically resetting a watchdog timer (WDT) in the CPU reset circuit provided with a WDT function. CONSTITUTION:An address (reference address) to be surely accessed as long as a program is normally operated is previously set to a reference address set circuit 51. An address comparator circuit 52 compares the access address under program execution of a CPU 1 with the reference address, when they are equal to each other, a reset pulse 15 is generated, and a reset circuit 8 with timer is reset. When the timer is not reset by the reset pulse 15 before the time-up of the timer in this reset circuit 8, a CPU reset signal 18 is generated by time-up, the CPU 1 is reset, and run-away is eliminated.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はCPUリセット回路に関
し、特にCPUの異常動作時や暴走時にCPUをリセッ
トするウォッチドッグタイマ機能を有するCPUリセッ
ト回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a CPU reset circuit, and more particularly to a CPU reset circuit having a watchdog timer function for resetting the CPU when the CPU malfunctions or runs out of control.

【0002】[0002]

【従来の技術】CPUの暴走等の異常動作を監視する手
段としてウォッチドッグタイマを用いるCPUリセット
方式が知られている。従来のこの種のCPUリセット方
式の回路ブロックを図2に示す。CPU1がCPUリセ
ット回路3により異常動作を監視される対象となってお
り、CPU1と周辺回路2とはデータバス10,アドレ
スバス11及び制御信号バス12により相互接続されて
いる。
2. Description of the Related Art A CPU reset method using a watchdog timer is known as a means for monitoring an abnormal operation such as CPU runaway. A conventional circuit block of this type of CPU reset system is shown in FIG. The CPU 1 is a target of abnormal operation monitoring by the CPU reset circuit 3, and the CPU 1 and the peripheral circuit 2 are interconnected by a data bus 10, an address bus 11, and a control signal bus 12.

【0003】CPUリセット回路3の構成について説明
する。パワーオンリセット回路4は電源投入時にパワー
オンリセット信号16を生成し、タイマリセットパルス
生成回路5はCPU1からの制御指令に応答してタイマ
リセットパルス15を生成する。オアゲート7はこれ等
パワーオンリセット信号16とタイマリセットパルス1
5とを2入力とし、この2入力のうち少くとも一方が生
成されたときにタイマリセット信号17を生成する。
The configuration of the CPU reset circuit 3 will be described. The power-on reset circuit 4 generates a power-on reset signal 16 when the power is turned on, and the timer reset pulse generation circuit 5 generates a timer reset pulse 15 in response to a control command from the CPU 1. The OR gate 7 uses these power-on reset signal 16 and timer reset pulse 1
5 and 2 are two inputs, and the timer reset signal 17 is generated when at least one of the two inputs is generated.

【0004】タイマ付きリセット回路8はこのタイマリ
セット信号17によりリセットされると共にこのリセッ
ト信号17の発生がなくタイムアップしたときにリセッ
ト信号18を生成するもので、ウォッチドッグタイマ機
能を有する。オアゲート9はこのリセット信号18とパ
ワーオンリセット信号16とを2入力とし、この2入力
のうち少くとも一方が生成されたときにCPUリセット
信号19を生成する。
The timer-equipped reset circuit 8 is reset by the timer reset signal 17 and generates a reset signal 18 when the reset signal 17 is not generated and time is up, and has a watchdog timer function. The OR gate 9 receives the reset signal 18 and the power-on reset signal 16 as two inputs, and generates the CPU reset signal 19 when at least one of the two inputs is generated.

【0005】かかる構成において、電源が投入されて電
源が立上ると、パワーオンリセット回路4からパワーオ
ンリセット信号16が出力され、CPU1及びタイマ付
きリセット回路8が共に初期リセット状態となる。
In such a configuration, when the power is turned on and the power is turned on, the power-on reset circuit 4 outputs the power-on reset signal 16, and the CPU 1 and the reset circuit with timer 8 are both in the initial reset state.

【0006】実行すべきプログラム中に、タイマリセッ
トパルス発生回路5から周期的にリセットパルス15が
生成される様なプログラムを予め挿入しておくことによ
り、タイマ付きリセット回路8は周期的にリセットされ
る。よって、このとき、タイマ付きリセット回路8のタ
イムアップ値を当該リセットパルス15の生成周期より
も長く設定しておくことにより、CPU1が暴走しない
限りタイマ付きリセット回路8はタイムアップすること
はないので、リセット信号18は生成されない。
A timer reset pulse generator 8 periodically resets the timer reset circuit 8 by inserting a program into the program to be executed so that the timer reset pulse generator 5 periodically generates the reset pulse 15. It Therefore, at this time, by setting the time-up value of the timer-equipped reset circuit 8 longer than the generation period of the reset pulse 15, the timer-equipped reset circuit 8 does not time-up unless the CPU 1 runs out of control. , The reset signal 18 is not generated.

【0007】CPU1が外乱等により暴走してタイマリ
セットパルス発生回路5からリセットパルス15が周期
的に出力されなくなると、タイマ付きリセット回路8は
タイムアップするので、リセット信号18が出力されて
CPU1はリセット状態となり、正常処理ルーチンに強
制的に復帰させられることになる。
When the CPU 1 goes out of control due to disturbance or the like and the reset pulse 15 is no longer periodically output from the timer reset pulse generation circuit 5, the timer-equipped reset circuit 8 times up, so a reset signal 18 is output and the CPU 1 It will be in the reset state and will be forcibly returned to the normal processing routine.

【0008】[0008]

【発明が解決しようとする課題】上述したこの様なCP
Uリセット回路では、ウォッチドッグタイマ機能のため
に、本来のプログラム中にタイマ付きリセット回路を周
期的にリセットするための処理プログラムを予め挿入し
ておく必要があるという欠点がある。またこの処理プロ
グラムをCPUが実行する必要があるので、CPUの処
理効率が低下するという欠点がある。
[Problems to be Solved by the Invention] Such a CP as described above
The U reset circuit has a drawback in that, because of the watchdog timer function, a processing program for periodically resetting the timer-equipped reset circuit must be inserted in the original program. Further, since the CPU needs to execute this processing program, there is a drawback that the processing efficiency of the CPU is reduced.

【0009】そこで、本発明はかかる従来技術の欠点を
解決すべくなされたものであって、その目的とするとこ
ろは、本来のプログラム以外にウォッチドッグタイマ機
能用のプログラムを必要とせず、CPU処理効率を高め
ることが可能なCPUリセット回路を提供することにあ
る。
Therefore, the present invention has been made to solve the above-mentioned drawbacks of the prior art, and its purpose is to eliminate the need for a program for the watchdog timer function other than the original program, and to perform CPU processing. It is to provide a CPU reset circuit capable of improving efficiency.

【0010】[0010]

【課題を解決するための手段】本発明によれば、プログ
ラムが周期的に実行されているか否かを判別するウォッ
チドッグタイマ機能を有するCPUリセット回路であっ
て、前記プログラムの正常実行時に必ずアクセスされる
基準アドレスを予め設定した基準アドレス設定手段と、
前記プログラムの実行時におけるアクセスアドレスと前
記基準アドレスとを比較して一致したこときに一致信号
を出力する一致信号生成手段と、電源立上りに応答して
パワーオンリセット信号を生成するパワーオンリセット
手段と、前記一致信号と前記パワーオンリセット信号と
の少くとも一方によりリセットされかつタイムアップ時
にリセット信号を発生するタイマ付きリセット手段と、
このリセット信号と前記パワーオンリセット信号との少
くとも一方により前記CPUをリセットする手段とを含
むことを特徴とするCPUリセット回路が得られる。
According to the present invention, there is provided a CPU reset circuit having a watchdog timer function for discriminating whether or not a program is periodically executed, which is always accessed when the program is normally executed. A reference address setting means for presetting a reference address to be set,
A match signal generation unit that outputs a match signal when the access address at the time of executing the program is compared with the reference address and a match signal is generated, and a power-on reset unit that generates a power-on reset signal in response to power-on. And reset means with a timer that is reset by at least one of the coincidence signal and the power-on reset signal and that generates a reset signal at the time-up,
A CPU reset circuit is obtained which includes means for resetting the CPU by at least one of the reset signal and the power-on reset signal.

【0011】[0011]

【実施例】次に、本発明の実施例について図面を用いて
詳述する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0012】図1は本発明の実施例のブロック図であ
り、図2と同等部分は同一符号にて示している。図2と
異なる点は、タイマリセットパルス発生回路5が基準ア
ドレスセット回路51とアドレス比較回路52とからな
っていることである。
FIG. 1 is a block diagram of an embodiment of the present invention, and the same parts as those in FIG. 2 are designated by the same reference numerals. The difference from FIG. 2 is that the timer reset pulse generation circuit 5 includes a reference address set circuit 51 and an address comparison circuit 52.

【0013】基準アドレスセット回路51は、CPU1
からの指令(12)に応答して基準アドレス(プログラ
ムが正常動作している限り必ずアクセスされるアドレス
をいうものとする)をアドレスバス11を介して設定す
るものである。アドレス比較回路52は、プログラム走
行中においてアクセスされるアドレスをCPU1からの
アドレスラッチ信号13に応答してアドレスバス11よ
り取込んで基準アドレス14と比較するものであり、両
アドレス13,14が一致したときにリセットパルス1
5を生成する。
The reference address setting circuit 51 includes a CPU 1
In response to a command (12) from (1), a reference address (which means an address that is always accessed as long as the program operates normally) is set via the address bus 11. The address comparison circuit 52 fetches the address accessed during the program running from the address bus 11 in response to the address latch signal 13 from the CPU 1 and compares it with the reference address 14, and both addresses 13 and 14 match. Reset pulse 1
5 is generated.

【0014】他の構成は図2のそれと同等であってその
説明は省略するものとする。
The other structure is the same as that of FIG. 2 and its explanation is omitted.

【0015】かかる構成において、回路に電源が投入さ
れると、パワーオンリセット回路4からのパワーオンリ
セット信号16により、CPU1とタイマ付きリセット
回路8とが初期リセットされる。基準アドレスセット回
路51に対する基準アドレスの設定は、CPU1がパワ
ーオンリセット信号により初期リセットされた直後に、
CPU1の制御によって行われる。
In this configuration, when the circuit is powered on, the power-on reset signal 16 from the power-on reset circuit 4 causes the CPU 1 and the timer-equipped reset circuit 8 to be initially reset. The reference address is set in the reference address setting circuit 51 immediately after the CPU 1 is initially reset by the power-on reset signal.
It is performed under the control of the CPU 1.

【0016】この基準アドレスとしては、先述した如
く、プロクラムが正常動作している限り必ず通過するア
ドレスを用いるものであり、一般に実行されるプログラ
ムはループ状に繰返し実行されるものであるから、例え
ば、条件分岐命令を含んでいるプログラムでは、分岐先
から戻る命令のアドレスを基準アドレスとすれば良い。
何故なら、このアドレスは、条件分岐が成立してもしな
くても必ず実行されるべき命令のアドレスであるからで
ある。
As described above, as the reference address, an address that always passes as long as the program is operating normally is used. Generally, a program to be executed is repeatedly executed in a loop. In a program including a conditional branch instruction, the address of the instruction returning from the branch destination may be used as the reference address.
This is because this address is the address of the instruction that must be executed regardless of whether the conditional branch is taken.

【0017】アドレス比較回路52はこの基準アドレス
14と実行プログラムのアクセスアドレスとを比較し、
一致したときにリセットパルス15を生成する。よって
タイマ付きリセット回路8はこのリセットパルス15の
オアゲート7を経たリセット信号17によりリセットさ
れるので、タイマ付きリセット回路はタイムアップしな
い。すなわち、CPU1が正常動作している限り、タイ
マ付きリセット回路8はアドレス比較回路52のリセッ
トパルス15によりタイムアップ以前に周期的にリセッ
トされ、リセット信号18は生成されない。
The address comparison circuit 52 compares the reference address 14 with the access address of the execution program,
When they match, the reset pulse 15 is generated. Therefore, the reset circuit with timer 8 is reset by the reset signal 17 that passes through the OR gate 7 of the reset pulse 15, so that the reset circuit with timer does not time up. That is, as long as the CPU 1 is operating normally, the reset circuit 8 with timer is periodically reset by the reset pulse 15 of the address comparison circuit 52 before the time is up, and the reset signal 18 is not generated.

【0018】しかしながら、CPU1が外乱等により暴
走すると、CPU1はタイマ付きリセット回路8のタイ
ムアップ期間内に基準アドレスをアクセスしなくなる。
そのために、タイマ付きリセット回路8はタイムアップ
してリセット信号18を生成し、CPU1はリセットさ
れるのである。
However, if the CPU 1 runs out of control due to a disturbance or the like, the CPU 1 will not access the reference address within the time-up period of the reset circuit with timer 8.
Therefore, the reset circuit with timer 8 times up and generates the reset signal 18, and the CPU 1 is reset.

【0019】[0019]

【発明の効果】叙上の如く、本発明によれば、ウォッチ
ドッグタイマ機能のために特別なプログラムを、実行す
べきプログラム中に予め組込んでおく必要がなく、よっ
てCPUの処理効率が向上するという効果がある。
As described above, according to the present invention, it is not necessary to previously incorporate a special program for the watchdog timer function into the program to be executed, thus improving the processing efficiency of the CPU. There is an effect of doing.

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

【図1】本発明の実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】従来のCPUリセット回路の例を示すブロック
図である。
FIG. 2 is a block diagram showing an example of a conventional CPU reset circuit.

【符号の説明】[Explanation of symbols]

1 CPU 2 周辺回路 3 CPUリセット回路 4 パワーオンリセット回路 5 タイマリセットパルス発生回路 7,9 オアゲート 8 タイマ付きリセット回路 51 基準アドレスセット回路 52 アドレス比較回路 1 CPU 2 Peripheral circuit 3 CPU reset circuit 4 Power-on reset circuit 5 Timer reset pulse generation circuit 7, 9 OR gate 8 Reset circuit with timer 51 Reference address set circuit 52 Address comparison circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 プログラムが周期的に実行されているか
否かを判別するウォッチドッグタイマ機能を有するCP
Uリセット回路であって、前記プログラムの正常実行時
に必ずアクセスされる基準アドレスを予め設定した基準
アドレス設定手段と、前記プログラムの実行時における
アクセスアドレスと前記基準アドレスとを比較して一致
したこときに一致信号を出力する一致信号生成手段と、
電源立上りに応答してパワーオンリセット信号を生成す
るパワーオンリセット手段と、前記一致信号と前記パワ
ーオンリセット信号との少くとも一方によりリセットさ
れかつタイムアップ時にリセット信号を発生するタイマ
付きリセット手段と、このリセット信号と前記パワーオ
ンリセット信号との少くとも一方により前記CPUをリ
セットする手段とを含むことを特徴とするCPUリセッ
ト回路。
1. A CP having a watchdog timer function for determining whether or not a program is periodically executed.
It is a U reset circuit, and a reference address setting means for presetting a reference address that is always accessed when the program is normally executed is compared with an access address at the time of execution of the program and the reference address is matched. Match signal generating means for outputting a match signal to,
Power-on reset means for generating a power-on reset signal in response to power-on, and reset means with a timer that is reset by at least one of the coincidence signal and the power-on reset signal and generates a reset signal at the time-up A CPU reset circuit comprising: means for resetting the CPU by at least one of the reset signal and the power-on reset signal.
JP5031296A 1993-01-27 1993-01-27 Cpu reset circuit Pending JPH06222960A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5031296A JPH06222960A (en) 1993-01-27 1993-01-27 Cpu reset circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5031296A JPH06222960A (en) 1993-01-27 1993-01-27 Cpu reset circuit

Publications (1)

Publication Number Publication Date
JPH06222960A true JPH06222960A (en) 1994-08-12

Family

ID=12327339

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5031296A Pending JPH06222960A (en) 1993-01-27 1993-01-27 Cpu reset circuit

Country Status (1)

Country Link
JP (1) JPH06222960A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2425863A (en) * 2005-04-26 2006-11-08 Advanced Risc Mach Ltd Data processor monitor with a timer and control logic that sends s control signal to the processor if a set address is not accessed

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5568604A (en) * 1978-11-13 1980-05-23 Siemens Ag Electric energy supply device with through type current transformer
JPS599762A (en) * 1982-07-07 1984-01-19 Chino Works Ltd Error detecting circuit
JPH0322042A (en) * 1989-06-20 1991-01-30 Nec Corp Mircoprocessor control system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5568604A (en) * 1978-11-13 1980-05-23 Siemens Ag Electric energy supply device with through type current transformer
JPS599762A (en) * 1982-07-07 1984-01-19 Chino Works Ltd Error detecting circuit
JPH0322042A (en) * 1989-06-20 1991-01-30 Nec Corp Mircoprocessor control system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2425863A (en) * 2005-04-26 2006-11-08 Advanced Risc Mach Ltd Data processor monitor with a timer and control logic that sends s control signal to the processor if a set address is not accessed
US7627807B2 (en) 2005-04-26 2009-12-01 Arm Limited Monitoring a data processor to detect abnormal operation

Similar Documents

Publication Publication Date Title
JPH06222960A (en) Cpu reset circuit
JPH1153225A (en) Fault processor
JPH064301A (en) Time division interruption control system
JPH05108384A (en) Microprocessor
JP2648029B2 (en) In-circuit emulator
JP2716274B2 (en) In-circuit emulator
JPS63155330A (en) Microprogram controller
JPH06131218A (en) Cpu control system
JPS62214440A (en) Undefined instruction monitor system
JPH0683486A (en) Microcomputer
JPH0764822A (en) Microcomputer
JPH05204680A (en) Malfunction preventing system for information processor
CN116302203A (en) RAS function configuration method and device, electronic equipment and medium
JPH07302205A (en) Microcomputer
JPH0635757A (en) Abnormality detector of cpu
JPS63268044A (en) Watchdog timer
JPH09190360A (en) Microcomputer and its ranaway monitoring processing method
JPS58114146A (en) Detecting for overrun of processor
JPH0683654A (en) Cpu runaway preventing circuit
JPH03266110A (en) Resetting device for computer
JPS62197834A (en) Microprogram controller
JPH05108402A (en) Debugging device
JPH1055290A (en) Failure detection method for program by emulator
JPH0250233A (en) Computer abnormality processing system
JPH10216337A (en) Pachinko machine control device

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 5

Free format text: PAYMENT UNTIL: 20080523

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090523

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100523

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120523

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees