JPH11161548A - Computer with runaway detection function - Google Patents

Computer with runaway detection function

Info

Publication number
JPH11161548A
JPH11161548A JP9329329A JP32932997A JPH11161548A JP H11161548 A JPH11161548 A JP H11161548A JP 9329329 A JP9329329 A JP 9329329A JP 32932997 A JP32932997 A JP 32932997A JP H11161548 A JPH11161548 A JP H11161548A
Authority
JP
Japan
Prior art keywords
cpu
computer
reset
access
runaway
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9329329A
Other languages
Japanese (ja)
Inventor
Hideo Namiki
秀夫 並木
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 JP9329329A priority Critical patent/JPH11161548A/en
Publication of JPH11161548A publication Critical patent/JPH11161548A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Storage Device Security (AREA)

Abstract

PROBLEM TO BE SOLVED: To minimize the damages of a computer in the case that a CPU runs away and to prevent a load from being put on the CPU by simple constitution. SOLUTION: This computer is constituted of the CPU 1, a ROM 2 connected to the CPU 1 through a bus line 50, a RAM 3 connected to the CPU 1 through the bus line 50, an EEPROM 4 connected to the CPU 1 through the bus line 50, a gate array 7 connected to the CPU 1 through the bus line 50 and provided with a register 5 for stack area overflow detection and a stack overflow detection circuit 6 and a CPU reset circuit 10 connected to the CPU 1 through a signal line 8 and connected to the gate array 7 through the signal line 9. In this case, when the CPU 1 runs away, incorrect access executed to a specified memory by the CPU 1 is detected in incorrect memory access detection means (register 5 and detection circuit 6) and the reset request signals of the CPU 1 are outputted to a CPU reset means (CPU reset circuit 10). The CPU reset means to which the output is inputted executes a reset operation to the CPU 1 and stops the runaway of the CPU 1.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、暴走検知機能付き
コンピュータに関し、特に、CPUの不正なメモリアク
セスを検知する暴走検知機能付きコンピュータに関す
る。
The present invention relates to a computer with a runaway detection function, and more particularly, to a computer with a runaway detection function for detecting illegal memory access of a CPU.

【0002】[0002]

【従来の技術】従来、この種の暴走検知機能付きコンピ
ュータとして、図6に示すものが知られている。同図に
おいて、CPU900と、同CPU900とバス線95
0を介して接続されるROM901と、同CPU900
と上記バス線950を介して接続されるRAM902
と、同CPU900と上記バス線950を介して接続さ
れるEEPROM903と、同CPU900と上記バス
線950を介して接続されウォッチドッグタイマーエラ
ー検出用レジスタ905とウォッチドッグタイマーエラ
ー検出回路909を有するゲートアレイ904と、上記
CPU900と信号線906を介して接続されるととも
に信号線907を介して上記ゲートアレイ904に接続
されるCPUリセット回路908とから構成されてい
た。
2. Description of the Related Art A computer having a runaway detection function of this type is conventionally known as shown in FIG. In the figure, a CPU 900, the CPU 900 and a bus 95
ROM 901 connected through the CPU 900
And a RAM 902 connected via the bus line 950
An EEPROM 903 connected to the CPU 900 via the bus line 950; and a gate array connected to the CPU 900 via the bus line 950 and having a watchdog timer error detection register 905 and a watchdog timer error detection circuit 909. 904, and a CPU reset circuit 908 connected to the CPU 900 via a signal line 906 and connected to the gate array 904 via a signal line 907.

【0003】上記構成において、上記CPU1は、一定
の周期をもって上記ウォッチドッグタイマーエラー検出
用レジスタ905にアクセスする。一方、上記ウォッチ
ドッグタイマーエラー検出回路909は、同アクセスを
監視する。ここで、上記CPU1が暴走して上記ウォッ
チドッグタイマーエラー検出用レジスタ905へのアク
セスが滞り、ウォッチドッグタイマーとして設定された
時間内に上記ウォッチドッグタイマーエラー検出用レジ
スタ905にアクセスが行われなくなると、上記ウォッ
チドッグタイマーエラー検出回路909は、ウォッチド
ッグタイマーエラーを検知するとともに上記CPUリセ
ット回路908に対して上記信号線907を介して上記
CPU1のリセット要求信号を出力する。同リセット要
求信号を入力した上記CPUリセット回路908は、上
記信号線906を介して上記CPU1のリセットを実行
する。
In the above configuration, the CPU 1 accesses the watchdog timer error detection register 905 at a constant cycle. On the other hand, the watchdog timer error detection circuit 909 monitors the access. Here, if the CPU 1 runs away and the access to the watchdog timer error detection register 905 is delayed, and the access to the watchdog timer error detection register 905 is not performed within the time set as the watchdog timer, The watchdog timer error detection circuit 909 detects a watchdog timer error and outputs a reset request signal of the CPU 1 to the CPU reset circuit 908 via the signal line 907. The CPU reset circuit 908 that has received the reset request signal executes the reset of the CPU 1 via the signal line 906.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の暴走検
知機能付きコンピュータにおいて、ウォッチドッグタイ
マーの設定時間が長すぎるとCPUの暴走の検出が遅れ
て被害が大きくなり、また短すぎるとCPUのアクセス
処理の負荷が増大するという問題があった。
In the above-mentioned conventional computer with a runaway detection function, if the set time of the watchdog timer is too long, detection of the runaway of the CPU is delayed and the damage is increased. There is a problem that the processing load increases.

