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
JPS6363932B2 - - Google Patents
[go: Go Back, main page]

JPS6363932B2 - - Google Patents

Info

Publication number
JPS6363932B2
JPS6363932B2 JP57229704A JP22970482A JPS6363932B2 JP S6363932 B2 JPS6363932 B2 JP S6363932B2 JP 57229704 A JP57229704 A JP 57229704A JP 22970482 A JP22970482 A JP 22970482A JP S6363932 B2 JPS6363932 B2 JP S6363932B2
Authority
JP
Japan
Prior art keywords
cpu
output
access
time
counter
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
Application number
JP57229704A
Other languages
Japanese (ja)
Other versions
JPS59121555A (en
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 filed Critical
Priority to JP57229704A priority Critical patent/JPS59121555A/en
Publication of JPS59121555A publication Critical patent/JPS59121555A/en
Publication of JPS6363932B2 publication Critical patent/JPS6363932B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 発明の技術分野 本発明は、マイクロプロセツサ(以下CPUと
略す)システムにおけるプログラムの暴走を監視
するための、CPU暴走監視方式に関するもので
ある。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a CPU runaway monitoring method for monitoring program runaway in a microprocessor (hereinafter abbreviated as CPU) system.

従来技術と問題点 CPU、リードオンリーメモリ、ランダムアク
セスメモリ、入出力(I/O)ポート等からなる
CPUシステムにおいて、CPUがプログラムを実
行中に暴走した場合には、暴走したことによつて
発生するアドレスやデータによる、本来の目的以
外のアクセスによつてI/Oポートの内容やデー
タの内容が乱されるため、以後正しい処理を行う
ことができなくなる。このためCPUシステムに
おいてはプログラムの暴走を監視して、暴走が生
じた場合は直ちにCPUの動作を停止する方法が
取られている。
Conventional technology and problems Consists of CPU, read-only memory, random access memory, input/output (I/O) ports, etc.
In a CPU system, if the CPU runs out of control while executing a program, the contents of the I/O port or data may be damaged due to accesses other than the original purpose using addresses or data generated by the runaway. Because of this, correct processing cannot be performed from now on. For this reason, in CPU systems, a method is used to monitor program runaway and immediately stop the CPU operation if runaway occurs.

このような暴走検出の方法の一つとして、ウオ
ツチドツグタイマ(以下WDTと略す)回路が従
来から用いられている。CPUには通常周期的に
割込みがかけられており、この割込みに対する応
答としてCPUからアクセスが行われるが、WDT
回路は周期割込みに対する応答としての、CPU
からのアクセスのインターバル時間の異常を検出
するものであり、CPUのアクセスインターバル
がある設定時間の上限より長かつた場合や、逆に
ある設定時間の下限より短かかつた場合に、異常
検出信号を出力するものである。
As one method for detecting such runaway, a watchdog timer (hereinafter abbreviated as WDT) circuit has been used. Normally, interrupts are periodically applied to the CPU, and accesses are made from the CPU in response to these interrupts, but WDT
The circuit responds to periodic interrupts by
It detects an abnormality in the access interval time from the CPU, and an abnormality detection signal is generated when the CPU access interval is longer than the upper limit of a certain set time, or conversely, when it is shorter than the lower limit of a certain set time. This outputs the following.

WDT回路において、上述のごとき異常検出時
間を設定するための手段としては、従来一般にモ
ノステーブルマルチバイブレータを用いて構成し
たタイマ回路が使用されている。しかしながらモ
ノステーブルマルチバイブレータはノイズによつ
て誤動作を生じやすく、また動作時間を決定する
ためにC,Rからなる時定数回路を使用するため
設定時間に誤差が生じやすく、従つてC,Rの調
整が必要となり製作に手間がかかる。このように
従来のWDT回路は、モノステーブルマルチバイ
ブレータにより構成されているため、対ノイズ性
と時定数の誤差に問題があつた。
In the WDT circuit, a timer circuit configured using a monostable multivibrator has conventionally been used as means for setting the abnormality detection time as described above. However, monostable multivibrators tend to malfunction due to noise, and because they use a time constant circuit consisting of C and R to determine the operating time, errors tend to occur in the set time, so it is difficult to adjust C and R. is required and is time-consuming to manufacture. As described above, conventional WDT circuits are composed of monostable multivibrators, and therefore have problems with noise resistance and time constant errors.

発明の目的 本発明はこのような従来技術の問題点を解決し
ようとするものであつて、その目的は、WDT回
路において対ノイズ性および設定時間の誤差の問
題が生じない方式を提供することにある。
Purpose of the Invention The present invention is intended to solve the problems of the prior art, and its purpose is to provide a system that does not cause noise resistance and setting time error problems in a WDT circuit. be.

発明の構成 本発明のCPU暴走監視方式は、周期割込みに
対するCPUの応答のインターバル時間の良否を
判定して異常検出を行う手段として、カウンタと
リードオンリーメモリ(以下ROMと略す)を用
いてその検出を行うようにしたものであり、この
際CPUから設定可能なレジスタによつてROMの
上位アドレスを切替えて出力データを選択するこ
とによつて、検出設定時間の範囲を選択するとと
もに検出、非検出等の選択を行うことを可能にし
たものである。
Structure of the Invention The CPU runaway monitoring method of the present invention uses a counter and a read-only memory (hereinafter abbreviated as ROM) to detect an abnormality by determining whether the interval time of the CPU response to a periodic interrupt is good or not. At this time, by switching the upper address of the ROM and selecting the output data using a register that can be set from the CPU, the range of detection setting time can be selected, and detection or non-detection can be selected. This makes it possible to make such selections.

発明の実施例 第1図は本発明のCPU暴走監視方式の一実施
例の構成を示している。同図において1はCPU、
2はCPU1のデータバス、3はカウンタであつ
て一定周期のクロツクを端子CKに受けてこれを
計数する。4はフリツプフロツプであつて、デー
タバス2の内容Do…DmをCPU1から出力され
るアクセスパルスBをクロツク端子CKに入力さ
れることによつてラツチして、符号化した出力
Qo…Qmを発生する。5はROMであつてカウン
タ3の出力を下位アドレスに、フリツプフロツプ
4の出力Qo…Qmを上位アドレスに入力されて、
これらのアドレスAo…Amに応じて出力データ
D1,D2を発生する。出力D1はアクセスインター
バル時間の下限側の異常検出範囲において論理
“1”が出力するように書込まれており、出力D2
はアクセスインターバル時間の上限側の異常検出
範囲において論理“1”が出力するように書込ま
れている。6はアンドゲートであつて、ROM5
のD1出力とCPU1から出力されるアクセスパル
スAとの論理積の出力を発生する。7はオアゲー
トであつて、ROM5のD2出力とアンドゲート6
の出力との論理和の出力を発生する。8はクリア
パルス発生回路であつて、インバータI、抵抗R
およびコンデンサCからなる微分回路とナンドゲ
ートGとからなり、アクセスパルスAの後縁によ
つてパルスを発生してカウンタ3のクリア端子
CLRにクリアパルスとして入力することによつ
て、これをクリアする。
Embodiment of the Invention FIG. 1 shows the configuration of an embodiment of the CPU runaway monitoring system of the present invention. In the same figure, 1 is the CPU,
2 is a data bus of the CPU 1, and 3 is a counter which receives a constant cycle clock at a terminal CK and counts it. 4 is a flip-flop which latches the contents Do...Dm of the data bus 2 by inputting the access pulse B output from the CPU 1 to the clock terminal CK, and outputs the encoded data.
Qo…Qm is generated. 5 is a ROM in which the output of the counter 3 is inputted to the lower address, and the output Qo...Qm of the flip-flop 4 is inputted to the upper address.
Output data according to these addresses Ao…Am
Generates D 1 and D 2 . Output D 1 is written so that logic “1” is output in the abnormality detection range on the lower limit side of the access interval time, and output D 2
is written so that logic "1" is output in the abnormality detection range on the upper limit side of the access interval time. 6 is an AND gate, and ROM5
The output of the AND of the D1 output of the CPU 1 and the access pulse A output from the CPU 1 is generated. 7 is an OR gate, which connects the D2 output of ROM5 and AND gate 6.
Generates the output of the logical sum with the output of . 8 is a clear pulse generation circuit, which includes an inverter I and a resistor R.
It consists of a differentiator circuit consisting of a capacitor C and a NAND gate G, and generates a pulse by the trailing edge of the access pulse A to clear the counter 3's clear terminal.
Clear this by inputting it as a clear pulse to CLR.

第2図は第1図に示された実施例における
ROMの上位アドレスおよび下位アドレスに対応
する出力D1,D2の一例を示している。
FIG. 2 shows the embodiment shown in FIG.
An example of outputs D 1 and D 2 corresponding to the upper and lower addresses of the ROM is shown.

以下両図に基づいて本発明のCPU暴走監視方
式の動作を説明する。CPU1は予め動作モード
を選択してデータバス2に切替信号を出力し、こ
の出力信号は割込み信号IRQに応じてCPU1か
らアクセスごとに出力されるアクセスパルスBに
よつてフリツプフロツプ4にラツチされて、
ROM5にその上位アドレスとして入力される。
例えば動作モード“STOP”、“High”、“Low”
および“TST”に対応してROM5に入力される
上位アドレスは第2図に示すごとく“00”、“01”、
“10”および“11”である。
The operation of the CPU runaway monitoring system of the present invention will be explained below based on both figures. The CPU 1 selects the operation mode in advance and outputs a switching signal to the data bus 2, and this output signal is latched to the flip-flop 4 by the access pulse B output from the CPU 1 for each access in response to the interrupt signal IRQ.
It is input to ROM 5 as its upper address.
For example, operation mode “STOP”, “High”, “Low”
The upper addresses input to ROM5 corresponding to “TST” and “TST” are “00”, “01”,
“10” and “11”.

またCPUがプログラムを実行中においては
CPUには周期的な割込みが起動しており、CPU
はこの割込みルーチン内でアクセスパルスAが発
生するアドレスにアクセスする。前回のアクセス
におけるアクセスパルスAの後縁で、クリアパル
ス回路8のクリアパルス出力によりカウンタ3は
クリアされていて、現在のアクセスの時点では前
回のアクセスと今回のアクセス間におけるクロツ
クの計数値が、下位アドレスnとしてROM5に
入力されている。
Also, while the CPU is running the program,
Periodic interrupts are activated in the CPU, and the CPU
accesses the address where access pulse A is generated within this interrupt routine. At the trailing edge of the access pulse A in the previous access, the counter 3 is cleared by the clear pulse output from the clear pulse circuit 8, and at the time of the current access, the clock count value between the previous access and the current access is It is input to the ROM 5 as the lower address n.

このようにして選択された上位アドレスに対応
して、下位アドレスnに応じて出力されるROM
5から出力されるデータD1,D2によつて第2図
に示すごときパターンが選択され、これによつて
アクセスインターバル時間の異常検出を行う。す
なわちデータD1が“1”の状態でアクセスパル
スAが出力されたときは、今回のアクセスが早す
ぎたのであつて下限側異常として、データD2
出力されたことは今回のアクセスのタイムオーバ
であつて上限側異常として判定されたものであ
り、オアゲート7は両者の場合の論理和をとつて
異常検出信号として出力する。CPU1のアクセ
スが行われた後、すなわちアクセスパルスAの後
縁でカウンタ3はクリアされて、次の計数を開始
する。
In correspondence with the upper address selected in this way, the ROM is output according to the lower address n.
A pattern as shown in FIG. 2 is selected based on data D 1 and D 2 outputted from 5, and an abnormality in the access interval time is detected based on this pattern. In other words, when access pulse A is output when data D 1 is "1", it means that the current access was too early and an abnormality on the lower limit side, and that data D 2 is output because the access pulse A is output at the time of the current access. This is determined to be an abnormality on the upper limit side because it is over, and the OR gate 7 calculates the logical sum of both cases and outputs the result as an abnormality detection signal. After the CPU 1 accesses, the counter 3 is cleared at the trailing edge of the access pulse A and starts the next count.

このようなアクセスインターバル時間の上下限
異常検出範囲は、モード“High”と“Low”と
によつて2種類の時間に切替えることができるよ
うになつている。なお第2図においてモード
“STOP”は暴走非検出時または停止時に対応し、
またモード“TST”は検出回路等の試験用とし
て設けられている。
The upper and lower limit abnormality detection range of the access interval time can be switched to two types of time by mode "High" and "Low". In Figure 2, the mode "STOP" corresponds to when no runaway is detected or when the motor is stopped.
Furthermore, the mode "TST" is provided for testing detection circuits, etc.

発明の効果 以上説明したように本発明のCPU暴走監視方
式によれば、周期的割込みに対するCPUのアク
セスインターバル時間の異常検出にカウンタと
ROMとを用いて異常検出時間の範囲を設定する
ようにしたので、対ノイズ性、時間設定のための
回路調整等の問題を解消できるとともに、ROM
に予め何種類かのデータを書込んでおいてCPU
からフリツプフロツプを介してROMのアドレス
を設定して切替えを行うことにより、異常検出時
間範囲を切替ることができるようになり、また監
視動作の停止や試験状態の設定等の各種動作モー
ドの切替えを行うこともできるうになつた。さら
に異常検出時間範囲を変更する必要がある場合に
も、従来の回路のようにモノステーブルマルチバ
イブレータのC,Rの調整は不要であつて、
ROMのアドレス変更またはROMの交換のみに
よつて対応できるので有利である。
Effects of the Invention As explained above, according to the CPU runaway monitoring method of the present invention, a counter is used to detect an abnormality in the CPU access interval time in response to periodic interrupts.
Since the range of abnormality detection time is set using ROM, problems such as noise resistance and circuit adjustment for time setting can be solved, and the ROM
Write some types of data in advance to the CPU
By setting and switching the ROM address via the flip-flop, the abnormality detection time range can be changed, and various operation modes such as stopping monitoring operation and setting test status can be changed. I am now able to do it. Furthermore, even if it is necessary to change the abnormality detection time range, there is no need to adjust C and R of the monostable multivibrator as in conventional circuits.
This is advantageous because it can be handled simply by changing the ROM address or replacing the ROM.

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

第1図は本発明のCPU暴走監視方式の一実施
例の構成を示すブロツク図、第2図は第1図の実
施例における出力D1,D2を示す説明図である。 1……マイクロプロセツサ(CPU)、2……デ
ータバス、3……カウンタ、4……フリツプフロ
ツプ、5……リードオンリーメモリ(ROM)、
6……アンドゲート、7……オアゲート、8……
クリアパルス発生回路。
FIG. 1 is a block diagram showing the configuration of an embodiment of the CPU runaway monitoring system of the present invention, and FIG. 2 is an explanatory diagram showing the outputs D 1 and D 2 in the embodiment of FIG. 1. 1...Microprocessor (CPU), 2...Data bus, 3...Counter, 4...Flip-flop, 5...Read-only memory (ROM),
6...and gate, 7...or gate, 8...
Clear pulse generation circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 周期的割込みに対する応答としてアクセス動
作を行うマイクロプロセツサ(以下CPUという)
における該アクセス時間のインターバル時間の異
常を検出することによつてプログラムの暴走を監
視する方式において、アクセスごとにCPUの指
示を読込んで符号化して出力する記憶回路と、
CPUのアクセスごとにクリアされて一定周期の
クロツクを計数するカウンタと、前記記憶回路の
出力を上位アドレスに前記カウンタの出力を下位
アドレスに入力されて設定時間の下限および上限
を示す信号を出力するリードオンリーメモリとを
具え、CPUのアクセス信号が前記設定時間の下
限以前または上限以後に発生したとき異常検出信
号を発生することを特徴とするCPU暴走監視方
式。
1. A microprocessor (hereinafter referred to as CPU) that performs access operations in response to periodic interrupts.
In a method for monitoring runaway of a program by detecting an abnormality in the interval time of the access time, a memory circuit reads, encodes, and outputs a CPU instruction for each access;
A counter that is cleared every time the CPU accesses and counts a constant period of clocks, and the output of the storage circuit is input to the upper address and the output of the counter is input to the lower address to output a signal indicating the lower and upper limits of the set time. a read-only memory, and generates an abnormality detection signal when a CPU access signal occurs before the lower limit or after the upper limit of the set time.
JP57229704A 1982-12-28 1982-12-28 Cpu runaway supervising system Granted JPS59121555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57229704A JPS59121555A (en) 1982-12-28 1982-12-28 Cpu runaway supervising system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57229704A JPS59121555A (en) 1982-12-28 1982-12-28 Cpu runaway supervising system

Publications (2)

Publication Number Publication Date
JPS59121555A JPS59121555A (en) 1984-07-13
JPS6363932B2 true JPS6363932B2 (en) 1988-12-09

Family

ID=16896385

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57229704A Granted JPS59121555A (en) 1982-12-28 1982-12-28 Cpu runaway supervising system

Country Status (1)

Country Link
JP (1) JPS59121555A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5233613A (en) * 1988-03-29 1993-08-03 Advanced Micro Devices, Inc. Reliable watchdog timer

Also Published As

Publication number Publication date
JPS59121555A (en) 1984-07-13

Similar Documents

Publication Publication Date Title
US4456993A (en) Data processing system with error processing apparatus and error processing method
JP2708427B2 (en) Microprocessor
JPH0792765B2 (en) Input / output controller
JPH0481932A (en) Interruption controller
WO2022142232A1 (en) Method for implementing brushless direct current motor hall position sensor fault processing
JPS6363932B2 (en)
JPS5898900A (en) Microprocessor controlling system
JP2870202B2 (en) Method and apparatus for mutual monitoring between processors
JP2592525B2 (en) Error detection circuit of common bus system
JPS6111802Y2 (en)
JPH0421993A (en) Storage device
JPS592585Y2 (en) data processing equipment
JPS6165354A (en) Faulty processor detection method
JPS6288047A (en) Interface controller
JPS6344252A (en) Monitoring device for abnormal operation of electronic computer
JPH04330549A (en) Controller
JPS6033474Y2 (en) Computer abnormality detection circuit
JPS60225941A (en) Microprogram control device
JPH02150942A (en) Bus abnormality detecting circuit
JPH02242342A (en) Error avoiding method for data
JPH0230060B2 (en)
JPS5931800B2 (en) Control memory diagnostic method
JPS6213703B2 (en)
JPS5935250A (en) Program controller
JPS592050B2 (en) Signal bus failure detection method