JPH06259288A - Runaway monitor circuit for cpu - Google Patents

Runaway monitor circuit for cpu

Info

Publication number
JPH06259288A
JPH06259288A JP5049235A JP4923593A JPH06259288A JP H06259288 A JPH06259288 A JP H06259288A JP 5049235 A JP5049235 A JP 5049235A JP 4923593 A JP4923593 A JP 4923593A JP H06259288 A JPH06259288 A JP H06259288A
Authority
JP
Japan
Prior art keywords
address
cpu
runaway
program
instruction
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
JP5049235A
Other languages
Japanese (ja)
Inventor
Kunio Takada
邦夫 高田
Sei Sukegawa
聖 助川
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP5049235A priority Critical patent/JPH06259288A/en
Publication of JPH06259288A publication Critical patent/JPH06259288A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To speedily perform runaway detection by previously storing the next address corresponding to the program of the instruction of a CPU and always comparing this next address with the next program address generated by the CPU. CONSTITUTION:While a CPU 1 executes the instruction, the present program address is imparted from the CPU 1 to a next address storage memory 21 so that the next program address can be read from the memory 21 and latched by a next address storage register 22. At the time point when the CPU 1 generates the program address of the next instruction, the address latched by the next address storage register 22 is inputted to a comparator 3 so that the comparator 3 can compare the next program addresses each other. As a result, when non-coincidence occurs, a runaway detecting signal (c) showing the start of runaway of the CPU 1 is generated.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はマイクロプロセッサ(以
下、CPUという)の暴走監視回路に関し、特にCPU
を用いた信号処理回路の暴走監視回路に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a runaway monitoring circuit for a microprocessor (hereinafter referred to as CPU), and more particularly to a CPU.
The present invention relates to a runaway monitoring circuit of a signal processing circuit using the.

【0002】近年、CPUを用いた信号処理回路はあら
ゆる分野の機器に適用されているが、このようなCPU
は何らかの原因で暴走することがあり、このような障害
状態がかかる信号処理回路に与える影響ははかり知れな
い程大きいので、速やかに検出できる暴走監視回路が必
要である。
In recent years, signal processing circuits using CPUs have been applied to devices in all fields.
May run out of control for some reason, and the influence of such a fault condition on the signal processing circuit is immeasurable. Therefore, a runaway monitoring circuit capable of rapid detection is required.

【0003】[0003]

【従来の技術】従来より、CPUの暴走監視回路として
はウォッチドッグタイマー、バスパリティ監視回路、イ
ンバリッドアドレスアクセス監視回路などが知られてい
る。
2. Description of the Related Art Conventionally, a watchdog timer, a bus parity monitoring circuit, an invalid address access monitoring circuit, etc. have been known as CPU runaway monitoring circuits.

【0004】この内、ウォッチドッグタイマーは、CP
Uに対して或る時間割込を与え、これに対してCPUが
応答し周期的にレジスタにアクセスするようになってお
り、この周期的なアクセスをハードウェア上で監視して
おり、これが確認できなかったときにCPUが暴走して
いると判定するものである。
Of these, the watchdog timer is CP
A certain time interrupt is given to U, and the CPU responds to this to periodically access the register. This periodic access is monitored on the hardware, and this can be confirmed. If there is not, it is determined that the CPU is out of control.

【0005】また、バスパリティ監視回路は、CPUの
バス自体にパリティビットを付加してその各点でのパリ
ティが正常か否かを判定することにより暴走状態を監視
するものである。
The bus parity monitoring circuit monitors the runaway state by adding a parity bit to the bus itself of the CPU and determining whether or not the parity at each point is normal.

【0006】更には、インバリッドアドレスアクセス監
視回路においては、メモリや周辺の入出力回路(I/
O)に対して決まったアドレスを割り振っているため、
それら以外の有り得ないアドレスに対してアクセスした
ときにCPUが暴走していると判定するものである。
Further, in the invalid address access monitoring circuit, the memory and peripheral input / output circuits (I / I)
Since a fixed address is assigned to (O),
It is determined that the CPU is out of control when an impossible address other than those is accessed.

【0007】[0007]

【発明が解決しようとする課題】上記のウォッチドッグ
タイマーは、周期的にアクセスしているため、アクセス
間隔の中間においてはCPUの暴走を検出できず、暴走
検出するまでに時間がかかってしまう。
Since the watchdog timer described above is periodically accessed, CPU runaway cannot be detected in the middle of the access interval, and it takes time to detect runaway.