【0005】本発明は、上記課題にかんがみてなされた
もので、簡易な構成で、CPUが暴走した場合のコンピ
ュータの被害を最小にとどめるとともにCPUに負荷が
かからない暴走検知機能付きコンピュータの提供を目的
とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to provide a computer with a runaway detection function that has a simple configuration and minimizes damage to the computer when the CPU runs away and does not load the CPU. And

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、請求項1にかかる発明は、CPUと各種のメモリと
を備えるコンピュータであって、上記CPUの不正なメ
モリアクセスを検出する不正メモリアクセス検出手段
と、上記不正メモリアクセス検出手段と接続されるとと
もに同不正メモリアクセス検出手段が出力するCPUリ
セット要求信号を入力し上記CPUをリセットするCP
Uリセット手段とを具備する構成としてある。
According to one aspect of the present invention, there is provided a computer comprising a CPU and various memories, wherein the unauthorized memory detects an unauthorized memory access of the CPU. An access detection unit, a CP connected to the unauthorized memory access detection unit and receiving a CPU reset request signal output by the unauthorized memory access detection unit to reset the CPU;
U reset means is provided.

【0007】上記のように構成した請求項1にかかる発
明において、上記CPUは暴走したときにCPUが特定
のメモリに対して実行する不正なアクセスを上記不正メ
モリ検出手段において検出するとともに、上記CPUリ
セット手段にCPUのリセット要求信号を出力する。こ
の出力を入力した上記CPUリセット手段は、CPUに
対してリセット操作を実行してCPUの暴走を停止させ
る。
In the invention according to claim 1, the CPU detects an unauthorized access executed by the CPU to a specific memory when the CPU runs out of control, and the CPU detects the unauthorized access and executes the CPU. A reset request signal of the CPU is output to the reset means. The CPU reset means, which receives this output, executes a reset operation on the CPU to stop the runaway of the CPU.

【0008】上述したように上記不正メモリアクセス検
出手段は、上記CPUが不正なメモリをアクセスしたこ
とを検出したときに同CPUをリセットするべく上記C
PUリセット手段に対してリセット要求信号を発生す
る。しかし、上記CPUが暴走した場合、通常は、RO
Mを除くメモリに不正なアクセスを行いデータを書き込
み続けるが、ときとしてROMに対してライトアクセス
を行う場合がある。そこで、請求項2にかかる発明は、
上記請求項1に記載のコンピュータにおいて、上記CP
UがROMにライトのアクセスを実行したときにそれを
検出するROMライト検出手段を有する構成としてあ
る。
As described above, the illegal memory access detecting means is configured to reset the CPU when the CPU detects that the CPU has accessed the illegal memory.
A reset request signal is generated for the PU reset means. However, when the CPU runs out of control, the RO
Unauthorized access to the memory except M is performed to continue writing data, but sometimes write access is performed to the ROM. Therefore, the invention according to claim 2 is
2. The computer according to claim 1, wherein the CP
When U performs a write access to the ROM, it has a ROM write detecting means for detecting the write access.

【0009】上記のように構成した請求項2にかかる発
明においては、上記ROMライト検出手段は、上記CP
UからROMに割り付けてあるアドレスに対してアクセ
スがあり、それがライトアクセスであると、上記CPU
リセット手段に対してリセット要求信号を出力する。こ
の出力を入力した上記CPUリセット手段は、CPUに
対してリセット操作を実行してCPUの暴走を停止させ
る。
[0009] In the invention according to claim 2 configured as described above, the ROM write detecting means includes the CP write control unit.
If there is an access from U to the address allocated to the ROM and it is a write access,
A reset request signal is output to the reset means. The CPU reset means, which receives this output, executes a reset operation on the CPU to stop the runaway of the CPU.

