JPH0458339A - Control microprocessor system - Google Patents

Control microprocessor system

Info

Publication number
JPH0458339A
JPH0458339A JP2169567A JP16956790A JPH0458339A JP H0458339 A JPH0458339 A JP H0458339A JP 2169567 A JP2169567 A JP 2169567A JP 16956790 A JP16956790 A JP 16956790A JP H0458339 A JPH0458339 A JP H0458339A
Authority
JP
Japan
Prior art keywords
microprocessor
signal
interrupt
alarm
outputting
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
JP2169567A
Other languages
Japanese (ja)
Inventor
Hideki Nakamura
秀樹 中村
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 Engineering Ltd
Original Assignee
NEC Engineering 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 NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP2169567A priority Critical patent/JPH0458339A/en
Publication of JPH0458339A publication Critical patent/JPH0458339A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To detect the malfunctions in a control microprocessor system by outputting an alarm signal after checking whether a microprocessor is executing a program or not in a prescribed processor area in a mode except an interruption processing state and whether the microprocessor is normally executing the interruption processing or not. CONSTITUTION:A microprocessor 10 produces a state signal 31 to show a fact that the processor 10 is executing a program in a prescribed program area in a mode except an interruption processing state. At the same time, an interruption executing state signal 42 is produced after detection of a fact that the processor 10 is executing the interruption processing. Then two one-shot flip- flops are set by both signals 31 and 42 and produce the operating pulse signals for a fixed time. An AND is secured among these operating pulse signals and outputted as an alarm signal 47. Thus it is possible to detect such abnormality where another processing has the abnormality even though the interruption processing is normally carried out.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 不発明は、制御用マイクロプロセッサシステムに利用す
る。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The invention is applied to a control microprocessor system.

本発明は、特に、その制御用マイクロプロセッサシステ
ムのアラーム状態を検出するための、アラーム判定回路
に利用する。
The present invention is particularly applied to an alarm determination circuit for detecting an alarm state of a microprocessor system for controlling the system.

〔概要〕〔overview〕

本発明は、定期的に割込処理を行う制御用マイクロプロ
セッサにおいて、 マイクロプロセッサが割込処理以外のときにあらかじめ
設定されたプロセッサ領域についてプログラムを実行し
ているか否か、ならびに割込処理を正常に実行している
か否かの双方の状態チエツクを行いアラーム信号を出力
するようにすることにより、 マイクロプロセッサの種類の違いに左右されずにその誤
動作を検出できるようにしたものである。
In a control microprocessor that periodically processes interrupts, the present invention determines whether or not the microprocessor is executing a program in a preset processor area when not processing interrupts, and whether or not the microprocessor is processing interrupts normally. By checking the status of both microprocessors and outputting alarm signals, malfunctions can be detected regardless of the type of microprocessor.

〔従来の技術〕[Conventional technology]

第4図(a)、ら)および(C)は、従来の制御用マイ
クロプロセッサシステムにおけるアラーム判定回路を示
すブロック構成図である。
FIGS. 4(a), 4(a) and 4(c) are block diagrams showing an alarm determination circuit in a conventional control microprocessor system.

第4図(a)において、再トリガ可能のワンショットフ
リップフロップ(ISF/F)52を用い、プログラム
中にその時定数より短い時間内に、再びトリガパルスを
出すような配慮をしておく。この回路では、プログラム
が正常に動作しているときには、ワンショットフリップ
フロップ52は「オン」し続けるが、なんらかの原因で
トリガパルスの間隔が長くなったり、トリガパルスが出
なくなったりした場合には、ワンショットフリップフロ
ップ52は「オフ」となりアラーム信号54を出力する
In FIG. 4(a), a retriggerable one-shot flip-flop (ISF/F) 52 is used, and care is taken to issue a trigger pulse again within a time shorter than the time constant during programming. In this circuit, when the program is operating normally, the one-shot flip-flop 52 remains "on", but if for some reason the interval between trigger pulses becomes longer or the trigger pulse is no longer output, One-shot flip-flop 52 is turned "off" and outputs alarm signal 54.

この「オフ」状態をアラーム状態とする回路は、ウオッ
チドックタイマと呼ばれ、広く知られているアラーム判
定回路の一つである。なお、第4図(a)において、5
0はマイクロプロセッサ、51は工/○ポート、および
53はバスである。
A circuit that makes this "off" state an alarm state is called a watchdog timer, and is one of the widely known alarm determination circuits. In addition, in FIG. 4(a), 5
0 is a microprocessor, 51 is an engineering/○ port, and 53 is a bus.

第4図(b)は、マイクロプロセッサのステータス信号
を利用したアラーム判定回路の一例である。
FIG. 4(b) is an example of an alarm determination circuit using a status signal of a microprocessor.

このステータス信号は、使用するマイクロプロセッサの
種類によって異なるが、例えば第4図ら)に示すように
、SoおよびSl というステータス出力ピンがあるマ
イクロプロセッサ55の場合に、これをオアゲート5G
でデコードすることによって、マイクロプロセッサの停
止状態を検出しアラーム信号57を出力することができ
る。
This status signal differs depending on the type of microprocessor used, but for example, as shown in FIG.
By decoding the microprocessor, it is possible to detect the stopped state of the microprocessor and output the alarm signal 57.

