[go: up one dir, main page]

JP5533789B2 - In-vehicle electronic control unit - Google Patents

In-vehicle electronic control unit Download PDF

Info

Publication number
JP5533789B2
JP5533789B2 JP2011132465A JP2011132465A JP5533789B2 JP 5533789 B2 JP5533789 B2 JP 5533789B2 JP 2011132465 A JP2011132465 A JP 2011132465A JP 2011132465 A JP2011132465 A JP 2011132465A JP 5533789 B2 JP5533789 B2 JP 5533789B2
Authority
JP
Japan
Prior art keywords
sub
core
scheduler
processing
important
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.)
Active
Application number
JP2011132465A
Other languages
Japanese (ja)
Other versions
JP2013003724A (en
Inventor
恭彦 原田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2011132465A priority Critical patent/JP5533789B2/en
Priority to DE102012209789.9A priority patent/DE102012209789B4/en
Publication of JP2013003724A publication Critical patent/JP2013003724A/en
Application granted granted Critical
Publication of JP5533789B2 publication Critical patent/JP5533789B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3013Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3096Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents wherein the means or processing minimize the use of computing system or of computing system component resources, e.g. non-intrusive monitoring which minimizes the probe effect: sniffing, intercepting, indirectly deriving the monitored data from other directly available data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Description

本発明は、複数のコアを搭載する車載電子制御装置に関する。   The present invention relates to an in-vehicle electronic control device equipped with a plurality of cores.

従来、自動車(車両)に搭載される電子制御装置として、コアを複数搭載するマルチコアシステムを採用し、最も優先度が高い制御(以下、最高優先度制御という)を1つのコア(以下、最高優先度制御割当コアという)に割り当てるとともに、この最高優先度制御より優先度が低い制御(以下、低優先度制御という)を最高優先度コア以外のコアに割り当てるように構成されたものがある。   Conventionally, as an electronic control device mounted on an automobile (vehicle), a multi-core system having a plurality of cores has been adopted, and the control with the highest priority (hereinafter referred to as the highest priority control) is assigned to one core (hereinafter referred to as the highest priority). And a control having a lower priority than the highest priority control (hereinafter referred to as low priority control) is assigned to a core other than the highest priority core.

そして、このようなマルチコア構成の電子制御装置において、最高優先度制御割当コアに異常が発生したか否かを監視するコア(以下、監視コアという)を備え、最高優先度制御割当コアの異常を監視コアが検出した場合に、最高優先度制御割当コア以外のコアのうちで予め設定されたコア(以下、異常時設定コアという)に対して、異常時設定コアに割り当てられていた低優先度制御の実行を停止して、その代わりに最高優先度制御を実行させるようにしたものが知られている(例えば、特許文献1参照)。これにより、最高優先度制御を継続的に実行することが可能になる。   In such an electronic control device having a multi-core configuration, a core for monitoring whether or not an abnormality has occurred in the highest priority control allocation core (hereinafter referred to as a monitoring core) is provided. The low priority assigned to the core set in the abnormal state for cores set in advance (hereinafter referred to as the abnormal set core) among the cores other than the highest priority control assigned core when the monitoring core detects There is known one in which the execution of control is stopped and the highest priority control is executed instead (see, for example, Patent Document 1). This makes it possible to continuously execute the highest priority control.

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

しかし、特許文献1に記載の技術では、低優先度制御を実行していた上記の異常時設定コアに最高優先度制御を実行させるようにするために、一旦、異常時設定コアを再起動させて初期化する必要がある。このため、異常時設定コアの再起動が完了するまで最高優先度制御が実行できないという問題があった。   However, in the technique described in Patent Document 1, in order to cause the above-described abnormal-time setting core that has been executing the low-priority control to execute the highest-priority control, the abnormal-time setting core is temporarily restarted. Need to be initialized. For this reason, there has been a problem that the highest priority control cannot be executed until the restart of the abnormal setting core is completed.

本発明は、こうした問題に鑑みなされたものであり、マルチコア構成の車載電子制御装置において、優先度の高い制御の中断期間を短縮することができる技術を提供することを目的とする。   The present invention has been made in view of these problems, and an object of the present invention is to provide a technique capable of shortening a high-priority control interruption period in a multi-core electronic vehicle control apparatus.

上記目的を達成するためになされた請求項1に記載の車載電子制御装置は、複数のコアを備え、複数のコアのうち、当該車載電子制御装置が実行する制御処理の中で優先度が高い処理として予め設定された処理である重要処理を実行するコアをメインコアとし、複数のコアのうち、重要処理より優先度が低い処理として予め設定された処理である通常処理を実行するコアをサブコアとし、サブコアは、当該サブコアが実行する処理を管理する一つ以上の第1サブスケジューラおよび一つ以上の第2サブスケジューラと、第1サブスケジューラおよび第2サブスケジューラを管理するメインスケジューラとを動作させるように構成され、メインスケジューラは、メインコアに異常が発生していない場合には、サブコアが処理を実行するために必要な時間であるリソースを第1サブスケジューラに割り当てるとともに、リソースを第2サブスケジューラに割り当てないようにすることにより、第1サブスケジューラに通常処理を実行させるとともに第2サブスケジューラを停止させ、メインコアに異常が発生した場合には、リソースを第1サブスケジューラおよび第2サブスケジューラに割り当てることにより、第1サブスケジューラに通常処理を実行させるとともに第2サブスケジューラに重要処理を実行させることを特徴とする。   The vehicle-mounted electronic control device according to claim 1, which has been made to achieve the above object, includes a plurality of cores, and among the plurality of cores, a priority is high in a control process executed by the vehicle-mounted electronic control device. A core that executes an important process that is a process set in advance as a process is a main core, and a core that executes a normal process that is a process set in advance as a process having a lower priority than the important process among a plurality of cores is a sub-core. And the sub-core operates one or more first sub-schedulers and one or more second sub-schedulers that manage processing executed by the sub-core, and a main scheduler that manages the first sub-scheduler and the second sub-scheduler. The main scheduler is necessary for the sub-core to execute the process when there is no abnormality in the main core. Resources are allocated to the first sub-scheduler, and resources are not allocated to the second sub-scheduler, thereby causing the first sub-scheduler to execute normal processing and stopping the second sub-scheduler. When an abnormality occurs, the first sub-scheduler and the second sub-scheduler allocate resources to cause the first sub-scheduler to execute normal processing and the second sub-scheduler to execute important processing. To do.

このように構成された車載電子制御装置では、メインコアに異常が発生すると、メインコアに異常が発生していない場合にはリソースが割り当てられないことで停止している第2サブスケジューラに対して、リソースを割り当てることによって、第2サブスケジューラに重要処理を実行させることができる。すなわち、メインコアに異常が発生した後にサブコアを再起動させることなく、サブコアが重要処理を実行することができる。そして、コアにおいてリソースを変更するのに要する時間は、コアを再起動するのに要する時間よりも短い。このため、重要処理を実行するメインコアに異常が発生した場合に、メインコアに代わってサブコアが重要処理の実行を開始するまでの中断期間を短縮することができる。   In the in-vehicle electronic control device configured as described above, when an abnormality occurs in the main core, when no abnormality occurs in the main core, the resource is not allocated and the second sub-scheduler is stopped. By assigning resources, it is possible to cause the second sub-scheduler to execute important processing. That is, the sub-core can execute the important process without restarting the sub-core after the abnormality occurs in the main core. The time required to change the resource in the core is shorter than the time required to restart the core. For this reason, when an abnormality occurs in the main core that executes the important process, the interruption period until the sub-core starts executing the important process in place of the main core can be shortened.

また、請求項1に記載の車載電子制御装置において、サブコアを複数備え、複数のサブコアはそれぞれ、互いに異なる通常処理を第1サブスケジューラで実行するとともに、分割された重要処理のうち互いに異なる処理を第2サブスケジューラで実行し、重要処理は、車両を制御するための複数の車両制御処理で構成されている場合には、請求項2に記載のように、重要処理は、複数の車両制御処理のうちで、処理順序が変更されると車両制御に不都合を生じさせる可能性のある処理が同一のサブコア内で実行されるように分割されるようにするとよい。   The on-vehicle electronic control device according to claim 1, further comprising a plurality of sub-cores, wherein each of the plurality of sub-cores executes different normal processing by the first sub-scheduler, and performs different processing among the divided important processing. When the important process is executed by the second sub-scheduler and includes a plurality of vehicle control processes for controlling the vehicle, the important process includes a plurality of vehicle control processes. Among them, it is preferable to divide the processing so that the processing that may cause inconvenience in the vehicle control when the processing order is changed is executed in the same sub-core.

このように構成された車載電子制御装置によれば、処理順序が変更されると車両制御に不都合を生じさせる可能性のある複数の処理がそれぞれ異なるサブコアで実行されることにより処理順序が変更されてしまうという事態の発生を抑制して、車両制御における不都合の発生を抑制することができる。   According to the vehicle-mounted electronic control device configured as described above, when the processing order is changed, the processing order is changed by executing a plurality of processes that may cause inconvenience in vehicle control by different sub-cores. Therefore, it is possible to suppress the occurrence of inconvenience in vehicle control.

また、請求項1または請求項2に記載の車載電子制御装置において、請求項3に記載のように、メインスケジューラは、第2サブスケジューラが第1サブスケジューラより優先して処理を実行するように管理するようにするとよい。   Further, in the on-vehicle electronic control device according to claim 1 or 2, as described in claim 3, the main scheduler is configured such that the second sub-scheduler executes processing in preference to the first sub-scheduler. It is good to manage.

このように構成された車載電子制御装置では、メインコアに異常が発生した場合に、重要処理を実行する第2サブスケジューラが、通常処理を実行する第1サブスケジューラよりも優先される。すなわち、メインコアに異常が発生した場合であっても、メインコアが実行していた重要処理を、サブコアにおいて、通常処理よりも優先して実行することができる。これにより、通常処理を優先して実行したために重要処理のリソースが少なくなり重要処理を実行できなくなってしまうという事態の発生を防止することができる。   In the vehicle-mounted electronic control device configured as described above, when an abnormality occurs in the main core, the second sub-scheduler that executes the important process has priority over the first sub-scheduler that executes the normal process. In other words, even when an abnormality occurs in the main core, the important process executed by the main core can be executed in the sub-core with priority over the normal process. As a result, it is possible to prevent the occurrence of a situation in which the important process is reduced because the normal process is executed with priority, and the important process cannot be executed.

また、請求項1〜請求項3の何れか1項に記載の車載電子制御装置において、請求項4に記載のように、サブコアは、メインコアから、異常判定のために予め設定された異常判定用信号を入力し、異常判定用信号に基づいて、メインコアに異常が発生したか否かを判定する異常判定手段を備えるようにするとよい。   Further, in the on-vehicle electronic control device according to any one of claims 1 to 3, as described in claim 4, the sub-core has an abnormality determination preset for abnormality determination from the main core. An abnormality determination means may be provided for determining whether or not an abnormality has occurred in the main core based on the abnormality determination signal.

このように構成された車載電子制御装置よれば、メインコアの異常を検出する機能をサブコアが備えるため、メインコアの異常を検出するためのコアを別途設ける必要がなくなる。   According to the on-vehicle electronic control device configured as described above, since the sub-core has a function of detecting the abnormality of the main core, it is not necessary to separately provide a core for detecting the abnormality of the main core.

また、請求項1〜請求項4の何れか1項に記載の車載電子制御装置において、請求項5に記載のように、重要処理を実行するための重要処理プログラムと、通常処理を実行するための通常処理プログラムとを記憶するメモリを備え、メインコアおよびサブコアは、メモリにアクセスしてプログラムを取得することにより処理を実行することができるように構成され、メモリ管理手段が、メインコアに異常が発生していない場合には、サブコアが重要処理プログラムにアクセス不能であり、メインコアに異常が発生した場合にはサブコアが重要処理プログラムにアクセス可能であるように、メモリへのアクセスを管理するようにするとよい。   Further, in the on-vehicle electronic control device according to any one of claims 1 to 4, as described in claim 5, an important process program for executing an important process and a normal process are executed. The main core and sub-core are configured to be able to execute processing by accessing the memory and acquiring the program, and the memory management means has an abnormality in the main core. If the sub-core does not occur, the sub-core cannot access the critical processing program, and if the main core fails, the sub-core can access the critical processing program. It is good to do so.

このように構成された車載電子制御装置によれば、メインコアに異常が発生すると重要処理プログラムにアクセス可能である必要があるサブコアにおいて、メインコアに異常が発生していないときに誤って重要処理プログラムにアクセスして重要処理を実行してしまうという事態の発生を防止することができる。   According to the on-vehicle electronic control device configured as described above, in the sub-core that needs to be able to access the important processing program when an abnormality occurs in the main core, the important processing is erroneously performed when no abnormality occurs in the main core. It is possible to prevent a situation in which an important process is executed by accessing the program.

ECU1の構成を示すブロック図である。2 is a block diagram showing a configuration of an ECU 1. FIG. 第1実施形態のECU1の通常動作時におけるコア21,22,23の動作を説明するブロック図である。It is a block diagram explaining operation | movement of the cores 21, 22, and 23 at the time of normal operation | movement of ECU1 of 1st Embodiment. MMU14によるRAM13の管理方法を説明する図である。It is a figure explaining the management method of RAM13 by MMU14. 第1実施形態の異常時代替処理の実行状態を示すフローチャートである。It is a flowchart which shows the execution state of the alternative process at the time of abnormality of 1st Embodiment. 第1実施形態のコア21の異常時におけるコア21,22,23の動作を説明するブロック図である。It is a block diagram explaining operation | movement of the cores 21, 22, and 23 at the time of abnormality of the core 21 of 1st Embodiment. 重要処理の内容と配分を示す図である。It is a figure which shows the content and distribution of an important process. 第2実施形態のECU1の通常動作時におけるコア21,22,23の動作を説明するブロック図である。It is a block diagram explaining operation | movement of the cores 21, 22, and 23 at the time of normal operation | movement of ECU1 of 2nd Embodiment. 第2実施形態の異常時代替処理の実行状態を示すフローチャートである。It is a flowchart which shows the execution state of the alternative process at the time of abnormality of 2nd Embodiment. 第2実施形態の重要処理の配分を示すタイミングチャートである。It is a timing chart which shows distribution of important processing of a 2nd embodiment. 第3実施形態の異常時代替処理の実行状態を示すフローチャートである。It is a flowchart which shows the execution state of the alternative process at the time of abnormality of 3rd Embodiment. 第2コア22の通常処理の内容と、第3実施形態の重要処理および通常処理の配分を示す図である。It is a figure which shows the content of the normal process of the 2nd core 22, distribution of the important process and normal process of 3rd Embodiment.

(第1実施形態)
以下に本発明の第1実施形態について図面とともに説明する。
図1は、本実施形態の電子制御装置(以下、ECUという)1の構成を示すブロック図である。
(First embodiment)
A first embodiment of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of an electronic control device (hereinafter referred to as ECU) 1 of the present embodiment.

ECU1は、車両に搭載され、図1に示すように、マイコン(マイクロコンピュータ)3と入力回路4と出力回路5とを備えている。
これらのうちマイコン3は、クランク軸センサからのクランク信号、カム軸センサからの気筒判別用信号、水温センサやスロットル開度センサ等からの他の各種センサ信号、およびトランスミッションのシフトポジションスイッチやエアコンスイッチ等からの各種スイッチ信号を入力回路4を介して取り込み、それら各種信号に基づいて、インジェクタへ出力回路5を介して駆動信号を出力する燃料噴射制御や、点火装置へ出力回路5を介して駆動信号を出力する点火時期制御などのエンジン制御を実施する。
The ECU 1 is mounted on a vehicle and includes a microcomputer (microcomputer) 3, an input circuit 4, and an output circuit 5, as shown in FIG.
Among these, the microcomputer 3 includes a crank signal from the crankshaft sensor, a cylinder discrimination signal from the camshaft sensor, various other sensor signals from a water temperature sensor, a throttle opening sensor, and the like, and a shift position switch and an air conditioner switch of the transmission. And the like, the fuel injection control that takes in the various switch signals from the input circuit 4 through the input circuit 4 and outputs the drive signal to the injector through the output circuit 5 and the drive to the ignition device through the output circuit 5 Engine control such as ignition timing control that outputs a signal is performed.

またマイコン3は、CPU11、ROM12、RAM13、メモリ管理ユニット(以下、MMUという)14、I/O15及びこれらの構成を接続するバスラインなどから構成され、ROM12およびRAM13に記憶されたプログラムに基づいて、エンジンを制御するための各種処理を実行する。   The microcomputer 3 includes a CPU 11, a ROM 12, a RAM 13, a memory management unit (hereinafter referred to as “MMU”) 14, an I / O 15, a bus line connecting these components, and the like, and is based on a program stored in the ROM 12 and the RAM 13. Various processes for controlling the engine are executed.

さらにCPU11は、CPUコア(以下、単にコアという)21,22,23で構成されている。なお以下、コア21、コア22、およびコア23をそれぞれ、第1コア21、第2コア22、および第3コア23ともいう。そして、第1コア21と第2コア22との間、および第1コア21と第3コア23との間はデータ通信可能に接続されている。   Further, the CPU 11 includes CPU cores (hereinafter simply referred to as cores) 21, 22 and 23. Hereinafter, the core 21, the core 22, and the core 23 are also referred to as a first core 21, a second core 22, and a third core 23, respectively. And between the 1st core 21 and the 2nd core 22, and between the 1st core 21 and the 3rd core 23 are connected so that data communication is possible.

図2は、ECU1の通常動作時におけるコア21,22,23およびMMU14の動作を説明するブロック図である。
図2に示すように、第1コア21は、ECU1が実行する処理の中で最も優先度が高い処理(以下、重要処理という)を、第1コア21で実行可能な処理負荷の80%を使用して実行する。
FIG. 2 is a block diagram for explaining the operations of the cores 21, 22, 23 and the MMU 14 during normal operation of the ECU 1.
As shown in FIG. 2, the first core 21 performs processing with the highest priority among the processing executed by the ECU 1 (hereinafter referred to as “important processing”) with 80% of the processing load executable by the first core 21. Use to run.

また第2コア22は、第2コア22が実行する処理を管理するサブスケジューラ31,32と、サブスケジューラ31,32を管理するメインスケジューラ35とを動作させる。そしてサブスケジューラ31は、第1コア21が実行する重要処理より優先度が低い処理(以下、通常処理という)を、第2コア22で実行可能な処理負荷の60%を使用して実行し、サブスケジューラ32は、第1コア21の異常時に重要処理を実行するように構成されている。なお、上記スケジューラによるスケジューリング方法として、例えば、EDFまたはPreemptionを用いることができる。   The second core 22 operates the sub-schedulers 31 and 32 that manage the processing executed by the second core 22 and the main scheduler 35 that manages the sub-schedulers 31 and 32. The sub-scheduler 31 executes a process having a lower priority than the important process executed by the first core 21 (hereinafter referred to as a normal process) using 60% of the processing load that can be executed by the second core 22, The sub-scheduler 32 is configured to execute an important process when the first core 21 is abnormal. As the scheduling method by the scheduler, for example, EDF or Preemption can be used.

また第3コア23は、第3コア23が実行する処理を管理するサブスケジューラ41,42と、サブスケジューラ41,42を管理するメインスケジューラ45とを動作させる。そしてサブスケジューラ41は、第2コア22とは異なる通常処理を、第3コア23で実行可能な処理負荷の50%を使用して実行し、サブスケジューラ42は、第1コア21の異常時に重要処理を実行するように構成されている。   The third core 23 operates the sub-schedulers 41 and 42 that manage the processes executed by the third core 23 and the main scheduler 45 that manages the sub-schedulers 41 and 42. The sub-scheduler 41 executes normal processing different from that of the second core 22 using 50% of the processing load executable by the third core 23, and the sub-scheduler 42 is important when the first core 21 is abnormal. It is configured to perform processing.

またRAM13には、コア21,22,23それぞれに割り当てられた第1,2,3コア用記憶領域51,52,53が設けられている。そしてMMU14は、ECU1の通常動作時において、第1,2,3コア用記憶領域51,52,53それぞれに対してコア21,22,23のみがアクセスすることができるようにRAM13を管理する。   The RAM 13 is provided with first, second, third core storage areas 51, 52, 53 assigned to the cores 21, 22, 23, respectively. The MMU 14 manages the RAM 13 so that only the cores 21, 22, and 23 can access the first, second, and third core storage areas 51, 52, and 53 during the normal operation of the ECU 1.

図3は、MMU14によるRAM13の管理方法を説明する図である。
MMU14は、第1,2,3コア用記憶領域51,52,53に設定されたアクセス権を用いて、図3に示すように、特定のコアに割り当てられた記憶領域に対する他のコアからのアクセスを制限することにより、メモリ保護を行う。このときアクセス権の設定は特定の特権レベルでの操作によって変更できる。特権レベルとは、コア21,22,23の動作モードであり、本実施形態では、権限が強い順に、ハイパーバイザモード、およびユーザモードが設定可能に構成され、ハイパーバイザモードを使用することでMMU14のアクセス権を変更することができる。アクセス権は、第1,2,3コア用記憶領域51,52,53にアクセスすることができる権利である。
FIG. 3 is a diagram for explaining a method of managing the RAM 13 by the MMU 14.
The MMU 14 uses the access rights set in the first, second, and third core storage areas 51, 52, and 53, as shown in FIG. 3, from other cores to the storage area assigned to the specific core. Memory protection is provided by restricting access. At this time, the access right setting can be changed by an operation at a specific privilege level. The privilege level is an operation mode of the cores 21, 22, and 23. In this embodiment, the hypervisor mode and the user mode can be set in descending order of authority, and the MMU 14 is configured by using the hypervisor mode. You can change your access rights. The access right is a right to access the first, second, and third core storage areas 51, 52, and 53.

具体的には、第1コア用記憶領域51はアクセス権がコア21に設定され、第2コア用記憶領域52はアクセス権がコア22に設定され、第3コア用記憶領域53はアクセス権がコア23に設定されている。   Specifically, the access right is set for the core 21 in the first core storage area 51, the access right is set for the core 22 in the second core storage area 52, and the access right is set in the third core storage area 53. The core 23 is set.

すなわちMMU14は、ECU1の通常動作時において、第1,2,3コア用記憶領域51,52,53それぞれに対してコア21,22,23のみがアクセスすることができるようにRAM13を管理する。   That is, the MMU 14 manages the RAM 13 so that only the cores 21, 22, and 23 can access the first, second, and third core storage areas 51, 52, and 53 during normal operation of the ECU 1.

このように構成されたECU1において、マイコン3が起動(電源オン)して動作を開始すると、コア21は、RAM13の第1コア用記憶領域51にアクセスし、重要処理のプログラムを読み出して実行する。   In the ECU 1 configured as described above, when the microcomputer 3 is activated (powered on) and starts operating, the core 21 accesses the first core storage area 51 of the RAM 13 and reads and executes a program for important processing. .

またコア22は、マイコン3が起動すると、RAM13の第2コア用記憶領域52にアクセスし、メインスケジューラ35のプログラムを読み出して実行する。これによりメインスケジューラ35は、サブスケジューラ31,32を起動する。但し、メインスケジューラ35は、サブスケジューラ31にリソースを割り当てることでサブスケジューラ31を動作させる一方、サブスケジューラ32にはリソースを割り当てないことでサブスケジューラ32の動作を停止させる。なお、上記のリソースは、コアの実時間性を保証できる時間のうち、処理の実行に対して割り当てられる時間である。そしてサブスケジューラ31がその動作を開始すると、RAM13の第2コア用記憶領域52にアクセスし、通常処理のプログラムを読み出して実行する。   When the microcomputer 3 is activated, the core 22 accesses the second core storage area 52 of the RAM 13 and reads and executes the program of the main scheduler 35. As a result, the main scheduler 35 activates the sub-schedulers 31 and 32. However, the main scheduler 35 operates the sub-scheduler 31 by assigning resources to the sub-scheduler 31, while stopping the operation of the sub-scheduler 32 by not assigning resources to the sub-scheduler 32. Note that the above-mentioned resource is a time allocated to the execution of the process among the time during which the real time property of the core can be guaranteed. When the sub-scheduler 31 starts its operation, the sub-scheduler 31 accesses the second core storage area 52 of the RAM 13 and reads and executes the normal processing program.

またコア23は、マイコン3が起動すると、コア22と同様にして、RAM13の第3コア用記憶領域53にアクセスし、メインスケジューラ45のプログラムを読み出して実行する。これによりメインスケジューラ45は、サブスケジューラ41,42を起動する。但し、メインスケジューラ45は、サブスケジューラ41にリソースを割り当てることでサブスケジューラ41を動作させる一方、サブスケジューラ42にはリソースを割り当てないことでサブスケジューラ42の動作を停止させる。そしてサブスケジューラ41がその動作を開始すると、RAM13の第3コア用記憶領域53にアクセスし、通常処理のプログラムを読み出して実行する。   Further, when the microcomputer 3 is activated, the core 23 accesses the third core storage area 53 of the RAM 13 in the same manner as the core 22 and reads and executes the program of the main scheduler 45. As a result, the main scheduler 45 activates the sub-schedulers 41 and 42. However, the main scheduler 45 operates the sub-scheduler 41 by assigning resources to the sub-scheduler 41, while stopping the operation of the sub-scheduler 42 by not assigning resources to the sub-scheduler 42. When the sub-scheduler 41 starts its operation, it accesses the third core storage area 53 of the RAM 13 and reads and executes the normal processing program.

またコア22,23は、コア21の異常を検出した場合に重要処理をコア21の代わりに行うための異常時代替処理を、上記通常処理の一部として実行する。異常時代替処理は、サブスケジューラ31,41がその動作を開始すると処理を開始し、サブスケジューラ上でその他の通常処理とは独立に処理を実行する。   Further, the cores 22 and 23 execute, as part of the normal process, an abnormality replacement process for performing an important process instead of the core 21 when an abnormality of the core 21 is detected. The abnormal alternative process starts when the sub-schedulers 31 and 41 start their operations, and executes the process independently of other normal processes on the sub-scheduler.

ここで、コア22,23が実行する異常時代替処理の手順を図4〜6を用いて説明する。図4は異常時代替処理の実行状態を示すフローチャートである。図5は、コア21の異常時におけるコア21,22,23およびMMU14の動作を説明するブロック図である。図6(a)は重要処理の内容を示す図、図6(b)は重要処理の配分を示すタイミングチャートである。   Here, the procedure of the substitute processing at the time of abnormality executed by the cores 22 and 23 will be described with reference to FIGS. FIG. 4 is a flowchart showing an execution state of the substitute processing at the time of abnormality. FIG. 5 is a block diagram for explaining the operations of the cores 21, 22, 23 and the MMU 14 when the core 21 is abnormal. FIG. 6A is a diagram showing the contents of important processes, and FIG. 6B is a timing chart showing the distribution of important processes.

この異常時代替処理が実行されると、コア22(コア23)は、まずS10にて、第1コア21で異常が発生したか否かを判断する異常判断処理を実行する。本実施形態では例えば、第1コア21からウォッチドッグタイマの値を示す信号(以下、WDT信号という)を入力し、このWDT信号が示す値が予め設定された異常判定値以上である場合に、第1コア21で異常が発生したと判断する。   When the abnormality substitution process is executed, the core 22 (core 23) first executes an abnormality determination process for determining whether or not an abnormality has occurred in the first core 21 in S10. In the present embodiment, for example, when a signal indicating the value of the watchdog timer (hereinafter referred to as a WDT signal) is input from the first core 21 and the value indicated by the WDT signal is equal to or greater than a preset abnormality determination value, It is determined that an abnormality has occurred in the first core 21.

そしてS20にて、S10での判断結果に基づいて、第1コア21で異常が発生したか否かを判断する。ここで、第1コア21で異常が発生していない場合には(S20:NO)、S10に移行して、上述の処理を実行する状態に戻る。一方、第1コア21で異常が発生した場合には(S20:YES)、S30にて、自身の動作モードをハイパーバイザモードに設定し、MMU14におけるRAM13のアクセス権を、コア22,23から第1コア用記憶領域51にアクセスできるように変更する。これによりコア22,23は、RAM13から重要処理のプログラムを読み出せるようになる。さらにS40にて、第1コア21へリセット信号を出力する。これにより、第1コア21は動作を停止する。   In S20, it is determined whether an abnormality has occurred in the first core 21 based on the determination result in S10. If no abnormality has occurred in the first core 21 (S20: NO), the process proceeds to S10 and returns to the state in which the above-described process is executed. On the other hand, if an abnormality occurs in the first core 21 (S20: YES), in S30, the operation mode is set to the hypervisor mode, and the access right of the RAM 13 in the MMU 14 is changed from the cores 22 and 23 to the first. It changes so that the storage area 51 for 1 core can be accessed. As a result, the cores 22 and 23 can read the important process program from the RAM 13. In S40, a reset signal is output to the first core 21. As a result, the first core 21 stops operating.

その後S50にて、サブスケジューラのリソースを変更する。具体的には、メインスケジューラ35(45)が、サブスケジューラ31(41)とサブスケジューラ32(42)の両方にリソースを割り当てることでサブスケジューラ31(41)とサブスケジューラ32(42)を動作させる。これにより、サブスケジューラ32(42)がその動作を開始すると、図5に示すように、RAM13の第1コア用記憶領域51にアクセスし、重要処理のプログラムを読み出して実行する。   Thereafter, in S50, the resource of the sub-scheduler is changed. Specifically, the main scheduler 35 (45) allocates resources to both the sub-scheduler 31 (41) and the sub-scheduler 32 (42) to operate the sub-scheduler 31 (41) and the sub-scheduler 32 (42). . As a result, when the sub-scheduler 32 (42) starts its operation, as shown in FIG. 5, it accesses the first core storage area 51 of the RAM 13 and reads and executes the important process program.

なお重要処理は、図6(a)に示すように、80%の処理負荷のうち、50%の処理負荷を、クランク角とカム角を検出する処理(以下、クランク・カム角検出処理という)と、燃料噴射制御および点火時期制御のための処理(以下、噴射・点火制御処理という)に割り当て、30%の処理負荷を、排気再循環(EGR)のバルブ開度制御のための処理(以下、排気再循環処理という)に割り当てている。エンジン制御では、噴射・点火制御処理を行う際に、直前のクランク角とカム角の情報を取得しておく必要があるため、クランク・カム角検出処理と噴射・点火制御処理とを分割せずに、同じコア内で実行する必要がある。一方、排気再循環処理は、処理間のタイミングが比較的重要でない。すなわち、実行する間隔がばらついても制御の目的に対して影響が少ない。このため、クランク・カム角検出処理および噴射・点火制御処理とは異なるコア内で排気再循環処理を実行する。   As shown in FIG. 6 (a), the important processing is processing for detecting the crank angle and the cam angle for 50% of the processing load of 80% (hereinafter referred to as crank / cam angle detection processing). And 30% of the processing load assigned to the processing for fuel injection control and ignition timing control (hereinafter referred to as injection / ignition control processing) (hereinafter referred to as exhaust gas recirculation (EGR) valve opening control processing) The exhaust gas recirculation process). In engine control, when performing injection / ignition control processing, it is necessary to obtain information on the previous crank angle and cam angle, so the crank / cam angle detection processing and injection / ignition control processing are not divided. Must run in the same core. On the other hand, in the exhaust gas recirculation process, the timing between processes is relatively unimportant. That is, even if the execution interval varies, there is little influence on the purpose of control. For this reason, the exhaust gas recirculation process is executed in the core different from the crank / cam angle detection process and the injection / ignition control process.

