JPH08278902A - Program run away detecting device - Google Patents

Program run away detecting device

Info

Publication number
JPH08278902A
JPH08278902A JP7107870A JP10787095A JPH08278902A JP H08278902 A JPH08278902 A JP H08278902A JP 7107870 A JP7107870 A JP 7107870A JP 10787095 A JP10787095 A JP 10787095A JP H08278902 A JPH08278902 A JP H08278902A
Authority
JP
Japan
Prior art keywords
signal
address
chip select
abnormality
generating means
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.)
Withdrawn
Application number
JP7107870A
Other languages
Japanese (ja)
Inventor
Tomihiro Hirano
富広 平野
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.)
Nippon Steel Corp
Original Assignee
Nippon Steel 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 Nippon Steel Corp filed Critical Nippon Steel Corp
Priority to JP7107870A priority Critical patent/JPH08278902A/en
Publication of JPH08278902A publication Critical patent/JPH08278902A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE: To speedily detect a program becoming abnormal. CONSTITUTION: An address decoding part 12 monitors the address signal sent out of a CPU 32 to detect the address signal specifying an address in an address space where no address is allocated, and sends the inverse of NGCS1 signal. When the low-level signal, the inverse of NGCS1 is inverted by an inverter circuit 14 and then inputted to the CPU 32, the CPU 32 decides that the program run away and initiates MNI to perform an interruption process. Further, an address latch circuit 16 temporarily holds the address specified with the address signal when the inverse of NGCS1 signal from the address decoder part 12 goes down to the low level. This illegal address is read in at the time of the MNI processing of the CPU 32 and utilized as information for specifying the cause of malfunction.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、一般のコンピュータに
おいて、プログラムの暴走を検出するためのプログラム
暴走検出装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program runaway detecting device for detecting runaway of a program in a general computer.

【0002】[0002]

【従来の技術】従来、一般のコンピュータにおいて、プ
ログラムの暴走を検出するときには、ウォッチドッグタ
イマ(watch dog timer )を用いている。たとえば、C
PUが、アドレス空間の割り当てられていない特定領域
のアドレスを指定した場合には、アクセスが行われなく
なり、プログラムが暴走する。このとき、ウォッチドッ
グタイマは、所定の監視期間内にリセットされないた
め、プログラムが暴走したと判定し、CPUにマスク不
可能割込み(NMI)をかける。これにより、CPUは
異常が発生したことを認識し、復旧可能なものについて
は復旧を行う。
2. Description of the Related Art Conventionally, in a general computer, a watch dog timer is used to detect runaway of a program. For example, C
When the PU specifies the address of the specific area to which the address space is not assigned, the access is not performed and the program goes out of control. At this time, since the watchdog timer is not reset within the predetermined monitoring period, it is determined that the program has run out, and a nonmaskable interrupt (NMI) is issued to the CPU. As a result, the CPU recognizes that an abnormality has occurred and restores a recoverable one.

【0003】[0003]

【発明が解決しようとする課題】ところで、ウォッチド
ッグタイマを動作させるためには、専用のプログラムを
必要とする。かかるプログラムにおいて、ウォッチドッ
グタイマの監視期間は、通常、1秒から2秒程度に、余
裕を持って設定している。この監視期間をあまり短くす
ると、アクセスの遅れ等があったときに、誤って異常で
あると判定してしまうからである。このように、ウォッ
チドッグタイマを用いる場合には、監視期間を1秒から
2秒程度としているため、異常が発生したことをすぐに
検出することができず、異常の検出に比較的長い時間を
要するという問題があった。また、この他に暴走原因の
特定(不正アドレスへのアクセス)ができないという問
題がある。
A special program is required to operate the watchdog timer. In such a program, the watchdog timer monitoring period is normally set to about 1 to 2 seconds with a margin. This is because if the monitoring period is too short, it may be erroneously determined to be abnormal if there is a delay in access or the like. As described above, when the watchdog timer is used, since the monitoring period is set to about 1 to 2 seconds, it is not possible to immediately detect that an abnormality has occurred, and it takes a relatively long time to detect the abnormality. There was a problem of cost. In addition to this, there is a problem that the cause of runaway cannot be specified (access to an illegal address).

【0004】本発明は上記事情に基づいてなされたもの
であり、プログラムに異常が発生したことを迅速に検出
することができるプログラム暴走検出装置を提供するこ
とを目的とするものである。
The present invention has been made under the above circumstances, and an object thereof is to provide a program runaway detecting device capable of promptly detecting that an abnormality has occurred in a program.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
の請求項1記載の発明に係るプログラム暴走検出装置
は、中央処理装置から送出されたアドレス信号を監視
し、前記アドレス信号が何も割り当てられていないアド
レス空間内のアドレスを指定しているときにこれを検出
してアドレス異常信号を前記中央処理装置に送出するア
ドレス異常信号発生手段と、前記アドレス信号に基づい
て所定のデバイスを選択するためのチップセレクト信号
を出力するアドレスデコーダと、前記アドレス信号が出
力されたことを検出してアクセス信号を出力するアクセ
ス信号発生手段と、前記アクセス信号が出力されている
のに前記チップセレクト信号が出力されていないときに
これを検出してチップセレクト異常信号を前記中央処理
装置に送出するチップセレクト異常信号発生手段と、前
記アドレス異常信号又は前記チップセレクト異常信号を
受けたときに前記アドレス信号で指定されたアドレスを
一時保持するアドレス保持手段と、前記アドレス異常信
号及び前記チップセレクト異常信号を一時記憶する記憶
手段と、を備えることを特徴とするものである。
In order to achieve the above object, a program runaway detecting apparatus according to a first aspect of the present invention monitors an address signal sent from a central processing unit, and assigns nothing to the address signal. Address abnormal signal generating means for detecting an address in an unspecified address space and sending an address abnormal signal to the central processing unit, and selecting a predetermined device based on the address signal For outputting the chip select signal, an access signal generating means for detecting the output of the address signal and outputting an access signal, and the chip select signal even if the access signal is output. Chip that detects this when it is not output and sends a chip select abnormality signal to the central processing unit Rect abnormal signal generating means, address holding means for temporarily holding the address designated by the address signal when the address abnormal signal or the chip select abnormal signal is received, the address abnormal signal and the chip select abnormal signal And a storage means for temporarily storing.

【0006】請求項2記載の発明に係るプログラム暴走
検出装置は、請求項1記載の発明において、前記アドレ
ス異常信号発生手段、前記アドレスデコーダ、前記アク
セス信号発生手段、及び前記チップセレクト異常信号発
生手段を一つのPLDに組み込んだことを特徴とするも
のである。
A program runaway detecting apparatus according to a second aspect of the present invention is the program runaway detecting apparatus according to the first aspect of the invention, wherein the address abnormality signal generating means, the address decoder, the access signal generating means, and the chip select abnormality signal generating means. Is incorporated into one PLD.

【0007】請求項3記載の発明に係るプログラム暴走
検出装置は、中央処理装置から送出されたアドレス信号
を監視し、前記アドレス信号が何も割り当てられていな
いアドレス空間内のアドレスを指定しているときにこれ
を検出してアドレス異常信号を前記中央処理装置に送出
するアドレス異常信号発生手段と、前記アドレス異常信
号を受けたときに前記アドレス信号で指定されたアドレ
スを一時保持するアドレス保持手段と、を備えることを
特徴とするものである。
A program runaway detecting apparatus according to a third aspect of the present invention monitors an address signal sent from a central processing unit and designates an address within an address space to which no address signal is assigned. Occasionally, an address abnormality signal generating means for detecting this and sending an address abnormality signal to the central processing unit, and an address holding means for temporarily holding an address designated by the address signal when receiving the address abnormality signal , Are provided.

【0008】請求項4記載の発明に係るプログラム暴走
検出装置は、中央処理装置から送出されたアドレス信号
に基づいて所定のデバイスを選択するためのチップセレ
クト信号を出力するアドレスデコーダと、前記アドレス
信号が出力されたことを検出してアクセス信号を出力す
るアクセス信号発生手段と、前記アクセス信号が出力さ
れているのに前記チップセレクト信号が出力されていな
いときにこれを検出してチップセレクト異常信号を前記
中央処理装置に送出するチップセレクト異常信号発生手
段と、前記チップセレクト異常信号を受けたときに前記
アドレス信号で指定されたアドレスを一時保持するアド
レス保持手段と、を備えることを特徴とするものであ
る。
According to another aspect of the program runaway detecting apparatus of the present invention, an address decoder for outputting a chip select signal for selecting a predetermined device based on the address signal sent from the central processing unit, and the address signal. Is output and an access signal is output, and a chip select abnormality signal is detected when the access signal is output but the chip select signal is not output. To the central processing unit, and an address holding unit that temporarily holds the address designated by the address signal when the chip select abnormal signal is received. It is a thing.

【0009】請求項5記載の発明に係るプログラム暴走
検出装置は、請求項1、2、3又は4記載の発明におい
て、前記アドレス異常信号又は前記チップセレクト異常
信号を受けたときに警報を発する警報手段を備えること
を特徴とするものである。
According to a fifth aspect of the present invention, there is provided a program runaway detection apparatus which, in the first, second, third or fourth aspect of the present invention, issues an alarm when the address abnormality signal or the chip select abnormality signal is received. It is characterized by comprising means.

【0010】[0010]

【作用】請求項1記載の発明は前記の構成によって、ア
ドレス信号を監視しアドレス信号が何も割り当てられて
いないアドレス空間内のアドレスを指定しているときに
これを検出してアドレス異常信号を送出するアドレス異
常信号発生手段と、アクセス信号発生手段からのアクセ
ス信号が出力されているのにアドレスデコーダからのチ
ップセレクト信号が出力されていないときにこれを検出
してチップセレクト異常信号を送出するチップセレクト
異常信号発生手段とを有することにより、従来のウォッ
チドッグタイマを用いる場合に比べて、異常が発生した
ことを迅速に検出することができる。また、記憶手段で
アドレス異常信号とチップセレクト異常信号を一時記憶
しておくことにより、異常の原因が中央処理装置の側に
あるのか、又はアドレスデコーダの側にあるのかを特定
することができる。更に、アドレス保持手段が、アドレ
ス異常信号又はチップセレクト異常信号を受けたときに
アドレス信号で指定されたアドレスを一時保持すること
により、このアドレスを、誤動作の原因を特定するため
の情報として利用することができる。
According to the invention described in claim 1, the address signal is monitored, and when an address in the address space to which no address signal is assigned is designated, this is detected to generate an address abnormality signal. The address abnormal signal generating means for sending and the access signal from the access signal generating means are output, but when the chip select signal from the address decoder is not output, this is detected and the chip select abnormal signal is sent. By including the chip select abnormality signal generating means, it is possible to detect that an abnormality has occurred more quickly than in the case of using a conventional watchdog timer. Further, by temporarily storing the address abnormality signal and the chip select abnormality signal in the storage means, it is possible to specify whether the cause of the abnormality is the central processing unit side or the address decoder side. Further, when the address holding means temporarily holds the address designated by the address signal when receiving the address abnormal signal or the chip select abnormal signal, this address is used as information for specifying the cause of the malfunction. be able to.

【0011】請求項2記載の発明は前記の構成によっ
て、アドレス異常信号発生手段、アドレスデコーダ、ア
クセス信号発生手段、及びチップセレクト異常信号発生
手段を一つのPLDに組み込んだことにより、簡単に所
望の回路を構成することができる。
According to a second aspect of the present invention, the address abnormal signal generating means, the address decoder, the access signal generating means, and the chip select abnormal signal generating means are incorporated in one PLD by the above configuration, so that the desired signal can be easily obtained. A circuit can be constructed.

【0012】請求項3記載の発明は前記の構成によっ
て、アドレス信号を監視しアドレス信号が何も割り当て
られていないアドレス空間内のアドレスを指定している
ときにこれを検出してアドレス異常信号を送出するアド
レス異常信号発生手段を有することにより、中央処理装
置のプログラムの異常や、中央処理装置から送られるア
ドレスに異常が発生したことを迅速に検出することがで
きる。また、アドレス保持手段がアドレス異常信号を受
けたときにアドレス信号で指定されたアドレスを一時保
持することにより、このアドレスを、誤動作の原因を特
定するための情報として利用することができる。
According to the third aspect of the present invention, the address signal is monitored, and when an address in an address space to which no address signal is assigned is designated, this is detected to generate an address abnormality signal. By including the address abnormality signal generating means for transmitting, it is possible to quickly detect the abnormality of the program of the central processing unit or the abnormality of the address transmitted from the central processing unit. Further, by temporarily holding the address designated by the address signal when the address holding means receives the address abnormality signal, this address can be used as information for identifying the cause of the malfunction.

【0013】請求項4記載の発明は前記の構成によっ
て、アクセス信号発生手段からのアクセス信号が出力さ
れているのにアドレスデコーダからのチップセレクト信
号が出力されていないときにこれを検出してチップセレ
クト異常信号を送出するチップセレクト異常信号発生手
段を有することにより、中央処理装置のプログラムの異
常や、中央処理装置又はアドレスデコーダの故障が発生
したことを迅速に検出することができる。また、アドレ
ス保持手段がチップセレクト異常信号を受けたときにア
ドレス信号で指定されたアドレスを一時保持することに
より、このアドレスを、誤動作の原因を特定するための
情報として利用することができる。
According to the invention described in claim 4, when the access signal from the access signal generating means is output but the chip select signal from the address decoder is not output, the chip is detected by the above structure. By having the chip select abnormality signal generating means for transmitting the select abnormality signal, it is possible to quickly detect the abnormality of the program of the central processing unit or the failure of the central processing unit or the address decoder. Further, by temporarily holding the address designated by the address signal when the address holding means receives the chip select abnormality signal, this address can be used as information for identifying the cause of the malfunction.

【0014】請求項5記載の発明は前記の構成によっ
て、アドレス異常信号又はチップセレクト異常信号を受
けたときに警報を発する警報手段を設けたことにより、
異常が発生したことをオペレータに容易に知らせること
ができる。
According to the fifth aspect of the present invention, by the above configuration, the alarm means for issuing an alarm when the address abnormal signal or the chip select abnormal signal is received is provided.
The operator can easily be notified that an abnormality has occurred.

【0015】[0015]

【実施例】以下に本発明の第一実施例について図面を参
照して説明する。図1は本発明の第一実施例であるプロ
グラム暴走検出装置の概略構成図、図2はCPUのアド
レス空間に各デバイスを割り当てたメモリマップを示す
図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A first embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic configuration diagram of a program runaway detection apparatus according to a first embodiment of the present invention, and FIG. 2 is a diagram showing a memory map in which each device is assigned to a CPU address space.

【0016】第一実施例のプログラム暴走検出装置は、
図1に示すように、CPU32と二つのメモリ、RAM
(たとえばSRAM)34及びROM(たとえばEPR
OM)36との間でデータを転送する際に、プログラム
の暴走を検出するものであり、アドレスデコーダ部12
と、インバータ回路14と、アドレスラッチ回路16
と、ラッチ回路18と、警報手段としての発光ダイオー
ド(LED)22とを備える。
The program runaway detecting device of the first embodiment is
As shown in FIG. 1, a CPU 32, two memories, and a RAM
(Eg SRAM) 34 and ROM (eg EPR
OM) 36, which detects runaway of the program when transferring data to and from the address decoder unit 12
Inverter circuit 14 and address latch circuit 16
A latch circuit 18, and a light emitting diode (LED) 22 as an alarm means.

【0017】一般に、RAM34やROM36等の周辺
の汎用デバイスはCPU32のプログラムにおける命令
に使用されるアドレスにマッピングされている。第一実
施例では、RAM34とROM36との合計二つのデバ
イスをCPU32のアドレス空間に割り当てており、こ
のときのメモリマップを図2に示す。CPU32には1
Mバイトのメモリの空間があり、RAM34とROM3
6はそれぞれ256kバイトの記憶容量があるとする。
00000hから3FFFFhまでのメモリ領域をRA
M34に割り当て、C0000hからFFFFFhまで
のメモリ領域をROM36に割り当てている。そして、
40000hからBFFFFhまでのメモリ領域は何も
割り当てられていない非実装エリアである。ここで、
「h」は、16進表記であることを示すものである。
Generally, peripheral general-purpose devices such as the RAM 34 and the ROM 36 are mapped to addresses used for instructions in the program of the CPU 32. In the first embodiment, a total of two devices, RAM 34 and ROM 36, are assigned to the address space of the CPU 32, and the memory map at this time is shown in FIG. 1 for CPU 32
There is a memory space of M bytes, RAM34 and ROM3
Each 6 has a storage capacity of 256 kbytes.
RA for the memory area from 00000h to 3FFFFh
The memory area from C0000h to FFFFFh is assigned to the ROM 36. And
The memory area from 40000h to BFFFFh is a non-implementation area to which nothing is assigned. here,
“H” indicates that it is in hexadecimal notation.

