JP2012068788A - Information processing device and failure detection method - Google Patents

Information processing device and failure detection method Download PDF

Info

Publication number
JP2012068788A
JP2012068788A JP2010211715A JP2010211715A JP2012068788A JP 2012068788 A JP2012068788 A JP 2012068788A JP 2010211715 A JP2010211715 A JP 2010211715A JP 2010211715 A JP2010211715 A JP 2010211715A JP 2012068788 A JP2012068788 A JP 2012068788A
Authority
JP
Japan
Prior art keywords
mode
calculation
software
calculation means
self
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010211715A
Other languages
Japanese (ja)
Inventor
Tetsuaki Wakabayashi
哲明 若林
Masaya Yoneki
真哉 米木
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 JP2010211715A priority Critical patent/JP2012068788A/en
Publication of JP2012068788A publication Critical patent/JP2012068788A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an information processing device that performs proper fail-safe processing even if an abnormal CPU core cannot be identified.SOLUTION: The information processing device 100 includes program storage means 12 and mode changing means 30 for changing a mode from a lock step mode to an asynchronous mode. The device further includes comparing means 32 for comparing the calculation results of first calculation means and second calculation means in the lock step mode, and software control means 31 that causes, when the calculation results do not match each other, the first calculation means and the second calculation means to execute self diagnosis software respectively after the mode changing means changes the mode from the lock step mode to the asynchronous mode. Both results of the self diagnosis of the two calculation means show normal, the mode changing means changes the mode from the asynchronous mode to the lock step mode, and software control means causes the first calculation means and the second calculation means to respectively execute fail-safe software whose operation has been guaranteed by execution of the self diagnosis software.

Description

本発明は、CPU又はCPUコアの異常を検出することができる情報処理装置等に関し、特に、ロックステップモードで動作するデュアルコア等のCPU又はCPUコアの異常を検出することができる情報処理装置及び異常検出方法に関する。   The present invention relates to an information processing apparatus that can detect an abnormality of a CPU or a CPU core, and in particular, an information processing apparatus that can detect an abnormality of a CPU or a CPU core such as a dual core that operates in a lockstep mode. The present invention relates to an anomaly detection method.

車両には数多くのコンピュータ(ECU:electronic control unit)が搭載されており、コンピュータにより各種制御が実行されている。コンピュータにはCPUが搭載されているが、CPUも機械の一種なので異常が生じることがある。車両では安全確保の観点から仮にCPUに異常が生じても、運転者による回避行動が確保されるようにCPUを設計する必要がある(以下、フェールセーフ処理という)。   A lot of computers (ECU: electronic control unit) are mounted on the vehicle, and various controls are executed by the computer. Although a computer is equipped with a CPU, an abnormality may occur because the CPU is a kind of machine. In the vehicle, it is necessary to design the CPU so that the avoidance action by the driver is ensured even if an abnormality occurs in the CPU from the viewpoint of ensuring safety (hereinafter referred to as fail-safe processing).

このため、コンピュータに複数のCPUを搭載し相互に出力を検証するなどの手法が採用されるが、複数のCPUの出力が一致しない場合に、異常が生じたCPUを特定する必要が生じる。   For this reason, a method of mounting a plurality of CPUs in a computer and verifying the outputs mutually is adopted. However, when the outputs of the plurality of CPUs do not match, it is necessary to identify the CPU in which an abnormality has occurred.

例えば、3つのCPUコアを搭載したトリプルコアのCPUでは、コンピュータは比較的容易に異常のあるCPUコアを特定することができる。すなわち、3つのCPUコアに同じ処理を実行させ出力を比較回路などで比較し、3つのCPUコアのいずれかの出力に不一致が生じた場合、コンピュータは多数決で異常のあるCPUコアを特定することができる。   For example, in a triple-core CPU equipped with three CPU cores, the computer can identify an abnormal CPU core relatively easily. In other words, if the same processing is executed by three CPU cores and the outputs are compared by a comparison circuit, etc., and a mismatch occurs in the output of any of the three CPU cores, the computer must identify the abnormal CPU core by majority vote. Can do.

しかしながら、トリプルコアを採用することはコスト高となるため、デュアルコアを搭載したCPUにおいても異常のあるCPUコアを特定することが望まれている。例えば、ロックステップ式のデュアルコアを搭載したCPUでは、同じ処理を2つのCPUコアで常に実行し、それぞれのCPUコアの出力を比較する方法が取られる。そして、一方のCPUコアで出力に不一致が生じた場合、もう一方のCPUコアのみで処理を継続する。   However, since adopting a triple core increases the cost, it is desired to identify an abnormal CPU core even in a CPU equipped with a dual core. For example, in a CPU equipped with a lockstep dual core, the same processing is always executed by two CPU cores, and the output of each CPU core is compared. If a mismatch occurs in output in one CPU core, the process is continued only in the other CPU core.

このように何らかの方法で異常のあるCPUコアが特定できればそのCPUコアを切り離し、フェールセーフ処理が可能になる(例えば、特許文献1参照。)。特許文献1には、同期状態で両者に不一致エラーが検出された場合、一時的に非同期となり故障箇所が明示的であれば故障部分を切り離すフォールトトレラントシステムが開示されている。   Thus, if an abnormal CPU core can be identified by some method, the CPU core is disconnected and fail-safe processing is possible (for example, refer to Patent Document 1). Patent Document 1 discloses a fault-tolerant system that, when a mismatch error is detected in both of them in a synchronized state, temporarily becomes asynchronous and separates the faulty part if the faulty part is explicit.

特開2006−178616号公報JP 2006-178616 A

しかしながら、2つしかCPUコアがないデュアルコアでは、出力に不一致が生じた場合、どちらが正しいかの判定が困難になるが、特許文献1にはどのように異常のあるCPUコアを明示的にするかについて開示されていないという問題がある。上記のように異常のあるCPUコアを特定できないと、適切なフェールセーフ処理が困難である。   However, in the case of a dual core having only two CPU cores, it is difficult to determine which one is correct when the output does not match. There is a problem that is not disclosed. If an abnormal CPU core cannot be identified as described above, appropriate fail-safe processing is difficult.

本発明は、上記課題に鑑み、デュアルコア又は2つのCPUを搭載し、異常のあるCPUコアを特定できない場合でも適切なフェールセーフ処理が可能な情報処理装置及び異常検出方法を提供することを目的とする。   The present invention has been made in view of the above problems, and an object thereof is to provide an information processing apparatus and an abnormality detection method that are equipped with dual cores or two CPUs and are capable of appropriate fail-safe processing even when an abnormal CPU core cannot be identified. And

本発明は、プログラムを記憶したプログラム記憶手段と、第1の演算手段と、第2の演算手段と、前記第1の演算手段及び前記第2の演算手段が同じ命令を同じタイミングで実行するロックステップモードから、前記第1の演算手段及び前記第2の演算手段が独立に命令を実行する非同期モードに切り替えるモード切り替え手段と、を備えた情報処理装置であって、ロックステップモードの前記第1の演算手段と前記第2の演算手段の演算結果を比較する比較手段と、前記演算結果が一致しない場合、前記モード切り替え手段がロックステップモードから非同期モードに切り替えた後、前記第1の演算手段及び前記第2の演算手段にそれぞれ自己診断ソフトを実行させるソフト制御手段と、を有し、前記第1の演算手段と前記第2の演算手段の自己診断の結果がいずれも正常な場合、前記モード切り替え手段が非同期モードからロックステップモードに切り替えた後、前記ソフト制御手段が、前記自己診断ソフトの実行により動作が保証されたフェールセーフソフトを前記第1の演算手段及び前記第2の演算手段にそれぞれ実行させる、ことを特徴とする。   The present invention provides a program storage means for storing a program, a first operation means, a second operation means, and a lock in which the first operation means and the second operation means execute the same instruction at the same timing. An information processing apparatus comprising: a mode switching means for switching from a step mode to an asynchronous mode in which the first computing means and the second computing means independently execute instructions, wherein the first in lock step mode If the calculation result does not match the comparison means for comparing the calculation results of the second calculation means and the second calculation means, the mode switching means switches from the lock step mode to the asynchronous mode, and then the first calculation means And software control means for causing the second calculation means to execute self-diagnosis software, respectively, the first calculation means and the second calculation means When all the self-diagnosis results are normal, after the mode switching unit switches from the asynchronous mode to the lockstep mode, the software control unit executes the fail-safe software whose operation is guaranteed by the execution of the self-diagnosis software. The first calculation means and the second calculation means are respectively executed.