そして、第2コア22のサブスケジューラ32に割り当てられている処理負荷は40%であるため、50%の処理負荷を必要とするクランク・カム角検出処理および噴射・点火制御処理を実行することができない。一方、30%の処理負荷を必要とする排気再循環処理を実行することができる。   Since the processing load assigned to the sub-scheduler 32 of the second core 22 is 40%, the crank / cam angle detection process and the injection / ignition control process that require a processing load of 50% can be executed. Can not. On the other hand, exhaust gas recirculation processing that requires a processing load of 30% can be executed.

また、第3コア23のサブスケジューラ42に割り当てられている処理負荷は50%であるため、50%の処理負荷を必要とするクランク・カム角検出処理および噴射・点火制御処理を実行することができる。   Further, since the processing load assigned to the sub-scheduler 42 of the third core 23 is 50%, the crank / cam angle detection process and the injection / ignition control process that require a processing load of 50% can be executed. it can.

したがって、図6(b)に示すように、重要処理のうち、30%の処理負荷を必要とする排気再循環処理が第2コア22に割り当てられ、50%の処理負荷を必要とするクランク・カム角検出処理および噴射・点火制御処理が第3コア23に割り当てられる。   Therefore, as shown in FIG. 6 (b), among the important processes, the exhaust gas recirculation process that requires a processing load of 30% is allocated to the second core 22, and the crank / recycle process that requires a processing load of 50% is assigned. Cam angle detection processing and injection / ignition control processing are assigned to the third core 23.

