JP4063699B2 - Program runaway detection circuit - Google Patents

Program runaway detection circuit Download PDF

Info

Publication number
JP4063699B2
JP4063699B2 JP2003085501A JP2003085501A JP4063699B2 JP 4063699 B2 JP4063699 B2 JP 4063699B2 JP 2003085501 A JP2003085501 A JP 2003085501A JP 2003085501 A JP2003085501 A JP 2003085501A JP 4063699 B2 JP4063699 B2 JP 4063699B2
Authority
JP
Japan
Prior art keywords
program
detection circuit
runaway
program signal
signal
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 - Fee Related
Application number
JP2003085501A
Other languages
Japanese (ja)
Other versions
JP2004295374A (en
Inventor
基彦 山下
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 AccessTechnica Ltd
Original Assignee
NEC AccessTechnica 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 NEC AccessTechnica Ltd filed Critical NEC AccessTechnica Ltd
Priority to JP2003085501A priority Critical patent/JP4063699B2/en
Publication of JP2004295374A publication Critical patent/JP2004295374A/en
Application granted granted Critical
Publication of JP4063699B2 publication Critical patent/JP4063699B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、プログラム暴走検出回路に関し、たとえばマイクロプロセッサーシステムなどのウォッチドッグタイマーに適用できるプログラム暴走検出回路に関する。
【0002】
【従来の技術】
従来より、マイクロプロセッサーシステムにおいて、その制御プログラムの暴走を検出する回路が種々提案されている。このようなプログラム暴走検出回路としては、制御プログラム自体やそのシーケンスの遂行工程に着目したものと、演算制御の中枢部となるCPUの動作に着目することにより、送出される制御信号の不調を監視するものとがある。
【0003】
たとえば、CPUの動作に着目したものとして、シングルチップマイクロコンピューターの「プログラム暴走検出回路」では、CPUから出力されるプログラム信号によりウォッチドッグタイマーを起動し、そのオーバーフローが生じたときにプログラム暴走検出回路のリセットを行わせている。また、起動後に、ワンショットモノマルチによって、オーバーフローの検出を所定期間だけ禁止させることにより、ウォッチドッグタイマーのリセットシーケンス内における正常な動作を保証している(たとえば、特許文献1参照)。
【0004】
【特許文献1】
特開平2−5149号公報 (第2頁、第1図)
【0005】
【発明が解決しようとする課題】
しかしながら、上記従来例によるプログラム暴走検出回路では、次のような問題が生じていた。
このようなウォッチドッグタイマーにおいて、演算処理回路(CPU)の制御プログラムが、CPUに定期的なタイマーリセット(リセットシーケンス)を指令できなくなると、これをプログラムの暴走であるとして判定させようとしている。したがって、リセットシーケンスが実行されてタイマーリセットが指令され続ける限り、制御プログラムがCPUにおいて暴走したままの状態になっても、このようなプログラムの暴走を検出できないおそれがあった。
【0006】
本発明は、これら上記課題を解決することにあり、CPUにおいてプログラムシーケンスがタイマーリセットを指令したままの状態となるような暴走モードも含めて検出することが可能なプログラム暴走検出回路の提供を目的とする。
【0007】
【課題を解決するための手段】
上記目的を達成するために、本発明の請求項1記載のプログラム暴走検出回路は、ソフトウェア制御されたマイクロプロセッサーシステムについて、その演算処理部におけるプログラムの暴走を検出するプログラム暴走検出回路であって、
マイクロプロセッサーシステムが起動すると経過時間の計測を開始し、制御プログラムによってほぼ定期的に演算処理部から出力されるプログラム信号が有効状態に遷移することにより初期化され、前記プログラム信号の有効状態への遷移が遅れたときに第一暴走モードを検出する第一タイマー手段と、
前記プログラム信号が有効状態に遷移することにより経過時間の計測を開始し、前記プログラム信号が無効状態に遷移すると初期化され、前記プログラム信号の有効状態が保持し続けると第二暴走モードを検出する第二タイマー手段とを有した構成としてある。
【0008】
このように構成することによって、CPUにおいて制御プログラムが正常に実行されていると、定期的なプログラム信号が第一タイマーに導入されて初期化が行われる。正常な実行が滞った場合には、このプログラム信号が遅れるので初期化されずに第一暴走モードとしてプログラムの暴走が検出される。また、プログラム信号が第二タイマー手段に導入されると、プログラム信号の経過時間が定期的に繰り返し計測される。CPUに何らかの不調が生じてプログラム信号が出力し続けると、第二タイマーが初期化されないので第二暴走モードとして検出される。したがって、プログラムシーケンスがCPUにおいてタイマーリセットを指令したままの状態となるような暴走モードが生じても、これらモードを含めてプログラムの暴走を検出することができる。
【0009】
請求項2記載のプログラム暴走検出回路は、前記第一タイマー手段は、マイクロプロセッサーシステムにおけるクロック信号の個数をカウントすることにより経過時間を計測するカウンターを有しており、そのカウント値を演算処理部のプログラム信号によりリセットしている構成としてある。
【0010】
このように構成することによって、第一タイマー手段における経過時間をデジタル信号処理によって誤作動などなく計測することができる。
【0011】
請求項3記載のプログラム暴走検出回路は、前記第一タイマー手段は、経過時間を基準時間と比較する比較回路を有しており、この経過時間が基準時間を超えたことによりプログラム信号の有効状態への遷移が遅れたこととしている構成としてある。
【0012】
このように構成することによって、プログラム信号の遅れを基準時間によって定量的に判定することができる。
【0013】
請求項4記載のプログラム暴走検出回路は、前記第一タイマー手段は、第一暴走モードを検出するための基準値を設定する制御回路を有しており、当該基準値として前記プログラム信号の周期よりも長い時間を設定することにより、プログラム信号の有効状態への遷移の遅れを検出している構成としてある。
【0014】
このように構成することによって、第一タイマー手段による第一暴走モードの検出について融通的な管理が実現できる。
【0015】
請求項5記載のプログラム暴走検出回路は、前記第二タイマー手段は、マイクロプロセッサーシステムにおけるクロック信号の個数をカウントすることにより経過時間を計測するカウンターを有しており、そのカウント値を演算処理部のプログラム信号が無効状態に遷移するとリセットしている構成としてある。
【0016】
このように構成することによって、第二タイマー手段における経過時間をデジタル信号処理によって誤作動などなく計測することができる。
【0017】
請求項6記載のプログラム暴走検出回路は、前記第二タイマー手段は、経過時間を基準時間と比較する比較回路を有しており、この経過時間が基準時間を超えたことによりプログラム信号の有効状態が保持し続けたこととしている構成としてある。
【0018】
このように構成することによって、プログラム信号の長さを基準時間によって定量的に判定することができる。
【0019】
請求項7記載のプログラム暴走検出回路は、前記第二タイマー手段は、第二暴走モードを検出するための基準時間を設定する制御回路を有しており、当該基準時間として前記演算処理部における演算処理の時間よりも長い時間を設定することにより、プログラム信号の有効状態の継続を検出している構成としてある。
【0020】
このように構成することによって、第二タイマー手段による第二暴走モードの検出について融通的な管理が実現できる。
【0021】
【発明の実施の形態】
以下、本発明の実施の一形態につき添付図面を参照して説明する。
図1は、本実施の形態に係るプログラム暴走検出回路の概略構成例を示すブロック図である。
[実施形態の構成]
この回路は、プログラミングが可能なマイクロプロセッサーシステムにおいて、その制御プログラムの暴走を検出するものであって、制御プログラムによる演算処理の中枢部であるCPU1と、マイクロプロセッサーシステムプログラム暴走検出回路が正常に動作していることを示すウォッチドッグタイマー2とを有している。
【0022】
CPU1は、起動に伴ってマイクロプロセッサーシステムのリセット信号を演算処理各部の初期化機能に供給している。また、特定のプログラムシーケンスにより、制御プログラムの実行に伴って定期的にプログラム信号S3をウォッチドッグタイマー2に送出し、制御プログラムが正常に実行されつつあることを表示している。
【0023】
ウォッチドッグタイマー2は、マイクロプロセッサーシステムの外部クロックをカウントする二つのカウンターa,cと、各カウンターa,cによるカウント値を基準値(基準時間)と比較する比較回路b,dと、両比較回路b,dに適切な基準値(検出感度)を設定する制御回路eとを有している。これらカウンターa、比較回路b、制御回路eが本発明における第一タイマー手段を、また、カウンターc、比較回路d、制御回路eが本発明における第二タイマー手段を構成する。
【0024】
カウンターaは、プログラム信号S3の導入によってカウント値を初期化し、かつプログラム信号S3がなくなるとカウントを開始する。また、カウンターcは、プログラム信号S3の導入によってカウントを開始し、かつプログラム信号S3がなくなるとカウント値を初期化している。比較回路b,dは、カウンターa,cのカウント値が各基準値に達すると、アラーム信号を生成して外部回路に出力し、たとえば、マイクロプロセッサーシステムのアラーム信号として制御プログラムの暴走を外部に通知している。
【0025】
制御回路eは、マイクロプロセッサーシステムの外部制御データをレジスタなどの設定機能に供給するとともに、これらを基準値として比較回路b,dに送出している。たとえば、カウンターaの基準値は、定期的なプログラム信号S3として許容し得る最大の実行周期(許容最大実行周期)よりも若干長めの値であり、また、カウンターcの基準値は、CPU1の演算処理として許容し得る最長の処理時間(許容最長処理時間)よりも、若干長めの値である。
【0026】
[実施形態の動作の説明]
次に、図1,2を参照して本実施形態に係る」プログラム暴走検出回路の動作について詳細に説明する。
制御プログラムの暴走モードとしては、暴走によりプログラム信号S3が遅延することによって許容最大実行周期を超える場合と、プログラム信号S3が出力されたまま許容最長処理時間を超える場合とが挙げられる。これらの場合をウォッチドッグタイマー2が判定することにより、マイクロプロセッサーシステムの異常動作を監視している。あらかじめ、ウォッチドッグタイマー2の制御回路eには、外部制御信号の指示により、カウンターa,cの各基準値として所定値が設定されている。
【0027】
マイクロプロセッサーシステムのリセット信号がイネーブルになると、CPU1とウォッチドッグタイマー2が初期化されてカウンターa,cのカウント値も初期値(たとえば「0」)となる。また、ディセーブルになると、CPU1が稼動可能となってカウンターa,cがアクティブとなり、プログラム信号S3(負論理)が生じるまでは、カウンターaだけがカウントを開始する。このカウント値が、比較回路bにおいて制御回路eの許容最大実行周期と比較される。
【0028】
リセット信号がディセーブルになると、マイクロプロセッサーシステムにおいて、制御プログラムの実行が開始され、CPU1が定期的にプログラム信号S3を出力するので、カウンターaも定期的に初期化される。したがって、比較回路bにおいて、カウンターaのカウント値が許容最大実行周期に達することはなく、ウォッチドッグタイマー2からアラーム信号が出力されることもない。また、定期的なプログラム信号S3によって、カウンターcがカウントを開始するが、その直後にはプログラム信号S3がなくなる。したがって、プログラム信号S3の長さが多少変動したとしても、そのカウント値が比較回路dにおいて許容最長処理時間に達することはなく、同じく、アラーム信号は出力されない。
以上は、図2(a)に示す「正常動作」のように、マイクロプロセッサーシステムプログラム暴走検出回路が正常に動作している場合である。
【0029】
次に、図2(b)に示す「プログラム信号が無くなった場合」について説明する。
CPU1が異常動作を起こし、プログラム信号S3が、定期的に出力されずに遅延すると、カウンターaのカウント値が、定期的に初期化されずに、いずれは比較回路bにおいて許容最大実行周期を超えるので、アラーム信号が出力されることとなり、マイクロプロセッサーシステムの異常動作(第一暴走モード)が外部に表示される。
【0030】
また、図2(c)に示す「プログラム信号継続中の場合」については、CPU1が予期しない異常動作(たとえば過熱による。)を起こし、プログラム信号S3が出力され続ける場合が挙げられる。プログラム信号が出力し続けると、カウンターaは初期化されたままアラーム信号が出力されない。しかし、カウンターcのカウント値が、定期的に初期化されずに、いずれは比較回路dにおいて許容最長処理時間を超えるので、アラーム信号が出力されることとなり、マイクロプロセッサーシステムの異常動作(第二暴走モード)が外部に表示される。
【0031】
[他の実施形態]
次に、他の実施形態に係るプログラム暴走検出回路について説明する。
この回路は、前記実施の形態に係る回路において、ウォッチドッグタイマーを二つのワンショットモノマルチ回路により構成したものである。一のワンショットモノマルチ回路は、マイクロプロセッサーシステムのリセット信号により初期化され、このリセット信号がディセーブルになると、プログラム信号により定期的にリセットされる。内蔵のCR時定数回路には、許容最大実行周期よりも若干大きな値を設定しておくことにより、第一暴走モードを検出してアラーム信号を送出させている。
【0032】
また、別のワンショットモノマルチ回路は、同じくリセット信号により初期化され、プログラム信号により起動してプログラム信号が無くなるとリセットされる。内蔵のCR時定数回路には、許容最長処理時間よりも若干大きな値を設定しておくことにより、第二暴走モードを検出してアラーム信号を送出させている。すなわち、両ワンショットモノマルチ回路においても、検出のための各基準時間が固定的な値になるが、外部制御データの設定を要しないなどにより、少ない回路素子から簡易に構成することができる。
【0033】
【発明の効果】
以上のように、本発明のプログラム暴走検出回路によれば、マイクロプロセッサーシステムのソフトウェア制御について、制御プログラムの異常な実行を定期的なプログラム信号の遅れにより検出するばかりか、このプログラム信号自体の異常な出力をも検出することができる。したがって、プログラムシーケンスがCPUにおいてタイマーリセットを指令したままの状態となるような暴走モードも含めて検出することが可能なプログラム暴走検出回路を提供することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係るプログラム暴走検出回路の概略構成の一例を示すブロック図。
【図2】同じく、プログラム暴走検出回路の各信号の遷移を示すフローチャート。
【符号の説明】
1 演算処理回路(CPU)
2 ウォッチドッグタイマー(第一および第二タイマー手段)
3 プログラム信号
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a program runaway detection circuit, and more particularly to a program runaway detection circuit applicable to a watchdog timer such as a microprocessor system.
[0002]
[Prior art]
Conventionally, various circuits for detecting runaway control programs in microprocessor systems have been proposed. As such a program runaway detection circuit, the control program itself and its sequence execution process are monitored, and the operation of the CPU, which is the central part of the arithmetic control, is monitored to monitor the malfunction of the transmitted control signal. There is something to do.
[0003]
For example, with regard to the operation of the CPU, in the “program runaway detection circuit” of a single chip microcomputer, a watchdog timer is started by a program signal output from the CPU, and when the overflow occurs, a program runaway detection circuit Is reset. In addition, after the activation, one-shot mono-multi prohibits detection of overflow only for a predetermined period, thereby guaranteeing normal operation within the reset sequence of the watchdog timer (see, for example, Patent Document 1).
[0004]
[Patent Document 1]
Japanese Patent Laid-Open No. 2-5149 (page 2, FIG. 1)
[0005]
[Problems to be solved by the invention]
However, the program runaway detection circuit according to the conventional example has the following problems.
In such a watchdog timer, when the control program of the arithmetic processing circuit (CPU) cannot instruct the CPU to periodically reset the timer (reset sequence), it is determined that this is a program runaway. Therefore, as long as the reset sequence is executed and the timer reset is continuously commanded, there is a possibility that such a program runaway may not be detected even if the control program remains in a runaway state in the CPU.
[0006]
An object of the present invention is to provide a program runaway detection circuit capable of detecting a runaway mode in which a program sequence remains in a state in which a timer reset command is issued in a CPU. And
[0007]
[Means for Solving the Problems]
To achieve the above object, a program runaway detection circuit according to claim 1 of the present invention is a program runaway detection circuit for detecting a program runaway in an arithmetic processing unit of a software-controlled microprocessor system,
When the microprocessor system is started, the elapsed time starts to be measured, and the program signal output from the arithmetic processing unit almost regularly by the control program is initialized to transit to the valid state, and the program signal enters the valid state. First timer means for detecting the first runaway mode when the transition is delayed;
It said program signal starts to measure the elapsed time by the transition to a valid state, the the program signal transitions to the invalid state is initialized, the program signal detecting the valid state continues to hold the second runaway mode And a second timer means.
[0008]
With this configuration, when the control program is normally executed in the CPU, a periodic program signal is introduced into the first timer and initialization is performed. When normal execution is delayed, the program signal is delayed, so that the program runaway is detected as the first runaway mode without being initialized. When the program signal is introduced into the second timer means, the elapsed time of the program signal is periodically and repeatedly measured. If any malfunction occurs in the CPU and the program signal continues to be output, the second timer is not initialized, so that the second runaway mode is detected. Therefore, even if a runaway mode in which the program sequence remains in the state where the timer reset is commanded in the CPU occurs, it is possible to detect a program runaway including these modes.
[0009]
3. The program runaway detection circuit according to claim 2, wherein the first timer means has a counter for measuring an elapsed time by counting the number of clock signals in the microprocessor system, and the count value is calculated by an arithmetic processing unit. The program is reset by the program signal.
[0010]
By comprising in this way, the elapsed time in a 1st timer means can be measured without malfunction by digital signal processing.
[0011]
4. The program runaway detection circuit according to claim 3, wherein the first timer means has a comparison circuit for comparing an elapsed time with a reference time, and when the elapsed time exceeds the reference time, an effective state of the program signal The transition to is delayed.
[0012]
With this configuration, it is possible to quantitatively determine the delay of the program signal based on the reference time.
[0013]
5. The program runaway detection circuit according to claim 4, wherein the first timer means has a control circuit for setting a reference value for detecting the first runaway mode, and the reference value is based on a cycle of the program signal. Also, by setting a long time, the delay of the transition to the valid state of the program signal is detected.
[0014]
With this configuration, it is possible to realize flexible management for the detection of the first runaway mode by the first timer means.
[0015]
6. The program runaway detection circuit according to claim 5, wherein the second timer means has a counter that measures an elapsed time by counting the number of clock signals in the microprocessor system, and calculates the count value. The program signal is reset when the program signal transitions to an invalid state .
[0016]
By comprising in this way, the elapsed time in a 2nd timer means can be measured without malfunction by digital signal processing.
[0017]
7. The program runaway detection circuit according to claim 6, wherein the second timer means has a comparison circuit for comparing an elapsed time with a reference time, and when the elapsed time exceeds the reference time, an effective state of the program signal However, it is the structure which it is supposed to keep holding .
[0018]
With this configuration, the length of the program signal can be quantitatively determined based on the reference time.
[0019]
8. The program runaway detection circuit according to claim 7, wherein the second timer means has a control circuit for setting a reference time for detecting the second runaway mode, and the arithmetic processing unit calculates the reference time. By setting a time longer than the processing time, the continuation of the valid state of the program signal is detected.
[0020]
By comprising in this way, flexible management is realizable about the detection of the 2nd runaway mode by the 2nd timer means.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings.
FIG. 1 is a block diagram showing a schematic configuration example of a program runaway detection circuit according to the present embodiment.
[Configuration of the embodiment]
This circuit detects the runaway of the control program in a programmable microprocessor system, and the CPU 1 which is the central part of the arithmetic processing by the control program and the microprocessor system program runaway detection circuit operate normally. And a watchdog timer 2 indicating that the
[0022]
The CPU 1 supplies a reset signal of the microprocessor system to the initialization function of each arithmetic processing unit as it starts up. Further, according to a specific program sequence, a program signal S3 is periodically sent to the watchdog timer 2 as the control program is executed, indicating that the control program is being executed normally.
[0023]
The watchdog timer 2 includes two counters a and c that count an external clock of the microprocessor system, comparison circuits b and d that compare the count values of the counters a and c with a reference value (reference time), and both comparisons. And a control circuit e that sets appropriate reference values (detection sensitivity) for the circuits b and d. The counter a, the comparison circuit b, and the control circuit e constitute the first timer means in the present invention, and the counter c, the comparison circuit d, and the control circuit e constitute the second timer means in the present invention.
[0024]
The counter a initializes the count value by introducing the program signal S3, and starts counting when the program signal S3 disappears. The counter c starts counting when the program signal S3 is introduced, and initializes the count value when the program signal S3 disappears. When the count values of the counters a and c reach the respective reference values, the comparison circuits b and d generate an alarm signal and output it to an external circuit. For example, a control program runaway occurs as an alarm signal for a microprocessor system. Notify.
[0025]
The control circuit e supplies external control data of the microprocessor system to a setting function such as a register and sends these as reference values to the comparison circuits b and d. For example, the reference value of the counter a is a value slightly longer than the maximum execution cycle (allowable maximum execution cycle) allowable as the periodic program signal S3, and the reference value of the counter c is calculated by the CPU 1 The value is slightly longer than the longest processing time allowable as processing (allowable longest processing time).
[0026]
[Description of Operation of Embodiment]
Next, the operation of the program runaway detection circuit according to this embodiment will be described in detail with reference to FIGS.
The runaway mode of the control program includes a case where the allowable maximum execution period is exceeded due to the delay of the program signal S3 due to runaway, and a case where the allowable maximum processing time is exceeded while the program signal S3 is output. The watchdog timer 2 determines these cases, thereby monitoring the abnormal operation of the microprocessor system. In the control circuit e of the watchdog timer 2, predetermined values are set in advance as reference values for the counters a and c in accordance with an instruction from an external control signal.
[0027]
When the reset signal of the microprocessor system is enabled, the CPU 1 and the watchdog timer 2 are initialized, and the count values of the counters a and c are also set to initial values (for example, “0”). When disabled, the CPU 1 becomes operable, the counters a and c become active, and only the counter a starts counting until the program signal S3 (negative logic) is generated. This count value is compared with the maximum allowable execution period of the control circuit e in the comparison circuit b.
[0028]
When the reset signal is disabled, the execution of the control program is started in the microprocessor system, and the CPU 1 periodically outputs the program signal S3, so that the counter a is also periodically initialized. Therefore, in the comparison circuit “b”, the count value of the counter “a” does not reach the allowable maximum execution period, and no alarm signal is output from the watchdog timer 2. The counter c starts counting by the periodic program signal S3, but immediately after that, the program signal S3 disappears. Therefore, even if the length of the program signal S3 slightly varies, the count value does not reach the maximum allowable processing time in the comparison circuit d, and similarly no alarm signal is output.
The above is the case where the microprocessor system program runaway detection circuit is operating normally, as in the “normal operation” shown in FIG.
[0029]
Next, the case where “the program signal is lost” shown in FIG.
If the CPU 1 causes an abnormal operation and the program signal S3 is delayed without being periodically output, the count value of the counter a is not periodically initialized and eventually exceeds the allowable maximum execution period in the comparison circuit b. Therefore, an alarm signal is output, and the abnormal operation (first runaway mode) of the microprocessor system is displayed outside.
[0030]
In addition, with respect to “when the program signal is continuing” shown in FIG. 2C, there is a case where the CPU 1 causes an unexpected abnormal operation (for example, due to overheating) and the program signal S3 is continuously output. If the program signal continues to be output, the alarm signal is not output while the counter a is initialized. However, since the count value of the counter c is not periodically initialized and eventually exceeds the allowable maximum processing time in the comparison circuit d, an alarm signal is output, and abnormal operation of the microprocessor system (second operation) Runaway mode) is displayed externally.
[0031]
[Other Embodiments]
Next, a program runaway detection circuit according to another embodiment will be described.
In this circuit, the watchdog timer is constituted by two one-shot mono-multi circuits in the circuit according to the embodiment. One one-shot mono-multi circuit is initialized by a reset signal of the microprocessor system, and when this reset signal is disabled, it is periodically reset by a program signal. In the built-in CR time constant circuit, a value slightly larger than the allowable maximum execution cycle is set, so that the first runaway mode is detected and an alarm signal is transmitted.
[0032]
Another one-shot mono-multi circuit is also initialized by a reset signal, and is reset when the program signal disappears after being activated by the program signal. In the built-in CR time constant circuit, a value slightly larger than the maximum allowable processing time is set to detect the second runaway mode and send an alarm signal. That is, in both one-shot mono-multi circuits, each reference time for detection is a fixed value, but it can be easily configured from a small number of circuit elements because it does not require setting of external control data.
[0033]
【The invention's effect】
As described above, according to the program runaway detection circuit of the present invention, not only the abnormal execution of the control program is detected by the periodic delay of the program signal in the software control of the microprocessor system, but also the abnormality of the program signal itself. It is possible to detect even an output. Therefore, it is possible to provide a program runaway detection circuit capable of detecting a runaway mode in which the program sequence remains in a state in which the CPU is instructed to reset the timer.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an example of a schematic configuration of a program runaway detection circuit according to an embodiment of the present invention.
FIG. 2 is a flowchart showing the transition of each signal of the program runaway detection circuit.
[Explanation of symbols]
1. Arithmetic processing circuit (CPU)
2 Watchdog timer (first and second timer means)
3 Program signal

Claims (7)

ソフトウェア制御されたマイクロプロセッサーシステムについて、その演算処理部におけるプログラムの暴走を検出するプログラム暴走検出回路であって、
マイクロプロセッサーシステムが起動すると経過時間の計測を開始し、制御プログラムによってほぼ定期的に演算処理部から出力されるプログラム信号が有効状態に遷移することにより初期化され、前記プログラム信号の有効状態への遷移が遅れたときに第一暴走モードを検出する第一タイマー手段と、
前記プログラム信号が有効状態に遷移することにより経過時間の計測を開始し、前記プログラム信号が無効状態に遷移すると初期化され、前記プログラム信号の有効状態が保持し続けると第二暴走モードを検出する第二タイマー手段とを有したことを特徴とするプログラム暴走検出回路。
A program runaway detection circuit for detecting a program runaway in the arithmetic processing unit of a software controlled microprocessor system,
When the microprocessor system is started, the elapsed time starts to be measured, and the program signal output from the arithmetic processing unit almost regularly by the control program is initialized to transit to the valid state, and the program signal enters the valid state. First timer means for detecting the first runaway mode when the transition is delayed;
It said program signal starts to measure the elapsed time by the transition to a valid state, the the program signal transitions to the invalid state is initialized, the program signal detecting the valid state continues to hold the second runaway mode And a program runaway detection circuit characterized by comprising: a second timer means.
前記第一タイマー手段は、マイクロプロセッサーシステムにおけるクロック信号の個数をカウントすることにより経過時間を計測するカウンターを有しており、そのカウント値を演算処理部のプログラム信号によりリセットしていることを特徴とする請求項1記載のプログラム暴走検出回路。  The first timer means has a counter for measuring elapsed time by counting the number of clock signals in the microprocessor system, and the count value is reset by a program signal of an arithmetic processing unit. The program runaway detection circuit according to claim 1. 前記第一タイマー手段は、経過時間を基準時間と比較する比較回路を有しており、この経過時間が基準時間を超えたことによりプログラム信号の有効状態への遷移が遅れたこととしていることを特徴とする請求項1または2記載のプログラム暴走検出回路。The first timer means has a comparison circuit for comparing the elapsed time with the reference time, and the transition to the valid state of the program signal is delayed due to the elapsed time exceeding the reference time. 3. The program runaway detection circuit according to claim 1 or 2, characterized in that: 前記第一タイマー手段は、第一暴走モードを検出するための基準時間を設定する制御回路を有しており、当該基準時間として前記プログラム信号の周期よりも長い時間を設定することにより、プログラム信号の有効状態への遷移の遅れを検出していることを特徴とする請求項1〜3のいずれか一つに記載のプログラム暴走検出回路。The first timer means has a control circuit for setting a reference time for detecting the first runaway mode, and by setting a time longer than the cycle of the program signal as the reference time, the program signal The program runaway detection circuit according to any one of claims 1 to 3, wherein a delay in transition to a valid state is detected. 前記第二タイマー手段は、マイクロプロセッサーシステムにおけるクロック信号の個数をカウントすることにより経過時間を計測するカウンターを有しており、そのカウント値を演算処理部のプログラム信号が無効状態に遷移するとリセットしていることを特徴とする請求項1〜4のいずれか一つに記載のプログラム暴走検出回路。The second timer means has a counter for measuring elapsed time by counting the number of clock signals in the microprocessor system, and resets the count value when the program signal of the arithmetic processing unit transitions to an invalid state. The program runaway detection circuit according to claim 1, wherein the program runaway detection circuit is provided. 前記第二タイマー手段は、経過時間を基準時間と比較する比較回路を有しており、この経過時間が基準時間を超えたことによりプログラム信号の有効状態が保持し続けたこととしていることを特徴とする請求項1〜5のいずれか一つに記載のプログラム暴走検出回路。The second timer means has a comparison circuit that compares the elapsed time with a reference time, and the effective state of the program signal is maintained because the elapsed time exceeds the reference time. The program runaway detection circuit according to any one of claims 1 to 5. 前記第二タイマー手段は、第二暴走モードを検出するための基準時間を設定する制御回路を有しており、当該基準時間として前記演算処理部における演算処理の時間よりも長い時間を設定することにより、プログラム信号の有効状態の継続を検出していることを特徴とする請求項1〜6のいずれか一つに記載のプログラム暴走検出回路。The second timer means has a control circuit for setting a reference time for detecting the second runaway mode, and sets a time longer than the time of the arithmetic processing in the arithmetic processing unit as the reference time. The program runaway detection circuit according to claim 1, wherein the continuation of the valid state of the program signal is detected by:
JP2003085501A 2003-03-26 2003-03-26 Program runaway detection circuit Expired - Fee Related JP4063699B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003085501A JP4063699B2 (en) 2003-03-26 2003-03-26 Program runaway detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003085501A JP4063699B2 (en) 2003-03-26 2003-03-26 Program runaway detection circuit

Publications (2)

Publication Number Publication Date
JP2004295374A JP2004295374A (en) 2004-10-21
JP4063699B2 true JP4063699B2 (en) 2008-03-19

Family

ID=33400409

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003085501A Expired - Fee Related JP4063699B2 (en) 2003-03-26 2003-03-26 Program runaway detection circuit

Country Status (1)

Country Link
JP (1) JP4063699B2 (en)

Also Published As

Publication number Publication date
JP2004295374A (en) 2004-10-21

Similar Documents

Publication Publication Date Title
JP4609381B2 (en) Abnormality monitoring program, recording medium, and electronic device
US6356821B1 (en) Electronic control unit for vehicle having reduced circuit scale
CN106527249B (en) Timer for peripheral watchdog
JP2010277303A (en) Semiconductor device and failure detection method
JPS62157953A (en) Microcomputer provided with abnormality detecting function
US10928372B2 (en) Electronic device
EP1936392B1 (en) Automatic frequency monitoring circuit, electronic device, automatic frequency monitoring method and automatic frequency monitoring program
JP2011186634A (en) Information processing device, semiconductor integrated circuit device, and abnormality detection method
JP4063699B2 (en) Program runaway detection circuit
JP5517301B2 (en) Data processing system
JP3991782B2 (en) Electronic control unit
JP2009003663A (en) Power control device
JP7063692B2 (en) Watchdog timer monitoring system
JP2870250B2 (en) Microprocessor runaway monitor
JP2004310291A (en) Cpu system equipped with watchdog timer failure detecting circuit
JPH11203173A (en) Watch dog timer circuit
JP2014157554A (en) Communication slave
JP2536789Y2 (en) Device for preventing malfunction of microcomputer system
JPH08202589A (en) Information processor and fault diagnostic method
JP3163904B2 (en) CPU device with runaway monitoring function
JP2829183B2 (en) Microprocessor device
JPS622685Y2 (en)
JP2899237B2 (en) CPU monitoring device
JPS62168204A (en) Digital controller
JP2004126731A (en) Abnormal operation monitoring circuit for cpu

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070412

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070814

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071004

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20071204

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071225

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees