JP4454566B2 - Program runaway monitoring circuit and method - Google Patents

Program runaway monitoring circuit and method Download PDF

Info

Publication number
JP4454566B2
JP4454566B2 JP2005323019A JP2005323019A JP4454566B2 JP 4454566 B2 JP4454566 B2 JP 4454566B2 JP 2005323019 A JP2005323019 A JP 2005323019A JP 2005323019 A JP2005323019 A JP 2005323019A JP 4454566 B2 JP4454566 B2 JP 4454566B2
Authority
JP
Japan
Prior art keywords
program
information
runaway
program runaway
monitoring
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
JP2005323019A
Other languages
Japanese (ja)
Other versions
JP2007133458A (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 JP2005323019A priority Critical patent/JP4454566B2/en
Publication of JP2007133458A publication Critical patent/JP2007133458A/en
Application granted granted Critical
Publication of JP4454566B2 publication Critical patent/JP4454566B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明はプログラム制御プロセッサ上で実行されているプログラムの暴走を監視する技術に関する。   The present invention relates to a technique for monitoring runaway of a program being executed on a program control processor.

プログラムの暴走を監視する技術としてはこれまで種々のものが提案されてきた。たとえば、特開昭63−298453号公報(特許文献1)には、プログラムの単一ステップの実行の有無に依存するのではなく、複数の任意ステップの命令コードのシグネチャと予め求めたシグネチャデータとを比較することにより暴走を検出するプログラム暴走監視回路が開示されている。この暴走監視回路は、実行した命令コードのシグネチャを求めるためのリニア・フィードバック・シフトレジスタ(LFSR)を有し、プログラムメモリには、このLFSRに取り込む命令コードかどうかを判断するためのイネーブルビットが付加されている。   Various techniques for monitoring program runaway have been proposed. For example, Japanese Patent Application Laid-Open No. 63-298453 (Patent Document 1) does not depend on whether or not a single step of a program is executed, but includes a plurality of instruction code signatures of arbitrary steps and signature data obtained in advance. A program runaway monitoring circuit that detects runaway by comparing the two is disclosed. This runaway monitoring circuit has a linear feedback shift register (LFSR) for obtaining a signature of an executed instruction code, and an enable bit for judging whether or not the instruction code is taken into the LFSR is stored in the program memory. It has been added.

特開平6−259288号公報(特許文献2)に開示された暴走監視回路では、CPUの命令のプログラムアドレスに対して次のアドレスを予め記憶しておき、当該次のアドレスとCPUが実際に発生する次のプログラムアドレスとを常に比較して不一致が生じたときに暴走を検出する。   In the runaway monitoring circuit disclosed in Japanese Patent Laid-Open No. 6-259288 (Patent Document 2), the next address is stored in advance with respect to the program address of the instruction of the CPU, and the next address and the CPU are actually generated. A runaway is detected when a mismatch occurs by always comparing the next program address.

また、特開2000−57021号公報(特許文献3)には、ウォッチドッグタイマ内に、その動作状態を判別する手段を設け、スタンバイ制御信号によりウォッチドッグタイマが動作を停止させているときに限り、供給されるクロックを停止させることによりウォッチドッグタイマの誤動作を回避する方法が開示されている。   Japanese Patent Laid-Open No. 2000-57021 (Patent Document 3) provides a means for determining the operation state in the watchdog timer, and only when the watchdog timer is stopped by the standby control signal. A method for avoiding malfunction of the watchdog timer by stopping the supplied clock is disclosed.

特開昭63−298453号公報JP-A-63-298453 特開平6−259288号公報JP-A-6-259288 特開2000−57021号公報JP 2000-57021 A

本発明は、ウォッチドッグタイマやプログラムの単一ステップに依存することなく、プログラムの暴走を確実に検出することができる新たなプログラム暴走監視方法および回路を提供する。   The present invention provides a new program runaway monitoring method and circuit capable of reliably detecting a program runaway without depending on a watchdog timer or a single step of the program.

本発明によれば、プログラム実行中のプログラム制御プロセッサが使用するバス上のデータを用いてプログラムの暴走の有無を検出する。たとえば、バス上の情報を設定された時間間隔で読み取り、前回の読取情報と今回の読取情報とから同一情報の領域を検索し、その検索結果に基づいてプログラムの暴走の有無を検出する。   According to the present invention, the presence or absence of a program runaway is detected using data on the bus used by the program control processor that is executing the program. For example, the information on the bus is read at a set time interval, the same information area is searched from the previous read information and the current read information, and the presence or absence of a program runaway is detected based on the search result.

本発明によるプログラム暴走監視回路は、プログラム制御プロセッサが使用するバス上のアドレス情報およびデータ情報を設定されたタイミングで読み取るバス情報読み取り手段と、読み取られたアドレス情報およびデータ情報の組をエントリ情報として設定されたタイミングごとに交互に蓄積する第1メモリ手段および第2メモリ手段と、第1メモリ手段に蓄積された第1エントリ情報と第2メモリ手段に蓄積された第2エントリ情報とを比較して同一情報領域の存在の有無を判定する比較判定手段と、比較判定手段の判定結果に基づいてプログラムの暴走を監視する監視手段と、を有することを特徴とする。 A program runaway monitoring circuit according to the present invention includes bus information reading means for reading address information and data information on a bus used by a program control processor at a set timing, and a set of the read address information and data information as entry information. compares the first memory means and second memory means for storing alternately for each set timing, the first entry information and the second entry information stored in the second memory means being stored in the first memory means Comparison judging means for judging the presence or absence of the same information area, and monitoring means for monitoring the runaway of the program based on the judgment result of the comparison judging means.

前記バス情報読み取り手段は、前記バス上のイネーブル信号を契機として、前記バス上のアドレス情報およびデータ情報を前記プログラム制御プロセッサの動作クロックに従って読み取ることができる。   The bus information reading means can read address information and data information on the bus in accordance with an operation clock of the program control processor in response to an enable signal on the bus.

前記監視手段は、前記比較判定手段による同一情報領域の存在を示す判定結果が複数回発生したときにプログラムの暴走を検出することができる。監視手段は、前記同一情報領域の存在を示す判定結果の回数をカウントするカウント手段を有し、前記カウント値が所定しきい値を超えたときにプログラムの暴走を検出することが望ましい。特に、所定しきい値はプログラム暴走の誤認を回避できる値に設定されることが望ましい。   The monitoring unit can detect a program runaway when a determination result indicating the presence of the same information area by the comparison determination unit occurs a plurality of times. Preferably, the monitoring means has counting means for counting the number of determination results indicating the presence of the same information area, and detects a program runaway when the count value exceeds a predetermined threshold value. In particular, it is desirable that the predetermined threshold is set to a value that can avoid misidentification of program runaway.

本発明によるプログラム暴走監視方法は、プログラム制御プロセッサが使用するバス上のアドレス情報およびデータ情報の組をエントリ情報として設定されたタイミングで順次読み取り、前回のタイミングで読み取られた第1エントリ情報と今回のタイミングで読み取られた第2エントリ情報とを比較して同一情報領域を検索し、同一情報領域の有無によりプログラムの暴走を監視する、ことを特徴とする。 The program runaway monitoring method according to the present invention sequentially reads a set of address information and data information on the bus used by the program control processor at the timing set as entry information, and the first entry information read at the previous timing and this time The second entry information read at this timing is compared to search for the same information area, and the program runaway is monitored based on the presence or absence of the same information area.

本発明によれば、プログラム制御プロセッサが使用するバス上のアドレス情報およびデータ情報の組をエントリ情報として用いてプログラムの暴走の有無を検出することができる。すなわち、前回のタイミングで読み取られたバス上のエントリ情報と今回のタイミングで読み取られたエントリ情報とを比較し、それらの情報の間に同一情報領域が存在するか否かの判定に基づいてプログラム暴走の確実な監視が可能である。 According to the present invention, it is possible to detect the presence or absence of a program runaway using a set of address information and data information on a bus used by a program control processor as entry information . That is, the entry information on the bus read at the previous timing is compared with the entry information read at the current timing, and the program is determined based on whether or not the same information area exists between the information. Reliable monitoring of runaway is possible.

特に、同一情報領域の存在を示す判定が所定しきい値を超える回数続いた場合にプログラム暴走と判定することにより、暴走の検出精度が向上するとともに暴走の誤認を確実に回避することができ、暴走監視の信頼性を向上させることができる。   In particular, by determining the program runaway when the determination indicating the presence of the same information area continues for a number of times exceeding a predetermined threshold, the detection accuracy of the runaway can be improved and the misunderstanding of the runaway can be reliably avoided. The reliability of runaway monitoring can be improved.

図1は本発明の一実施形態によるプログラム暴走監視回路のブロック図である。CPU(Central Processing Unit)1はプログラム制御プロセッサであり、予めプログラムされた命令に従って動作を行い、バスを通して、アドレスおよびデータ情報B、CPU動作クロックC、イネーブル信号Aを含む制御信号など種々の情報を転送する。   FIG. 1 is a block diagram of a program runaway monitoring circuit according to an embodiment of the present invention. A CPU (Central Processing Unit) 1 is a program control processor that operates according to pre-programmed instructions, and receives various information such as control signals including address and data information B, CPU operation clock C, and enable signal A through a bus. Forward.

プログラム暴走監視回路に設けられたタイマ部2は、外部から供給されるクロックに従って時間計測を行い、外部より設定された時間が経過すると読み取り部3へ開始通知を出力して時間計測を停止する。タイマ部2の時間計測は、後述するメモリ部4あるいは5からの許容容量到達通知により再開する。   The timer unit 2 provided in the program runaway monitoring circuit performs time measurement according to a clock supplied from the outside, and outputs a start notification to the reading unit 3 and stops time measurement when a time set from the outside elapses. The time measurement of the timer unit 2 is resumed by a notice of allowable capacity arrival from the memory unit 4 or 5 described later.

読み取り部3は、CPU動作クロックCおよびイネーブル信号Aに従って、アドレスおよびデータ情報Bをバスから読み出す。読み出されたアドレスおよびデータ情報は、読み取り動作ごとに交互に選択されたメモリ部4あるいはメモリ部5に格納される。読み取り部3の読み取り動作は、タイマ部2からの開始通知により開始し、メモリ部4あるいは5からの許容容量到達通知により停止する。   The reading unit 3 reads the address and data information B from the bus according to the CPU operation clock C and the enable signal A. The read address and data information are stored in the memory unit 4 or the memory unit 5 that are alternately selected for each reading operation. The reading operation of the reading unit 3 is started by a start notification from the timer unit 2 and stopped by a notification of reaching an allowable capacity from the memory unit 4 or 5.

メモリ部4およびメモリ部5は、それぞれ予め設定された許容容量を有するメモリであり、読み取り部3からのイネーブル信号により選択されたメモリ部4または5が読み取られたアドレスおよびデータ情報を格納する。メモリ部4および5は、データを許容容量まで蓄積すると、許容容量到達通知をタイマ部2、読み取り部3および比較判定部6へそれぞれ出力する。   The memory unit 4 and the memory unit 5 are memories each having a preset allowable capacity, and store the address and data information read by the memory unit 4 or 5 selected by the enable signal from the reading unit 3. When the memory units 4 and 5 accumulate the data up to the allowable capacity, they output an allowable capacity arrival notification to the timer unit 2, the reading unit 3, and the comparison determination unit 6, respectively.

比較判定部6は、メモリ部4およびメモリ部5にそれぞれ格納された前回および今回のアドレスおよびデータ情報Bを比較し、同じ順序で格納された同一情報を検索する。同一順序の同一情報が存在すれば、比較判定部6はカウンタ監視部7へ同一情報検出通知を出力する。   The comparison determination unit 6 compares the previous and current addresses and data information B stored in the memory unit 4 and the memory unit 5, respectively, and searches for the same information stored in the same order. If the same information in the same order exists, the comparison determination unit 6 outputs the same information detection notification to the counter monitoring unit 7.

カウンタ監視部7は同一情報検出通知の回数をカウントし、カウント値が外部から与えられた所定のしきい値を超えたときにアラームを外部へ出力する。   The counter monitoring unit 7 counts the number of identical information detection notifications, and outputs an alarm to the outside when the count value exceeds a predetermined threshold given from the outside.

図2は本実施形態によるプログラム暴走監視回路の動作を説明するための状態遷移図である。   FIG. 2 is a state transition diagram for explaining the operation of the program runaway monitoring circuit according to the present embodiment.

状態S10: まず、タイマ部2が起動され、外部クロックに従って時間計測を開始する。設定された時間が経過すると、タイマ部2は時間計測を停止し、開始通知を出力する。   State S10: First, the timer unit 2 is activated and starts time measurement according to the external clock. When the set time elapses, the timer unit 2 stops time measurement and outputs a start notification.

状態S20: 開始通知により読み取り部3が起動する。読み取り部3は、イネーブル信号Aに従ったタイミングで、アドレスおよびデータ情報BをバスからCPU動作クロックCに従って読み出す。読み取り部3は、前回選択したメモリ部とは別のメモリ部を選択し、選択したメモリ部4あるいは5に読み出されたアドレスおよびデータ情報を蓄積する。   State S20: The reading unit 3 is activated by the start notification. The reading unit 3 reads the address and data information B from the bus according to the CPU operation clock C at a timing according to the enable signal A. The reading unit 3 selects a memory unit different from the previously selected memory unit, and stores the read address and data information in the selected memory unit 4 or 5.

状態S30: メモリ部4あるいは5から許容容量到達通知を入力すると、読み取り部3は読み取り動作を停止する。そして次の情報を読み取るために状態S10へ戻ってタイマ部2が起動され、上述した状態S10〜状態S30がメモリ部4および5を交互に選択しながら繰り返される。このように読み取り動作を実行することで、メモリ部4および5には前回の読み取り情報と今回の読み取り情報とが交互に蓄積されることになる。   State S30: When an allowable capacity arrival notification is input from the memory unit 4 or 5, the reading unit 3 stops the reading operation. Then, in order to read the next information, the process returns to the state S10, the timer unit 2 is activated, and the above-described states S10 to S30 are repeated while alternately selecting the memory units 4 and 5. By executing the reading operation in this way, the previous reading information and the current reading information are alternately stored in the memory units 4 and 5.

状態S40: メモリ部4あるいは5から許容容量到達通知を入力すると、比較判定部6はメモリ部4およびメモリ部5にそれぞれ格納された前回および今回のアドレスおよびデータ情報Bを比較し、同じ順序で格納された同一データの有無を判定する。同一順序の同一情報を検出したとき、あるいは、メモリ部4あるいは5の上限に格納された情報が一致したとき、比較判定部6はカウンタ監視部7へ同一情報検出通知を出力する。同一順序の同一データを検出したとき、あるいは、検索中にメモリ部4あるいは5のアドレス上限値に到達したときには、比較判定部6は検索動作を停止する。なお、比較判定部6の検索動作の詳細は後述する。   State S40: When an allowable capacity arrival notification is input from the memory unit 4 or 5, the comparison / determination unit 6 compares the previous and current addresses and the data information B stored in the memory unit 4 and the memory unit 5, respectively, in the same order. The presence or absence of the same stored data is determined. When the same information in the same order is detected, or when the information stored in the upper limit of the memory unit 4 or 5 matches, the comparison determination unit 6 outputs the same information detection notification to the counter monitoring unit 7. When the same data in the same order is detected, or when the address upper limit value of the memory unit 4 or 5 is reached during the search, the comparison / determination unit 6 stops the search operation. Details of the search operation of the comparison / determination unit 6 will be described later.

状態S50: カウンタ監視部7は同一情報検出通知の発生を監視し、その回数をカウントする。カウント値は所定のしきい値と比較され、カウント数がしきい値を超えたときに、カウンタ監視部7はプログラムの暴走と判断してアラームを外部へ通知する。   State S50: The counter monitoring unit 7 monitors the occurrence of the same information detection notification and counts the number of times. The count value is compared with a predetermined threshold value, and when the count number exceeds the threshold value, the counter monitoring unit 7 determines that the program is out of control and notifies an alarm to the outside.

なお、タイマ部2の設定時間により読み取り動作の周期を調整することができ、適切な頻度でプログラム暴走監視が可能となる。   Note that the period of the reading operation can be adjusted according to the set time of the timer unit 2, and the program runaway can be monitored at an appropriate frequency.

図3は本実施形態における比較判定部6の検索動作を説明するための模式図である。メモリ部4には、バスから前回読み取られたアドレス(A10, A11, A12, … A1n)とそれぞれのアドレスに対応したデータ(D10, D11, D12, … D1n)とがメモリ部4の下限(Start)から上限(End)へ向けて順に蓄積されているものとする。メモリ部5には、今回読み取られたアドレス(B10, B11, B12, … B1m)とそれぞれのアドレスに対応したデータ(E10, E11, E12, … E1m)とがメモリ部5の下限(Start)から上限(End)へ向けて順に蓄積されているものとする。なお、ここではm=nとする。 FIG. 3 is a schematic diagram for explaining the search operation of the comparison determination unit 6 in the present embodiment. The memory unit 4 has addresses (A1 0 , A1 1 , A1 2 ,... A1 n ) read from the bus last time and data (D1 0 , D1 1 , D1 2 ,... D1 n ) corresponding to the addresses. Are stored in order from the lower limit (Start) to the upper limit (End) of the memory unit 4. The memory unit 5 stores addresses (B1 0 , B1 1 , B1 2 ,... B1 m ) read this time and data (E1 0 , E1 1 , E1 2 ,... E1 m ) corresponding to the addresses. It is assumed that data are sequentially accumulated from the lower limit (Start) to the upper limit (End) of the unit 5. Here, m = n.

比較判定部6はメモリ部4およびメモリ部5からエントリ情報を順次読み出して比較し、同一順序の同一データを検索する。次に、図3に示すメモリの状態を仮定して、比較判定部6の検索動作を詳細に説明する。   The comparison determination unit 6 sequentially reads and compares the entry information from the memory unit 4 and the memory unit 5 and searches for the same data in the same order. Next, assuming the state of the memory shown in FIG. 3, the search operation of the comparison / determination unit 6 will be described in detail.

図4は比較判定部6の検索動作の流れを概略的に示すフローチャートである。比較判定部6は、今回の読み取り情報を蓄積したメモリ部5から許容容量到達通知を入力すると(ステップS101)、前回の読み取り情報を蓄積したメモリ部4の最初のエントリ情報(A10, D10)を読み出し、メモリ部5に同一情報が存在するかどうかをサーチする。存在しなければ、次のエントリ情報(A11, D11)を読み出し同様のサーチを繰り返す。以下同様に、エントリ情報(A1n, D1n)を上限として、メモリ部4から順次データを読み出しながら、同一情報が検出されるまで上記サーチを繰り返す(ステップS102)。 FIG. 4 is a flowchart schematically showing the flow of the search operation of the comparison / determination unit 6. When the comparison determination unit 6 inputs an allowable capacity arrival notification from the memory unit 5 in which the current read information is stored (step S101), the first entry information (A1 0 , D1 0 ) in the memory unit 4 in which the previous read information is stored. ) To search whether the same information exists in the memory unit 5. If not, the next entry information (A1 1 , D1 1 ) is read and the same search is repeated. Similarly, the above search is repeated until the same information is detected while sequentially reading data from the memory unit 4 with the entry information (A1 n , D1 n ) as the upper limit (step S102).