デュアルコア又は2つのCPUを搭載していても、異常のあるCPUコアを特定できない場合でも適切なフェールセーフ処理が可能な情報処理装置及び異常検出方法を提供することができる。   Even if a dual core or two CPUs are mounted, an information processing apparatus and an abnormality detection method capable of appropriate fail-safe processing even when an abnormal CPU core cannot be identified can be provided.

情報処理装置の概略を説明する図の一例である。It is an example of the figure explaining the outline of an information processor. 情報処理装置の概略構成図の一例である。It is an example of the schematic block diagram of information processing apparatus. CPUの機能ブロック図の一例である。It is an example of a functional block diagram of a CPU. ロックステップモードと非同期モードそれぞれのモードで、ブロック間のラインやブロックの有効・無効を説明する図である。It is a figure explaining the validity / invalidity of the line between blocks, or a block in each mode in lock step mode and asynchronous mode. ロックステップ管理部がロックステップモードと非同期モードを切り替える手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the procedure in which a lockstep management part switches a lockstep mode and an asynchronous mode. フェールセーフソフトと自己診断ソフトの関係を模式的に説明する図の一例である。It is an example of the figure which illustrates typically the relation between fail safe software and self-diagnosis software. フェールセーフソフトから自己診断ソフトを生成する際の手順を模式的に説明する図の一例である。It is an example of the figure which illustrates typically the procedure at the time of producing | generating self-diagnosis software from fail safe software. 図5のフローチャート図を変形したフローチャート図の一例である。It is an example of the flowchart figure which deform | transformed the flowchart figure of FIG. 通常ソフト内のフェールセーフソフトを模式的に説明する図の一例である。It is an example of the figure which illustrates fail safe software in normal software typically.

以下、本発明を実施するための形態について図面を参照しながら説明する。
図1は、本実施形態の情報処理装置の概略を説明する図の一例である。情報処理装置はCPUにロックステップ式のデュアルコアを搭載しており、比較手段が常時、2つのCPUコアの出力を比較している(ロックステップモード)。
(1)比較装置が2つの出力の不一致を検出した場合、情報処理装置はロックステップモードから非同期モードになる。
(2)非同期モードになった各CPUコアはそれぞれ自己診断ソフトを実行する。自己診断ソフトには、CPUコアの典型的な機能が正常か否かを判定するための処理と期待値が記述されており、処理結果と期待値が一致するか否かによりCPUコアが正常か否かが判定される。
(3)自己診断ソフトには、CPUコアの典型的な機能が正常かどうかを診断するための処理が記述されているが、実際に車両を制御するソフト(以下、通常ソフトという)と比べ規模が小さいことから、異常の検出精度は100%未満であることが知られている。このため、どちらかのCPUコアに異常があっても、自己診断ソフトではどちらのCPUコアにも問題がない結果が得られ、異常のあるCPUコアを特定できない場合がある。
(4)この場合、2つのCPUコアはロックステップモードに戻り、2つのCPUコアがどちらもフェールセーフソフトを実行する。
Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
FIG. 1 is an example of a diagram illustrating an outline of the information processing apparatus according to the present embodiment. The information processing apparatus has a lock-step dual core mounted on the CPU, and the comparison means always compares the outputs of the two CPU cores (lock-step mode).
(1) When the comparison device detects a mismatch between the two outputs, the information processing device changes from the lockstep mode to the asynchronous mode.
(2) Each CPU core in the asynchronous mode executes self-diagnosis software. The self-diagnosis software describes a process and an expected value for determining whether or not a typical function of the CPU core is normal, and whether the CPU core is normal or not is determined by whether or not the process result matches the expected value. It is determined whether or not.
(3) The self-diagnosis software describes a process for diagnosing whether or not a typical function of the CPU core is normal. Therefore, it is known that the abnormality detection accuracy is less than 100%. For this reason, even if there is an abnormality in one of the CPU cores, the self-diagnostic software can obtain a result that there is no problem with either of the CPU cores, and the CPU core with the abnormality may not be identified.
(4) In this case, the two CPU cores return to the lockstep mode, and the two CPU cores both execute fail-safe software.

本実施形態の情報処理装置では、このフェールセーフソフトが、自己診断ソフトで保証された処理のみで構成されている点が特徴の1つとなる。   One feature of the information processing apparatus according to this embodiment is that the fail-safe software is configured only by processing guaranteed by the self-diagnosis software.

こうすることで、フェールセーフソフトが実行される間、車両は自己診断ソフトにより異常が生じない動作のみを行うので、運転者は確実に退避行動することができる。   By doing so, while the fail-safe software is executed, the vehicle performs only an operation in which no abnormality is caused by the self-diagnosis software, so that the driver can surely retreat.

このようなフェールセーフソフトの最も簡単な構成は、自己診断ソフトとフェールセーフソフトウェアを同じものとすることであり、自己診断ソフトで異常が検出されなければ、フェールセーフ処理においても何ら問題が生じないことが保証される。   The simplest configuration of such fail-safe software is to make the self-diagnostic software and fail-safe software the same. If no abnormality is detected by the self-diagnostic software, no problem occurs in the fail-safe processing. It is guaranteed.

または、自己診断ソフトの処理をフェールセーフソフトの処理から網羅的に抽出して構成することで、フェールセーフソフトが実行される間、車両は自己診断ソフトにより異常が生じない動作のみを行うことができる。フェールセーフソフトは、運転者が退避行動を取るために必要な小規模な処理に抑制されているので、自己診断ソフト>フェールセーフソフトの関係を保証できる。   Alternatively, the process of the self-diagnosis software can be comprehensively extracted from the process of the fail-safe software so that the vehicle can only perform an operation that does not cause an abnormality by the self-diagnosis software while the fail-safe software is executed. it can. Since the fail-safe software is suppressed to a small process necessary for the driver to take evacuation action, the relationship of self-diagnosis software> fail-safe software can be guaranteed.

〔ハードウェア構成〕
図2は、情報処理装置100の概略構成図の一例を示す。情報処理装置100は例えばECU(electronic control unit)と称され、各種の車載装置を制御するために用いられる。情報処理装置100は、システムバス19に接続されたCPU11、ROM12、RAM13及びINTC(割込みコントローラ)14、I/Oバス20に接続されたI/O17、並びに、システムバス19とI/Oバスに接続されたBRG(バスブリッジ)15を有する。
[Hardware configuration]
FIG. 2 shows an example of a schematic configuration diagram of the information processing apparatus 100. The information processing apparatus 100 is called an ECU (electronic control unit), for example, and is used to control various on-vehicle apparatuses. The information processing apparatus 100 includes a CPU 11, a ROM 12, a RAM 13 and an INTC (interrupt controller) 14 connected to the system bus 19, an I / O 17 connected to the I / O bus 20, and a system bus 19 and an I / O bus. It has a connected BRG (bus bridge) 15.

ROM12には、情報処理装置100が制御のために実行するプログラム(以下、通常ソフトという)が記憶されている。プログラムは後述するように、通常ソフトの他、自己診断ソフト及びフェールセーフソフトを含む。この他、OSやデバイスドライバが記憶されていてもよい。通常ソフトによる処理を通常処置、自己診断ソフトによる処理を自己診断処理、フェールセーフソフトによる処理をフェールセーフ処理と呼ぶ場合があるが、ソフトと処理は厳密に区別しなくてもよいものである。   The ROM 12 stores a program (hereinafter referred to as normal software) executed by the information processing apparatus 100 for control. As will be described later, the program includes self-diagnosis software and fail-safe software in addition to normal software. In addition, an OS and a device driver may be stored. There are cases where normal software processing is called normal processing, self-diagnostic software processing is called self-diagnosis processing, and fail-safe software processing is called fail-safe processing. However, software and processing need not be strictly distinguished.

RAM13はCPU11がプログラムを実行する際の作業メモリであり、INTC14は、タイマ、センサ、他のECU等からの割込み要因を調停して、CPU11に割込み要求する。   The RAM 13 is a working memory when the CPU 11 executes a program, and the INTC 14 arbitrates interrupt factors from timers, sensors, other ECUs, etc., and issues an interrupt request to the CPU 11.

BRG15は、システムバス19とI/Oバス20の間で相互に周波数や電圧値などを変換する。I/O17は情報処理装置100と外部の機器を接続するインタフェースであり、例えば、各種のアクチュエータ、センサ、スイッチ等が接続される。   The BRG 15 converts the frequency, voltage value, and the like between the system bus 19 and the I / O bus 20. The I / O 17 is an interface that connects the information processing apparatus 100 and an external device. For example, various actuators, sensors, switches, and the like are connected to the I / O 17.

