JPH06195245A - Monitor timer device - Google Patents

Monitor timer device

Info

Publication number
JPH06195245A
JPH06195245A JP4356419A JP35641992A JPH06195245A JP H06195245 A JPH06195245 A JP H06195245A JP 4356419 A JP4356419 A JP 4356419A JP 35641992 A JP35641992 A JP 35641992A JP H06195245 A JPH06195245 A JP H06195245A
Authority
JP
Japan
Prior art keywords
timer
signal
address
reset
shift register
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
JP4356419A
Other languages
Japanese (ja)
Inventor
Megumi Hino
恵 日野
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP4356419A priority Critical patent/JPH06195245A/en
Publication of JPH06195245A publication Critical patent/JPH06195245A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To detect the runaway of a program by outputting an internal reset signal in accordance with the overflow signal of a timer and the output of a shift register. CONSTITUTION:Data 11 showing measuring time shorter than the measuring time of a monitor timer 1 is given to a register 10, and the measuring time of the timer 7 is set. At normal time, a timing signal 1 is generated at a time interval between the measuring time of the monitor timer 2 and the measuring time of the timer 7. Thus, the monitor timer 2 does not generate the overflow signal 4, and an internal reset signal 6 is not outputted. When the program runs away, an interval when the timing signal 1 is generated becomes short, the overflow signal 8 of the timer 7 is not generated and the shift register 9 is not reset. Namely, the shift register 9 is set by the timing signal 1 when runaway is started after it is reset, and it is set again without being reset. A reset circuit 5 operates by the output of the shift register 9.

Description

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

【0001】[0001]

【産業上の利用分野】この発明はコンピュータシステム
においてプログラムの実行タイミングを監視する監視タ
イマ装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a monitor timer device for monitoring program execution timing in a computer system.

【0002】[0002]

【従来の技術】図3は従来の監視タイマ装置を示すブロ
ック図であり、図において、1はCPUがプログラムの
命令を実行する毎に発生するタイミング信号、2はタイ
ミング信号1によりカウントをスタートして一定時間を
計測する監視タイマ、3は監視タイマ2がカウントする
システムクロック、4は監視タイマ2が一定時間を計測
したときに出力するオーバフロー信号、5はオーバフロ
ー信号4が加えられるリセット回路、6はリセット回路
5からオーバフロー信号4に応じて出力される内部リセ
ット信号である。
2. Description of the Related Art FIG. 3 is a block diagram showing a conventional monitoring timer device. In FIG. 3, 1 is a timing signal generated each time a CPU executes a program instruction, and 2 is a timing signal 1 which starts counting. A monitoring timer for measuring a fixed time by 3; a system clock counted by the monitoring timer 2, 4: an overflow signal output when the monitoring timer 2 measures a fixed time, 5: a reset circuit to which the overflow signal 4 is added, 6 Is an internal reset signal output from the reset circuit 5 in response to the overflow signal 4.

【0003】次に動作について説明する。プログラムの
命令を実行する毎にタイミング信号1が監視タイマ2に
加えられると、監視タイマ2はシステムクロック3をカ
ウントアップ又はカウントダウンして時間を計測する。
プログラムの実行処理が正常に行われていれば、タイミ
ング信号1は一定時間以内に発生するので、監視タイマ
2はオーバフローする前にタイミング信号1によりカウ
ント値をスタート時の値に戻される。従ってオーバーフ
ロー信号4が発生することはない。
Next, the operation will be described. When the timing signal 1 is added to the monitoring timer 2 every time the instruction of the program is executed, the monitoring timer 2 counts up or down the system clock 3 to measure the time.
If the program execution process is normally performed, the timing signal 1 is generated within a fixed time, and therefore the monitoring timer 2 returns the count value to the value at the start by the timing signal 1 before overflow. Therefore, the overflow signal 4 does not occur.

【0004】システムの異常によりプログラムの実行が
遅れたりあるいは実行が停止すると、タイミング信号1
が一定時間以内に発生しなくなり、従って、監視タイマ
2は一定時間を計測してオーバフロー信号4を発生す
る。このオーバフロー信号に応じてリセット回路5が内
部リセット信号6を出力して、システム内部をリセット
する。
When the execution of the program is delayed or stopped due to an abnormality in the system, the timing signal 1
Does not occur within a fixed time, and therefore the monitoring timer 2 generates an overflow signal 4 by measuring the fixed time. In response to this overflow signal, the reset circuit 5 outputs the internal reset signal 6 to reset the inside of the system.

【0005】[0005]

【発明が解決しようとする課題】従来の監視タイマ装置
は以上のように構成されているので、プログラムの実行
の遅れや停止等の異常を検出することはできるが、プロ
グラムが暴走したり、あるいは同じ命令アドレスが続け
て繰り返されたりするような異常を検出することはでき
ない等の問題点があった。
Since the conventional monitoring timer device is configured as described above, it is possible to detect an abnormality such as a delay in execution of the program or a stop, but the program runs out of control, or There is a problem that it is not possible to detect an abnormality such that the same instruction address is repeatedly repeated.

【0006】この発明は上記のような問題点を解決する
ためになされたもので、プログラムが暴走したり、同じ
アドレスが繰り返されたりすることを検出することので
きる監視タイマ装置を得ることを目的としている。
The present invention has been made to solve the above problems, and an object of the present invention is to obtain a monitoring timer device capable of detecting a program runaway or the same address being repeated. I am trying.

【0007】[0007]

【課題を解決するための手段】請求項1の発明に係る監
視タイマ装置は、監視タイマの計測時間より短い計測時
間を持つ別のタイマを設けると共に、この別のタイマの
オーバフロー信号でリセットされタイミング信号でセッ
トされるシフトレジスタを設け、このシフトレジスタの
出力をリセット回路に加えるようにしたものである。
According to a first aspect of the present invention, there is provided a monitoring timer device, wherein another timer having a measuring time shorter than that of the monitoring timer is provided, and the timing is reset by an overflow signal of the other timer. A shift register set by a signal is provided, and the output of this shift register is added to the reset circuit.

【0008】請求項2の発明に係る監視タイマ装置は、
今回の実行アドレスラッチと、前回実行アドレスラッチ
とを設けると共に、両ラッチのアドレスの一致を検出す
る比較器とを設けたものである。
A monitoring timer device according to the invention of claim 2 is
The present execution address latch and the previous execution address latch are provided, and a comparator for detecting the coincidence of the addresses of both latches is provided.

【0009】[0009]

【作用】請求項1の発明における監視タイマ装置は、暴
走時には速いタイミングでタイミング信号が発生するの
で、別のタイマはオーバフロー信号を発生しなくなり、
このためシフトレジスタはセットされた後で、直ぐにも
う1度セットされ、このときのシフトレジスタの出力に
基づいてリセット回路が内部リセット信号を出力する。
In the monitoring timer device according to the present invention, since the timing signal is generated at a fast timing when the runaway occurs, another timer does not generate an overflow signal,
Therefore, the shift register is set again immediately after it is set, and the reset circuit outputs an internal reset signal based on the output of the shift register at this time.

【0010】請求項2の発明における監視タイマ装置
は、今回の実行アドレスと前回の実行アドレスとを保持
し、保持した2つの実行アドレスを比較器で比較し、一
致した場合、内部リセット信号を発生する。
According to another aspect of the invention, in the monitoring timer device, the execution address of this time and the execution address of the previous time are held, the two held execution addresses are compared by the comparator, and if they match, an internal reset signal is generated. To do.

【0011】[0011]

【実施例】【Example】