このサーチによりメモリ部4のエントリ情報(A1i, D1i)とメモリ部5のエントリ情報(B1j, E1j)とが一致したと仮定する。図3の例では、メモリ部4のエントリ情報(A13, D13)と同一の情報がメモリ部5のエントリ情報(B11, E11)として存在するものとする。 It is assumed that the entry information (A1 i , D1 i ) in the memory unit 4 matches the entry information (B1 j , E1 j ) in the memory unit 5 by this search. In the example of FIG. 3, it is assumed that the same information as the entry information (A1 3 , D1 3 ) in the memory unit 4 exists as entry information (B1 1 , E1 1 ) in the memory unit 5.

この一致を検出すると、比較判定部6は、一致したエントリ情報に続くエントリ情報をメモリ部4および5からそれぞれ読み出す。ここでは、メモリ部4のエントリ情報(A1i+1, D1i+1)とメモリ部5のエントリ情報(B1j+1, E1j+1)とがそれぞれ読み出され、同一か否かが判定される。 (A1i+1, D1i+1)=(B1j+1, E1j+1)であれば、さらに続くデータをメモリ部4および5からそれぞれ読み出す。ここでは、メモリ部4の情報(A1i+2, D1i+2)とメモリ部5の情報(B1j+2, E1j+2)とがそれぞれ読み出され、同一か否かが判定される。(A1i+1, D1i+1)≠(B1j+1, E1j+1)であれば、この時点で検索を中止する(ステップS105)。以下同様に、同一であれば次のエントリ情報の比較を行うという動作をいずれかのエントリ情報がメモリ部の上限に到達するまで繰り返し、同一でなければその時点で検索を中止する(ステップS103)。 When this match is detected, the comparison / determination unit 6 reads the entry information following the matched entry information from the memory units 4 and 5, respectively. Here, the entry information (A1 i + 1 , D1 i + 1 ) in the memory unit 4 and the entry information (B1 j + 1 , E1 j + 1 ) in the memory unit 5 are read out respectively to determine whether or not they are the same. Determined. If (A1 i + 1 , D1 i + 1 ) = (B1 j + 1 , E1 j + 1 ), further subsequent data are read from the memory units 4 and 5, respectively. Here, the information (A1 i + 2 , D1 i + 2 ) in the memory unit 4 and the information (B1 j + 2 , E1 j + 2 ) in the memory unit 5 are read out to determine whether or not they are the same. The If (A1 i + 1 , D1 i + 1 ) ≠ (B1 j + 1 , E1 j + 1 ), the search is stopped at this point (step S105). Similarly, the operation of comparing the next entry information if it is the same is repeated until any entry information reaches the upper limit of the memory unit, and if it is not the same, the search is stopped at that time (step S103). .