【0010】ここで、上記ROMライト検出手段は、C
PUのROMに対するライトアクセスを検出すればよ
い。従って、CPUがROM等のメモリにアクセスする
とき同アクセスの対象となるメモリを選択しCPUと同
選択されたメモリとの制御を行うメモリコントローラに
組み込まれてもよいし、バスを介してCPUと接続し、
同CPUからの信号を直接監視することによってROM
へのライトアクセスを検知してもよい。
[0010] Here, the ROM write detecting means is C
The write access to the ROM of the PU may be detected. Therefore, when the CPU accesses a memory such as a ROM, the CPU may select a memory to be accessed and may be incorporated in a memory controller that controls the CPU and the selected memory, or may communicate with the CPU via a bus. connection,
By directly monitoring signals from the CPU, ROM
May be detected.

【0011】ところで、今日において、全ての工場設備
等は、コンピュータを使用して制御されていると言って
もよい。このような、工場現場においては、CPUの暴
走というのはラインが停止してしまうなど深刻な問題と
なる場合がある。また、コンピュータによって連続稼働
している無人設備において、CPUの暴走によるCPU
リセットが発生した場合、リセット後、CPUは正常に
動作してしまうため、上記無人設備の異常動作等から、
なにがしかの異常事態が発生したということは判断でき
るが、その原因がCPUの暴走によるCPUのリセット
であるか、ソフトウェアロジックの異常であるのかを判
別することが困難になる。
By the way, at present, it can be said that all factory facilities and the like are controlled using a computer. In such a factory site, runaway of the CPU may cause a serious problem such as a line stoppage. In an unmanned facility continuously operated by a computer, the CPU
If a reset occurs, the CPU operates normally after the reset.
Although it can be determined that an abnormal situation has occurred, it is difficult to determine whether the cause is a reset of the CPU due to a runaway of the CPU or an abnormality of software logic.

【0012】そこで、請求項3にかかる発明は、上記請
求項1〜請求項2のいずれかに記載のコンピュータにお
いて、上記CPUリセット手段は、上記CPUに対して
リセット動作を実行した履歴を保持するCPUリセット
履歴手段を有する構成としてある。
According to a third aspect of the present invention, in the computer according to any one of the first and second aspects, the CPU reset means holds a history of executing a reset operation on the CPU. The configuration includes a CPU reset history unit.

【0013】上記のように構成した請求項3にかかる発
明においては、上記CPUリセット履歴手段は、上記C
PUリセット手段が上記CPUに対してリセット動作を
実行すると、その動作が行ったという履歴を保持または
保存する。ここで、上記CPUリセット履歴手段は、上
記CPUをリセットした事実を履歴できればよい。従っ
て、フリップフロップ回路等のハードウェア回路によっ
て履歴を保持してもよいし、ソフトウェアロジックを使
用してハードディスクに書き込むことで履歴を行っても
よい。
[0013] In the invention according to claim 3 configured as described above, the CPU reset history means includes the C reset history means.
When the PU reset means executes a reset operation on the CPU, a history that the operation has been performed is retained or saved. Here, the CPU reset history means only needs to be able to record the fact that the CPU has been reset. Therefore, the history may be held by a hardware circuit such as a flip-flop circuit, or may be written by writing to a hard disk using software logic.

【0014】また、最近の工場は、多数の設備とそれを
制御する多数のコンピュータとからなり、それらのコン
ピュータはネットワーク等により接続され一つのシステ
ムを構成する。当然、それらのコンピュータは広い範囲
に点在することになる。場合によっては、人間が入り込
みにくい場所にあったり、普段、人間がいる場所から離
れた場所に在ったりもする。この状況において、CPU
の暴走が発生した場合は、そのコンピュータまで行って
調査をしなければならない。
Further, a recent factory is composed of a large number of equipments and a large number of computers for controlling the equipments, and these computers are connected by a network or the like to constitute one system. Of course, those computers will be scattered over a wide area. In some cases, people may be in places where it is difficult for humans to enter, or they may be away from places where people are usually present. In this situation, the CPU
If a runaway occurs, you must go to the computer to investigate.

【0015】そこで、請求項4にかかる発明は、上記請
求項1〜請求項3のいずれかに記載のコンピュータにお
いて、上記CPUリセット履歴手段は、所定規格の外部
インターフェースを備え、上記CPUリセットが発生し
たことを同外部インターフェースを介して外部に通知す
る構成としてある。
According to a fourth aspect of the present invention, in the computer according to any one of the first to third aspects, the CPU reset history means includes an external interface of a predetermined standard, and the CPU reset occurs. This is notified to the outside via the external interface.

【0016】上記のように構成した請求項4にかかる発
明においては、上記CPUリセット履歴手段は、上記C
PUリセット手段が上記CPUに対してリセット動作を
行ったときに、上記外部インターフェースを介してパソ
コンなどの外部装置にその通知を行う。ここで、上記C
PUリセット履歴手段が有する外部インターフェース
は、パソコン等と接続し信号やデータの送受信ができれ
ばよい。従って、イーサネットでもよいし、RS232
Cであってもよい。簡単な構成としては、I/O信号線
でもよい。また、有線インターフェースである必要はな
く、無線インターフェースでもよい。
In the invention according to claim 4 configured as described above, the CPU reset history means includes the C reset history means.
When the PU reset means performs a reset operation on the CPU, it notifies the external device such as a personal computer via the external interface. Here, the above C
The external interface of the PU reset history means only needs to be connected to a personal computer or the like and can transmit and receive signals and data. Therefore, Ethernet or RS232
C may be used. As a simple configuration, an I / O signal line may be used. Further, it is not necessary to use a wired interface, and a wireless interface may be used.

【0017】ここで、CPUの暴走を検出する場合には
各種の態様が考えられる。例えば、ウォッチドッグタイ
マーを使用する場合がある。そこで、請求項5にかかる
発明は、上記請求項1〜請求項4のいずれかに記載のコ
ンピュータにおいて、ウォッチドッグタイマーによる第
二のCPUリセット手段を備える構成としてある。
Here, various modes can be considered for detecting runaway of the CPU. For example, a watchdog timer may be used. Therefore, a fifth aspect of the present invention is the computer according to any one of the first to fourth aspects, further comprising a second CPU reset unit using a watchdog timer.

【0018】上記のように構成した請求項5にかかる発
明においては、上記不正メモリアクセス検出手段よる上
記CPUの不正なアクセスの検出と、メモリへの不正な
アクセスをともなわない上記CPUの暴走をウォッチド
ッグタイマーにより検知する。すなわち、上記CPUが
暴走した場合にメモリに対する不正なアクセスという現
象だけでなく、同CPUそのものが動作を停止してしま
い、外部に対して何もアクセスしなくなってしまう現象
もある。この場合には上記不正メモリアクセス検出手段
は不正なアクセスをともなわないため、同CPUの暴走
を検知することができなくなる。すなわち、上記ウォッ
チドッグタイマーによる第二の上記CPUリセット手段
を備えることにより、上記CPUの暴走を検出すること
が可能になる。
In the invention according to claim 5 configured as described above, the illegal memory access detection means detects the illegal access of the CPU and watches the runaway of the CPU without the illegal access to the memory. Detected by dog timer. That is, in addition to the phenomenon of the illegal access to the memory when the CPU runs away, there is also a phenomenon that the CPU itself stops its operation and does not access anything outside. In this case, the illegal memory access detecting means does not involve an illegal access, so that the runaway of the CPU cannot be detected. That is, the provision of the second CPU reset means by the watchdog timer makes it possible to detect runaway of the CPU.

【0019】さらに、上記請求項4のいずれかに記載し
たコンピュータおよび同コンピュータの外部インターフ
ェースを介して接続されるパソコン等の外部装置は、そ
れぞれ単独の装置に限られることは必要なく、統合した
システムとしても取り扱うことができる。その一例とし
て、上記請求項6にかかる発明は、CPUがリセットさ
れたことを外部インターフェースを介して外部に通知す
るコンピュータと、同コンピュータに接続していて同コ
ンピュータが通知するCPUリセット通知を受信して上
記コンピュータにおいてCPUリセットが発生したこと
を検知するコンピュータとを具備する構成としてある。
すなわち、上記請求項5に記載したコンピュータおよび
同コンピュータの外部インターフェースを介して接続さ
れるパソコン等の外部装置を一つのシステムとして捉え
ることができる。
Further, the computer according to any one of claims 4 and the external device such as a personal computer connected via an external interface of the computer are not necessarily limited to a single device, but may be integrated systems. It can also be handled as As an example, the invention according to claim 6 includes a computer that notifies the outside that the CPU has been reset via an external interface, and a CPU reset notification that is connected to the computer and notified by the computer. And a computer for detecting that a CPU reset has occurred in the computer.
That is, the computer described in claim 5 and an external device such as a personal computer connected via an external interface of the computer can be regarded as one system.

【0020】[0020]

【発明の実施の形態】図1は、本発明の一実施形態にか
かるコンピュータをブロック図により示している。同図
において、CPU1と、同CPU1とバス線50を介し
て接続されるROM2と、同CPU1とバス線50を介
して接続されるRAM3と、同CPU1とバス線50を
介して接続されるEEPROM4と、同CPU1とバス
線50を介して接続していてスタックエリアオーバーフ
ローレジスタ5とスタックエリアオーバーフローレジス
タ検出回路6を有するゲートアレイ7と、上記CPU1
と信号線8を介して接続されるとともに信号線9を介し
て上記ゲートアレイ7に接続されるCPUリセット回路
10とから構成されている。
FIG. 1 is a block diagram showing a computer according to an embodiment of the present invention. In the figure, a CPU 1, a ROM 2 connected to the CPU 1 via a bus line 50, a RAM 3 connected to the CPU 1 via a bus line 50, and an EEPROM 4 connected to the CPU 1 via a bus line 50. A gate array 7 connected to the CPU 1 via a bus line 50 and having a stack area overflow register 5 and a stack area overflow register detection circuit 6;
And a CPU reset circuit 10 connected via a signal line 8 and connected to the gate array 7 via a signal line 9.

【0021】ここで、本実施形態の上記CPU1がアク
セスする各デバイスのアドレスマップを図2により説明
する。同図においては、データおよびプログラムを格納
する上記ROM2に対応するROM領域21と、上記ス
タックエリアオーバーフロー検出レジスタ5に対応する
レジスタ領域22と、上記RAM3に対応するスタック
RAM領域23とデータRAM領域24と、上記EEP
ROM4に対応するEEPROM領域25と、上記ゲー
トアレイ5が有するレジスタ領域26と構成されてい
る。
Here, an address map of each device accessed by the CPU 1 of this embodiment will be described with reference to FIG. In the figure, a ROM area 21 corresponding to the ROM 2 for storing data and a program, a register area 22 corresponding to the stack area overflow detection register 5, a stack RAM area 23 corresponding to the RAM 3 and a data RAM area 24 And the above EEP
An EEPROM area 25 corresponding to the ROM 4 and a register area 26 of the gate array 5 are provided.

【0022】上記CPU1が正常動作している場合、同
CPU1は、スタック情報を上記スタックRAM領域2
3を越えてライトすることはありえないため、本実施形
態では上記スタックRAM領域23を越えた直後に上記
スタックエリアオーバーフロー検出レジスタ5に対応す
るレジスタ領域22を設置する。
When the CPU 1 is operating normally, the CPU 1 stores the stack information in the stack RAM area 2.
In this embodiment, a register area 22 corresponding to the stack area overflow detection register 5 is set immediately after the stack RAM area 23 is exceeded.

【0023】従って、上記スタックエリアオーバーフロ
ーレジスタ5とスタックエリアオーバーフローレジスタ
検出回路6が不正メモリアクセス検出手段を構成し、上
記CPUリセット回路10がCPUリセット手段を構成
する。
Accordingly, the stack area overflow register 5 and the stack area overflow register detection circuit 6 constitute an illegal memory access detection means, and the CPU reset circuit 10 constitutes a CPU reset means.

【0024】図3は、上記スタックエリアオーバーフロ
ーレジスタ検出回路6が行うCPUリセット要求処理の
処理内容をフローチャートにより示している。上記スタ
ックエリアオーバーフローレジスタ検出回路6は、上記
CPU1が上記ゲートアレイ7が実装するレジスタに対
してアクセスを行うと上記スタックエリアオーバーフロ
ーレジスタ検出回路6は、上記スタックエリアオーバー
フローレジスタ5のアドレスであるか判別する(ステッ
プS100〜S101)。
FIG. 3 is a flowchart showing the contents of the CPU reset request processing performed by the stack area overflow register detection circuit 6. When the CPU 1 accesses a register mounted on the gate array 7, the stack area overflow register detection circuit 6 determines whether or not the address is the address of the stack area overflow register 5. (Steps S100 to S101).

【0025】上記スタックエリアオーバーフローレジス
タ5のアドレスでなければ、処理は終了する。一方、上
記スタックエリアオーバーフローレジスタ5へのアクセ
スであったら、上記スタックエリアオーバーフローレジ
スタ検出回路6は、上記CPU1の不正なメモリへのア
クセスを検知する(ステップS102)とともに、上記
信号線9を介して上記CPUリセット回路10に対して
CPUリセット要求信号を送信する(ステップS10
3)。上記CPUリセット回路10は、上記CPUリセ
ット要求信号を受信して(ステップS104)、CPU
に対してリセット信号を送信する(ステップS10
5)。同リセット信号により上記CPU1は、リセット
される(ステップS106)。
If the address is not the address of the stack area overflow register 5, the process ends. On the other hand, if the access to the stack area overflow register 5 is made, the stack area overflow register detection circuit 6 detects the illegal access of the CPU 1 to the memory (step S102) and at the same time, via the signal line 9. A CPU reset request signal is transmitted to the CPU reset circuit 10 (step S10
3). The CPU reset circuit 10 receives the CPU reset request signal (step S104), and
To the reset signal (step S10).
5). The CPU 1 is reset by the reset signal (step S106).