実施例1.以下、請求項1の発明の一実施例を図につい
て説明する。図1においては図3と同一部分には同一符
号を付して説明を省略する。図1において、7は監視タ
イマ2とは別に設けられた計測時間の短いタイマで、タ
イミング信号1により監視タイマ2と共にシステムクロ
ック3をカウントする。8はタイマ7のオーバフロー信
号、9はタイミング信号1でセットされ、オーバフロー
信号8でリセットされるシフトレジスタで、その出力が
リセット回路5に加えられる。10はタイマ7に計測時
間を設定するレジスタ、11はレジスタ10に与えられ
る計測時間のデータである。尚、監視タイマ2を第1の
タイマとし、タイマ7を第2のタイマとする。
Example 1. An embodiment of the invention of claim 1 will be described below with reference to the drawings. In FIG. 1, the same parts as those in FIG. In FIG. 1, 7 is a timer having a short measuring time, which is provided separately from the monitoring timer 2, and counts the system clock 3 together with the monitoring timer 2 by the timing signal 1. 8 is an overflow signal of the timer 7, 9 is a shift register which is set by the timing signal 1 and is reset by the overflow signal 8, the output of which is applied to the reset circuit 5. Reference numeral 10 is a register for setting the measurement time in the timer 7, and 11 is data of the measurement time given to the register 10. The monitoring timer 2 is the first timer and the timer 7 is the second timer.

【0012】次に動作について説明する。先ず、ユーザ
は監視タイマ1の計測時間より短い、計測時間を示すデ
ータ11をレジスタ10に与えてタイマ7の計測時間を
設定する。正常時には監視タイマ2の計測時間とタイマ
7の計測時間との間の時間間隔でタイミング信号1が発
生する。従って、監視タイマ2は従来と同様にオーバフ
ロー信号4を発生せず、内部リセット信号6は出力され
ない。また、タイマ7はタイミング信号1でスタートす
るが、次のタイミング信号1までの間にオーバフローし
てオーバフロー信号8を発生し、シフトレジスタ9をリ
セットする。シフトレジスタ9はタイミング信号1でセ
ットされた後、リセットされるので、出力は得られず、
リセット回路5は動作しない。
Next, the operation will be described. First, the user sets the measurement time of the timer 7 by giving the register 10 the data 11 indicating the measurement time, which is shorter than the measurement time of the monitoring timer 1. In the normal state, the timing signal 1 is generated at a time interval between the measurement time of the monitoring timer 2 and the measurement time of the timer 7. Therefore, the monitor timer 2 does not generate the overflow signal 4 and the internal reset signal 6 is not output as in the conventional case. The timer 7 starts with the timing signal 1, but overflows until the next timing signal 1 to generate the overflow signal 8 and reset the shift register 9. Since the shift register 9 is reset after being set by the timing signal 1, no output is obtained,
The reset circuit 5 does not operate.

【0013】次に、プログラムが暴走すると、タイミン
グ信号1が発生する間隔が短くなるので、タイマ7のオ
ーバフロー信号8が発生しなくなり、シフトレジスタ9
はリセットされなくなる。即ち、シフトレジスタ9は一
旦リセットされた後で暴走が始まるとタイミング信号1
でセットされ、この後、リセットされることなく、もう
一度セットされる。このときのシフトレジスタ9の出力
により、リセット回路5が動作して内部リセット信号6
が出力される。
Next, when the program goes out of control, the interval at which the timing signal 1 is generated is shortened, so that the overflow signal 8 of the timer 7 is not generated and the shift register 9 is generated.
Will not be reset. That is, the shift register 9 is reset once, and when the runaway starts, the timing signal 1
And then set again without being reset. At this time, the output of the shift register 9 causes the reset circuit 5 to operate and the internal reset signal 6
Is output.

【0014】実施例2.図2は請求項2の発明の実施例
を示す。図2において、12は命令のアドレス、13は
アドレス取込み用のタイミング信号、14はタイミング
信号13によりアドレス12を取込むアドレス取込みレ
ジスタ、15はアドレス取込みレジスタ14から今回実
行される命令のアドレスをタイミング信号1により保持
する実行アドレスラッチ、16は実行アドレスラッチ1
5に保持されたアドレスをタイミング信号1により取込
み、前回の実行アドレスとして保持する前回実行アドレ
スラッチ、17は実行アドレスラッチ15に保持された
今回のアドレスと前回実行アドレスラッチ16に保持さ
れた前回のアドレスとの一致を検出する比較器、18は
比較器17が両アドレスの一致を検出したとき出力する
異常検出信号である。
Example 2. FIG. 2 shows an embodiment of the invention of claim 2. In FIG. 2, 12 is the address of the instruction, 13 is a timing signal for fetching the address, 14 is an address fetch register that fetches the address 12 by the timing signal 13, and 15 is the timing of the address of the instruction to be executed this time from the address fetch register 14. Execution address latch held by signal 1, 16 is execution address latch 1
The previous execution address latch that takes in the address held in 5 by the timing signal 1 and holds it as the previous execution address, 17 is the current address held in the execution address latch 15 and the previous execution address latch held in the previous execution address latch 16. A comparator for detecting a match with the address, and 18 is an abnormality detection signal output when the comparator 17 detects a match for both addresses.

【0015】次に動作について説明する。アドレス取込
みレジスタ14はタイミング信号13により、実行され
る命令のアドレス12を取込んで保持する。実行アドレ
スラッチ15はタイミング信号1により、アドレス取込
みレジスタ13に保持されたアドレスを取込んで保持す
る。これと共に前回実行アドレスラッチ16は実行アド
レスラッチ15からアドレスを取込み、これを前回実行
アドレスとして保持する。比較器17は実行アドレスラ
ッチ15及び前回実行アドレスラッチ16にそれぞれ保
持された2つのアドレスを比較する。異常により同じア
ドレスが続いて2回繰り返された場合は、比較器17は
今回のアドレスと前回のアドレスとの一致を検出して、
異常検出信号18を出力する。
Next, the operation will be described. The address fetch register 14 fetches and holds the address 12 of the instruction to be executed by the timing signal 13. The execution address latch 15 takes in and holds the address held in the address fetch register 13 in response to the timing signal 1. Along with this, the previous execution address latch 16 fetches the address from the execution address latch 15 and holds it as the previous execution address. The comparator 17 compares the two addresses held in the execution address latch 15 and the previous execution address latch 16, respectively. If the same address is repeated twice due to an abnormality, the comparator 17 detects a match between the current address and the previous address,
The abnormality detection signal 18 is output.

【0016】[0016]

【発明の効果】以上のように、請求項1の発明によれ
ば、監視タイマより短い計測時間を持つ別のタイマを設
けると共に、このタイマのオーバフロー信号でリセット
され、タイミング信号でセットされるシフトレジスタを
設ける構成としたので、命令の実行の遅れ、停止等の異
常の検出と共にプログラムの暴走による異常の検出も行
うことができる効果がある。
As described above, according to the first aspect of the present invention, another timer having a measuring time shorter than that of the monitoring timer is provided, and the shift signal reset by the overflow signal of this timer and set by the timing signal. Since the register is provided, there is an effect that it is possible to detect an abnormality such as a delay in execution of an instruction or a stop, and also an abnormality due to a program runaway.

【0017】請求項2の発明によれば、今回実行される
命令のアドレスと前回実行された命令のアドレスとの一
致を検出するように構成したので、同じアドレスが2回
繰り返される異常を検出することができる効果がある。
According to the second aspect of the invention, since the coincidence between the address of the instruction executed this time and the address of the instruction executed last time is detected, an abnormality in which the same address is repeated twice is detected. There is an effect that can be.

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

【図1】請求項1の発明の一実施例を示すブロック図で
ある。
FIG. 1 is a block diagram showing an embodiment of the invention of claim 1;

【図2】請求項2の発明の一実施例を示すブロック図で
ある。
FIG. 2 is a block diagram showing an embodiment of the invention of claim 2;

【図3】従来の監視タイマ装置を示すブロック図であ
る。
FIG. 3 is a block diagram showing a conventional monitoring timer device.

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