こうして一方のメモリ部のエントリ情報が上限に到達すると、同一のエントリ情報が同一の順序で両方のメモリ部に格納されていると判断し、同一情報検出通知をカウント監視部7へ送出する(ステップS104)。たとえば、図3に示すように、メモリ部4の領域aのエントリ情報(A13, D13)〜(A1n, D1n)とメモリ部5の領域bのエントリ情報(B11, E11)〜(B1(m-2), E1(m-2))とが一致したと判定される。 When the entry information of one memory unit reaches the upper limit in this way, it is determined that the same entry information is stored in both memory units in the same order, and the same information detection notification is sent to the count monitoring unit 7 (step S1). S104). For example, as shown in FIG. 3, the entry information (A1 3 , D1 3 ) to (A1 n , D1 n ) of the area a of the memory unit 4 and the entry information (B1 1 , E1 1 ) of the area b of the memory unit 5 ~ (B1 (m-2) , E1 (m-2) ) are determined to match.

なお、ステップS102において一方のメモリ部の上限エントリ情報が一致した場合には、上限エントリに到達しているのでステップS103では「全て一致」と判定され、同一情報検出通知がカウント監視部7へ出力されることになる。しかしながら、この一致は実際には同一情報検出とは言えない。したがって、このような同一情報検出通知だけでアラームが外部へ出力される事態を回避するのが望ましい。そこで、本実施形態では、カウント監視部7にカウントしきい値を設定し、同一情報検出通知の回数が設定しきい値を超えない限りアラームを出力しないようにしている。   If the upper limit entry information in one memory unit matches in step S102, the upper limit entry has been reached, so that it is determined as “all match” in step S103, and the same information detection notification is output to the count monitoring unit 7 Will be. However, this coincidence is not actually the same information detection. Therefore, it is desirable to avoid a situation in which an alarm is output to the outside only by such an identical information detection notification. Therefore, in this embodiment, a count threshold is set in the count monitoring unit 7 so that an alarm is not output unless the number of identical information detection notifications exceeds the set threshold.