【0026】次に、上記構成からなる本実施形態におい
て上記CPU1が暴走して上記レジスタ領域22をアク
セスしたときの動作を説明する。上記CPU1が暴走し
ながらスタック情報をRAMに書き続ける状態になると
同スタック情報を上位アドレスから下位アドレスに向け
て書き込んでいく。従って、上記RAM領域23から上
記レジスタ領域22に向けて書き進んでいく。
Next, an operation when the CPU 1 runs out of control and accesses the register area 22 in this embodiment having the above configuration will be described. When the CPU 1 goes into a state of continuously writing the stack information in the RAM while running away, the stack information is written from the upper address to the lower address. Therefore, the writing proceeds from the RAM area 23 to the register area 22.

【0027】ここで、上記CPU1のアクセスが上記レ
ジスタ領域22に到達すると(ステップS100)、上
記スタックエリアオーバーフローレジスタ検出回路6
は、同アクセスのアドレスをチェックし(ステップS1
01)、上記レジスタ領域22のアドレスであるため、
上記CPUリセット回路11にリセット要求信号を送信
する(ステップS102〜S103)。同リセット要求
信号により上記CPU1はリセットされる(ステップS
104〜S106)。
Here, when the access of the CPU 1 reaches the register area 22 (step S100), the stack area overflow register detection circuit 6
Checks the address of the access (step S1).
01), since this is the address of the register area 22,
A reset request signal is transmitted to the CPU reset circuit 11 (steps S102 to S103). The CPU 1 is reset by the reset request signal (Step S
104 to S106).

【0028】一方、図4は、本発明の他の実施形態にか
かるコンピュータをブロック図により示している。同図
において、CPU21と、同CPU21とバス線150
を介して接続されるROM22と、同CPU21とバス
線150を介して接続されるRAM23と、同CPU2
1とバス線150を介して接続されるEEPROM24
と、同CPU21とバス線150を介して接続していて
スタックエリアオーバーフローレジスタ25とスタック
エリアオーバーフローレジスタ検出回路26およびRO
Mライトアクセス検出回路40を有するゲートアレイ2
7と、上記CPU21と信号線28を介して接続される
とともに信号線29を介して上記ゲートアレイ27に接
続されるCPUリセット回路30とから構成されてい
る。
FIG. 4 is a block diagram showing a computer according to another embodiment of the present invention. In the figure, the CPU 21, the CPU 21 and the bus line 150 are shown.
A ROM 22 connected to the CPU 2, a RAM 23 connected to the CPU 21 via a bus line 150,
EEPROM 24 connected to bus 1 via bus line 150
, The stack area overflow register 25, the stack area overflow register detection circuit 26 and the RO
Gate array 2 having M write access detection circuit 40
7, and a CPU reset circuit 30 connected to the CPU 21 via a signal line 28 and connected to the gate array 27 via a signal line 29.

【0029】図5は、上記ROMライトアクセス検出回
路40が行うCPUリセット要求処理の処理内容をフロ
ーチャートにより示している。上記ROMライトアクセ
ス検出回路40は、上記CPU1がアクセスする制御内
容とアドレスを上記バス線150を介して読み込む(ス
テップS200〜S201)。次に、同アクセスにおけ
るアドレスがROMに対するものであるか判別する(ス
テップS202)。そして、ROMへのアクセスであれ
ば、そのアクセスの制御内容がリードであるかライトで
あるかを判別する(ステップS203)。上記ROM領
域21へのアクセスであったら、上記ROMライトアク
セス検出検出回路40は、上記CPU1の不正なメモリ
へのアクセスを検知する(ステップS204)とともに
上記信号線29を介して上記CPUリセット回路30に
対してCPUリセット要求信号を送信する(ステップS
205)。
FIG. 5 is a flowchart showing the contents of the CPU reset request processing performed by the ROM write access detection circuit 40. The ROM write access detection circuit 40 reads control contents and addresses accessed by the CPU 1 via the bus line 150 (steps S200 to S201). Next, it is determined whether the address in the access is for a ROM (step S202). If the access is to the ROM, it is determined whether the control content of the access is read or write (step S203). If the access is to the ROM area 21, the ROM write access detection and detection circuit 40 detects an unauthorized access of the CPU 1 to the memory (step S204) and at the same time, the CPU reset circuit 30 through the signal line 29. Is transmitted to the CPU (step S
205).

【0030】上記CPUリセット回路30は、上記CP
Uリセット要求信号を受信して(ステップS206)、
上記CPU21に対してリセット信号を送信する(ステ
ップS207)。同リセット信号により上記CPU21
は、リセットされる(ステップS208)。もちろん、
上記ステップS202およびS203において、ROM
へのアクセスでもなく、ROMへのアクセスであっても
リードアクセスならば処理は終了する。
The CPU reset circuit 30 is connected to the CP
Upon receiving the U reset request signal (step S206),
A reset signal is transmitted to the CPU 21 (step S207). The reset signal causes the CPU 21
Is reset (step S208). of course,
In steps S202 and S203, the ROM
If the read access is not the access to the ROM but the access to the ROM, the process ends.

【0031】[0031]