【0008】また、バスパリティ監視回路の場合では、
CPU自体を監視しているのではなくバスの正常/異常
を監視しているため、暴走時にもパリティが正常となっ
てしまい、確実な暴走検出ができない。
Further, in the case of the bus parity monitoring circuit,
Since the normality / abnormality of the bus is monitored instead of monitoring the CPU itself, the parity becomes normal even during a runaway, and a reliable runaway cannot be detected.

【0009】更に、インバリッドアドレスアクセス監視
回路においてもCPU自体を監視しているのではなく、
メモリや周辺のI/Oに対するアドレスを監視している
ので、CPUが暴走していないにも関わらずインバリッ
ドアドレスをアクセスしたときには暴走状態と見做して
しまったり、逆に暴走時にもバリッドアドレスをアクセ
スして正常と判定してしまうことがある。
Further, the invalid address access monitoring circuit does not monitor the CPU itself,
Since the addresses for memory and peripheral I / O are monitored, when the CPU does not run out of control, it is considered to be in a runaway state when the invalid address is accessed. May be determined to be normal by accessing.

【0010】このように従来技術においては、暴走検出
するまでに時間がかかったり、確実な監視が出来ない等
の問題があった。
As described above, in the conventional technique, there are problems that it takes time to detect a runaway and reliable monitoring cannot be performed.

【0011】また、この結果、暴走検出時点では、既に
レジスタ、メモリ内のデータが破壊されてしまってお
り、暴走以前の状態に復帰させる事がほとんど不可能で
あるという問題もあった。
As a result, at the time of the runaway detection, the data in the register and the memory have already been destroyed, and it is almost impossible to restore the state before the runaway.

【0012】従って本発明は、迅速で確実な暴走監視を
実現し、暴走以前の状態に復帰させることができるCP
Uの暴走監視回路を提供することを目的とする。
Therefore, the present invention realizes quick and reliable runaway monitoring, and can restore the state before runaway to a CP.
It is intended to provide a runaway monitoring circuit for U.

【0013】[0013]

【課題を解決するための手段】上記の目的を達成するた
め、本発明に係るCPUの暴走監視回路は、図1に原理
的に示すように、CPU1の命令のプログラムアドレス
に対し次のアドレスを予め記憶しておく次アドレス記憶
部2と、この次アドレス記憶部2のアドレスとCPU1
が発生する次のプログラムアドレスとを常に比較してこ
れらに不一致が生じた場合に該CPU1の暴走検出信号
を発生する比較器3とを備えている。
In order to achieve the above object, the runaway monitoring circuit of the CPU according to the present invention, as shown in principle in FIG. 1, sets the following address to the program address of the instruction of the CPU1. The next address storage unit 2 stored in advance, the address of the next address storage unit 2 and the CPU 1
And a comparator 3 which always compares the next program address generated by the above-mentioned (1) and generates a runaway detection signal of the CPU 1 when these do not match.

【0014】また本発明では、図1に点線で示すよう
に、該プログラムアドレスの現アドレスを絶えず記憶す
る現アドレス記憶部4を設け、該暴走検出信号がリセッ
ト信号として該CPU1に与えられたとき該CPU1を
該現アドレス記憶部4の現アドレスに動作復帰させるこ
とが可能である。
Further, according to the present invention, as shown by a dotted line in FIG. 1, a current address storage unit 4 for constantly storing the current address of the program address is provided, and when the runaway detection signal is given to the CPU 1 as a reset signal. It is possible to return the operation of the CPU 1 to the current address of the current address storage unit 4.

【0015】[0015]

【作用】図1に示した本発明に係るCPUの暴走監視回
路の動作を、図2を参照して説明すると、まず、CPU
1がある番地の命令を実行しているとき、その命令を処
理し終わった後の次の命令のプログラムアドレスは、C
PU1のプログラムにより図2に示す如く次のように分
けられる。 a)単純処理:処理終了後、アドレスが+1され、次の
アドレスへ進む。 b)条件ジャンプX:条件を満足すればアドレスXへ飛
び、満足しなければアドレスが+1されて次のアドレス
へ進む。 c)無条件ジャンプX:無条件にアドレスXへ飛ぶ。
The operation of the runaway monitoring circuit of the CPU according to the present invention shown in FIG. 1 will be described with reference to FIG.
When 1 is executing an instruction at a certain address, the program address of the next instruction after processing that instruction is C
According to the program of PU1, it is divided as follows as shown in FIG. a) Simple process: After the process is completed, the address is incremented by 1, and the process proceeds to the next address. b) Conditional jump X: If the condition is satisfied, the condition is jumped to the address X, and if not satisfied, the address is incremented by 1 and the process proceeds to the next address. c) Unconditional jump X: Unconditionally jump to address X.