つまり、サブスケジューラ32は、その動作を開始すると、RAM13の第1コア用記憶領域51にアクセスし、重要処理の中から、排気再循環処理のプログラムを読み出して実行する。一方、サブスケジューラ42は、その動作を開始すると、RAM13の第1コア用記憶領域51にアクセスし、重要処理の中から、クランク・カム角検出処理および噴射・点火制御処理のプログラムを読み出して実行する。   That is, when the operation starts, the sub-scheduler 32 accesses the first core storage area 51 of the RAM 13 and reads out and executes the exhaust gas recirculation processing program from the important processing. On the other hand, when the sub-scheduler 42 starts its operation, the sub-scheduler 42 accesses the first core storage area 51 of the RAM 13 and reads and executes the crank / cam angle detection processing and injection / ignition control processing programs from the important processing. To do.

そして、図4に示すように、S50の処理が終了すると、S60にて、自身の動作モードをユーザモードに設定し、異常時代替処理を終了する。
このように構成されたECU1では、メインスケジューラ35(45)は、第1コア21で異常が発生していない場合には、リソースをサブスケジューラ31(41)に割り当てるとともに、リソースをサブスケジューラ32(42)に割り当てないようにすることにより、サブスケジューラ31(41)に通常処理を実行させるとともにサブスケジューラ32(42)を停止させ、第1コア21で異常が発生した場合には、リソースをサブスケジューラ31(41)およびサブスケジューラ32(42)に割り当てることにより、サブスケジューラ31(41)に通常処理を実行させるとともにサブスケジューラ32(42)に重要処理を実行させる(S50)。
Then, as shown in FIG. 4, when the process of S50 ends, in S60, its own operation mode is set to the user mode, and the abnormality replacement process is ended.
In the ECU 1 configured as described above, the main scheduler 35 (45) allocates resources to the sub-scheduler 31 (41) and does not allocate resources to the sub-scheduler 32 ( 42), the sub-scheduler 31 (41) executes normal processing and the sub-scheduler 32 (42) is stopped. By assigning to the scheduler 31 (41) and the sub-scheduler 32 (42), the sub-scheduler 31 (41) executes normal processing and the sub-scheduler 32 (42) executes important processing (S50).

これにより、第1コア21で異常が発生すると、第1コア21で異常が発生していない場合にはリソースが割り当てられないことで停止しているサブスケジューラ32(42)に対して、リソースを割り当てることによって、サブスケジューラ32(42)に重要処理を実行させることができる。すなわち、第1コア21で異常が発生した後に第2コア22(第3コア23)を再起動させることなく、第2コア22(第3コア23)が重要処理を実行することができる。そして、コアにおいてリソースを変更するのに要する時間は、コアを再起動するのに要する時間よりも短い。このため、重要処理を実行する第1コア21で異常が発生した場合に、第1コア21に代わって第2コア22(第3コア23)が重要処理の実行を開始するまでの中断期間を短縮することができる。   As a result, when an abnormality occurs in the first core 21, if no abnormality occurs in the first core 21, resources are not allocated to the sub-scheduler 32 (42) that is stopped because the resource is not allocated. By allocating, it is possible to cause the sub-scheduler 32 (42) to execute important processing. That is, the second core 22 (third core 23) can execute the important process without restarting the second core 22 (third core 23) after an abnormality occurs in the first core 21. The time required to change the resource in the core is shorter than the time required to restart the core. For this reason, when an abnormality occurs in the first core 21 that executes the important process, an interruption period until the second core 22 (third core 23) starts executing the important process in place of the first core 21 is reduced. It can be shortened.

また、処理順序が変更されると車両制御に不都合を生じさせる可能性のある処理であるクランク・カム角検出処理と噴射・点火制御処理とを分割せずに、同じコア(すなわち、第2コア22)内で実行されるように重要処理が分割される。これにより、クランク・カム角検出処理と噴射・点火制御処理がそれぞれ異なるコアで実行されることにより処理順序が変更されてしまうという事態の発生を抑制して、車両制御における不都合の発生を抑制することができる。   Also, if the processing sequence is changed, the same core (that is, the second core) can be used without dividing the crank / cam angle detection processing and the injection / ignition control processing, which are processing that may cause inconvenience in vehicle control. The important process is divided so as to be executed within 22). As a result, the occurrence of a situation in which the processing order is changed due to the crank / cam angle detection processing and the injection / ignition control processing being executed by different cores is suppressed, and inconvenience in vehicle control is suppressed. be able to.

また、第2コア22(第3コア23)は、第1コア21から、WDT信号を入力し、このWDT信号が示す値が予め設定された異常判定値以上である場合に、第1コア21で異常が発生したと判断する(S10)。これにより、第1コア21の異常を検出する機能を第2コア22(第3コア23)が備えるため、第1コア21の異常を検出するためのコアを別途設ける必要がなくなる。   The second core 22 (third core 23) receives the WDT signal from the first core 21, and when the value indicated by the WDT signal is equal to or greater than a preset abnormality determination value, It is determined that an abnormality has occurred (S10). Accordingly, since the second core 22 (third core 23) has a function of detecting an abnormality of the first core 21, it is not necessary to separately provide a core for detecting the abnormality of the first core 21.

また、MMU14は、第1コア21に異常が発生していない場合には、第2コア22(第3コア23)が第1コア用記憶領域51にアクセス不能であり、第1コア21に異常が発生した場合には、第2コア22(第3コア23)が第1コア用記憶領域51にアクセス可能であるように、RAM13へのアクセスを管理する。これにより、第1コア21に異常が発生すると第1コア用記憶領域51にアクセス可能である必要がある第2コア22(第3コア23)において、第1コア21に異常が発生していないときに誤って第1コア用記憶領域51にアクセスして重要処理を実行してしまうという事態の発生を防止することができる。   Further, when no abnormality occurs in the first core 21, the MMU 14 cannot access the first core storage area 51 by the second core 22 (third core 23), and the first core 21 is abnormal. If this occurs, the access to the RAM 13 is managed so that the second core 22 (third core 23) can access the first core storage area 51. As a result, in the second core 22 (third core 23) that needs to be able to access the first core storage area 51 when an abnormality occurs in the first core 21, no abnormality occurs in the first core 21. Occasionally, the occurrence of a situation in which the first core storage area 51 is erroneously accessed and an important process is executed can be prevented.

以上説明した実施形態において、ECU1は本発明における車載電子制御装置、第1コア21は本発明におけるメインコア、第2コア22および第3コア23は本発明におけるサブコア、サブスケジューラ31,41は本発明における第1サブスケジューラ、サブスケジューラ32,42は本発明における第2サブスケジューラ、S10の処理は本発明における異常判定手段、WDT信号は本発明における異常判定用信号、RAM13は本発明におけるメモリ、MMU14は本発明におけるメモリ管理手段である。   In the embodiment described above, the ECU 1 is the on-vehicle electronic control device according to the present invention, the first core 21 is the main core according to the present invention, the second core 22 and the third core 23 are the sub-core according to the present invention, and the sub-schedulers 31 and 41 are the main cores. The first sub-scheduler in the invention, the sub-schedulers 32 and 42 are the second sub-scheduler in the present invention, the processing of S10 is the abnormality determination means in the present invention, the WDT signal is the abnormality determination signal in the present invention, the RAM 13 is the memory in the present invention, The MMU 14 is a memory management means in the present invention.

(第2実施形態)
以下に本発明の第2実施形態について図面とともに説明する。なお、第2実施形態では、第1実施形態と異なる部分のみを説明する。
(Second Embodiment)
A second embodiment of the present invention will be described below with reference to the drawings. In the second embodiment, only parts different from the first embodiment will be described.

第2実施形態におけるECU1は、ECU1の通常動作時におけるコア22,23の動作と、異常時代替処理が変更された点以外は第1実施形態と同じである。
図7は、第2実施形態のECU1の通常動作時におけるコア21,22,23およびMMU14の動作を説明するブロック図である。
The ECU 1 in the second embodiment is the same as the first embodiment except that the operation of the cores 22 and 23 during the normal operation of the ECU 1 and the abnormality replacement process are changed.
FIG. 7 is a block diagram illustrating operations of the cores 21, 22, 23 and the MMU 14 during normal operation of the ECU 1 according to the second embodiment.

図7に示すように、第2コア22のサブスケジューラ31が、通常処理を、第2コア22で実行可能な処理負荷の90%を使用して実行し、第3コア23のサブスケジューラ41が、通常処理を、第3コア23で実行可能な処理負荷の80%を使用して実行する点以外は第1実施形態と同じである。   As shown in FIG. 7, the sub-scheduler 31 of the second core 22 executes normal processing using 90% of the processing load that can be executed by the second core 22, and the sub-scheduler 41 of the third core 23 The normal processing is the same as that of the first embodiment except that 80% of the processing load that can be executed by the third core 23 is used.

次に、第2実施形態における異常時代替処理の手順を図8および図9を用いて説明する。図8は、第2実施形態の異常時代替処理の実行状態を示すフローチャートである。図9は、第2実施形態の重要処理の配分を示すタイミングチャートである。   Next, the procedure of the abnormality replacement process in the second embodiment will be described with reference to FIGS. FIG. 8 is a flowchart illustrating an execution state of the abnormality replacement process according to the second embodiment. FIG. 9 is a timing chart showing the distribution of important processes in the second embodiment.

図8に示すように、第2実施形態の異常時代替処理は、S50の処理が省略されてS54の処理が追加された点以外は第1実施形態と同じである。
すなわち、S40の処理が終了すると、S54にて、サブスケジューラのリソースと優先度を変更し、その後にS60に移行する。すなわちS54では、サブスケジューラ31(41),32(42)に割り当てられているリソースを変更するとともに、サブスケジューラ31(41)よりもサブスケジューラ32(42)の優先度を高くする。具体的には、メインスケジューラ35(45)が、サブスケジューラ31(41)に割り当てていたリソースを処理負荷の90%(80%)から70%(50%)に変更するとともに、サブスケジューラ32(42)に割り当てていたリソースを処理負荷の0%(0%)から30%(50%)に変更し、さらに、サブスケジューラ31(41)よりもサブスケジューラ32(42)の方を先に実行させる。
As shown in FIG. 8, the abnormality replacement process of the second embodiment is the same as that of the first embodiment except that the process of S50 is omitted and the process of S54 is added.
That is, when the process of S40 is completed, the resource and priority of the sub-scheduler are changed in S54, and then the process proceeds to S60. That is, in S54, the resources allocated to the sub-schedulers 31 (41) and 32 (42) are changed, and the priority of the sub-scheduler 32 (42) is made higher than that of the sub-scheduler 31 (41). Specifically, the main scheduler 35 (45) changes the resource allocated to the sub-scheduler 31 (41) from 90% (80%) to 70% (50%) of the processing load, and the sub-scheduler 32 ( 42) The resources allocated to 42) are changed from 0% (0%) to 30% (50%) of the processing load, and the sub-scheduler 32 (42) is executed before the sub-scheduler 31 (41). Let

これにより、図9に示すように、第1コア21で異常が発生すると、第2コア22において、第1コア21が実行していた80%の重要処理のうち30%の処理が実行された後に、第2コア22が実行していた90%の通常処理のうち70%の処理が実行される制御が繰り返される。また、第3コア23において、第1コア21が実行していた80%の重要処理のうち50%の処理が実行された後に、第3コア23が実行していた80%の通常処理のうち50%の処理が実行される制御が繰り返される。   As a result, as shown in FIG. 9, when an abnormality occurs in the first core 21, 30% of the 80% important processing executed by the first core 21 is executed in the second core 22. Later, the control in which 70% of the 90% normal processing executed by the second core 22 is executed is repeated. Further, in the third core 23, after 50% of the 80% of important processing executed by the first core 21 is executed, of the 80% normal processing executed by the third core 23 Control in which 50% of the processing is executed is repeated.

このように構成されたECU1では、第1コア21に異常が発生した場合に、重要処理を実行するサブスケジューラ32(42)が、通常処理を実行するサブスケジューラ31(41)よりも優先される(S54)。すなわち、第1コア21に異常が発生した場合であっても、第1コア21が実行していた重要処理を、第2コア22(第3コア23)において、通常処理よりも優先して実行することができる。これにより、通常処理を優先して実行したために重要処理のリソースが少なくなり重要処理を実行できなくなってしまうという事態の発生を防止することができる。   In the ECU 1 configured as described above, when an abnormality occurs in the first core 21, the sub-scheduler 32 (42) that executes the important process has priority over the sub-scheduler 31 (41) that executes the normal process. (S54). In other words, even if an abnormality occurs in the first core 21, the important processing that was executed by the first core 21 is executed with priority over the normal processing in the second core 22 (third core 23). can do. As a result, it is possible to prevent the occurrence of a situation in which the important process is reduced because the normal process is executed with priority, and the important process cannot be executed.

(第3実施形態)
以下に本発明の第3実施形態について図面とともに説明する。なお、第3実施形態では、第2実施形態と異なる部分のみを説明する。
(Third embodiment)
A third embodiment of the present invention will be described below with reference to the drawings. In the third embodiment, only parts different from the second embodiment will be described.

第3実施形態におけるECU1は、異常時代替処理が変更された点以外は第2実施形態と同じである。
次に、第3実施形態における異常時代替処理の手順を図10および図11を用いて説明する。図10は、第3実施形態の異常時代替処理の実行状態を示すフローチャートである。図11(a)は第2コア22の通常処理の内容を示す図、図11(b)は第3実施形態の重要処理および通常処理の配分を示すタイミングチャートである。
The ECU 1 in the third embodiment is the same as that in the second embodiment except that the abnormality replacement process is changed.
Next, the procedure of the abnormality replacement process in the third embodiment will be described with reference to FIGS. FIG. 10 is a flowchart illustrating an execution state of the abnormality replacement process according to the third embodiment. FIG. 11A is a diagram illustrating the contents of normal processing of the second core 22, and FIG. 11B is a timing chart illustrating distribution of important processing and normal processing in the third embodiment.

図10に示すように、第3実施形態の異常時代替処理は、S52の処理が追加された点以外は第2実施形態と同じである。
すなわち、S40の処理が終了すると、S52にて、サブスケジューラ31(41)が実行している通常処理のうちで、動作が停止しても影響が小さいものとして予め設定されている処理を停止し、その後にS54に移行する。
As shown in FIG. 10, the abnormality replacement process of the third embodiment is the same as that of the second embodiment except that the process of S <b> 52 is added.
That is, when the process of S40 is completed, in S52, the process that is set in advance as a small effect even if the operation is stopped is stopped among the normal processes executed by the sub-scheduler 31 (41). Then, the process proceeds to S54.

例えば、第2コア22のサブスケジューラ31が実行する通常処理において、図11(a)に示すように、90%の処理負荷のうち、60%の処理負荷を電源制御処理に割り当て、30%の処理負荷を省燃費制御処理に割り当てているとすると、動作が停止しても車両の安全性に影響が少ない省燃費制御処理を停止させる。   For example, in the normal processing executed by the sub-scheduler 31 of the second core 22, as shown in FIG. 11A, 60% of the processing load of 90% is allocated to the power control process, and 30% Assuming that the processing load is assigned to the fuel saving control process, the fuel saving control process having little influence on the safety of the vehicle is stopped even if the operation is stopped.

これにより、図11に示すように、第1コア21で異常が発生すると、第2コア22において、第2コア22が実行していた90%の通常処理のうち動作が停止しても影響が小さいものとして予め設定されている30%の処理が停止し、次に、第1コア21が実行していた80%の重要処理のうち30%の処理が実行された後に、第2コア22が実行していた90%の通常処理のうち60%の処理が実行される制御が繰り返される。   As a result, as shown in FIG. 11, if an abnormality occurs in the first core 21, the second core 22 is affected even if the operation stops in 90% of the normal processing executed by the second core 22. After 30% of processing set in advance as small is stopped and then 30% of the 80% important processing executed by the first core 21 is executed, the second core 22 Control in which 60% of the 90% normal processing that has been executed is executed is repeated.

また、第1コア21で異常が発生すると、第3コア23において、第3コア23が実行していた80%の通常処理のうち動作が停止しても影響が小さいものとして予め設定されている30%の処理が停止し、次に、第1コア21が実行していた80%の重要処理のうち50%の処理が実行された後に、第3コア23が実行していた80%の通常処理のうち50%の処理が実行される制御が繰り返される。   In addition, when an abnormality occurs in the first core 21, the third core 23 is set in advance as having a small influence even if the operation stops in 80% of the normal processing executed by the third core 23. 30% of the processing is stopped, and then 80% of the 80% important processing executed by the first core 21 is executed, and then 50% of the normal processing executed by the third core 23 is executed. Control in which 50% of the processing is executed is repeated.

このように構成されたECU1では、通常処理のうち動作が停止しても影響が小さいものとして予め設定されている処理が停止される(S52)。これにより、停止した分のリソースを重要処理に割り当てることができる。このため、通常処理に割り当てられたリソースのために重要処理のリソースが少なくなり重要処理を実行できなくなってしまうという事態の発生を防止することができる。   In the ECU 1 configured as described above, a process that is set in advance as an effect that has a small influence even when the operation is stopped is stopped in the normal process (S52). As a result, the stopped resources can be allocated to the important process. For this reason, it is possible to prevent the occurrence of a situation in which the resources assigned to the normal process are reduced and the important process resources are reduced and the important process cannot be executed.

以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の技術的範囲に属する限り種々の形態を採ることができる。
例えば上記実施形態においては、ウォッチドッグタイマを用いてコア22,23側でコア21の異常を検出するものを示したが、コア21の異常検出方法はこれに限定されるものではなく、例えばロックステップを用いてもよい。
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, As long as it belongs to the technical scope of this invention, a various form can be taken.
For example, in the above embodiment, the watchdog timer is used to detect the abnormality of the core 21 on the cores 22 and 23 side, but the abnormality detection method of the core 21 is not limited to this, for example, the lock Steps may be used.

1…ECU、3…マイコン、4…入力回路、5…出力回路、11…CPU、12…ROM、13…RAM、14…MMU、15…I/O、21…第1コア、22…第2コア、23…第3コア、31,32,41,42…サブスケジューラ、35,45…メインスケジューラ、51…第1コア用記憶領域、52…第2コア用記憶領域、53…第3コア用記憶領域   DESCRIPTION OF SYMBOLS 1 ... ECU, 3 ... Microcomputer, 4 ... Input circuit, 5 ... Output circuit, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... MMU, 15 ... I / O, 21 ... 1st core, 22 ... 2nd Core, 23 ... third core, 31, 32, 41, 42 ... sub-scheduler, 35,45 ... main scheduler, 51 ... first core storage area, 52 ... second core storage area, 53 ... third core use Storage area

Claims (5)

複数のコアを備えた車載電子制御装置であって、
複数の前記コアのうち、当該車載電子制御装置が実行する制御処理の中で優先度が高い処理として予め設定された処理である重要処理を実行するコアをメインコアとし、
複数の前記コアのうち、前記重要処理より優先度が低い処理として予め設定された処理である通常処理を実行するコアをサブコアとし、
前記サブコアは、当該サブコアが実行する処理を管理する一つ以上の第1サブスケジューラおよび一つ以上の第2サブスケジューラと、前記第1サブスケジューラおよび前記第2サブスケジューラを管理するメインスケジューラとを動作させるように構成され、
前記メインスケジューラは、
前記メインコアに異常が発生していない場合には、前記サブコアが処理を実行するために必要な時間であるリソースを前記第1サブスケジューラに割り当てるとともに、前記リソースを前記第2サブスケジューラに割り当てないようにすることにより、前記第1サブスケジューラに前記通常処理を実行させるとともに前記第2サブスケジューラを停止させ、
前記メインコアに異常が発生した場合には、前記リソースを前記第1サブスケジューラおよび前記第2サブスケジューラに割り当てることにより、前記第1サブスケジューラに前記通常処理を実行させるとともに前記第2サブスケジューラに前記重要処理を実行させる
ことを特徴とする車載電子制御装置。
An in-vehicle electronic control device having a plurality of cores,
Among the plurality of cores, a main core that executes an important process that is a process set in advance as a process having a high priority among the control processes executed by the in-vehicle electronic control device,
Among the plurality of cores, a core that executes a normal process that is a process set in advance as a process having a lower priority than the important process is a sub-core,
The sub-core includes one or more first sub-schedulers and one or more second sub-schedulers that manage processing executed by the sub-core, and a main scheduler that manages the first sub-scheduler and the second sub-scheduler. Configured to work,
The main scheduler is
If no abnormality occurs in the main core, a resource that is a time required for the sub core to execute processing is allocated to the first sub scheduler, and the resource is not allocated to the second sub scheduler. By causing the first sub-scheduler to execute the normal processing and stopping the second sub-scheduler,
When an abnormality occurs in the main core, the resource is allocated to the first sub-scheduler and the second sub-scheduler, thereby causing the first sub-scheduler to execute the normal process and the second sub-scheduler. An on-vehicle electronic control device characterized in that the important process is executed.
前記サブコアを複数備え、
複数の前記サブコアはそれぞれ、互いに異なる前記通常処理を前記第1サブスケジューラで実行するとともに、分割された前記重要処理のうち互いに異なる処理を前記第2サブスケジューラで実行し、
前記重要処理は、車両を制御するための複数の車両制御処理で構成され、
前記重要処理は、複数の前記車両制御処理のうちで、処理順序が変更されると車両制御に不都合を生じさせる可能性のある処理が同一の前記サブコア内で実行されるように分割される
ことを特徴とする請求項1に記載の車載電子制御装置。
A plurality of the sub-cores;
Each of the plurality of sub-cores executes the different normal processes in the first sub-scheduler, and executes different processes among the divided important processes in the second sub-scheduler.
The important process includes a plurality of vehicle control processes for controlling the vehicle,
The important process is divided so that a process that may cause inconvenience to the vehicle control when the process order is changed among the plurality of the vehicle control processes is executed in the same sub-core. The on-vehicle electronic control device according to claim 1.
前記メインスケジューラは、
前記第2サブスケジューラが前記第1サブスケジューラより優先して処理を実行するように管理する
ことを特徴とする請求項1または請求項2に記載の車載電子制御装置。
The main scheduler is
The on-vehicle electronic control device according to claim 1, wherein the second sub-scheduler performs management so that the processing is executed with priority over the first sub-scheduler.
前記サブコアは、
前記メインコアから、異常判定のために予め設定された異常判定用信号を入力し、前記異常判定用信号に基づいて、前記メインコアに異常が発生したか否かを判定する異常判定手段を備える
ことを特徴とする請求項1〜請求項3の何れか1項に記載の車載電子制御装置。
The sub-core is
An abnormality determination means is provided for inputting an abnormality determination signal set in advance for abnormality determination from the main core and determining whether an abnormality has occurred in the main core based on the abnormality determination signal. The vehicle-mounted electronic control apparatus of any one of Claims 1-3 characterized by the above-mentioned.
前記重要処理を実行するための重要処理プログラムと、前記通常処理を実行するための通常処理プログラムとを記憶するメモリを備え、
前記メインコアおよび前記サブコアは、前記メモリにアクセスしてプログラムを取得することにより処理を実行することができるように構成され、
前記メインコアに異常が発生していない場合には、前記サブコアが前記重要処理プログラムにアクセス不能であり、前記メインコアに異常が発生した場合には前記サブコアが前記重要処理プログラムにアクセス可能であるように、前記メモリへのアクセスを管理するメモリ管理手段を備える
ことを特徴とする請求項1〜請求項4の何れか1項に記載の車載電子制御装置。
A memory for storing an important process program for executing the important process and a normal process program for executing the normal process;
The main core and the sub-core are configured to execute processing by accessing the memory and acquiring a program,
When no abnormality occurs in the main core, the sub-core cannot access the important processing program. When an abnormality occurs in the main core, the sub-core can access the important processing program. As described above, the vehicle-mounted electronic control device according to any one of claims 1 to 4, further comprising memory management means for managing access to the memory.
JP2011132465A 2011-06-14 2011-06-14 In-vehicle electronic control unit Active JP5533789B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2011132465A JP5533789B2 (en) 2011-06-14 2011-06-14 In-vehicle electronic control unit
DE102012209789.9A DE102012209789B4 (en) 2011-06-14 2012-06-12 ON-VEHICLE ELECTRICAL CONTROL DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011132465A JP5533789B2 (en) 2011-06-14 2011-06-14 In-vehicle electronic control unit

Publications (2)

Publication Number Publication Date
JP2013003724A JP2013003724A (en) 2013-01-07
JP5533789B2 true JP5533789B2 (en) 2014-06-25

Family

ID=47228652

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011132465A Active JP5533789B2 (en) 2011-06-14 2011-06-14 In-vehicle electronic control unit

Country Status (2)

Country Link
JP (1) JP5533789B2 (en)
DE (1) DE102012209789B4 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150044776A (en) * 2013-10-17 2015-04-27 엘에스산전 주식회사 Apparatus and method for data processing of Electric Vehicle
US20160328272A1 (en) * 2014-01-06 2016-11-10 Jonson Controls Technology Company Vehicle with multiple user interface operating domains
JP2017111662A (en) * 2015-12-17 2017-06-22 日立オートモティブシステムズ株式会社 Electronic controller
DE102017210151A1 (en) * 2017-06-19 2018-12-20 Zf Friedrichshafen Ag Device and method for controlling a vehicle module in response to a state signal
JP7006451B2 (en) * 2018-03-30 2022-01-24 株式会社デンソー Electronic control device and multi-core allocation method
JP7375597B2 (en) * 2020-02-13 2023-11-08 株式会社オートネットワーク技術研究所 In-vehicle ECU, information processing method, and in-vehicle system
JP7409567B2 (en) * 2021-07-09 2024-01-09 株式会社デンソー Automotive computer control method and vehicle electronic control device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6219801B1 (en) 1996-06-20 2001-04-17 Fujitsu Limited Work inheriting system
JP3420919B2 (en) * 1997-09-19 2003-06-30 株式会社日立製作所 Information processing device
JP4831599B2 (en) 2005-06-28 2011-12-07 ルネサスエレクトロニクス株式会社 Processing equipment
JP4458119B2 (en) 2007-06-11 2010-04-28 トヨタ自動車株式会社 Multiprocessor system and control method thereof

Also Published As

Publication number Publication date
DE102012209789A1 (en) 2012-12-20
JP2013003724A (en) 2013-01-07
DE102012209789B4 (en) 2022-07-21

Similar Documents

Publication Publication Date Title
JP5533789B2 (en) In-vehicle electronic control unit
JP5316718B1 (en) Multi-core processor
CN108351840B (en) Vehicle control device
US9164799B2 (en) Multiprocessor system
US20090113439A1 (en) Method and Apparatus for Processing Data
WO2015045507A1 (en) Vehicular control device
US20080184258A1 (en) Data processing system
JP5699896B2 (en) Information processing apparatus and abnormality determination method
JP6349444B2 (en) Vehicle control device
US10269194B2 (en) Multiprocessor system and vehicle control system
JP2013061783A (en) Multi-core processor
JP5842833B2 (en) Information processing apparatus and program
JP2023032307A (en) Virtualization control device and interrupt control method
JP7204443B2 (en) VEHICLE CONTROL DEVICE AND PROGRAM EXECUTION METHOD
JP5561241B2 (en) Microcomputer
JP6183251B2 (en) Electronic control unit
JP2017204083A (en) Memory protection system
US9740584B2 (en) Method and device for testing a computer core in a processor having at least two computer cores
WO2017002939A1 (en) Electronic control device and stack usage method
JP2017107394A (en) Vehicle controller
JP6466269B2 (en) Electronic control device and stack area usage monitoring method
JP5703505B2 (en) Computer with bus partition structure
JP7676080B2 (en) Electronic control device for vehicle and control method using electronic control device for vehicle
JP2019135656A (en) Electronic control device and method of using stack
JP2013152563A (en) Electronic control device and memory check method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130306

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140326

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

R151 Written notification of patent or utility model registration

Ref document number: 5533789

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140414

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250