【発明の効果】以上説明したように本発明は、CPUの
暴走時における異常を検出するとともに、CPUをリセ
ットするためコンピュータが制御している装置の異常動
作を防ぐことができる。また、メモリへの不正な書き込
みを最小に抑えることができる暴走検知機能付きコンピ
ュータを提供することができる。
As described above, the present invention can detect an abnormality during runaway of a CPU and prevent an abnormal operation of a device controlled by a computer for resetting the CPU. Further, it is possible to provide a computer with a runaway detection function capable of minimizing illegal writing to a memory.

【0032】さらに、請求項2にかかる発明によれば、
CPUによるROMへのライトアクセスを検出できるた
め、CPUの暴走によってROMの内容が壊されること
がなくなる。さらに、請求項3にかかる発明によれば、
CPUをリセットしたことが履歴として残るため、同履
歴から異常現象要因を特定することができる。
Further, according to the second aspect of the present invention,
Since the write access to the ROM by the CPU can be detected, the contents of the ROM are not destroyed by the runaway of the CPU. Further, according to the invention according to claim 3,
Since the history of resetting the CPU remains as a history, the cause of the abnormal phenomenon can be identified from the history.

【0033】さらに、請求項4にかかる発明によれば、
CPUの暴走が発生したコンピュータに接続されるコン
ピュータ等の外部装置より同暴走の発生を検知すること
ができる。さらに、請求項5にかかる発明によれば、C
PUの暴走によるメモリ破壊と動作停止の両方を検知す
ることが可能である。さらに、請求項6にかかる発明に
よれば、CPUの暴走をネットワーク等によりつながっ
た外部装置により検出することができる暴走検知機能付
きコンピュータシステムを提供することができる。
Further, according to the invention according to claim 4,
The occurrence of the runaway can be detected from an external device such as a computer connected to the computer in which the CPU has runaway. Furthermore, according to the invention of claim 5, C
It is possible to detect both memory destruction and operation stop due to PU runaway. Further, according to the invention according to claim 6, it is possible to provide a computer system with a runaway detection function capable of detecting runaway of a CPU by an external device connected via a network or the like.

【0034】[0034]

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

【図1】本実施形態の一実施形態にかかる暴走検知機能
付きコンピュータの構成を示すブロック線図である。
FIG. 1 is a block diagram illustrating a configuration of a computer with a runaway detection function according to an embodiment of the present invention.

【図2】本実施形態のCPUアドレスマップである。FIG. 2 is a CPU address map of the embodiment.

【図3】本実施形態のスタックエリアオーバーフローレ
ジスタ検出回路の処理内容を示すフローチャート図であ
る。
FIG. 3 is a flowchart illustrating processing performed by a stack area overflow register detection circuit according to the embodiment;

【図4】本実施形態の他の実施形態にかかる暴走検知機
能付きコンピュータの構成を示すブロック線図である。
FIG. 4 is a block diagram illustrating a configuration of a computer with a runaway detection function according to another embodiment of the present embodiment.

【図5】本実施形態のROMライトアクセス検出回路の
処理内容を示すフローチャート図である。
FIG. 5 is a flowchart illustrating processing performed by a ROM write access detection circuit according to the embodiment;

【図6】従来の暴走検知機能付きコンピュータの構成を
示すブロック線図である。
FIG. 6 is a block diagram showing a configuration of a conventional computer with a runaway detection function.

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