【0016】ここで、次アドレス記憶部2には、実際に
CPU1が動作をするプログラムの内容に対応して予め
CPU1が次にアクセスを行うプログラムのアドレスを
記憶しておくので、CPU1が命令を実行し次の命令の
プログラムアドレスを発生した時点で、次アドレス記憶
部2からその期待値(アドレス)を引き出し、これらを
比較器3で比較する。
Here, since the address of the program to be accessed next by the CPU 1 is stored in advance in the next address storage unit 2 in correspondence with the content of the program which the CPU 1 actually operates, the CPU 1 issues an instruction. When the program address of the next instruction is executed and the next instruction is generated, the expected value (address) is extracted from the next address storage unit 2 and these are compared by the comparator 3.

【0017】例えば、現プログラムアドレスが「03」
でプログラム内容が単純処理であるときには、次プログ
ラムアドレスは「04」となるので、CPU1が正常に
動作していれば、このときの現プログラムアドレス「0
4」と次アドレス記憶部2に記憶されているアドレス
「04」とが一致することとなる。これは、プログラム
内容が、「条件ジャンプ」や「無条件ジャンプ」の場合
でも、そのジャンプ先アドレス又は単純処理アドレスが
指定されるので同様にして行われる。
For example, the current program address is "03".
When the program content is a simple process, the next program address is "04". Therefore, if the CPU 1 is operating normally, the current program address "0"
4 ”matches the address“ 04 ”stored in the next address storage unit 2. This is performed in the same manner even if the program content is "conditional jump" or "unconditional jump" because the jump destination address or the simple processing address is specified.

【0018】一方、アドレス比較の結果、不一致が起こ
った場合、この時点でCPU1の暴走が始まったことを
検出できる。
On the other hand, if a mismatch occurs as a result of the address comparison, it can be detected at this point that the runaway of the CPU 1 has started.

【0019】また、本発明では、現プログラムアドレス
を点線で示した現アドレス記憶部4に絶えず記憶してお
けば、比較器3からの上記の暴走検出信号がCPU1に
送られた時点でCPU1は現アドレス記憶部4の現アド
レス、即ち暴走が発生する直前の命令から動作を再開す
ることができ、暴走による擾乱の影響を低減することが
できる。
Further, according to the present invention, if the current program address is constantly stored in the current address storage section 4 shown by the dotted line, the CPU 1 will operate at the time when the above-mentioned runaway detection signal from the comparator 3 is sent to the CPU 1. The operation can be restarted from the current address of the current address storage unit 4, that is, the instruction immediately before the runaway, and the influence of the disturbance due to the runaway can be reduced.

【0020】[0020]

【実施例】図3は本発明に係るCPUの暴走監視回路の
実施例(その1)を示したもので、この実施例では、通
常のCPU回路の構成要素であるCPU1とプログラム
メモリ5に加えて、次の命令のアドレスを格納する次ア
ドレス記憶メモリ21と、このメモリ21より期待値を
引き出す次アドレス記憶レジスタ22と、この期待値と
CPU1が発生している番地を比較する比較器3により
構成され、メモリ21とレジスタ22とで次アドレス記
憶部2を構成している。
FIG. 3 shows an embodiment (part 1) of a runaway monitoring circuit for a CPU according to the present invention. In this embodiment, in addition to the CPU 1 and the program memory 5 which are the constituent elements of a normal CPU circuit. The next address storage memory 21 for storing the address of the next instruction, the next address storage register 22 for extracting the expected value from the memory 21, and the comparator 3 for comparing the expected value with the address generated by the CPU 1. The memory 21 and the register 22 constitute the next address storage unit 2.