また、第4図(C)は、ある種のマイクロプロセッサシ
ステムにおいてよく行われる誤動作検出対策であるが、
マイクロプロセッサ58のデータバス59をプルアップ
抵抗60によりそれぞれプルアップしておく方法である
。この場合、命令コードとして’FFHJ  (16進
数)を読んだ場合、プログラムアドレスはr38H」番
地にジャンプする。これはもちろん、ソフトウェア割り
込みとしても使用できるわけであるが、この特性を利用
して、マイクロプロセッサシステムがなんらかの誤動作
により、プログラムの暴走を起こし、メモリを実装して
いないアドレスをアクセスした場合、マイクロプロセッ
サにはrFFH,という命令コードが読み込まれること
となり、結果としてプログラムアドレスはr38H」番
地にジャンプする。この「38H」番地以降に、この状
態をアラームとするプログラムを組み込んでおけば、こ
の状態をアラームとして検出することが可能である。
In addition, FIG. 4(C) shows a malfunction detection countermeasure that is often used in certain types of microprocessor systems.
This is a method in which the data bus 59 of the microprocessor 58 is pulled up by a pull-up resistor 60. In this case, when 'FFHJ (hexadecimal number) is read as the instruction code, the program address jumps to address r38H. Of course, this can also be used as a software interrupt, but if the microprocessor system malfunctions and the program goes out of control and accesses an address for which no memory is implemented, the microprocessor The instruction code rFFH is read in, and as a result, the program address jumps to address r38H. If a program that makes this condition an alarm is installed after this address "38H", it is possible to detect this condition as an alarm.

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

一般的に制御用マイクロプロセッサシステムは、外部か
らのなんらかの割込信号を人力し、定期的になんらかの
制御動作を行うものが多い。例えば、数m秒ごとの割込
信号を外部より入力し、この割込信号をマイクロプロセ
ッサの割込入力に接続することにより、定期的になんら
かのプログラムを起動する等の処理が一般的である。こ
の際、前記割込信号によって起動される割込処理の中で
、第4図(a)のウオッチドックタイマに対するトリガ
パルスを出力することによって、アラームを検出しよう
とする回路は、現在でも良く使われている一般的なもの
である。
In general, many control microprocessor systems manually perform some kind of control operation on a regular basis by receiving some kind of interrupt signal from the outside. For example, it is common to input an interrupt signal every few milliseconds from the outside and connect this interrupt signal to the interrupt input of a microprocessor to periodically start some program. At this time, a circuit that attempts to detect an alarm by outputting a trigger pulse to the watchdog timer shown in FIG. 4(a) during the interrupt process activated by the interrupt signal is still commonly used. This is a common thing.

ところが、ある種のマイクロプロセッサにおいては、な
んらかの誤動作によって、割込処理だけは正常に行われ
るのに、プログラム実行アドレスだけは、実際のプログ
ラム領域を正常に動作せずに、例えば、なんのデバイス
も接続されていない領域、あるいはRA Mの領域を動
作していることなどもあり得る。もちろんこの場合、プ
ログラムは意図したように動作していないわけであるか
ら、その目的とするところの制御は、異常になってしま
うが、割込処理だけが正常に行われている場合には、ウ
オッチドックタイマ回路ではその異常状態を検出できな
いこになってしまう。
However, in some types of microprocessors, due to some kind of malfunction, only interrupt processing is performed normally, but only the program execution address does not operate normally in the actual program area, and for example, no device is activated. It is also possible that an unconnected area or RAM area is being operated. Of course, in this case, the program is not operating as intended, so its intended control will become abnormal, but if only interrupt processing is being performed normally, The watchdog timer circuit will not be able to detect this abnormal state.

また前記のようなマイクロプロセッサの誤動作の場合、
マイクロプロセッサのステータス信号出力ピンを用いる
第4図ら)のアラーム判定回路においても、その異常を
検出できない場合が多い。これは、このステータス信号
を使ったアラーム判定回路は、マイクロプロセッサが停
止(HALT)状態を示したときにアラームを検出でき
るのであって、例えば、なんらかの誤動作によるプログ
ラムの暴走によって、マイクロプロセッサがプログラム
領域以外のアドレス空間の命令を実行していたとしても
、マイクロプロセッサがなんらかの命令を実行している
限り、停止状態は発生しないからである。
In addition, in the case of a malfunction of the microprocessor as mentioned above,
Even in the alarm determination circuit shown in FIG. 4, which uses the status signal output pin of a microprocessor, the abnormality cannot be detected in many cases. This is because an alarm judgment circuit using this status signal can detect an alarm when the microprocessor indicates a halt (HALT) state. This is because as long as the microprocessor is executing some instruction, no halt state will occur even if the microprocessor is executing an instruction in an address space other than the microprocessor.

また、第4図(C)に示したデータバスのプルアップ方
式は、ある種のマイクロプロセッサには適用できるけれ
ども、命令コードとしてrFFHJを読み込んでも、プ
ログラムアドレスはある特定番地にジャンプしない型式
のマイクロプロセッサには適用できない。
Furthermore, although the data bus pull-up method shown in FIG. 4(C) can be applied to some types of microprocessors, even if rFFHJ is read as an instruction code, the program address does not jump to a specific address. Not applicable to processors.