1 CPU 2 ROM 3 RAM 4 EEPROM 5 スタックエリアオーバーフローレジスタ 6 スタックエリアオーバーフローレジスタアクセス検
出回路 7 ゲートアレイ 8 信号線 9 信号線 10 CPUリセット回路
DESCRIPTION OF SYMBOLS 1 CPU 2 ROM 3 RAM 4 EEPROM 5 Stack area overflow register 6 Stack area overflow register access detection circuit 7 Gate array 8 Signal line 9 Signal line 10 CPU reset circuit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 CPUと各種のメモリとを備えるコンピ
ュータであって、 上記CPUの不正なメモリアクセスを検出する不正メモ
リアクセス検出手段と、 上記不正メモリアクセス検出手段と接続されるととも
に、同不正メモリアクセス検出手段が出力するCPUリ
セット要求信号を入力し上記CPUをリセットするCP
Uリセット手段とを具備することを特徴とする暴走検知
機能付きコンピュータ。
1. A computer comprising a CPU and various memories, wherein the unauthorized memory access detection means detects an unauthorized memory access of the CPU, and the unauthorized memory access detection means is connected to the unauthorized memory access means. CP for inputting a CPU reset request signal output from the access detection means and resetting the CPU
A computer with a runaway detection function, comprising: a U reset unit.
【請求項2】 上記請求項1に記載のコンピュータにお
いて、 上記CPUのROMへのライトアクセスを検出するRO
Mライトアクセス検出手段を有することを特徴とする暴
走検知機能付きコンピュータ。
2. The computer according to claim 1, wherein the CPU detects a write access to the ROM of the CPU.
A computer with a runaway detection function, comprising M write access detection means.
【請求項3】 上記請求項1〜請求項2のいずれかに記
載のコンピュータにおいて、 上記CPUリセット手段は、上記CPUに対してリセッ
ト動作を実行した履歴を保持するCPUリセット履歴手
段を有することを特徴とする暴走検知機能付きコンピュ
ータ。
3. The computer according to claim 1, wherein said CPU reset means includes a CPU reset history means for retaining a history of executing a reset operation on said CPU. Computer with runaway detection feature.
【請求項4】 上記請求項1〜請求項3のいずれかに記
載のコンピュータにおいて、 上記CPUリセット履歴手段は、所定規格の外部インタ
ーフェースを備え、CPUリセットが発生したことを同
外部インターフェースを介して外部に通知することを特
徴とする暴走検知機能付きコンピュータ。
4. The computer according to claim 1, wherein said CPU reset history means has an external interface of a predetermined standard, and reports that a CPU reset has occurred via said external interface. A computer with a runaway detection function characterized by notification to the outside.
【請求項5】 上記請求項1〜請求項4のいずれかに記
載のコンピュータにおいて、 ウォッチドッグタイマーによる第二のCPUリセット手
段を備えることを特徴とする暴走検知機能付きコンピュ
ータ。
5. The computer according to claim 1, further comprising a second CPU reset unit using a watchdog timer.
【請求項6】 CPUがリセットされたことを外部イン
ターフェースを介して外部に通知するコンピュータと、
同コンピュータに接続していて同コンピュータが通知す
るCPUリセット通知を受信して上記コンピュータにお
いてCPUリセットが発生したことを検知するコンピュ
ータとを具備することを特徴とする暴走検知機能付きコ
ンピュータシステム。
6. A computer for notifying that the CPU has been reset to an external device via an external interface,
A computer system having a runaway detection function, comprising: a computer connected to the computer, receiving a CPU reset notification notified by the computer, and detecting that a CPU reset has occurred in the computer.
JP9329329A 1997-11-28 1997-11-28 Computer with runaway detection function Pending JPH11161548A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9329329A JPH11161548A (en) 1997-11-28 1997-11-28 Computer with runaway detection function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9329329A JPH11161548A (en) 1997-11-28 1997-11-28 Computer with runaway detection function

Publications (1)

Publication Number Publication Date
JPH11161548A true JPH11161548A (en) 1999-06-18

Family

ID=18220245

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9329329A Pending JPH11161548A (en) 1997-11-28 1997-11-28 Computer with runaway detection function

Country Status (1)

Country Link
JP (1) JPH11161548A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015044993A1 (en) * 2013-09-24 2015-04-02 株式会社 エーティーティーコンサルティング Processor, processing device, and method for creating program
CN114428471A (en) * 2021-11-29 2022-05-03 浙江捷昌线性驱动科技股份有限公司 Safety control system and method for electric furniture controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015044993A1 (en) * 2013-09-24 2015-04-02 株式会社 エーティーティーコンサルティング Processor, processing device, and method for creating program
CN114428471A (en) * 2021-11-29 2022-05-03 浙江捷昌线性驱动科技股份有限公司 Safety control system and method for electric furniture controller

Similar Documents

Publication Publication Date Title
US4638432A (en) Apparatus for controlling the transfer of interrupt signals in data processors
JPH02156357A (en) Program destruction preventing method
JPH11161548A (en) Computer with runaway detection function
JPH09198258A (en) Task stack overflow detecting circuit
JPH1078919A (en) Device for preventing illegal access
JPS63250753A (en) Memory access checking system
JPH05274223A (en) Cache memory
JPH05225361A (en) Register rewriting system
JPS61279940A (en) Fault detector for computer
JPH06266648A (en) Data transfer control system
JPH0962534A (en) Self-diagnostic method for electronic computer
JPH0822419A (en) Miswriting prevention system
JPH01180656A (en) Memory protecting device
JP2000207235A (en) Information processor
JP2002091826A (en) Information processor
JPS6162142A (en) I/o controller
JPS63138437A (en) Program control system
JPS60258623A (en) Microcomputer
JPS6195464A (en) Data protecting system
JPS6232544A (en) Abnormally detecting circuit for information processor
JPH0423139A (en) Fault processing system for controller
JPS58141500A (en) Memory management protecting system
JPH05241905A (en) Processor device
KR19980085727A (en) How to Prevent Stack Overflow Using the Watchdog Timer's Lighting Values
JP2002082820A (en) Computer system for processor runaway pervention