【0021】この実施例の動作においては、上述の如
く、CPU1が命令を実行しているときの現プログラム
アドレスがCPU1から次アドレス記憶メモリ21に与
えられることにより、このメモリ21から図2に示すよ
うな次のプログラムアドレスが読み出されて次アドレス
記憶レジスタ22に与えられラッチされる。
In the operation of this embodiment, as described above, the current program address when the CPU 1 is executing an instruction is given from the CPU 1 to the next address storage memory 21, so that the memory 21 is shown in FIG. The next program address is read out, given to the next address storage register 22 and latched.

【0022】そして、CPU1が次の命令のプログラム
アドレスを発生した時点で、次アドレス記憶レジスタ2
2がラッチしておいた次のプログラムアドレスを出力し
て比較器3に与えるので、比較器3では次のプログラム
アドレス同士を比較することとなる。
Then, when the CPU 1 generates the program address of the next instruction, the next address storage register 2
Since the next program address latched by 2 is supplied to the comparator 3, the comparator 3 compares the next program addresses with each other.

【0023】この結果、不一致が起こった場合に、CP
U1の暴走が始まったことを示す暴走検出信号を発生す
る。
As a result, if a mismatch occurs, the CP
A runaway detection signal indicating that the runaway of U1 has started is generated.

【0024】図4は図3の暴走監視回路を応用して、暴
走以前の状態に復旧させるための本発明の実施例(その
2)の構成を示したもので、この実施例では、図3の暴
走監視回路に加えて、命令を実行している現在のアドレ
スを記憶する現アドレス記憶部としての現アドレス記憶
レジスタ4を設け、このレジスタ4に記憶したアドレス
を常にプログラムメモリ5におけるCPU1のためのリ
セットベクタ50に転送するように構成している。
FIG. 4 shows a configuration of an embodiment (part 2) of the present invention for restoring the state before the runaway by applying the runaway monitoring circuit of FIG. 3, and in this embodiment, FIG. In addition to the runaway monitoring circuit of FIG. 1, a current address storage register 4 is provided as a current address storage unit for storing the current address at which the instruction is being executed, and the address stored in this register 4 is always used by the CPU 1 in the program memory 5. Of the reset vector 50.

【0025】従って、次アドレス記憶部2と比較器3と
でCPU1の暴走が検出された場合、比較器3はCPU
1に対しCPU1のリセット端子RSTにリセット信号
を与えてリセットをかける。
Therefore, when the runaway of the CPU 1 is detected by the next address storage unit 2 and the comparator 3, the comparator 3 causes the CPU
1 is reset by applying a reset signal to the reset terminal RST of the CPU 1.

【0026】この時点でCPU1のリセットベクタ50
は暴走直前のプログラムアドレスを示しているため、C
PU1は暴走発生時の直前の命令から再スタートするこ
とができ暴走による擾乱の影響を低減することができ
る。
At this point, the reset vector 50 of the CPU 1
Indicates the program address immediately before the runaway, so C
PU1 can be restarted from the instruction immediately before the occurrence of the runaway, and the influence of the disturbance due to the runaway can be reduced.

【0027】[0027]

【発明の効果】以上説明したように、本発明に係るCP
Uの暴走監視回路によれば、CPUの命令のプログラム
アドレスに対し次のアドレスを予め記憶しておき、この
次アドレスとCPUが発生する次のプログラムアドレス
とを常に比較してこれらに不一致が生じた場合にCPU
の暴走検出信号を発生すると共に、該プログラムアドレ
スの現アドレスを絶えず記憶しておき、該暴走検出信号
がリセット信号としてCPUに与えられたときCPUを
現アドレスに動作復帰させるように構成したので、各ア
ドレスが常に監視されることにより迅速な暴走検出が誤
り無く行えると共に暴走発生時点でその直前の命令から
動作復帰できデータの保護を実現することが可能とな
る。
As described above, the CP according to the present invention
According to the runaway monitoring circuit of U, the next address is stored in advance with respect to the program address of the instruction of the CPU, and this next address and the next program address generated by the CPU are constantly compared with each other to cause a mismatch. CPU when
Of the program address, the current address of the program address is constantly stored, and when the runaway detection signal is given to the CPU as a reset signal, the CPU is restored to the current address. Since each address is constantly monitored, rapid runaway detection can be performed without error, and at the time of runaway, the operation can be restored from the instruction immediately before the runaway and data protection can be realized.

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

【図1】本発明に係るCPUの暴走監視回路を原理的に
示したブロック図である。
FIG. 1 is a block diagram showing in principle a runaway monitoring circuit of a CPU according to the present invention.