以上説明したように、従来のマイクロプロセッサシステ
ムのアラーム判定回路には、十分にその目的を達するこ
とができない欠点がある。さらに、マイクロプロセッサ
の型式が異なると適用できなくなる欠点がある。
As explained above, the alarm determination circuit of the conventional microprocessor system has a drawback that it cannot fully achieve its purpose. Furthermore, it has the disadvantage that it cannot be applied to different types of microprocessors.

本発明の目的は、前記の欠点を除去することにより、マ
イクロプロセッサの種類の違いに左右されずに、あらゆ
るマイクロプロセッサの誤動作を検出でき、特に、割り
込み処理は正常に行われているものの、他の処理に以上
があるというような、従来のアラーム判定回路ではその
異常を検出できなかったアラームについても、その異常
を検出できるアラーム判定回路を有する制御用マイクロ
プロセッサシステムを提供することにある。
An object of the present invention is to eliminate the above-mentioned drawbacks, thereby making it possible to detect malfunctions of any microprocessor, regardless of the type of microprocessor. It is an object of the present invention to provide a control microprocessor system having an alarm judgment circuit capable of detecting an abnormality of an alarm that cannot be detected by a conventional alarm judgment circuit, such as a case where the above processing is required.

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

本発明は、マイクロプロセッサと、このマイクロプロセ
ッサに割込動作をかける割込手段と、前記マイクロプロ
セッサの異常状態を検出しアラーム信号を出力するアラ
ーム手段とを備えた制御用マイクロプロセッサシステム
において、前記アラーム手゛段は、前記マイクロプロセ
ッサが割込処理実行中であることを検出し割込実行状態
信号を出力する手段と、前記マイクロプロセッサが割込
処理以外を行っているときに、あらかじめ設定されたプ
ログラム領域をプログラム実行中であることを検出しプ
ログラム領域実行状態信号を出力する手段と、前記プロ
グラム領域実行状態信号および前記割込実行状態信号の
うちの少なくとも一つが正常でないときに前記アラーム
信号を出力する手段とを含むことを特徴とする。
The present invention provides a control microprocessor system comprising a microprocessor, interrupt means for applying an interrupt operation to the microprocessor, and alarm means for detecting an abnormal state of the microprocessor and outputting an alarm signal. The alarm means includes means for detecting that the microprocessor is executing an interrupt process and outputting an interrupt execution status signal, and a preset alarm means for detecting that the microprocessor is executing an interrupt process and outputting an interrupt execution status signal. means for detecting that a program area is being executed and outputting a program area execution status signal; and means for outputting an alarm signal when at least one of the program area execution status signal and the interrupt execution status signal is not normal. and means for outputting.

また、本発明は、マイクロプロセッサと、割込信号によ
りセットされ前記マイクロプロセッサに対して割込信号
を出力し前記マイクロプロセッサからのリセット信号に
よりリセットされる少なくとも一つの割込フリップフロ
ップと、前記マイクロプロセッサの異常状態を検出しア
ラーム信号を出力するアラーム手段とを備えた制御用マ
イクロプロセッサシステムにおいて、前記アラーム手段
は、前記割込フリップフロップから出力される割込信号
と前記マイクロプロセッサから出力されるリセット信号
とにより前記マイクロプロセッサの割込処理実行中の状
態を検出し割込実行状態信号を出力する手段と、前記マ
イクロプロセッサのアドレスバスに接続されあらかじめ
設定されたプログラム領域をプログラムが実行中である
ことをデコードしその状態を表すプログラム領域実行状
態信号を出力する手段と、前記マイクロプロセッサが割
込処理実行中でないときのみ、前記マイクロプロセッサ
のシステムクロックにより前記プログラム領域実行状態
信号をラッチする手段と、このラッチする手段から出力
される前記プログラム領域実行状態信号によりセットさ
れ、ある一定時間第一の動作パルス信号を出力する手段
と、前記割込実行状態信号によりセットされ、ある一定
時間第二の動作パルス信号を出力する手段と、前記第一
および第二の動作パルス信号の論理演算を行い前記アラ
ーム信号を出力する論理回路とを含むことを特徴とする
The present invention also provides a microprocessor, at least one interrupt flip-flop that is set by an interrupt signal, outputs an interrupt signal to the microprocessor, and is reset by a reset signal from the microprocessor; In a control microprocessor system comprising an alarm means for detecting an abnormal state of a processor and outputting an alarm signal, the alarm means includes an interrupt signal output from the interrupt flip-flop and an alarm signal output from the microprocessor. means for detecting a state in which the microprocessor is executing an interrupt process based on a reset signal and outputting an interrupt execution state signal; means for decoding something and outputting a program area execution status signal representing the state; and means for latching the program area execution status signal using a system clock of the microprocessor only when the microprocessor is not executing an interrupt process. means for outputting a first operation pulse signal for a certain period of time set by the program area execution state signal output from the latching means; and a second operation pulse signal for a certain period of time set by the interrupt execution state signal. and a logic circuit that performs a logical operation on the first and second operation pulse signals and outputs the alarm signal.

〔作用〕[Effect]