図3は、CPU11の機能ブロック図の一例である。このCPU11はデュアルコアを備えたロックステップが可能なCPUである。マルチコアでなく複数のCPU11を搭載してもよい。CPUコア111(以下、区別する場合CPUコア1,2という)はロックステップ管理部30と接続されている。ロックステップ管理部30は、調停部31、出力比較部32、結果判定部33、及び、出力選択部34を有する。   FIG. 3 is an example of a functional block diagram of the CPU 11. The CPU 11 is a CPU capable of lockstep with a dual core. A plurality of CPUs 11 may be mounted instead of the multi-core. The CPU core 111 (hereinafter referred to as CPU cores 1 and 2 when distinguished) is connected to the lockstep management unit 30. The lockstep management unit 30 includes an arbitration unit 31, an output comparison unit 32, a result determination unit 33, and an output selection unit 34.

ロックステップとは、2以上のCPUコア111が同じ命令ストリームを同時並行に実行する命令実行方法をいう。また、ロックステップが可能なCPU11をロックステップCPUという。ロックステップCPU内の各CPUコア111は、同じ命令ストリームを実行するので、同じ結果を出力する。しかし、1つ以上のCPUコア111に異常が生じたり、電気的に許容できない極めて大きいノイズが発生したり、アルファ粒子などがCPUコア111に影響を及ぼすと、複数のCPUコア111の出力が一致ないことが生じる。   A lock step is an instruction execution method in which two or more CPU cores 111 execute the same instruction stream in parallel. The CPU 11 that can perform the lock step is referred to as a lock step CPU. Since each CPU core 111 in the lockstep CPU executes the same instruction stream, it outputs the same result. However, if an abnormality occurs in one or more CPU cores 111, an extremely large noise that is electrically unacceptable, or alpha particles affect the CPU cores 111, the outputs of the plurality of CPU cores 111 match. Not happen.

本実施形態のCPU11は、2つの出力が不一致の場合に異常のあるCPUコア111の特定を試みるが、特定できなくてもCPUコア111がフェールセーフソフトを実行する範囲ではCPU111に異常が生じないことを保証できる。   The CPU 11 of this embodiment tries to identify an abnormal CPU core 111 when the two outputs do not match. However, even if the CPU core 111 cannot be identified, no abnormality occurs in the CPU 111 as long as the CPU core 111 executes fail-safe software. I can guarantee that.

ロックステップ管理部30は、2つのCPUコア111が同じ命令ストリームを実行するロックステップモードと、各CPUコア111が独立に命令ストリームを実行する非同期モードを切り替える。ロックステップ管理部30は、ロックステップモードか非同期モードかにより、ロックステップ管理部30の各機能を制御する。   The lockstep management unit 30 switches between a lockstep mode in which two CPU cores 111 execute the same instruction stream and an asynchronous mode in which each CPU core 111 executes an instruction stream independently. The lock step management unit 30 controls each function of the lock step management unit 30 depending on whether the lock step mode or the asynchronous mode.

図4は、ロックステップモードと非同期モードそれぞれのモードで、ブロック間のラインやブロックの有効・無効を説明する図である。ロックステップモードでは調停部31と出力比較部32、及び、関連するラインが有効になり、非同期モードでは調停部31、結果判定部33、出力選択部34、及び、関連するラインが有効になる。   FIG. 4 is a diagram for explaining the validity / invalidity of lines between blocks and blocks in each of the lockstep mode and the asynchronous mode. In the lock step mode, the arbitration unit 31, the output comparison unit 32, and related lines are enabled. In the asynchronous mode, the arbitration unit 31, the result determination unit 33, the output selection unit 34, and related lines are enabled.

図3に戻り、調停部31にはROM12が接続されており、調停部31は、CPU11の状態に応じて、通常ソフト、自己診断ソフト又はフェールセーフソフトの命令をCPUコア1とCPUコア2に出力する。   Returning to FIG. 3, the ROM 12 is connected to the arbitration unit 31, and the arbitration unit 31 sends instructions for normal software, self-diagnosis software, or fail-safe software to the CPU core 1 and the CPU core 2 according to the state of the CPU 11. Output.

出力比較部32は、ロックステップモードの場合、CPUコア1とCPUコア2の出力結果を常時(例えばクロック毎に)比較し、不一致の場合に調停部31に通知する。また、出力比較部32は、不一致を検出すると、CPUコア1とCPUコア2に自己診断ソフトの実行開始を通知する。また、両者の出力が一致している場合、出力比較部32はCPUコア1とCPUコア2の少なくともどちらかの演算結果を出力する。   In the lock step mode, the output comparison unit 32 constantly compares the output results of the CPU core 1 and the CPU core 2 (for example, every clock), and notifies the arbitration unit 31 when they do not match. When the output comparison unit 32 detects a mismatch, the output comparison unit 32 notifies the CPU core 1 and the CPU core 2 of the start of execution of the self-diagnosis software. Further, when both outputs match, the output comparison unit 32 outputs the operation result of at least one of the CPU core 1 and the CPU core 2.

結果判定部33は、非同期モードにおいて、CPUコア1とCPUコア2からCPUコア1とCPUコア2が自己診断ソフトを実行した際の診断結果を取得して、診断結果に応じて、CPUコア1とCPUコア2に通常ソフト又はフェールセーフソフトのどちらを実行するかを指示する。   The result determination unit 33 acquires a diagnosis result when the CPU core 1 and the CPU core 2 execute the self-diagnosis software from the CPU core 1 and the CPU core 2 in the asynchronous mode, and the CPU core 1 according to the diagnosis result. And CPU core 2 are instructed to execute normal software or fail-safe software.

出力選択部34は、非同期モードにおいて、自己診断ソフトにより異常のあるCPUコア111が特定された場合、異常のないCPUコア1又はCPUコア2による通常ソフトの演算結果を選択的にシステムバス19に出力する。
〔処理手順〕
図5は、ロックステップ管理部30がロックステップモードと非同期モードを切り替える手順を示すフローチャート図の一例である。
When the abnormal CPU core 111 is identified by the self-diagnostic software in the asynchronous mode, the output selection unit 34 selectively selects the normal software calculation result by the CPU core 1 or the CPU core 2 without abnormality to the system bus 19. Output.
[Processing procedure]
FIG. 5 is an example of a flowchart illustrating a procedure in which the lock step management unit 30 switches between the lock step mode and the asynchronous mode.

起動直後のCPU11はロックステップモードで動作するようになっている(S110)。ロックステップ管理部30は、ロックステップモードで各部を動作させるため、図4にて説明したように、ラインk1,k2,ラインa1、a2、ラインb1、b2、ラインfを有効に、調停部31と出力比較部32を有効に、それぞれ設定する。   The CPU 11 immediately after start-up operates in the lockstep mode (S110). Since the lock step management unit 30 operates each unit in the lock step mode, as described with reference to FIG. 4, the line k1, k2, lines a1, a2, lines b1, b2, and line f are effectively enabled, and the arbitration unit 31 And the output comparison unit 32 are set effectively.

ロックステップモードの調停部31は、通常ソフト又はフェールセーフソフトの命令を1つずつCPUコア1、CPUコア2に同時に供給する(S120)。CPUコア1、CPUコア2に同じ周波数のクロック信号が供給されるので、両者は同時に同じ命令を実行する。なお、調停部31がROM12から読み出す命令は1つなので、調停部31は命令を複製してCPUコア1とCPUコア2に供給する。また、ROM12とCPU間のシステムバス19がボトルネットとならないような構成では、調停部31がCPUコア1、CPUコア2のプログラムカウンタに同じアドレスを設定しても両者が同期して同じ命令を実行できる。   The arbitration unit 31 in the lockstep mode supplies normal software or fail-safe software instructions to the CPU core 1 and the CPU core 2 one by one (S120). Since clock signals having the same frequency are supplied to the CPU core 1 and the CPU core 2, both execute the same instruction at the same time. Since the arbitration unit 31 reads one command from the ROM 12, the arbitration unit 31 duplicates the command and supplies it to the CPU core 1 and the CPU core 2. Further, in a configuration in which the system bus 19 between the ROM 12 and the CPU does not become a bottle net, even if the arbitration unit 31 sets the same address in the program counter of the CPU core 1 and the CPU core 2, both of them synchronize and issue the same instruction. Can be executed.

CPUコア1とCPUコア2はラインa1、a2を介してほぼ同時に演算結果を出力するので、出力比較部32は2つの出力結果が一致するか否かを比較し、不一致の場合、ロックステップ管理部30と調停部31に通知する。なお、一致するか否かは、完全に一致するか否かを判定すればよいが、誤差と見なせるレベルの不一致は一致しているとみなすことができる。   Since the CPU core 1 and the CPU core 2 output the calculation results almost simultaneously via the lines a1 and a2, the output comparison unit 32 compares whether or not the two output results match. Notify the unit 30 and the arbitration unit 31. Note that whether or not they match may be determined by determining whether or not they completely match, but it is possible to regard that a level mismatch that can be regarded as an error matches.

出力比較部32が一致すると判定した場合(S130のYes)、出力比較部32は、CPUコア1又はCPUコア2の出力をラインfを介してシステムバス19に出力する(S140)。   When it is determined that the output comparison unit 32 matches (Yes in S130), the output comparison unit 32 outputs the output of the CPU core 1 or the CPU core 2 to the system bus 19 via the line f (S140).

出力比較部32が一致すると判定しない場合(S130のNo)、ロックステップ管理部30は、CPU11をロックステップモードから非同期モードに切り替える(S150)。具体的には、非同期モードで各部を動作させるため、ラインk1、k2と調停部31は有効のまま、ラインc1、c2、ラインd1、d2、ラインe1、e2、ラインgによる通信を有効に、結果判定部33と出力選択部34を有効に、それぞれ設定する。   When it is not determined that the output comparison units 32 match (No in S130), the lock step management unit 30 switches the CPU 11 from the lock step mode to the asynchronous mode (S150). Specifically, in order to operate each part in the asynchronous mode, the lines k1, k2 and the arbitration unit 31 remain valid, and communication via the lines c1, c2, d1, d2, lines e1, e2, and line g is enabled. The result determination unit 33 and the output selection unit 34 are set effectively.

そして、調停部31は、CPUコア1又はCPUコア2に自己診断ソフトを実行させる(S160)。具体的には自己診断ソフトの先頭のアドレスをCPUコア1とCPUコア2のプログラムカウンタに設定する。   Then, the arbitrating unit 31 causes the CPU core 1 or the CPU core 2 to execute self-diagnosis software (S160). Specifically, the head address of the self-diagnosis software is set in the program counters of CPU core 1 and CPU core 2.

CPUコア1とCPUコア2は、出力比較部32からの自己診断ソフトの開始通知により、自己診断ソフトを実行していることを検知し、それぞれラインc1,c2を介して自己診断結果を結果判定部33に出力する(S170)。診断結果は、期待値と自己診断ソフトの演算結果が一致するとHigh又はLowになるものとする。   The CPU core 1 and the CPU core 2 detect that the self-diagnosis software is being executed based on the start notification of the self-diagnosis software from the output comparison unit 32, and determine the result of the self-diagnosis results via the lines c1 and c2, respectively. The data is output to the unit 33 (S170). The diagnosis result is assumed to be High or Low when the expected value and the calculation result of the self-diagnosis software match.

結果判定部33は、CPUコア1とCPUコア2の診断結果に基づき、判定結果を、ロックステップ管理部30,調停部31及び出力選択部34に通知する(S180)。判定結果は以下の4つの場合がある。
(i)
CPUコア1の診断結果のみが異常有りを示す
(ii) CPUコア2の診断結果のみが異常有りを示す
(iii) CPUコア1、2の診断結果がどちらも異常を示す
(iv) CPUコア1、2の診断結果がどちらも正常を示す
(iii)のように、CPUコア1,2のどちらも故障してしまうことは、車両に大きな衝撃が加わるなど情報処理装置100そのものが物理的に破壊されるような状況に生じる。このようなことは車両が正常に走行している場合には生じないが、万一、生じた場合、情報処理装置100はメータパネルの警告ランプを全て点灯させるなどして早急にサービス工場(ディーラー)に持ち込むよう運転者に促す(S190)。
The result determination unit 33 notifies the determination result to the lockstep management unit 30, the arbitration unit 31, and the output selection unit 34 based on the diagnosis results of the CPU core 1 and the CPU core 2 (S180). There are the following four determination results.
(i)
Only the diagnosis result of CPU core 1 indicates that there is an abnormality
(ii) Only the diagnosis result of CPU core 2 indicates that there is an abnormality
(iii) CPU core 1 and 2 diagnostic results are both abnormal
(iv) The diagnosis results of CPU cores 1 and 2 are both normal
As shown in (iii), the failure of both the CPU cores 1 and 2 occurs in a situation where the information processing apparatus 100 itself is physically destroyed, for example, a large impact is applied to the vehicle. Such a situation does not occur when the vehicle is running normally, but in the unlikely event, the information processing apparatus 100 promptly turns on all the warning lamps on the meter panel, etc. ) Is urged to be brought into the vehicle (S190).

(i)又は(ii)のようにCPUコア1又はCPUコア2の一方のみが故障した場合、CPU11は非同期モードのままであるが、調停部31は判定結果に基づき、CPUコア1又はCPUコア2のうち故障していない方にだけ通常ソフトの命令を供給する(S200)。また、結果判定部33は、CPUコア1又はCPUコア2のうち故障していない方に、実行するソフトの種別(ここでは通常ソフト)を通知する。   When only one of the CPU core 1 or the CPU core 2 fails as in (i) or (ii), the CPU 11 remains in the asynchronous mode, but the arbitration unit 31 determines whether the CPU core 1 or the CPU core is based on the determination result. A normal software command is supplied only to one of the two that has not failed (S200). In addition, the result determination unit 33 notifies the CPU core 1 or the CPU core 2 that has not failed of the type of software to be executed (normal software in this case).

CPUコア1又はCPUコア2のうち故障していない方は、実行するソフトの種別(ここでは通常ソフト)に基づき、演算結果を出力選択部34に出力する。出力選択部34は判定結果に基づき、ラインe1、e2のうち故障していない側のみを有効にして、故障していないCPUコア1又はCPUコア2のいずれかの演算結果を取得し、ラインgを介して演算結果をシステムバス19に出力する(S210)。   The CPU core 1 or the CPU core 2 that has not failed outputs the calculation result to the output selection unit 34 based on the type of software to be executed (normal software in this case). Based on the determination result, the output selection unit 34 enables only the non-failed side of the lines e1 and e2, acquires the calculation result of either the CPU core 1 or the CPU core 2 that is not faulty, and the line g The calculation result is output to the system bus 19 via S (S210).

このように、(i)又は(ii)の場合、情報処理装置100は非同期モードのまま通常ソフトを実行するので、運転者が異常が生じるまでと同様に運転することができる。なお、CPUコア1又はCPUコア2に異常が生じたことは、警告ランプなどにより運転者に通知され、また、不揮発メモリに記憶されるので後の解析に利用されることができる。   As described above, in the case of (i) or (ii), the information processing apparatus 100 executes the normal software in the asynchronous mode, so that the driver can drive in the same manner as before the abnormality occurs. Note that the occurrence of an abnormality in the CPU core 1 or the CPU core 2 is notified to the driver by a warning lamp or the like, and is stored in the nonvolatile memory, so that it can be used for later analysis.

(iv)のように、CPUコア1、2の診断結果がどちらも正常を示す場合、ロックステップ管理部30は、非同期モードからロックステップロックステップモードに切り替える(S220)。   As shown in (iv), when both the diagnosis results of the CPU cores 1 and 2 indicate normality, the lock step management unit 30 switches from the asynchronous mode to the lock step lock step mode (S220).

ロックステップモードになると、調停部31は判定結果に基づき、CPUコア1又はCPUコア2の両方にフェールセーフソフトを実行させる(S230)。ロックステップモードなので、CPUコア1とCPUコア2は同時に同じ命令を実行する。また、結果判定部33は、CPUコア1又はCPUコア2の両方に、実行するソフトの種別(ここではフェールセーフソフト)を通知する。   In the lock step mode, the arbitrating unit 31 causes both the CPU core 1 or the CPU core 2 to execute fail-safe software based on the determination result (S230). Because of the lock step mode, the CPU core 1 and the CPU core 2 execute the same instruction at the same time. The result determination unit 33 notifies both the CPU core 1 or the CPU core 2 of the type of software to be executed (here, fail-safe software).

CPUコア1又はCPUコア2の両方は、実行するソフトの種別(ここではフェールセーフソフト)に基づき、出力比較部32に演算結果を出力する。出力比較部32は2つの出力が一致すると判定した場合、CPUコア1又はCPUコア2の出力をラインfを介してシステムバス19に出力する。   Both the CPU core 1 and the CPU core 2 output a calculation result to the output comparison unit 32 based on the type of software to be executed (here, fail-safe software). If the output comparison unit 32 determines that the two outputs match, the output of the CPU core 1 or the CPU core 2 is output to the system bus 19 via the line f.

フェールセーフ処理により、最小限必要な処理が実行されるので、運転者は、車両を路肩に退避させるなどの運転操作が可能になる。例えば情報処理装置100がエンジン制御用のECUであれば、情報処理装置100は、運転者のアクセルペダルの操作によるスロットル開度に関係なく、エンジン回転数をアイドリング回転数程度に抑制する。または、エンジン回転数が所定以上になると、アクセルペダルの操作に関係なく燃料噴射をカットする。このようなフェールセーフ処理により車両に低速走行のみを許可して、駐停車することを可能にする。   Since the minimum necessary processing is executed by the fail-safe processing, the driver can perform a driving operation such as retreating the vehicle to the road shoulder. For example, if the information processing apparatus 100 is an ECU for engine control, the information processing apparatus 100 suppresses the engine speed to about the idling speed regardless of the throttle opening caused by the driver's operation of the accelerator pedal. Alternatively, when the engine speed exceeds a predetermined value, the fuel injection is cut regardless of the operation of the accelerator pedal. Such fail-safe processing allows the vehicle to run only at low speeds and allows parking and stopping.

また、例えば、情報処理装置100がパワステECUであれば、情報処理装置100は、運転者の操舵方向へのトルクを検出した際のアシスト力をゼロにするか又は運転者の操舵を阻害しない程度の小さい値に制御する。これにより、操舵力は重くなっても運転者が所望の方向に車両を操舵することができる。   Further, for example, if the information processing apparatus 100 is a power steering ECU, the information processing apparatus 100 does not interfere with the driver's steering or the assist force when detecting the torque in the steering direction of the driver is zero. Control to a small value. Thus, the driver can steer the vehicle in a desired direction even if the steering force becomes heavy.

また、情報処理装置100がブレーキECUの場合、情報処理装置100は、ABS(アンチロックブレーキシステム)やTRC(トラクションコントロール)に関する処理を停止させ、ブレーキアクチュエータのソレノイドバルブを非通電状態にする。これにより、車両は運転者のブレーキペダルの操作による油圧のみで制動されるようになるため、運転者は所望の場所に駐停車させることができる。   When the information processing apparatus 100 is a brake ECU, the information processing apparatus 100 stops processing related to ABS (anti-lock brake system) and TRC (traction control) and puts the solenoid valve of the brake actuator in a non-energized state. As a result, the vehicle is braked only by the hydraulic pressure generated by the driver's operation of the brake pedal, so that the driver can park at a desired location.

〔フェールセーフソフトと自己診断ソフト〕
以下、本実施形態の自己診断ソフトについて説明する。
・自己診断ソフトを実質的にフェールセーフソフトと同じソフトとする
CPUコア1とCPUコア2のどちらにも異常が検出されない場合、情報処理装置100はロックステップモードでフェールセーフ処理を実行すると説明したが、これは換言するとフェールセーフ処理が可能なら、自己診断によっても異常がないと判定してよいことになる。したがって、自己診断ソフトをフェールセーフソフトと同じものにすれば、自己診断ソフトの開発が不要になりコスト増を抑制できる。
[Fail-safe software and self-diagnosis software]
Hereinafter, the self-diagnosis software of this embodiment will be described.
The self-diagnosis software is substantially the same as the fail-safe software. If no abnormality is detected in either the CPU core 1 or the CPU core 2, the information processing apparatus 100 executes the fail-safe process in the lockstep mode. However, in other words, if fail-safe processing is possible, it may be determined that there is no abnormality even by self-diagnosis. Therefore, if the self-diagnosis software is the same as the fail-safe software, development of the self-diagnosis software is not required and the increase in cost can be suppressed.

上述したようにフェールセーフ処理は、いずれのECUの場合も運転者が退避するために必要な最小限の処理を含んでいるが、期待値や期待値を検証するための処理が含まれていない。このため、開発者はフェールセーフソフトに期待値と期待値を検証するための処理を追加する。   As described above, the fail-safe process includes the minimum process necessary for the driver to evacuate in any ECU, but does not include an expected value or a process for verifying the expected value. . For this reason, the developer adds an expected value and a process for verifying the expected value to the fail-safe software.

図6は、フェールセーフソフトと自己診断ソフトの関係を模式的に説明する図の一例である。図6では、failsafe関数で従来のフェールセーフ処理を実行し、main関数でfailsafe関数の演算結果を呼び出し、期待値と比較している。   FIG. 6 is an example of a diagram schematically illustrating the relationship between fail-safe software and self-diagnosis software. In FIG. 6, the conventional failsafe process is executed with the failsafe function, the operation result of the failsafe function is called with the main function, and compared with the expected value.

まず、main関数が実行されると、変数kekkaに期待値nnnnが格納される。期待値nnnnは、CPUコア111に異常がない状態で、CPUコア111がフェールセーフ処理を実行した際の制御値である。例えば、エンジンECUの場合、アイドル時のスロットル開度、燃料カットのために演算されるインジェクター(電子制御式の電磁バルブ)の制御量(電圧値)などである。また、パワステECUの場合、操舵トルクから演算したアシストトルクである。   First, when the main function is executed, the expected value nnnn is stored in the variable kekka. The expected value nnnn is a control value when the CPU core 111 executes fail-safe processing in a state where there is no abnormality in the CPU core 111. For example, in the case of an engine ECU, there are a throttle opening at idling, a control amount (voltage value) of an injector (electronically controlled electromagnetic valve) calculated for fuel cut, and the like. In the case of a power steering ECU, the assist torque is calculated from the steering torque.

次にmain関数は、「 kekka = failsafe();」でfalesafe関数を呼び出す。failsafe関数は、アイドル時のスロットル開度、インジェクターの制御量の演算、又は、アシストトルクの演算など、フェールセーフ処理に必要な演算を行い、演算結果を変数enzanに格納する。このフェールセーフ処理では、期待値nnnnを求めた際に実行された演算と同じ演算が実行される。「return enzan;」により演算結果は変数kekkaに格納される。   Next, the main function calls the falesafe function with “kekka = failsafe ();”. The failsafe function performs calculations necessary for fail-safe processing such as calculation of throttle opening at the time of idling, control amount of the injector, or calculation of assist torque, and stores the calculation result in a variable enzan. In this fail-safe process, the same calculation as that performed when the expected value nnnn is obtained is executed. The result of the operation is stored in the variable kekka by "return enzan;".

main関数は、kitaichiとkekka を比較して、結果判定部33に診断結果を出力する。このようにすれば、開発者はフェールセーフソフトを最大に活用して自己診断ソフトを用意することができる。また、自己診断ソフトで診断結果に異常がなければ、フェールセーフ処理によってもCPUコア111が異常な振る舞いをすることがないことが保証されるので、運転者は車両を確実に退避させることができる。   The main function compares kitaichi and kekka and outputs a diagnosis result to the result determination unit 33. In this way, the developer can prepare self-diagnosis software by making full use of fail-safe software. Further, if there is no abnormality in the diagnosis result by the self-diagnosis software, it is guaranteed that the CPU core 111 does not behave abnormally even by fail-safe processing, so that the driver can evacuate the vehicle reliably. .

・フェールセーフソフトから自己診断ソフトを生成する
フェールセーフソフトをそのまま自己診断ソフトに取り込むのでなく、フェールセーフソフトから命令又は命令ストリームを取り出し、適宜、命令を補完して自己診断ソフトを生成することもできる。フェールセーフソフトを自己診断ソフトとすると、十分な診断ができなかったり、通常ソフトには含まれるが自己診断ソフトでは実行されない命令が多く含まれるおそれもある。
・ Generate self-diagnostic software from fail-safe software Instead of importing fail-safe software into self-diagnostic software as it is, it is also possible to extract instructions or instruction streams from fail-safe software and generate self-diagnostic software by appropriately supplementing instructions. it can. If the fail-safe software is self-diagnosis software, there is a possibility that sufficient diagnosis cannot be performed or there are many instructions that are included in the normal software but not executed in the self-diagnosis software.

そこで、フェールセーフソフトから命令や命令ストリームを抽出して、それに適宜、命令を補完したり、組み合わせるなどすることで、CPUコア111がより異常を検出しやすい自己診断ソフトが得られると共に、フェールセーフ処理に移行してもフェールセーフ処理の実行は異常がないことが保証される自己診断ソフトを生成することができる。   Therefore, by extracting instructions and instruction streams from fail-safe software and supplementing or combining instructions as appropriate, self-diagnostic software that makes it easier for the CPU core 111 to detect abnormalities can be obtained, and fail-safe It is possible to generate self-diagnosis software that guarantees that there is no abnormality in the execution of the fail-safe process even if the process shifts to the process.

図7は、フェールセーフソフトから自己診断ソフトを生成する際の手順を模式的に説明する図の一例である。フェールセーフソフトはC言語などで記述されているが、ROM12に記憶される際にはコンパイラによりコンパイルされ、オブジェクトコードに変換される。オブジェクトコードは機械語なので実際には16進数などで表記されるが、図の“Load”等のニーモニックがオペコードである。また、オペコードに続いて、Rn(nは整数)で表記したオペランドが記述される。オペランドはレジスタ名と数値、2つのレジスタ名、レジスタ名とポインタ名など様々である。オペランドが1つのみの命令も少なくない。   FIG. 7 is an example of a diagram schematically illustrating a procedure for generating self-diagnosis software from fail-safe software. The failsafe software is written in C language or the like, but when stored in the ROM 12, it is compiled by a compiler and converted into object code. Since the object code is a machine language, it is actually expressed in hexadecimal, etc., but a mnemonic such as “Load” in the figure is an opcode. Further, following the opcode, an operand represented by Rn (n is an integer) is described. There are various operands such as a register name and numerical value, two register names, a register name and a pointer name. Many instructions have only one operand.

このオブジェクトコードを網羅的に実行した自己診断ソフトがあれば、自己診断ソフトとフェールセーフソフトとを同じ処理内容とした場合以上に、自己診断ソフトの実行により異常が検出されないことが、フェールセーフソフトも異常なく実行可能であることを保証できる。   If there is self-diagnostic software that comprehensively executes this object code, the failure-safe software can detect that no abnormality is detected by the execution of the self-diagnostic software more than when the self-diagnostic software and fail-safe software have the same processing contents. It can be guaranteed that it can be executed without abnormality.

フェールセーフソフトから自己診断ソフトを作成するため、本実施形態ではコンパイラに命令抽出手段を設ける。命令抽出手段は、例えば3つの態様で命令を抽出する。
I フェールセーフソフトのオブジェクトコードで検出される単体のオペコード
II フェールセーフソフトのオブジェクトコードで検出されるオペコードとオペランドの組
III フェールセーフソフトのオブジェクトコードで検出される連続した命令の命令ストリーム
よって、IによりLOAD ADD ST SUB SHのオペコードが単体で抽出され、IIにより「LOAD R1」、「ADD R1」「ST R1」「LOAD R2」「SUB R2」「SH R3」などの組が抽出され、IIIにより「LOAD+ADD」「ADD+ST」「LOAD+SUB」「SUB+ST」「LOAD+SH」などの命令ストリームが抽出される。
In order to create self-diagnosis software from fail-safe software, in this embodiment, an instruction extraction means is provided in the compiler. The instruction extracting unit extracts the instruction in, for example, three modes.
I Single opcode detected by failsafe software object code
II Opcode and operand pairs detected by the object code of failsafe software
III With the instruction stream of consecutive instructions detected by the object code of the failsafe software, the operation code of LOAD ADD ST SUB SH is extracted by I alone, and by II, “LOAD R1”, “ADD R1” “ST R1” “ A set such as “LOAD R2”, “SUB R2”, and “SH R3” is extracted, and an instruction stream such as “LOAD + ADD”, “ADD + ST”, “LOAD + SUB”, “SUB + ST”, and “LOAD + SH” is extracted by III.

この抽出された命令だけではプログラムとして成立しないので、開発者は、最小限の命令を加えて、自己診断ソフトの部品を生成する。最小限の命令として、例えばLoadやStは必然的に必要になる。この他、mov(代入命令)、add(加算命令)、jmp(移動命令)、xor(論理演算)、等で含まれるが、フェールセーフ処理にない命令の混入はフェールセーフ処理の保証が困難になる可能性があるので、フェールセーフソフトに含まれない命令は最小限にすることが好ましい。   Since only the extracted instructions are not established as a program, the developer adds a minimum number of instructions and generates self-diagnostic software components. For example, Load and St are inevitably necessary as minimum instructions. In addition, it is included in mov (assignment instruction), add (addition instruction), jmp (movement instruction), xor (logical operation), etc., but it is difficult to guarantee fail-safe processing for instructions that are not in fail-safe processing Therefore, it is preferable to minimize instructions that are not included in the fail-safe software.

なお、IIIの態様では、2つの命令の命令ストリームだけでなく、3以上の命令の命令ストリームを抽出するとさらに好適である。これは、CPUコア111にパイプライン処理が実装されているため、異常の発生(不一致の発生)と連続して実行される命令の組み合わせに相関が生じる傾向があるためである。   In the mode III, it is more preferable to extract not only the instruction stream of two instructions but also the instruction stream of three or more instructions. This is because, since pipeline processing is implemented in the CPU core 111, there is a tendency for a correlation to occur between the occurrence of an abnormality (occurrence of mismatch) and the combination of instructions executed continuously.

開発者は、このようにして自己診断ソフトの部品を完成させる。開発者は複数の自己診断ソフトの部品のまま(又は、組み合わせてもよい)、期待値を算出しておく。期待値の算出に何らかの初期値が必要であれば初期値を与える。   In this way, the developer completes the self-diagnostic software component. The developer keeps the components of the plurality of self-diagnosis software (or may be combined) and calculates the expected value. If some initial value is required to calculate the expected value, the initial value is given.

そして、複数の自己診断ソフトの部品毎に、期待値(必要であれば初期値)と期待値を検証する処理を追加する。   Then, a process for verifying the expected value (initial value if necessary) and the expected value is added for each component of the plurality of self-diagnosis software.

以上のようにして、開発者はフェールセーフソフトから自己診断ソフトを生成することができる。このようにして生成された自己診断ソフトは、フェールセーフソフトの内容を十分にカバーするので、フェールセーフ処理の実行を保証でき、また、自己診断ソフトの命令が網羅的な分、自己診断による異常の検出率が大きくなることも期待できる。   As described above, the developer can generate self-diagnosis software from fail-safe software. The self-diagnostic software generated in this way sufficiently covers the contents of the fail-safe software, so that the execution of fail-safe processing can be guaranteed, and the self-diagnostic software's instructions are comprehensive, so there is an abnormality due to self-diagnosis. It can also be expected that the detection rate will increase.

〔変形例〕
・通常ソフトへの復帰を可能にする
図5のフローチャート図では、出力比較部32が不一致を検出することで、自己診断ソフトが実行されるが、どちらのCPUコア111からも異常が検出されない場合、情報処理装置100が通常ソフトを実行することはできなかった。
[Modification]
In the flowchart of FIG. 5, self-diagnostic software is executed when the output comparison unit 32 detects a mismatch, but no abnormality is detected from either of the CPU cores 111. The information processing apparatus 100 cannot normally execute software.

しかしながら、出力比較部32が不一致を検出した場合も、一過性のソフトエアーである場合もある。このため、出力比較部32が不一致を検出した場合、もう一度、情報処理装置100が通常ソフトを実行できることが好ましい場合があると考えられる。   However, even when the output comparison unit 32 detects a mismatch, it may be temporary soft air. For this reason, when the output comparison unit 32 detects a mismatch, it may be preferable that the information processing apparatus 100 can execute the normal software again.

図8は、図5のフローチャート図を変形したフローチャート図の一例である。ステップS130までの処理は同様であり、出力比較部32が不一致と判定した場合(S130のYes)、調停部31が不一致の検出回数を1つ大きくする(S135)。この検出回数はロックステップ管理部30や調停部31がアクセス可能なメモリに記憶される。なお、この検出回数は、例えば情報処理装置100の起動時からカウントされる。   FIG. 8 is an example of a flowchart obtained by modifying the flowchart of FIG. The processing up to step S130 is the same, and when the output comparison unit 32 determines that there is a mismatch (Yes in S130), the arbitration unit 31 increases the number of times of detection of mismatch by one (S135). The number of detections is stored in a memory accessible by the lockstep management unit 30 and the arbitration unit 31. The number of times of detection is counted from the time when the information processing apparatus 100 is activated, for example.

そして、ロックステップ管理部30は、ロックステップモードから非同期モードに切り替え、CPUコア1とCPUコア2に自己診断ソフトを実行させる(S150〜S180)。   Then, the lock step management unit 30 switches from the lock step mode to the asynchronous mode, and causes the CPU core 1 and the CPU core 2 to execute self-diagnosis software (S150 to S180).

そして、図8では、(iv)のように、CPUコア1、2の診断結果がどちらも正常を示す場合、ロックステップ管理部30は不一致の検出回数が閾値を超えたか否かを判定する(S215)。   In FIG. 8, as shown in (iv), when both the diagnosis results of the CPU cores 1 and 2 indicate normality, the lockstep management unit 30 determines whether or not the number of mismatch detections exceeds the threshold ( S215).

不一致の検出回数が閾値を超えていなければ(S215のNo)、不一致が一過性の可能性があるので、ロックステップ管理部30はステップS110からの処理を実行する。すなわち、ロックステップモードによりCPUコア1とCPUコア2に通常ソフトを実行させる。こうすることで、一過性の不一致によりフェールセーフ処理が実行されることを防止できる。   If the number of mismatch detections does not exceed the threshold (No in S215), there is a possibility that the mismatch is transient, and the lock step management unit 30 executes the processing from step S110. That is, the normal software is executed by the CPU core 1 and the CPU core 2 in the lock step mode. By doing so, it is possible to prevent the fail-safe process from being executed due to a temporary mismatch.

不一致の検出回数が閾値を超えている場合(S215のYes)、図5と同様に、ロックステップ管理部30は、非同期モードからロックステップロックステップモードに切り替え、CPUコア1又はCPUコア2の両方にフェールセーフソフトを実行させる(S220〜S230)。   When the number of mismatch detections exceeds the threshold value (Yes in S215), the lock step management unit 30 switches from the asynchronous mode to the lock step lock step mode as in FIG. Causes fail-safe software to be executed (S220 to S230).

このように処理することで、不一致の原因が一過性であれば、情報処理装置100は可能な限り、通常ソフトを実行できる。   By processing in this way, if the cause of the mismatch is transient, the information processing apparatus 100 can execute normal software as much as possible.

・通常ソフトの一部をフェールセーフソフトと兼用する
開発者は、通常ソフトのうち退避操作に重要な箇所を特定することができるが、フェールセーフ処理においてこのような箇所だけCPUコア11が実行すれば、通常ソフトの一部の実行によりフェールセーフソフトと同様の機能が得られる。
-A part of normal software can also be used as fail-safe software The developer can specify a part of the normal software that is important for the save operation, but the CPU core 11 is executed only in such a part in the fail-safe process. For example, the same function as the fail-safe software can be obtained by executing a part of the normal software.

図9は、通常ソフト内のフェールセーフソフトを模式的に説明する図の一例である。なお、比較のため図3のソフト構造も示した。図9では斜線部が退避処理に重要な箇所である。この箇所は通常処理に使用されるのでこのままではフェールセーフ処理に使用できないおそれがある。   FIG. 9 is an example of a diagram schematically illustrating fail-safe software in normal software. For comparison, the software structure of FIG. 3 is also shown. In FIG. 9, the shaded area is an important part for the saving process. Since this part is used for normal processing, it may not be used for fail-safe processing as it is.

そこで、開発者は退避処理に重要な箇所に、フェールセーフ処理用の変数を設定しておき、フェールセーフ処理の際はその変数を利用するようにプログラムを記述する。これにより通常ソフトをフェールセーフソフトとしても利用できるようになる。   Therefore, the developer sets a variable for fail-safe processing in an important place for the save processing, and writes a program so that the variable is used during the fail-safe processing. As a result, the normal software can be used as fail-safe software.

フェールセーフ処理用の変数を設定するなどの記述のため、従来より通常ソフトのサイズが大きくなったとしても、通常ソフトとフェールセーフソフトを別々に用意するよりは小さいサイズとすることができる。したがって、フェールセーフソフトが不要になりROM12などのメモリの容量を削減できる。   Because of the description such as setting a variable for fail-safe processing, even if the size of the normal software is larger than before, the size can be made smaller than the case where the normal software and the fail-safe software are prepared separately. Therefore, fail-safe software is not necessary, and the capacity of the memory such as the ROM 12 can be reduced.

11 CPU
12 ROM
13 RAM
30 ロックステップ管理部
31 調停部
32 出力比較部
33 結果判定部
34 出力選択部
100 情報処理装置
111 CPUコア
11 CPU
12 ROM
13 RAM
DESCRIPTION OF SYMBOLS 30 Lockstep management part 31 Arbitration part 32 Output comparison part 33 Result determination part 34 Output selection part 100 Information processing apparatus 111 CPU core

Claims (8)

プログラムを記憶したプログラム記憶手段と、第1の演算手段と、第2の演算手段と、
前記第1の演算手段及び前記第2の演算手段が同じ命令を同じタイミングで実行するロックステップモードから、前記第1の演算手段及び前記第2の演算手段が独立に命令を実行する非同期モードに切り替えるモード切り替え手段と、を備えた情報処理装置であって、
ロックステップモードの前記第1の演算手段と前記第2の演算手段の演算結果を比較する比較手段と、
前記演算結果が一致しない場合、前記モード切り替え手段がロックステップモードから非同期モードに切り替えた後、前記第1の演算手段及び前記第2の演算手段にそれぞれ自己診断ソフトを実行させるソフト制御手段と、を有し、
前記第1の演算手段と前記第2の演算手段の自己診断の結果がいずれも正常な場合、前記モード切り替え手段が非同期モードからロックステップモードに切り替えた後、前記ソフト制御手段が、前記自己診断ソフトの実行により動作が保証されたフェールセーフソフトを前記第1の演算手段及び前記第2の演算手段にそれぞれ実行させる、
ことを特徴とする情報処理装置。
Program storage means for storing a program, first computing means, second computing means,
From the lock step mode in which the first arithmetic unit and the second arithmetic unit execute the same instruction at the same timing, the asynchronous mode in which the first arithmetic unit and the second arithmetic unit independently execute the instruction. An information processing device comprising mode switching means for switching,
Comparison means for comparing the calculation results of the first calculation means and the second calculation means in the lockstep mode;
If the calculation results do not match, after the mode switching unit switches from the lock step mode to the asynchronous mode, the first control unit and the second calculation unit to execute the self-diagnosis software respectively, Have
When the self-diagnosis results of the first calculation unit and the second calculation unit are both normal, the soft control unit performs the self-diagnosis after the mode switching unit switches from the asynchronous mode to the lockstep mode. Causing each of the first calculation means and the second calculation means to execute fail-safe software whose operation is guaranteed by execution of software;
An information processing apparatus characterized by that.
前記自己診断ソフトは、前記フェールセーフソフトに、該フェールセーフソフトによる処理の期待値と、該期待値の検証処理を加えたプログラムである、
ことを特徴とする請求項1記載の情報処理装置。
The self-diagnosis software is a program obtained by adding the expected value of processing by the fail-safe software and verification processing of the expected value to the fail-safe software.
The information processing apparatus according to claim 1.
前記自己診断ソフトは、前記フェールセーフソフトから所定の規則に従い抽出された命令を含むように生成された一連の処理、前記一連の処理の期待値、及び、該期待値の検証処理を有するプログラムである、
ことを特徴とする請求項1記載の情報処理装置。
The self-diagnosis software is a program having a series of processes generated to include instructions extracted from the fail-safe software according to a predetermined rule, an expected value of the series of processes, and a verification process of the expected values. is there,
The information processing apparatus according to claim 1.
前記第1の演算手段の自己診断の結果と前記第2の演算手段の自己診断の結果のいずれか一方のみが異常であることを示す場合、
異常があった前記第1の演算手段又は前記第2の演算手段を当該情報処理装置から切り離し、自己診断の結果が正常な前記第1の演算手段又は前記第2の演算手段による演算結果をバスに出力する出力選択手段、
を有することを特徴とする請求項1〜3いずれか1項記載の情報処理装置。
When only one of the result of the self-diagnosis of the first calculation means and the result of the self-diagnosis of the second calculation means is abnormal,
The first calculation means or the second calculation means having an abnormality is disconnected from the information processing apparatus, and the calculation result by the first calculation means or the second calculation means having a normal self-diagnosis result is used as a bus. Output selection means for outputting to
The information processing apparatus according to claim 1, further comprising:
ロックステップモードの前記演算結果が一致する場合、前記比較手段は前記第1の演算手段又は前記第2の演算手段のいずれかの前記演算結果をバスに出力する、
ことを特徴とする請求項1〜4いずれか1項記載の情報処理装置。
When the calculation results in the lock step mode match, the comparison unit outputs the calculation result of either the first calculation unit or the second calculation unit to the bus.
The information processing apparatus according to claim 1, wherein the information processing apparatus is an information processing apparatus.
プログラムを記憶したプログラム記憶手段と、
第1の演算手段と、第2の演算手段と、
前記第1の演算手段及び前記第2の演算手段が同じ命令を同じタイミングで実行するロックステップモードから、前記第1の演算手段と前記第2の演算手段が独立に命令を実行する非同期モードに切り替えるモード切り替え手段と、を備えた情報処理装置であって、
ロックステップモードの前記第1の演算手段と前記第2の演算手段の演算結果を比較する比較手段と、
前記第1の演算手段と前記第2の演算手段の演算結果が一致しない場合、一致しない回数を計測するカウンタと、
前記モード切り替え手段がロックステップモードから非同期モードに切り替えた後、前記第1の演算手段及び前記第2の演算手段にそれぞれ自己診断ソフトを実行させるソフト制御手段と、を有し、
前記第1の演算手段及び前記第2の演算手段の自己診断の結果がいずれも正常であり、かつ、前記カウンタのカウンタ値が閾値を超えた場合、前記モード切り替え手段が非同期モードからロックステップモードに切り替えた後、前記ソフト制御手段が、前記自己診断ソフトの実行により動作が保証されたフェールセーフソフトを前記第1の演算手段及び前記第2の演算手段にそれぞれ実行させる、
ことを特徴とする情報処理装置。
Program storage means for storing a program;
A first computing means, a second computing means,
From the lock step mode in which the first calculation means and the second calculation means execute the same instruction at the same timing, to the asynchronous mode in which the first calculation means and the second calculation means execute the instructions independently. An information processing device comprising mode switching means for switching,
Comparison means for comparing the calculation results of the first calculation means and the second calculation means in the lockstep mode;
A counter for measuring the number of times when the calculation results of the first calculation means and the second calculation means do not match,
Software control means for causing the first calculation means and the second calculation means to execute self-diagnosis software after the mode switching means is switched from the lock step mode to the asynchronous mode,
When the results of self-diagnosis of the first calculation means and the second calculation means are both normal and the counter value of the counter exceeds a threshold value, the mode switching means changes from the asynchronous mode to the lock step mode. After switching to the above, the software control unit causes the first calculation unit and the second calculation unit to execute fail-safe software whose operation is guaranteed by the execution of the self-diagnosis software, respectively.
An information processing apparatus characterized by that.
前記第1の演算手段及び前記第2の演算手段の自己診断の結果がいずれも正常であり、かつ、前記カウンタのカウンタ値が閾値以下の場合、前記モード切り替え手段が非同期モードからロックステップモードに切り替えた後、前記ソフト制御手段は車載装置を制御するプログラムを前記第1の演算手段及び前記第2の演算手段にそれぞれ実行させる、
ことを特徴とする請求項6項記載の情報処理装置。
When the self-diagnosis results of the first calculation means and the second calculation means are both normal and the counter value of the counter is equal to or less than a threshold value, the mode switching means changes from the asynchronous mode to the lockstep mode. After switching, the software control means causes the first calculation means and the second calculation means to execute a program for controlling the in-vehicle device,
The information processing apparatus according to claim 6.
プログラムを記憶したプログラム記憶手段と、
第1の演算手段と、第2の演算手段と、
前記第1の演算手段及び前記第2の演算手段が同じ命令を同じタイミングで実行するロックステップモードから、前記第1の演算手段及び前記第2の演算手段が独立に命令を実行する非同期モードに切り替えるモード切り替え手段と、を備えた情報処理装置の異常検出方法であって、
比較手段が、ロックステップモードの前記第1の演算手段と前記第2の演算手段の演算結果を比較するステップと、
前記演算結果が一致しない場合、前記モード切り替え手段がロックステップモードから非同期モードに切り替えるステップと、
ソフト制御手段が、前記第1の演算手段及び前記第2の演算手段にそれぞれ自己診断ソフトを実行させるステップと、
前記第1の演算手段及び前記第2の演算手段の自己診断の結果がいずれも正常な場合、前記モード切り替え手段が非同期モードからロックステップモードに切り替えるステップと、
前記ソフト制御手段が、前記自己診断ソフトの実行により動作が保証されたフェールセーフソフトを前記第1の演算手段及び前記第2の演算手段にそれぞれ実行させるステップと、を有することを特徴とする異常検出方法。
Program storage means for storing a program;
A first computing means, a second computing means,
From the lock step mode in which the first arithmetic unit and the second arithmetic unit execute the same instruction at the same timing, the asynchronous mode in which the first arithmetic unit and the second arithmetic unit independently execute the instruction. An abnormality detection method for an information processing apparatus comprising mode switching means for switching,
A comparison means comparing the calculation results of the first calculation means and the second calculation means in the lock step mode;
If the calculation results do not match, the mode switching means switches from the lock step mode to the asynchronous mode;
Software control means for causing the first calculation means and the second calculation means to execute self-diagnosis software, respectively;
When the results of self-diagnosis of the first calculation means and the second calculation means are both normal, the mode switching means switches from the asynchronous mode to the lock step mode;
The software control means includes causing the first calculation means and the second calculation means to execute fail-safe software whose operation is guaranteed by execution of the self-diagnosis software, respectively. Detection method.
JP2010211715A 2010-09-22 2010-09-22 Information processing device and failure detection method Pending JP2012068788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010211715A JP2012068788A (en) 2010-09-22 2010-09-22 Information processing device and failure detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010211715A JP2012068788A (en) 2010-09-22 2010-09-22 Information processing device and failure detection method

Publications (1)

Publication Number Publication Date
JP2012068788A true JP2012068788A (en) 2012-04-05

Family

ID=46166030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010211715A Pending JP2012068788A (en) 2010-09-22 2010-09-22 Information processing device and failure detection method

Country Status (1)

Country Link
JP (1) JP2012068788A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016115239A (en) * 2014-12-17 2016-06-23 日本電気株式会社 Fault tolerant system, fault tolerant method, and program
JP2016157247A (en) * 2015-02-24 2016-09-01 トヨタ自動車株式会社 Information processor
JP2017174215A (en) * 2016-03-24 2017-09-28 日本電気株式会社 Information processing apparatus, information processing method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016115239A (en) * 2014-12-17 2016-06-23 日本電気株式会社 Fault tolerant system, fault tolerant method, and program
JP2016157247A (en) * 2015-02-24 2016-09-01 トヨタ自動車株式会社 Information processor
JP2017174215A (en) * 2016-03-24 2017-09-28 日本電気株式会社 Information processing apparatus, information processing method, and program

Similar Documents

Publication Publication Date Title
KR101326316B1 (en) Method and device for monitoring a functionality of an engine controller of an internal combustion engine
US20090217092A1 (en) Method and Device for Controlling a Computer System Having At Least Two Execution Units and One Comparator Unit
US10576990B2 (en) Method and device for handling safety critical errors
JP6189342B2 (en) Method for improving functional safety and increasing the availability of electronic closed loop control systems, and electronic closed loop control systems
US9417946B2 (en) Method and system for fault containment
US20130268798A1 (en) Microprocessor System Having Fault-Tolerant Architecture
US20090164826A1 (en) Method and device for synchronizing in a multiprocessor system
US9058419B2 (en) System and method for verifying the integrity of a safety-critical vehicle control system
JP3255693B2 (en) Automotive multi-computer system
EP3330857B1 (en) Vehicle control device
JP2001525953A (en) Microprocessor device for vehicle control system
JP5967059B2 (en) Electronic control device for vehicle
US9221492B2 (en) Method for operating an electrical power steering mechanism
CN108146250B (en) Automobile torque safety control method based on multi-core CPU
JP5629646B2 (en) Vehicle control device
US8375256B2 (en) System with configurable functional units and method
US20100017579A1 (en) Program-Controlled Unit and Method for Operating Same
JP2012068788A (en) Information processing device and failure detection method
JP5226653B2 (en) In-vehicle control device
US6928346B2 (en) Method for monitoring the functioning of a control unit
US20100114422A1 (en) Control device for vehicles
Beckschulze et al. Fault handling approaches on dual-core microcontrollers in safety-critical automotive applications
JP5287198B2 (en) Information processing device
JP5713432B2 (en) Drive unit control apparatus and control method
Beckschulze et al. A comparison of dual-core approaches for safety-critical automotive applications