JPH0452977B2 - - Google Patents

Info

Publication number
JPH0452977B2
JPH0452977B2 JP61165341A JP16534186A JPH0452977B2 JP H0452977 B2 JPH0452977 B2 JP H0452977B2 JP 61165341 A JP61165341 A JP 61165341A JP 16534186 A JP16534186 A JP 16534186A JP H0452977 B2 JPH0452977 B2 JP H0452977B2
Authority
JP
Japan
Prior art keywords
cpu
circuit
signal
reset
output
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.)
Expired - Lifetime
Application number
JP61165341A
Other languages
Japanese (ja)
Other versions
JPS6320548A (en
Inventor
Koji Maeda
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
Nippon Electric Co Ltd
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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP61165341A priority Critical patent/JPS6320548A/en
Publication of JPS6320548A publication Critical patent/JPS6320548A/en
Publication of JPH0452977B2 publication Critical patent/JPH0452977B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はCPUの動作状態の異常検出回路の改
良に関し、特にCMOS形CPUを使用し、ソフト
ウエアで状態を制御しているシステムの異常検出
と異常状態の復帰とに関する。
[Detailed Description of the Invention] (Industrial Application Field) The present invention relates to the improvement of an abnormality detection circuit for the operating state of a CPU, and in particular to the abnormality detection of a system that uses a CMOS type CPU and whose state is controlled by software. and recovery from an abnormal state.

(従来の技術) 従来、CPUを含む回路の異常状態を検出して
復帰させるには、例えば第2図に示すような
CPUのスーパーバイザ/リセツト回路が公知で
あつた。第2図において、8はCPU、9はカウ
ンタ、13はインバータ、14はANDゲートで
ある。
(Prior art) Conventionally, in order to detect and recover from an abnormal state in a circuit including a CPU, a method such as the one shown in Figure 2 has been used.
CPU supervisor/reset circuits were known. In FIG. 2, 8 is a CPU, 9 is a counter, 13 is an inverter, and 14 is an AND gate.

第2図の例では、CPU8が一定時間に少なく
とも1度は外部のカウンタ9に対してリセツト信
号(ANRST信号)を出力し、CPU8からリセ
ツト信号を出力しなくなつたときに、外部のカウ
ンタ9がカウンタアツプしてCPU8にリセツト
がかかるように構成されている。すなわち、カウ
ンタ9の出力はインバータ13を通してANDゲ
ート14に加えられている。カウンタ9の出力が
低レベルになつたとき、インバータ13の出力が
高レベルになつてANDゲート14で論理積が求
められる。論理関は信号となつてCPU8
に加えられる。
In the example shown in FIG. 2, the CPU 8 outputs a reset signal (ANRST signal) to the external counter 9 at least once in a certain period of time, and when the CPU 8 no longer outputs the reset signal, the external counter 9 outputs a reset signal (ANRST signal). The configuration is such that the counter is raised and the CPU 8 is reset. That is, the output of counter 9 is applied to AND gate 14 through inverter 13. When the output of the counter 9 becomes low level, the output of the inverter 13 becomes high level, and the AND gate 14 calculates the logical product. Logic functions become signals to CPU8
added to.

第2図の実例では、CPU8が外部のカウンタ
9にリセツト信号を出力しなくなつたとき、
CPU8が異常状態になつたものとしている。
In the example shown in FIG. 2, when the CPU 8 no longer outputs a reset signal to the external counter 9,
It is assumed that CPU 8 has entered an abnormal state.

(発明が解決しようとする問題点) 上述した従来技術によるCPUのスーパーバイ
ザ/リセツト回路では、CPUが或る周期ごとに
外部のカウンタに対してリセツト信号を出力する
ので、この期間にはCPUが動作状態となる。異
常状態の検出周期を短くしようとすると、CPU
から出力されるリセツト信号の周期も短くする必
要があるので、CPUが待機状態となる時間率も
低くなつて消費電流が増加する。
(Problems to be Solved by the Invention) In the CPU supervisor/reset circuit according to the prior art described above, the CPU outputs a reset signal to an external counter every certain period, so the CPU does not operate during this period. state. If you try to shorten the abnormal condition detection cycle, the CPU
Since it is also necessary to shorten the period of the reset signal output from the CPU, the time rate in which the CPU is in standby mode also decreases, which increases current consumption.

また、CPUが動作状態にある場合に、どのプ
ログラムタスクでCPUのリセツト信号を出力す
るのが最良であるのか、十分に検討する必要があ
る。例えば、割込みタスクでリセツト信号を出力
するように構成した場合、メインタスクは暴走し
ているが割込みタスクは正常に動作している。割
込みタスクでは、この状態を異常状態であるとは
検出しない。
It is also necessary to carefully consider which program task is best for outputting a CPU reset signal when the CPU is in operation. For example, if the interrupt task is configured to output a reset signal, the main task is out of control, but the interrupt task is operating normally. The interrupt task does not detect this state as an abnormal state.

このように、従来のCPUのスーパーバイザ/
リセツト回路による異常状態の検出では、第1に
検出周期を短くするとCPUの待機時間率も低く
なると云う欠点があり、第2にCPUのリセツト
信号出力処理をどのプログラムタスクを行うの
か、十分に検討しておく必要があると云う欠点が
ある。
In this way, traditional CPU supervisor/
Detecting abnormal conditions using a reset circuit has the disadvantage that, firstly, shortening the detection cycle will also reduce the CPU's standby time rate.Secondly, it is necessary to carefully consider which program task will perform CPU reset signal output processing. There is a drawback that it is necessary to do so.

本発明の目的は、CPUの待機時間率を常時監
視し、CPUの待機時間率が予め定められた一定
範囲を越えたときには、CPUに対してリセツト
または割込みをかけることにより上記欠点を除去
し、CPUの待機時間率が高く、しかもリセツト
信号出力処理を行のタスクを一義的に決定できる
ように構成したCPUのスーパーバイザ/リセツ
ト回路を提供することにある。
The purpose of the present invention is to constantly monitor the CPU standby time rate and, when the CPU standby time rate exceeds a predetermined certain range, to eliminate the above-mentioned drawbacks by resetting or interrupting the CPU. It is an object of the present invention to provide a CPU supervisor/reset circuit which has a high CPU standby time rate and which is configured to uniquely determine the task of a reset signal output process.

(問題点を解決するための手段) 本発明によるCPUのスーパーバイザ/リセツ
ト回路は、CPUが動作状態であるか、あるいは
待機状態であるかを示す制御信号を出力すること
ができるものであつて、カウント手段と、比較手
段と、リセツト手段とを具備して構成したもので
ある。
(Means for Solving the Problems) A CPU supervisor/reset circuit according to the present invention is capable of outputting a control signal indicating whether the CPU is in an operating state or a standby state, and includes: It is constructed by comprising a counting means, a comparing means, and a reset means.

カウント手段は、サンプリング回路、カウン
タ、タイミング発生回路、およびラツチ回路から
なり、サンプリング回路において、タイミング回
路から出力されるクロツク信号により、アクテイ
ブ状態の前記制御信号をサンプリングしてカウン
タに送り、カウンタは、タイミング回路に規制さ
れる一定時間の間、サンプリング回路の出力をカ
ウントし、ラツチ回路は、タイミング回路に規制
される一定時間の間、カウンタの出力を保持し、
比較回路に対し出力することによつて、前記制御
信号がアクテイブとなる時間率を常時監視するよ
う構成されている。
The counting means includes a sampling circuit, a counter, a timing generation circuit, and a latch circuit. In the sampling circuit, the control signal in the active state is sampled by the clock signal output from the timing circuit and sent to the counter, and the counter The output of the sampling circuit is counted for a certain period of time regulated by the timing circuit, and the latch circuit holds the output of the counter for a certain period of time regulated by the timing circuit.
The control signal is configured to constantly monitor the time rate at which the control signal is active by outputting it to a comparison circuit.

比較手段は、カウント手段の出力を基準値と比
較することによつて、前記制御信号がアクテイブ
となる時間率が一定範囲を越えたときアラーム信
号をCPUに送出するよう構成されている。
The comparison means is configured to compare the output of the counting means with a reference value and send an alarm signal to the CPU when the time rate during which the control signal is active exceeds a certain range.

リセツト手段は、アラーム信号がアクテイブに
なつたとき、CPUに割込みまたはリセツトをか
けるよう構成されている。
The reset means is configured to interrupt or reset the CPU when the alarm signal becomes active.

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

第1図は、本発明によるCPUのスーパーバイ
ザ/リセツト回路の一実施例を示すブロツク図で
ある。第1図において、11,12はそれぞれ
ANDゲート、2はカウンタ、3はタイミング発
生回路、4はラツチ回路、5は比較回路、6は本
発明によるスーパーバイザ/リセツト回路、7は
CPUである。
FIG. 1 is a block diagram showing one embodiment of a CPU supervisor/reset circuit according to the present invention. In Figure 1, 11 and 12 are respectively
AND gate, 2 is a counter, 3 is a timing generation circuit, 4 is a latch circuit, 5 is a comparison circuit, 6 is a supervisor/reset circuit according to the present invention, 7 is a
It is the CPU.

第1図において、スーパーバイザ/リセツト回
路6はCPU7の信号の時間率を常に監視
していて、信号の時間率が予め定められ
た一定範囲を越えると、これを異常状態であると
みなし、CPU7に対して信号を出力する。
In FIG. 1, the supervisor/reset circuit 6 constantly monitors the time rate of the signal from the CPU 7, and when the time rate of the signal exceeds a predetermined range, it considers this to be an abnormal state and sends the signal to the CPU 7. Outputs a signal to the

タイミング発生回路3で作られたCLK信号と、
CPU7から出力された信号とをANDゲー
ト11に入力する。ANDゲート11ではサンプ
リングを行い、上記両信号の論理積を求めてカウ
ンタ2に出力する。タイミング発生回路3で作ら
れるCONT1信号およびCONT2信号は、それぞ
れ一定時間にわたつてカウンタ2とラツチ回路4
とに入力される。ラツチ回路4では、CONT2信
号が送出されている期間にわたり信号を
ラツチする。
CLK signal generated by timing generation circuit 3,
The signal output from the CPU 7 is input to the AND gate 11. The AND gate 11 performs sampling, calculates the logical product of the above two signals, and outputs the result to the counter 2. The CONT1 signal and CONT2 signal generated by the timing generation circuit 3 are respectively applied to the counter 2 and the latch circuit 4 over a certain period of time.
is input. The latch circuit 4 latches the signal during the period in which the CONT2 signal is being sent.

そこで、比較回路5はカウンタ2にセツトされ
ている値が、予め決定されている一定の範囲を越
えていないか否かをチエツクし、上記値が一定の
範囲を越えている場合には信号をクリアす
る。CPU7のリセツト端子には信号と電源
投入時のパワーオンリセツト信号(
信号)との論理積が入力されるようにANDゲー
ト12により構成されている。従つて、信
号がアクテイブになると、CPU7にリセツトが
かかる。
Therefore, the comparator circuit 5 checks whether the value set in the counter 2 does not exceed a predetermined range, and outputs a signal if the value exceeds the predetermined range. clear. The reset terminal of CPU7 has a signal and a power-on reset signal (
It is configured by an AND gate 12 so that a logical product with a signal) is input. Therefore, when the signal becomes active, the CPU 7 is reset.

(発明の効果) 以上説明したように本発明は、CPUの待機時
間率を常時監視し、CPUの待機時間率が一定範
囲を越えたときには、CPUに対してリセツトま
たは割込みをかけることにより、CPUを或る周
期ごとに動作状態にさせて外部回路に信号を出力
する必要性はなくなるので、消費電流をそれだけ
減ずることができると云う効果がある。
(Effects of the Invention) As explained above, the present invention constantly monitors the CPU standby time rate, and when the CPU standby time rate exceeds a certain range, resets or interrupts the CPU. Since there is no need to put the device into an operating state every certain period and output a signal to an external circuit, there is an effect that current consumption can be reduced accordingly.

また、CPUの待機時間率が一定範囲内にある
ならば、CPUのソフトウエアによりメインタス
クと割込みタスクとが正しい関係で動作してい
る。従つて、CPUの待機時間率を監視すること
はCPUのソフトウエアが正しく動作しているか
否かも或る程度監視できると云う効果がある。
Furthermore, if the CPU wait time rate is within a certain range, the main task and interrupt task are operating in the correct relationship due to the CPU software. Therefore, monitoring the CPU standby time rate has the effect that it is possible to monitor to some extent whether the CPU software is operating correctly.

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

第1図は、本発明によるCPUのスーパーバイ
ザ/リセツト回路の一実施例を示すブロツク図で
ある。第2図は、従来技術によるCPUのスーパ
ーバイザ/リセツト回路の一例を示すブロツク図
である。 11,12,14……ANDゲート、2,9…
…カウンタ、3……タイミング発生回路、4……
ラツチ回路、5……比較回路、6……スーパーバ
イザ/リセツト回路、7,8……CPU、13…
…インバータ。
FIG. 1 is a block diagram showing one embodiment of a CPU supervisor/reset circuit according to the present invention. FIG. 2 is a block diagram showing an example of a CPU supervisor/reset circuit according to the prior art. 11, 12, 14...AND gate, 2, 9...
...Counter, 3...Timing generation circuit, 4...
Latch circuit, 5... Comparison circuit, 6... Supervisor/reset circuit, 7, 8... CPU, 13...
...Inverter.

Claims (1)

【特許請求の範囲】 1 CPUが動作状態であるか、あるいは待機状
態であるかを示す制御信号を出力することができ
るCPUのスーパーバイザ/リセツト回路であつ
て、 前記制御信号がアクテイブとなる時間率を常時
監視するカウント手段と、 前記カウント手段の出力を基準値と比較するこ
とにより、前記制御信号がアクテイブとなる時間
率が一定範囲を越えたとき、アラーム信号を出力
する比較手段と、 前記アラーム信号がアクテイブになつたとき、
前記CPUに割り込みまたはリセツトをかけるた
めの信号を前記CPUに対し出力するリセツト手
段を備え、 前記カウント手段は、サンプリング回路、カウ
ンタ、タイミング発生回路、およびラツチ回路か
らなり、 前記サンプリング回路において、前記タイミン
グ回路から出力されるクロツク信号により、アク
テイブ状態の前記制御信号をサンプリングしてカ
ウンタに送り、 前記カウンタは、前記タイミング発生回路に規
制される一定時間の間、前記サンプリング回路の
出力をカウントし、 前記ラツチ回路は、前記タイミング発生回路に
規制される一定時間の間、前記カウンタの出力を
保持し、前記比較回路に対し出力するよう構成し
たことを特徴とするCPUのスーパーバイザ/リ
セツト回路。
[Scope of Claims] 1. A CPU supervisor/reset circuit capable of outputting a control signal indicating whether the CPU is in an operating state or a standby state, the time rate during which the control signal is active. a counting means for constantly monitoring the output of the counting means; a comparison means for outputting an alarm signal when the time rate during which the control signal is active exceeds a certain range by comparing the output of the counting means with a reference value; When the signal becomes active,
a reset means for outputting a signal to the CPU to interrupt or reset the CPU; the counting means includes a sampling circuit, a counter, a timing generation circuit, and a latch circuit; The active control signal is sampled by a clock signal output from the circuit and sent to a counter, and the counter counts the output of the sampling circuit for a certain period of time regulated by the timing generation circuit. A supervisor/reset circuit for a CPU, characterized in that the latch circuit is configured to hold the output of the counter for a certain period of time regulated by the timing generation circuit and output it to the comparison circuit.
JP61165341A 1986-07-14 1986-07-14 Supervisor/resetting circuit for cpu Granted JPS6320548A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61165341A JPS6320548A (en) 1986-07-14 1986-07-14 Supervisor/resetting circuit for cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61165341A JPS6320548A (en) 1986-07-14 1986-07-14 Supervisor/resetting circuit for cpu

Publications (2)

Publication Number Publication Date
JPS6320548A JPS6320548A (en) 1988-01-28
JPH0452977B2 true JPH0452977B2 (en) 1992-08-25

Family

ID=15810500

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61165341A Granted JPS6320548A (en) 1986-07-14 1986-07-14 Supervisor/resetting circuit for cpu

Country Status (1)

Country Link
JP (1) JPS6320548A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5597645A (en) * 1979-01-17 1980-07-25 Hitachi Ltd Microprocessor control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5597645A (en) * 1979-01-17 1980-07-25 Hitachi Ltd Microprocessor control system

Also Published As

Publication number Publication date
JPS6320548A (en) 1988-01-28

Similar Documents

Publication Publication Date Title
JPH0346854B2 (en)
JPH0452977B2 (en)
JPS6349855A (en) Detecting device for interruption cycle abnormality of cpu
JPH0277854A (en) Resetting system for microprocessor
JPS5983438A (en) Program failure detecting system
JPH03214332A (en) Watch dog timer
JPH04286036A (en) Watch dog timer device
JPS61241848A (en) Fault detecting circuit for electronic computer
JPH04225432A (en) Interruption processing time control system for one-chip microcomputer
JPS6289146A (en) Condition signal supervising circuit
JPH0335341A (en) Status signal detector
JPH06350677A (en) Interrupt request type switching request signal monitoring system
JPH01199242A (en) Abnormality detector of microcomputer system
JPH02259845A (en) Processor
JPH0498540A (en) Processor load monitoring system
JPS6310248A (en) Detecting system for abnormal state of microprocessor
JPS63101938A (en) Device for preventing microprocessor from runaway
JPH04278617A (en) Reset circuit
JPS5819097B2 (en) Computer system monitoring method
JPH02150942A (en) Bus abnormality detecting circuit
JPH01263709A (en) Resetting control device
JPS58221456A (en) Method for detecting abnormal of computer
JPH0495138A (en) Detection system for microprocessor processing abnormality
JPH038005A (en) Timer control system
JPS62150454A (en) Direct memory access system