1 タイミング信号 2 監視タイマ(第1のタイマ) 4,8 オーバフロー信号 5 リセット回路 6 内部リセット信号 7 タイマ(第2のタイマ) 9 シフトレジスタ 15 実行アドレスラッチ 16 前回実行アドレスラッチ 17 比較器 1 Timing Signal 2 Monitoring Timer (First Timer) 4, 8 Overflow Signal 5 Reset Circuit 6 Internal Reset Signal 7 Timer (Second Timer) 9 Shift Register 15 Execution Address Latch 16 Previous Execution Address Latch 17 Comparator

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 所定の計測時間を有し、命令の実行を示
すタイミング信号により動作を開始される第1のタイマ
と、上記第1のタイマの計測時間より短い計測時間を有
し、上記タイミング信号により動作を開始される第2の
タイマと、上記タイミング信号でセットされ上記第2の
タイマのオーバフロー信号でリセットされるシフトレジ
スタと、上記第1のタイマのオーバフロー信号及び上記
シフトレジスタの出力に応じて内部リセット信号を出力
するリセット回路とを備えた監視タイマ装置。
1. A first timer having a predetermined measurement time and started to operate by a timing signal indicating execution of an instruction; and a measurement time shorter than the measurement time of the first timer, the timing A second timer which is started by a signal; a shift register which is set by the timing signal and is reset by the overflow signal of the second timer; and an overflow signal of the first timer and an output of the shift register. A monitoring timer device including a reset circuit that outputs an internal reset signal in response thereto.
【請求項2】 今回実行される命令のアドレスを保持す
る実行アドレスラッチと、前回実行された命令のアドレ
スを保持する前回実行アドレスラッチと、上記実行アド
レスラッチに保持されたアドレスと上記前回実行アドレ
スラッチに保持されたアドレスとの一致を検出する比較
器とを備えた監視タイマ装置。
2. An execution address latch holding an address of an instruction executed this time, a previous execution address latch holding an address of a previously executed instruction, an address held in the execution address latch, and the previous execution address. A monitoring timer device including a comparator for detecting a match with an address held in a latch.
JP4356419A 1992-12-22 1992-12-22 Monitor timer device Pending JPH06195245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4356419A JPH06195245A (en) 1992-12-22 1992-12-22 Monitor timer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4356419A JPH06195245A (en) 1992-12-22 1992-12-22 Monitor timer device

Publications (1)

Publication Number Publication Date
JPH06195245A true JPH06195245A (en) 1994-07-15

Family

ID=18448922

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4356419A Pending JPH06195245A (en) 1992-12-22 1992-12-22 Monitor timer device

Country Status (1)

Country Link
JP (1) JPH06195245A (en)

Similar Documents

Publication Publication Date Title
JPH09305412A (en) Microcomputer having maximum interruption inhibition period mesuring function
US7360109B2 (en) Measuring the interval of a signal using a counter and providing the value to a processor
JPH06195245A (en) Monitor timer device
JP2711111B2 (en) Data processing device, measuring method and control method
JP2737645B2 (en) Program debug device
JP2604562B2 (en) Pulse interval measuring device
JPH10255489A (en) Microcomputer
JP3049671B2 (en) DC motor speed control device
JP2804406B2 (en) Pulse measuring device
JPH09114541A (en) Interruption generation time confirming circuit and processor
JPH0736742A (en) Program operation monitoring circuit
JPH11102298A (en) Timer control method, and its circuit and program recording medium
JPH04106637A (en) Stall detection circuit
JPS63241622A (en) Data processor
JPS6031062A (en) Pulse cycle measuring circuit
JP3523059B2 (en) Horizontal synchronization signal frequency detection method and horizontal synchronization signal frequency detection circuit
JPH0560002A (en) Revolution number measuring device for internal combustion engine
JPH0498540A (en) Processor load monitoring system
JPH0231247A (en) Data processor
JPH04225432A (en) Interruption processing time control system for one-chip microcomputer
JPH09113556A (en) Pulse measuring circuit and measuring method thereof
JPH0894660A (en) Pulse measuring apparatus
JPH07260845A (en) Pulse period measuring circuit
JPS5935250A (en) Program controller
JPH06222961A (en) Watchdog timer