マイクロプロセッサが割込処理以外のときに、あらかじ
於設定されたプログラム領域をプログラム実行中である
ことを示すプログラム領域実行状態信号を生成する。一
方、マイクロプロセッサが割込処理実行中であることを
検出し割込実行状態信号を生成する。そして、これら二
つの実行状態信号によりそれぞれセットされある一定時
間の動作パルス信号を出力する二つの例えばワンショッ
トフリップフロップを設け、これらワンショットフリッ
プフロップからの動作パルス信号の例えば論理積をとり
アラーム信号として出力する。
When the microprocessor is not performing interrupt processing, it generates a program area execution state signal indicating that the program area set in advance is being executed. On the other hand, it detects that the microprocessor is executing an interrupt process and generates an interrupt execution status signal. Then, two one-shot flip-flops each set by these two execution state signals and outputting an operation pulse signal for a certain period of time are provided, and the operation pulse signals from these one-shot flip-flops are logically multiplied and an alarm signal is generated. Output as .

すなわち、前記二つのワンショットフリップフロップは
、マイクロプロセッサが正常に動作している限り、動作
状態を維持するはずである。ところがなんらかの原因に
よりマイクロプロセッサが誤動作し、割込処理をできな
くなった場合、また割込処理は正常に行われているもの
の、プログラム実行アドレスが実際のプログラム領域と
は異なるアドレスを実行しているような暴走の状態にな
った場合、いずれの場合もアラーム状態を検出すること
が可能となる。
That is, the two one-shot flip-flops should remain operational as long as the microprocessor is operating normally. However, if the microprocessor malfunctions for some reason and becomes unable to handle interrupts, or even though interrupt processing is performed normally, the program execution address appears to be executing at a different address from the actual program area. If a runaway condition occurs, an alarm condition can be detected in either case.

〔実施例〕〔Example〕

以下、本発明の実施例について図面を参照して説明する
Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例を示すブロック構成図である
FIG. 1 is a block diagram showing one embodiment of the present invention.

本実施例は、マイクロプロセッサ10と、割込信号32
および33によりそれぞれセットされマイクロプロセッ
サ10に対して割込信号32および33である出力信号
34および35を出力しマイクロプロセッサ10からの
リセットパルス36および37によりそれぞれリセット
される二つのD型フリップフロップからなる割込フリッ
プフロップ(F/F)12および13と、マイクロプロ
セッサ10の異常状態を検出しアラーム信号47を出力
するアラーム手段とを備えた制御用マイクロプロセッサ
システムにおいて、本発明の特徴とするところの、 前記アラーム手段は、割込フリップフロップ12および
13から出力される出力信号34および35とマイクロ
プロセッサ10から出力されるリセットパルス36およ
び37とによりマイクロプロセッサ10の割込処理実行
中の状態を検出し割込実行状態信号42を出力する手段
としての、オア回路14および15、ワンショットフリ
ップフロッ7’ (I SF/F) 16、ならびにノ
アゲート17と、マイクロプロセッサ10のアドレスバ
ス30に接続されあらかじめ設定されたプログラム領域
をプログラムが実行中であることをデコードしその状態
を表すプログラム領域実行状態信号31を出力する手段
としてのプログラムアドレスデコーダ11と、マイクロ
プロセッサ10が割込処理実行中でないときのみ、前記
マイクロプロセッサ10のシステムクロック41により
プログラム領域実行状態信号31をラッチする手段とし
ての、アンドゲート18およびD型フリップフロップ(
F/F)19と、このD型フリップフロップ19から出
力されるプログラム領域実行状態信号31である出力信
号44によりセットされ、ある一定時間第一の動作パル
ス信号としての出力信号45を出力する手段としての、
第一のワンショットフリップフロップ(ISF/F)2
0と、割込実行状態信号42によりセットされ、ある一
定時間第二の動作パルス信号としての出力信号46を出
力する手段としての、第二のワンショットフリップフロ
ップ(ISF/F)21と、第一および第二のワンショ
ットフリップフロップ20と21との出力信号45と4
6との論理積演算を行いアラーム信号47を出力する論
理回路としてのアンド回路22とを含んでいる。
This embodiment uses a microprocessor 10 and an interrupt signal 32.
and 33, respectively, output signals 34 and 35 which are interrupt signals 32 and 33 to the microprocessor 10, and are reset by reset pulses 36 and 37, respectively, from the microprocessor 10. In a control microprocessor system equipped with interrupt flip-flops (F/F) 12 and 13, and an alarm means for detecting an abnormal state of the microprocessor 10 and outputting an alarm signal 47, the present invention is characterized by: The alarm means detects the state in which the microprocessor 10 is executing interrupt processing by the output signals 34 and 35 output from the interrupt flip-flops 12 and 13 and the reset pulses 36 and 37 output from the microprocessor 10. The OR circuits 14 and 15, the one-shot flip-flop 7' (ISF/F) 16, and the NOR gate 17 as means for detecting and outputting the interrupt execution state signal 42 are connected to the address bus 30 of the microprocessor 10 and A program address decoder 11 serves as a means for decoding that a program is being executed in a set program area and outputs a program area execution status signal 31 representing the status, and only when the microprocessor 10 is not executing interrupt processing. , an AND gate 18 and a D-type flip-flop (
F/F) 19 and a means for outputting an output signal 45 as a first operation pulse signal for a certain period of time, which is set by an output signal 44 which is a program area execution state signal 31 output from this D-type flip-flop 19. as,
First one-shot flip-flop (ISF/F) 2
0, a second one-shot flip-flop (ISF/F) 21 as a means for outputting an output signal 46 as a second operating pulse signal for a certain period of time set by the interrupt execution state signal 42; Output signals 45 and 4 of the first and second one-shot flip-flops 20 and 21
6 and an AND circuit 22 as a logic circuit that performs an AND operation with 6 and outputs an alarm signal 47.

次に、第2図および第3図に示すタイムチャートを参照
して本実施例の動作について説明する。
Next, the operation of this embodiment will be explained with reference to the time charts shown in FIGS. 2 and 3.

第1図において、マイクロプロセッサ10から出力され
るアドレスバス30は、プログラムアドレスデコーダ1
1に接続される。このプログラムアドレスデコーダ11
では、アラーム設定されたプログラム領域をアドレスバ
スが選択しているときにプログラム領域実行状態信号3
1をアクティブ(本実施例ではアクティブ「ロー」レベ
ルとする)にして出力する。従って、このプログラム領
域実行状態信号31は、マイクロプロセッサ10が正常
に動作しているときには、第2図の31(定常)のよう
な波形になるはずである。このプログラム領域実行状態
信号31は、D型フリップフロップ19の9人力に人力
される。
In FIG. 1, an address bus 30 output from a microprocessor 10 is connected to a program address decoder 1.
Connected to 1. This program address decoder 11
In this case, when the address bus selects the program area where the alarm has been set, the program area execution status signal 3
1 is made active (in this embodiment, the active "low" level) and output. Therefore, when the microprocessor 10 is operating normally, the program area execution state signal 31 should have a waveform like 31 (steady) in FIG. 2. This program area execution status signal 31 is input manually to the D-type flip-flop 19.

一方、割込信号32および33は、それぞれ割込フリッ
プフロップ12および13に人力される。この割込フリ
ップフロップ12および13は、割込信号32および3
3がアクティブになったときにセットされ(本実施例で
は、「ハイレベル」とする。)、割込処理を終了したと
きに、マイクロプロセッサ10によりリセットされる(
本実施例では「ロー」レベルとする。)ようにプログラ
ムしである。このマイクロプロセッサ10からのリセッ
ト信号を割込リセット信号36および37とする。
On the other hand, interrupt signals 32 and 33 are input to interrupt flip-flops 12 and 13, respectively. The interrupt flip-flops 12 and 13 are connected to interrupt signals 32 and 3.
3 becomes active (in this embodiment, it is set to "high level"), and is reset by the microprocessor 10 when interrupt processing is completed (
In this embodiment, the level is set to "low". ). The reset signals from the microprocessor 10 are referred to as interrupt reset signals 36 and 37.

もちろんこれら割込フリップフロップ12および13の
出力信号34および35は、マイクロプロセッサ10の
割込入力に入力されるとともに、オアゲート14により
論理和をとった後に、出力信号38としてノアゲート1
7に人力される。
Of course, the output signals 34 and 35 of these interrupt flip-flops 12 and 13 are input to the interrupt input of the microprocessor 10, and after being logically summed by the OR gate 14, the output signals 34 and 35 are output from the NOR gate 1 as an output signal 38.
7 will be powered by humans.

ところで、前記割込フリップフロップ12および13の
出力信号34および35は、マイクロプロセッサ10が
、割込処理を行っているかどうかの状態信号と考えるこ
ともできるが、この割込フリップフロップ12および1
3のリセットを、割込処理の最後で行うとしても、実際
の割込処理が終了するのは、リセットが行われた後の数
マイクロ秒後(この時間はマイクロプロセッサの種類、
クロックのスピード等により異なる。)になってしまう
。この問題を解決するたtに、割込リセット信号36お
よび37は、オアゲート15で論理和をとった後、その
出力信号39は数マイクロ秒の時間を稼ぐために、ワン
ショットフリップフロップ16に人力される。
By the way, the output signals 34 and 35 of the interrupt flip-flops 12 and 13 can be considered as status signals indicating whether or not the microprocessor 10 is performing interrupt processing;
Even if the reset in step 3 is performed at the end of interrupt processing, the actual interrupt processing ends several microseconds after the reset (this time depends on the type of microprocessor,
Depends on clock speed etc. )Become. To solve this problem, the interrupt reset signals 36 and 37 are logically summed by the OR gate 15, and then the output signal 39 is manually input to the one-shot flip-flop 16 in order to buy a few microseconds of time. be done.

オアゲート14の出力信号38と、ワンショットフリッ
プフロップ16の出力信号40とは、ノアゲート17に
入力され否定論理和がとられる。このノアゲート17の
出力信号が、割込実行状態信号42(本実施例では、割
込実行中は「ロー」レベルとなる。)である。この割込
実行状態信号42の波形は第2図の42のようになる。
The output signal 38 of the OR gate 14 and the output signal 40 of the one-shot flip-flop 16 are input to the NOR gate 17 and are NOR'ed. The output signal of this NOR gate 17 is an interrupt execution state signal 42 (in this embodiment, it is at a "low" level while an interrupt is being executed). The waveform of this interrupt execution state signal 42 is as shown in 42 in FIG.