【0018】また、図1において、アドレスバス42
は、CPU32がメモリにアクセスする際にそのアドレ
スを指定するための信号線であり、CPU32からアド
レスデコーダ部12、アドレスラッチ回路16等に接続
されている。データバス44は、データを転送するため
の信号線であり、アドレスラッチ回路16やCPU32
等に接続されている。尚、図1において、RAM34や
ROM36へのアドレスバスやデータバスについては省
略している。
Further, in FIG. 1, the address bus 42 is
Is a signal line for designating an address when the CPU 32 accesses the memory, and is connected from the CPU 32 to the address decoder unit 12, the address latch circuit 16, and the like. The data bus 44 is a signal line for transferring data, and includes the address latch circuit 16 and the CPU 32.
Etc. are connected to. Incidentally, in FIG. 1, an address bus and a data bus to the RAM 34 and the ROM 36 are omitted.

【0019】アドレスデコーダ部12は、CPU32か
らのアドレス信号をデコードすると共に、そのアドレス
信号に基づいてアクセスすべきRAM34又はROM3
6を選択するチップセレクト信号(バーCS1 信号、バ
ーCS2 信号)を発生するものである。ここでは、RA
M34を選択するためにバーCS1 信号を、ROM36
を選択するためにバーCS2 信号を送出する。原則的に
は、一のサイクルタイムに一つのデバイスしかアクセス
することができないため、バーCS1 信号とバーCS2
信号は同時にローレベルにはならない。第一実施例で
は、アドレスバス42を同期式としており、CPU32
からはサイクルの監視を示すストローブ信号(バーAD
S信号)が出力される。そして、アドレスデコーダ部1
2から最終的にレディ信号(バーREADY信号)を出
力することにより一つのサイクルが完結する。なお、レ
ディ信号発生回路から別部分として発生させてもよい。
アドレスデコーダ部12は、バーADS信号を受けたと
きに、どこのアドレスを指定しているのかをアドレス信
号で調べ、そのアドレス信号に基づいてバーCS1 信号
又はバーCS2 信号を作る。これにより、CPU32か
ら出されたアドレスが、RAM34及びROM36のい
ずれか一方のアドレスに一意的に割り当てられる。
The address decoder unit 12 decodes the address signal from the CPU 32 and, at the same time, accesses the RAM 34 or the ROM 3 based on the address signal.
A chip select signal (bar CS 1 signal, bar CS 2 signal) for selecting 6 is generated. Here, RA
The bar CS 1 signal is sent to the ROM 36 to select M34.
It sends the bar CS 2 signal to select. Because the principle, it is impossible to only one device access to one of the cycle time, the bar CS 1 signal and a bar CS 2
The signals do not go low at the same time. In the first embodiment, the address bus 42 is of a synchronous type, and the CPU 32
From the strobe signal (bar AD
S signal) is output. The address decoder unit 1
One cycle is completed by finally outputting the ready signal (bar READY signal) from 2. It may be generated as a separate part from the ready signal generating circuit.
When the address decoder unit 12 receives the bar ADS signal, it checks which address is designated by the address signal and produces the bar CS 1 signal or the bar CS 2 signal based on the address signal. As a result, the address issued from the CPU 32 is uniquely assigned to one of the RAM 34 and the ROM 36.

【0020】ところで、CPU32は、通常、RAM3
4又はROM36が割り当てられたメモリ領域にアクセ
スしに行くが、もしCPU32のプログラムが誤ってい
たり、CPU32に間欠故障や固定故障が起こったりす
ると、何も割り当てられていない非実装エリアにアクセ
スがされることがある。この場合、当然のことながら、
バーCS1 信号もバーCS2 信号も出力されないので、
メモリからデータが取り込まれないことになる。する
と、データが不定であるため、誤った状態を読み込んで
しまい、プログラムが暴走することになる。そこで、第
一実施例では、アドレスデコーダ部12に、CPU32
から送出されたアドレス信号を監視し、そのアドレス信
号が何も割り当てられていないアドレス空間内のアドレ
スを指定しているときにこれを検出してアドレス異常信
号(バーNGCS1 信号)を送出するアドレス異常信号
発生手段としての機能を持たせている。このため、アド
レスデコーダ部12としては、かかるアドレス異常信号
を出すための論理回路を組み込んだPLD(Programabl
e Logic Device)を使用している。バーNGCS1 信号
は、インバータ回路14、アドレスラッチ回路16、及
びラッチ回路18に出力される。
By the way, the CPU 32 normally operates in the RAM 3
4 or the ROM 36 accesses the allocated memory area, but if the program of the CPU 32 is incorrect, or if the CPU 32 has an intermittent failure or a fixed failure, the unimplemented area to which nothing is allocated is accessed. Sometimes. In this case, of course,
Since neither the bar CS 1 signal nor the bar CS 2 signal is output,
No data will be fetched from memory. Then, since the data is undefined, the wrong state is read, and the program runs out of control. Therefore, in the first embodiment, the address decoder unit 12 includes the CPU 32.
Monitoring the address signals sent from, and sends the detection to address the abnormality signal (bar NGCS 1 signal) this when specifying the address in the address space of the address signal is not anything assigned address It has a function as an abnormal signal generating means. For this reason, the address decoder unit 12 includes a PLD (Programabl) that incorporates a logic circuit for outputting the address abnormality signal.
e Logic Device) is being used. The bar NGCS 1 signal is output to the inverter circuit 14, the address latch circuit 16, and the latch circuit 18.

【0021】インバータ回路14は、バーNGCS1
号を反転させるものであり、正論理のNGCS1 信号に
する。CPU32は、インバータ回路14からハイレベ
ルのNGCS1 信号が入力すると、プログラムの暴走が
発生したと判定して、マスク不可能割込み(NMI(no
nmaskable interrupt ))もしくは通常の割込み(マス
ク可能)をかけ、所定の割込み処理を行う。
The inverter circuit 14 inverts the bar NGCS 1 signal and converts it into a positive logic NGCS 1 signal. When the high level NGCS 1 signal is input from the inverter circuit 14, the CPU 32 determines that a program runaway has occurred and determines that a non-maskable interrupt (NMI (no
nmaskable interrupt)) or a normal interrupt (maskable) and apply the specified interrupt processing.

【0022】また、アドレスラッチ回路16は、アドレ
スデコーダ部12からのバーNGCS1 信号がローレベ
ルになったときにアドレス信号で指定されたアドレスを
一時保持するものである。このアドレスラッチ回路16
に記憶された不正なアドレスは、CPU32のNMI処
理時に読み込まれ、CPU32が誤動作の原因を特定す
るための情報として利用される。
The address latch circuit 16 temporarily holds the address designated by the address signal when the NGCS 1 signal from the address decoder section 12 becomes low level. This address latch circuit 16
The illegal address stored in is read at the time of the NMI processing of the CPU 32 and is used as information for the CPU 32 to identify the cause of the malfunction.

【0023】ラッチ回路18は、アドレスデコーダ部1
2からのバーNGCS1 信号がローレベルになったとき
に、ラッチをかけるものである。このとき、ラッチ回路
18の出力がLED22に供給され、LED22は点灯
する。LED22を設けたことにより、異常が発生した
ことをオペレータに容易に知らせることができる。
The latch circuit 18 includes the address decoder section 1
It latches when the bar NGCS 1 signal from 2 goes low. At this time, the output of the latch circuit 18 is supplied to the LED 22, and the LED 22 lights up. By providing the LED 22, it is possible to easily notify the operator that an abnormality has occurred.

【0024】次に、第一実施例のプログラム暴走検出装
置の動作について図3及び図4を用いて説明する。図3
は各信号のタイミングを説明するための図、図4はアド
レスデコーダ部12の状態をステートマシン表記で示し
た図(状態遷移図)である。ここで、図4において、
「ST1」はバーNGCS1 信号がハイレベルであるア
ドレスデコーダ部12の出力状態を表し、「ST0」は
バーNGCS1 信号がローレベルであるアドレスデコー
ダ部12の出力状態を表す。また、「!」は否定を、
「&」は論理積を示す。
Next, the operation of the program runaway detecting apparatus of the first embodiment will be described with reference to FIGS. 3 and 4. FIG.
4 is a diagram for explaining the timing of each signal, and FIG. 4 is a diagram (state transition diagram) showing the state of the address decoder unit 12 in a state machine notation. Here, in FIG.
“ST1” represents the output state of the address decoder unit 12 in which the bar NGCS 1 signal is high level, and “ST0” represents the output state of the address decoder unit 12 in which the bar NGCS 1 signal is low level. Also, "!" Means negative
"&" Indicates a logical product.

【0025】まず、バーADS信号がローレベルになる
と、サイクルが開始される。このサイクルが開始される
ときには、アドレスデコーダ部12はST1の状態にあ
る。このとき、アドレスデコーダ部12は、クロックの
最初の立ち上がり時に、アドレス信号が非実装エリアを
指定しているかどうかを調べる。すなわち、バーADS
信号がローレベルで且つアドレスが40000hからB
FFFFhまでの間のメモリ領域を指し示している(条
件A)ならば、アドレスが非実装エリアを指し示してい
ると判定し、アドレスデコーダ部12は、ST1の状態
からST0の状態に遷移する。一方、条件Aが満たされ
なければ、そのままST1の状態に留まる。また、アド
レスデコーダ部12がST0の状態にあるときに、バー
READY信号がローレベルである(条件B)ならば、
ST0の状態からST1の状態に遷移し、次のサイクル
に備えることになる。一方、条件Bが満たされなけれ
ば、そのままST0の状態に留まる。
First, when the bar ADS signal becomes low level, the cycle is started. When this cycle is started, the address decoder section 12 is in the ST1 state. At this time, the address decoder unit 12 checks at the first rising edge of the clock whether the address signal specifies the non-mounting area. That is, the bar ADS
Signal is low level and address is 40000h to B
If it points to the memory area up to FFFFh (condition A), it is determined that the address points to the non-mounting area, and the address decoder unit 12 transits from the state of ST1 to the state of ST0. On the other hand, if the condition A is not satisfied, the state of ST1 remains as it is. If the READY signal is low level (condition B) when the address decoder unit 12 is in the ST0 state,
The state of ST0 transits to the state of ST1 to prepare for the next cycle. On the other hand, if the condition B is not satisfied, the state of ST0 remains as it is.

【0026】尚、バーNGCS1 信号をローレベルから
ハイレベルに帰す方法としては、必ずしもバーREAD
Y信号を用いて帰す必要はない。たとえば、バーNGC
1信号は、外部でNMI処理又は割込アクノリッジ・
サイクルが発生するまで保持しておかなければ、割り込
みを正常に認識できないCPU等もある。この場合に
は、バーNGCS1 信号はNMI処理もしくは割込み処
理が行われたときに帰してやるようにすればよい。
As a method of returning the bar NGCS 1 signal from the low level to the high level, the bar READ is not always required.
It is not necessary to use the Y signal to return. For example, bar NGC
The S 1 signal is externally NMI processed or interrupt acknowledge /
Some CPUs or the like cannot normally recognize an interrupt unless they are held until a cycle occurs. In this case, the bar NGCS 1 signal may be returned when NMI processing or interrupt processing is performed.

【0027】第一実施例のプログラム暴走検出装置で
は、アドレスデコーダ部が、CPUから送出されたアド
レス信号を監視し、アドレスが非実装エリアを指し示し
ているときにこれを検出してバーNGCS1 信号を送出
することにより、このバーNGCS1 信号が発生した場
合には、CPUから送られるアドレスに異常が発生し、
プログラムが暴走したと判定することができる。しか
も、アドレス信号を直接監視しているため、従来のウォ
ッチドッグタイマを用いる場合のように専用のプログラ
ムを必要とせず、異常が発生したことを迅速に検出する
ことができる。また、アドレスラッチ回路において、バ
ーNGCS1 信号が発生したときの不正なアドレスを一
時保持しておくことにより、この不正なアドレスを、C
PUの割込み処理時に読み込んで、CPUが誤動作の原
因を特定するための情報として利用することができる。
また、この不正なアドレスに関する情報はデバッグ(de
bug )の際にも有効に利用することができる。
In the program runaway detecting apparatus of the first embodiment, the address decoder unit monitors the address signal sent from the CPU, detects this when the address points to the non-mounted area, and detects the bar NGCS 1 signal. If this bar NGCS 1 signal is generated by sending out, an error occurs in the address sent from the CPU,
You can determine that the program has runaway. Moreover, since the address signal is directly monitored, it is possible to quickly detect the occurrence of an abnormality without requiring a dedicated program as in the case of using a conventional watchdog timer. Further, in the address latch circuit, the illegal address when the NGCS 1 signal is generated is temporarily held, so that the illegal address is
It can be read during PU interrupt processing and used as information for the CPU to identify the cause of malfunction.
Also, information about this illegal address can be found in the debug (de
It can also be used effectively in the case of a bug).

【0028】次に、本発明の第二実施例について図面を
参照して説明する。図5は本発明の第二実施例であるプ
ログラム暴走検出装置の概略構成図である。
Next, a second embodiment of the present invention will be described with reference to the drawings. FIG. 5 is a schematic configuration diagram of a program runaway detecting device according to a second embodiment of the present invention.

【0029】第二実施例のプログラム暴走検出装置は、
図5に示すように、アドレスデコーダ部52と、AND
回路54と、アドレスラッチ回路56とを備えるもので
ある。尚、第二実施例において、上記第一実施例と同様
の機能を有するものには同一の符号を付すことにより、
その詳細な説明を省略する。また、RAM34とROM
36のアドレスはCPU32のアドレス空間に図2と同
様に割り当てられているとする。
The program runaway detecting device of the second embodiment is
As shown in FIG. 5, the address decoder unit 52 and the AND
The circuit 54 and the address latch circuit 56 are provided. In the second embodiment, the same reference numerals are given to those having the same functions as those in the first embodiment,
Detailed description thereof will be omitted. RAM34 and ROM
It is assumed that the address of 36 is assigned to the address space of the CPU 32 as in FIG.

【0030】アドレスデコーダ部52は、CPU32か
らのアドレス信号をデコードすると共に、そのアドレス
信号に基づいてアクセスすべきRAM34又はROM3
6を選択するチップセレクト信号(バーCS1 信号、バ
ーCS2 信号)を発生するものである。また、このアド
レスデコーダ部52は、アドレス信号が出力されたこと
を検出してアクセス信号(ACS信号)を出力するアク
セス信号発生手段としての機能をも有する。このため、
このアドレスデコーダ部52としては、アクセス信号を
出すための論理回路を組み込んだPLDを使用してい
る。
The address decoder section 52 decodes the address signal from the CPU 32 and, at the same time, accesses the RAM 34 or the ROM 3 to be accessed based on the address signal.
A chip select signal (bar CS 1 signal, bar CS 2 signal) for selecting 6 is generated. The address decoder unit 52 also has a function as an access signal generation unit that detects that an address signal is output and outputs an access signal (ACS signal). For this reason,
As the address decoder section 52, a PLD incorporating a logic circuit for issuing an access signal is used.

【0031】AND回路54には、ACS信号、バーC
1 信号及びバーCS2 信号を入力する。このAND回
路54は、ACS信号が出力されているのにバーCS1
信号又はバーCS2 信号が出力されていないときにこれ
を検出してチップセレクト異常信号(NGCS2 信号)
を送出するチップセレクト異常信号発生手段としての役
割を果たす。AND回路54は、ACS信号、バーCS
1 信号及びバーCS2信号のすべてがハイレベルである
ときのみ、NGCS2 信号がハイレベルとなる。したが
って、アクセスが開始されたが、RAM34及びROM
36のいずれも選択されていないときには、アドレスに
異常が発生したと判定することができる。このNGCS
2 信号は、CPU32及びアドレスラッチ回路56に出
力される。
The AND circuit 54 has an ACS signal and a bar C.
Input the S 1 signal and the CS 2 signal. The AND circuit 54, bar CS 1 to ACS signal is outputted
Signal or bar CS 2 signal is not output, this is detected to detect a chip select error signal (NGCS 2 signal)
To serve as a chip select abnormality signal generating means. The AND circuit 54 outputs the ACS signal and the CS signal.
Only when all of the 1 signal and the bar CS 2 signal is high level, NGCS 2 signal becomes high level. Therefore, access is started, but RAM 34 and ROM
When none of 36 is selected, it can be determined that an error has occurred in the address. This NGCS
The two signals are output to the CPU 32 and the address latch circuit 56.

【0032】CPU32は、AND回路54からのハイ
レベルのNGCS2 信号が入力すると、NMIをかけ、
所定の割込み処理を行う。また、アドレスラッチ回路5
6は、AND回路54からのNGCS2 信号がハイレベ
ルになったときに、アドレスバス42からの不正なアド
レス信号を一時保持するものである。
When the high level NGCS 2 signal from the AND circuit 54 is input, the CPU 32 applies NMI,
Perform predetermined interrupt processing. In addition, the address latch circuit 5
Reference numeral 6 temporarily holds an invalid address signal from the address bus 42 when the NGCS 2 signal from the AND circuit 54 becomes high level.

【0033】次に、第二実施例のプログラム暴走検出装
置の動作について図6及び図7を用いて説明する。図6
は各信号のタイミングを説明するための図、図7はアド
レスデコーダ部52の状態をステートマシン表記で示し
た図(状態遷移図)である。ここで、図7において、
「ST1」はACS信号がハイレベルであるアドレスデ
コーダ部52の出力状態を表し、「ST0」はACS信
号がローレベルであるアドレスデコーダ部52の出力状
態を表す。
Next, the operation of the program runaway detecting apparatus of the second embodiment will be described with reference to FIGS. 6 and 7. Figure 6
7 is a diagram for explaining the timing of each signal, and FIG. 7 is a diagram (state transition diagram) showing the state of the address decoder unit 52 in a state machine notation. Here, in FIG.
“ST1” represents the output state of the address decoder section 52 in which the ACS signal is at high level, and “ST0” represents the output state of the address decoder section 52 in which the ACS signal is at low level.

【0034】サイクルが開始されるときには、アドレス
デコーダ部52はST0の状態にある。このとき、バー
ADS信号がローレベルである(条件A)ならば、アド
レスデコーダ部52はST0の状態からST1の状態に
遷移する。一方、条件Aが満たされなければ、そのまま
ST0の状態に留まる。次に、アドレスデコーダ部52
がST1の状態にあるときに、バーCS1 信号及びバー
CS2 信号のいずれもハイレベルであると、AND回路
54からのNGCS2 信号はハイレベルになる。一方、
バーCS1 信号又はバーCS2 信号のいずれかがローレ
ベルであると、AND回路54からのNGCS2 信号は
ローレベルになる。また、アドレスデコーダ部52がS
T1の状態にあるときに、バーREADY信号がローレ
ベルである(条件B)ならば、ST1の状態からST0
の状態に遷移し、NGCS2 信号もローレベルとなり、
次のサイクルに備えることになる。一方、条件Bが満た
されなければ、そのままST1の状態に留まる。
When the cycle is started, the address decoder section 52 is in the ST0 state. At this time, if the bar ADS signal is at the low level (condition A), the address decoder unit 52 transits from the ST0 state to the ST1 state. On the other hand, if the condition A is not satisfied, the state of ST0 remains as it is. Next, the address decoder unit 52
There when in the state of the ST1, when none of the bars CS 1 signal and bars CS 2 signal is at the high level, NGCS 2 signal from the AND circuit 54 becomes high level. on the other hand,
When either the bar CS 1 signal or the bar CS 2 signal is low level, the NGCS 2 signal from the AND circuit 54 becomes low level. In addition, the address decoder unit 52 is S
In the state of T1, if the READY signal is at the low level (condition B), the state of ST1 changes to ST0.
And the NGCS 2 signal also goes low,
It will prepare for the next cycle. On the other hand, if the condition B is not satisfied, the state of ST1 remains as it is.

【0035】第二実施例のプログラム暴走検出装置で
は、アドレスデコーダ部からのACS信号が出力されて
いるのにバーCS1 信号及びバーCS2 信号のいずれも
出力されていないときにこれを検出してNGCS2 信号
を送出するチップセレクト異常信号発生手段(AND回
路)を有することにより、このNGCS2 信号が発生し
た場合には、CPUから送られるアドレスに異常が発生
し、プログラムが暴走したと判定することができる。し
かも、バーCS1 信号及びバーCS2 信号を直接監視し
ているため、異常が発生したことを迅速に検出すること
ができる。
[0035] In the program runaway detection apparatus of the second embodiment detects this when not in any of the bars CS 1 signal and bars CS 2 signal output for ACS signal from the address decoder is output By having the chip select abnormality signal generating means (AND circuit) for transmitting the NGCS 2 signal by means of the above, when this NGCS 2 signal is generated, it is determined that an abnormality has occurred in the address sent from the CPU and the program has run away can do. Moreover, since the bar CS 1 signal and the bar CS 2 signal are directly monitored, it is possible to quickly detect that an abnormality has occurred.

【0036】特に、第二実施例では、第一実施例の場合
と異なり、バーCS1 信号及びバーCS2 信号を監視し
て、間接的にアドレスが異常であるかどうかを判定して
いるため、アドレスデコーダ部の故障についてまで検出
することができ、異常検出の対象が第一実施例の場合に
比べて拡大する。すなわち、第一実施例の場合は、アド
レス信号を監視しており、バーCS1 信号及びバーCS
2 信号を監視していないので、アドレスデコーダ部自身
の異常については検出できない。第二実施例の場合は、
たとえば、CPU自身は正常なアドレスを出している
が、アドレスデコーダ部が故障し、バーCS1 信号又は
バーCS2 信号がハイレベルに固定してしまった場合
も、異常を検出することができる。
Particularly, in the second embodiment, unlike the case of the first embodiment, the bar CS 1 signal and the bar CS 2 signal are monitored to indirectly determine whether or not the address is abnormal. Even the failure of the address decoder unit can be detected, and the target of abnormality detection is expanded as compared with the case of the first embodiment. That is, in the case of the first embodiment, the address signal is monitored and the bar CS 1 signal and the bar CS signal are monitored.
Since the 2 signals are not monitored, the abnormality of the address decoder itself cannot be detected. In the case of the second embodiment,
For example, CPU itself has put a normal address, the address decoder unit fails, even if the bar CS 1 signal or bar CS 2 signal had been fixed at a high level, it is possible to detect the abnormality.

【0037】また、アドレスラッチ回路56において、
NGCS2 信号が発生したときの不正なアドレスを一時
保持しておくことにより、この不正なアドレスを、CP
Uの割込み処理時に読み込んで、CPUが誤動作の原因
を特定するための情報として利用することができる。
In the address latch circuit 56,
By temporarily holding the illegal address when the NGCS 2 signal is generated,
It can be read during U interrupt processing and used as information for the CPU to identify the cause of malfunction.

【0038】次に、本発明の第三実施例について図面を
参照して説明する。図8は本発明の第三実施例であるプ
ログラム暴走検出装置の概略構成図である。
Next, a third embodiment of the present invention will be described with reference to the drawings. FIG. 8 is a schematic configuration diagram of a program runaway detecting device according to a third embodiment of the present invention.

【0039】第三実施例のプログラム暴走検出装置は、
図8に示すように、アドレスデコーダ部62と、AND
回路64と、アドレスラッチ回路66と、OR回路68
と、LED72と、レジスタ部74とを備えるものであ
る。尚、第三実施例において、上記第一実施例と同様の
機能を有するものには同一の符号を付すことにより、そ
の詳細な説明を省略する。また、RAM34とROM3
6のアドレスはCPU32のアドレス空間に図2と同様
に割り当てられているとする。
The program runaway detecting device of the third embodiment is
As shown in FIG. 8, the address decoder 62 and the AND
Circuit 64, address latch circuit 66, and OR circuit 68
The LED 72 and the register section 74 are provided. In the third embodiment, those having the same functions as those in the first embodiment are designated by the same reference numerals, and detailed description thereof will be omitted. In addition, RAM34 and ROM3
It is assumed that the address 6 is assigned to the address space of the CPU 32 as in FIG.

【0040】アドレスデコーダ部62は、CPU32か
らのアドレス信号をデコードすると共に、そのアドレス
信号に基づいてアクセスすべきRAM34又はROM3
6を選択するチップセレクト信号(バーCS1 信号、バ
ーCS2 信号)を発生するものである。このアドレスデ
コーダ部62は、CPU32から送出されたアドレス信
号を監視し、そのアドレス信号が何も割り当てられてい
ないアドレス空間内のアドレスを指定しているときにこ
れを検出してアドレス異常信号(NGCS1 信号)を送
出するアドレス異常信号発生手段としての機能と、アド
レス信号が出力されたことを検出してアクセス信号(A
CS信号)を出力するアクセス信号発生手段としての機
能とを有する。このため、このアドレスデコーダ62と
しては、アドレス異常信号及びアクセス信号を出すため
の論理回路を組み込んだPLDを使用している。NGC
1 信号は、OR回路68及びレジスタ部74に出力さ
れ、ACS信号は、AND回路64に出力される。
The address decoder unit 62 decodes the address signal from the CPU 32 and, at the same time, accesses the RAM 34 or ROM 3 to be accessed based on the address signal.
A chip select signal (bar CS 1 signal, bar CS 2 signal) for selecting 6 is generated. The address decoder unit 62 monitors the address signal sent from the CPU 32, detects this when the address signal designates an address in an address space to which nothing is assigned, and detects the address abnormal signal (NGCS). Function as an address abnormal signal generating means for sending out 1 signal), and the access signal (A
And a function as an access signal generating means for outputting a CS signal). Therefore, as this address decoder 62, a PLD incorporating a logic circuit for issuing an address abnormality signal and an access signal is used. NGC
The S 1 signal is output to the OR circuit 68 and the register unit 74, and the ACS signal is output to the AND circuit 64.

【0041】AND回路64には、ACS信号、バーC
1 信号及びバーCS2 信号が入力する。AND回路6
4は、ACS信号が出力されているのにバーCS1 信号
又はバーCS2 信号が出力されていないときにこれを検
出してチップセレクト異常信号(NGCS2 信号)を送
出するチップセレクト異常信号発生手段としての役割を
果たす。NGCS2 信号は、OR回路68及びレジスタ
部74に出力される。
The AND circuit 64 has an ACS signal and a bar C.
The S 1 signal and the bar CS 2 signal are input. AND circuit 6
4, the chip select and sends the detection to the chip select abnormal signal (NGCS 2 signal) it when the bar CS 1 signal or bar CS 2 signal is not output to ACS signal is output abnormality signal generator Play a role as a means. The NGCS 2 signal is output to the OR circuit 68 and the register unit 74.

【0042】OR回路68は、NGCS1 信号及びNG
CS2 信号のいずれかがハイレベルとなると、異常が発
生したと判定して、CPU32に信号を送るものであ
る。CPU32は、OR回路68からの信号を受ける
と、NMIをかけ、所定の割込み処理を行う。また、ア
ドレスラッチ回路66は、OR回路68からの出力がハ
イレベルになったときに、アドレスバス42からの不正
なアドレス信号を一時保持するものである。
The OR circuit 68 uses the NGCS 1 signal and the NGCS signal.
When any of the CS 2 signals becomes high level, it is determined that an abnormality has occurred and a signal is sent to the CPU 32. When receiving the signal from the OR circuit 68, the CPU 32 applies NMI and performs a predetermined interrupt process. Further, the address latch circuit 66 temporarily holds an invalid address signal from the address bus 42 when the output from the OR circuit 68 becomes high level.

【0043】レジスタ部74は、NGCS1 信号とNG
CS2 信号の出力を一時記憶するものである。CPU3
2は、このレジスタ部74に記憶された情報をNMI処
理時に読み込むことにより、アドレス信号が異常である
のか、チップセレクト信号が異常であるのかを識別する
ことができる。図9にNGCS1 信号及びNGCS2
号の出力に基づいて異常の原因を特定するためのロジッ
クを示す。NGCS1信号とNGCS2 信号とが共にハ
イレベルである場合には、アドレス信号が異常であると
判定される。この場合、NGCS2 信号がハイレベルと
なっているのは、NGCS1 信号がハイレベルであるこ
とに起因するものと考えられる。アドレス信号が異常と
なる原因としては、CPU32のプログラムに誤りがあ
るか、CPU32自身のアドレスの出力がローレベル又
はハイレベルに固定されていることが考えられるので、
プログラム上何ら問題がなければ、CPU32を交換す
る必要がある。また、NGCS1 信号がハイレベルで、
NGCS2 信号がローレベルである場合、又はNGCS
1 信号がローレベルで、NGCS2 信号がハイレベルで
ある場合には、チップセレクト信号が異常であると判定
される。チップセレクト信号が異常となる原因として
は、アドレスデコーダ部62からのバーCS1信号又は
バーCS2 信号の出力がローレベル又はハイレベルに固
定されていることが考えられるので、この場合は、アド
レスデコーダ部62を交換する必要がある。但し、NG
CS1 信号がハイレベルで、NGCS2 信号がローレベ
ルとなる可能性は、ほとんどないと思われる。そして、
NGCS1 信号とNGCS2 信号とが共にローレベルで
ある場合は、正常であると判定される。
The register section 74 receives the NGCS 1 signal and NGCS signal.
The output of the CS 2 signal is temporarily stored. CPU3
2 can identify whether the address signal is abnormal or the chip select signal is abnormal by reading the information stored in the register unit 74 during the NMI processing. FIG. 9 shows a logic for identifying the cause of the abnormality based on the outputs of the NGCS 1 signal and the NGCS 2 signal. When both the NGCS 1 signal and the NGCS 2 signal are high level, it is determined that the address signal is abnormal. In this case, the high level of the NGCS 2 signal is considered to be due to the high level of the NGCS 1 signal. The reason why the address signal becomes abnormal is that there is an error in the program of the CPU 32 or the output of the address of the CPU 32 itself is fixed at low level or high level.
If there is no problem in the program, it is necessary to replace the CPU 32. Also, when the NGCS 1 signal is high level,
If the NGCS 2 signal is low level, or if the NGCS
When the 1 signal is low level and the NGCS 2 signal is high level, it is determined that the chip select signal is abnormal. The reason why the chip select signal becomes abnormal is that the output of the bar CS 1 signal or the bar CS 2 signal from the address decoder unit 62 is fixed at a low level or a high level. It is necessary to replace the decoder unit 62. However, NG
It is unlikely that the CS 1 signal will be high and the NGCS 2 signal will be low. And
When both the NGCS 1 signal and the NGCS 2 signal are low level, it is determined to be normal.

【0044】また、レジスタ部74は、NGCS1 信号
又はNGCS2 信号がハイレベルになったときに、信号
を出力し、LED72を点灯する。このLED72を設
けたことにより、特に、プログラムの開発を行っている
場合に、LED72が点灯すれば、アドレスのないとこ
ろにプログラムを作ってしまったということがわかる。
この場合、アドレスラッチ回路66に保持されたアドレ
スを読み取り、プログラム上にそのアドレスを指定した
部分がないかどうかを調べて、その部分のプログラムを
書き直すようにすれば、プログラムを容易に修正するこ
とができる。
Further, the register section 74 outputs a signal and turns on the LED 72 when the NGCS 1 signal or the NGCS 2 signal becomes high level. By providing the LED 72, it can be understood that the program is created in a place where there is no address, especially when the LED 72 is turned on when the program is being developed.
In this case, if the address held in the address latch circuit 66 is read, it is checked whether there is a part in which the address is designated in the program, and the program of that part is rewritten, the program can be easily modified. You can

【0045】第三実施例のプログラム暴走検出装置で
は、CPUから送出されたアドレス信号を監視し、アド
レスが非実装エリアを指し示しているときにこれを検出
してNGCS1 信号を送出するアドレス異常信号発生手
段(アドレスデコーダ部)と、アドレスデコーダ部から
のACS信号が出力されているのにバーCS1 信号及び
バーCS2 信号のいずれも出力されていないときにこれ
を検出してNGCS2 信号を送出するチップセレクト異
常信号発生手段(AND回路)とを有することにより、
NGCS1 信号又はNGCS2 信号が発生した場合に
は、CPUから送られるアドレスに異常が発生し、プロ
グラムが暴走したと判定することができる。しかも、ア
ドレス信号及び、バーCS1 信号及びバーCS2 信号を
監視しているため、異常が発生したことを迅速に検出す
ることができる。
In the program runaway detecting apparatus of the third embodiment, the address signal sent from the CPU is monitored, and when the address indicates the non-mounting area, the address signal is detected and the NGCS 1 signal is sent out. and generating means (address decoder), a NGCS 2 signal by detecting this when none of the bars CS 1 signal and bars CS 2 signal for ACS signal from the address decoder is output not output By having the chip select abnormality signal generating means (AND circuit) for transmitting,
When the NGCS 1 signal or the NGCS 2 signal is generated, it can be determined that an error has occurred in the address sent from the CPU and the program has runaway. Moreover, since the address signal and the bar CS 1 signal and the bar CS 2 signal are monitored, it is possible to quickly detect that an abnormality has occurred.

【0046】また、レジスタ部でNGCS1 信号とNG
CS2 信号の出力を一時記憶しておくことにより、異常
の原因がCPUの側にあるのか、又はアドレスデコーダ
部の側にあるのかを特定することができる。更に、アド
レスラッチ回路において、NGCS1 信号又はNGCS
2 信号が発生したときの不正なアドレスを一時保持して
おくことにより、この不正なアドレスを、CPUの割込
み処理時に読み込んで、CPUが誤動作の原因を特定す
るための情報として利用することができる。
In the register section, the NGCS 1 signal and NGCS signal
By temporarily storing the output of the CS 2 signal, it is possible to specify whether the cause of the abnormality is on the CPU side or the address decoder section side. Furthermore, in the address latch circuit, the NGCS 1 signal or NGCS
By temporarily holding the illegal address when the 2 signal occurs, this illegal address can be read during interrupt processing of the CPU and used as information for the CPU to identify the cause of malfunction. .

【0047】尚、本発明は上記の各実施例に限定される
ものではなく、その要旨の範囲内において種々の変形が
可能である。たとえば、アドレスラッチ回路は一段では
なく、FIFO(first-in first-out)等で多段になる
ように構成してもよい。プログラムの暴走はNMI処理
により止められるが、アドレス異常信号又はチップセレ
クト異常信号が出力されてからでもアドレス信号が次か
ら次へと送られる可能性がある。この場合、アドレスラ
ッチ回路をたとえば三段又は四段に構成しておけば、そ
れぞれのステップで各アドレスを記憶することができ
る。
The present invention is not limited to the above embodiments, but various modifications can be made within the scope of the gist thereof. For example, the address latch circuit may be configured in multiple stages such as FIFO (first-in first-out) instead of one stage. The runaway of the program is stopped by the NMI processing, but there is a possibility that the address signals will be transmitted one after another even after the address abnormal signal or the chip select abnormal signal is output. In this case, if the address latch circuit is configured in, for example, three stages or four stages, each address can be stored in each step.

【0048】また、上記の各実施例では、CPUがアド
レス異常信号又はチップセレクト異常信号を受けたとき
に、NMI割込みをかける場合について説明したが、C
PUはマスク可能な通常の割込みをかけるようにしても
よい。
In each of the above embodiments, the case where the CPU issues an NMI interrupt when it receives an address abnormality signal or a chip select abnormality signal has been described.
The PU may also provide normal maskable interrupts.

【0049】更に、上記の第二実施例においてアドレス
デコーダ部52とAND回路54とを一つのPLDに組
み込んだり、また、上記の第三実施例においてアドレス
デコーダ部62とAND回路64とOR回路68とを一
つのPLDに組み込んだりしてもよい。これにより、簡
単に所望の回路を構成することができる。
Furthermore, the address decoder unit 52 and the AND circuit 54 are incorporated into one PLD in the second embodiment, and the address decoder unit 62, the AND circuit 64, and the OR circuit 68 in the third embodiment. And may be incorporated into one PLD. Thereby, a desired circuit can be easily configured.

【0050】[0050]

【発明の効果】以上説明したように請求項1記載の発明
によれば、アドレス信号を監視しアドレス信号が何も割
り当てられていないアドレス空間内のアドレスを指定し
ているときにこれを検出してアドレス異常信号を送出す
るアドレス異常信号発生手段と、アクセス信号発生手段
からのアクセス信号が出力されているのにアドレスデコ
ーダからのチップセレクト信号が出力されていないとき
にこれを検出してチップセレクト異常信号を送出するチ
ップセレクト異常信号発生手段とを有することにより、
従来のウォッチドッグタイマを用いる場合に比べて、異
常が発生したことを迅速に検出することができ、また、
記憶手段でアドレス異常信号とチップセレクト異常信号
を一時記憶しておくことにより、異常の原因が中央処理
装置の側にあるのか、又はアドレスデコーダの側にある
のかを特定することができると共に、アドレス保持手段
が、アドレス異常信号又はチップセレクト異常信号を受
けたときにアドレス信号で指定されたアドレスを一時保
持することにより、このアドレスを、誤動作の原因を特
定するための情報として利用することができるプログラ
ム暴走検出装置を提供することができる。
As described above, according to the first aspect of the invention, the address signal is monitored and detected when the address in the address space to which no address signal is assigned is designated. Address abnormal signal generating means for sending out an address abnormal signal by an address and the chip select signal is detected when the access signal is outputted from the access signal generating means but the chip select signal is not outputted from the address decoder. By having a chip select abnormality signal generating means for transmitting an abnormality signal,
Compared with the case of using the conventional watchdog timer, it is possible to detect the occurrence of an abnormality more quickly, and
By temporarily storing the address abnormality signal and the chip select abnormality signal in the storage means, it is possible to specify whether the cause of the abnormality is on the side of the central processing unit or the side of the address decoder. By temporarily holding the address designated by the address signal when the holding means receives the address abnormal signal or the chip select abnormal signal, this address can be used as information for identifying the cause of the malfunction. A program runaway detection device can be provided.

【0051】請求項2記載の発明によれば、アドレス異
常信号発生手段、アドレスデコーダ、アクセス信号発生
手段、及びチップセレクト異常信号発生手段を一つのP
LDに組み込んだことにより、簡単に所望の回路を構成
することができるプログラム暴走検出装置を提供するこ
とができる。
According to the second aspect of the invention, the address abnormality signal generating means, the address decoder, the access signal generating means, and the chip select abnormality signal generating means are combined into one P.
By incorporating it in the LD, it is possible to provide a program runaway detection device that can easily configure a desired circuit.

【0052】請求項3記載の発明によれば、アドレス信
号を監視しアドレス信号が何も割り当てられていないア
ドレス空間内のアドレスを指定しているときにこれを検
出してアドレス異常信号を送出するアドレス異常信号発
生手段を有することにより、中央処理装置から送られる
アドレスに異常が発生したことを迅速に検出することが
でき、また、アドレス保持手段がアドレス異常信号を受
けたときにアドレス信号で指定されたアドレスを一時保
持することにより、このアドレスを、誤動作の原因を特
定するための情報として利用することができるプログラ
ム暴走検出装置を提供することができる。
According to the third aspect of the invention, the address signal is monitored, and when an address in the address space to which no address signal is assigned is designated, this is detected and an address abnormality signal is sent out. By having the address abnormality signal generating means, it is possible to quickly detect the occurrence of an abnormality in the address sent from the central processing unit, and when the address holding means receives the address abnormality signal, it is designated by the address signal. By temporarily holding the generated address, it is possible to provide a program runaway detecting device that can use this address as information for identifying the cause of the malfunction.

【0053】請求項4記載の発明によれば、アクセス信
号発生手段からのアクセス信号が出力されているのにア
ドレスデコーダからのチップセレクト信号が出力されて
いないときにこれを検出してチップセレクト異常信号を
送出するチップセレクト異常信号発生手段を有すること
により、中央処理装置のプログラムの異常や、中央処理
装置又はアドレスデコーダの故障が発生したことを迅速
に検出することができ、また、アドレス保持手段がチッ
プセレクト異常信号を受けたときにアドレス信号で指定
されたアドレスを一時保持することにより、このアドレ
スを、誤動作の原因を特定するための情報として利用す
ることができるプログラム暴走検出装置を提供すること
ができる。
According to the fourth aspect of the invention, when the access signal from the access signal generating means is output but the chip select signal from the address decoder is not output, this is detected to detect a chip select abnormality. By having the chip select abnormality signal generating means for transmitting a signal, it is possible to quickly detect the abnormality of the program of the central processing unit or the failure of the central processing unit or the address decoder, and the address holding means. Provides a program runaway detection device that can use this address as information for identifying the cause of malfunction by temporarily holding the address specified by the address signal when the chip select abnormal signal is received by be able to.

【0054】請求項5記載の発明によれば、アドレス異
常信号又はチップセレクト異常信号を受けたときに警報
を発する警報手段を設けたことにより、異常が発生した
ことをオペレータに容易に知らせることができるプログ
ラム暴走検出装置を提供することができる。
According to the fifth aspect of the present invention, by providing the alarm means for issuing an alarm when the address abnormal signal or the chip select abnormal signal is received, it is possible to easily inform the operator that an abnormal condition has occurred. It is possible to provide a programmable runaway detecting device.

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

【図1】本発明の第一実施例であるプログラム暴走検出
装置の概略構成図である。
FIG. 1 is a schematic configuration diagram of a program runaway detection apparatus that is a first embodiment of the present invention.

【図2】CPUのアドレス空間に各デバイスを割り当て
たメモリマップを示す図である。
FIG. 2 is a diagram showing a memory map in which each device is assigned to an address space of a CPU.

【図3】各信号のタイミングを説明するための図であ
る。
FIG. 3 is a diagram for explaining the timing of each signal.

【図4】アドレスデコーダ部の状態をステートマシン表
記で示した図(状態遷移図)である。
FIG. 4 is a diagram (state transition diagram) showing states of an address decoder in state machine notation.

【図5】本発明の第二実施例であるプログラム暴走検出
装置の概略構成図である。
FIG. 5 is a schematic configuration diagram of a program runaway detection device that is a second embodiment of the present invention.

【図6】各信号のタイミングを説明するための図であ
る。
FIG. 6 is a diagram for explaining the timing of each signal.

【図7】アドレスデコーダ部の状態をステートマシン表
記で示した図(状態遷移図)である。
FIG. 7 is a diagram (state transition diagram) showing a state of an address decoder unit in a state machine notation.

【図8】本発明の第三実施例であるプログラム暴走検出
装置の概略構成図である。
FIG. 8 is a schematic configuration diagram of a program runaway detection apparatus that is a third embodiment of the present invention.

【図9】アドレス異常信号及びチップセレクト異常信号
の出力に基づいて異常の原因を特定するためのロジック
を示す図である。
FIG. 9 is a diagram showing a logic for identifying a cause of abnormality based on outputs of an address abnormality signal and a chip select abnormality signal.

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

12,52,62 アドレスデコーダ部 14 インバータ回路 16,56,66 アドレスラッチ回路 18 ラッチ回路 22,72 LED 32 CPU 34 RAM 36 ROM 42 アドレスバス 44 データバス 54,64 AND回路 68 OR回路 74 レジスタ部 12, 52, 62 Address decoder section 14 Inverter circuit 16, 56, 66 Address latch circuit 18 Latch circuit 22, 72 LED 32 CPU 34 RAM 36 ROM 42 Address bus 44 Data bus 54, 64 AND circuit 68 OR circuit 74 Register section

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置から送出されたアドレス信
号を監視し、前記アドレス信号が何も割り当てられてい
ないアドレス空間内のアドレスを指定しているときにこ
れを検出してアドレス異常信号を前記中央処理装置に送
出するアドレス異常信号発生手段と、 前記アドレス信号に基づいて所定のデバイスを選択する
ためのチップセレクト信号を出力するアドレスデコーダ
と、 前記アドレス信号が出力されたことを検出してアクセス
信号を出力するアクセス信号発生手段と、 前記アクセス信号が出力されているのに前記チップセレ
クト信号が出力されていないときにこれを検出してチッ
プセレクト異常信号を前記中央処理装置に送出するチッ
プセレクト異常信号発生手段と、 前記アドレス異常信号又は前記チップセレクト異常信号
を受けたときに前記アドレス信号で指定されたアドレス
を一時保持するアドレス保持手段と、 前記アドレス異常信号及び前記チップセレクト異常信号
を一時記憶する記憶手段と、 を備えることを特徴とするプログラム暴走検出装置。
1. An address signal sent from a central processing unit is monitored, and when the address signal designates an address in an address space to which nothing is assigned, the address signal is detected to detect an address abnormality signal. Address abnormal signal generating means for sending to the central processing unit, address decoder for outputting a chip select signal for selecting a predetermined device based on the address signal, and access by detecting output of the address signal An access signal generating means for outputting a signal, and a chip select for detecting the chip select signal when the access signal is being output but not outputting the chip select signal and sending a chip select abnormal signal to the central processing unit. Abnormal signal generating means and the address abnormal signal or the chip select abnormal signal are received. An address holding means for temporarily holding the address signal specified by the address to come, the address error signal and a program runaway detection apparatus comprising: a storage means for temporarily storing said chip select abnormality signal.
【請求項2】 前記アドレス異常信号発生手段、前記ア
ドレスデコーダ、前記アクセス信号発生手段、及び前記
チップセレクト異常信号発生手段を一つのPLDに組み
込んだことを特徴とする請求項1記載のプログラム暴走
検出装置。
2. The program runaway detection according to claim 1, wherein the address abnormality signal generating means, the address decoder, the access signal generating means, and the chip select abnormality signal generating means are incorporated in one PLD. apparatus.
【請求項3】 中央処理装置から送出されたアドレス信
号を監視し、前記アドレス信号が何も割り当てられてい
ないアドレス空間内のアドレスを指定しているときにこ
れを検出してアドレス異常信号を前記中央処理装置に送
出するアドレス異常信号発生手段と、 前記アドレス異常信号を受けたときに前記アドレス信号
で指定されたアドレスを一時保持するアドレス保持手段
と、 を備えることを特徴とするプログラム暴走検出装置。
3. The address signal sent from the central processing unit is monitored, and when the address signal designates an address in an address space to which nothing is assigned, the address signal is detected to detect an address abnormality signal. A program runaway detecting device comprising: an address abnormality signal generating means for sending to a central processing unit; and an address holding means for temporarily holding an address designated by the address signal when the address abnormality signal is received. .
【請求項4】 中央処理装置から送出されたアドレス信
号に基づいて所定のデバイスを選択するためのチップセ
レクト信号を出力するアドレスデコーダと、前記アドレ
ス信号が出力されたことを検出してアクセス信号を出力
するアクセス信号発生手段と、 前記アクセス信号が出力されているのに前記チップセレ
クト信号が出力されていないときにこれを検出してチッ
プセレクト異常信号を前記中央処理装置に送出するチッ
プセレクト異常信号発生手段と、 前記チップセレクト異常信号を受けたときに前記アドレ
ス信号で指定されたアドレスを一時保持するアドレス保
持手段と、 を備えることを特徴とするプログラム暴走検出装置。
4. An address decoder for outputting a chip select signal for selecting a predetermined device based on an address signal sent from a central processing unit, and an access signal for detecting the output of the address signal. Access signal generating means for outputting, and a chip select abnormal signal for detecting the chip select signal when the access signal is being output but not outputting the chip select signal and sending a chip select abnormal signal to the central processing unit. A program runaway detecting apparatus comprising: a generating unit; and an address holding unit that temporarily holds an address designated by the address signal when the chip select abnormality signal is received.
【請求項5】 前記アドレス異常信号又は前記チップセ
レクト異常信号を受けたときに警報を発する警報手段を
備えることを特徴とする請求項1、2、3又は4記載の
プログラム暴走検出装置。
5. The program runaway detecting apparatus according to claim 1, further comprising alarm means for issuing an alarm when the address abnormal signal or the chip select abnormal signal is received.
JP7107870A 1995-04-07 1995-04-07 Program run away detecting device Withdrawn JPH08278902A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7107870A JPH08278902A (en) 1995-04-07 1995-04-07 Program run away detecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7107870A JPH08278902A (en) 1995-04-07 1995-04-07 Program run away detecting device

Publications (1)

Publication Number Publication Date
JPH08278902A true JPH08278902A (en) 1996-10-22

Family

ID=14470180

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7107870A Withdrawn JPH08278902A (en) 1995-04-07 1995-04-07 Program run away detecting device

Country Status (1)

Country Link
JP (1) JPH08278902A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006079230A (en) * 2004-09-08 2006-03-23 Nec Electronics Corp Semiconductor circuit device and runaway detecting method
JP2007004257A (en) * 2005-06-21 2007-01-11 Nidec Sankyo Corp Circuit device with cpu mounted thereto

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006079230A (en) * 2004-09-08 2006-03-23 Nec Electronics Corp Semiconductor circuit device and runaway detecting method
JP4522799B2 (en) * 2004-09-08 2010-08-11 ルネサスエレクトロニクス株式会社 Semiconductor circuit device and runaway detection method
JP2007004257A (en) * 2005-06-21 2007-01-11 Nidec Sankyo Corp Circuit device with cpu mounted thereto
JP4621825B2 (en) * 2005-06-21 2011-01-26 日本電産サンキョー株式会社 Circuit device with CPU

Similar Documents

Publication Publication Date Title
JP2535518B2 (en) Data processing system
EP2824573B1 (en) Microcomputer test
JPH08137763A (en) Flash memory controller
EP3770765B1 (en) Error recovery method and apparatus
US6912670B2 (en) Processor internal error handling in an SMP server
JPH02202638A (en) Fault-tolerant computer system fitted with multiprocessor
JPH079625B2 (en) Computer with fault-tolerant capabilities
JP2000099406A (en) Method and system of recovery for l1 data cache parity error
US5987585A (en) One-chip microprocessor with error detection on the chip
US7966536B2 (en) Method and apparatus for automatic scan completion in the event of a system checkstop
JPH0869391A (en) Data processor and its method
JPH05225067A (en) Important-memory-information protecting device
US4947478A (en) Switching control system for multipersonality computer system
US7774690B2 (en) Apparatus and method for detecting data error
US20140075176A1 (en) Information processing apparatus
US9106258B2 (en) Early data tag to allow data CRC bypass via a speculative memory data return protocol
JPH08278902A (en) Program run away detecting device
JP2004302731A (en) Information processor and method for trouble diagnosis
US5893932A (en) Address path architecture
US7237099B2 (en) Multiprocessor system having a plurality of control programs stored in a continuous range of addresses of a common memory and having identification registers each corresponding to a processor and containing data used in deriving a starting address of a CPU-linked interrupt handler program to be executed by the corresponding processor
JP2003309564A (en) Microcomputer system and transceiver used therefor
JP3171615B2 (en) Data transfer retry control method
JPS6159557A (en) Virtual memory controlling device
JP3019336B2 (en) Microprocessor development support equipment
JP2006172196A (en) Interrupt controller

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020702