【図2】本発明に係るCPUの暴走監視回路の動作説明
図である。
FIG. 2 is an operation explanatory diagram of the runaway monitoring circuit of the CPU according to the present invention.

【図3】本発明に係るCPUの暴走監視回路の実施例
(その1)を示したブロック図である。
FIG. 3 is a block diagram showing an embodiment (No. 1) of the runaway monitoring circuit of the CPU according to the present invention.

【図4】本発明に係るCPUの暴走監視回路の実施例
(その2)を示したブロック図である。
FIG. 4 is a block diagram showing an embodiment (No. 2) of the runaway monitoring circuit of the CPU according to the present invention.

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

1 CPU 2 次アドレス記憶部 3 比較器 4 現アドレス記憶部 図中、同一符号は同一又は相当部分を示す。 1 CPU Secondary address storage unit 3 Comparator 4 Current address storage unit In the drawings, the same reference numerals indicate the same or corresponding portions.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 CPU(1) の命令のプログラムアドレス
に対し次のアドレスを予め記憶しておく次アドレス記憶
部(2) と、 この次アドレス記憶部(2) のアドレスとCPU(1) が発
生する次のプログラムアドレスとを常に比較してこれら
に不一致が生じた場合に該CPU(1) の暴走検出信号を
発生する比較器(3) と、 を備えたことを特徴とするCPUの暴走監視回路。
1. A next address storage unit (2) for pre-storing the next address for a program address of an instruction of the CPU (1), and an address of the next address storage unit (2) and the CPU (1) A CPU runaway characterized by comprising a comparator (3) for constantly comparing the generated next program address and generating a runaway detection signal of the CPU (1) when these do not match. Monitoring circuit.
【請求項2】 該プログラムアドレスの現アドレスを絶
えず記憶する現アドレス記憶部(4) を設け、該暴走検出
信号がリセット信号として該CPU(1) に与えられたと
き該CPU(1) を該現アドレス記憶部(4) の現アドレス
に動作復帰させることを特徴とした請求項1に記載のC
PUの暴走監視回路。
2. A current address storage unit (4) for constantly storing the current address of the program address is provided, and when the runaway detection signal is given to the CPU (1) as a reset signal, the CPU (1) is activated. The C according to claim 1, wherein the operation is returned to the current address of the current address storage unit (4).
PU runaway monitoring circuit.
JP5049235A 1993-03-10 1993-03-10 Runaway monitor circuit for cpu Withdrawn JPH06259288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5049235A JPH06259288A (en) 1993-03-10 1993-03-10 Runaway monitor circuit for cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5049235A JPH06259288A (en) 1993-03-10 1993-03-10 Runaway monitor circuit for cpu

Publications (1)

Publication Number Publication Date
JPH06259288A true JPH06259288A (en) 1994-09-16

Family

ID=12825235

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5049235A Withdrawn JPH06259288A (en) 1993-03-10 1993-03-10 Runaway monitor circuit for cpu

Country Status (1)

Country Link
JP (1) JPH06259288A (en)

Similar Documents

Publication Publication Date Title
US10360115B2 (en) Monitoring device, fault-tolerant system, and control method
US5257269A (en) Error controller for use in debugging microprocessor
JPH06259288A (en) Runaway monitor circuit for cpu
JPH1063541A (en) Program hang-up monitor device for computer system
JP4647276B2 (en) Semiconductor circuit device
JP2508305B2 (en) Initial value determination device
JPH0844629A (en) Memory access abnormality monitoring device
JPH01310422A (en) Resetting circuit for microcomputer
JP3183982B2 (en) Digital controller
JPS61279940A (en) Fault detector for computer
JPS6118045A (en) Detecting system of program runaway
CN116382958A (en) Memory error processing method and computing device
JPH06214831A (en) Abnormality detector for central processing unit
JPH01180656A (en) Memory protecting device
JP2002082820A (en) Computer system for processor runaway pervention
JPH06309184A (en) Detection of abnormal operation of software
JPH0251742A (en) Preventing system for program runaway
JPH0644145A (en) Memory error saving system
JPH0454656A (en) Electronic apparatus
JPH07281961A (en) Memory fault detector and computer
JPH0651996A (en) Information processor
JPH04140831A (en) Microcomputer
KR20000039688A (en) Method for providing error cause information in switching system
JPS63116239A (en) Stack control system for processor
JPH05108402A (en) Debugging device

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: 20000530