JPH0351921A - Runaway preventing device for cpu system - Google Patents
Runaway preventing device for cpu systemInfo
- Publication number
- JPH0351921A JPH0351921A JP1186366A JP18636689A JPH0351921A JP H0351921 A JPH0351921 A JP H0351921A JP 1186366 A JP1186366 A JP 1186366A JP 18636689 A JP18636689 A JP 18636689A JP H0351921 A JPH0351921 A JP H0351921A
- Authority
- JP
- Japan
- Prior art keywords
- runaway
- area
- memory
- cpu
- interrupt
- 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
Links
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
[発明の目的]
{産業上の利用分野}
この発明は、いわゆるベクタ割込方式を採用したマイク
ロプロセッサなどによるCPUシステムの暴走防止装置
に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] {Industrial Field of Application} The present invention relates to a runaway prevention device for a CPU system using a microprocessor or the like that employs a so-called vector interrupt method.
(従来の技術〉
マイクロプロセッサによるシステムの主メモリは、第2
図に示されるようにROM201とRAM202とから
戒り、ROM201には初期化動作のためのイニシャル
プログラムローダのほか、割込みベクタが格納されてい
る。また、RAM202内には上記ROM201内の割
込みベクタが転送されて格納されるエリア203が存在
する。(Prior art) The main memory of a system using a microprocessor is
As shown in the figure, a ROM 201 and a RAM 202 are used, and the ROM 201 stores an initial program loader for initialization operations as well as interrupt vectors. Furthermore, within the RAM 202 there is an area 203 to which the interrupt vectors in the ROM 201 are transferred and stored.
マイクロプロセッサは電源投入等の初期化動作時に、イ
ニシャルプログラムローダによりROM201内の割込
みベクタをエリア203に転送し、その後の割込みに対
しては対応するエリア203内の割込みベクタを検索し
て、この割込みベクタが示すプログラムを実行すること
により、割込みに応答するようになっている。During initialization operations such as power-on, the microprocessor transfers the interrupt vector in the ROM 201 to the area 203 by the initial program loader, and for subsequent interrupts, searches for the corresponding interrupt vector in the area 203 and handles this interrupt. It responds to interrupts by executing the program indicated by the vector.
一方、マイクロプロセッサシステムには、暴走監視回路
として通常ウオッチドッグタイマが設けられ、暴走を検
出するとマイクロプロセッサに割込みをかけて、暴走処
理用の割込みベクタに基づく暴走処理を行うようになっ
ている。On the other hand, a microprocessor system is usually provided with a watchdog timer as a runaway monitoring circuit, and when a runaway is detected, it interrupts the microprocessor and performs runaway processing based on an interrupt vector for runaway processing.
しかしながら上記のようなマイクロプロセッサシステム
において暴走が生じると、ウオッチドッグタイマが暴走
を検出するまでの間マイクロプロセッサが暴走してエリ
ア203内の割込みベクタを書換えてしまうことがあっ
た。このようにして書換えが生じた後に、暴走を検出し
て、マイクロプロセッサに割込みをかけ暴走処理用の割
込みベクタによる処理を行わせようとしても、当該暴走
処理用の割込みベクタが他のデータに変っているため、
更に暴走が生じ収拾がつかなくなるという問題点が発生
していた。However, when a runaway occurs in the microprocessor system as described above, the microprocessor may run out of control and rewrite the interrupt vector in area 203 until the watchdog timer detects the runaway. Even if a runaway is detected after rewriting has occurred in this way and an attempt is made to interrupt the microprocessor to perform processing using the interrupt vector for runaway processing, the interrupt vector for runaway processing will change to other data. Because
Furthermore, a problem occurred in that the vehicle ran out of control and became uncontrollable.
(発明が解決しようとする課題〉
上記のように従来のCPUシステムでは、暴走処理用の
割込みベクタがデータ書換え可能なエリアにあり、CP
Uの暴走が生じてから暴走を検出するまでの間に当該割
込みベクタが別のデータに書換えられることがあった。(Problems to be Solved by the Invention) As mentioned above, in the conventional CPU system, the interrupt vector for runaway processing is located in the data rewritable area, and the CPU
In some cases, the interrupt vector is rewritten with different data from when U runs out of control to when the runaway is detected.
従って、暴走を検出して上記割込みベクタのエリアを読
みに行ったときには、このエリアに別のデータが格納さ
れており、更に暴走を生じ収拾がつかなくなる問題点が
あった。Therefore, when a runaway is detected and the interrupt vector area is read, other data is stored in this area, causing further runaway and causing the problem to become uncontrollable.
本発明はこのような従来のCPUシステムの問題点を解
決せんとしてなされたもので、その目的は、暴走が生じ
た場合には的確に暴走処理を行い得るCPUシステムの
暴走防止装置を提供することである。The present invention was made to solve the problems of conventional CPU systems, and its purpose is to provide a runaway prevention device for a CPU system that can accurately handle runaway when runaway occurs. It is.
[発明の構或]
(課題を解決するための手段)
割込みベクタが書込まれるエリアを有する第1のメモリ
と、
CPUの暴走を監視する暴走監視回路と、この暴走監視
回路から前記CPUに対する割込みに対応して当該CP
Uが行うべき処理に関する暴走処理用の割込みベクタを
含む割込みベクタが予め書込まれている第2のメモリと
、
初期化動作時に前記第2のメモリの割込みベクタを前記
第1のメモリの前記エリアへ転送し、その後発生する割
込みに当該エリアの割込みベクタを用いて対応処理する
CPUと、
このCPUが行う初期化動作が終了したか否か検出し、
終了を検出した後には前記第1のメモリの前記エリアの
うち、少なくとも前記暴走処理用の割込みベクタが格納
されたエリアに対する前記CPUによる書込みを禁止す
る書込み禁止手段とを備えさせて、CPUシステムの暴
走防止装置を構或した。[Structure of the Invention] (Means for Solving the Problems) A first memory having an area in which an interrupt vector is written, a runaway monitoring circuit that monitors runaway of the CPU, and an interrupt to the CPU from the runaway monitoring circuit. The corresponding CP
a second memory in which interrupt vectors including interrupt vectors for runaway processing related to processing to be performed by U are written in advance; and during an initialization operation, the interrupt vectors of the second memory are transferred to the area of the first memory. Detects whether the initialization operation performed by this CPU has been completed,
A write inhibit means for inhibiting writing by the CPU to at least an area in the area of the first memory in which the interrupt vector for runaway processing is stored after the end is detected, and the CPU system A runaway prevention device was installed.
(作用)
上記構成によると、初期化動作時に割込みベクタの転送
が行われて、その後のCPUが行う割込みに対する処理
を指示可能となるとともに、この転送動作終了後に、暴
走処理用の割込みベクタが格納されたエリアが書込み禁
止となり、当該割込みベクタの保護がなされ、暴走検出
後の的確な暴走処理を行い得る。(Function) According to the above configuration, the interrupt vector is transferred during the initialization operation, and it is possible to instruct subsequent processing for interrupts to be performed by the CPU, and after this transfer operation is completed, the interrupt vector for runaway processing is stored. The area in which the interrupt has occurred becomes write-inhibited, the interrupt vector is protected, and accurate runaway processing can be performed after the runaway is detected.
(実施例)
以下、添付図面を参照して本発明の一実施例を説明する
。(Example) Hereinafter, an example of the present invention will be described with reference to the accompanying drawings.
第1図はCPUシステムの要部ブロック図である。1は
マイクロプロセッサ等のCPUを示し、8はメモリを示
す。メモリ8は第2図におけるRAM202を示し、こ
こではROM201は示されないが各種バス.コントロ
ール信号によってCPUと接続されている。また、デー
タの内容は既に説明したので省略する。FIG. 1 is a block diagram of the main parts of the CPU system. 1 indicates a CPU such as a microprocessor, and 8 indicates a memory. The memory 8 represents the RAM 202 in FIG. 2, and although the ROM 201 is not shown here, various buses. It is connected to the CPU by control signals. Further, since the contents of the data have already been explained, their explanation will be omitted.
CPUIのアドレス/データ端子ADから出力されるア
ドレスデータはアドレスラッチ回Fl!I2にラッチさ
れてアドレスバス10を介してメモリ8のアドレス端子
A及びアドレスデコーダ3へ与えられる。また同じく、
アドレス/データ端子ADから出力されるデータはアド
レス・データ多重バス9を介してメモリ8の入出力端子
I/Oへ与えられる。The address data output from the address/data terminal AD of the CPUI is the address latch time Fl! I2 is latched and applied to address terminal A of memory 8 and address decoder 3 via address bus 10. Similarly,
Data output from address/data terminal AD is applied to input/output terminal I/O of memory 8 via address/data multiplex bus 9.
アドレスデコーダ3はメモリ8内の第2図に示したエリ
ア203以外のエリアに対応するアドレスデータを受け
取ると、信号線10AにLレベルの信号を出力し、エリ
ア203に対応するアドレスデータを受取ると信号線1
0BにLレベルの信号を出力する。4は書込み禁止信号
発生回路を示し、信号線20を介して初期化動作の開始
信号を受けて立止り、このときよりCPUIが初期化動
作を終了する時間をカウントし、カウントアップ後に信
号線13の信号をHレベルからLレベルへ遷移させる。When address decoder 3 receives address data corresponding to an area other than area 203 shown in FIG. 2 in memory 8, it outputs an L level signal to signal line 10A, and when address data corresponding to area 203 is received, Signal line 1
Outputs an L level signal to 0B. Reference numeral 4 indicates a write inhibit signal generation circuit, which stops upon receiving the start signal of the initialization operation via the signal line 20. From this point on, the CPUI counts the time to complete the initialization operation, and after counting up, the signal line 13 The signal is caused to transition from H level to L level.
信号線10B,13の信号はオアゲート18で論理和演
算され信号線12を介してアンドゲート17へ与えられ
る。アンドゲート17に与えられた信号線10A,12
の信号は論理積演算されて信号線11を介してメモリ8
のチップセレクト端子C1へ与えられる。The signals on the signal lines 10B and 13 are logically summed by an OR gate 18 and applied to an AND gate 17 via a signal line 12. Signal lines 10A and 12 given to AND gate 17
The signals are logically ANDed and sent to the memory 8 via the signal line 11.
is applied to the chip select terminal C1.
CPUIのステータス端子82〜SOからは信号線21
を介してバスコントローラ5ヘステータス信号が出力さ
れる。バスコントローラ5はステータス信号に基づいて
、CPUIのリード/ライトサイクルに合致させて信号
線14を介してワード信号(L)、信号線15を介して
ライト信号(L)を出力する。リード信号は、信号線2
2を介して書込み禁止信号発生回路4のディスエープル
信号とされ、信号線14を介してメモリ8のリード端子
RDへ与えられる。バスコントローラ5より信号線15
を介して出力された信号は暴走監視回路7から与えられ
る暴走検出信号とオアゲート6において論理積演算され
て信号線19を介してメモリ8のライト端子WRへ与え
られる。暴走監視回路7は、ウオッチドッグタイマ等で
、CPUIの暴走を検出しその出力信号は信号線16を
介してCPUIのマスク不能割込端子NMIへ与えられ
ている。Signal line 21 from CPUI status terminal 82 to SO
A status signal is output to the bus controller 5 via. Based on the status signal, the bus controller 5 outputs a word signal (L) via the signal line 14 and a write signal (L) via the signal line 15 in accordance with the read/write cycle of the CPUI. The read signal is signal line 2
2 as a disable signal for the write inhibit signal generating circuit 4, and is applied to the read terminal RD of the memory 8 via the signal line 14. Signal line 15 from bus controller 5
The signal outputted via the runaway monitoring circuit 7 is logically ANDed with the runaway detection signal provided from the runaway monitoring circuit 7 in the OR gate 6, and is provided to the write terminal WR of the memory 8 via the signal line 19. The runaway monitoring circuit 7 detects runaway of the CPUI using a watchdog timer or the like, and its output signal is applied to a non-maskable interrupt terminal NMI of the CPUI via a signal line 16.
このように構成されたCPUシステムでは、電源投入等
により、第2図で説明したイニシャルプログラムローダ
が起動され、ROM201内の割込みベクタがメモリ8
(RAM202 )のエリア203へ転送される処理
等が行われる。このとき、書込み禁止信号発生回路4は
タイマのカウント動作中であり、その出力はHレベルで
あるから、エリア203のアドレスデータがアドレスデ
コーダ3へ与えられ信号線10BからLレベルの信号が
与えられてもオアゲート18の出力はLレベルであり、
アンドゲート17の出力もLレベルとなるから、メモリ
8はチップセレクトされ書込み可能である。In the CPU system configured in this way, when the power is turned on, the initial program loader explained in FIG.
Processing such as transferring the data to area 203 of (RAM 202) is performed. At this time, the write inhibit signal generating circuit 4 is in the counting operation of the timer and its output is at H level, so the address data of area 203 is given to the address decoder 3 and a signal at L level is given from the signal line 10B. Even if the output of the OR gate 18 is L level,
Since the output of the AND gate 17 also becomes L level, the memory 8 is chip-selected and can be written to.
上記のような初期化動作が終了すると、書込み禁止信号
発生回路4のタイマのタイムアップにより信号線13へ
Hレベルの信号が出力され、エリア203のアドレスデ
ータがアドレスデコーダ3へ与えられるとオアゲート1
8の出力及びアンドゲート1γの出力をHレベルとして
、メモリ8に対する書込みが禁止される。なお、メモリ
8のエリア203に対する続出し時には、バスコントロ
ーラ5から信号線22を介して書込み禁止信号発生回路
4ヘディスエープル信号が与えられ、信号線13の信号
がLレベルとされるから、信号線11の信号はLレベル
となり読出しは可能となる。When the initialization operation as described above is completed, the timer of the write inhibit signal generation circuit 4 times out and an H level signal is output to the signal line 13, and when the address data of the area 203 is given to the address decoder 3, the OR gate 1
8 and the output of AND gate 1γ are set to H level, and writing to memory 8 is prohibited. In addition, when successive data is written to the area 203 of the memory 8, the write inhibit signal generation circuit 4 is given a disable signal from the bus controller 5 via the signal line 22, and the signal on the signal line 13 is set to L level. The signal becomes L level and reading becomes possible.
また、暴走監視回路7がCPUIの暴走を検出した場合
には、その出力がHレベルとされメモリ8のライト端子
WRへHレベルの信号が与えられて書込みが禁止される
とともに、CPUIのマスク不能割込端子NMIへHレ
ベルの信号が与えられて、CPUIはこれに基づきエリ
ア203内の暴走処理用の割込みベクタを検索し、これ
に基づき各種の退避等を行ってシステム停止する等の処
理を行う。Further, when the runaway monitoring circuit 7 detects a runaway of the CPUI, its output becomes H level and a H level signal is given to the write terminal WR of the memory 8 to inhibit writing, and the CPUI cannot be masked. An H level signal is given to the interrupt terminal NMI, and based on this, the CPU searches for an interrupt vector for runaway processing in the area 203, and based on this, performs various save operations and performs processes such as stopping the system. conduct.
なお、本実施例では、エリア203全体に対する書込み
を禁止したが、少なくとも暴走処理用の割込みベクタの
格納領域を書込み禁止とすればよい。Note that in this embodiment, writing to the entire area 203 is prohibited, but at least the storage area for interrupt vectors for runaway processing may be prohibited from writing.
また、初期化動作の終了(より正確には、割込みベクタ
転送終了)をタイマではなく、CPUIからの通知等に
よって検出してもよい。また、書込み禁止の制御はメモ
リ8のライト端子WRに対して行ってもよい。Furthermore, the end of the initialization operation (more precisely, the end of interrupt vector transfer) may be detected not by the timer but by a notification from the CPUI or the like. Further, write prohibition control may be performed on the write terminal WR of the memory 8.
[発明の効果]
以上説明したように本発明によれば、初期化動作後に、
暴走処理用の割込みベクタの格納エリアが書込み禁止と
なるので、暴走が生じてから暴走検出の間に上記エリア
のベクタが書換えられることはなく、暴走検出後の暴走
処理を的確に行い得る。[Effects of the Invention] As explained above, according to the present invention, after the initialization operation,
Since the storage area for interrupt vectors for runaway processing is prohibited from writing, the vectors in the area will not be rewritten between runaway detection and runaway processing, and runaway processing after runaway detection can be performed accurately.
第1図は本発明の一実施例を適用したCPUシステムの
ブロック図、第2図はCPUの主メモリのメモリマップ
を示す図である。
l・・・CPU
2・・・アドレスラッチ回路
3・・・アドレスデコーダ
4・・・書込み禁止信号発生回路
5・・・バスコントローラ
7・・・暴走監視回路
8・・・メモリ
201・・・ROM
202・・・RAM
203・・・エリアFIG. 1 is a block diagram of a CPU system to which an embodiment of the present invention is applied, and FIG. 2 is a diagram showing a memory map of the main memory of the CPU. l... CPU 2... Address latch circuit 3... Address decoder 4... Write inhibit signal generation circuit 5... Bus controller 7... Runaway monitoring circuit 8... Memory 201... ROM 202...RAM 203...Area
Claims (1)
と、 CPUの暴走を監視する暴走監視回路と、 この暴走監視回路から前記CPUに対する割込みに対応
して当該CPUが行うべき処理に関する暴走処理用の割
込みベクタを含む割込みベクタが予め書込まれている第
2のメモリと、 初期化動作時に前記第2のメモリの割込みベクタを前記
第1のメモリの前記エリアへ転送し、その後発生する割
込みに当該エリアの割込みベクタを用いて対応処理する
CPUと、このCPUが行う初期化動作が終了したか否
か検出し、終了を検出した後には前記第1のメモリの前
記エリアのうち、少なくとも前記暴走処理用の割込みベ
クタが格納されたエリアに対する前記CPUによる書込
みを禁止する書込み禁止手段とを備えたことを特徴とす
るCPUシステムの暴走防止装置。[Scope of Claims] A first memory having an area in which an interrupt vector is written; a runaway monitoring circuit that monitors runaway of the CPU; a second memory in which interrupt vectors including interrupt vectors for runaway processing related to processing are written in advance; and during an initialization operation, transfer the interrupt vectors of the second memory to the area of the first memory; The CPU processes the interrupt that occurs thereafter using the interrupt vector of the area, and detects whether the initialization operation performed by this CPU is completed, and after detecting the completion, the CPU processes the interrupt vector of the area of the first memory. A runaway prevention device for a CPU system, comprising a write inhibiting means for inhibiting writing by the CPU to at least an area in which the interrupt vector for runaway processing is stored.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1186366A JPH0351921A (en) | 1989-07-19 | 1989-07-19 | Runaway preventing device for cpu system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1186366A JPH0351921A (en) | 1989-07-19 | 1989-07-19 | Runaway preventing device for cpu system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0351921A true JPH0351921A (en) | 1991-03-06 |
Family
ID=16187123
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1186366A Pending JPH0351921A (en) | 1989-07-19 | 1989-07-19 | Runaway preventing device for cpu system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0351921A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| DE10017934A1 (en) * | 2000-04-11 | 2001-08-09 | Fujitsu Siemens Computers Gmbh | Method for handling interrupts for a computer system with a CPU and a system bus in which a multiplexor is used to redirect address to an interrupt base address register to optimize system speed for soft or hard boot-ups |
-
1989
- 1989-07-19 JP JP1186366A patent/JPH0351921A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| DE10017934A1 (en) * | 2000-04-11 | 2001-08-09 | Fujitsu Siemens Computers Gmbh | Method for handling interrupts for a computer system with a CPU and a system bus in which a multiplexor is used to redirect address to an interrupt base address register to optimize system speed for soft or hard boot-ups |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0316904A2 (en) | Arithmetic processor performing mask and trap operations for exceptions | |
| US5257269A (en) | Error controller for use in debugging microprocessor | |
| JPH01108653A (en) | Memory content protection circuit | |
| JP3491358B2 (en) | Power cut-off detection device | |
| JPS58197553A (en) | Program monitor | |
| JPH0351921A (en) | Runaway preventing device for cpu system | |
| EP0142983B1 (en) | Fault protection flip flop | |
| JP2001188687A (en) | Microcomputer | |
| JPH02100743A (en) | Electronic equipment | |
| JPS59112494A (en) | Memory testing system | |
| JPS62175834A (en) | Detecting circuit for runaway of central processing unit | |
| JPS6057439A (en) | Stack overflow detection device | |
| JPH0258648B2 (en) | ||
| JPH01251240A (en) | Runaway detecting system | |
| JPH0640313B2 (en) | Information processing equipment | |
| JPS63155330A (en) | Microprogram controller | |
| JPH05241966A (en) | Memory controller | |
| JPS61279941A (en) | Fault detector for computer | |
| JPH0575845U (en) | CPU interrupt table data fixed circuit | |
| JPH02224138A (en) | Restarting system for information processor | |
| JPS6336014B2 (en) | ||
| JPH05250203A (en) | In-circuit emulator | |
| JPS61134850A (en) | Debugging method of subsequent processor | |
| JPS63282532A (en) | Memory control system | |
| JPH0480860A (en) | Program loading system |