また、この割込実行状態信号42をつくるための回路論
理を説明するためのタイムチャートを第3図に示す。第
3図に示すように、割込フリップフロップ12あるいは
13の出力信号34あるいは35は、マイクロプロセッ
サ10の割込人力に入力され、この出力信号34あるい
は35がアクティブになった後に、割込処理が起動され
る。この際マイクロプロセッサ10は、割込処理が終了
する直前に、割込フリップフロップ12あるいは13の
リセットパルス36あるいは37を出力する。この割込
フリップフロップのリセットパルス36および37は、
ワンショットフリップフロップ16に入力され、このリ
セットパルス36または37の立ち下がりエツジを使っ
て、ワンショットフリップフロップ16は、固定時間の
デイレイパルス40を発生する。このデイレイパルス4
0と、割込フリップフロップの出力信号34あるいは3
5との否定論理和が割込状態信号42となる。この割込
状態信号42が、第2図の42で示したものである。
Further, a time chart for explaining the circuit logic for generating this interrupt execution state signal 42 is shown in FIG. As shown in FIG. 3, the output signal 34 or 35 of the interrupt flip-flop 12 or 13 is input to the interrupt input of the microprocessor 10, and after this output signal 34 or 35 becomes active, the interrupt processing is performed. is started. At this time, the microprocessor 10 outputs a reset pulse 36 or 37 to the interrupt flip-flop 12 or 13 immediately before the interrupt processing ends. The reset pulses 36 and 37 of this interrupt flip-flop are
The falling edge of the reset pulse 36 or 37 is input to the one-shot flip-flop 16, and the one-shot flip-flop 16 generates a fixed-time delay pulse 40. This day pulse 4
0 and the output signal 34 or 3 of the interrupt flip-flop
The NOR with 5 becomes the interrupt state signal 42. This interrupt state signal 42 is indicated by 42 in FIG.

一方、割込状態信号42と、マイクロプロセ・ンサ10
のシステムクロック41とは、アンドゲート18に接続
され論理積がとられる。すなわち、このアンドゲート1
8の出力信号43は、割込実行中は「ロー」レベルを維
持するが、割込処理以外のプログラムを実行中のときに
は、システムクロック41が出力される。このアンドゲ
ート18の出力信号43は、D型フリップフロップ19
のクロック人力に人力される。
On the other hand, the interrupt status signal 42 and the microprocessor 10
The system clock 41 is connected to the AND gate 18 and a logical product is taken. That is, this AND gate 1
The output signal 43 of 8 maintains a "low" level while an interrupt is being executed, but the system clock 41 is output when a program other than interrupt processing is being executed. The output signal 43 of this AND gate 18 is transmitted to the D-type flip-flop 19.
The clock is human-powered.

このD型フリップフロップ19は、プログラム領域実行
状態信号31の状態を、システムクロック41でラッチ
して出力する。しかし、前述したようにこのD型フリッ
プフロップ19のクロック人力には、割込処理中にクロ
ックは人力されないことから、このD型フリップフロッ
プ19の8力信号44は、割込処理以外のプログラムを
実行中のときのみ、プログラム領域実行状態信号31が
ラッチされ出力される。従って、なんらかの原因により
プログラムの暴走が起こり、マイクロプロセッサ10が
あらかじめ設定されているプロセッサ領域以外のアドレ
ス空間を実行していたときには、このD型フリップフロ
ップ19の出力信号44は、「ハイ」レベルを維持する
ことになる。また逆にマイクロプロセッサ10が正常に
動作していれば、第2図の31(割込み)の波形のよう
なパルスが出力される。このD型フリップフロップ19
の出力信号44は、プログラム領域アラーム検出用のワ
ンショットフリップフロップ20に入力される。
This D-type flip-flop 19 latches the state of the program area execution state signal 31 using the system clock 41 and outputs it. However, as mentioned above, since the clock is not manually input to this D-type flip-flop 19 during interrupt processing, the 8-power signal 44 of this D-type flip-flop 19 is used to control programs other than interrupt processing. Only during execution, the program area execution status signal 31 is latched and output. Therefore, if a runaway program occurs for some reason and the microprocessor 10 is executing an address space other than the preset processor area, the output signal 44 of the D-type flip-flop 19 will be at a "high" level. will be maintained. Conversely, if the microprocessor 10 is operating normally, a pulse like the waveform 31 (interrupt) in FIG. 2 is output. This D type flip-flop 19
The output signal 44 is input to the one-shot flip-flop 20 for program area alarm detection.

プログラム領域アラーム検出用のワンショットフリップ
フロップ20の出力信号45は、マイクロプロセッサ1
0が正常に動作していて、プログラム領域実行状態信号
31が正常に出力されている限り、正常状態を示す「ハ
イ」レベルを維持する程度の時定数を持たせて設定して
おく必要がある。
The output signal 45 of the one-shot flip-flop 20 for program area alarm detection is transmitted to the microprocessor 1.
As long as 0 is operating normally and the program area execution status signal 31 is being output normally, it is necessary to set it with a time constant that maintains the "high" level indicating the normal state. .

