[go: up one dir, main page]

JP2010282551A - Information processing device - Google Patents

Information processing device Download PDF

Info

Publication number
JP2010282551A
JP2010282551A JP2009137234A JP2009137234A JP2010282551A JP 2010282551 A JP2010282551 A JP 2010282551A JP 2009137234 A JP2009137234 A JP 2009137234A JP 2009137234 A JP2009137234 A JP 2009137234A JP 2010282551 A JP2010282551 A JP 2010282551A
Authority
JP
Japan
Prior art keywords
application
cpu
abs
executed
operating environment
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
JP2009137234A
Other languages
Japanese (ja)
Inventor
Kazuhiko Kubota
和彦 窪田
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 JP2009137234A priority Critical patent/JP2010282551A/en
Publication of JP2010282551A publication Critical patent/JP2010282551A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

【課題】本発明は、動作環境のバグかあるいはコンパイラのバグかを判別することができる情報処理装置を提供することを課題とする。
【解決手段】第1動作環境41及び第2動作環境42と、異なるコンパイラ21,22によってそれぞれ変換された第1アプリ31及び第2アプリ32を有する情報処理装置1であって、第1動作環境41ではアプリ31,32が実行され、第2動作環境42ではアプリ31,32が実行され、処理結果比較手段61は、第1動作環境41上でのアプリ31,32と第2動作環境42上でのアプリ31,32に同一のデータがそれぞれ入力された場合、第1アプリ31が実行される第1動作環境41での処理結果と、第2アプリ32が実行される第1動作環境41での処理結果と、第1アプリ31が実行される第2動作環境42での処理結果と、第2アプリ32が実行される第2動作環境42での処理結果とを比較することを特徴とする。
【選択図】図1
An object of the present invention is to provide an information processing apparatus that can determine whether the bug is an operating environment bug or a compiler bug.
An information processing apparatus includes a first operating environment and a second operating environment, and a first application and a second application that are converted by different compilers, respectively. The applications 31 and 32 are executed in 41, the applications 31 and 32 are executed in the second operating environment 42, and the processing result comparison means 61 is connected to the applications 31 and 32 on the first operating environment 41 and the second operating environment 42. When the same data is input to each of the applications 31 and 32, the processing result in the first operating environment 41 in which the first application 31 is executed and the first operating environment 41 in which the second application 32 is executed And the processing result in the second operating environment 42 in which the first application 31 is executed and the processing result in the second operating environment 42 in which the second application 32 is executed are compared. .
[Selection] Figure 1

Description

本発明は、情報処理装置に関する。   The present invention relates to an information processing apparatus.

高い信頼性が要求される制御システムには、ハードウエアのCPU[Central Processing Unit]が故障した場合に誤った演算値による不具合を防止するために、2個のCPUを備えるものがある。また、制御システムにはOS[Operating System]が搭載されるものがあり、デュアルCPUのシステムでは各CPUにOSがそれぞれ搭載される。OS上でアプリケーション(以下、「アプリ」と記載)を実行する場合、アプリのソースコードをコンパイラで変換してマシン語の実行プログラムを生成し、このマシン語プログラムをOS上で実行する。   Some control systems that require high reliability include two CPUs in order to prevent malfunctions caused by erroneous calculation values when a hardware CPU [Central Processing Unit] fails. Some control systems are equipped with an OS (Operating System). In a dual CPU system, each CPU is equipped with an OS. When an application (hereinafter referred to as “application”) is executed on the OS, a machine language execution program is generated by converting the source code of the application by a compiler, and the machine language program is executed on the OS.

上記のような制御システムにはソフトウエアとしてはOS、アプリのソースコード、コンパイラ(マシン語プログラム)があるが、これらのソフトウエアにバグが含まれている場合もアプリのマシン語プログラムをOS上で実行すると誤った演算値を出力する。制御システム開発においては、ソフトウエアのOS、アプリのソースコード、コンパイラのうち、アプリのソースコードについては開発者による徹底したテストによってバグが取り除かれるが、OSとコンパイラについてはブラックボックスである。そこで、OSやコンパイラのバグを検出する方法が各種提案されている。例えば、特許文献1には、1つのアプリのソースコードを複数のコンパイラでそれぞれ変換して複数のマシン語プログラムを生成し、この複数のマシン語プログラムに同一のデータを入力してそれぞれ実行し、複数の演算値を比較することによって複数のコンパイラのバグを間接的に検出することが記載されている。異なるコンパイラの同じ箇所に全く同じバグが存在する可能性は極めて低いので、複数のマシン語プログラム(複数のコンパイラ)による各演算値が異なる場合にはいずれかのコンパイラにバグが有ると推定できる。   The control system as described above includes an OS, an application source code, and a compiler (machine language program) as software. However, even if a bug is included in these software, the application machine language program is executed on the OS. If it is executed with, an incorrect operation value is output. In control system development, among software OS, application source code, and compiler, bugs are removed by thorough testing by the developer for application source code, but the OS and compiler are black boxes. Therefore, various methods for detecting bugs in the OS and compiler have been proposed. For example, in Patent Document 1, a plurality of machine language programs are generated by converting the source code of one application by a plurality of compilers, the same data is input to the plurality of machine language programs, and each is executed. It is described that bugs of a plurality of compilers are indirectly detected by comparing a plurality of operation values. Since it is very unlikely that the same bug exists in the same part of different compilers, it can be presumed that there is a bug in one of the compilers when the operation values of a plurality of machine language programs (plural compilers) are different.

さらに、コンパイラとOSのバグを検出する方法としては、以下の方法が考えられる。図16には、2個のCPU151,152を備えており、各CPU151,152に異なるOS141,141が搭載される制御システム100を示している。この制御システム100では、アプリのソースコード110を第1コンパイラ121で変換してマシン語プログラムの第1アプリ131を生成するとともに、ソースコード110を第2コンパイラ122で変換してマシン語プログラムの第2アプリ132を生成する。そして、この2個のアプリ131,132を異なるOS141,142上で実行することによって、OSとコンパイラのバグを検出する。   Further, as a method for detecting a bug between the compiler and the OS, the following method can be considered. FIG. 16 shows a control system 100 that includes two CPUs 151 and 152, and different OSs 141 and 141 are mounted on the CPUs 151 and 152. In this control system 100, the source code 110 of the application is converted by the first compiler 121 to generate the first application 131 of the machine language program, and the source code 110 is converted by the second compiler 122 to convert the source code 110 of the machine language program. Two applications 132 are generated. Then, by executing the two applications 131 and 132 on different OSs 141 and 142, a bug between the OS and the compiler is detected.

この制御システム100でのフェイルセーフ処理を図17のフローチャートに沿って説明する。まず、第1アプリ131と第2アプリ132に同じデータが入力されると、第1CPU151では第1アプリ131を第1OS141上で実行して制御演算値aを出力し(S210)、第2CPU152では第2アプリ132を第2OS142上で実行して制御演算値bを出力する(S220)。第1CPU151では、制御演算値aを第2CPU152に送信するとともに(S211)、第2CPU152からの制御演算値bを受信する(S212)。また、第2CPU152では、制御演算値bを第1CPU151に送信するとともに(S221)、第1CPU151からの制御演算値aを受信する(S222)。   The fail safe process in the control system 100 will be described along the flowchart of FIG. First, when the same data is input to the first application 131 and the second application 132, the first CPU 151 executes the first application 131 on the first OS 141 and outputs the control calculation value a (S210), and the second CPU 152 The two applications 132 are executed on the second OS 142 and the control calculation value b is output (S220). The first CPU 151 transmits the control calculation value a to the second CPU 152 (S211) and receives the control calculation value b from the second CPU 152 (S212). The second CPU 152 transmits the control calculation value b to the first CPU 151 (S221) and receives the control calculation value a from the first CPU 151 (S222).

そして、第1CPU151(比較部160)では、2個の制御演算値a,bを比較し(S213)、aとbとが同じ値か否かを判定する(S214)。また、第2CPU152(比較部160)でも、2個の制御演算値a,bを比較し(S223)、aとbとが同じ値か否かを判定する(S224)。そして、比較部160(第1CPU151、第2CPU152)では、S214でaとbが同じ値と判定しかつS224でaとbが同じ値と判定した場合(S230)、OSとコンパイラにはバグは無いと判断し、その制御演算値a(b)を出力する(S231)。比較部160では、S214でaとbが異なる値と判定しかつS224でaとbが異なる値と判定した場合(S232)、OSとコンパイラの少なくとも一方にバグが有ると判断し、システムをシャットダウンする(S233)。   Then, the first CPU 151 (comparison unit 160) compares the two control calculation values a and b (S213), and determines whether a and b are the same value (S214). The second CPU 152 (comparison unit 160) also compares the two control calculation values a and b (S223), and determines whether a and b are the same value (S224). If the comparison unit 160 (first CPU 151, second CPU 152) determines that a and b are the same value in S214 and a and b are the same value in S224 (S230), there is no bug in the OS and the compiler. And the control calculation value a (b) is output (S231). When the comparison unit 160 determines that a and b are different values in S214 and determines that a and b are different values in S224 (S232), it determines that at least one of the OS and the compiler has a bug and shuts down the system. (S233).

特開2005−141406号公報JP-A-2005-141406 特開2004−355233号公報JP 2004-355233 A

上記したような検出方法では、2個のOS141,142及び2個のマシン語プログラムのアプリ131,132(コンパイラ121,122)の少なくとも一方にバグが有ることは検出できるが、OSのバグかあるいはコンパイラのバグかを判別できない。つまり、異なるコンパイラで変換された異なるマシン語プログラムが同一内容の処理ができる異なるOS上でそれぞれ実行されているので、どちらか一方のコンパイラのバグによりどちらかのマシン語プログラムにバグが組み込まれたのかあるいはどちらか一方のOSのバグにより異なる演算値を出力したのかを判別できない。そのため、バグが有ると判定した場合には、安全側の処理(シャットダウン等)でしか対処できない。   In the detection method as described above, it is possible to detect that there is a bug in at least one of the two OSs 141 and 142 and the two machine language program applications 131 and 132 (compilers 121 and 122). Cannot determine whether this is a compiler bug. In other words, since different machine language programs converted by different compilers are executed on different OSs that can process the same contents, bugs were incorporated into one of the machine language programs due to a bug in one of the compilers. It is impossible to determine whether or not a different calculation value is output due to a bug in one of the OSs. For this reason, if it is determined that there is a bug, it can only be dealt with by a process on the safe side (such as shutdown).

そこで、本発明は、動作環境のバグかあるいはコンパイラのバグかを判別することができる情報処理装置を提供することを課題とする。   Therefore, an object of the present invention is to provide an information processing apparatus that can determine whether the bug is an operating environment bug or a compiler bug.

本発明に係る情報処理装置は、同一のデータが入力されると異なる処理過程を経て同一の処理結果を出力する第1動作環境及び第2動作環境と、動作環境上で実行された場合に同一のデータが入力されると異なる処理過程を経て同一の処理結果データを動作環境に出力する第1アプリケーション及び第2アプリケーションを有する情報処理装置であって、第1動作環境では、第1アプリケーション及び第2アプリケーションが実行され、第2動作環境では、少なくとも第1アプリケーションが実行され、第1動作環境上で実行される第1アプリケーション及び第2アプリケーションと第2動作環境上で実行される第1アプリケーションに同一のデータがそれぞれ入力された場合、第1アプリケーションが実行される第1動作環境での処理結果と、第2アプリケーションが実行される第1動作環境での処理結果と、第1アプリケーションが実行される第2動作環境での処理結果とを比較する処理結果比較手段を備えることを特徴とする。   The information processing apparatus according to the present invention is the same when executed in the operating environment and the first operating environment and the second operating environment that output the same processing result through different processing steps when the same data is input. When the first data is input, the information processing apparatus includes a first application and a second application that output the same processing result data to the operating environment through different processing processes. In the first operating environment, the first application and the second application Two applications are executed, and in the second operating environment, at least the first application is executed, and the first application executed on the first operating environment and the second application and the first application executed on the second operating environment Processing results in the first operating environment in which the first application is executed when the same data is input Characterized by comprising a processing result in the first operating environment in which the second application is executed, the processing result comparison means for comparing the processing results in the second operating environment in which the first application is executed.

この情報処理装置は、複数の動作環境(例えば、OS)と複数のアプリケーションを有している。第1動作環境と第2動作環境とは、バグが無い場合、同一のデータが入力されると、異なる処理過程で処理するが同一の処理結果を出力する。第1アプリケーションと第2アプリケーションとは、例えば、同一のアプリケーションのソースコードが異なるコンパイラによってそれぞれ変換されたアプリケーションであり、動作環境上で実行される。第1アプリケーションと第2アプリケーションとは、バグが無い場合、同一のデータが入力されると、異なる処理過程で処理するが同一の処理結果データを動作環境に出力する。特に、情報処理装置では、第1動作環境上で第1アプリケーションと第2アプリケーションがそれぞれ実行され、第2動作環境上で少なくとも第1アプリケーションが実行される。ここで、情報処理装置では、第1動作環境上で実行される第1アプリケーション、第1動作環境上で実行される第2アプリケーション、第2動作環境上で実行される第1アプリケーションに同一のデータをそれぞれ入力する。すると、第1動作環境では、第1アプリケーションが実行されて処理結果データを出力するとその所定結果データに応じて処理結果を出力するとともに、第2アプリケーションが実行されて処理結果データを出力するとその処理結果データに応じて処理結果を出力する。第2動作環境では、第1アプリケーションが実行されて処理結果データを出力するとその処理結果データに応じて処理結果を出力する。そして、情報処理装置では、処理結果比較手段により、その3つの処理結果を比較する。この比較において、3つの処理結果が同じ場合には動作環境及びアプリケーションにバグは無いと判定でき、3つの処理結果が同じでない場合にはどの処理結果(どの動作環境上でのどのアプリケーションによる処理結果)が異なっているかによって動作環境のバグかあるいはアプリケーションのバグ(ひいては、コンパイラのバグ)かを判別することができる。このように、情報処理装置では、第1動作環境に第1、第2アプリケーションを配置し、第2動作環境に少なくとも第1アプリケーションを配置し、その処理結果を比較することにより、動作環境のバグかあるいはコンパイラのバグかを判別することができる。   This information processing apparatus has a plurality of operating environments (for example, OS) and a plurality of applications. If there is no bug in the first operating environment and the second operating environment, when the same data is input, the first operating environment and the second operating environment are processed in different processing steps but output the same processing result. The first application and the second application are, for example, applications obtained by converting the source code of the same application by different compilers, and are executed in the operating environment. When there is no bug and the same data is input, the first application and the second application are processed in different processing steps, but output the same processing result data to the operating environment. In particular, in the information processing apparatus, the first application and the second application are executed on the first operating environment, and at least the first application is executed on the second operating environment. Here, in the information processing device, the same data is stored in the first application executed on the first operating environment, the second application executed on the first operating environment, and the first application executed on the second operating environment. Enter each. Then, in the first operating environment, when the first application is executed and the processing result data is output, the processing result is output according to the predetermined result data, and when the second application is executed and the processing result data is output, the processing is performed. The processing result is output according to the result data. In the second operating environment, when the first application is executed and processing result data is output, the processing result is output according to the processing result data. In the information processing apparatus, the three processing results are compared by the processing result comparison means. In this comparison, if the three processing results are the same, it can be determined that there is no bug in the operating environment and the application, and if the three processing results are not the same, which processing result (the processing result by which application in which operating environment) ) Are different, it can be determined whether it is a bug in the operating environment or a bug in the application (and hence a bug in the compiler). As described above, in the information processing apparatus, the first and second applications are arranged in the first operating environment, and at least the first application is arranged in the second operating environment, and the processing results are compared, thereby causing a bug in the operating environment. Or a bug in the compiler.

本発明の上記情報処理装置は、第2動作環境では、第1アプリケーション及び第2アプリケーションが実行され、処理結果比較手段は、第1動作環境上で実行される第1アプリケーション及び第2アプリケーションと第2動作環境上で実行される第1アプリケーション及び第2アプリケーションに同一のデータがそれぞれ入力された場合、第1アプリケーションが実行される第1動作環境での処理結果と、第2アプリケーションが実行される第1動作環境での処理結果と、第1アプリケーションが実行される第2動作環境での処理結果と、第2アプリケーションが実行される第2動作環境での処理結果とを比較する。   In the information processing apparatus according to the present invention, the first application and the second application are executed in the second operating environment, and the processing result comparison unit includes the first application and the second application executed in the first operating environment, and the first application. When the same data is input to each of the first application and the second application executed in the two operating environments, the processing result in the first operating environment in which the first application is executed and the second application are executed. The processing result in the first operating environment, the processing result in the second operating environment in which the first application is executed, and the processing result in the second operating environment in which the second application is executed are compared.

この情報処理装置では、第1動作環境上で第1アプリケーションと第2アプリケーションが実行され、第2動作環境上でも第1アプリケーションと第2アプリケーションが実行される。ここで、情報処理装置では、第1動作環境上で実行される第1アプリケーション、第1動作環境上で実行される第2アプリケーション、第2動作環境上で実行される第1アプリケーション、第2動作環境上で実行される第2アプリケーションに同一のデータをそれぞれ入力する。すると、第1動作環境では、上記と同様に、第1アプリケーションよる処理結果を出力するとともに、第2アプリケーションによる処理結果を出力する。第2動作環境では、第1アプリケーションが実行されて処理結果データを出力するとその処理結果データに応じて処理結果を出力するとともに、第2アプリケーションが実行されて処理結果データを出力するとその処理結果データに応じて処理結果を出力する。そして、情報処理装置では、処理結果比較手段により、その4つの処理結果を比較する。この比較において、4つの処理結果が同じ場合には動作環境及びアプリケーションにバグは無いと判定でき、4つの処理結果が同じでない場合には同じ値になる処理結果と異なる値になる処理結果の組み合わせによって動作環境のバグかあるいはアプリケーションのバグ(ひいては、コンパイラのバグ)かを判別することができ、組み合わせのパターンによってはどちらの動作環境のバグかも判別することができる。このように、情報処理装置では、第1動作環境と第2動作環境に第1、第2アプリケーションをそれぞれ配置し、その処理結果を比較することにより、動作環境のバグかあるいはコンパイラのバグかをより高精度に判別することができ、動作環境のバグと判別した場合にはどちらの動作環境のバグかを判別できるパターンもある。   In this information processing apparatus, the first application and the second application are executed on the first operating environment, and the first application and the second application are also executed on the second operating environment. Here, in the information processing apparatus, the first application executed on the first operating environment, the second application executed on the first operating environment, the first application executed on the second operating environment, and the second operation The same data is input to the second application executed on the environment. Then, in the first operating environment, similarly to the above, the processing result by the first application is output and the processing result by the second application is output. In the second operating environment, when the first application is executed and the processing result data is output, the processing result is output according to the processing result data. When the second application is executed and the processing result data is output, the processing result data is output. The processing result is output according to. In the information processing apparatus, the four processing results are compared by the processing result comparison means. In this comparison, when the four processing results are the same, it can be determined that there is no bug in the operating environment and the application, and when the four processing results are not the same, the combination of the processing results that are different from the processing results that are the same value. It is possible to determine whether the bug is an operating environment bug or an application bug (and hence a compiler bug), and depending on the combination pattern, it is possible to determine which operating environment bug. As described above, in the information processing apparatus, the first and second applications are arranged in the first operating environment and the second operating environment, respectively, and the processing results are compared to determine whether the operating environment bug or the compiler bug exists. There is also a pattern that can be determined with higher accuracy, and when it is determined as a bug in the operating environment, which operating environment bug is determined.

本発明によれば、異なる動作環境に第1、第2アプリケーションをそれぞれ配置し、その処理結果を比較することにより、動作環境のバグかあるいはコンパイラのバグかを判別することができる。   According to the present invention, it is possible to determine whether the bug is an operating environment bug or a compiler bug by arranging the first and second applications in different operating environments and comparing the processing results.

第1の実施の形態に係るABSシステムのECUの構成図である。It is a block diagram of ECU of the ABS system which concerns on 1st Embodiment. 図1のECUにおける2個のコンパイラと2個のOSの組み合わせによる各制御演算値の比較の判別パターンの一覧表である。2 is a list of discrimination patterns for comparison of control calculation values by a combination of two compilers and two OSs in the ECU of FIG. 1. 図1のECUにおける第1CPUでの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process in 1st CPU in ECU of FIG. 図1のECUにおける第2CPUでの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process in 2nd CPU in ECU of FIG. 第2の実施の形態に係るABSシステム+ACCシステムのECUの構成図である。It is a block diagram of ECU of the ABS system + ACC system which concerns on 2nd Embodiment. 図5のECUにおける2個のコンパイラと2個のOSの組み合わせによるABS側の各制御演算値の比較の判別パターンの一覧表である。6 is a list of discrimination patterns for comparison of control operation values on the ABS side by a combination of two compilers and two OSs in the ECU of FIG. 5. 図5のECUにおける2個のコンパイラと2個のOSの組み合わせによるACC側の各制御演算値の比較の判別パターンの一覧表である。6 is a list of discrimination patterns for comparison of control calculation values on the ACC side by a combination of two compilers and two OSs in the ECU of FIG. 5. 図5のECUにおける第1CPUでの処理(前半部)の流れを示すフローチャートである。It is a flowchart which shows the flow of the process (first half part) in 1st CPU in ECU of FIG. 図5のECUにおける第1CPUでの処理(後半部)の流れを示すフローチャートである。It is a flowchart which shows the flow of the process (latter half part) in 1st CPU in ECU of FIG. 図5のECUにおける第2CPUでの処理(前半部)の流れを示すフローチャートである。It is a flowchart which shows the flow of the process (first half part) in 2nd CPU in ECU of FIG. 図5のECUにおける第2CPUでの処理(後半部)の流れを示すフローチャートである。It is a flowchart which shows the flow of the process (second half part) in 2nd CPU in ECU of FIG. 第3の実施の形態に係るABSシステムのECUの構成図である。It is a block diagram of ECU of the ABS system which concerns on 3rd Embodiment. 図12のECUにおける2個のコンパイラと2個のOSの組み合わせによる各制御演算値の比較の判別パターンの一覧表である。13 is a list of discrimination patterns for comparison of control calculation values by a combination of two compilers and two OSs in the ECU of FIG. 12. 図12のECUにおける第1CPUでの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process in 1st CPU in ECU of FIG. 図12のECUにおける第2CPUでの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process in 2nd CPU in ECU of FIG. 従来の制御システムの構成図である。It is a block diagram of the conventional control system. 図16の制御システムにおけるフェイルセーフ処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the fail safe process in the control system of FIG.

以下、図面を参照して、本発明に係る情報処理装置の実施の形態を説明する。なお、各図において同一又は相当する要素については同一の符号を付し、重複する説明を省略する。   Embodiments of an information processing apparatus according to the present invention will be described below with reference to the drawings. In addition, the same code | symbol is attached | subjected about the element which is the same or it corresponds in each figure, and the overlapping description is abbreviate | omitted.

本実施の形態では、本発明に係る情報処理装置を、車両に搭載されるシステム(特に、ECU[Electronic Control Unit])に適用する。本実施の形態に係るシステムのECUは、2個のCPUを備えており、各CPU上に異なるOSがそれぞれ搭載されるECUである。また、本実施の形態に係るシステムのECUは、2個の異なるコンパイラを有しており、制御アプリのソースコードが2個の異なるコンパイラによってそれぞれ変換された2個のマシン語プログラムを有している。本実施の形態には、3つの形態があり、第1の実施の形態がABS[Anti-lock Brake System]システムを統括制御するECU(2個のOSに2個のマシン語プログラムをそれぞれ配置)であり、第2の実施の形態がABSシステムとACC[Adaptive Cruise Control]を統括制御するECU(2個のOSに(ABCの2個+ACCの2個)のマシン語プログラムをそれぞれ配置)であり、第3の実施の形態がABSシステムを統括制御するECU(一方のCPUに2個のマシン語プログラムを配置し、他方のCPUに1個のマシン語プログラムを配置)である。   In the present embodiment, the information processing apparatus according to the present invention is applied to a system (particularly an ECU [Electronic Control Unit]) mounted on a vehicle. The ECU of the system according to the present embodiment includes two CPUs and is an ECU in which a different OS is mounted on each CPU. In addition, the ECU of the system according to the present embodiment has two different compilers, and has two machine language programs in which the source code of the control application is converted by two different compilers, respectively. Yes. In this embodiment, there are three forms, and the first embodiment is an ECU that performs overall control of an ABS [Anti-lock Brake System] system (two machine language programs are arranged in two OSs, respectively) The second embodiment is an ECU that controls the ABS system and ACC [Adaptive Cruise Control] (two OSs (two ABCs + two ACCs) are arranged in machine language programs). The third embodiment is an ECU that performs overall control of the ABS system (two machine language programs are arranged on one CPU and one machine language program is arranged on the other CPU).

なお、以下の説明では、ECUの内部構成及びフェイルセーフ処理について詳細に説明する。ABS制御やACC制御は従来の制御が適用されるので、各制御の具体的な処理については説明を省略する。   In the following description, the internal configuration of the ECU and the failsafe process will be described in detail. Since the conventional control is applied to the ABS control and the ACC control, the description of the specific processing of each control is omitted.

図1及び図2を参照して、第1の実施の形態に係るABSシステムのECU1について説明する。図1は、第1の実施の形態に係るABSシステムのECUの構成図である。図2は、図1のECUにおける2個のコンパイラと2個のOSの組み合わせによる各制御演算値の比較の判別パターンの一覧表である。   With reference to FIG.1 and FIG.2, ECU1 of the ABS system which concerns on 1st Embodiment is demonstrated. FIG. 1 is a configuration diagram of the ECU of the ABS system according to the first embodiment. FIG. 2 is a list of discrimination patterns for comparison of control calculation values by a combination of two compilers and two OSs in the ECU of FIG.

ECU1は、電子制御ユニットであり、ABSシステムを統括制御する。ECU1は、ソフトウエアとしてABSアプリ10、第1コンパイラ21と第2コンパイラ22、第1ABSアプリ31と第2ABSアプリ32、第1OS41と第2OS42を有している。また、ECU1は、ハードウエアとして第1CPU51と第2CPU52、ROM[Read Only Memory]、RAM[Random AccessMemory]などを備えている。さらに、ECU1は、各CPU51,52で各アプリが実行されることによって比較部61,出力処理部71が構成される。この比較部61と出力処理部71は、第1CPU51側と第2CPU52側の両方に構成され、両側で同様の処理がそれぞれ行われる。   The ECU 1 is an electronic control unit and performs overall control of the ABS system. The ECU 1 includes an ABS application 10, a first compiler 21 and a second compiler 22, a first ABS application 31, a second ABS application 32, a first OS 41, and a second OS 42 as software. Further, the ECU 1 includes a first CPU 51 and a second CPU 52 as hardware, a ROM [Read Only Memory], a RAM [Random Access Memory], and the like. Further, the ECU 1 includes a comparison unit 61 and an output processing unit 71 as each application is executed by the CPUs 51 and 52. The comparison unit 61 and the output processing unit 71 are configured on both the first CPU 51 side and the second CPU 52 side, and the same processing is performed on both sides.

なお、第1の実施の形態では、第1ABSアプリ31と第2ABSアプリ32が特許請求の範囲に記載する第1アプリケーションと第2アプリケーションに相当し、第1OS41と第2OS42が特許請求の範囲に記載する第1動作環境と第2動作環境に相当し、比較部61が特許請求の範囲に記載する処理結果比較手段に相当する。   In the first embodiment, the first ABS application 31 and the second ABS application 32 correspond to the first application and the second application described in the claims, and the first OS 41 and the second OS 42 are described in the claims. The comparison unit 61 corresponds to the processing result comparison means described in the claims.

ABSアプリ10は、開発者によって所定のプログラミング言語(例えば、C言語)で作成されたソフトウエアであり、ABS制御を行うためのソースコードである。本実施の形態では、ABSアプリ10にはバグが存在しないこととして、フェイルセーフ処理を説明する。なお、ソースコードのABSアプリ10もECU1に搭載され、ECU1において第1コンパイラ21と第2コンパイラ22で第1ABSアプリ31と第2ABSアプリ32に変換されてもよいし、あるいは、ABSアプリ10はECU1に搭載されずに、第1コンパイラ21と第2コンパイラ22で予め変換された第1ABSアプリ31と第2ABSアプリ32だけがECU1に搭載されていてもよい。   The ABS application 10 is software created by a developer in a predetermined programming language (for example, C language), and is source code for performing ABS control. In the present embodiment, the fail safe process will be described assuming that there is no bug in the ABS application 10. Note that the ABS application 10 of the source code is also mounted in the ECU 1 and may be converted into the first ABS application 31 and the second ABS application 32 by the first compiler 21 and the second compiler 22 in the ECU 1, or the ABS application 10 may be converted into the ECU 1. The first ABS application 31 and the second ABS application 32 converted in advance by the first compiler 21 and the second compiler 22 may be mounted on the ECU 1 without being mounted on the ECU 1.

コンパイラ21,22は、所定のプログラミング言語で作成されたソースコードをCPU51,CPU52で実行できるマシン語プログラム(オブジェクトコード)に変換するためのソフトウエアである。第1コンパイラ21と第2コンパイラ22とは、異なるコンパイラであり、同じソースコードを異なるマシン語プログラムに変換する。   The compilers 21 and 22 are software for converting source code created in a predetermined programming language into machine language programs (object codes) that can be executed by the CPU 51 and CPU 52. The first compiler 21 and the second compiler 22 are different compilers, and convert the same source code into different machine language programs.

第1ABSアプリ31は、ソースコードのABSアプリ10が第1コンパイラ21によって変換されたマシン語プログラムである。第2ABSアプリ32は、ソースコードのABSアプリ10が第2コンパイラ22によって変換されたマシン語プログラムである。第1ABSアプリ31と第2ABSアプリ32は、第1OS41(第1CPU51)及び第2OS42(第1CPU52)上にそれぞれ搭載される。第1ABSアプリ31と第2ABSアプリ32とは、コンパイラ21,22にバグが無い場合、同一のデータがそれぞれ入力されてOS41,42上で実行されると、異なる処理過程でそれぞれ処理を行うが、同一の処理結果データをOS41,42に出力する。   The first ABS application 31 is a machine language program obtained by converting the ABS application 10 of the source code by the first compiler 21. The second ABS application 32 is a machine language program obtained by converting the ABS application 10 of the source code by the second compiler 22. The first ABS application 31 and the second ABS application 32 are mounted on the first OS 41 (first CPU 51) and the second OS 42 (first CPU 52), respectively. The first ABS application 31 and the second ABS application 32 perform processing in different processing steps when the same data is input and executed on the OSs 41 and 42 when there is no bug in the compilers 21 and 22. The same processing result data is output to the OS 41, 42.

OS41,42は、ECU1全体を管理する基本ソフトウエアである。第1OS41と第2OS42とは、異なるOSである。第1OS41は、第1CPU51に搭載される。第2OS42は、第2CPU52に搭載される。第1OS41と第2OS42とは、バグが無い場合、同一のデータがそれぞれ入力されると、異なる処理過程でそれぞれ処理を行うが、同一の処理結果を出力する。   The OSs 41 and 42 are basic software that manages the entire ECU 1. The first OS 41 and the second OS 42 are different OSs. The first OS 41 is mounted on the first CPU 51. The second OS 42 is mounted on the second CPU 52. When there is no bug and the same data is input to the first OS 41 and the second OS 42, the first OS 41 and the second OS 42 perform processing in different processing steps, but output the same processing result.

第1CPU51では、第1ABSアプリ31及び第2ABSアプリ32に同じ所定のデータ(例えば、各種センサで検出される検出データ)が入力される毎に、第1OS41上で第1ABSアプリ31及び第2ABSアプリ32を実行する。第1OS41上で第1ABSアプリ31を実行すると、入力データに対する処理結果データを第1OS41に出力し、その処理結果データが入力されると第1OS41ではその処理結果データに応じた制御演算値aを出力する。第1OS41上で第2ABSアプリ32を実行すると、入力データに対する処理結果データを第1OS41に出力し、その処理結果データが入力されると第1OS41ではその処理結果データに応じた制御演算値bを出力する。そして、第1CPU51では、その制御演算値a,bを第2CPU52に送信するとともに、第2CPU52からの制御演算値c,dを受信する。   In the first CPU 51, each time the same predetermined data (for example, detection data detected by various sensors) is input to the first ABS application 31 and the second ABS application 32, the first ABS application 31 and the second ABS application 32 on the first OS 41. Execute. When the first ABS application 31 is executed on the first OS 41, the processing result data for the input data is output to the first OS 41, and when the processing result data is input, the first OS 41 outputs the control operation value a corresponding to the processing result data. To do. When the second ABS application 32 is executed on the first OS 41, the processing result data for the input data is output to the first OS 41. When the processing result data is input, the first OS 41 outputs the control calculation value b corresponding to the processing result data. To do. The first CPU 51 transmits the control calculation values a and b to the second CPU 52 and receives the control calculation values c and d from the second CPU 52.

第2CPU52では、第1ABSアプリ31及び第2ABSアプリ32に同じ所定のデータ(第1CPU51側で入力される所定のデータと同じデータ)が入力される毎に、第2OS42上で第1ABSアプリ31及び第2ABSアプリ32を実行する。第2OS42上で第1ABSアプリ31を実行すると、入力データに対する処理結果データを第2OS42に出力し、その処理結果データが入力されると第2OS42ではその処理結果データに応じた制御演算値cを出力する。第2OS42上で第2ABSアプリ32を実行すると、入力データに対する処理結果データを第2OS42に出力し、その処理結果データが入力されると第2OS42ではその処理結果データに応じた制御演算値dを出力する。そして、第2CPU52では、その制御演算値c,dを第1CPU51に送信するとともに、第1CPU51からの制御演算値a,bを受信する。   In the second CPU 52, every time the same predetermined data (the same data as the predetermined data input on the first CPU 51 side) is input to the first ABS application 31 and the second ABS application 32, the first ABS application 31 and the second ABS application 31 2ABS application 32 is executed. When the first ABS application 31 is executed on the second OS 42, the processing result data for the input data is output to the second OS 42. When the processing result data is input, the second OS 42 outputs the control calculation value c corresponding to the processing result data. To do. When the second ABS application 32 is executed on the second OS 42, the processing result data for the input data is output to the second OS 42. When the processing result data is input, the second OS 42 outputs the control calculation value d corresponding to the processing result data. To do. Then, the second CPU 52 transmits the control calculation values c and d to the first CPU 51 and receives the control calculation values a and b from the first CPU 51.

比較部61では、制御演算値a,b,c,dを比較し、制御演算値a,b,c,dが同じ値かあるいは異なる値かによって図2に示す判別パターンに従って各判定処理を行う。   The comparison unit 61 compares the control calculation values a, b, c, and d, and performs each determination process according to the determination pattern shown in FIG. 2 depending on whether the control calculation values a, b, c, and d are the same value or different values. .

a,b,c,d全て同じ値の場合、比較部61では、第1コンパイラ21(第1ABSアプリ31)と第2コンパイラ22(第2ABSアプリ32)及び第1OS41と第2OS42にバグが無いと判断し、通常のABS制御を行うと判定する。   If all of a, b, c, and d have the same value, the comparison unit 61 has no bugs in the first compiler 21 (first ABS application 31), the second compiler 22 (second ABS application 32), the first OS 41, and the second OS 42. It is determined that the normal ABS control is performed.

aとcが同じ値であり、bとdが同じ値であるが、a,cとb,dとが異なる値の場合、比較部61では、第1OS41と第2OS42にはバグが無いが、第1コンパイラ21と第2コンパイラ22のいずれか一方にバグが有ると判断する。この場合、OS41,42は共に正常に実行できるが、ABSアプリ31,32の一方は正常に実行できないので、比較部61では、安全側の処理としてABS制御を停止すると判定する。これによって、システム自体は停止していないので、OS41,42上でABS制御以外のアプリ(例えば、ABS制御異常のときの警報ランプ点灯処理)を実行している場合、そのアプリを実行することができる。   When a and c are the same value and b and d are the same value, but a, c and b and d are different values, the comparison unit 61 has no bug in the first OS 41 and the second OS 42. It is determined that either one of the first compiler 21 and the second compiler 22 has a bug. In this case, both the OS 41 and 42 can be executed normally, but since one of the ABS applications 31 and 32 cannot be executed normally, the comparison unit 61 determines to stop the ABS control as a safe process. As a result, since the system itself is not stopped, when an application other than the ABS control is executed on the OS 41 or 42 (for example, an alarm lamp lighting process when the ABS control is abnormal), the application can be executed. it can.

aとbが同じ値であり、cとdが同じ値であるが、a,bとc,dとが異なる値の場合、比較部61では、第1コンパイラ21と第2コンパイラ22にはバグが無いが、第1OS41と第2OS42のいずれか一方にバグが有ると判断する。この場合、OS41,42のどちらが正常に実行できないのか判別できないので、比較部61では、安全側の処理としてシステムを停止すると判定する。   When a and b are the same value and c and d are the same value, but a, b and c, d are different values, the comparison unit 61 has a bug in the first compiler 21 and the second compiler 22. However, it is determined that either one of the first OS 41 and the second OS 42 has a bug. In this case, since it cannot be determined which of the OSs 41 and 42 cannot be executed normally, the comparison unit 61 determines to stop the system as a safe process.

aとbとcが同じ値であり、dだけが異なる値の場合、比較部61では、第1コンパイラ21と第2コンパイラ22及び第1OS41にはバグが無いが、第2OS42にバグが有ると判断する。この場合、第2OS42だけが正常に実行できないと判別できているので、比較部61では、正常な第1OS41側だけでABS制御を続行すると判定する。なお、第2OS42の一部にバグが有るが、第2OS42の正常に動作している部分で第1ABSアプリ31が実行されたので、a,bとcとが同じ値になったと推定できる。   When a, b, and c are the same value and only d is a different value, the comparison unit 61 has no bug in the first compiler 21, the second compiler 22, and the first OS 41, but the second OS 42 has a bug. to decide. In this case, since it can be determined that only the second OS 42 cannot be executed normally, the comparison unit 61 determines to continue the ABS control only on the normal first OS 41 side. Although there is a bug in a part of the second OS 42, it can be estimated that a, b, and c have the same value because the first ABS application 31 is executed in the part of the second OS 42 that is operating normally.

aとbとdが同じ値であり、cだけが異なる値の場合、比較部61では、第1コンパイラ21と第2コンパイラ22及び第1OS41にはバグが無いが、第2OS42にバグが有ると判断する。この場合、第2OS42だけが正常に実行できないと判別できているので、比較部61では、正常な第1OS41側だけでABS制御を続行すると判定する。なお、第2OS42の一部にバグが有るが、第2OS42の正常に動作している部分で第2ABSアプリ32が実行されたので、a,bとdとが同じ値になったと推定できる。   When a, b, and d are the same value and only c is a different value, the comparison unit 61 has no bug in the first compiler 21, the second compiler 22, and the first OS 41, but the second OS 42 has a bug. to decide. In this case, since it can be determined that only the second OS 42 cannot be executed normally, the comparison unit 61 determines to continue the ABS control only on the normal first OS 41 side. Although there is a bug in a part of the second OS 42, it can be estimated that a, b, and d have the same value because the second ABS application 32 is executed in a part in which the second OS 42 operates normally.

bとcとdが同じ値であり、aだけが異なる値の場合、比較部61では、第1コンパイラ21と第2コンパイラ22及び第2OS42にはバグが無いが、第1OS41にバグが有ると判断する。この場合、第1OS41だけが正常に実行できないと判別できているので、比較部61では、正常な第2OS42側だけでABS制御を続行すると判定する。なお、第1OS41の一部にバグが有るが、第1OS41の正常に動作している部分で第2ABSアプリ32が実行されたので、c,dとbとが同じ値になったと推定できる。   When b, c, and d are the same value and only a is a different value, the comparison unit 61 has no bug in the first compiler 21, the second compiler 22, and the second OS 42, but the first OS 41 has a bug. to decide. In this case, since it can be determined that only the first OS 41 cannot be normally executed, the comparison unit 61 determines that the ABS control is continued only on the normal second OS 42 side. Although there is a bug in a part of the first OS 41, it can be estimated that c, d, and b have the same value because the second ABS application 32 is executed in the normally operating part of the first OS 41.

aとcとdが同じ値であり、bだけが異なる値の場合、比較部61では、第1コンパイラ21と第2コンパイラ22及び第2OS42にはバグが無いが、第1OS41にバグが有ると判断する。この場合、第1OS41だけが正常に実行できないと判別できているので、比較部61では、正常な第2OS42側だけでABS制御を続行すると判定する。なお、第1OS41の一部にバグが有るが、第1OS41の正常に動作している部分で第1ABSアプリ31が実行されたので、c,dとaとが同じ値になったと推定できる。   When a, c, and d are the same value and only b is a different value, the comparison unit 61 has no bug in the first compiler 21, the second compiler 22, and the second OS 42, but the first OS 41 has a bug. to decide. In this case, since it can be determined that only the first OS 41 cannot be normally executed, the comparison unit 61 determines that the ABS control is continued only on the normal second OS 42 side. Although there is a bug in a part of the first OS 41, it can be estimated that c, d, and a have the same value because the first ABS application 31 is executed in the part of the first OS 41 that is operating normally.

なお、上記以外のパターンの場合、コンパイラ21,22に共にバグが有るか、OS41,42に共にバグが有るか、あるいは、コンパイラ21,22の少なくも一方及びOS41,42の少なくとも一方にバグが有るパターンであるが、このようなパターンは極めて稀であり、無視できる。ただし、このパターンに万が一なった場合には、安全側の処理としてシステムを停止するとよい。   In the case of patterns other than those described above, both the compilers 21 and 22 have bugs, the OS 41 and 42 both have bugs, or at least one of the compilers 21 and 22 and at least one of the OS 41 and 42 have bugs. There are certain patterns, but such patterns are extremely rare and can be ignored. However, if this pattern becomes a problem, the system may be stopped as a safe process.

出力処理部71では、比較部61で通常のABS制御を行うと判定した場合、OS41,42のいずれか一方(例えば、第1OS41)から出力された制御演算値a(b,c,d)に応じた制御信号を出力する。また、出力処理部71では、比較部61でABS制御を停止すると判定した場合、ABSリレーをOFFし、ABSアプリ31,32を共に終了する。また、出力処理部71では、比較部61でシステムを停止すると判定した場合、シャットダウンするかあるいは電源をOFFする。また、出力処理部71では、比較部61で第1OS41側でABS制御だけを続行すると判定した場合、第1OS41から出力された制御演算値a(b)に応じた制御信号を出力する。また、出力処理部71では、比較部61で第2OS42側だけでABS制御を続行すると判定した場合、第2OS42から出力された制御演算値c(d)に応じた制御信号を出力する。   In the output processing unit 71, when the comparison unit 61 determines that normal ABS control is to be performed, the control processing value a (b, c, d) output from one of the OSs 41 and 42 (for example, the first OS 41) is used. A corresponding control signal is output. Further, when the output processing unit 71 determines that the ABS control is to be stopped by the comparison unit 61, the ABS relay is turned off, and the ABS applications 31 and 32 are both terminated. Further, when the output processing unit 71 determines that the comparison unit 61 stops the system, the output processing unit 71 shuts down or turns off the power. Further, in the output processing unit 71, when the comparison unit 61 determines that only the ABS control is continued on the first OS 41 side, the output processing unit 71 outputs a control signal corresponding to the control calculation value a (b) output from the first OS 41. Further, when the output processing unit 71 determines that the ABS control is continued only on the second OS 42 side in the comparison unit 61, the output processing unit 71 outputs a control signal corresponding to the control calculation value c (d) output from the second OS 42.

図1及び図2を参照して、ECU1でのフェイルセーフ処理の流れについて説明する。特に、第1CPU51側での処理については図3のフローチャートに沿って説明し、第2CPU52側での処理については図4のフローチャートに沿って説明する。図3は、図1のECUにおける第1CPUでの処理の流れを示すフローチャートである。図4は、図1のECUにおける第2CPUでの処理の流れを示すフローチャートである。   With reference to FIG.1 and FIG.2, the flow of the fail safe process in ECU1 is demonstrated. In particular, the processing on the first CPU 51 side will be described with reference to the flowchart of FIG. 3, and the processing on the second CPU 52 side will be described with reference to the flowchart of FIG. FIG. 3 is a flowchart showing a flow of processing in the first CPU in the ECU of FIG. FIG. 4 is a flowchart showing a flow of processing in the second CPU in the ECU of FIG.

ABSシステムが起動され、データが入力される毎に、第1CPU51では第1OS41上で第1ABSアプリ31及び第2ABSアプリ32が実行され、第2CPU52では第2OS42上で第1ABSアプリ31及び第2ABSアプリ32が実行される。   Each time the ABS system is activated and data is input, the first CPU 51 executes the first ABS application 31 and the second ABS application 32 on the first OS 41, and the second CPU 52 executes the first ABS application 31 and the second ABS application 32 on the second OS 42. Is executed.

第1CPU51では、第1ABSアプリ31による制御演算値aを出力するとともに(S10)、第2ABSアプリ32による制御演算値bを出力する(S11)。そして、第1CPU51では、制御演算値a,bを第2CPU52に送信する(S12)。また、第1CPU51では、第2CPU52からの制御演算値c,dを受信する(S13)。   The first CPU 51 outputs the control calculation value a by the first ABS application 31 (S10) and also outputs the control calculation value b by the second ABS application 32 (S11). Then, the first CPU 51 transmits the control calculation values a and b to the second CPU 52 (S12). Further, the first CPU 51 receives the control calculation values c and d from the second CPU 52 (S13).

第2CPU52では、第1ABSアプリ31による制御演算値cを出力するとともに(S30)、第2ABSアプリ32による制御演算値dを出力する(S31)。そして、第2CPU52では、制御演算値c,dを第1CPU51に送信する(S32)。また、第2CPU52では、第1CPU51からの制御演算値a,bを受信する(S33)。   The second CPU 52 outputs the control calculation value c by the first ABS application 31 (S30) and outputs the control calculation value d by the second ABS application 32 (S31). Then, the second CPU 52 transmits the control calculation values c and d to the first CPU 51 (S32). Further, the second CPU 52 receives the control calculation values a and b from the first CPU 51 (S33).

第1CPU51では、制御演算値a,b,c,dを比較する(S14)。そして、第1CPU51では、a=b=c=dの場合にはStatus1に0を代入し、a=c≠b=dの場合にはStatus1に1を代入し、a=b=c≠dの場合にはStatus1に2を代入し、a=b=d≠cの場合にはStatus1に2を代入し、a≠b=c=dの場合にはStatus1に3を代入し、b≠a=c=dの場合にはStatus1に3を代入し、これら以外のパターンの場合にはStatus1に4を代入する(S15)。そして、第1CPU51では、Status1を第2CPU52に送信する(S16)。また、第1CPU51では、第2CPU52からのStatus2を受信する(S17)。   The first CPU 51 compares the control calculation values a, b, c, and d (S14). In the first CPU 51, 0 is assigned to Status1 when a = b = c = d, 1 is assigned to Status1 when a = c ≠ b = d, and a = b = c ≠ d. 2 is assigned to Status1, 2 is assigned to Status1 if a = b = d ≠ c, 3 is assigned to Status1 if a ≠ b = c = d, and b ≠ a = If c = d, 3 is assigned to Status1, and if it is any other pattern, 4 is assigned to Status1 (S15). Then, the first CPU 51 transmits Status1 to the second CPU 52 (S16). Further, the first CPU 51 receives Status 2 from the second CPU 52 (S17).

第2CPU52では、制御演算値a,b,c,dを比較する(S34)。そして、第2CPU52では、a=b=c=dの場合にはStatus2に0を代入し、a=c≠b=dの場合にはStatus2に1を代入し、a=b=c≠dの場合にはStatus2に2を代入し、a=b=d≠cの場合にはStatus2に2を代入し、a≠b=c=dの場合にはStatus2に3を代入し、b≠a=c=dの場合にはStatus2に3を代入し、これら以外のパターンの場合にはStatus2に4を代入する(S35)。そして、第2CPU52では、Status2を第1CPU51に送信する(S36)。また、第2CPU52では、第1CPU51からのStatus1を受信する(S37)。   The second CPU 52 compares the control calculation values a, b, c and d (S34). In the second CPU 52, 0 is assigned to Status2 when a = b = c = d, 1 is assigned to Status2 when a = c ≠ b = d, and a = b = c ≠ d. 2 is assigned to Status2, 2 is assigned to Status2 if a = b = d ≠ c, 3 is assigned to Status2 if a ≠ b = c = d, and b ≠ a = If c = d, 3 is assigned to Status2, and if it is any other pattern, 4 is assigned to Status2 (S35). Then, the second CPU 52 transmits Status2 to the first CPU 51 (S36). Further, the second CPU 52 receives Status1 from the first CPU 51 (S37).

第1CPU51では、Status1とStatus2が同じか否かを判定する(S18)。Status1とStatus2が同じと判定した場合、第1CPU51では、Status1を判別する(S19)。Status1が0の場合、第1CPU51では、制御演算値a(b)を用いて通常のABS制御を行う(S20)。Status1が1の場合、第1CPU51では、ABSリレーをOFFするとともにABSアプリ31,32を終了し、ABS制御を停止する(S21)。Status1が2の場合、第1CPU51では、制御演算値a(b)を用いてABS制御を続行する(S22)。Status1が3の場合、第1CPU51では、何も行わない(S23)。Status1が4の場合又はS18の判定でStatus1とStatus2が異なると判定した場合、第1CPU51では、システムをシャットダウンするかあるいは電源をOFFし、システムを停止する(S24)。   The first CPU 51 determines whether Status1 and Status2 are the same (S18). When it is determined that Status1 and Status2 are the same, the first CPU 51 determines Status1 (S19). When Status 1 is 0, the first CPU 51 performs normal ABS control using the control calculation value a (b) (S20). When Status 1 is 1, the first CPU 51 turns off the ABS relay, ends the ABS applications 31 and 32, and stops the ABS control (S21). When Status 1 is 2, the first CPU 51 continues the ABS control using the control calculation value a (b) (S22). If Status 1 is 3, the first CPU 51 does nothing (S23). If Status 1 is 4 or if it is determined in S18 that Status 1 and Status 2 are different, the first CPU 51 shuts down the system or turns off the power and stops the system (S24).

第2CPU52では、Status2とStatus1が同じか否かを判定する(S38)。Status2とStatus1が同じと判定した場合、第2CPU52では、Status2を判別する(S39)。Status2が0の場合、第2CPU52では、第1CPU51側で通常のABS制御を行っているので、何も行わない(S40)。Status2が1の場合、第2CPU52では、ABSリレーをOFFするとともにABSアプリ31,32を終了し、ABS制御を停止する(S41)。Status2が2の場合、第2CPU52では、何も行わない(S42)。Status2が3の場合、第2CPU52では、制御演算値c(d)を用いてABS制御を続行する(S43)。Status2が4の場合又はS38の判定でStatus2とStatus1が異なると判定した場合、第2CPU52では、システムをシャットダウンするかあるいは電源をOFFし、システムを停止する(S44)。   The second CPU 52 determines whether Status2 and Status1 are the same (S38). When it is determined that Status2 and Status1 are the same, the second CPU 52 determines Status2 (S39). If Status 2 is 0, the second CPU 52 performs normal ABS control on the first CPU 51 side, so nothing is performed (S40). When Status 2 is 1, the second CPU 52 turns off the ABS relay, ends the ABS applications 31 and 32, and stops the ABS control (S41). If Status 2 is 2, the second CPU 52 does nothing (S42). When Status 2 is 3, the second CPU 52 continues the ABS control using the control calculation value c (d) (S43). If Status 2 is 4 or if it is determined in S38 that Status 2 and Status 1 are different, the second CPU 52 shuts down the system or turns off the power and stops the system (S44).

このECU1によれば、第1OS41と第2OS42に異なるコンパイラ21,22でそれぞれ変換された第1ABSアプリ31と第2ABSアプリ32をそれぞれ配置し、4通りの組み合わせでの4つの制御演算値a,b,c,dを比較することにより、OS41,42のバグかあるいはコンパイラ21,22のバグかを判別することができる。これによって、コンパイラ21,22にバグが有る場合にはコンパイラ異常(ABSアプリ異常)時のファイルセーフ処理(例えば、ABS制御だけを停止)を実施し、OS41,42にバグが有る場合にはOS異常時のファイルセーフ処理を実施できる。特に、OS41,42にバグが有る場合にどちらのOSにバグが有るかを判別できるときには、正常のOSでABS制御を継続することができる。   According to this ECU 1, the first ABS application 31 and the second ABS application 32 respectively converted by the different compilers 21 and 22 are arranged in the first OS 41 and the second OS 42, respectively, and four control calculation values a and b in four combinations are provided. , C, d can be discriminated as a bug of OS 41, 42 or a bug of compilers 21, 22. As a result, when there is a bug in the compilers 21 and 22, file safe processing (for example, only ABS control is stopped) when the compiler is abnormal (ABS application abnormality) is executed, and when there is a bug in the OS 41 and 42, the OS File safe processing at the time of abnormality can be implemented. In particular, when there is a bug in the OSs 41 and 42, when it is possible to determine which OS has the bug, the ABS control can be continued with the normal OS.

図5〜図7を参照して、第2の実施の形態に係るABSシステム+ACCシステムのECU2について説明する。図5は、第2の実施の形態に係るABSシステム+ACCシステムのECUの構成図である。図6は、図5のECUにおける2個のコンパイラと2個のOSの組み合わせによるABS側の各制御演算値の比較の判別パターンの一覧表である。図7は、図5のECUにおける2個のコンパイラと2個のOSの組み合わせによるACC側の各制御演算値の比較の判別パターンの一覧表である。   The ECU 2 of the ABS system + ACC system according to the second embodiment will be described with reference to FIGS. FIG. 5 is a configuration diagram of the ECU of the ABS system + ACC system according to the second embodiment. FIG. 6 is a list of discrimination patterns for comparison of control calculation values on the ABS side by a combination of two compilers and two OSs in the ECU of FIG. FIG. 7 is a list of discrimination patterns for comparison of control calculation values on the ACC side by a combination of two compilers and two OSs in the ECU of FIG.

ECU2は、電子制御ユニットであり、ABSシステムとACCシステムを統括制御する。ECU2は、ソフトウエアとしてABSアプリ10AとACCアプリ10B、第1コンパイラ21と第2コンパイラ22、第1ABSアプリ31Aと第2ABSアプリ32A、第1ACCアプリ31Bと第2ACCアプリ32B、第1OS41と第2OS42を有している。また、ECU2は、ハードウエアとして第1CPU51と第2CPU52、ROM、RAMなどを備えている。さらに、ECU2は、各CPU51,52で各アプリが実行されることによって比較部62,出力処理部72が構成される。この比較部62と出力処理部72は、第1CPU51側と第2CPU52側の両方に構成され、両側で同様の処理がそれぞれ行われる。   The ECU 2 is an electronic control unit, and performs overall control of the ABS system and the ACC system. The ECU 2 includes, as software, an ABS application 10A and an ACC application 10B, a first compiler 21 and a second compiler 22, a first ABS application 31A and a second ABS application 32A, a first ACC application 31B and a second ACC application 32B, a first OS 41 and a second OS 42. Have. The ECU 2 includes a first CPU 51 and a second CPU 52, ROM, RAM, and the like as hardware. Further, in the ECU 2, a comparison unit 62 and an output processing unit 72 are configured by each application being executed by each of the CPUs 51 and 52. The comparison unit 62 and the output processing unit 72 are configured on both the first CPU 51 side and the second CPU 52 side, and the same processing is performed on both sides.

なお、第2の実施の形態では、第1ABSアプリ31Aと第2ABSアプリ32A及び第1ACCアプリ31Bと第2ACCアプリ32Bが特許請求の範囲に記載する第1アプリケーションと第2アプリケーションに相当し、第1OS41と第2OS42が特許請求の範囲に記載する第1動作環境と第2動作環境に相当し、比較部62が特許請求の範囲に記載する処理結果比較手段に相当する。   In the second embodiment, the first ABS application 31A, the second ABS application 32A, the first ACC application 31B, and the second ACC application 32B correspond to the first application and the second application described in the claims, and the first OS 41 The second OS 42 corresponds to the first operating environment and the second operating environment described in the claims, and the comparison unit 62 corresponds to the processing result comparison means described in the claims.

ABSアプリ10Aは、第1の実施の形態で説明したABSアプリ10と同様のソフトウエアである。また、第1ABSアプリ31A、第2ABSアプリ32Aは、第1の実施の形態で説明した第1ABSアプリ31、第2ABSアプリ32と同様のソフトウエアである。   The ABS application 10A is the same software as the ABS application 10 described in the first embodiment. The first ABS application 31A and the second ABS application 32A are the same software as the first ABS application 31 and the second ABS application 32 described in the first embodiment.

ACCアプリ10Bは、開発者によって所定のプログラミング言語で作成されたソフトウエアであり、ACC制御を行うためのソースコードである。本実施の形態では、ABSアプリ10A、ACCアプリ10Bにはバグが存在しないこととして、フェイルセーフ処理を説明する。なお、ソースコードのABSアプリ10AとACCアプリ10BもECU2に搭載され、ECU2において第1コンパイラ21と第2コンパイラ22で第1ABSアプリ31Aと第2ABSアプリ32A及び第1ACCアプリ31Bと第2ACCアプリ32Bに変換されてもよいし、あるいは、ABSアプリ10AとACCアプリ10BはECU2に搭載されずに、第1コンパイラ21と第2コンパイラ22で予め変換された第1ABSアプリ31Aと第2ABSアプリ32A及び第1ACCアプリ31Bと第2ACCアプリ32BだけがECU2に搭載されていてもよい。   The ACC application 10B is software created by a developer in a predetermined programming language, and is source code for performing ACC control. In the present embodiment, the fail safe process will be described assuming that there is no bug in the ABS application 10A and the ACC application 10B. Note that the ABS application 10A and the ACC application 10B of the source code are also installed in the ECU 2. In the ECU 2, the first compiler 21 and the second compiler 22 use the first ABS application 31A, the second ABS application 32A, the first ACC application 31B, and the second ACC application 32B. Alternatively, the ABS application 10A and the ACC application 10B may not be installed in the ECU 2, and the first ABS application 31A, the second ABS application 32A, and the first ACC previously converted by the first compiler 21 and the second compiler 22 may be used. Only the application 31B and the second ACC application 32B may be mounted on the ECU 2.

第1ACCアプリ31Bは、ソースコードのACCアプリ10Bが第1コンパイラ21によって変換されたマシン語プログラムである。第2ACCアプリ32Bは、ソースコードのACCアプリ10Bが第2コンパイラ22によって変換されたマシン語プログラムである。第1ACCアプリ31Bと第2ACCアプリ32Bは、第1OS41(第1CPU51)及び第2OS42(第1CPU52)上にそれぞれ搭載される。第1ACCアプリ31Bと第2ACCアプリ32Bとは、コンパイラ21,22にバグが無い場合、同一のデータがそれぞれ入力されてOS41,42上で実行されると、異なる処理過程でそれぞれ処理を行うが、同一の処理結果データをOS41,42に出力する。   The first ACC application 31B is a machine language program obtained by converting the ACC application 10B of the source code by the first compiler 21. The second ACC application 32B is a machine language program in which the ACC application 10B of the source code is converted by the second compiler 22. The first ACC application 31B and the second ACC application 32B are mounted on the first OS 41 (first CPU 51) and the second OS 42 (first CPU 52), respectively. The first ACC application 31B and the second ACC application 32B perform processing in different processing steps when the same data is input and executed on the OSs 41 and 42 when there is no bug in the compilers 21 and 22. The same processing result data is output to the OS 41, 42.

第1CPU51では、第1ABSアプリ31A及び第2ABSアプリ32Aに同じ所定のデータが入力される毎に、第1OS41上で第1ABSアプリ31A及び第2ABSアプリ32Aを実行する。第1OS41上で第1ABSアプリ31Aを実行すると、第1の実施の形態と同様に、制御演算値aを出力する。第1OS41上で第2ABSアプリ32Aを実行すると、第1の実施の形態と同様に、制御演算値bを出力する。そして、第1CPU51では、その制御演算値a,bを第2CPU52に送信するとともに、第2CPU52からの制御演算値e,fを受信する。   The first CPU 51 executes the first ABS application 31A and the second ABS application 32A on the first OS 41 each time the same predetermined data is input to the first ABS application 31A and the second ABS application 32A. When the first ABS application 31A is executed on the first OS 41, the control calculation value a is output as in the first embodiment. When the second ABS application 32A is executed on the first OS 41, the control calculation value b is output as in the first embodiment. Then, the first CPU 51 transmits the control calculation values a and b to the second CPU 52 and receives the control calculation values e and f from the second CPU 52.

また、第1CPU51では、第1ACCアプリ31B及び第2ACCアプリ32Bに同じ所定のデータが入力される毎に、第1OS41上で第1ACCアプリ31B及び第2ACCアプリ32Bを実行する。第1OS41上で第1ACCアプリ31Bを実行すると、入力データに対する処理結果データを第1OS41に出力し、その処理結果データが入力されると第1OS41ではその処理結果データに応じた制御演算値cを出力する。第1OS41上で第2ACCアプリ32Bを実行すると、その入力データに対する処理結果データを第1OS41に出力し、その処理結果データが入力されると第1OS41ではその処理結果データに応じた制御演算値dを出力する。そして、第1CPU51では、その制御演算値c,dを第2CPU52に送信するとともに、第2CPU52からの制御演算値g,hを受信する。   The first CPU 51 executes the first ACC application 31B and the second ACC application 32B on the first OS 41 each time the same predetermined data is input to the first ACC application 31B and the second ACC application 32B. When the first ACC application 31B is executed on the first OS 41, the processing result data for the input data is output to the first OS 41. When the processing result data is input, the first OS 41 outputs the control calculation value c corresponding to the processing result data. To do. When the second ACC application 32B is executed on the first OS 41, the processing result data for the input data is output to the first OS 41. When the processing result data is input, the first OS 41 sets the control calculation value d corresponding to the processing result data. Output. Then, the first CPU 51 transmits the control calculation values c and d to the second CPU 52 and receives the control calculation values g and h from the second CPU 52.

第2CPU52では、第1ABSアプリ31A及び第2ABSアプリ32Aに同じ所定のデータが入力される毎に、第2OS42上で第1ABSアプリ31A及び第2ABSアプリ32Aを実行する。第2OS42上で第1ABSアプリ31Aを実行すると、第1の実施の形態と同様に、制御演算値e(ただし、第1の実施の形態では制御演算値cとしている)を出力する。第2OS42上で第2ABSアプリ32Aを実行すると、第1の実施の形態と同様に、制御演算値f(ただし、第1の実施の形態では制御演算値dとしている)を出力する。そして、第2CPU52では、その制御演算値e,fを第1CPU51に送信するとともに、第1CPU51からの制御演算値a,bを受信する。   The second CPU 52 executes the first ABS application 31A and the second ABS application 32A on the second OS 42 every time the same predetermined data is input to the first ABS application 31A and the second ABS application 32A. When the first ABS application 31A is executed on the second OS 42, the control calculation value e (however, the control calculation value c is set in the first embodiment) is output as in the first embodiment. When the second ABS application 32A is executed on the second OS 42, the control calculation value f (however, the control calculation value d is used in the first embodiment) is output as in the first embodiment. Then, the second CPU 52 transmits the control calculation values e and f to the first CPU 51 and receives the control calculation values a and b from the first CPU 51.

また、第2CPU52では、第1ACCアプリ31B及び第2ACCアプリ32Bに同じ所定のデータが入力される毎に、第2OS42上で第1ACCアプリ31B及び第2ACCアプリ32Bを実行する。第2OS42上で第1ACCアプリ31Bを実行すると、入力データに対する処理結果データを第2OS42に出力し、その処理結果データが入力されると第2OS42ではその処理結果データに応じた制御演算値gを出力する。第2OS42上で第2ACCアプリ32Bを実行すると、入力データに対する処理結果データを第2OS42に出力し、その処理結果データが入力されると第2OS42ではその処理結果データに応じた制御演算値hを出力する。そして、第2CPU52では、その制御演算値g,hを第1CPU51に送信するとともに、第1CPU51からの制御演算値c,dを受信する。   The second CPU 52 executes the first ACC application 31B and the second ACC application 32B on the second OS 42 every time the same predetermined data is input to the first ACC application 31B and the second ACC application 32B. When the first ACC application 31B is executed on the second OS 42, the processing result data for the input data is output to the second OS 42. When the processing result data is input, the second OS 42 outputs the control calculation value g corresponding to the processing result data. To do. When the second ACC application 32B is executed on the second OS 42, the processing result data for the input data is output to the second OS 42. When the processing result data is input, the second OS 42 outputs the control calculation value h corresponding to the processing result data. To do. Then, the second CPU 52 transmits the control calculation values g and h to the first CPU 51 and receives the control calculation values c and d from the first CPU 51.

比較部62では、ABS制御側の制御演算値a,b,e,fを比較し、制御演算値a,b,e,fが同じ値かあるいは異なる値かによって図6に示す判別パターンに従って各判定処理を行う。この各判別パターンでの判定処理は、第1の実施の形態での比較部61の説明において制御演算値のcをeとし、dをfとした場合に相当するので、説明を省略する。   The comparison unit 62 compares the control calculation values a, b, e, and f on the ABS control side, and according to the discrimination pattern shown in FIG. 6 depending on whether the control calculation values a, b, e, and f are the same value or different values. Judgment processing is performed. The determination processing with each determination pattern corresponds to the case where the control calculation value c is set to e and d is set to f in the description of the comparison unit 61 in the first embodiment.

また、比較部62では、ACC制御側の制御演算値c,d,g,hを比較し、制御演算値c,d,g,hが同じ値かあるいは異なる値かによって図7に示す判別パターンに従って各処理を行う。   Further, the comparison unit 62 compares the control calculation values c, d, g, and h on the ACC control side, and determines whether the control calculation values c, d, g, and h are the same value or different values as shown in FIG. Each process is performed according to.

c,d,g,h全て同じ値の場合、比較部62では、第1コンパイラ21(第1ACCアプリ31B)と第2コンパイラ22(第2ACCアプリ32B)及び第1OS41と第2OS42にバグが無いと判断し、通常のACC制御を行うと判定する。   When all of c, d, g, and h have the same value, the comparison unit 62 has no bugs in the first compiler 21 (first ACC application 31B), the second compiler 22 (second ACC application 32B), the first OS 41, and the second OS 42. It is determined that the normal ACC control is performed.

cとgが同じ値であり、dとhが同じ値であるが、c,gとd,hとが異なる値の場合、比較部62では、第1OS41と第2OS42にはバグが無いが、第1コンパイラ21と第2コンパイラ22のいずれか一方にバグが有ると判断する。この場合、ACCアプリ31B,32Bの一方に正常に実行できない部分があるが、ACC制御を極力継続して行うために、比較部62では、ACCアプリを再起動すると判定する。なお、このようなパターンの場合、ABSシステム側ではABS制御を停止したのは、ABSシステムは高い安全性が要求される安全システムであるからである。   When c and g are the same value and d and h are the same value, but c, g and d and h are different values, the comparison unit 62 has no bug in the first OS 41 and the second OS 42. It is determined that either one of the first compiler 21 and the second compiler 22 has a bug. In this case, one of the ACC applications 31B and 32B has a portion that cannot be normally executed. However, in order to continue the ACC control as much as possible, the comparison unit 62 determines to restart the ACC application. In the case of such a pattern, the ABS control is stopped on the ABS system side because the ABS system is a safety system that requires high safety.

cとdが同じ値であり、gとhが同じ値であるが、c,dとg,hとが異なる値の場合、比較部62では、第1コンパイラ21と第2コンパイラ22にはバグが無いが、第1OS41と第2OS42のいずれか一方にバグが有ると判断する。この場合、OS41,42のどちらが正常に実行できないのか判別できないので、比較部62では、安全側の処理としてシステムを停止すると判定する。   When c and d are the same value and g and h are the same value, but c, d and g, h are different values, the comparison unit 62 has a bug in the first compiler 21 and the second compiler 22. However, it is determined that either one of the first OS 41 and the second OS 42 has a bug. In this case, since it cannot be determined which of the OSs 41 and 42 cannot be executed normally, the comparison unit 62 determines to stop the system as a safe process.

cとdとgが同じ値であり、hだけが異なる値の場合、比較部62では、第1コンパイラ21と第2コンパイラ22及び第1OS41にはバグが無いが、第2OS42にバグが有ると判断する。この場合、第2OS42だけが正常に実行できないと判別できているので、比較部62では、正常な第1OS41側だけでACC制御を続行すると判定する。   When c, d, and g are the same value and only h is a different value, the comparison unit 62 has no bug in the first compiler 21, the second compiler 22, and the first OS 41, but the second OS 42 has a bug. to decide. In this case, since it can be determined that only the second OS 42 cannot be normally executed, the comparison unit 62 determines to continue the ACC control only on the normal first OS 41 side.

cとdとhが同じ値であり、gだけが異なる値の場合、比較部62では、第1コンパイラ21と第2コンパイラ22及び第1OS41にはバグが無いが、第2OS42にバグが有ると判断する。この場合、第2OS42だけが正常に実行できないと判別できているので、比較部62では、正常な第1OS41側だけでACC制御を続行すると判定する。   When c, d, and h are the same value and only g is different, the comparison unit 62 has no bug in the first compiler 21, the second compiler 22, and the first OS 41, but the second OS 42 has a bug. to decide. In this case, since it can be determined that only the second OS 42 cannot be normally executed, the comparison unit 62 determines to continue the ACC control only on the normal first OS 41 side.

dとgとhが同じ値であり、cだけが異なる値の場合、比較部62では、第1コンパイラ21と第2コンパイラ22及び第2OS42にはバグが無いが、第1OS41にバグが有ると判断する。この場合、第1OS41だけが正常に実行できないと判別できているので、比較部62では、正常な第2OS42側だけでACC制御を続行すると判定する。   When d, g, and h are the same value and only c is different, the comparison unit 62 has no bug in the first compiler 21, the second compiler 22, and the second OS 42, but the first OS 41 has a bug. to decide. In this case, since it can be determined that only the first OS 41 cannot be normally executed, the comparison unit 62 determines to continue the ACC control only on the normal second OS 42 side.

cとgとhが同じ値であり、dだけが異なる値の場合、比較部62では、第1コンパイラ21と第2コンパイラ22及び第2OS42にはバグが無いが、第1OS41にバグが有ると判断する。この場合、第1OS41だけが正常に実行できないと判別できているので、比較部62では、正常な第2OS42側だけでACC制御を続行すると判定する。   When c, g, and h are the same value and only d is a different value, in the comparison unit 62, there is no bug in the first compiler 21, the second compiler 22, and the second OS 42, but there is a bug in the first OS 41. to decide. In this case, since it can be determined that only the first OS 41 cannot be normally executed, the comparison unit 62 determines to continue the ACC control only on the normal second OS 42 side.

なお、上記以外のパターンの場合、第1の実施の形態でも記載したように、極めて稀であり、無視できるが、このパターンに万が一なった場合にはシステムを停止するとよい。   In the case of patterns other than those described above, as described in the first embodiment, it is extremely rare and can be ignored. However, in the event that this pattern occurs, the system may be stopped.

出力処理部72では、比較部62のABS制御側の判定で通常のABS制御を行うと判定した場合、OS41,42のいずれか一方から出力されたABS側の制御演算値a(b,e,f)に応じた制御信号を出力する。また、出力処理部72では、比較部62のABS制御側の判定でABS制御を停止すると判定した場合、ABSリレーをOFFし、ABSアプリ31A,32Aを共に終了する。また、出力処理部72では、比較部62のABS制御側の判定でシステムを停止すると判定した場合、シャットダウンするかあるいは電源をOFFする。また、出力処理部72では、比較部62のABS制御側の判定で第1OS41側だけでABS制御を続行すると判定した場合、第1OS41から出力されたABS側の制御演算値a(b)に応じた制御信号を出力する。また、出力処理部72では、比較部62のABS制御側の判定で第2OS42側だけでABS制御を続行すると判定した場合、第2OS42から出力されたABS側の制御演算値e(f)に応じた制御信号を出力する。   When the output processing unit 72 determines that the normal ABS control is to be performed in the determination on the ABS control side of the comparison unit 62, the control calculation value a (b, e, ABS) output from either one of the OS 41, 42 is used. A control signal corresponding to f) is output. When the output processing unit 72 determines that the ABS control is to be stopped by the determination on the ABS control side of the comparison unit 62, the ABS relay is turned off and the ABS applications 31A and 32A are both terminated. Further, when the output processing unit 72 determines that the system is to be stopped by the determination on the ABS control side of the comparison unit 62, the output processing unit 72 shuts down or turns off the power. Further, when the output processing unit 72 determines that the ABS control is continued only on the first OS 41 side in the determination on the ABS control side of the comparison unit 62, the output processing unit 72 responds to the ABS control operation value a (b) output from the first OS 41. Output control signals. Further, when the output processing unit 72 determines that the ABS control is to be continued only on the second OS 42 side in the determination on the ABS control side of the comparison unit 62, the output processing unit 72 responds to the ABS control operation value e (f) output from the second OS 42. Output control signals.

出力処理部72では、比較部62のACC制御側の判定で通常のACC制御を行うと判定した場合、OS41,42のいずれか一方から出力されたACC側の制御演算値c(d,g,h)に応じた制御信号を出力する。また、出力処理部72では、比較部62のACC制御側の判定でACCアプリを再起動と判定した場合、ACCアプリ31B,32Bを再起動する。また、出力処理部72では、比較部62のACC制御側の判定でシステムを停止すると判定した場合、シャットダウンするかあるいは電源をOFFする。また、出力処理部72では、比較部62のACC制御側の判定で第1OS41側だけでACC制御を続行すると判定した場合、第1OS41から出力されたACC制御側の制御演算値c(d)に応じた制御信号を出力する。また、出力処理部72では、比較部62のACC制御側の判定で第2OS42側だけでACC制御を続行すると判定した場合、第2OS42から出力されたACC制御側の制御演算値g(h)に応じた制御信号を出力する。   In the output processing unit 72, when it is determined that the normal ACC control is performed in the determination on the ACC control side of the comparison unit 62, the control calculation value c (d, g, ACC) output from one of the OSs 41 and 42 is determined. The control signal according to h) is output. Further, when the output processing unit 72 determines that the ACC application is to be restarted in the determination on the ACC control side of the comparison unit 62, the output processing unit 72 restarts the ACC applications 31B and 32B. Further, when the output processing unit 72 determines that the system is to be stopped by the determination on the ACC control side of the comparison unit 62, the output processing unit 72 shuts down or turns off the power. Further, in the output processing unit 72, when it is determined in the determination on the ACC control side of the comparison unit 62 that the ACC control is continued only on the first OS 41 side, the control calculation value c (d) on the ACC control side output from the first OS 41 is set. A corresponding control signal is output. Further, in the output processing unit 72, when it is determined in the determination on the ACC control side of the comparison unit 62 that the ACC control is continued only on the second OS 42 side, the control calculation value g (h) on the ACC control side output from the second OS 42 is set. A corresponding control signal is output.

図5〜図7を参照して、ECU2でのフェイルセーフ処理の流れについて説明する。特に、第1CPU51側での処理については図8及び図9のフローチャートに沿って説明し、第2CPU52側での処理については図10及び図11のフローチャートに沿って説明する。図8は、図5のECUにおける第1CPUでの処理(前半部)の流れを示すフローチャートである。図9は、図5のECUにおける第1CPUでの処理(後半部)の流れを示すフローチャートである。図10は、図5のECUにおける第2CPUでの処理(前半部)の流れを示すフローチャートである。図11は、図5のECUにおける第2CPUでの処理(後半部)の流れを示すフローチャートである。   With reference to FIGS. 5-7, the flow of the fail safe process in ECU2 is demonstrated. In particular, the processing on the first CPU 51 side will be described with reference to the flowcharts of FIGS. 8 and 9, and the processing on the second CPU 52 side will be described with reference to the flowcharts of FIGS. 10 and 11. FIG. 8 is a flowchart showing the flow of processing (first half) in the first CPU in the ECU of FIG. FIG. 9 is a flowchart showing a flow of processing (second half) in the first CPU in the ECU of FIG. FIG. 10 is a flowchart showing the flow of processing (first half) in the second CPU in the ECU of FIG. FIG. 11 is a flowchart showing a flow of processing (second half) in the second CPU in the ECU of FIG.

ABSシステムが起動され、ABS側のデータが入力される毎に、第1CPU51では第1OS41上で第1ABSアプリ31A及び第2ABSアプリ32Aが実行され、第2CPU52では第2OS42上で第1ABSアプリ31A及び第2ABSアプリ32Aが実行される。また、ACCシステムが起動され、ACC側のデータが入力される毎に、第1CPU51では第1OS41上で第1ACCアプリ31B及び第2ACCアプリ32Bが実行され、第2CPU52では第2OS42上で第1ACCアプリ31B及び第2ACCアプリ32Bが実行される。   Each time the ABS system is activated and ABS data is input, the first CPU 51 executes the first ABS application 31A and the second ABS application 32A on the first OS 41, and the second CPU 52 executes the first ABS application 31A and the second ABS on the second OS 42. The 2ABS application 32A is executed. Each time the ACC system is activated and data on the ACC side is input, the first CPU 51 executes the first ACC application 31B and the second ACC application 32B on the first OS 41, and the second CPU 52 executes the first ACC application 31B on the second OS 42. And the 2nd ACC application 32B is performed.

第1CPU51では、第1ABSアプリ31Aによる制御演算値aを出力するとともに(S50)、第2ABSアプリ32Aによる制御演算値bを出力する(S51)。また、第1CPU51では、第1ACCアプリ31Bによる制御演算値cを出力するとともに(S52)、第2ACCアプリ32Bによる制御演算値dを出力する(S53)。そして、第1CPU51では、制御演算値a,b,c,dを第2CPU52に送信する(S54)。また、第1CPU51では、第2CPU52からの制御演算値e,f,g,hを受信する(S55)。   The first CPU 51 outputs the control calculation value a by the first ABS application 31A (S50) and also outputs the control calculation value b by the second ABS application 32A (S51). Further, the first CPU 51 outputs the control calculation value c by the first ACC application 31B (S52) and also outputs the control calculation value d by the second ACC application 32B (S53). Then, the first CPU 51 transmits the control calculation values a, b, c, d to the second CPU 52 (S54). Further, the first CPU 51 receives the control calculation values e, f, g, h from the second CPU 52 (S55).

第2CPU52では、第1ABSアプリ31Aによる制御演算値eを出力するとともに(S80)、第2ABSアプリ32Aによる制御演算値fを出力する(S81)。また、第2CPU52では、第1ACCアプリ31Bによる制御演算値gを出力するとともに(S82)、第2ACCアプリ32Bによる制御演算値hを出力する(S83)。そして、第2CPU52では、制御演算値e,f,g,hを第1CPU51に送信する(S84)。また、第2CPU52では、第1CPU51からの制御演算値a,b,c,dを受信する(S85)。   The second CPU 52 outputs the control calculation value e by the first ABS application 31A (S80) and outputs the control calculation value f by the second ABS application 32A (S81). Further, the second CPU 52 outputs the control calculation value g by the first ACC application 31B (S82) and outputs the control calculation value h by the second ACC application 32B (S83). Then, the second CPU 52 transmits the control calculation values e, f, g, and h to the first CPU 51 (S84). The second CPU 52 receives the control calculation values a, b, c, d from the first CPU 51 (S85).

第1CPU51では、制御演算値a,b,e,fを比較する(S56)。そして、第1CPU51では、a=b=e=fの場合にはStatus11に0を代入し、a=e≠b=fの場合にはStatus11に1を代入し、a=b=e≠fの場合にはStatus11に2を代入し、a=b=f≠eの場合にはStatus11に2を代入し、a≠b=e=fの場合にはStatus11に3を代入し、b≠a=e=fの場合にはStatus11に3を代入し、これら以外のパターンの場合にはStatus11に4を代入する(S57)。   The first CPU 51 compares the control calculation values a, b, e, and f (S56). In the first CPU 51, 0 is assigned to Status 11 when a = b = e = f, 1 is assigned to Status 11 when a = e ≠ b = f, and a = b = e ≠ f. 2 is assigned to Status 11, 2 is assigned to Status 11 if a = b = f ≠ e, 3 is assigned to Status 11 if a ≠ b = e = f, and b ≠ a = In the case of e = f, 3 is substituted into Status 11, and in the case of other patterns, 4 is substituted into Status 11 (S57).

また、第1CPU51では、制御演算値c,d,g,hを比較する(S58)。そして、第1CPU51では、c=d=g=hの場合にはStatus12に0を代入し、c=g≠d=hの場合にはStatus12に1を代入し、c=d=g≠hの場合にはStatus12に2を代入し、c=d=h≠gの場合にはStatus12に2を代入し、c≠d=g=hの場合にはStatus12に3を代入し、d≠c=g=hの場合にはStatus12に3を代入し、これら以外のパターンの場合にはStatus12に4を代入する(S59)。   Further, the first CPU 51 compares the control calculation values c, d, g, and h (S58). In the first CPU 51, 0 is assigned to Status 12 when c = d = g = h, 1 is assigned to Status 12 when c = g ≠ d = h, and c = d = g ≠ h. 2 is assigned to Status 12, 2 is assigned to Status 12 if c = d = h ≠ g, 3 is assigned to Status 12 if c ≠ d = g = h, and d ≠ c = If g = h, 3 is assigned to Status 12, and if it is a pattern other than these, 4 is assigned to Status 12 (S59).

そして、第1CPU51では、Status11とStatus12を第2CPU52に送信する(S60)。また、第1CPU51では、第2CPU52からのStatus21とStatus22を受信する(S61)。   Then, the first CPU 51 transmits Status 11 and Status 12 to the second CPU 52 (S60). In addition, the first CPU 51 receives Status 21 and Status 22 from the second CPU 52 (S61).

第2CPU52では、制御演算値a,b,e,fを比較する(S86)。そして、第2CPU52では、a=b=e=fの場合にはStatus21に0を代入し、a=e≠b=fの場合にはStatus21に1を代入し、a=b=e≠fの場合にはStatus21に2を代入し、a=b=f≠eの場合にはStatus21に2を代入し、a≠b=e=fの場合にはStatus21に3を代入し、b≠a=e=fの場合にはStatus21に3を代入し、これら以外のパターンの場合にはStatus21に4を代入する(S87)。   The second CPU 52 compares the control calculation values a, b, e, and f (S86). Then, in the second CPU 52, 0 is assigned to Status 21 when a = b = e = f, 1 is assigned to Status 21 when a = e ≠ b = f, and a = b = e ≠ f. 2 is assigned to Status 21, 2 is assigned to Status 21 if a = b = f ≠ e, 3 is assigned to Status 21 if a ≠ b = e = f, and b ≠ a = In the case of e = f, 3 is substituted into Status 21, and in the case of other patterns, 4 is substituted into Status 21 (S87).

また、第2CPU52では、制御演算値c,d,g,hを比較する(S88)。そして、第2CPU52では、c=d=g=hの場合にはStatus22に0を代入し、c=g≠d=hの場合にはStatus22に1を代入し、c=d=g≠hの場合にはStatus22に2を代入し、c=d=h≠gの場合にはStatus22に2を代入し、c≠d=g=hの場合にはStatus22に3を代入し、d≠c=g=hの場合にはStatus22に3を代入し、これら以外のパターンの場合にはStatus22に4を代入する(S89)。   Further, the second CPU 52 compares the control calculation values c, d, g, and h (S88). Then, in the second CPU 52, 0 is substituted into Status 22 when c = d = g = h, 1 is substituted into Status 22 when c = g ≠ d = h, and c = d = g ≠ h. 2 is assigned to Status 22, 2 is assigned to Status 22 if c = d = h ≠ g, 3 is assigned to Status 22 if c ≠ d = g = h, and d ≠ c = If g = h, 3 is assigned to Status 22, and if it is a pattern other than these, 4 is assigned to Status 22 (S89).

そして、第2CPU52では、Status21とStatus22を第1CPU51に送信する(S90)。また、第2CPU52では、第1CPU51からのStatus11とStatus12を受信する(S91)。   Then, the second CPU 52 transmits Status 21 and Status 22 to the first CPU 51 (S90). In addition, the second CPU 52 receives Status 11 and Status 12 from the first CPU 51 (S91).

第1CPU51では、Status11とStatus21が同じか否かを判定する(S62)。Status11とStatus21が同じと判定した場合、第1CPU51では、Status12とStatus22が同じか否かを判定する(S63)。Status12とStatus22が同じと判定した場合、第1CPU51では、Status11を判別する(S64)。Status11が0の場合、第1CPU51では、制御演算値a(b)を用いて通常のABS制御を行う(S65)。Status11が1の場合、第1CPU51では、ABSリレーをOFFするとともにABSアプリ31A,32Aを終了し、ABS制御を停止する(S66)。Status11が2の場合、第1CPU51では、制御演算値a(b)を用いてABS制御を続行する(S67)。Status11が3の場合、第1CPU51では、何も行わない(S68)。さらに、第1CPU51では、Status12を判別する(S70)。Status12が0の場合、第1CPU51では、制御演算値c(d)を用いて通常のACC制御を行う(S71)。Status12が1の場合、第1CPU51では、ACCアプリ31B,32Bを再起動する(S72)。Status12が2の場合、第1CPU51では、制御演算値c(d)を用いてACC制御を続行する(S73)。Status12が3の場合、第1CPU51では、何も行わない(S74)。Status11が4の場合又はStatus12が4の場合又はS62の判定でStatus11とStatus21が異なると判定した場合又はS63の判定でStatus12とStatus22が異なると判定した場合、第1CPU51では、システムをシャットダウンするかあるいは電源をOFFし、システムを停止する(S69,S75)。   The first CPU 51 determines whether Status 11 and Status 21 are the same (S62). When it is determined that the status 11 and the status 21 are the same, the first CPU 51 determines whether the status 12 and the status 22 are the same (S63). When it is determined that the Status 12 and the Status 22 are the same, the first CPU 51 determines the Status 11 (S64). When Status 11 is 0, the first CPU 51 performs normal ABS control using the control calculation value a (b) (S65). When Status 11 is 1, the first CPU 51 turns off the ABS relay, ends the ABS applications 31A and 32A, and stops the ABS control (S66). When Status 11 is 2, the first CPU 51 continues the ABS control using the control calculation value a (b) (S67). If Status 11 is 3, the first CPU 51 does nothing (S68). Further, the first CPU 51 determines Status 12 (S70). When Status 12 is 0, the first CPU 51 performs normal ACC control using the control calculation value c (d) (S71). When Status 12 is 1, the first CPU 51 restarts the ACC applications 31B and 32B (S72). When Status 12 is 2, the first CPU 51 continues the ACC control using the control calculation value c (d) (S73). When Status 12 is 3, the first CPU 51 does nothing (S74). If the status 11 is 4, the status 12 is 4, the determination in S62 determines that the status 11 and the status 21 are different, or the determination in S63 determines that the status 12 and the status 22 are different, the first CPU 51 shuts down the system or The power is turned off and the system is stopped (S69, S75).

第2CPU52では、Status21とStatus11が同じか否かを判定する(S92)。Status21とStatus11が同じと判定した場合、第2CPU52では、Status22とStatus12が同じか否かを判定する(S93)。Status22とStatus12が同じと判定した場合、第2CPU52では、Status21を判別する(S94)。Status21が0の場合、第2CPU52では、第1CPU51側で通常のABS制御を行っているので、何も行わない(S95)。Status21が1の場合、第2CPU52では、ABSリレーをOFFするとともにABSアプリ31A,32Aを終了し、ABS制御を停止する(S96)。Status21が2の場合、第2CPU52では、何も行わない(S97)。Status21が3の場合、第2CPU52では、制御演算値e(f)を用いてABS制御を続行する(S98)。さらに、第2CPU52では、Status22を判別する(S100)。Status22が0の場合、第2CPU52では、第1CPU51側で通常のACC制御を行っているので、何も行わない(S101)。Status22が1の場合、第2CPU52では、ACCアプリ31B,32Bを再起動する(S102)。Status22が2の場合、第2CPU52では、何も行わない(S103)。Status22が3の場合、第2CPU52では、制御演算値g(h)を用いてACC制御を続行する(S104)。Status21が4の場合又はStatus22が4の場合又はS92の判定でStatus21とStatus11が異なると判定した場合又はS93の判定でStatus22とStatus12が異なると判定した場合、第2CPU52では、システムをシャットダウンするかあるいは電源をOFFし、システムを停止する(S99,S105)。   The second CPU 52 determines whether Status 21 and Status 11 are the same (S92). When it is determined that the status 21 and the status 11 are the same, the second CPU 52 determines whether the status 22 and the status 12 are the same (S93). When it is determined that the status 22 and the status 12 are the same, the second CPU 52 determines the status 21 (S94). When Status 21 is 0, the second CPU 52 performs normal ABS control on the first CPU 51 side, so nothing is performed (S95). When the status 21 is 1, the second CPU 52 turns off the ABS relay, ends the ABS applications 31A and 32A, and stops the ABS control (S96). If Status 21 is 2, the second CPU 52 does nothing (S97). When Status 21 is 3, the second CPU 52 continues the ABS control using the control calculation value e (f) (S98). Further, the second CPU 52 determines Status 22 (S100). When the status 22 is 0, the second CPU 52 performs normal ACC control on the first CPU 51 side, so nothing is performed (S101). When Status 22 is 1, the second CPU 52 restarts the ACC applications 31B and 32B (S102). If Status 22 is 2, the second CPU 52 does nothing (S103). When Status 22 is 3, the second CPU 52 continues the ACC control using the control calculation value g (h) (S104). When the status 21 is 4, when the status 22 is 4, when it is determined that the status 21 and the status 11 are different in the determination of S92, or when it is determined that the status 22 and the status 12 are different in the determination of S93, the second CPU 52 shuts down the system or The power is turned off and the system is stopped (S99, S105).

このECU2によれば、ABS側について第1OS41と第2OS42に異なるコンパイラ21,22でそれぞれ変換された第1ABSアプリ31Aと第2ABSアプリ32Aをそれぞれ配置して4通りの組み合わせでの4つの制御演算値a,b,e,fを比較し、ACC側についても第1OS41と第2OS42に異なるコンパイラ21,22でそれぞれ変換された第1ACCアプリ31Bと第2ACCアプリ32Bをそれぞれ配置して4通りの組み合わせでの4つの制御演算値c,d,g,hを比較することにより、OS41,42のバグかあるいはコンパイラ21,22のバグかを判別することができる。これによって、コンパイラ21,22にバグが有る場合にはコンパイラ異常時のファイルセーフ処理(例えば、安全システムであるABS側ではABS制御停止、運転支援システムであるACC側ではACCアプリ再起動)を実施し、OS41,42にバグが有る場合にはOS異常時のファイルセーフ処理を実施できる。特に、OS41,42にバグが有る場合にどちらのOSにバグが有るかを判別できるときには、正常のOSでABS制御及びACC制御を継続することができる。   According to this ECU 2, four control calculation values in four combinations are arranged by arranging the first ABS application 31A and the second ABS application 32A respectively converted by the different compilers 21 and 22 into the first OS 41 and the second OS 42 on the ABS side. a, b, e, f are compared, and on the ACC side, the first ACC application 31B and the second ACC application 32B converted by the different compilers 21 and 22 are respectively arranged in the first OS 41 and the second OS 42, and four combinations are provided. By comparing these four control calculation values c, d, g, and h, it is possible to determine whether the bug is the OS 41 or 42 or the compiler 21 or 22. As a result, when there is a bug in the compilers 21 and 22, file safe processing (for example, ABS control is stopped on the ABS side which is a safety system, and the ACC application is restarted on the ACC side which is a driving support system) is executed. If there is a bug in the OS 41, 42, file safe processing can be performed when the OS is abnormal. In particular, when there is a bug in the OSs 41 and 42 and it can be determined which OS has the bug, the ABS control and the ACC control can be continued with the normal OS.

図12及び図13を参照して、第3の実施の形態に係るABSシステムのECU3について説明する。図12は、第3の実施の形態に係るABSシステムのECUの構成図である。図13は、図12のECUにおける2個のコンパイラと2個のOSの組み合わせによる各制御演算値の比較の判別パターンの一覧表である。   With reference to FIG.12 and FIG.13, ECU3 of the ABS system which concerns on 3rd Embodiment is demonstrated. FIG. 12 is a configuration diagram of the ECU of the ABS system according to the third embodiment. FIG. 13 is a list of discrimination patterns for comparison of control calculation values by a combination of two compilers and two OSs in the ECU of FIG.

ECU3は、電子制御ユニットであり、ABSシステムを統括制御する。ECU3は、ソフトウエアとしてABSアプリ10、第1コンパイラ21と第2コンパイラ22、第1ABSアプリ31と第2ABSアプリ32、第1OS41と第2OS42を有している。また、ECU3は、ハードウエアとして第1CPU51と第2CPU52、ROM、RAMなどを備えている。さらに、ECU3は、各CPU51,52で各アプリが実行されることによって比較部63,出力処理部73が構成される。この比較部63と出力処理部73は、第1CPU51側と第2CPU52側の両方に構成され、両側で同様の処理がそれぞれ行われる。   The ECU 3 is an electronic control unit and performs overall control of the ABS system. The ECU 3 includes an ABS application 10, a first compiler 21 and a second compiler 22, a first ABS application 31, a second ABS application 32, a first OS 41, and a second OS 42 as software. The ECU 3 includes a first CPU 51 and a second CPU 52, ROM, RAM, and the like as hardware. Further, in the ECU 3, a comparison unit 63 and an output processing unit 73 are configured by each application being executed by each of the CPUs 51 and 52. The comparison unit 63 and the output processing unit 73 are configured on both the first CPU 51 side and the second CPU 52 side, and the same processing is performed on both sides.

なお、第3の実施の形態では、第1ABSアプリ31と第2ABSアプリ32が特許請求の範囲に記載する第1アプリケーションと第2アプリケーションに相当し、第1OS41と第2OS42が特許請求の範囲に記載する第1動作環境と第2動作環境に相当し、比較部63が特許請求の範囲に記載する処理結果比較手段に相当する。   In the third embodiment, the first ABS application 31 and the second ABS application 32 correspond to the first application and the second application described in the claims, and the first OS 41 and the second OS 42 are described in the claims. The comparison unit 63 corresponds to the processing result comparison unit described in the claims.

ECU3は、第1の実施の形態に係るECU1と比較すると、第1CPU51側の構成は同じであり、第2CPU52側の構成が異なるので、その構成についてのみ説明する。第1ABSアプリ31は第1OS41(第1CPU51)及び第2OS42(第1CPU52)上にそれぞれ搭載されるが、第2ABSアプリ32は第1OS41(第1CPU51)上にのみ搭載される。したがって、第2CPU52では、第1ABSアプリ31に所定のデータ(第1CPU51側で入力される所定のデータと同じデータ)が入力される毎に、第2OS42上で第1ABSアプリ31だけを実行し、制御演算値cだけを出力する。   The ECU 3 has the same configuration on the first CPU 51 side and a different configuration on the second CPU 52 side as compared with the ECU 1 according to the first embodiment, so only the configuration will be described. The first ABS application 31 is installed on each of the first OS 41 (first CPU 51) and the second OS 42 (first CPU 52), while the second ABS application 32 is installed only on the first OS 41 (first CPU 51). Therefore, the second CPU 52 executes only the first ABS application 31 on the second OS 42 every time predetermined data (the same data as the predetermined data input on the first CPU 51 side) is input to the first ABS application 31. Only the calculated value c is output.

比較部63では、制御演算値a,b,cを比較し、制御演算値a,b,cが同じ値かあるいは異なる値かによって図13に示す判別パターンに従って各判定処理を行う。   The comparison unit 63 compares the control calculation values a, b, and c, and performs each determination process according to the determination pattern shown in FIG. 13 depending on whether the control calculation values a, b, and c are the same value or different values.

a,b,c全て同じ値の場合、比較部63では、第1コンパイラ21(第1ABSアプリ31)と第2コンパイラ22(第2ABSアプリ32)及び第1OS41と第2OS42にバグが無いと判断し、通常のABS制御を行うと判定する。   When all of a, b, and c have the same value, the comparison unit 63 determines that the first compiler 21 (first ABS application 31), the second compiler 22 (second ABS application 32), the first OS 41, and the second OS 42 are free of bugs. It is determined that normal ABS control is performed.

aとcが同じ値であり、bだけが異なる値の場合、比較部63では、第1OS41と第2OS42にはバグが無いが第1コンパイラ21と第2コンパイラ22のいずれか一方にバグが有ると判断もでき、第1コンパイラ21と第2コンパイラ22及び第2OS42にバグが無いが第1OS41にバグが有ると判断もできる。この場合、比較部63では、安全側の処理としてABS制御を停止すると判定する。   When a and c are the same value and only b is a different value, the comparison unit 63 has no bug in the first OS 41 and the second OS 42, but one of the first compiler 21 and the second compiler 22 has a bug. It can also be determined that there is no bug in the first compiler 21, the second compiler 22, and the second OS 42, but there is a bug in the first OS 41. In this case, the comparison unit 63 determines to stop the ABS control as a safe process.

aとbが同じ値であり、cだけが異なる値の場合、比較部63では、第1コンパイラ21と第2コンパイラ22にはバグが無いが、第1OS41と第2OS42のいずれか一方にバグが有ると判断する。この場合、OS41,42のどちらが正常に実行できないのか判別できないので、比較部63では、安全側の処理としてシステムを停止すると判定する。   When a and b are the same value and only c is a different value, the comparison unit 63 has no bug in the first compiler 21 and the second compiler 22, but there is a bug in either the first OS 41 or the second OS 42. Judge that there is. In this case, since it cannot be determined which of the OSs 41 and 42 cannot be executed normally, the comparison unit 63 determines to stop the system as a safe process.

bとcが同じ値であり、aだけが異なる値の場合、比較部63では、第1コンパイラ21と第2コンパイラ22及び第2OS42にはバグが無いが、第1OS41にバグが有ると判断する。この場合、第1OS41だけが正常に実行できないと判別できているので、比較部63では、正常な第2OS42側だけでABS制御を続行すると判定する。なお、第1OS41の一部にバグが有るが、第1OS41の正常に動作している部分で第2ABSアプリ32が実行されたので、bとcが同じ値になったと推定できる。   When b and c are the same value and only a is a different value, the comparison unit 63 determines that the first compiler 21, the second compiler 22, and the second OS 42 have no bug, but the first OS 41 has a bug. . In this case, since it can be determined that only the first OS 41 cannot be normally executed, the comparison unit 63 determines that the ABS control is continued only on the normal second OS 42 side. Although there is a bug in a part of the first OS 41, it can be estimated that b and c have the same value because the second ABS application 32 is executed in the part where the first OS 41 is operating normally.

なお、上記以外のパターンの場合、第1の実施の形態で記載したように、極めて稀であり、無視できるが、このパターンに万が一なった場合には安全側の処理としてシステムを停止するとよい。   In the case of a pattern other than the above, as described in the first embodiment, it is extremely rare and can be ignored. However, in the event that this pattern occurs, the system may be stopped as a safe process.

出力処理部73は、第1の実施の形態で説明した出力処理部71と同様の処理を行うので、説明を省略する。ただし、出力処理部73では、第1OS41側だけでABS制御を続行する場合の出力処理はない。   The output processing unit 73 performs the same processing as the output processing unit 71 described in the first embodiment, and thus description thereof is omitted. However, the output processing unit 73 does not perform output processing when the ABS control is continued only on the first OS 41 side.

図12及び図13を参照して、ECU3でのフェイルセーフ処理の流れについて説明する。特に、第1CPU51側での処理については図14のフローチャートに沿って説明し、第2CPU52側での処理については図15のフローチャートに沿って説明する。図14は、図12のECUにおける第1CPUでの処理の流れを示すフローチャートである。図15は、図12のECUにおける第2CPUでの処理の流れを示すフローチャートである。   With reference to FIG.12 and FIG.13, the flow of the fail safe process in ECU3 is demonstrated. In particular, the processing on the first CPU 51 side will be described with reference to the flowchart of FIG. 14, and the processing on the second CPU 52 side will be described with reference to the flowchart of FIG. FIG. 14 is a flowchart showing the flow of processing in the first CPU in the ECU of FIG. FIG. 15 is a flowchart showing a flow of processing in the second CPU in the ECU of FIG.

ABSシステムが起動され、データが入力される毎に、第1CPU51では第1OS41上で第1ABSアプリ31及び第2ABSアプリ32が実行され、第2CPU52では第2OS42上で第1ABSアプリ31が実行される。   Each time the ABS system is activated and data is input, the first CPU 51 executes the first ABS application 31 and the second ABS application 32 on the first OS 41, and the second CPU 52 executes the first ABS application 31 on the second OS 42.

第1CPU51では、第1ABSアプリ31による制御演算値aを出力するとともに(S110)、第2ABSアプリ32による制御演算値bを出力する(S111)。そして、第1CPU51では、制御演算値a,bを第2CPU52に送信する(S112)。また、第1CPU51では、第2CPU52からの制御演算値cを受信する(S113)。   The first CPU 51 outputs the control calculation value a by the first ABS application 31 (S110) and outputs the control calculation value b by the second ABS application 32 (S111). Then, the first CPU 51 transmits the control calculation values a and b to the second CPU 52 (S112). Further, the first CPU 51 receives the control calculation value c from the second CPU 52 (S113).

第2CPU52では、第1ABSアプリ31による制御演算値cを出力する(S130)。そして、第2CPU52では、制御演算値cを第1CPU51に送信する(S131)。また、第2CPU52では、第1CPU51からの制御演算値a,bを受信する(S132)。   The second CPU 52 outputs the control calculation value c by the first ABS application 31 (S130). Then, the second CPU 52 transmits the control calculation value c to the first CPU 51 (S131). Further, the second CPU 52 receives the control calculation values a and b from the first CPU 51 (S132).

第1CPU51では、制御演算値a,b,cを比較する(S114)。そして、第1CPU51では、a=b=cの場合にはStatus1に0を代入し、a=c≠bの場合にはStatus1に1を代入し、a≠b=cの場合にはStatus1に2を代入し、a=b≠cの場合にはStatus1に3を代入し、これら以外のパターンの場合にはStatus1に4を代入する(S115)。そして、第1CPU51では、Status1を第2CPU52に送信する(S116)。また、第1CPU51では、第2CPU52からのStatus2を受信する(S117)。   The first CPU 51 compares the control calculation values a, b, and c (S114). In the first CPU 51, 0 is assigned to Status1 when a = b = c, 1 is assigned to Status1 when a = c ≠ b, and 2 is assigned to Status1 when a ≠ b = c. When a = b ≠ c, 3 is assigned to Status1, and in the case of other patterns, 4 is assigned to Status1 (S115). Then, the first CPU 51 transmits Status1 to the second CPU 52 (S116). Further, the first CPU 51 receives Status 2 from the second CPU 52 (S117).

第2CPU52では、制御演算値a,b,cを比較する(S133)。そして、第2CPU52では、a=b=cの場合にはStatus2に0を代入し、a=c≠bの場合にはStatus2に1を代入し、a≠b=cの場合にはStatus2に2を代入し、a=b≠cの場合にはStatus2に3を代入し、これら以外のパターンの場合にはStatus2に4を代入する(S134)。そして、第2CPU52では、Status2を第1CPU51に送信する(S135)。また、第2CPU52では、第1CPU51からのStatus1を受信する(S136)。   The second CPU 52 compares the control calculation values a, b, and c (S133). In the second CPU 52, 0 is assigned to Status2 when a = b = c, 1 is assigned to Status2 when a = c ≠ b, and 2 is assigned to Status2 when a ≠ b = c. If a = b ≠ c, 3 is assigned to Status2, and if the pattern is other than these, 4 is assigned to Status2 (S134). Then, the second CPU 52 transmits Status2 to the first CPU 51 (S135). Further, the second CPU 52 receives Status1 from the first CPU 51 (S136).

第1CPU51では、Status1とStatus2が同じか否かを判定する(S118)。Status1とStatus2が同じと判定した場合、第1CPU51では、Status1を判別する(S119)。Status1が0の場合、第1CPU51では、制御演算値a(b)を用いて通常のABS制御を行う(S120)。Status1が1の場合、第1CPU51では、ABSリレーをOFFするとともにABSアプリ31,32を終了し、ABS制御を停止する(S121)。Status1が2の場合、第1CPU51では、何も行わない(S122)。Status1が3あるいは4の場合又はS118の判定でStatus1とStatus2が異なると判定した場合、第1CPU51では、システムをシャットダウンするかあるいは電源をOFFし、システムを停止する(S123)。   The first CPU 51 determines whether Status1 and Status2 are the same (S118). When it is determined that Status1 and Status2 are the same, the first CPU 51 determines Status1 (S119). When Status 1 is 0, the first CPU 51 performs normal ABS control using the control calculation value a (b) (S120). When Status 1 is 1, the first CPU 51 turns off the ABS relay, ends the ABS applications 31 and 32, and stops the ABS control (S121). If Status 1 is 2, the first CPU 51 does nothing (S122). If Status 1 is 3 or 4, or if it is determined in S118 that Status 1 and Status 2 are different, the first CPU 51 shuts down the system or turns off the power and stops the system (S123).

第2CPU52では、Status2とStatus1が同じか否かを判定する(S137)。Status2とStatus1が同じと判定した場合、第2CPU52では、Status2を判別する(S138)。Status2が0の場合、第2CPU52では、第1CPU51側で通常のABS制御を行っているので、何も行わない(S139)。Status2が1の場合、第2CPU52では、ABSリレーをOFFするとともにABSアプリ31を終了し、ABS制御を停止する(S140)。Status2が2の場合、第2CPU52では、制御演算値cを用いてABS制御を続行する(S141)。Status2が3あるいは4の場合又はS137の判定でStatus2とStatus1が異なると判定した場合、第2CPU52では、システムをシャットダウンするかあるいは電源をOFFし、システムを停止する(S142)。   The second CPU 52 determines whether Status2 and Status1 are the same (S137). When it is determined that Status2 and Status1 are the same, the second CPU 52 determines Status2 (S138). When Status 2 is 0, the second CPU 52 performs normal ABS control on the first CPU 51 side, so nothing is performed (S139). When Status 2 is 1, the second CPU 52 turns off the ABS relay, ends the ABS application 31, and stops the ABS control (S140). When Status 2 is 2, the second CPU 52 continues the ABS control using the control calculation value c (S141). When Status 2 is 3 or 4, or when it is determined that Status 2 and Status 1 are different in S137, the second CPU 52 shuts down the system or turns off the power and stops the system (S142).

このECU3によれば、第1OS41に異なるコンパイラ21,22でそれぞれ変換された第1ABSアプリ31と第2ABSアプリ32をそれぞれ配置するとともに第2OS42にコンパイラ21で変換された第1ABSアプリ31を配置し、3通りの組み合わせでの3つの制御演算値a,b,cを比較することにより、OS41,42のバグかあるいはコンパイラ21,22のバグかを判別することができる。これによって、コンパイラ21,22にバグが有る場合にはコンパイラ異常時のファイルセーフ処理を実施し、OS41,42にバグが有る場合にはOS異常時のファイルセーフ処理を実施できる。特に、OS41,42にバグが有る場合にどちらのOSにバグが有るかを判別できるときには、正常のOSでABS制御を継続することができる。   According to the ECU 3, the first ABS application 31 and the second ABS application 32 converted by the different compilers 21 and 22 are arranged in the first OS 41, and the first ABS application 31 converted by the compiler 21 is arranged in the second OS 42. By comparing the three control calculation values a, b, and c in the three combinations, it is possible to determine whether the bug is the OS 41, 42 or the compiler 21, 22. As a result, when the compilers 21 and 22 have bugs, the file safe process when the compiler is abnormal can be performed, and when the OSs 41 and 42 have bugs, the file safe process when the OS is abnormal can be performed. In particular, when there is a bug in the OSs 41 and 42, when it is possible to determine which OS has the bug, the ABS control can be continued with the normal OS.

以上、本発明に係る実施の形態について説明したが、本発明は上記実施の形態に限定されることなく様々な形態で実施される。   As mentioned above, although embodiment which concerns on this invention was described, this invention is implemented in various forms, without being limited to the said embodiment.

例えば、本実施の形態では車両に搭載されるシステムに適用したが、複数の動作環境と、複数のコンパイラによって変換された複数のアプリケーションとを有する情報処理装置であれば他の装置にも適用可能である。また、各種制御などを行うことなく、コンパイラ及び動作環境のバグ検出だけを行う装置にも適用可能である。   For example, in this embodiment, the present invention is applied to a system mounted on a vehicle. However, any information processing apparatus having a plurality of operating environments and a plurality of applications converted by a plurality of compilers can be applied to other apparatuses. It is. Further, the present invention can also be applied to a compiler and a device that only detects bugs in the operating environment without performing various controls.

また、本実施の形態では2個のCPU、2個のOS、2個のコンパイラ(ひいては、2個のコンパイラによってそれぞれ生成される2個のマシン語プログラム)を有するシステムに適用したが、3個以上のCPU、3個以上のOS、3個以上のコンパイラを有するシステムにも適用可能である。また、演算装置としては、CPUの代わりに、CPUコアなどでもよい。   In this embodiment, the present invention is applied to a system having two CPUs, two OSs, and two compilers (and thus two machine language programs respectively generated by the two compilers). The present invention is also applicable to a system having the above CPU, three or more OSs, and three or more compilers. Further, the arithmetic device may be a CPU core or the like instead of the CPU.

また、本実施の形態では1つのECUでABSシステム又はABSシステムとACCシステムの制御を行う構成としたが、1つのECUで3つ以上のシステムの制御を行う場合にも適用可能である。   In the present embodiment, the ECU system is configured to control the ABS system or the ABS system and the ACC system. However, the present invention can also be applied to a case where three ECUs or more are controlled by one ECU.

また、本実施の形態ではコンパイラ及びOSのバグ検出を常時行う構成としたが、1回又は数回だけ行うようにしてもよい。また、本実施の形態では車両に搭載されるECUでコンパイラ及びOSのバグ検出を行う構成としたが、開発時に同様の処理によってコンパイラ及びOSのバグ検出を予め行い、コンパイラ又はコンパイラのバグが検出された場合にはそのコンパイラ又はOSを交換やバグ取りを予めするようにしてもよい。   In this embodiment, the bug detection of the compiler and OS is always performed, but it may be performed only once or several times. In this embodiment, the ECU and the OS bug are detected by the ECU mounted on the vehicle. However, the compiler and the OS bug are detected in advance by the same process during development, and the compiler or the compiler bug is detected. In such a case, the compiler or OS may be replaced or bugs may be removed in advance.

また、本実施の形態では同一のアプリケーションのソースコードが異なるコンパイラによってそれぞれ変換されたアプリケーション(マシン語プログラム)に適用したが、コンパイラによって作られないアプリケーションにも適用可能である。   In this embodiment, the application is applied to an application (machine language program) in which the source code of the same application is converted by a different compiler.

1,2,3…ECU、10,10A…ABSアプリ、10B…ACCアプリ、21…第1コンパイラ、22…第2コンパイラ、31,31A…第1ABSアプリ、32,32A…第2ABSアプリ、31B…第1ACCアプリ、32B…第2ACCアプリ、41…第1OS、42…第2OS、51…第1CPU、52…第2CPU、61,62,63…比較部、71,72,73…出力処理部   1, 2, 3 ... ECU, 10, 10A ... ABS app, 10B ... ACC app, 21 ... 1st compiler, 22 ... 2nd compiler, 31, 31A ... 1st ABS app, 32, 32A ... 2nd ABS app, 31B ... 1st ACC application, 32B ... 2nd ACC application, 41 ... 1st OS, 42 ... 2nd OS, 51 ... 1st CPU, 52 ... 2nd CPU, 61, 62, 63 ... comparison part, 71, 72, 73 ... output processing part

Claims (2)

同一のデータが入力されると異なる処理過程を経て同一の処理結果を出力する第1動作環境及び第2動作環境と、前記動作環境上で実行された場合に同一のデータが入力されると異なる処理過程を経て同一の処理結果データを動作環境に出力する第1アプリケーション及び第2アプリケーションを有する情報処理装置であって、
前記第1動作環境では、前記第1アプリケーション及び前記第2アプリケーションが実行され、
前記第2動作環境では、少なくとも前記第1アプリケーションが実行され、
前記第1動作環境上で実行される前記第1アプリケーション及び前記第2アプリケーションと前記第2動作環境上で実行される前記第1アプリケーションに同一のデータがそれぞれ入力された場合、前記第1アプリケーションが実行される前記第1動作環境での処理結果と、前記第2アプリケーションが実行される前記第1動作環境での処理結果と、前記第1アプリケーションが実行される前記第2動作環境での処理結果とを比較する処理結果比較手段を備えることを特徴とする情報処理装置。
When the same data is input, the first operating environment and the second operating environment that output the same processing result through different processing steps, and when the same data is input when executed in the operating environment, are different. An information processing apparatus having a first application and a second application for outputting the same processing result data to an operating environment through a processing process,
In the first operating environment, the first application and the second application are executed,
In the second operating environment, at least the first application is executed,
When the same data is input to each of the first application and the second application executed on the first operating environment and the first application executed on the second operating environment, the first application Processing results in the first operating environment to be executed, processing results in the first operating environment in which the second application is executed, and processing results in the second operating environment in which the first application is executed An information processing apparatus comprising processing result comparison means for comparing
前記第2動作環境では、前記第1アプリケーション及び前記第2アプリケーションが実行され、
前記処理結果比較手段は、前記第1動作環境上で実行される前記第1アプリケーション及び前記第2アプリケーションと前記第2動作環境上で実行される前記第1アプリケーション及び前記第2アプリケーションに同一のデータがそれぞれ入力された場合、前記第1アプリケーションが実行される前記第1動作環境での処理結果と、前記第2アプリケーションが実行される前記第1動作環境での処理結果と、前記第1アプリケーションが実行される前記第2動作環境での処理結果と、前記第2アプリケーションが実行される前記第2動作環境での処理結果とを比較することを特徴とする請求項1に記載する情報処理装置。
In the second operating environment, the first application and the second application are executed,
The processing result comparison unit includes the same data for the first application and the second application executed on the first operating environment and the first application and the second application executed on the second operating environment. Are input, the processing result in the first operating environment in which the first application is executed, the processing result in the first operating environment in which the second application is executed, and the first application The information processing apparatus according to claim 1, wherein the processing result in the second operating environment to be executed is compared with the processing result in the second operating environment in which the second application is executed.
JP2009137234A 2009-06-08 2009-06-08 Information processing device Pending JP2010282551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009137234A JP2010282551A (en) 2009-06-08 2009-06-08 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009137234A JP2010282551A (en) 2009-06-08 2009-06-08 Information processing device

Publications (1)

Publication Number Publication Date
JP2010282551A true JP2010282551A (en) 2010-12-16

Family

ID=43539200

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009137234A Pending JP2010282551A (en) 2009-06-08 2009-06-08 Information processing device

Country Status (1)

Country Link
JP (1) JP2010282551A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012198804A (en) * 2011-03-22 2012-10-18 Denso Corp Design support device and design support program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004355233A (en) * 2003-05-28 2004-12-16 Nec Corp Fault-tolerant system, program parallel execution method, fault detector for fault-tolerant system, and program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004355233A (en) * 2003-05-28 2004-12-16 Nec Corp Fault-tolerant system, program parallel execution method, fault detector for fault-tolerant system, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012198804A (en) * 2011-03-22 2012-10-18 Denso Corp Design support device and design support program

Similar Documents

Publication Publication Date Title
US8108733B2 (en) Monitoring distributed software health and membership in a compute cluster
CN103262045B (en) Microprocessor system having fault-tolerant architecture
JP6599054B2 (en) Abnormality determination device, abnormality determination method, and abnormality determination program
WO2011114493A1 (en) Microcomputer cross-monitoring system and microcomputer cross-monitoring method
US7721083B2 (en) CPU runaway determination circuit and CPU runaway determination method
KR20060067927A (en) How to monitor program execution on a microcomputer
CN113968236A (en) Vehicle fault processing method and device and vehicle
KR20100024946A (en) Method for the operation of a microcontroller and an execution unit and a microcontroller and an execution unit
CN113993752A (en) Electronic control unit and program
JP2010282551A (en) Information processing device
CN117149482A (en) A method and device, electronic equipment, and medium for detecting thread status
US20080201618A1 (en) Method for Running a Computer Program on a Computer System
WO2020012815A1 (en) Brake switch diagnostic method and module
JP5533777B2 (en) Program group
CN111124821A (en) Driving software detection method and device and storage medium
JP2016126692A (en) Electronic control device
US10514970B2 (en) Method of ensuring operation of calculator
JP7070206B2 (en) In-vehicle control device
JP6624005B2 (en) Mutual monitoring system
JP4983806B2 (en) System monitoring apparatus and monitoring method using dual timer
JP7200883B2 (en) electronic controller
JP4708088B2 (en) Failure recovery method and microcomputer
US12038828B2 (en) Distributed debugging environment for a continuous integration pipeline
CN117632163A (en) Static code analysis method and system based on containerized deployment
JP2006123831A (en) Electronic control device for vehicle and diagnostic processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130522

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130528

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20131008