JP2018112977A - Microcomputer - Google Patents

Microcomputer Download PDF

Info

Publication number
JP2018112977A
JP2018112977A JP2017004271A JP2017004271A JP2018112977A JP 2018112977 A JP2018112977 A JP 2018112977A JP 2017004271 A JP2017004271 A JP 2017004271A JP 2017004271 A JP2017004271 A JP 2017004271A JP 2018112977 A JP2018112977 A JP 2018112977A
Authority
JP
Japan
Prior art keywords
core
cores
abnormality
reset
operation mode
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.)
Granted
Application number
JP2017004271A
Other languages
Japanese (ja)
Other versions
JP6729407B2 (en
Inventor
山内 直樹
Naoki Yamauchi
直樹 山内
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2017004271A priority Critical patent/JP6729407B2/en
Publication of JP2018112977A publication Critical patent/JP2018112977A/en
Application granted granted Critical
Publication of JP6729407B2 publication Critical patent/JP6729407B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a microcomputer capable of allocating arithmetic processing which has been executed by an abnormality occurrence core before resetting to a normal core, and suppressing the arithmetic processing which becomes unexecutable after resetting to the necessary minimum.SOLUTION: A microcomputer comprises a plurality of cores 21, 22. A core abnormality detection part 31 of each of the plurality of cores specifies an abnormality occurrence core. An operation mode determination part 33 of each of the plurality of cores determines an operation mode on the basis of the specified abnormality occurrence core. A resetting part 34 resets the plurality of cores when the abnormality occurrence core is specified. A startup core control part 35 starts up the core other than the abnormality occurrence core between the plurality of cores after the plurality of cores are reset. An execution processing determination function 45 of each of the plurality of cores sets processing to be executed by the core after the core other than the abnormality occurrence core is started up for each startup core on the basis of the determined operation mode.SELECTED DRAWING: Figure 2

Description

本開示は、コアを複数備えるマイクロコンピュータに関する。   The present disclosure relates to a microcomputer including a plurality of cores.

特許文献1のように、複数のコアを備え、複数の処理を各コアに割り当てることにより、複数の処理を並列に実行するように構成されたマイクロコンピュータが知られている。
従来、複数のコアを備えたマルチコアマイコンにおいて特定のコアで異常が発生した場合には、マイコン全体にリセットをかけて、特定のコアの復帰を試みていた。
As disclosed in Patent Document 1, there is known a microcomputer that includes a plurality of cores and is configured to execute a plurality of processes in parallel by assigning a plurality of processes to each core.
Conventionally, when an abnormality occurs in a specific core in a multi-core microcomputer having a plurality of cores, an attempt is made to reset the entire microcomputer to restore the specific core.

特開2008−123439号公報JP 2008-123439 A

しかし、リセットをかけても特定のコアでの異常が継続する場合に、この特定のコアで発生した異常のために、その他のコアにおける処理が実行できなくなるおそれがあった。
本開示は、特定のコアで発生した異常が他のコアに及ぼす影響を抑制することを目的とする。
However, when an abnormality in a specific core continues even after resetting, there is a possibility that processing in other cores cannot be executed due to the abnormality that occurred in the specific core.
The present disclosure is intended to suppress the influence of an abnormality occurring in a specific core on other cores.

本開示の一態様は、1つ又は複数の演算処理を実行するコア(21,22,23)を複数備えるマイクロコンピュータ(3)であって、異常特定部(31)と、モード決定部(33)と、リセット部(34)と、起動部(35)と、処理設定部(45)とを備える。   One aspect of the present disclosure is a microcomputer (3) including a plurality of cores (21, 22, 23) that execute one or a plurality of arithmetic processes, and includes an abnormality identification unit (31) and a mode determination unit (33). ), A reset unit (34), an activation unit (35), and a process setting unit (45).

異常特定部は、複数のコアのうち、異常が発生しているコアである異常発生コアを特定することができるように構成される。
モード決定部は、異常特定部により特定された異常発生コアに基づいて、異常発生コア以外のコアが演算処理を実行するための動作モードを決定するように構成される。
The abnormality specifying unit is configured to be able to specify an abnormality occurring core that is a core in which an abnormality has occurred among the plurality of cores.
The mode determination unit is configured to determine an operation mode for executing a calculation process by a core other than the abnormality occurrence core based on the abnormality occurrence core identified by the abnormality identification unit.

リセット部は、異常特定部が異常発生コアを特定した場合に、複数のコアをリセットさせるように構成される。
起動部は、複数のコアがリセットされた後に、複数のコアのうち、異常特定部により特定された異常発生コア以外のコアを起動させるように構成される。
The reset unit is configured to reset a plurality of cores when the abnormality specifying unit specifies an abnormal core.
The activation unit is configured to activate a core other than the abnormality occurring core identified by the abnormality identification unit among the plurality of cores after the plurality of cores are reset.

処理設定部は、モード決定部によって決定された動作モードに基づいて、起動したコア毎に、異常発生コア以外のコアが起動した後にコアに実行させる1つ又は複数の演算処理を設定するように構成される。   The process setting unit sets, for each activated core, one or a plurality of arithmetic processes to be executed by the core after activation of a core other than the abnormal core based on the operation mode determined by the mode determination unit. Composed.

このように構成された本開示のマイクロコンピュータは、異常発生コアを特定した場合に複数のコアがリセットされるため、少なくとも1つのコアで異常が発生したときにおける異常の影響を解消することができる。また、本開示のマイクロコンピュータは、複数のコアのうち異常発生コア以外のコアを起動させるため、リセット後に、異常発生コアに起因した異常が他のコアに及ぼす影響を抑制することができる。そして、本開示のマイクロコンピュータは、動作モードに基づいて、起動したコア毎に実行させる演算処理を設定する。このため、本開示のマイクロコンピュータは、リセット前に異常発生コアが実行していた演算処理を正常なコアに割り当てることが可能となり、リセット後に実行できなくなる演算処理を必要最低限に抑制することができる。   In the microcomputer according to the present disclosure configured as described above, when an abnormality occurrence core is specified, a plurality of cores are reset. Therefore, when an abnormality occurs in at least one core, the influence of the abnormality can be eliminated. . Moreover, since the microcomputer of this indication starts cores other than a malfunctioning core among several cores, it can suppress the influence which the malfunction resulting from a malfunctioning core has on another core after reset. And the microcomputer of this indication sets the arithmetic processing performed for every started core based on an operation mode. For this reason, the microcomputer according to the present disclosure can assign the arithmetic processing executed by the abnormal core before the reset to a normal core, and can suppress the arithmetic processing that cannot be executed after the reset to the minimum necessary. it can.

なお、この欄及び特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本開示の技術的範囲を限定するものではない。   Note that the reference numerals in parentheses described in this column and in the claims indicate the correspondence with the specific means described in the embodiment described later as one aspect, and the technical scope of the present disclosure It is not limited.

ECU1の構成を示すブロック図である。2 is a block diagram showing a configuration of an ECU 1. FIG. コア21,22の構成を示すブロック図である。3 is a block diagram showing a configuration of cores 21 and 22. FIG. 異常対応処理を示すフローチャートである。It is a flowchart which shows abnormality handling processing. 初期化処理を示すフローチャートである。It is a flowchart which shows the initialization process. 実行処理テーブルを示す図である。It is a figure which shows an execution process table. 正常時とフェールセーフ時において、実行タイミングが到来する毎にコア21,22,23が実行する処理を示す図である。It is a figure which shows the process which the cores 21, 22, and 23 perform whenever the execution timing comes in the normal time and the fail safe time. 異常コアの処理を他コアで実行するための方法を説明する図である。It is a figure explaining the method for performing the process of an abnormal core by another core. コア21〜23の動作を示す第1のシーケンス図である。FIG. 6 is a first sequence diagram showing operations of cores 21 to 23. コア21〜23の動作を示す第2のシーケンス図である。It is a 2nd sequence diagram which shows operation | movement of the cores 21-23.

以下に本開示の実施形態を図面とともに説明する。
本実施形態の電子制御装置1(以下、ECU1)は、車両に搭載され、図1に示すように、マイクロコンピュータ3(以下、マイコン3)、入力回路4、出力回路5およびリセット回路6を備えている。ECUは、Electronic Control Unitの略である。
Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
An electronic control device 1 (hereinafter referred to as ECU 1) according to the present embodiment is mounted on a vehicle, and includes a microcomputer 3 (hereinafter referred to as microcomputer 3), an input circuit 4, an output circuit 5, and a reset circuit 6, as shown in FIG. ing. ECU is an abbreviation for Electronic Control Unit.

そしてマイコン3には、図示しないクランク角センサ、エアフロメータ、スロットル開度センサ、吸気圧センサおよび空燃比センサ等からの信号が、入力回路4を介して入力される。   Signals from a crank angle sensor, an air flow meter, a throttle opening sensor, an intake pressure sensor, an air-fuel ratio sensor, and the like (not shown) are input to the microcomputer 3 via the input circuit 4.

クランク角センサは、エンジンのクランク軸の回転角を検出する。エアフロメータは、吸気管を通ってエンジンに供給される空気量を検出する。スロットル開度センサは、スロットルバルブの開度を検出する。吸気圧センサは、吸気管内の圧力を検出する。空燃比センサは、排ガス中の酸素濃度からエンジンに供給された燃料混合気の空燃比を検出する。   The crank angle sensor detects the rotation angle of the crankshaft of the engine. The air flow meter detects the amount of air supplied to the engine through the intake pipe. The throttle opening sensor detects the opening of the throttle valve. The intake pressure sensor detects the pressure in the intake pipe. The air-fuel ratio sensor detects the air-fuel ratio of the fuel mixture supplied to the engine from the oxygen concentration in the exhaust gas.

そしてマイコン3は、入力回路4を介して入力される上記各信号に基づいてエンジンの状態を検出するとともに、その検出結果に基づいて、スロットルバルブの開度を変えるスロットルモータ、各気筒内の点火プラグ、および各気筒内のインジェクタなどの各種アクチュエータを駆動するための駆動信号を出力回路5を介して出力してエンジンを作動させる。   The microcomputer 3 detects the state of the engine based on the signals input via the input circuit 4, and based on the detection result, the throttle motor that changes the opening of the throttle valve, and the ignition in each cylinder. A drive signal for driving various actuators such as a plug and an injector in each cylinder is output via the output circuit 5 to operate the engine.

リセット回路6は、マイコン3へリセット信号を出力することにより、マイコン3全体にリセットをかける。
またマイコン3は、CPU11、ROM12、RAM13、フラッシュROM14、I/O15及びこれらの構成を接続するバスラインなどから構成され、ROM12に記憶されたプログラムに基づいて、エンジンを制御するための各種制御処理を実行する。なお、フラッシュROM14は、記憶内容を書き換え可能な不揮発性メモリである。
The reset circuit 6 resets the entire microcomputer 3 by outputting a reset signal to the microcomputer 3.
The microcomputer 3 includes a CPU 11, a ROM 12, a RAM 13, a flash ROM 14, an I / O 15, a bus line connecting these components, and the like, and various control processes for controlling the engine based on a program stored in the ROM 12. Execute. The flash ROM 14 is a non-volatile memory that can rewrite stored contents.

マイクロコンピュータの各種機能は、CPU11が非遷移的実体的記録媒体に格納されたプログラムを実行することにより実現される。この例では、ROM12が、プログラムを格納した非遷移的実体的記録媒体に該当する。また、このプログラムの実行により、プログラムに対応する方法が実行される。   Various functions of the microcomputer are realized by the CPU 11 executing a program stored in a non-transitional physical recording medium. In this example, the ROM 12 corresponds to a non-transitional tangible recording medium that stores a program. Further, by executing this program, a method corresponding to the program is executed.

さらにCPU11は、プログラムを実行するための演算ユニットおよびレジスタなどを含むCPUコア(以下、コア)21,22,23を備える。コア21,22,23は、エンジンを制御するための各種制御処理を分散して実行する。そして、コア21,22,23は互いにデータ通信可能に接続されている。   Further, the CPU 11 includes CPU cores (hereinafter referred to as cores) 21, 22 and 23 including an arithmetic unit for executing a program, a register, and the like. The cores 21, 22, and 23 execute various control processes for controlling the engine in a distributed manner. The cores 21, 22, and 23 are connected to each other so that data communication is possible.

またCPU11は、レジスタ24と、クロック供給回路25を備える。レジスタ24は、コア21,22,23からアクセス可能に構成されている。クロック供給回路25は、図示しない発振回路からマイコン3へ入力されたクロック信号をコア21,22,23へ供給する。クロック供給回路25は、レジスタ24に記憶されている後述の起動コア情報に基づいて、クロック信号を供給するコアを選択することが可能に構成されている。   The CPU 11 also includes a register 24 and a clock supply circuit 25. The register 24 is configured to be accessible from the cores 21, 22, and 23. The clock supply circuit 25 supplies a clock signal input to the microcomputer 3 from an oscillation circuit (not shown) to the cores 21, 22 and 23. The clock supply circuit 25 is configured to be able to select a core that supplies a clock signal, based on later-described startup core information stored in the register 24.

コア21,22は、図2に示すように、コア異常検出部31、コア異常管理部32、動作モード判定部33、リセット部34、起動コア制御部35および処理実行部36を備える。なお、図2に示していないが、コア23は、コア21,22と同様に、コア異常検出部31、コア異常管理部32、動作モード判定部33、リセット部34、起動コア制御部35および処理実行部36を備える。   As shown in FIG. 2, the cores 21 and 22 include a core abnormality detection unit 31, a core abnormality management unit 32, an operation mode determination unit 33, a reset unit 34, a startup core control unit 35, and a process execution unit 36. Although not shown in FIG. 2, the core 23 is similar to the cores 21 and 22, the core abnormality detection unit 31, the core abnormality management unit 32, the operation mode determination unit 33, the reset unit 34, the activation core control unit 35, and A processing execution unit 36 is provided.

コア異常検出部31は、自コア異常検出機能41とコア相互監視機能42を備える。自コア異常検出機能41は、例えば、WDT割り込み及び例外割り込みにより、コア異常検出部31を搭載しているコア(以下、自コア)の異常を検出する。WDTは、Watch Dog Timerの略である。例外割り込みとしては、例えば、未定義命令例外、特権命令例外、アクセス例外および浮動小数例外などが挙げられる。またコア異常検出部31は、ロックステップ動作により異常を検出するようにしてもよい。以下、コア21,22,23のうち、自コア以外のコアを他コアという。   The core abnormality detection unit 31 includes a self-core abnormality detection function 41 and a core mutual monitoring function 42. The own core abnormality detection function 41 detects an abnormality of a core (hereinafter referred to as the own core) in which the core abnormality detection unit 31 is mounted, for example, by a WDT interrupt and an exception interrupt. WDT is an abbreviation for Watch Dog Timer. Examples of exception interrupts include undefined instruction exceptions, privileged instruction exceptions, access exceptions, and floating-point exceptions. The core abnormality detection unit 31 may detect an abnormality by a lock step operation. Hereinafter, of the cores 21, 22 and 23, cores other than the own core are referred to as other cores.

コア相互監視機能42は、コア21,22,23の間で相互に異常を監視する。具体的には、監視される側のコア相互監視機能42は、監視用のテスト演算を実行する。監視する側のコア相互監視機能42は、定期的に、監視される側のコア相互監視機能42が実行したテスト演算の結果を確認し、この演算結果が正しいか否かを判断する。なお、図2は、コア21のコア相互監視機能42とコア22のコア相互監視機能42との間で相互監視している状態を示している。しかし、コア21のコア相互監視機能42とコア22のコア相互監視機能42はそれぞれ、コア23のコア相互監視機能42との間で相互監視している。図2の矢印Y1は、コア21のコア相互監視機能42が、コア22のコア相互監視機能42を監視していることを示している。図2の矢印Y2は、コア22のコア相互監視機能42が、コア21のコア相互監視機能42を監視していることを示している。   The core mutual monitoring function 42 monitors the abnormality between the cores 21, 22, and 23. Specifically, the monitored core mutual monitoring function 42 executes a test operation for monitoring. The monitoring core mutual monitoring function 42 periodically checks the result of the test calculation executed by the monitored core mutual monitoring function 42 and determines whether or not the calculation result is correct. FIG. 2 shows a state in which mutual monitoring is performed between the core mutual monitoring function 42 of the core 21 and the core mutual monitoring function 42 of the core 22. However, the core mutual monitoring function 42 of the core 21 and the core mutual monitoring function 42 of the core 22 are mutually monitored with the core mutual monitoring function 42 of the core 23. The arrow Y1 in FIG. 2 indicates that the core mutual monitoring function 42 of the core 21 is monitoring the core mutual monitoring function 42 of the core 22. An arrow Y <b> 2 in FIG. 2 indicates that the core mutual monitoring function 42 of the core 22 is monitoring the core mutual monitoring function 42 of the core 21.

コア異常検出部31は、自コア異常検出機能41またはコア相互監視機能42がコアの異常を検出すると、異常が発生しているコア(以下、異常発生コア)を示す異常コア情報を、自コアのコア異常管理部32へ出力する。図2の矢印Y3は、コア21のコア異常検出部31が異常コア情報をコア21のコア異常管理部32へ出力することを示している。図2の矢印Y4は、コア22のコア異常検出部31が異常コア情報をコア22のコア異常管理部32へ出力することを示している。   When the self-core abnormality detection function 41 or the core mutual monitoring function 42 detects a core abnormality, the core abnormality detection unit 31 displays abnormal core information indicating a core in which an abnormality has occurred (hereinafter referred to as an abnormal core). To the core abnormality management unit 32. An arrow Y <b> 3 in FIG. 2 indicates that the core abnormality detection unit 31 of the core 21 outputs abnormal core information to the core abnormality management unit 32 of the core 21. 2 indicates that the core abnormality detection unit 31 of the core 22 outputs abnormal core information to the core abnormality management unit 32 of the core 22.

コア異常管理部32は、異常通知受信機能43を備える。異常通知受信機能43は、コア異常検出部31から異常コア情報が入力されると、後述するリセット前通知を他コアの異常通知受信機能43へ送信する。また異常通知受信機能43は、コア異常検出部31から異常コア情報が入力されると、異常コア情報を自コアの動作モード判定部33へ出力する。また異常通知受信機能43は、他コアからのリセット前通知を受信する。図2の矢印Y5は、コア21の異常通知受信機能43が、コア22の異常通知受信機能43へリセット前通知を送信することを示している。図2の矢印Y6は、コア22の異常通知受信機能43が、コア21の異常通知受信機能43へリセット前通知を送信することを示している。図2の矢印Y7は、コア21の異常通知受信機能43が、コア21の動作モード判定部33へ異常コア情報を送信することを示している。図2の矢印Y8は、コア22の異常通知受信機能43が、コア22の動作モード判定部33へ異常コア情報を送信することを示している。   The core abnormality management unit 32 includes an abnormality notification reception function 43. When abnormality core information is input from the core abnormality detection unit 31, the abnormality notification reception function 43 transmits a pre-reset notification described later to the abnormality notification reception function 43 of the other core. Further, when the abnormal core information is input from the core abnormality detection unit 31, the abnormality notification reception function 43 outputs the abnormal core information to the operation mode determination unit 33 of the own core. The abnormality notification receiving function 43 receives a pre-reset notification from another core. An arrow Y5 in FIG. 2 indicates that the abnormality notification reception function 43 of the core 21 transmits a pre-reset notification to the abnormality notification reception function 43 of the core 22. An arrow Y6 in FIG. 2 indicates that the abnormality notification reception function 43 of the core 22 transmits a pre-reset notification to the abnormality notification reception function 43 of the core 21. An arrow Y7 in FIG. 2 indicates that the abnormality notification reception function 43 of the core 21 transmits abnormal core information to the operation mode determination unit 33 of the core 21. An arrow Y8 in FIG. 2 indicates that the abnormality notification reception function 43 of the core 22 transmits abnormal core information to the operation mode determination unit 33 of the core 22.

動作モード判定部33は、動作モード判定機能44を備える。動作モード判定機能44は、コア異常管理部32から異常コア情報が入力されると、異常コア情報が示す異常発生コアに基づいて、リセット後の動作モードと、リセット後に起動させるコアとを決定する。リセット後に起動させるコアは、異常コア情報が示す異常発生コア以外のコアである。リセット後の動作モードを決定する処理についての詳細は後述する。   The operation mode determination unit 33 includes an operation mode determination function 44. When the abnormal core information is input from the core abnormality management unit 32, the operation mode determination function 44 determines the operation mode after reset and the core to be activated after reset based on the abnormal core indicated by the abnormal core information. . The core that is activated after the reset is a core other than the abnormal core indicated by the abnormal core information. Details of the process for determining the operation mode after reset will be described later.

そして動作モード判定部33は、決定した動作モードを示す動作モード情報を、フラッシュROM14に設けられている動作モード記憶部51に記憶する。図2の矢印Y9は、コア21の動作モード判定部33が、動作モード情報を動作モード記憶部51に記憶することを示している。図2の矢印Y10は、コア22の動作モード判定部33が、動作モード情報を動作モード記憶部51に記憶することを示している。   The operation mode determination unit 33 stores operation mode information indicating the determined operation mode in the operation mode storage unit 51 provided in the flash ROM 14. An arrow Y9 in FIG. 2 indicates that the operation mode determination unit 33 of the core 21 stores the operation mode information in the operation mode storage unit 51. An arrow Y10 in FIG. 2 indicates that the operation mode determination unit 33 of the core 22 stores the operation mode information in the operation mode storage unit 51.

また動作モード判定部33は、コア異常管理部32から異常コア情報が入力されると、リセットされる前に予め設定されたリセット前処理を実行する。リセット前処理としては、例えば、コアの起動後に必要な情報を保存したり、コアのポートを安全側に設定したりすることが挙げられる。リセット前処理が完了した後に、自コアのリセット部34へリセット要求を出力する。図2の矢印Y11は、コア21の動作モード判定部33が、コア21のリセット部34へリセット要求を出力することを示している。図2の矢印Y12は、コア22の動作モード判定部33が、コア22のリセット部34へリセット要求を出力することを示している。   In addition, when the abnormal core information is input from the core abnormality management unit 32, the operation mode determination unit 33 performs a pre-reset process that is set in advance before being reset. Examples of the pre-reset process include saving necessary information after starting the core and setting the core port to the safe side. After the pre-reset process is completed, a reset request is output to the reset unit 34 of the own core. An arrow Y11 in FIG. 2 indicates that the operation mode determination unit 33 of the core 21 outputs a reset request to the reset unit 34 of the core 21. The arrow Y12 in FIG. 2 indicates that the operation mode determination unit 33 of the core 22 outputs a reset request to the reset unit 34 of the core 22.

リセット部34は、リセット要求が入力されると、リセット回路6へリセット要求を出力する。これにより、リセット回路6はマイコン3全体にリセットをかける。
また動作モード判定部33は、リセット後に起動させるコアを決定すると、リセット後に起動させるコアを示す起動コア情報を起動コア制御部35へ出力する。図2の矢印Y13は、コア21の動作モード判定部33が、コア21の起動コア制御部35へ起動コア情報を出力することを示している。図2の矢印Y14は、コア22の動作モード判定部33が、コア22の起動コア制御部35へ起動コア情報を出力することを示している。
The reset unit 34 outputs a reset request to the reset circuit 6 when a reset request is input. As a result, the reset circuit 6 resets the entire microcomputer 3.
When the operation mode determination unit 33 determines a core to be activated after reset, the operation mode determination unit 33 outputs activation core information indicating the core to be activated after reset to the activation core control unit 35. 2 indicates that the operation mode determination unit 33 of the core 21 outputs the activation core information to the activation core control unit 35 of the core 21. An arrow Y14 in FIG. 2 indicates that the operation mode determination unit 33 of the core 22 outputs the activation core information to the activation core control unit 35 of the core 22.

起動コア制御部35は、起動コア情報が入力されると、起動コア情報をレジスタ24に記憶させる。これにより、クロック供給回路25は、リセット後に、レジスタ24に記憶されている起動コア情報を参照し、クロック信号を供給するコアを選択する。具体的には、起動コア情報がコア21,22を示す場合には、クロック供給回路25は、コア21,22へクロック信号を供給し、コア23へクロック信号を供給しない。これにより、リセット後に、コア21,22は起動し、コア23は起動しない。同様に、起動コア情報がコア21,23を示す場合には、クロック供給回路25は、コア21,23へクロック信号を供給し、コア22へクロック信号を供給しない。また、起動コア情報がコア22,23を示す場合には、クロック供給回路25は、コア22,23へクロック信号を供給し、コア21へクロック信号を供給しない。   When the activation core information is input, the activation core control unit 35 stores the activation core information in the register 24. Thereby, the clock supply circuit 25 refers to the activation core information stored in the register 24 after the reset, and selects the core that supplies the clock signal. Specifically, when the activation core information indicates the cores 21 and 22, the clock supply circuit 25 supplies a clock signal to the cores 21 and 22 and does not supply a clock signal to the core 23. Thereby, after resetting, the cores 21 and 22 are activated, and the core 23 is not activated. Similarly, when the activation core information indicates the cores 21 and 23, the clock supply circuit 25 supplies a clock signal to the cores 21 and 23 and does not supply a clock signal to the core 22. When the activation core information indicates the cores 22 and 23, the clock supply circuit 25 supplies a clock signal to the cores 22 and 23 and does not supply a clock signal to the core 21.

処理実行部36は、実行処理判定機能45および処理実行機能46を備える。
処理実行部36は、動作モード記憶部51から動作モード情報を取得する。図2の矢印Y15は、コア21の処理実行部36が、動作モード記憶部51から動作モード情報を取得することを示している。図2の矢印Y16は、コア22の処理実行部36が、動作モード記憶部51から動作モード情報を取得することを示している。
The process execution unit 36 includes an execution process determination function 45 and a process execution function 46.
The process execution unit 36 acquires operation mode information from the operation mode storage unit 51. An arrow Y15 in FIG. 2 indicates that the process execution unit 36 of the core 21 acquires the operation mode information from the operation mode storage unit 51. An arrow Y <b> 16 in FIG. 2 indicates that the processing execution unit 36 of the core 22 acquires operation mode information from the operation mode storage unit 51.

実行処理判定機能45は、処理実行部36により取得された動作モード情報に基づいて動作モードを決定し、決定した動作モードに基づいて、処理実行機能46が実行する処理を設定する。図2の矢印Y17は、コア21の実行処理判定機能45が、コア21の処理実行機能46が実行する処理を設定することを示している。図2の矢印Y18は、コア22の実行処理判定機能45が、コア22の処理実行機能46が実行する処理を設定することを示している。   The execution process determination function 45 determines an operation mode based on the operation mode information acquired by the process execution unit 36, and sets a process to be executed by the process execution function 46 based on the determined operation mode. An arrow Y17 in FIG. 2 indicates that the execution process determination function 45 of the core 21 sets a process to be executed by the process execution function 46 of the core 21. An arrow Y18 in FIG. 2 indicates that the execution process determination function 45 of the core 22 sets a process to be executed by the process execution function 46 of the core 22.

処理実行機能46は、実行処理判定機能45により設定された動作モードで、処理を実行する。
コア21,22,23を構成するこれらの要素を実現する手法はソフトウェアに限るものではなく、その一部又は全部の要素について、一つあるいは複数のハードウェアを用いて実現してもよい。例えば、上記機能がハードウェアである電子回路によって実現される場合、その電子回路は多数の論理回路を含むデジタル回路、又はアナログ回路、あるいはこれらの組合せによって実現してもよい。
The process execution function 46 executes the process in the operation mode set by the execution process determination function 45.
The technique for realizing these elements constituting the cores 21, 22, and 23 is not limited to software, and some or all of the elements may be realized using one or a plurality of hardware. For example, when the above function is realized by an electronic circuit that is hardware, the electronic circuit may be realized by a digital circuit including a large number of logic circuits, an analog circuit, or a combination thereof.

次に、コア21,22,23が実行する異常対応処理の手順を説明する。異常対応処理は、コア21,22,23が起動した後に開始される処理である。
この異常対応処理が実行されると、コア21,22,23は、図3に示すように、まずS10にて、自コア異常検出機能41とコア相互監視機能42により、コアの異常を検出する。そしてS20にて、S10での検出結果に基づいて、異常発生コアが存在するか否かを判断する。ここで、異常発生コアが存在していない場合には、S10に移行する。一方、異常発生コアが存在する場合には、S30にて、異常発生コアに基づいて、リセット後の動作モードを決定する。具体的には、異常発生コアがコア23である場合には動作モードは第1フェールセーフモード、異常発生コアがコア22である場合には動作モードは第2フェールセーフモード、異常発生コアがコア21である場合には動作モードは第3フェールセーフモードであると決定する。以下、第1フェールセーフモード、第2フェールセーフモードおよび第3フェールセーフモードをまとめて単にフェールセーフモードともいう。
Next, the procedure of the abnormality handling process executed by the cores 21, 22, and 23 will be described. The abnormality handling process is a process that is started after the cores 21, 22, and 23 are activated.
When this abnormality handling process is executed, as shown in FIG. 3, the cores 21, 22, and 23 first detect a core abnormality by using the own core abnormality detection function 41 and the core mutual monitoring function 42 in S10. . Then, in S20, it is determined whether or not an abnormal core is present based on the detection result in S10. If no abnormal core is present, the process proceeds to S10. On the other hand, if there is an abnormal core, the operation mode after reset is determined based on the abnormal core in S30. Specifically, when the abnormality occurrence core is the core 23, the operation mode is the first failsafe mode, and when the abnormality occurrence core is the core 22, the operation mode is the second failsafe mode, and the abnormality occurrence core is the core 21. In some cases, the operating mode is determined to be the third failsafe mode. Hereinafter, the first fail-safe mode, the second fail-safe mode, and the third fail-safe mode are collectively referred to simply as a fail-safe mode.

そしてS40にて、S30で決定した動作モードを示す動作モード情報を動作モード記憶部51に記憶する。さらにS50にて、異常発生コアに基づいて、リセット後に起動させるコア(以下、起動コア)を決定する。具体的には、異常発生コアがコア23である場合には起動コアはコア21,22であり、異常発生コアがコア22である場合には起動コアはコア21,23であり、異常発生コアがコア21である場合には起動コアはコア22,23であると決定する。   In S40, operation mode information indicating the operation mode determined in S30 is stored in the operation mode storage unit 51. Further, in S50, a core to be activated after reset (hereinafter referred to as activation core) is determined based on the abnormality occurrence core. Specifically, when the abnormality occurrence core is the core 23, the activation core is the cores 21 and 22, and when the abnormality occurrence core is the core 22, the activation cores are the cores 21 and 23. Is the core 21, the activation core is determined to be the cores 22 and 23.

そしてS60にて、S50で決定した起動コアを示す起動コア情報をレジスタ24に記憶する。次にS70にて、異常発生コアを除く他コアへリセット前通知を送信する。これにより、リセット前通知を受信したコアは、リセット前処理を実行する。   In S60, activation core information indicating the activation core determined in S50 is stored in the register 24. Next, in S70, a pre-reset notification is transmitted to the other cores except the abnormal core. Thus, the core that has received the pre-reset notification executes pre-reset processing.

さらにS80にて、上述のリセット前処理を実行する。そして、リセット前処理が終了すると、S90にて、リセット回路6へリセット要求を出力し、異常対応処理を終了する。   Further, in S80, the above-described reset pre-processing is executed. When the pre-reset process ends, a reset request is output to the reset circuit 6 in S90, and the abnormality handling process ends.

次に、コア21,22,23が実行する初期化処理の手順を説明する。初期化処理は、コア21,22,23が起動した直後に1回のみ実行される処理である。
この初期化処理が実行されると、コア21,22,23は、図4に示すように、まずS210にて、動作モード記憶部51から動作モード情報を取得する。そしてS220にて、動作モード記憶部51に動作モード情報が記憶されていたか否かを判断する。ここで、動作モード情報が記憶されていなかった場合には、S230にて、実行処理テーブルに基づいて、後述する正常モードで実行する処理を設定する。
Next, the procedure of initialization processing executed by the cores 21, 22, and 23 will be described. The initialization process is a process that is executed only once immediately after the cores 21, 22, and 23 are activated.
When this initialization process is executed, the cores 21, 22, and 23 obtain operation mode information from the operation mode storage unit 51 in S 210 as shown in FIG. In S220, it is determined whether or not the operation mode information is stored in operation mode storage unit 51. Here, when the operation mode information is not stored, in S230, a process to be executed in a normal mode to be described later is set based on the execution process table.

実行処理テーブルは、ROM12に記憶されており、コア21,22,23により実行される処理が動作モード毎に設定されている。
例えば図5に示すように、実行処理テーブルは、正常モードでは、コア21は、処理A1,A2,A3,A4,A5,A6を順次実行し、コア22は、処理B1,B2,B3,B4,B5を順次実行し、コア23は、処理C1,C2,C3,C4,C5を順次実行するように設定されている。
The execution process table is stored in the ROM 12, and processes executed by the cores 21, 22, and 23 are set for each operation mode.
For example, as shown in FIG. 5, in the execution process table, in the normal mode, the core 21 sequentially executes the processes A1, A2, A3, A4, A5, A6, and the core 22 performs the processes B1, B2, B3, B4. , B5 are sequentially executed, and the core 23 is set to sequentially execute the processes C1, C2, C3, C4, and C5.

また実行処理テーブルは、第1フェールセーフモードでは、コア21は、処理A1,C2,A3,A5,A6を順次実行し、コア22は、処理B1,C4,B4を順次実行し、コア23は、処理を実行しないように設定されている。   In the execution process table, in the first failsafe mode, the core 21 sequentially executes the processes A1, C2, A3, A5, and A6, the core 22 sequentially executes the processes B1, C4, and B4, and the core 23 It is set not to execute processing.

また実行処理テーブルは、第2フェールセーフモードでは、コア21は、処理A1,B2,A3,A5,A6を順次実行し、コア23は、処理C2,B4,C4を順次実行し、コア22は、処理を実行しないように設定されている。   The execution processing table indicates that in the second fail-safe mode, the core 21 sequentially executes the processes A1, B2, A3, A5, and A6, the core 23 sequentially executes the processes C2, B4, and C4, and the core 22 It is set not to execute processing.

また実行処理テーブルは、第3フェールセーフモードでは、コア22は、処理A1,B2,B4,A6を順次実行し、コア23は、処理C2,A3,A5,C4を順次実行し、コア21は、処理を実行しないように設定されている。   In the third fail-safe mode, the core 22 sequentially executes processes A1, B2, B4, and A6, the core 23 sequentially executes processes C2, A3, A5, and C4, and the core 21 It is set not to execute processing.

従って、S230では、例えば、コア21は、処理A1,A2,A3,A4,A5,A6を順次実行するように設定され、コア22は、処理B1,B2,B3,B4,B5を順次実行するように設定され、コア23は、処理C1,C2,C3,C4,C5を順次実行するように設定される。   Accordingly, in S230, for example, the core 21 is set to sequentially execute the processes A1, A2, A3, A4, A5, and A6, and the core 22 sequentially executes the processes B1, B2, B3, B4, and B5. Thus, the core 23 is set to sequentially execute the processes C1, C2, C3, C4, and C5.

なお、図5に示す実行処理テーブルは、コア21,22,23により実行される処理の一部を示している。例えば、コア21,22,23は、少なくとも、角度同期タスクと時間同期タスクを実行する。角度同期タスクは、予め設定された角度イベント生成条件が成立する毎に実行される。角度イベント生成条件は、例えば、クランク軸が予め設定されたイベント生成角度(例えば、30°CA)回転することである。時間同期タスクは、予め設定された時間イベント生成条件が成立する毎に実行される。時間イベント生成条件は、例えば、予め設定されたイベント生成時間(例えば、1ms)が経過することである。   The execution process table shown in FIG. 5 shows a part of the processes executed by the cores 21, 22, and 23. For example, the cores 21, 22, and 23 execute at least an angle synchronization task and a time synchronization task. The angle synchronization task is executed every time a preset angle event generation condition is satisfied. The angle event generation condition is, for example, that the crankshaft rotates in a preset event generation angle (for example, 30 ° CA). The time synchronization task is executed every time a preset time event generation condition is satisfied. The time event generation condition is, for example, that a preset event generation time (for example, 1 ms) elapses.

そして、実行処理テーブルは、少なくとも、角度同期タスクで実行される処理と、時間同期タスクで実行される処理が設定されている。図5に示す実行処理テーブルは、例えば、時間同期タスクで実行される処理を示している。   In the execution process table, at least a process executed in the angle synchronization task and a process executed in the time synchronization task are set. The execution process table illustrated in FIG. 5 indicates, for example, processes executed in the time synchronization task.

一方、図4に示すように、S220にて、動作モード記憶部51に動作モード情報が記憶されていた場合には、S240にて、動作モード情報と実行処理テーブルに基づいて、第1フェールセーフモード、第2フェールセーフモードまたは第3フェールセーフモードで実行する処理を設定する。例えば、動作モード情報により示される動作モードが第2フェールセーフモードである場合には、コア21は、処理A1,B2,A3,A5,A6を順次実行するように設定され、コア23は、処理C2,B4,C4を順次実行するように設定される。   On the other hand, as shown in FIG. 4, when the operation mode information is stored in the operation mode storage unit 51 in S220, the first failsafe mode is determined in S240 based on the operation mode information and the execution processing table. The process to be executed in the second failsafe mode or the third failsafe mode is set. For example, when the operation mode indicated by the operation mode information is the second failsafe mode, the core 21 is set to sequentially execute the processes A1, B2, A3, A5, and A6, and the core 23 is set to the process C2. , B4, C4 are set to be executed sequentially.

その後S250にて、S240で設定された処理の実行を処理実行部36に開始させて、初期化処理を終了する。
これにより、図6に示すように、コア21,22,23が正常(すなわち、正常モード)である場合には、実行タイミングが到来する毎に、コア21は、処理A1,A2,A3,A4,A5,A6を順次実行し、コア22は、処理B1,B2,B3,B4を順次実行し、コア23は、処理C1,C2,C3,C4,C5を順次実行する。
Thereafter, in S250, the process execution unit 36 is started to execute the process set in S240, and the initialization process is terminated.
Thereby, as shown in FIG. 6, when the cores 21, 22, and 23 are normal (that is, in the normal mode), the core 21 performs processing A1, A2, A3, A4 each time the execution timing comes. , A5, A6 are sequentially executed, the core 22 sequentially executes the processes B1, B2, B3, and B4, and the core 23 sequentially executes the processes C1, C2, C3, C4, and C5.

また、コア23が異常(すなわち、第1フェールセーフモード)である場合には、実行タイミングが到来する毎に、コア21は、処理A1,C2,A3,A5,A6を順次実行し、コア22は、処理B1,C4,B4を順次実行し、コア23は、処理を実行しない。   When the core 23 is abnormal (that is, the first failsafe mode), the core 21 sequentially executes the processes A1, C2, A3, A5, and A6 each time the execution timing comes. The processes B1, C4, and B4 are sequentially executed, and the core 23 does not execute the processes.

また、コア22が異常(すなわち、第2フェールセーフモード)である場合には、実行タイミングが到来する毎に、コア21は、処理A1,B2,A3,A5,A6を順次実行し、コア23は、処理C2,B4,C4を順次実行し、コア22は、処理を実行しない。   When the core 22 is abnormal (that is, the second fail-safe mode), the core 21 sequentially executes the processes A1, B2, A3, A5, and A6 each time the execution timing arrives. The processes C2, B4, and C4 are sequentially executed, and the core 22 does not execute the processes.

また、コア21が異常(すなわち、第3フェールセーフモード)である場合には、実行タイミングが到来する毎に、コア22は、処理A1,B2,B4,A6を順次実行し、コア23は、処理C2,A3,A5,C4を順次実行し、コア21は、処理を実行しない。   When the core 21 is abnormal (that is, the third fail-safe mode), the core 22 sequentially executes the processes A1, B2, B4, and A6 each time the execution timing comes, and the core 23 performs the process C2, A3, A5, and C4 are sequentially executed, and the core 21 does not execute processing.

このようにして、ECU1は、フェールセーフ時には、正常時に実行する処理の中で退避走行に必要な処理のみを、正常なコアを使って実行させる。
ここで、異常となったコアの処理を他のコアで実行できるようにするための方法について説明する。説明を簡略化するために、図7に示すように、正常時には、コアAが処理A1,A2,A3を順次実行し、コアBが処理B1,B2を順次実行する場合を想定して説明する。
In this manner, during fail-safe, the ECU 1 executes only the processing necessary for the retreat travel among the processing executed at the normal time using the normal core.
Here, a method for enabling the processing of an abnormal core to be executed by another core will be described. In order to simplify the explanation, as shown in FIG. 7, it is assumed that the core A sequentially executes the processes A1, A2 and A3 and the core B sequentially executes the processes B1 and B2 as shown in FIG. .

ROMには、プログラムPG1,PG2,PG3,PG4,PG5,PG6,PG7が記憶されているとする。プログラムPG1は、コアAが各種処理を実行するためのプログラムである。プログラムPG2は、コアBが各種処理を実行するためのプログラムである。プログラムPG3は、処理A1を実行するためのプログラムである。プログラムPG4は、処理A2を実行するためのプログラムである。プログラムPG5は、処理A3を実行するためのプログラムである。プログラムPG6は、処理B1を実行するためのプログラムである。プログラムPG7は、処理B2を実行するためのプログラムである。   It is assumed that programs PG1, PG2, PG3, PG4, PG5, PG6, and PG7 are stored in the ROM. The program PG1 is a program for the core A to execute various processes. The program PG2 is a program for the core B to execute various processes. The program PG3 is a program for executing the process A1. The program PG4 is a program for executing the process A2. The program PG5 is a program for executing the process A3. The program PG6 is a program for executing the process B1. The program PG7 is a program for executing the process B2.

実行処理テーブルは、ROMに記憶されており、コアAとコアBにより実行される処理が動作モード毎に設定されている。
この実行処理テーブルは、正常モードでは、コアAは処理A1,A2,A3を順次実行し、コアBは処理B1,B2を順次実行するように設定されている。また実行処理テーブルは、第1フェールセーフモードでは、コアAは処理A1,A2,B1を順次実行し、コアBは処理を実行しないように設定されている。また実行処理テーブルは、第2フェールセーフモードでは、コアBは処理A1,A2,B1を順次実行し、コアAは処理を実行しないように設定されている。
The execution process table is stored in the ROM, and processes executed by the core A and the core B are set for each operation mode.
This execution processing table is set so that, in the normal mode, the core A sequentially executes the processes A1, A2, and A3, and the core B sequentially executes the processes B1 and B2. In the first fail-safe mode, the execution process table is set so that the core A sequentially executes the processes A1, A2, and B1, and the core B does not execute the process. In the second fail-safe mode, the execution process table is set so that the core B sequentially executes the processes A1, A2, and B1, and the core A does not execute the process.

プログラムPG1は、処理数iを順次インクリメントしながら、実行処理テーブル[0]と、[動作モード]と、処理数[i]とにより、実行処理IDを特定して、特定した処理を実行する。同様に、プログラムPG2は、処理数iを順次インクリメントしながら、実行処理テーブル[1]と、[動作モード]と、処理数[i]とにより、実行処理IDを特定して、特定した処理を実行する。   The program PG1 specifies the execution process ID based on the execution process table [0], [operation mode], and the process number [i] while sequentially incrementing the process number i, and executes the specified process. Similarly, the program PG2 specifies the execution process ID by the execution process table [1], [operation mode], and the process number [i] while sequentially incrementing the process number i, and performs the specified process. Run.

なお、実行処理テーブル[0]は、実行処理テーブルにおいてコアAを指定する。実行処理テーブル[1]は、実行処理テーブルにおいてコアBを指定する。そして、[動作モード]は、「正常」、「第1フェールセーフモード」および「第2フェールセーフモード」の何れかに設定される。   The execution process table [0] specifies the core A in the execution process table. The execution process table [1] specifies the core B in the execution process table. [Operation mode] is set to one of “normal”, “first fail-safe mode”, and “second fail-safe mode”.

例えば、プログラムPG1において、[動作モード]が「正常」である場合には、処理数[0],[1],[2]であるときにそれぞれ、実行処理テーブルを参照することにより、処理A1,A2,A3を示す実行処理IDが設定される。これにより、プログラムPG1において、処理実行(実行処理ID)により、処理A1,A2,A3が順次実行される。   For example, in the program PG1, when the [operation mode] is “normal”, the process A1 is performed by referring to the execution process table when the number of processes is [0], [1], and [2]. , A2 and A3 are set. Thus, in the program PG1, the processes A1, A2, and A3 are sequentially executed by the process execution (execution process ID).

同様に、プログラムPG2において、[動作モード]が「正常」である場合には、処理数[0],[1]であるときにそれぞれ、処理B1,B2を示す実行処理IDが設定される。これにより、プログラムPG2において、処理実行(実行処理ID)により、処理B1,B2が順次実行される。   Similarly, in the program PG2, when the [operation mode] is “normal”, the execution process IDs indicating the processes B1 and B2 are set when the number of processes is [0] and [1], respectively. Thereby, in the program PG2, the processes B1 and B2 are sequentially executed by the process execution (execution process ID).

また、プログラムPG1において、[動作モード]が「第1フェールセーフモード」である場合には、処理数[0],[1],[2]であるときにそれぞれ、実行処理テーブルを参照することにより、処理A1,A2,B1を示す実行処理IDが設定される。これにより、プログラムPG1において、処理実行(実行処理ID)により、処理A1,A2,B1が順次実行される。   In the program PG1, when the [operation mode] is the “first failsafe mode”, the execution process table is referred to when the number of processes is [0], [1], and [2], respectively. , Execution process IDs indicating the processes A1, A2, and B1 are set. Thereby, in the program PG1, the processes A1, A2, and B1 are sequentially executed by the process execution (execution process ID).

同様に、プログラムPG2において、[動作モード]が「第2フェールセーフモード」である場合には、処理数[0],[1],[2]であるときにそれぞれ、処理A1,A2,B1を示す実行処理IDが設定される。これにより、プログラムPG2において、処理実行(実行処理ID)により、処理A1,A2,B1が順次実行される。   Similarly, in the program PG2, when the [operation mode] is the “second failsafe mode”, the processes A1, A2, and B1 are performed when the number of processes is [0], [1], and [2], respectively. The execution process ID shown is set. Thereby, in the program PG2, the processes A1, A2, and B1 are sequentially executed by the process execution (execution process ID).

次に、コア21〜23の動作の具体例を説明する。
図8に示すように、まず、コア23で異常が発生し、コア22がコア23の異常を検出したとする。この場合に、コア22が、動作モードを決定するとともに、リセット後に起動させるコアを決定する。そして、コア22が、コア21へリセット前通知を送信する。リセット前通知を受信したコア21はリセット前処理を実行する。さらにコア22は、リセット前処理を実行した後にリセット回路6へリセット要求を送信する。これにより、リセット回路6は、マイコン3全体にリセットをかける。その後、コア21,22が起動する。起動したコア21,22はそれぞれ、コア22が決定した動作モードに基づいて、実行する処理を設定して、設定された処理の実行を開始する。
Next, a specific example of the operation of the cores 21 to 23 will be described.
As illustrated in FIG. 8, first, it is assumed that an abnormality occurs in the core 23 and the core 22 detects an abnormality in the core 23. In this case, the core 22 determines the operation mode and the core to be activated after reset. Then, the core 22 transmits a pre-reset notification to the core 21. The core 21 that has received the pre-reset notification executes pre-reset processing. Furthermore, the core 22 transmits a reset request to the reset circuit 6 after executing the pre-reset process. As a result, the reset circuit 6 resets the entire microcomputer 3. Thereafter, the cores 21 and 22 are activated. Each of the activated cores 21 and 22 sets a process to be executed based on the operation mode determined by the core 22 and starts executing the set process.

このように構成されたマイコン3は、処理A1,A2,A3,A4,A5,A6を実行するコア21と、処理B1,B2,B3,B4を実行するコア22と、処理C1,C2,C3,C4,C5を実行するコア23とを備える。   The microcomputer 3 configured as described above includes a core 21 that executes processes A1, A2, A3, A4, A5, and A6, a core 22 that executes processes B1, B2, B3, and B4, and processes C1, C2, and C3. , C4, and C5.

コア21,22,23のコア異常検出部31は、コア21,22,23のうち、異常発生コアを特定する。
コア21,22,23の動作モード判定部33は、特定された異常発生コアに基づいて、動作モードを決定する。
The core abnormality detection unit 31 of the cores 21, 22, 23 identifies an abnormality occurrence core among the cores 21, 22, 23.
The operation mode determination unit 33 of the cores 21, 22, and 23 determines the operation mode based on the specified abnormality occurrence core.

コア21,22,23のリセット部34は、異常発生コアを特定した場合に、リセット回路6へリセット要求を送信することにより、コア21,22,23をリセットさせる。
コア21,22,23の起動コア制御部35は、起動コア情報をレジスタ24に記憶することにより、コア21,22,23がリセットされた後に、コア21,22,23のうち、異常発生コア以外のコアを起動させる。
The reset unit 34 of the cores 21, 22, 23 resets the cores 21, 22, 23 by transmitting a reset request to the reset circuit 6 when an abnormal core is specified.
The activation core control unit 35 of the cores 21, 22, 23 stores the activation core information in the register 24, so that after the cores 21, 22, 23 are reset, the abnormal cores among the cores 21, 22, 23 are reset. Start a non-core.

コア21,22,23の実行処理判定機能45は、決定された動作モードに基づいて、起動したコア毎に、異常発生コア以外のコアが起動した後にコアに実行させる処理を設定する。   The execution process determination function 45 of the cores 21, 22, and 23 sets, for each activated core, a process to be executed by the core after activation of a core other than the abnormality-occurring core based on the determined operation mode.

このようにマイコン3は、異常発生コアを特定した場合にコア21,22,23がリセットされるため、1つのコアで異常が発生したときにおける異常の影響を解消することができる。またマイコン3は、コア21,22,23のうち異常発生コア以外のコアを起動させるため、リセット後に、異常発生コアに起因した異常が他のコアに及ぼす影響を抑制することができる。そしてマイコン3は、動作モードに基づいて、起動したコア毎に実行させる処理を設定する。このため、マイコン3は、リセット前に異常発生コアが実行していた処理を正常なコアに割り当てることが可能となり、リセット後に実行できなくなる処理を必要最低限に抑制することができる。   Thus, since the cores 21, 22, and 23 are reset when the abnormal core is specified, the microcomputer 3 can eliminate the influence of the abnormality when an abnormality occurs in one core. In addition, since the microcomputer 3 activates the cores other than the abnormality occurring core among the cores 21, 22, and 23, the influence caused by the abnormality caused by the abnormality occurring core after the reset can be suppressed. The microcomputer 3 sets processing to be executed for each activated core based on the operation mode. For this reason, the microcomputer 3 can assign the process executed by the abnormal core before the reset to a normal core, and can suppress the process that cannot be executed after the reset to the minimum necessary.

またマイコン3は、コア21,22,23がリセットされる前に、コア21,22,23がリセットされる前に実行するように予め設定されたリセット前処理を異常発生コア以外のコアに実行させる。これにより、マイコン3は、リセット待ちの期間においてマイコン3を適切な状態とすることができ、リセットに起因した異常の発生を抑制することができる。   In addition, the microcomputer 3 executes a pre-reset process that is set in advance so that the cores 21, 22, and 23 are executed before the cores 21, 22, and 23 are reset. Let Thereby, the microcomputer 3 can put the microcomputer 3 in an appropriate state during the reset waiting period, and can suppress the occurrence of an abnormality caused by the reset.

以上説明した実施形態において、コア異常検出部31は異常特定部に相当し、動作モード判定部33はモード決定部に相当し、起動コア制御部35は起動部に相当し、実行処理判定機能45は処理設定部に相当する。   In the embodiment described above, the core abnormality detection unit 31 corresponds to the abnormality identification unit, the operation mode determination unit 33 corresponds to the mode determination unit, the activation core control unit 35 corresponds to the activation unit, and the execution process determination function 45. Corresponds to a process setting unit.

また、処理A1〜A6,B1〜B4,C1〜C5は演算処理に相当し、S70,S80は前処理実行部としての処理に相当する。
以上、本開示の一実施形態について説明したが、本開示は上記実施形態に限定されるものではなく、種々変形して実施することができる。
Further, processes A1 to A6, B1 to B4, and C1 to C5 correspond to arithmetic processes, and S70 and S80 correspond to processes as a preprocessing execution unit.
As mentioned above, although one embodiment of this indication was described, this indication is not limited to the above-mentioned embodiment, and can carry out various modifications.

[変形例1]
例えば上記実施形態では、異常発生コアをリセット後に起動させないようにしたものを示したが、異常発生コアにおいて処理を無限ループに入れて異常発生コアを無効にするようにしてもよい。また、コアの動作モードに適切なものがあるマイコンでは、異常発生コアの動作モード(例えば、Sleep,Safe,Run等)を変更するようにしてもよい。
[Modification 1]
For example, in the above-described embodiment, the abnormality-occurring core is not activated after being reset. However, the abnormality-occurring core may be invalidated by putting processing in an infinite loop. In a microcomputer having an appropriate core operation mode, the operation mode (for example, Sleep, Safe, Run, etc.) of the abnormal core may be changed.

[変形例2]
上記実施形態では、異常発生コアに基づいて動作モードを決定するものを示したが、異常発生コアに加えて、異常の種類および現在のソフトの状況の少なくとも一つに基づいて、動作モードを決定するようにしてもよい。異常の種類は、例えば、WDT割り込み及び例外割り込み等である。現在のソフトの状況は、例えば、Init中、Shutdown中およびベース処理中などである。
[Modification 2]
In the above embodiment, the operation mode is determined based on the abnormality occurrence core. However, in addition to the abnormality occurrence core, the operation mode is determined based on at least one of the abnormality type and the current software status. You may make it do. The types of abnormalities are, for example, WDT interrupts and exception interrupts. The current software status is, for example, during Init, Shutdown, or during base processing.

[変形例3]
上記実施形態では、異常発生コアが1つである場合に動作モードとして3つのフェールセーフモードの何れかに決定するものを示したが、異常発生コアが2つ以上である場合を想定して、フェールセーフモードを設定するようにしてもよい。また、正常に動作するコアの組み合わせに応じて、4つ以上のフェールセーフモードの何れかに決定するようにしてもよい。
[Modification 3]
In the above-described embodiment, the operation mode is determined as one of the three fail-safe modes when there is one abnormality occurrence core. However, assuming that there are two or more abnormality occurrence cores, the failure is assumed. You may make it set safe mode. Moreover, you may make it determine in any of 4 or more fail safe modes according to the combination of the core which operate | moves normally.

[変形例4]
上記実施形態では、異常発生コアが存在する場合に、正常なコアを用いて正常モード時よりは少ない処理を実行するものを示した。しかし、マイコンの処理負荷が小さい状況(例えば、エンジン回転速度が小さい状況)では、異常発生コアが実行していた全ての処理を正常なコアに割り当てることによって、フェールセーフモードであっても、正常モード時と同様に全ての処理を実行するようにしてもよい。
[Modification 4]
In the above-described embodiment, when an abnormal core is present, the normal core is used to execute less processing than in the normal mode. However, in a situation where the processing load of the microcomputer is low (for example, a situation where the engine speed is low), all processes executed by the abnormal core are assigned to normal cores, so that even in fail-safe mode, normal mode You may make it perform all the processes similarly to time.

[変形例5]
上記実施形態では、コアで異常が発生すると動作モードをフェールセーフモードに切り替えるものを示したが、予め設定された切替判定回数のリセットを繰り返しても、同一コアで異常が継続する場合に、動作モードをフェールセーフモードに切り替えるようにしてもよい。また、上記の切替判定回数は、車両状態またはマイコン状態に応じて変えるようにしてもよい。例えば、車速が0km/hである場合、または、マイコンのイニシャル中は、安全にリセットをかけることができるため、切替判定回数を多くするようにしてもよい。
[Modification 5]
In the above embodiment, the operation mode is switched to the fail-safe mode when an abnormality occurs in the core. However, when the abnormality continues in the same core even if the preset number of times of switching determination is repeated, the operation mode May be switched to fail-safe mode. Further, the number of switching determinations may be changed according to the vehicle state or the microcomputer state. For example, when the vehicle speed is 0 km / h, or while the microcomputer is initializing, the reset can be safely performed, so the number of switching determinations may be increased.

[変形例6]
上記実施形態では、マイコンが3つのコアを備えるものを示した。今後、マイコンに搭載されるコアの数が増えると、コアの故障発生確率も増加する。しかし、1つのコア当たりの処理比率は下がるため、例えば、1つのコアを予備のコアとして、他のコアが故障したときに、予備のコアで代替させるようにしてもよい。
[Modification 6]
In the above embodiment, the microcomputer has three cores. In the future, as the number of cores mounted on microcomputers increases, the probability of core failures also increases. However, since the processing ratio per core is lowered, for example, one core may be used as a spare core, and another core may be replaced with a spare core when the other core fails.

[変形例7]
上記実施形態では、異常発生コアに基づいて動作モードを決定するものを示したが、異常発生コアにおける過去複数回の情報を確認して動作モードを決定するようにしてもよいし、異常発生コアにおける直前の1回の情報を確認して動作モードを決定するようにしてもよい。
[Modification 7]
In the above-described embodiment, the operation mode is determined based on the abnormality occurrence core. However, the operation mode may be determined by confirming a plurality of past information in the abnormality occurrence core. The operation mode may be determined by confirming the previous one-time information.

[変形例8]
上記実施形態では、マイコンが3つのコアを備えるものを示した。しかし、1つのコアがマスタコアであり、残りのコアがスレーブコアであるという関係が設定されており、マスタコアがスレーブコアを監視している場合において、マスタコアで異常は発生したときには、マスタコアの機能をスレーブコアに移すようにしてもよい。二重故障が発生しないとすれば、退避走行が可能となる。
[Modification 8]
In the above embodiment, the microcomputer has three cores. However, when a relationship is established in which one core is a master core and the remaining cores are slave cores, and the master core monitors the slave core, if an abnormality occurs in the master core, the function of the master core is You may make it move to a slave core. If a double failure does not occur, evacuation travel is possible.

[変形例9]
上記実施形態では、異常が発生した場合に異常発生コアをリセット後に起動させないようにしたものを示したが、正常コアの一部もリセット後に起動させないようにしてもよい。
[Modification 9]
In the above-described embodiment, the case where the abnormal core is not activated after resetting when an abnormality occurs is shown, but a part of the normal core may not be activated after resetting.

[変形例10]
上記実施形態では、異常を検出したコアが、動作モードを決定するとともに、リセット後に起動させるコアを設定するものを示した。しかし、コアに予め優先度を設定し、コアに異常が発生した場合には、異常が発生していないコアの中で最も優先度が高いコアが、動作モードを決定するとともに、リセット後に起動させるコアを設定するようにしてもよい。ここで、最も優先度が高いコアが動作モードを決定するように構成されている場合におけるコア21〜23の動作の具体例を説明する。
[Modification 10]
In the said embodiment, the core which detected abnormality sets what sets the core started after resetting an operation mode. However, if priorities are set in advance in the core and an abnormality occurs in the core, the core with the highest priority among the cores in which no abnormality has occurred determines the operation mode and starts after resetting. A core may be set. Here, a specific example of the operation of the cores 21 to 23 when the core having the highest priority is configured to determine the operation mode will be described.

図9に示すように、まず、コア23で異常が発生し、コア22がコア23の異常を検出したとする。この場合に、コア22が、異常が発生していないコアの中で最も優先度が高いコアであるコア21を制御コアとして決定する。そして、コア22は、制御コアであるコア21へ異常発生通知を送信する。これにより、コア21は、動作モードを決定するとともに、リセット後に起動させるコアを設定する。さらにコア21は、リセット回路6へリセット要求を送信する。これにより、リセット回路6は、マイコン3全体にリセットをかける。その後、コア21,22が起動する。起動したコア21,22はそれぞれ、コア22が決定した動作モードに基づいて、実行する処理を設定して、設定された処理の実行を開始する。   As shown in FIG. 9, first, it is assumed that an abnormality occurs in the core 23 and the core 22 detects an abnormality in the core 23. In this case, the core 22 determines the core 21 having the highest priority among the cores in which no abnormality has occurred as the control core. Then, the core 22 transmits an abnormality occurrence notification to the core 21 that is the control core. Thereby, the core 21 determines the operation mode and sets the core to be activated after reset. Further, the core 21 transmits a reset request to the reset circuit 6. As a result, the reset circuit 6 resets the entire microcomputer 3. Thereafter, the cores 21 and 22 are activated. Each of the activated cores 21 and 22 sets a process to be executed based on the operation mode determined by the core 22 and starts executing the set process.

[変形例11]
上記実施形態では、異常発生コアが検出された後に、リセット回路6がリセットをかけるものを示したが、リセット回路6がリセットをかける前に、異常発生コアの動作を停止するようにしてもよい。異常発生コアの動作を停止するために、例えば、異常発生コアへのクロック供給を停止するとよい。これにより、リセットをかける前に異常発生コアが異常な動作をしてしまうのを抑制することができる。
[Modification 11]
In the above-described embodiment, the reset circuit 6 is reset after the abnormal core is detected. However, the operation of the abnormal core may be stopped before the reset circuit 6 performs the reset. . In order to stop the operation of the abnormal core, for example, the clock supply to the abnormal core may be stopped. Thereby, it can suppress that an abnormal core performs abnormal operation | movement before resetting.

[変形例12]
上記変形例11では、リセットをかける前に異常発生コアの動作を停止させるものを示したが、異常発生コアの処理を無限ループに入れるようにしてもよい。
[Modification 12]
In the above modification 11, the operation of the abnormal core is stopped before resetting, but the processing of the abnormal core may be put in an infinite loop.

[変形例13]
上記実施形態では、異常が発生していない正常なコアがリセットをかける前にリセット前処理を実行するものを示したが、リセットをかける前に、正常なコアが、異常発生コアがリセット前に実行するべき処理も実行するようにしてもよい。これにより、リセット前においてマイクロコンピュータを適切な状態とすることができ、リセットに起因した異常の発生を抑制することができる。
[Modification 13]
In the above embodiment, a normal core that does not have an abnormality has been shown to perform pre-reset processing before resetting.However, before a reset is performed, a normal core is detected before an abnormal core is reset. You may make it also perform the process which should be performed. Thereby, the microcomputer can be brought into an appropriate state before resetting, and occurrence of an abnormality caused by the reset can be suppressed.

また、上記実施形態における1つの構成要素が有する機能を複数の構成要素に分担させたり、複数の構成要素が有する機能を1つの構成要素に発揮させたりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加、置換等してもよい。なお、特許請求の範囲に記載の文言から特定される技術思想に含まれるあらゆる態様が本開示の実施形態である。   In addition, the function of one component in the above embodiment may be shared by a plurality of components, or the function of a plurality of components may be exhibited by one component. Moreover, you may abbreviate | omit a part of structure of the said embodiment. In addition, at least a part of the configuration of the above embodiment may be added to or replaced with the configuration of the other embodiment. In addition, all the aspects included in the technical idea specified from the wording described in the claims are embodiments of the present disclosure.

上述したマイコン3の他、当該マイコン3を構成要素とするシステム、当該マイコン3としてコンピュータを機能させるためのプログラム、このプログラムを記録した媒体、異常時処理実行方法など、種々の形態で本開示を実現することもできる。   In addition to the microcomputer 3 described above, the present disclosure is disclosed in various forms such as a system including the microcomputer 3 as a constituent element, a program for causing a computer to function as the microcomputer 3, a medium storing the program, and a method for executing an abnormal process. It can also be realized.

3…マイコン、21,22,23…コア、31…コア異常検出部、33…動作モード判定部、34…リセット部、35…起動コア制御部、45…実行処理判定機能、
DESCRIPTION OF SYMBOLS 3 ... Microcomputer, 21, 22, 23 ... Core, 31 ... Core abnormality detection part, 33 ... Operation mode determination part, 34 ... Reset part, 35 ... Activation core control part, 45 ... Execution process determination function,

Claims (3)

1つ又は複数の演算処理を実行するコア(21,22,23)を複数備えるマイクロコンピュータ(3)であって、
複数の前記コアのうち、異常が発生している前記コアである異常発生コアを特定することができるように構成された異常特定部(31)と、
前記異常特定部により特定された前記異常発生コアに基づいて、前記異常発生コア以外の前記コアが前記演算処理を実行するための動作モードを決定するように構成されたモード決定部(33)と、
前記異常特定部が前記異常発生コアを特定した場合に、複数の前記コアをリセットさせるように構成されたリセット部(34)と、
複数の前記コアがリセットされた後に、複数の前記コアのうち、前記異常特定部により特定された前記異常発生コア以外の前記コアを起動させるように構成された起動部(35)と、
前記モード決定部によって決定された前記動作モードに基づいて、起動した前記コア毎に、前記異常発生コア以外の前記コアが起動した後に前記コアに実行させる1つ又は複数の前記演算処理を設定するように構成された処理設定部(45)と
を備えるマイクロコンピュータ。
A microcomputer (3) comprising a plurality of cores (21, 22, 23) for executing one or more arithmetic processes,
Among the plurality of cores, an abnormality identification unit (31) configured to be able to identify an abnormality occurrence core that is the core in which an abnormality has occurred;
A mode determination unit (33) configured to determine an operation mode for the cores other than the abnormality occurrence core to execute the arithmetic processing based on the abnormality occurrence core identified by the abnormality identification unit; ,
A reset unit (34) configured to reset a plurality of the cores when the abnormality identification unit identifies the abnormal core;
An activation unit (35) configured to activate the core other than the abnormality-occurring core identified by the abnormality identification unit among the plurality of cores after the plurality of cores are reset;
Based on the operation mode determined by the mode determination unit, for each activated core, one or more arithmetic processes to be executed by the core after the core other than the abnormal core is activated are set. And a processing setting unit (45) configured as described above.
請求項1に記載のマイクロコンピュータであって、
前記異常発生コアは、複数の前記コアがリセットされる前に、自身の動作が停止されるマイクロコンピュータ。
The microcomputer according to claim 1,
The abnormality-occurring core is a microcomputer whose operation is stopped before a plurality of the cores are reset.
請求項1または請求項2に記載のマイクロコンピュータであって、
複数の前記コアがリセットされる前に、前記コアがリセットされる前に実行するように予め設定されたリセット前処理を、少なくとも前記異常発生コア以外の前記コアに実行させるように構成された前処理実行部(S70,S80)を備えるマイクロコンピュータ。
A microcomputer according to claim 1 or 2,
Before the plurality of cores are reset, before the resetting process, which is set in advance to be executed before the cores are reset, is configured to cause at least the cores other than the abnormal core to execute A microcomputer provided with a process execution unit (S70, S80).
JP2017004271A 2017-01-13 2017-01-13 Microcomputer Active JP6729407B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017004271A JP6729407B2 (en) 2017-01-13 2017-01-13 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017004271A JP6729407B2 (en) 2017-01-13 2017-01-13 Microcomputer

Publications (2)

Publication Number Publication Date
JP2018112977A true JP2018112977A (en) 2018-07-19
JP6729407B2 JP6729407B2 (en) 2020-07-22

Family

ID=62911159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017004271A Active JP6729407B2 (en) 2017-01-13 2017-01-13 Microcomputer

Country Status (1)

Country Link
JP (1) JP6729407B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021047513A (en) * 2019-09-17 2021-03-25 株式会社デンソー Electronic control device
DE112021005574T5 (en) 2020-12-21 2023-08-31 Hitachi Astemo, Ltd. VEHICLE CONTROL DEVICE

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010092105A (en) * 2008-10-03 2010-04-22 Fujitsu Ltd Synchronization control apparatus, information processing apparatus, and synchronization management method
JP2011159136A (en) * 2010-02-02 2011-08-18 Seiko Epson Corp Control device, failure detection and recovery method thereof, and electronic apparatus
JP2014186454A (en) * 2013-03-22 2014-10-02 Hitachi Automotive Systems Ltd Electronic control device for vehicle
JP2016143304A (en) * 2015-02-04 2016-08-08 株式会社デンソー Electronic control unit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010092105A (en) * 2008-10-03 2010-04-22 Fujitsu Ltd Synchronization control apparatus, information processing apparatus, and synchronization management method
JP2011159136A (en) * 2010-02-02 2011-08-18 Seiko Epson Corp Control device, failure detection and recovery method thereof, and electronic apparatus
JP2014186454A (en) * 2013-03-22 2014-10-02 Hitachi Automotive Systems Ltd Electronic control device for vehicle
JP2016143304A (en) * 2015-02-04 2016-08-08 株式会社デンソー Electronic control unit

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021047513A (en) * 2019-09-17 2021-03-25 株式会社デンソー Electronic control device
JP7334552B2 (en) 2019-09-17 2023-08-29 株式会社デンソー electronic controller
DE112021005574T5 (en) 2020-12-21 2023-08-31 Hitachi Astemo, Ltd. VEHICLE CONTROL DEVICE

Also Published As

Publication number Publication date
JP6729407B2 (en) 2020-07-22

Similar Documents

Publication Publication Date Title
JP5693712B2 (en) Semiconductor integrated circuit
JP5507830B2 (en) Microcontroller and automobile control device
JP6266239B2 (en) Microcomputer
US9891917B2 (en) System and method to increase lockstep core availability
US9063907B2 (en) Comparison for redundant threads
US20090217092A1 (en) Method and Device for Controlling a Computer System Having At Least Two Execution Units and One Comparator Unit
JP6360387B2 (en) Processor system, engine control system, and control method
WO2020239060A1 (en) Error recovery method and apparatus
JP6462870B2 (en) Semiconductor device and diagnostic test method
US20150006978A1 (en) Processor system
JP2014063258A (en) Semiconductor integrated circuit device and microcontroller
JP6729407B2 (en) Microcomputer
JP2010186242A (en) Computer system
JP5367970B2 (en) Method for starting / restarting signal processing system and signal processing system
JP2010117813A (en) Debugging system, debugging method, debugging control method, and debugging control program
CN104346306A (en) System and method of high integrity DMA operation
JP2013061783A (en) Multi-core processor
JP2007018207A (en) Data processor, electronic control unit, and automobile
JP2010061419A (en) Controller
JP2014056396A (en) Electronic controller
JP4853620B2 (en) Multiprocessor system and initial startup method and program
JP6588068B2 (en) Microcomputer
JP2009282849A (en) Microcomputer
US9342359B2 (en) Information processing system and information processing method
JP2015121478A (en) Failure detection circuit and failure detection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190325

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200311

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200331

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200512

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200602

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200615

R151 Written notification of patent or utility model registration

Ref document number: 6729407

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250