JP3627545B2 - CPU abnormality detection method - Google Patents

CPU abnormality detection method Download PDF

Info

Publication number
JP3627545B2
JP3627545B2 JP35179298A JP35179298A JP3627545B2 JP 3627545 B2 JP3627545 B2 JP 3627545B2 JP 35179298 A JP35179298 A JP 35179298A JP 35179298 A JP35179298 A JP 35179298A JP 3627545 B2 JP3627545 B2 JP 3627545B2
Authority
JP
Japan
Prior art keywords
cpu
calculated
value
latest
calculation
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 - Lifetime
Application number
JP35179298A
Other languages
Japanese (ja)
Other versions
JP2000172521A (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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP35179298A priority Critical patent/JP3627545B2/en
Publication of JP2000172521A publication Critical patent/JP2000172521A/en
Application granted granted Critical
Publication of JP3627545B2 publication Critical patent/JP3627545B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、CPUの異常検出方法に係り、特に、複数のCPUを有するコンピュータシステムにおけるCPUの異常検出方法に関する。
【0002】
【従来の技術】
従来より、内部に複数のCPU(Central Processing Unit) を設けて動作信頼性を向上させたコンピュータシステムが広く知られている。このようなコンピュータシステムでは、複数のCPUの演算結果を比較することにより、CPUの故障等の有無が検出される。例えば、特開平5−324391号では、バス比較器によってCPUの故障の有無を検出する方法が開示されている。
【0003】
このバス比較器は、複数のCPU毎に対応して設けられた圧縮処理部と比較器とを有している。そして、それぞれの圧縮処理部は、対応するCPUのビット毎のデータ圧縮部と直列転送部を有している。このような構成において、CPUの出力データは、バス比較器内のデータ圧縮部によって符号圧縮される。符号圧縮されたデータは、直列転送部によって直列に転送された後に比較器側に出力される。比較器は、各圧縮処理部から出力された圧縮データを順次比較して、不一致のデータがある場合にCPUの故障等を検出する。
【0004】
このような故障検出方法によれば、CPUの出力データがデータ圧縮部によって圧縮されるので、CPUのバスのビット数が増加しても対応することができる。また、CPUの出力データが圧縮されて比較結果の出力周波数も低くなるので、フェールセーフを確保する分周回路等を設ける必要もなく、バス比較器等の低コスト化が図られる。
【0005】
【発明が解決しようとする課題】
しかし、上記従来例のような方法でCPUの異常を検出するには、複数のCPUの演算タイミングや外部センサ等から複数のCPUに与えられるデータの入力タイミング等の同期をとる必要がある。このため、同期信号発生回路から各CPUに同期信号を与える必要があった。
【0006】
また、CPUの同期をとるためにCPUが各処理毎に要する演算時間等を厳密に見積もる必要があった。更に、複数のCPUの同期をとるための同期信号がうまく働かず、CPUの同期がとれない場合の対策を準備しておく必要があった。
上記従来例において、完全な同期がとられていない複数のCPUが演算を行なうとそれぞれの演算結果に差異が生じ、互いの演算結果の比較の結果、正常なCPUでも異常であると誤認識されたり、異常なCPUでも正常であると誤認識される可能性がある。
【0007】
本発明は、上記の点に鑑みてなされたものであり、複数のCPUを有するコンピュータシステムにおいて、複数CPUの同期をとることなく、CPUの異常を容易に検出する方法を提供することを目的とする。
【0008】
【課題を解決するための手段】
上記目的は、請求項1に記載する如く、複数のCPUを有するコンピュータシステムにおけるCPUの異常検出方法であって、
各CPUそれぞれに所定の間隔で順次入力信号を取得させる第1のステップと、
各CPUそれぞれに他のCPUが算出した入力信号に対する最新の演算値を取得させる第2のステップと、
各CPUそれぞれに、前記第2のステップの実行により他のCPUが算出した前記最新の演算値を取得させた後に、入力信号に対する演算値を算出させる第3のステップと、
各CPUそれぞれに、算出した最新の所定数の演算値、他のCPUが算出した前記最新の演算値と大小比較させる第4のステップと、
前記第4のステップによる大小比較の結果に基づきCPUの異常を検出する第5のステップとを備えるCPUの異常検出方法によ達成される。
【0009】
このようなCPUの異常検出方法では、複数のCPUが互いの演算値を比較し合うことにより、複数のCPUの同期をとることなくCPUの異常が容易に検出される。また、本発明は、他のCPUの最新の演算値を取得してから、各CPUが自己の演算値を算出する構成であるため、各CPUにとって、取得した他のCPUの最新の演算値は、常に自己の最新の演算値よりも先に算出されたものとなる。このため、各CPUは、既に算出した最新の所定数の演算値と他のCPUが算出した最新の演算値との誤差に基づき、CPUの異常の有無を検出すればよく、自己の最新の演算値に続いて算出する演算値を比較時に考慮する必要がない。従って、比較時の誤差の許容範囲を小さく設定することができ、高精度なCPUの異常検出が実現する。
【0010】
また、上記目的は、請求項2に記載する如く、請求項1記載のCPUの異常検出方法であって、
前記第4のステップにおける最新の所定数の演算値は、最新の3つの演算値であるCPUの異常検出方法により達成される。
各CPUが他のCPUが算出した最新の演算値を取得するまでには、所定の微小な時間を要するため、各CPUが取得した他のCPUの最新の演算値は、自己の前々回の演算処理時から最新の演算処理時の間に算出されたものであると限定できる。本発明によると、相手側CPUの最新の演算値と比較する自己CPUの演算値が最新の3つの演算値に限定されるので、比較時の誤差の許容範囲をより小さな値に設定することができる。誤差許容範囲をより小さな値に設定することで、CPUの異常の検出がより高精度に行なわれる。
【0011】
【発明の実施の形態】
以下、図1〜図4を用いて本発明の実施の形態について説明する。
図1は、本発明の異常検出方法によってCPUの異常を検出する制御用コンピュータ10の構成図である。この制御用コンピュータ10は、外部機器12から順次与えられる入力信号に基づいて演算処理を行う。そして、制御用コンピュータ10は、演算処理の結果に応じた制御信号を外部機器14に与えて外部機器14の動作制御を行なう。制御用コンピュータ10に入力信号を供給する外部機器12は、例えば、スイッチやセンサ等である。また、制御用コンピュータ10によって制御される外部機器14は、例えば、アクチュエータやLED表示器等である。
【0012】
図1に示すように、制御コンピュータ10は、入力ポート16、CPU18a、18b、メモリ20a、20b、受信バッファ22a、22b及び出力ポート24等を有する。
入力ポート16は、スイッチやセンサ等で構成される外部機器12からの入力信号を順次取り込む。そして、入力ポート16は、ノイズ消去処理やレベルシフト処理等を施した後の入力信号をCPU18a、18bに与える。
【0013】
CPU18aは、外部機器12から入力ポート16を介して与えられた入力信号に基づき演算処理を行なって、入力信号に応じた演算値a1、a2、a3、・・・を算出する。同様にCPU18bも外部機器12から入力ポート16を介して与えられた入力信号に基づき演算処理を行なって、入力信号に応じた演算値b1、b2、b3、・・・を算出する。
【0014】
CPU18a、18bは、同期がとられておらず、共に所定の間隔t(例えば、約6ms)で演算値の算出を繰り返す。従って、演算値a1、a2、a3、・・・と演算値b1、b2、b3、・・・は、例えば、b1、a1、b2、a2、b3、a3、・・・のような順で交互に算出される。
CPU18aによって算出された演算値a1、a2、a3、・・・は、メモリ20aと受信バッファ22bに順次格納される。また、CPU18bによって算出された演算値b1、b2、b3、・・・は、メモリ20bと受信バッファ22aに順次格納される。
【0015】
また、CPU18aは、最新の3つの自己の演算値(例えば、a1、a2、a3)をメモリ20aから読み出し、最新のCPU18bの演算値(例えば、b3)を受信バッファ22aから読み出す。そして、CPU18aは、演算値a1、a2、a3と演算値b3を比較し、比較結果に応じた制御信号を出力ポート24を介してアクチュエータやLED表示器等で構成される外部機器14に与える。この時、外部機器14は、CPU18aから与えられた制御信号に従って作動する。
【0016】
一方、CPU18bは、最新の3つの自己の演算値(例えば、b1、b2、b3)をメモリ20bから読み出し、最新のCPU18aの演算値(例えば、a3)を受信バッファ22bから読み出す。そして、CPU18bは、演算値b1、b2、b3と演算値a3を比較し、比較の結果、必要に応じてCPU18aから外部機器14への制御信号の出力を禁止にする。
【0017】
メモリ20a、20bは、それぞれCPU18a、18bの演算処理の結果である演算値a1、a2、・・・、b1、b2、・・・の他、CPU18a、18bの動作プログラム等を格納する。
次に、CPU18a、18bの動作説明をフローチャートを用いて行なう。
図2は、CPU18aが実行するルーチンを示すフローチャートである。図2に示すルーチンは、その処理が終了する毎に繰り返し起動させる。なお、メモリ20a内には、前々回と前回のルーチンで取得された入力信号に基づくCPU18aの演算処理の結果である演算値a1、a2が既に格納されているものとする。また、受信バッファ22aには、CPU18bの演算処理の結果である最新の演算値b3が既に格納されているものとする。
【0018】
図2に示すルーチンが起動されると、先ず、ステップ100において、外部機器12からの入力信号が入力ポート16を介して取得される。このステップ100の処理が終了すると、次に、ステップ102の処理が実行される。
ステップ102では、CPU18bによる演算処理の結果である演算値b3が受信バッファ22aから取得される。そして、次に、ステップ104の処理が実行される。
【0019】
ステップ104では、ステップ100において取得された入力信号に基づいた所定の演算が実行され、その結果、演算値a3が算出される。そして、続くステップ106では、ステップ104で算出された演算値a3がメモリ20aに格納される。また、演算値a3は、受信バッファ22bにも与えられ、受信バッファ22b内に格納される。このステップ106の処理が終了すると、次に、ステップ108の処理が実行される。
【0020】
ステップ108では、メモリ20aに格納されていた最新の3つの演算値a1、a2、a3と、ステップ102で取得されたCPU18bの最新の演算値b3との大きさの比較が行なわれる。ここで、例えば、演算値a1、a2、a3のうちの最大値をaMAX 、最小値をaMIN とする。また、比較時の微小な誤差等の許容範囲を定める判定余裕値をαとする。この判定余裕値αは、予め設定されているものとする。ステップ108では、演算値b3と演算値aMAX +α及びaMIN −αとの大小関係の比較が行なわれる。そして、この比較処理の後にステップ110の処理が実行される。
【0021】
ステップ110では、ステップ108の比較結果に基づいた判別処理が実行される。ステップ108において、b3>aMAX +α、又は、b3<aMIN −αが不成立ならば、ステップ110において、CPU18bの演算値b3は、CPU18aの演算値a1、a2、a3と近似しており、CPU18a、18bは共に正常であると判断される。このステップ110の処理が終了すると、次に、ステップ112の処理が実行される。一方、ステップ108において、b3>aMAX +α、又は、b3<aMIN −αが成立するならば、ステップ110において、CPU18bの演算値b3は、CPU18aの演算値a1、a2、a3と大きく乖離しており、CPU18a、18bの少なくとも一方は異常であると判断される。そして、CPU18aから外部機器14に対する制御信号の出力は停止され、今回のルーチンは終了となる。
【0022】
ステップ112では、ステップ104で算出された演算値a3に基づき、制御信号が出力ポート24を介して外部機器14に与えられる。この時、外部機器14は、CPU18aから与えられた制御信号に従って作動する。そして、再び、ステップ100の処理が実行される。
一方、CPU18bは、以下のようなルーチンを実行する。
【0023】
図3は、CPU18bが実行するルーチンを示すフローチャートである。図3に示すルーチンは、その処理が終了する毎に繰り返し起動される。なお、メモリ20b内には、前々回と前回のルーチンで取得された入力信号に基づくCPU18bの演算処理の結果である演算値b1、b2が既に格納されているものとする。また、受信バッファ22bには、CPU18aの最新の演算処理の結果である演算値a3が既に格納されているものとする。
【0024】
図3に示すルーチンが起動されると、先ず、ステップ200において、外部機器12からの入力信号が入力ポート16を介して取得される。ステップ200の処理が終了すると、次に、ステップ202の処理が実行される。
ステップ202では、図2に示すルーチンのステップ106において受信バッファ22b内に格納された演算値a3が取得される。そして、次に、ステップ204の処理が実行される。
【0025】
ステップ204では、ステップ200において取得された入力信号に基づいた所定の演算が実行され、その結果、演算値b3が算出される。そして、次のステップ206では、ステップ204で算出された演算値b3がメモリ20bに格納される。また、演算値b3は、受信バッファ22aにも与えられ、受信バッファ22a内に格納される。このステップ206の処理が終了すると、次に、ステップ208の処理が実行される。
【0026】
ステップ208では、メモリ20bに格納されていた最新の3つの演算値b1、b2、b3と、ステップ202で取得されたCPU18aの最新の演算値a3との大きさの比較が行なわれる。ここで、例えば、演算値b1、b2、b3のうちの最大値をbMAX 、最小値をbMIN とする。また、比較時の微小な誤差等の許容範囲を定める判定余裕値をβとする。この判定余裕値βは、予め設定されているものとする。ステップ208では、演算値a3と演算値aMAX +β及びbMIN −βとの大小関係の比較が行なわれる。そして、この比較処理の後にステップ210の処理が実行される。
【0027】
ステップ210では、ステップ208の比較結果に基づいた判別処理が実行される。ステップ208において、a3>bMAX +β、又は、a3<bMIN −βが不成立ならば、ステップ210において、CPU18aの演算値a3は、CPU18bの演算値b1、b2、b3と近似しており、CPU18a、18bは共に正常であると判断される。そして、このステップ210の処理が終了すると、再び、ステップ200の処理が実行される。一方、ステップ208において、a3>bMAX +β、又は、a3<bMIN −βが成立するならば、ステップ210において、CPU18aの演算値a3は、CPU18bの演算値b1、b2、b3と大きく乖離しており、CPU18a、18bの少なくとも一方は異常であると判断される。この場合、次に、ステップ212の処理が実行される。
【0028】
ステップ212では、CPU18aに停止信号が与えられ、CPU18aから外部機器14への制御信号の出力が禁止となる。そして、今回のルーチンは終了となる。
上記のように、CPU18a、18bが互いの演算値を比較し合うので、CPU18a、18bが正常であるか否かが容易に判別できる。また、本発明によれば、CPU18a、18bの同期をとる必要がないため、同期信号発生回路からCPU18a、18bに同期信号を与えなくてもよい。
【0029】
ここで、CPU18a、18bが互いの演算値を任意のタイミングで取得して、比較処理を行なうようにすると、相手側CPU(例えば、CPU18aにとってのCPU18b)の最新の演算値が自己CPUの最新の演算値より先に算出された値なのか後に算出された値なのか判別できない。例えば、CPU18bの最新の演算値b3がCPU18aの最新の演算値a3より先に算出された値なのか後に算出された値なのか判別できない。この場合、CPU18aの前回の演算処理で算出された演算値a2と、今回(最新)の演算値a3と、演算値a3の次に算出される演算値a4とを考慮して、上記ステップ108の比較処理における誤差等の許容範囲を定める判定余裕値αを大きめに設定する必要がある。
【0030】
しかし、本発明では、上記ステップ102、104及びステップ202、204に示すように、CPU18a、18bは、共に相手側CPUの最新の演算値を受信バッファ22a、22bを介して取得してから、自己の演算処理を行なっている。このため、相手際CPUの最新の演算値は、常に自己CPUの最新の演算値よりも先に算出されたものであると確定できる。
【0031】
また、相手側CPUが最新の演算値を算出した後に、自己CPUがその演算値を受信バッファを介して取得するまでは所定の微小な時間τ(τ<t)を要するので、本発明において、自己CPUが受信バッファを介して取得した相手側CPUの最新の演算値は、自己CPUの前々回の演算処理時から今回(最新)の演算処理時の間に算出されたものであると限定できる。
【0032】
そこで、本発明のステップ108、208では、相手側CPUの最新の演算値と、自己CPUの前々回、前回及び今回の演算処理時の演算値である最新の3つの演算値とを比較する構成にしている。このように、本発明では、相手側CPUの最新の演算値と比較する自己CPUの演算値を最小数の3つに限定しているので、比較処理における誤差等の許容範囲を定める判定余裕値α、βをより小さな値に設定することができる。判定余裕値α、βをより小さな値に設定することで、CPU18a、18bの異常の検出がより高精度に行なわれる。
【0033】
ここで、CPU18a、18bの演算値の比較処理が不要な入力信号に対しては、CPU18a、18bが個別に演算処理を行なうようにしてもよい。演算値の比較処理が不要な入力信号をCPU18a、18bのいずれか一方に分配することで、2つのCPU18a、18bを有効に利用することができる。
なお、上記実施例は、CPU18a、18bが共にそれぞれのルーチンに従って動作し、受信バッファを介して最新の演算値を相手側CPUに与える構成であるが、例えば、CPU18aをマスタCPUとし、CPU18bをスレーブCPUとしてもよい。この場合、マスタCPUであるCPU18aがスレーブCPUであるCPU18bを起動させる。そして、CPU18aによって起動したCPU18bが送信バッファに格納していた最新の演算値をCPU18aに与える。
【0034】
図4は、CPU18a、18bが共に正常である時の演算値a1、a2、a3及びb3を示す図である。なお、演算値a1、a2、b3、a3にそれぞれ対応する時刻t1、t2、t3、t4は、各演算値がCPU18a、18bによって算出された時刻を示す。また、演算値a1、a2、b3、a3にそれぞれ対応する値A、B、C、Dは、各演算値a1、a2、b1、a3の大きさを示す。
【0035】
図4に示すように、CPU18bによって時刻t3に算出された最新の演算値b3の値Cは、CPU18aによって時刻t1に算出された演算値a1の値Aより大きく、時刻t4に算出された演算値a3の値Dより小さい。従って、この場合、図2に示したルーチンのステップ108において、CPU10aは、CPU18a、18bが共に正常であると判断して外部機器14を制御するための制御信号を出力する。
【0036】
図5は、CPU18a、18bの少なくとも一方が異常である時の演算値a1、a2、a3及びb3を示す図である。なお、演算値a1、a2、b3、a3にそれぞれ対応する時刻t1、t2、t3、t4は、各演算値がCPU18a、18bによって算出された時刻を示す。また、演算値a1、a2、b3、a3にそれぞれ対応する値A、B、C、Dは、各演算値a1、a2、b1、a3の大きさを示す。
【0037】
図5に示すように、CPU18bによって時刻t3に算出された最新の演算値b3の値Cは、CPU18aによって時刻t4に算出された演算値a3の値Dに判定余裕値αを加えた値よりも大きい。従って、この場合、図2に示したルーチンのステップ108において、CPU10aは、CPU18a、18bの少なくとも一方が異常であると判断して、外部機器14を制御するための制御信号の出力を停止する。同様に、CPU10bがCPU18a、18bの少なくとも一方が異常であると判断する場合は、CPU18aから外部機器14への制御信号の出力を禁止にする。
【0038】
なお、制御用コンピュータ10内のCPUの数は2個に限らず、制御用コンピュータ10内に3個以上のCPUを設けて、互いの演算値の比較によってCPUの異常検出を行なうようにしてもよい。
上記実施例において、図2のステップ100及び図3のステップ200の処理が特許請求の範囲に記載の第1のステップに相当し、図2のステップ102及び図3のステップ202の処理が特許請求の範囲に記載の第2のステップに相当し、図2のステップ104及び図3のステップ204の処理が特許請求の範囲に記載の第3のステップに相当する。また、図2のステップ108及び図3のステップ208の処理が特許請求の範囲に記載の第4のステップに相当し、図2のステップ110及び図3のステップ210の処理が特許請求の範囲に記載の第5のステップに相当する。
【0039】
【発明の効果】
上述の如く、請求項1記載の発明によれば、複数のCPUを有するコンピュータシステムにおいて、CPUの同期をとることなく、CPUの異常が容易に検出される。また、CPUの異常検出を高精度に行うことができる。
また、請求項2記載の発明によれば、CPUの異常検出をより高精度に行うことができる。
【図面の簡単な説明】
【図1】本発明の異常検出方法が適用される制御用コンピュータの構成図である。
【図2】CPUが実行するルーチンを示すフローチャートである。
【図3】CPUが実行するルーチンを示すフローチャートである。
【図4】2つのCPUが共に正常である時の演算値の値を示す図である。
【図5】2つのCPUのうちの少なくとも一方が異常である時の演算値の値を示す図である。
【符号の説明】
10 制御用コンピュータ
12、14 外部機器
16 入力ポート
18a、18b CPU
20a、20b メモリ
22a、22b 受信バッファ
24 出力ポート
a1、a2、a3、b1、b2、b3 演算値
α、β 判定余裕値
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a CPU abnormality detection method, and more particularly to a CPU abnormality detection method in a computer system having a plurality of CPUs.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, computer systems in which a plurality of CPUs (Central Processing Units) are provided to improve operation reliability are widely known. In such a computer system, the presence or absence of a CPU failure or the like is detected by comparing the calculation results of a plurality of CPUs. For example, Japanese Patent Laid-Open No. 5-324391 discloses a method for detecting the presence or absence of a CPU failure by a bus comparator.
[0003]
This bus comparator has a compression processing unit and a comparator provided for each of a plurality of CPUs. Each compression processing unit has a data compression unit and a serial transfer unit for each bit of the corresponding CPU. In such a configuration, the output data of the CPU is code-compressed by the data compression unit in the bus comparator. The code-compressed data is serially transferred by the serial transfer unit and then output to the comparator side. The comparator sequentially compares the compressed data output from each compression processing unit, and detects a CPU failure or the like when there is mismatched data.
[0004]
According to such a failure detection method, since the output data of the CPU is compressed by the data compression unit, it is possible to cope with an increase in the number of bits of the CPU bus. Further, since the CPU output data is compressed and the output frequency of the comparison result is lowered, it is not necessary to provide a frequency dividing circuit or the like for ensuring fail-safe, and the cost of the bus comparator or the like can be reduced.
[0005]
[Problems to be solved by the invention]
However, in order to detect CPU abnormality by the method as in the conventional example, it is necessary to synchronize calculation timings of a plurality of CPUs, input timings of data given to a plurality of CPUs from external sensors, and the like. For this reason, it is necessary to provide a synchronization signal to each CPU from the synchronization signal generation circuit.
[0006]
In addition, in order to synchronize the CPUs, it is necessary to strictly estimate the calculation time required for each process by the CPU. Furthermore, it is necessary to prepare a countermeasure when a synchronization signal for synchronizing a plurality of CPUs does not work well and the CPUs cannot be synchronized.
In the above conventional example, when a plurality of CPUs that are not perfectly synchronized perform calculations, there is a difference between the respective calculation results. As a result of comparing each other's calculation results, a normal CPU is erroneously recognized as abnormal. Or an abnormal CPU may be mistakenly recognized as normal.
[0007]
The present invention has been made in view of the above points, and an object of the present invention is to provide a method for easily detecting an abnormality of a CPU in a computer system having a plurality of CPUs without synchronizing the plurality of CPUs. To do.
[0008]
[Means for Solving the Problems]
The object is a method for detecting an abnormality of a CPU in a computer system having a plurality of CPUs, as described in claim 1.
A first step of Ru are sequentially obtains the input signal at a predetermined interval in each of CPU,
A second step of Ru to acquire the latest calculated value for the input signal other CPU is calculated respectively each CPU,
Each respective CPU, after to acquire the latest calculated value other CPU is calculated by executing the second step, a third step of Ru is calculated operation value for the input signal,
To each of CPU, the latest of each calculated value of the predetermined number of calculated, a fourth step of comparing the latest other CPU is calculated by the calculation value and the magnitude,
The I Ri is achieved anomaly detection method of a CPU and a fifth step of detecting an abnormality of the CPU based on the result of magnitude comparison by the fourth step.
[0009]
In such a CPU abnormality detection method, a plurality of CPUs compare each other's calculated values, whereby a CPU abnormality is easily detected without synchronizing the plurality of CPUs. In addition, since the present invention is configured so that each CPU calculates its own calculation value after acquiring the latest calculation value of the other CPU, for each CPU, the acquired latest calculation value of the other CPU is Therefore, it is always calculated prior to its latest calculated value. For this reason, each CPU has only to detect the presence or absence of abnormality of the CPU based on the error between the latest predetermined number of calculated values already calculated and the latest calculated values calculated by other CPUs. It is not necessary to consider the calculation value to be calculated following the value when comparing. Accordingly, the allowable error range at the time of comparison can be set small, and highly accurate CPU abnormality detection can be realized.
[0010]
Further, the object is a method for detecting an abnormality of a CPU according to claim 1, as described in claim 2.
The latest predetermined number of each calculation value in the fourth step is achieved by the CPU abnormality detection method which is the latest three calculation values.
Since it takes a predetermined minute time for each CPU to acquire the latest calculation value calculated by the other CPU, the latest calculation value of the other CPU acquired by each CPU is the calculation process of its own previous time. It can be limited that it is calculated between the time and the latest arithmetic processing. According to the present invention, since the calculation value of the own CPU to be compared with the latest calculation value of the counterpart CPU is limited to the three latest calculation values, it is possible to set the allowable error range at the time of comparison to a smaller value. it can. By setting the allowable error range to a smaller value, the CPU abnormality is detected with higher accuracy.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to FIGS.
FIG. 1 is a configuration diagram of a control computer 10 that detects an abnormality of a CPU by the abnormality detection method of the present invention. The control computer 10 performs arithmetic processing based on input signals sequentially given from the external device 12. Then, the control computer 10 controls the operation of the external device 14 by giving a control signal corresponding to the result of the arithmetic processing to the external device 14. The external device 12 that supplies an input signal to the control computer 10 is, for example, a switch or a sensor. The external device 14 controlled by the control computer 10 is, for example, an actuator or an LED display.
[0012]
As shown in FIG. 1, the control computer 10 includes an input port 16, CPUs 18a and 18b, memories 20a and 20b, reception buffers 22a and 22b, an output port 24, and the like.
The input port 16 sequentially receives input signals from the external device 12 configured by switches, sensors, and the like. The input port 16 provides the CPU 18a and 18b with an input signal that has undergone noise elimination processing, level shift processing, and the like.
[0013]
The CPU 18a performs arithmetic processing based on an input signal given from the external device 12 via the input port 16, and calculates arithmetic values a1, a2, a3,... According to the input signal. Similarly, the CPU 18b performs arithmetic processing based on an input signal given from the external device 12 through the input port 16, and calculates arithmetic values b1, b2, b3,... According to the input signal.
[0014]
The CPUs 18a and 18b are not synchronized, and both repeat calculation of the calculation value at a predetermined interval t (for example, about 6 ms). Therefore, the calculated values a1, a2, a3,... And the calculated values b1, b2, b3,... Alternate in the order of, for example, b1, a1, b2, a2, b3, a3,. Is calculated.
The calculated values a1, a2, a3,... Calculated by the CPU 18a are sequentially stored in the memory 20a and the reception buffer 22b. Further, the calculated values b1, b2, b3,... Calculated by the CPU 18b are sequentially stored in the memory 20b and the reception buffer 22a.
[0015]
The CPU 18a reads the latest three calculated values (for example, a1, a2, and a3) from the memory 20a, and reads the latest calculated value (for example, b3) of the CPU 18b from the reception buffer 22a. Then, the CPU 18a compares the calculated values a1, a2, and a3 with the calculated value b3, and provides a control signal corresponding to the comparison result to the external device 14 configured by an actuator, an LED display, or the like via the output port 24. At this time, the external device 14 operates according to a control signal given from the CPU 18a.
[0016]
On the other hand, the CPU 18b reads the latest three calculated values (for example, b1, b2, and b3) from the memory 20b, and reads the latest calculated value (for example, a3) of the CPU 18a from the reception buffer 22b. Then, the CPU 18b compares the calculated values b1, b2, and b3 with the calculated value a3, and as a result of the comparison, prohibits the output of the control signal from the CPU 18a to the external device 14 as necessary.
[0017]
The memories 20a and 20b store the operation values of the CPUs 18a and 18b in addition to the operation values a1, a2,..., B1, b2,.
Next, the operation of the CPUs 18a and 18b will be described using a flowchart.
FIG. 2 is a flowchart showing a routine executed by the CPU 18a. The routine shown in FIG. 2 is repeatedly activated every time the process is completed. In the memory 20a, it is assumed that the calculation values a1 and a2 that are the results of the calculation processing of the CPU 18a based on the input signals acquired in the previous and previous routines are already stored. Further, it is assumed that the latest calculation value b3, which is the result of the calculation process of the CPU 18b, is already stored in the reception buffer 22a.
[0018]
When the routine shown in FIG. 2 is started, first, in step 100, an input signal from the external device 12 is acquired via the input port 16. When the process of step 100 is completed, the process of step 102 is executed next.
In step 102, a calculation value b3 that is a result of the calculation process by the CPU 18b is acquired from the reception buffer 22a. Next, the process of step 104 is executed.
[0019]
In step 104, a predetermined calculation based on the input signal acquired in step 100 is executed, and as a result, a calculation value a3 is calculated. In the subsequent step 106, the calculated value a3 calculated in step 104 is stored in the memory 20a. The calculated value a3 is also given to the reception buffer 22b and stored in the reception buffer 22b. When the process of step 106 is completed, the process of step 108 is executed next.
[0020]
In step 108, the latest three calculated values a1, a2, and a3 stored in the memory 20a are compared with the latest calculated value b3 of the CPU 18b acquired in step 102. Here, for example, the maximum value among the calculated values a1, a2, and a3 is a MAX and the minimum value is a MIN . In addition, a determination margin value that determines an allowable range such as a minute error at the time of comparison is α. This determination margin value α is set in advance. In step 108, the magnitude relation between the computed value b3 and the computed values a MAX + α and a MIN −α is compared. Then, after this comparison process, the process of step 110 is executed.
[0021]
In step 110, a discrimination process based on the comparison result in step 108 is executed. If b3> a MAX + α or b3 <a MIN −α is not established in step 108, the calculated value b3 of the CPU 18b approximates the calculated values a1, a2, and a3 of the CPU 18a in step 110, and the CPU 18a , 18b are determined to be normal. When the process of step 110 is completed, the process of step 112 is executed next. On the other hand, if b3> a MAX + α or b3 <a MIN −α is established in step 108, the calculated value b3 of the CPU 18b greatly deviates from the calculated values a1, a2, and a3 of the CPU 18a in step 110. Therefore, it is determined that at least one of the CPUs 18a and 18b is abnormal. Then, the output of the control signal from the CPU 18a to the external device 14 is stopped, and the current routine ends.
[0022]
In step 112, a control signal is given to the external device 14 via the output port 24 based on the calculation value a 3 calculated in step 104. At this time, the external device 14 operates according to a control signal given from the CPU 18a. Then, the process of step 100 is executed again.
On the other hand, the CPU 18b executes the following routine.
[0023]
FIG. 3 is a flowchart showing a routine executed by the CPU 18b. The routine shown in FIG. 3 is repeatedly started every time the process is completed. In the memory 20b, it is assumed that the calculation values b1 and b2 that are the results of the calculation processing of the CPU 18b based on the input signals acquired in the previous and previous routines are already stored. In addition, it is assumed that the calculation value a3 that is the result of the latest calculation processing of the CPU 18a is already stored in the reception buffer 22b.
[0024]
When the routine shown in FIG. 3 is started, first, in step 200, an input signal from the external device 12 is acquired via the input port 16. When the process of step 200 is completed, the process of step 202 is then executed.
In step 202, the operation value a3 stored in the reception buffer 22b in step 106 of the routine shown in FIG. 2 is acquired. Next, the process of step 204 is executed.
[0025]
In step 204, a predetermined calculation based on the input signal acquired in step 200 is executed, and as a result, a calculated value b3 is calculated. In the next step 206, the calculated value b3 calculated in step 204 is stored in the memory 20b. The calculated value b3 is also given to the reception buffer 22a and stored in the reception buffer 22a. When the process of step 206 is completed, the process of step 208 is then executed.
[0026]
In step 208, the magnitudes of the latest three calculated values b1, b2, b3 stored in the memory 20b and the latest calculated value a3 of the CPU 18a acquired in step 202 are compared. Here, for example, the maximum value among the calculated values b1, b2, and b3 is b MAX and the minimum value is b MIN . Further, a determination margin value that determines an allowable range such as a minute error at the time of comparison is β. This determination margin value β is set in advance. In step 208, the magnitude relation between the computed value a3 and the computed values a MAX + β and b MIN −β is compared. Then, after this comparison process, the process of step 210 is executed.
[0027]
In step 210, determination processing based on the comparison result in step 208 is executed. If a3> b MAX + β or a3 <b MIN −β is not established in step 208, the calculated value a3 of the CPU 18a approximates the calculated values b1, b2, and b3 of the CPU 18b in step 210, and the CPU 18a , 18b are determined to be normal. Then, when the process of step 210 is completed, the process of step 200 is executed again. On the other hand, if a3> b MAX + β or a3 <b MIN −β holds in step 208, the calculated value a3 of the CPU 18a greatly deviates from the calculated values b1, b2, and b3 of the CPU 18b in step 210. Therefore, it is determined that at least one of the CPUs 18a and 18b is abnormal. In this case, next, the process of step 212 is executed.
[0028]
In step 212, a stop signal is given to the CPU 18a, and output of a control signal from the CPU 18a to the external device 14 is prohibited. And this routine is complete | finished.
As described above, since the CPUs 18a and 18b compare the calculated values with each other, it can be easily determined whether or not the CPUs 18a and 18b are normal. Further, according to the present invention, since it is not necessary to synchronize the CPUs 18a and 18b, it is not necessary to provide a synchronization signal from the synchronization signal generating circuit to the CPUs 18a and 18b.
[0029]
Here, when the CPUs 18a and 18b obtain the mutual calculation values at arbitrary timing and perform comparison processing, the latest calculation value of the partner CPU (for example, the CPU 18b for the CPU 18a) is the latest value of the own CPU. It cannot be determined whether the value is calculated before or after the calculated value. For example, it cannot be determined whether the latest calculated value b3 of the CPU 18b is a value calculated before or after the latest calculated value a3 of the CPU 18a. In this case, the calculation value a2 calculated in the previous calculation process of the CPU 18a, the current (latest) calculation value a3, and the calculation value a4 calculated next to the calculation value a3 are taken into consideration. It is necessary to set a large judgment margin value α that determines an allowable range of error or the like in the comparison process.
[0030]
However, in the present invention, as shown in Steps 102 and 104 and Steps 202 and 204, the CPUs 18a and 18b both acquire the latest calculated values of the counterpart CPU through the reception buffers 22a and 22b, and then The calculation process is performed. For this reason, it can be determined that the latest calculation value of the counterpart CPU is always calculated before the latest calculation value of the own CPU.
[0031]
Further, after the partner CPU calculates the latest calculated value, it takes a predetermined minute time τ (τ <t) until the own CPU acquires the calculated value via the reception buffer. The latest calculation value of the counterpart CPU acquired by the own CPU through the reception buffer can be limited to that calculated from the previous calculation process of the own CPU to the current (latest) calculation process.
[0032]
Therefore, in steps 108 and 208 of the present invention, the latest calculation value of the counterpart CPU is compared with the latest three calculation values that are the calculation values of the previous CPU, the previous and the current calculation processing. ing. As described above, in the present invention, the calculation value of the own CPU to be compared with the latest calculation value of the counterpart CPU is limited to the minimum number of three, so a determination margin value that determines an allowable range such as an error in the comparison processing α and β can be set to smaller values. By setting the determination margin values α and β to smaller values, the abnormality of the CPUs 18a and 18b can be detected with higher accuracy.
[0033]
Here, the CPU 18a and 18b may individually perform arithmetic processing on input signals that do not require comparison processing of the arithmetic values of the CPUs 18a and 18b. By distributing an input signal that does not require a comparison process of operation values to one of the CPUs 18a and 18b, the two CPUs 18a and 18b can be used effectively.
In the above embodiment, the CPUs 18a and 18b both operate according to their respective routines and give the latest calculation value to the counterpart CPU via the reception buffer. For example, the CPU 18a is the master CPU and the CPU 18b is the slave. It may be a CPU. In this case, the CPU 18a as the master CPU activates the CPU 18b as the slave CPU. Then, the CPU 18b activated by the CPU 18a gives the latest calculated value stored in the transmission buffer to the CPU 18a.
[0034]
FIG. 4 is a diagram showing the calculation values a1, a2, a3, and b3 when the CPUs 18a and 18b are both normal. Note that times t1, t2, t3, and t4 respectively corresponding to the calculated values a1, a2, b3, and a3 indicate times at which the calculated values are calculated by the CPUs 18a and 18b. Further, values A, B, C, and D respectively corresponding to the calculated values a1, a2, b3, and a3 indicate the magnitudes of the calculated values a1, a2, b1, and a3.
[0035]
As shown in FIG. 4, the value C of the latest calculated value b3 calculated by the CPU 18b at time t3 is larger than the value A of the calculated value a1 calculated by the CPU 18a at time t1, and the calculated value calculated at time t4. It is smaller than the value D of a3. Therefore, in this case, in step 108 of the routine shown in FIG. 2, the CPU 10a determines that both the CPUs 18a and 18b are normal and outputs a control signal for controlling the external device 14.
[0036]
FIG. 5 is a diagram showing calculated values a1, a2, a3, and b3 when at least one of the CPUs 18a and 18b is abnormal. Note that times t1, t2, t3, and t4 respectively corresponding to the calculated values a1, a2, b3, and a3 indicate times at which the calculated values are calculated by the CPUs 18a and 18b. Further, values A, B, C, and D respectively corresponding to the calculated values a1, a2, b3, and a3 indicate the magnitudes of the calculated values a1, a2, b1, and a3.
[0037]
As shown in FIG. 5, the value C of the latest calculated value b3 calculated at time t3 by the CPU 18b is larger than the value obtained by adding the determination margin value α to the value D of the calculated value a3 calculated at time t4 by the CPU 18a. large. Therefore, in this case, in step 108 of the routine shown in FIG. 2, the CPU 10a determines that at least one of the CPUs 18a and 18b is abnormal, and stops outputting a control signal for controlling the external device 14. Similarly, when the CPU 10b determines that at least one of the CPUs 18a and 18b is abnormal, the control signal output from the CPU 18a to the external device 14 is prohibited.
[0038]
Note that the number of CPUs in the control computer 10 is not limited to two, but three or more CPUs may be provided in the control computer 10 so that CPU abnormality detection is performed by comparing the calculated values of each other. Good.
In the above embodiment, the processing in step 100 in FIG. 2 and the processing in step 200 in FIG. 3 corresponds to the first step described in the claims, and the processing in step 102 in FIG. 2 and step 202 in FIG. 2 corresponds to the second step, and the processing of step 104 in FIG. 2 and step 204 in FIG. 3 corresponds to the third step described in the claims. 2 corresponds to the fourth step described in the claims, and the processing of step 110 of FIG. 2 and step 210 of FIG. 3 falls within the scope of the claims. This corresponds to the fifth step described.
[0039]
【The invention's effect】
As described above, according to the first aspect of the present invention, in a computer system having a plurality of CPUs, a CPU abnormality is easily detected without synchronizing the CPUs. In addition, the CPU abnormality can be detected with high accuracy.
Further, according to the second aspect of the present invention, it is possible to detect the abnormality of the CPU with higher accuracy.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a control computer to which an abnormality detection method of the present invention is applied.
FIG. 2 is a flowchart showing a routine executed by a CPU.
FIG. 3 is a flowchart showing a routine executed by a CPU.
FIG. 4 is a diagram illustrating a value of an operation value when both two CPUs are normal.
FIG. 5 is a diagram illustrating a value of a calculation value when at least one of two CPUs is abnormal.
[Explanation of symbols]
10 control computer 12, 14 external device 16 input port 18a, 18b CPU
20a, 20b Memory 22a, 22b Reception buffer 24 Output port a1, a2, a3, b1, b2, b3 Operation value α, β Judgment margin value

Claims (2)

複数のCPUを有するコンピュータシステムにおけるCPUの異常検出方法であって、
各CPUそれぞれに所定の間隔で順次入力信号を取得させる第1のステップと、
各CPUそれぞれに他のCPUが算出した入力信号に対する最新の演算値を取得させる第2のステップと、
各CPUそれぞれに、前記第2のステップの実行により他のCPUが算出した前記最新の演算値を取得させた後に、入力信号に対する演算値を算出させる第3のステップと、
各CPUそれぞれに、算出した最新の所定数の演算値、他のCPUが算出した前記最新の演算値と大小比較させる第4のステップと、
前記第4のステップによる大小比較の結果に基づきCPUの異常を検出する第5のステップとを備えることを特徴とするCPUの異常検出方法。
A method for detecting an abnormality of a CPU in a computer system having a plurality of CPUs,
A first step of Ru are sequentially obtains the input signal at a predetermined interval in each of CPU,
A second step of Ru to acquire the latest calculated value for the input signal other CPU is calculated respectively each CPU,
Each respective CPU, after to acquire the latest calculated value other CPU is calculated by executing the second step, a third step of Ru is calculated operation value for the input signal,
To each of CPU, the latest of each calculated value of the predetermined number of calculated, a fourth step of comparing the latest other CPU is calculated by the calculation value and the magnitude,
And a fifth step of detecting an abnormality of the CPU based on a result of the size comparison in the fourth step .
請求項1記載のCPUの異常検出方法であって、
前記第4のステップにおける最新の所定数の演算値は、最新の3つの演算値であることを特徴とするCPUの異常検出方法。
The CPU abnormality detection method according to claim 1,
The CPU abnormality detection method, wherein the latest predetermined number of each calculation value in the fourth step is the latest three calculation values.
JP35179298A 1998-12-10 1998-12-10 CPU abnormality detection method Expired - Lifetime JP3627545B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35179298A JP3627545B2 (en) 1998-12-10 1998-12-10 CPU abnormality detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35179298A JP3627545B2 (en) 1998-12-10 1998-12-10 CPU abnormality detection method

Publications (2)

Publication Number Publication Date
JP2000172521A JP2000172521A (en) 2000-06-23
JP3627545B2 true JP3627545B2 (en) 2005-03-09

Family

ID=18419645

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35179298A Expired - Lifetime JP3627545B2 (en) 1998-12-10 1998-12-10 CPU abnormality detection method

Country Status (1)

Country Link
JP (1) JP3627545B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030075100A (en) * 2002-03-16 2003-09-22 한국하니웰 주식회사 A digital controller apparatus and method
JP4007203B2 (en) 2003-01-23 2007-11-14 株式会社デンソー Electronic control unit

Also Published As

Publication number Publication date
JP2000172521A (en) 2000-06-23

Similar Documents

Publication Publication Date Title
US6370200B1 (en) Delay adjusting device and method for plural transmission lines
US8065564B2 (en) Redundant control apparatus
JP2006209565A (en) Information processor and information processing method
US10606794B1 (en) Clock signal monitor for slave device on a master-slave bus
KR101560497B1 (en) Method for controlling reset of lockstep replicated processor cores and lockstep system using the same
US6038683A (en) Replicated controller and fault recovery method thereof
US11354261B2 (en) Process control system
US20040221195A1 (en) Information processing apparatus
CN109154925A (en) Communication equipment, communication means, program and communication system
JP3627545B2 (en) CPU abnormality detection method
JP2011123756A (en) Safety control device and safety control program therefor
JP3465889B2 (en) Serial data transfer device, control method therefor, and communication device
JP2006178730A (en) Safe signal i/f device and duplicated signal input processing method thereof
JP3652232B2 (en) Microcomputer error detection method, error detection circuit, and microcomputer system
JP3217993B2 (en) Parity check circuit
JP5604799B2 (en) Fault tolerant computer
JPH06319184A (en) Communication system intra controller
JP3361919B2 (en) Programmable controller
JP2518652B2 (en) Interrupt diagnostic device for multi-bus synchronous system
JPH01277951A (en) Data transfer equipment
JPS6051136B2 (en) Data error detection method
JP3906373B2 (en) Clock synchronous bus board
JPH02206856A (en) Detecting method of address transfer error and apparatus
JPH08249089A (en) Device provided with reset control circuit
JPH08272637A (en) Dual system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040514

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041129

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091217

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20101217

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20101217

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20111217

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111217

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20121217

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20131217

Year of fee payment: 9

EXPY Cancellation because of completion of term