また同様に、割込アラーム検出用のワンショットフリッ
プフロップ21の出力信号46についても、正常に割込
信号32あるいは33が人力されて、マイクロプロセッ
サ10が割込処理を行っている限り、正常状態を「ハイ
」レベルを維持する程度の時定数を持たせて設定してお
く必要がある。
Similarly, the output signal 46 of the one-shot flip-flop 21 for interrupt alarm detection is in a normal state as long as the interrupt signal 32 or 33 is normally input manually and the microprocessor 10 is processing the interrupt. It is necessary to set the time constant to maintain the "high" level.

前記二つのワンショットフリップフロップ20と21の
出力信号45と46とは、アンドゲート22に人力され
論理積がとられ、アラーム信号47が出力される。この
結果、もし一方あるいは両方のワンショットフリップフ
ロップ20およびまたは21の出力が異常状態を示す「
ロー」レベルに変化した場合、アンドゲート22の出力
は、「ロー」レベルに変化することになる。この「ロー
」レベル状態が、マイクロプロセッサ10のアラーム信
号47である。
The output signals 45 and 46 of the two one-shot flip-flops 20 and 21 are logically ANDed by an AND gate 22, and an alarm signal 47 is output. As a result, if the output of one or both one-shot flip-flops 20 and/or 21 indicates an abnormal state,
If the signal changes to a "low" level, the output of the AND gate 22 will change to a "low" level. This "low" level state is the alarm signal 47 of the microprocessor 10.

なお、前述の説明においては、ワンショットフリップフ
ロップ21の入力は割込実行状態信号42としたけれど
も割込処理が割込フリップフロップ12および13のリ
セットと同時に終了する場合には、ワンショットフリッ
プフロップ21の人力は割込実行状態信号42の代わり
にオアゲート14の出力信号38を用いてもよい。
In the above explanation, the input of the one-shot flip-flop 21 is the interrupt execution status signal 42, but if the interrupt processing ends at the same time as the interrupt flip-flops 12 and 13 are reset, the one-shot flip-flop 21 may use the output signal 38 of the OR gate 14 instead of the interrupt execution status signal 42.

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

本発明によれば、マイクロプロセッサの種類によらず、
なんらかの原因によりマイクロプロセッサが誤動作し、
割込処理をできなくなった場合、およびに、割込処理は
正常に行われているものの、プログラム実行アドレスが
実際のプログラム領域とは異なるアドレスを実行してい
るような暴走の状態になった場合、いずれの場合も、制
御用マイクロプロセッサシステムのアラーム状態を検出
でき、その効果は大である。
According to the present invention, regardless of the type of microprocessor,
The microprocessor malfunctions for some reason,
If interrupt processing is no longer possible, or if the interrupt processing is being performed normally but the program is running out of control, where the program execution address is different from the actual program area. In either case, the alarm state of the control microprocessor system can be detected, which is highly effective.

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

第1図は本発明の一実施例を示すブロック構成図。 第2図はその動作を示すタイムチャート(1)。 第3図はその動作を示すタイムチャート(2)。 第4図(a)、ら)および(C)は従来例を示すブロッ
ク構成図。 10.50.55.58・・・マイクロプロセッサ、1
1・・・プログラムアドレスデコーダ、12.13・・
・割込フリッブフロップ(F/F) 、14.15.5
6・・・オアゲート、16.20.21.52・・・ワ
ンショットフリップフロップ(l S F/F) 、1
7・・・ノアゲート、18.22・・・アンドゲート、
19・・・D型フリップフロップ(F/F)、30・・
・アドレスバス、31・・・プログラム領域実行状態信
号、32.33・・・割込信号、34.35.38.3
9.43〜46・・・出力信号、36.37・・・リセ
ットパルス、40・・・デイレイパルス、41・・・シ
ステムクロック、42・・・割込実行状態信号、47.
54.57・・・アラーム信号、51・・工10ポート
、53・・・バス、59・・・データバス、60・・・
プルアップ抵抗。
FIG. 1 is a block diagram showing an embodiment of the present invention. FIG. 2 is a time chart (1) showing the operation. FIG. 3 is a time chart (2) showing the operation. FIGS. 4(a), 4(a) and 4(c) are block configuration diagrams showing a conventional example. 10.50.55.58...Microprocessor, 1
1...Program address decoder, 12.13...
・Interrupt flip-flop (F/F), 14.15.5
6...OR gate, 16.20.21.52...One-shot flip-flop (l S F/F), 1
7... Noah Gate, 18.22... And Gate,
19...D type flip-flop (F/F), 30...
・Address bus, 31...Program area execution status signal, 32.33...Interrupt signal, 34.35.38.3
9.43-46...Output signal, 36.37...Reset pulse, 40...Delay pulse, 41...System clock, 42...Interrupt execution state signal, 47.
54.57... Alarm signal, 51... Engineering 10 port, 53... Bus, 59... Data bus, 60...
pull-up resistor.

Claims (1)

【特許請求の範囲】 1、マイクロプロセッサと、 このマイクロプロセッサに割込動作をかける割込手段と
、 前記マイクロプロセッサの異常状態を検出しアラーム信
号を出力するアラーム手段と を備えた制御用マイクロプロセッサシステムにおいて、 前記アラーム手段は、 前記マイクロプロセッサが割込処理実行中であることを
検出し割込実行状態信号を出力する手段と、 前記マイクロプロセッサが割込処理以外を行っていると
きに、あらかじめ設定されたプログラム領域をプログラ
ム実行中であることを検出しプログラム領域実行状態信
号を出力する手段と、前記プログラム領域実行状態信号
および前記割込実行状態信号のうちの少なくとも一つが
正常でないときに前記アラーム信号を出力する手段とを
含むことを特徴とする制御用マイクロプロセッサシステ
ム。 2、マイクロプロセッサと、 割込信号によりセットされ前記マイクロプロセッサに対
して割込信号を出力し前記マイクロプロセッサからのリ
セット信号によりリセットされる少なくとも一つの割込
フリップフロップと、前記マイクロプロセッサの異常状
態を検出しアラーム信号を出力するアラーム手段と を備えた制御用マイクロプロセッサシステムにおいて、 前記アラーム手段は、 前記割込フリップフロップから出力される割込信号と前
記マイクロプロセッサから出力されるリセット信号とに
より前記マイクロプロセッサの割込処理実行中の状態を
検出し割込実行状態信号を出力する手段と、 前記マイクロプロセッサのアドレスバスに接続されあら
かじめ設定されたプログラム領域をプログラムが実行中
であることをデコードしその状態を表すプログラム領域
実行状態信号を出力する手段と、 前記マイクロプロセッサが割込処理実行中でないときの
み、前記マイクロプロセッサのシステムクロックにより
前記プログラム領域実行状態信号をラッチする手段と、 このラッチする手段から出力される前記プログラム領域
実行状態信号によりセットされ、ある一定時間第一の動
作パルス信号を出力する手段と、前記割込実行状態信号
によりセットされ、ある一定時間第二の動作パルス信号
を出力する手段と、前記第一および第二の動作パルス信
号の論理演算を行い前記アラーム信号を出力する論理回
路とを含むことを特徴とする制御用マイクロプロセッサ
システム。
[Claims] 1. A control microprocessor comprising: a microprocessor; interrupt means for applying an interrupt operation to the microprocessor; and alarm means for detecting an abnormal state of the microprocessor and outputting an alarm signal. In the system, the alarm means includes means for detecting that the microprocessor is executing an interrupt process and outputting an interrupt execution status signal; means for detecting that a set program area is being executed and outputting a program area execution status signal; and means for outputting an alarm signal. 2. A microprocessor, at least one interrupt flip-flop that is set by an interrupt signal, outputs an interrupt signal to the microprocessor, and is reset by a reset signal from the microprocessor, and an abnormal state of the microprocessor; and alarm means for detecting and outputting an alarm signal, wherein the alarm means detects an interrupt signal output from the interrupt flip-flop and a reset signal output from the microprocessor. means for detecting a state in which the microprocessor is executing an interrupt process and outputting an interrupt execution state signal; and a means for decoding that a program is being executed in a preset program area connected to an address bus of the microprocessor. means for outputting a program area execution status signal representing the state thereof; means for latching the program area execution status signal using a system clock of the microprocessor only when the microprocessor is not executing an interrupt process; and this latch. means for outputting a first operation pulse signal for a certain period of time set by the program area execution state signal output from the means for outputting the program area, and a second operation pulse signal for a certain period of time set by the interrupt execution state signal; and a logic circuit that performs a logical operation on the first and second operation pulse signals and outputs the alarm signal.
JP2169567A 1990-06-27 1990-06-27 Control microprocessor system Pending JPH0458339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2169567A JPH0458339A (en) 1990-06-27 1990-06-27 Control microprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2169567A JPH0458339A (en) 1990-06-27 1990-06-27 Control microprocessor system

Publications (1)

Publication Number Publication Date
JPH0458339A true JPH0458339A (en) 1992-02-25

Family

ID=15888865

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2169567A Pending JPH0458339A (en) 1990-06-27 1990-06-27 Control microprocessor system

Country Status (1)

Country Link
JP (1) JPH0458339A (en)

Similar Documents

Publication Publication Date Title
US6112320A (en) Computer watchdog timer
US3566368A (en) Delta clock and interrupt logic
JPH0458339A (en) Control microprocessor system
JPH05233374A (en) Watchdog timer device
JPH03222020A (en) Reset system for multi-micro processor system
JPH03266110A (en) Resetting device for computer
JPH0683654A (en) Cpu runaway preventing circuit
JPH01302438A (en) Watch dog timer circuit
JPH05257748A (en) Microprocessor device
JPH08106406A (en) Runaway detecting device for multitrask program
JPH02163844A (en) Processor monitoring circuit
JPH01124035A (en) Output data control device
JPS5942330B2 (en) power control device
JPS6389941A (en) Monitor and control equipment for microprocessor applied equipment
JPS63316146A (en) Microcomputer
JPS63280345A (en) Detection of program abnormality
JPH06131218A (en) Cpu control system
JPS61235924A (en) Resetting system for computer system
JPH0635757A (en) Abnormality detector of cpu
JPH04151706A (en) Cpu reset circuit
JPH06222960A (en) Cpu reset circuit
JPS5819096B2 (en) Computer abnormality detection timer circuit
JPH0535892A (en) Microcomputer
JPS6029849A (en) Prevention system against malfunction of detecting circuit for processor malfunction
JPH01162940A (en) Inhibiting circuit for cpu runaway