このようにカウント監視部7にしきい値を設定することは暴走監視の信頼性を向上させるという利点もある。プログラム暴走が発生した場合には同一情報検出通知が繰り返しカウント監視部7に出力されるはずであるから、カウントしきい値を適当な値に設定することで、プログラム暴走の誤認を回避できると共に、実際の暴走を迅速にかつ確実に検知することもできる。   Thus, setting the threshold value in the count monitoring unit 7 has an advantage of improving the reliability of the runaway monitoring. When a program runaway occurs, the same information detection notification should be repeatedly output to the count monitoring unit 7, so setting the count threshold to an appropriate value can avoid misidentification of the program runaway, It is also possible to detect actual runaway quickly and reliably.

また、上記実施形態では、ステップS103に示すように、同一であれば次のエントリ情報の比較を行うという動作をいずれかのエントリ情報がメモリ部の上限に到達するまで繰り返すが、メモリ部の上限に到達する前であっても、所定の長さ同一情報領域が継続していれば「全て一致」と判定するようにしても良い。   In the above embodiment, as shown in step S103, the operation of comparing the next entry information if it is the same is repeated until any entry information reaches the upper limit of the memory unit. Even before reaching, it may be determined that “all match” if the same information area of a predetermined length continues.

本発明によるプログラム暴走監視回路および方法は、CPUを用いたコンピュータあるいは情報処理装置などに適用可能である。   The program runaway monitoring circuit and method according to the present invention can be applied to a computer or an information processing apparatus using a CPU.

