Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3021973B2 - Malfunction detection circuit - Google Patents
[go: Go Back, main page]

JP3021973B2 - Malfunction detection circuit - Google Patents

Malfunction detection circuit

Info

Publication number
JP3021973B2
JP3021973B2 JP4158530A JP15853092A JP3021973B2 JP 3021973 B2 JP3021973 B2 JP 3021973B2 JP 4158530 A JP4158530 A JP 4158530A JP 15853092 A JP15853092 A JP 15853092A JP 3021973 B2 JP3021973 B2 JP 3021973B2
Authority
JP
Japan
Prior art keywords
decoder
address
cpu
signal
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP4158530A
Other languages
Japanese (ja)
Other versions
JPH05324369A (en
Inventor
俊明 三宅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP4158530A priority Critical patent/JP3021973B2/en
Publication of JPH05324369A publication Critical patent/JPH05324369A/en
Application granted granted Critical
Publication of JP3021973B2 publication Critical patent/JP3021973B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明はCPUの誤動作を検出す
る誤動作検出回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a malfunction detecting circuit for detecting a malfunction of a CPU.

【0002】[0002]

【従来の技術】CPUの誤動作によるメモリ内容の破壊
等を防止するために、CPUの誤動作を検出し、CPU
のRESET端子,NMI端子,HOLD端子等に信号
を加えるということは従来から行なわれている。
2. Description of the Related Art In order to prevent destruction of memory contents due to a malfunction of a CPU, a malfunction of the CPU is detected, and
It is conventional to apply a signal to the RESET terminal, NMI terminal, HOLD terminal, and the like.

【0003】図2はCPUの誤動作を検出する従来の誤
動作検出回路の一例を示すブロック図であり、CPU2
1と、タイマ22と、モノステータブルマルチバイブレ
ータ23と、ラッチ回路24と、デコーダ25とから構
成されている。
FIG. 2 is a block diagram showing an example of a conventional malfunction detection circuit for detecting a malfunction of a CPU.
1, a timer 22, a monostable multivibrator 23, a latch circuit 24, and a decoder 25.

【0004】タイマ22は定期的にCPU21のINT
端子にパルスを出力し、CPU21はINT端子にパル
スが加えられる毎にI/O端子からパルスを出力する。
[0006] The timer 22 periodically updates the INT of the CPU 21.
A pulse is output to the terminal, and the CPU 21 outputs a pulse from the I / O terminal every time a pulse is applied to the INT terminal.

【0005】モノステータブルマルチバイブレータ23
はCPU21から出力されたパルスによりトリガされ、
予め設定されている時間、その出力信号を“1”にす
る。尚、モノステータブルマルチバイブレータ23が出
力信号を“1”にする時間は、タイマ22がパルスを出
力する間隔よりも長く設定されている。
[0005] Monostable multivibrator 23
Is triggered by a pulse output from the CPU 21,
The output signal is set to "1" for a preset time. The time during which the monostable multivibrator 23 sets the output signal to "1" is set longer than the interval at which the timer 22 outputs pulses.

【0006】従って、CPU21が正常に動作している
間は、タイマ22からパルスが出力される毎にCPU2
1のI/O端子からパルスが出力されるので、モノステ
ータブルマルチバイブレータ23の出力信号は連続して
“1”になり、CPU21が誤動作し、I/O端子から
パルスが出力されなくなると、モノステータブルマルチ
バイブレータ23の出力信号は“0”になる。
Therefore, while the CPU 21 is operating normally, every time a pulse is output from the timer 22, the CPU 2
Since a pulse is output from the I / O terminal 1, the output signal of the monostable multivibrator 23 becomes “1” continuously. If the CPU 21 malfunctions and no pulse is output from the I / O terminal, The output signal of the monostable multivibrator 23 becomes "0".

【0007】ラッチ回路24はモノステータブルマルチ
バイブレータ23の出力信号の“1”から“0”への変
化をラッチし、エラー発生を表示器等に通知する。
The latch circuit 24 latches the change of the output signal of the monostable multivibrator 23 from "1" to "0", and notifies an error display to a display or the like.

【0008】また、デコーダ25はモノステータブルマ
ルチバイブレータ23の出力信号が“0”となることに
より、CPU21のRESET端子,NMI端子,HO
LD端子等に信号を加える。尚、モノステータブルマル
チバイブレータ23の出力信号が“1”になった場合、
どの端子に信号を出力するのかはシステムの特徴を考慮
して予め決めておくものであり、また、デコーダ25も
それに合わせて構成しておくものである。
When the output signal of the monostable multivibrator 23 becomes "0", the decoder 25 outputs the RESET terminal, the NMI terminal, and the HO terminal of the CPU 21.
Apply a signal to the LD terminal or the like. Incidentally, when the output signal of the monostable multivibrator 23 becomes "1",
The terminal to which a signal is to be output is determined in advance in consideration of the characteristics of the system, and the decoder 25 is also configured in accordance therewith.

【0009】[0009]

【発明が解決しようとする課題】上述した従来の誤動作
検出回路はモノステータブルマルチバイブレータの出力
信号が“1”から“0”に変化したことを検出すること
により、CPUの誤動作を検出するようにしているた
め、モノステータブルマルチバイブレータがトリガされ
てからモノステータブルマルチバイブレータの設定時間
が経過するまでの間に発生した誤動作を検出できないと
いう問題がある。従って、従来の誤動作検出回路では上
記した期間にメモリの内容破壊やシステムの誤動作が発
生することがあるという問題がある。
The above-described conventional malfunction detection circuit detects a malfunction of the CPU by detecting that the output signal of the monostable multivibrator has changed from "1" to "0". Therefore, there is a problem that it is not possible to detect a malfunction that has occurred between the time when the monostable multivibrator is triggered and the time when the set time of the monostable multivibrator elapses. Therefore, the conventional malfunction detection circuit has a problem that the contents of the memory may be destroyed or the system may malfunction during the above-mentioned period.

【0010】また、モノステータブルマルチバイブレー
タの設定時間及びタイマによる割り込み時間を短くする
ことにより、上記した問題はある程度解決することがで
きるが、CPUはタイマ割り込みを短い間隔で受けるこ
とになり、プログラムの実行時間が少なくなるという問
題点が生じる。
The above-mentioned problem can be solved to some extent by shortening the set time of the monostable multivibrator and the interrupt time by the timer. The problem is that the execution time of the program is reduced.

【0011】本発明の目的はCPUの誤動作を瞬時に検
出することができる誤動作検出回路を提供することにあ
る。
An object of the present invention is to provide a malfunction detection circuit capable of instantaneously detecting a malfunction of a CPU.

【0012】[0012]

【課題を解決するための手段】本発明は上記目的を達成
するため、プログラムのロケート時に得られるプログラ
ム領域,データ領域,スタック領域,I/O領域のアド
レス情報が格納される記憶手段と、CPUの前記プログ
ラムの実行時にアドレスバス及びコントロールバスの内
容を前記記憶手段の内容に従ってデコードし、アクセス
対象とアクセス種別とを求めるアドレスデコーダと、前
記CPUのステータス信号をデコードし、アクセス対象
とアクセス種別とを求めるステータスデコーダと、前記
アドレスデコーダのデコード結果と前記ステータスデコ
ーダのデコード結果とを比較し、比較不一致の場合、エ
ラー信号を出力する比較手段とを設けたものである。
SUMMARY OF THE INVENTION In order to achieve the above object, the present invention provides a program obtained when locating a program.
Storage means for storing address information of a memory area, a data area, a stack area, and an I / O area; and the contents of an address bus and a control bus when the CPU executes the program, according to the contents of the storage means. An address decoder for decoding and obtaining an access target and an access type; a status decoder for decoding a status signal of the CPU to obtain an access target and an access type; a decoding result of the address decoder and a decoding result of the status decoder; And comparing means for outputting an error signal when the comparison is not made.

【0013】[0013]

【作用】記憶手段にはプログラムのロケート時に得られ
るプログラム領域,データ領域,スタック領域,I/O
領域のアドレス情報が格納されている。
[Function] The memory means is obtained when locating a program.
Help program area, a data area, stack area, I / O
The address information of the area is stored.

【0014】アドレスデコーダはアドレスバス及びコン
トロールバスの内容を前記記憶手段の内容に従ってデコ
ードし、アクセス対象とアクセス種別とを求め、ステー
タスデコーダはCPUのステータス信号をデコードし、
アクセス対象とアクセス種別とを求める。
The address decoder decodes the contents of the address bus and the control bus in accordance with the contents of the storage means to determine an access target and an access type. The status decoder decodes a status signal of the CPU.
Find the access target and access type.

【0015】比較手段はアドレスデコーダのデコード結
果とステータスデコーダのデコード結果とを比較し、不
一致の場合、エラー信号を出力する。
The comparing means compares the decoding result of the address decoder with the decoding result of the status decoder, and outputs an error signal if they do not match.

【0016】[0016]

【実施例】次に本発明の実施例について図面を参照して
詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0017】図1は本発明の実施例のブロック図であ
り、CPU1と、ラッチ回路2,4,9−1〜9−7,
10と、アドレスバス3−1,3−2と、コントロール
バス5−1,5−2と、E2 PROM6と、アドレスデ
コーダ7と、ステータスデコーダ11と、デコーダ12
とから構成されている。
FIG. 1 is a block diagram of an embodiment of the present invention, in which a CPU 1 and latch circuits 2, 4, 9-1 to 9-7,
10, address buses 3-1 and 3-2, control buses 5-1 and 5-2, an E 2 PROM 6, an address decoder 7, a status decoder 11, and a decoder 12.
It is composed of

【0018】CPU1のアドレスバス3−1はラッチ回
路2を介して装置のアドレスバス3−2に接続され、C
PU1のコントロールバス5−1はラッチ回路4を介し
て装置のコントロールバス5−2に接続される。
The address bus 3-1 of the CPU 1 is connected to the address bus 3-2 of the device via the latch circuit 2.
The control bus 5-1 of PU1 is connected to the control bus 5-2 of the device via the latch circuit 4.

【0019】E2 PROM6にはプログラムを作成し、
ロケートを行なった時に得られる使用目的が異なる各領
域のアドレス情報、例えばプログラム(コード)に割り
当てられたプログラム(コード)領域,データに割り当
てられたデータ領域,スタックに割り当てられたスタッ
ク領域,I/O装置に割り当てられたI/O領域等のア
ドレス情報が書き込まれている。
A program is created in the E 2 PROM 6,
Address information of each area having a different use purpose obtained at the time of locating, for example, a program (code) area allocated to a program (code), a data area allocated to data, a stack area allocated to a stack, an I / O Address information such as an I / O area assigned to the O device is written.

【0020】アドレスデコーダ7はアドレスバス3−
2,コントロールバス5−2の内容をデコードし、比較
器8−1〜8−7に対する信号の内の1つを“1”にす
る。
The address decoder 7 has an address bus 3-
2. Decode the contents of the control bus 5-2 and set one of the signals to the comparators 8-1 to 8-7 to "1".

【0021】アドレスバス3−2上のアドレスがプログ
ラム領域のアドレスである場合は、コントロールバス5
−2がリードを示していれば、アドレスデコーダ7は比
較器8−1に対する信号を“1”にする。また、アドレ
スバス3−2上のアドレスがスタック領域,データ領
域,I/O領域のアドレスである場合は、コントロール
バス5−2がライトを示していれば比較器8−2,8−
4,8−6に対する信号を“1”にし、リードを示して
いれば比較器8−3,8−5,8−7に対する信号を
“1”にする。尚、アドレスバス3−2上のアドレスが
どの領域のアドレスかはE2 PROMの内容に基づいて
デコードする。
If the address on the address bus 3-2 is a program area address, the control bus 5
If -2 indicates a read, the address decoder 7 sets the signal to the comparator 8-1 to "1". When the address on the address bus 3-2 is an address in the stack area, the data area, and the I / O area, if the control bus 5-2 indicates a write, the comparators 8-2 and 8-
The signal to the comparators 4 and 8-6 is set to "1", and the signal to the comparators 8-3, 8-5 and 8-7 is set to "1" if it indicates a read. Note that if the address of which region the address on the address bus 3-2 is decoded based on the contents of the E 2 PROM.

【0022】ラッチ回路10はCPU1からのステータ
ス信号をラッチし、ステータスデコーダ11に出力す
る。
The latch circuit 10 latches the status signal from the CPU 1 and outputs it to the status decoder 11.

【0023】ステータスデコーダ11はステータス信号
をデコードし、CPU1がプログラムフェッチを行なっ
ている場合は比較器8−1に対する信号を“1”にす
る。また、スタック領域,データ領域,I/O領域に対
するライトを行なっている場合は比較器8−2,8−
4,8−6に対する信号を“1”にし、リードを行なっ
ている場合は比較器8−3,8−5,8−7に対する信
号を“1”にする。
The status decoder 11 decodes the status signal, and sets the signal to the comparator 8-1 to "1" when the CPU 1 is performing the program fetch. When writing to the stack area, data area, and I / O area is performed, the comparators 8-2, 8-
The signals to the comparators 4 and 8-6 are set to "1", and when reading is performed, the signals to the comparators 8-3, 8-5 and 8-7 are set to "1".

【0024】比較器8−1〜8−7はアドレスデコーダ
7から加えられる信号と、ステータスデコーダ11から
加えられる信号とを比較し、両者に不一致があった場
合、プログラムフェッチエラー信号,スタックライトエ
ラー信号,スタックリードエラー信号,メモリライトエ
ラー信号,メモリリードエラー信号,I/Oライトエラ
ー信号,I/Oリードエラー信号を出力する。即ち、比
較器8−1〜8−7はアドレスデコーダ7によってデコ
ードされたCPU1のアクセス対象,アクセス種別(リ
ード,ライト)とステータスデコーダ11によってデコ
ードされたCPU1のアクセス対象,アクセス種別とが
不一致の場合、つまり誤動作により不正なアドレスがア
クセスされた場合及びアクセス種別に誤りがある場合、
エラー信号を出力する。
The comparators 8-1 to 8-7 compare the signal applied from the address decoder 7 with the signal applied from the status decoder 11. If there is a mismatch between the two, a program fetch error signal and a stack write error A signal, a stack read error signal, a memory write error signal, a memory read error signal, an I / O write error signal, and an I / O read error signal are output. That is, the comparators 8-1 to 8-7 do not match the access target and access type (read and write) of the CPU 1 decoded by the address decoder 7 with the access target and access type of the CPU 1 decoded by the status decoder 11. In other words, when an illegal address is accessed due to malfunction and when the access type is incorrect,
Outputs an error signal.

【0025】このエラー信号はラッチ回路9−1〜9−
7及びデコーダ12に加えられる。
This error signal is sent to latch circuits 9-1 to 9-
7 and the decoder 12.

【0026】ラッチ回路9−1〜9−7はエラー信号を
ラッチして表示器に出力したり、他の装置にエラー発生
を通知したりする。
The latch circuits 9-1 to 9-7 latch the error signal and output it to the display, or notify other devices of the occurrence of the error.

【0027】また、デコーダ12は比較器8−1〜8−
7からのエラー信号をデコードしてCPU1のRESE
T端子,NMI端子,HOLD端子等に信号を加え、C
PU1に動作停止,状態保存等の動作を行なわせる。こ
こで、どの比較器8−1〜8−7からエラー信号が加え
られた場合、どの端子に信号を出力するかはシステムの
特徴に合わせて予め決めておくものであり、デコーダ1
2もそれに合わせて構成しておくものである。
The decoder 12 has comparators 8-1 to 8-
7 and decodes the error signal from the
Apply a signal to the T terminal, NMI terminal, HOLD terminal, etc.
Causes PU1 to perform operations such as operation stop and state saving. Here, when an error signal is added from any of the comparators 8-1 to 8-7, to which terminal the signal is output is determined in advance according to the characteristics of the system.
2 is also configured accordingly.

【0028】尚、上述した実施例に於いては、E2 PR
OM6にプログラム領域,データ領域等のアドレス情報
を格納するようにしたが、ROM等の他の記憶装置にそ
れらの情報を格納するようにしても良い。しかし、CP
U1で実行されるプログラムが1種類でない場合、RO
Mを用いたとすると、異なるプログラムを実行する毎に
ROMを取り替えなければならないが、E2 PROM6
を用いれば、取り替えを行なうことなく、実行するプロ
グラムに合わせて容易にアドレス情報を変更することが
できるので、E2 PROM6を使用する方が望ましい。
In the above-described embodiment, E 2 PR
Although the address information of the program area and the data area is stored in the OM 6, the information may be stored in another storage device such as a ROM. However, CP
If there is not one type of program executed in U1, RO
When using M, must be replaced ROM for each executing different programs, E 2 PROM6
Is used, it is possible to easily change the address information according to the program to be executed without performing replacement. Therefore, it is preferable to use the E 2 PROM 6.

【0029】[0029]

【発明の効果】以上説明したように、本発明は、アドレ
スバス,コントロールバスの内容をデコードしてアクセ
ス対象及びアクセス種別を求めるアドレスデコーダと、
CPUのステータス信号をデコードしてアクセス対象及
びアクセス種別を求めるステータスデコーダと、両者の
デコード結果が不一致の場合、エラー信号を発生する比
較手段とを備えているので、誤動作により不正なアドレ
スがアクセスされたり、アクセス種別に誤りがある場
合、直ちにエラーを検出することができる効果がある。
従って、本発明によれば、CPUの誤動作によるメモリ
の内容破壊や、装置の誤動作を防止することが可能にな
る効果がある。
As described above, the present invention provides an address decoder for decoding the contents of an address bus and a control bus to obtain an access target and an access type.
A status decoder that decodes a status signal of the CPU to obtain an access target and an access type and a comparing unit that generates an error signal when the decoding results do not match each other are provided. If the access type has an error, the error can be detected immediately.
Therefore, according to the present invention, it is possible to prevent the contents of the memory from being destroyed due to the malfunction of the CPU and the malfunction of the device.

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

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

【図2】従来例のブロック図である。FIG. 2 is a block diagram of a conventional example.

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

1,21…CPU 2,4,9−1〜9−7,10,24…ラッチ回路 3−1,3−2…アドレスバス 5−1,5−2…コントロールバス 6…E2 PROM 7…アドレスデコーダ 8−1〜8−7…比較器 11…ステータスデコーダ 12,25…デコーダ 22…タイマ 23…モノステータブルマルチバイブレータ1,21 CPU CPU 2,4,9-1 to 9-7,10,24 Latch circuit 3-1, 3-2 Address bus 5-1, 5-2 Control bus 6 E 2 PROM 7 Address decoders 8-1 to 8-7 Comparator 11 Status decoder 12, 25 Decoder 22 Timer 23 Monostable multivibrator

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 プログラムのロケート時に得られるプロ
グラム領域,データ領域,スタック領域,I/O領域
アドレス情報が格納される記憶手段と、 CPUの前記プログラムの実行時にアドレスバス及びコ
ントロールバスの内容を前記記憶手段の内容に従ってデ
コードし、アクセス対象とアクセス種別とを求めるアド
レスデコーダと、 前記CPUのステータス信号をデコードし、アクセス対
象とアクセス種別とを求めるステータスデコーダと、 前記アドレスデコーダのデコード結果と前記ステータス
デコーダのデコード結果とを比較し、比較不一致の場
合、エラー信号を出力する比較手段とを備えたことを特
徴とする誤動作検出回路。
[Claim 1] professional obtained at the locate of the program
Storage means for storing address information of a program area, a data area, a stack area, and an I / O area ; when the CPU executes the program, decodes the contents of an address bus and a control bus in accordance with the contents of the storage means; An address decoder for determining the access type and an access type; a status decoder for decoding the status signal of the CPU to determine an access target and an access type; and comparing the decoding result of the address decoder with the decoding result of the status decoder. A malfunction detection circuit comprising: a comparison unit that outputs an error signal when there is a mismatch.
JP4158530A 1992-05-26 1992-05-26 Malfunction detection circuit Expired - Lifetime JP3021973B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4158530A JP3021973B2 (en) 1992-05-26 1992-05-26 Malfunction detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4158530A JP3021973B2 (en) 1992-05-26 1992-05-26 Malfunction detection circuit

Publications (2)

Publication Number Publication Date
JPH05324369A JPH05324369A (en) 1993-12-07
JP3021973B2 true JP3021973B2 (en) 2000-03-15

Family

ID=15673748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4158530A Expired - Lifetime JP3021973B2 (en) 1992-05-26 1992-05-26 Malfunction detection circuit

Country Status (1)

Country Link
JP (1) JP3021973B2 (en)

Also Published As

Publication number Publication date
JPH05324369A (en) 1993-12-07

Similar Documents

Publication Publication Date Title
US5390324A (en) Computer failure recovery and alert system
EP0664511A2 (en) Microprocessor fault log
US7107398B2 (en) Changing a mode of a storage subsystem in a system
JPH05225067A (en) Important-memory-information protecting device
KR100251381B1 (en) Apparatas and method for initializing of volatile memory
JP3021973B2 (en) Malfunction detection circuit
JPH04354040A (en) Circuit for preventing storage of single event upset error
JP2870202B2 (en) Method and apparatus for mutual monitoring between processors
JP3507193B2 (en) Load / store instruction processor
JPH0776952B2 (en) Computer monitoring system for additional devices
JPS5899841A (en) Address controlling system of partially mounted control memory
KR920010973B1 (en) Circuitry and protection methods to protect hard and floppy disks from computer viruses
JPH0484224A (en) Stack area protection circuit
JPS63250753A (en) Memory access checking system
JPH06236300A (en) Microcomputer
JPS6020769B2 (en) Microprogram control method
JPH0496157A (en) Main memory data protective circuit
JPH05189997A (en) Memory fault detecting mechanism
JPH05165658A (en) Information processing system
JPH07219858A (en) Information processor
JPH11306047A (en) Runaway detection device
JPH04180142A (en) Memory access control circuit
JPH05313974A (en) Duplexed file system operating method
JPH07117902B2 (en) Rebooting device for information processing equipment
JPH03100844A (en) Chance memory controller