本発明の一実施形態によるプログラム暴走監視回路のブロック図である。It is a block diagram of the program runaway monitoring circuit by one Embodiment of this invention. 本実施形態によるプログラム暴走監視回路の動作を説明するための状態遷移図である。It is a state transition diagram for demonstrating operation | movement of the program runaway monitoring circuit by this embodiment. 本実施形態における比較判定部6の検索動作を説明するための模式図である。It is a schematic diagram for demonstrating the search operation | movement of the comparison determination part 6 in this embodiment. 比較判定部6の検索動作の流れを概略的に示すフローチャートである。7 is a flowchart schematically showing the flow of a search operation of a comparison / determination unit 6.

符号の説明Explanation of symbols

1 CPU
2 読み取り部
3 タイマ部
4 メモリ部
5 メモリ部
6 比較判定部
7 カウント監視部

1 CPU
2 Reading unit 3 Timer unit 4 Memory unit 5 Memory unit 6 Comparison determination unit 7 Count monitoring unit

Claims (13)

プログラム制御プロセッサ上で実行されているプログラムの暴走を監視する回路において、
前記プログラム制御プロセッサが使用するバス上のアドレス情報およびデータ情報を設定されたタイミングで読み取るバス情報読み取り手段と、
前記読み取られたアドレス情報およびデータ情報の組をエントリ情報として前記設定されたタイミングごとに交互に蓄積する第1メモリ手段および第2メモリ手段と、
前記第1メモリ手段に蓄積された第1エントリ情報と前記第2メモリ手段に蓄積された第2エントリ情報とを比較して同一情報領域の存在の有無を判定する比較判定手段と、
前記比較判定手段の判定結果に基づいてプログラムの暴走を監視する監視手段と、
を有することを特徴とするプログラム暴走監視回路。
In the circuit that monitors the runaway of the program running on the program control processor,
Bus information reading means for reading address information and data information on the bus used by the program control processor at a set timing;
First memory means and second memory means for alternately storing the set of the read address information and data information as entry information at each set timing;
Comparison determination means for comparing the first entry information stored in the first memory means and the second entry information stored in the second memory means to determine the presence or absence of the same information area;
Monitoring means for monitoring program runaway based on the determination result of the comparison determination means;
A program runaway monitoring circuit comprising:
前記バス情報読み取り手段は、前記バス上のイネーブル信号を契機として、前記バス上のアドレス情報およびデータ情報を前記プログラム制御プロセッサの動作クロックに従って読み取ることを特徴とする請求項1に記載のプログラム暴走監視回路。   2. The program runaway monitoring according to claim 1, wherein the bus information reading means reads address information and data information on the bus according to an operation clock of the program control processor in response to an enable signal on the bus. circuit. 前記同一情報領域は同一情報が同一順序で複数配列された領域であることを特徴とする請求項1または2に記載のプログラム暴走監視回路。   3. The program runaway monitoring circuit according to claim 1, wherein the same information area is an area in which a plurality of pieces of the same information are arranged in the same order. 前記監視手段は、前記比較判定手段による同一情報領域の存在を示す判定結果が複数回発生したときに、プログラムの暴走を検出することを特徴とする請求項1−3のいずれかに記載のプログラム暴走監視回路。   The program according to any one of claims 1 to 3, wherein the monitoring unit detects a program runaway when a determination result indicating the presence of the same information area is generated a plurality of times by the comparison determination unit. Runaway monitoring circuit. 前記監視手段は、前記同一情報領域の存在を示す判定結果の回数をカウントするカウント手段を有し、前記カウント値が所定しきい値を超えたときにプログラムの暴走を検出することを特徴とする請求項4に記載のプログラム暴走監視回路。   The monitoring means has counting means for counting the number of determination results indicating the presence of the same information area, and detects a program runaway when the count value exceeds a predetermined threshold value. The program runaway monitoring circuit according to claim 4. 前記所定しきい値は、プログラム暴走の誤認を回避できる値に設定されたことを特徴とする請求項5に記載のプログラム暴走監視回路。   6. The program runaway monitoring circuit according to claim 5, wherein the predetermined threshold value is set to a value that can prevent erroneous recognition of program runaway. プログラム制御プロセッサ上で実行されているプログラムの暴走を監視する方法において、
前記プログラム制御プロセッサが使用するバス上のアドレス情報およびデータ情報の組をエントリ情報として設定されたタイミングで順次読み取り、
前回のタイミングで読み取られた第1エントリ情報と今回のタイミングで読み取られた第2エントリ情報とを比較して同一情報領域を検索し、
前記同一情報領域の有無によりプログラムの暴走を監視する、
ことを特徴とするプログラム暴走監視方法。
In a method for monitoring runaway of a program running on a program control processor,
A set of address information and data information on the bus used by the program control processor is sequentially read at the timing set as entry information ,
The first entry information read at the previous timing and the second entry information read at the current timing are compared to search for the same information area,
Monitor the program runaway depending on the presence or absence of the same information area,
A program runaway monitoring method characterized by the above.
前記同一情報領域は同一情報が同一順序で複数配列された領域であることを特徴とする請求項7に記載のプログラム暴走監視方法。   8. The program runaway monitoring method according to claim 7, wherein the same information area is an area in which a plurality of the same information is arranged in the same order. 前記同一情報領域が複数回検索されたときに、プログラムの暴走を検出することを特徴とする請求項7または8に記載のプログラム暴走監視方法。   9. The program runaway monitoring method according to claim 7 or 8, wherein a program runaway is detected when the same information area is searched a plurality of times. 前記同一情報領域が所定しきい値を超える回数検索されたときにプログラムの暴走を検出することを特徴とする請求項9に記載のプログラム暴走監視方法。   10. The program runaway monitoring method according to claim 9, wherein a program runaway is detected when the same information area is searched a number of times exceeding a predetermined threshold. 前記所定しきい値は、プログラム暴走の誤認を回避できる値に設定されたことを特徴と
する請求項10に記載のプログラム暴走監視方法。
11. The program runaway monitoring method according to claim 10, wherein the predetermined threshold value is set to a value that can prevent misperception of program runaway.
請求項1−6のいずれかに記載のプログラム暴走監視回路を有する情報処理装置。   An information processing apparatus comprising the program runaway monitoring circuit according to claim 1. 請求項7−11のいずれかに記載のプログラム暴走監視方法を採用した情報処理装置。   An information processing apparatus adopting the program runaway monitoring method according to any one of claims 7-11.
JP2005323019A 2005-11-08 2005-11-08 Program runaway monitoring circuit and method Expired - Fee Related JP4454566B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005323019A JP4454566B2 (en) 2005-11-08 2005-11-08 Program runaway monitoring circuit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005323019A JP4454566B2 (en) 2005-11-08 2005-11-08 Program runaway monitoring circuit and method

Publications (2)

Publication Number Publication Date
JP2007133458A JP2007133458A (en) 2007-05-31
JP4454566B2 true JP4454566B2 (en) 2010-04-21

Family

ID=38155097

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005323019A Expired - Fee Related JP4454566B2 (en) 2005-11-08 2005-11-08 Program runaway monitoring circuit and method

Country Status (1)

Country Link
JP (1) JP4454566B2 (en)

Also Published As

Publication number Publication date
JP2007133458A (en) 2007-05-31

Similar Documents

Publication Publication Date Title
JP5914521B2 (en) Processing device, trace unit, and diagnostic device
JP4815141B2 (en) Circuit abnormal operation detection system
US20120265471A1 (en) Method for reliably operating a sensor
JP2010086364A (en) Information processing device, operation state monitoring device and method
WO2018000343A1 (en) Method and device for preventing touch screen edge misoperation
JP2019159786A (en) Information processing device, information processing method, and program
JP4454566B2 (en) Program runaway monitoring circuit and method
JP5093473B2 (en) Vehicle failure detection device
JP5932721B2 (en) Fault information management method, fault information management apparatus, and program
JP2005293164A (en) Task monitoring system
CN113655707A (en) Voting control method and device for safety instrument system and electronic device
JP4627275B2 (en) Monitoring program, monitoring method, and monitoring apparatus
JPH11330931A (en) Device and method for monitoring clock operation of control system
JP4842036B2 (en) Semiconductor device and abnormality detection method of timing control circuit
JP2015162030A (en) Fault indication apparatus, fault indication method and fault indication program
JP2019106053A (en) Semiconductor device
JP4797831B2 (en) Signal processing apparatus and signal processing method
JP2870202B2 (en) Method and apparatus for mutual monitoring between processors
JP2007164451A (en) Input/output control method, input/output control program and magnetic disk device
JPH0854922A (en) Process controller
JP2002163008A (en) Circuit and method for detecting run-away of programable controller
JP2020140592A (en) Information processing system
JP2010211391A (en) Method and device for monitoring operation of cpu
CN109659901A (en) Guard method, device and the electronic equipment of direct current generator
JP2005250711A (en) Stall monitoring system, data processor and stall monitoring method to be used for the same

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090728

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091028

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091214

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: 20100119

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100202

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

Free format text: PAYMENT UNTIL: 20130212

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees