[go: up one dir, main page]

JP2012108786A - Microcomputer and processing synchronization method - Google Patents

Microcomputer and processing synchronization method Download PDF

Info

Publication number
JP2012108786A
JP2012108786A JP2010258047A JP2010258047A JP2012108786A JP 2012108786 A JP2012108786 A JP 2012108786A JP 2010258047 A JP2010258047 A JP 2010258047A JP 2010258047 A JP2010258047 A JP 2010258047A JP 2012108786 A JP2012108786 A JP 2012108786A
Authority
JP
Japan
Prior art keywords
core
processing
predetermined information
processing unit
crank
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010258047A
Other languages
Japanese (ja)
Inventor
Tetsuro Nakamura
哲朗 中村
Wachio Kobayashi
和千男 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2010258047A priority Critical patent/JP2012108786A/en
Publication of JP2012108786A publication Critical patent/JP2012108786A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Multi Processors (AREA)
  • Bus Control (AREA)
  • Electrical Control Of Ignition Timing (AREA)
  • Electrical Control Of Air Or Fuel Supplied To Internal-Combustion Engine (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)
  • Debugging And Monitoring (AREA)

Abstract

【課題】一方のコアから他方のコアに割込みによりイベントを通知する際、イベントの誤通知を検知できるマイコンを提供すること。
【解決手段】第1のコア52と第2のコア53間で通信する通信手段43と、第1のコアと第2のコアが共有する共有メモリ51と、外部信号を取得して第1の処理を実行し、第1の処理毎に所定情報を共有メモリに書き込む第1の処理手段55と、通信手段を介して第2のコアに処理要求を出力する処理要求手段33と、処理要求をトリガーに第2の処理を実行する第2の処理手段56と、を有するマイコン100において、第2のコアは、処理要求を受け付けた場合、共有メモリから最新の所定情報と前回の所定情報を読み出し、最新の所定情報と前回の所定情報に規定された関係がある場合のみ、第2の処理手段に第2の処理の実行を許可する比較手段57、を有する。
【選択図】図2
An object of the present invention is to provide a microcomputer capable of detecting an erroneous notification of an event when an event is notified from one core to the other core by an interrupt.
Communication means 43 for communicating between a first core 52 and a second core 53, a shared memory 51 shared by the first core and the second core, an external signal is acquired and the first A first processing unit 55 that executes processing and writes predetermined information to the shared memory for each first processing; a processing request unit 33 that outputs a processing request to the second core via the communication unit; In the microcomputer 100 having the second processing unit 56 that executes the second processing as a trigger, the second core reads the latest predetermined information and the previous predetermined information from the shared memory when receiving a processing request. Only when there is a relationship defined by the latest predetermined information and the previous predetermined information, the second processing means has a comparison means 57 that permits execution of the second processing.
[Selection] Figure 2

Description

本発明は、複数のコアが同期しながら処理を実行するマイコンに関し、特に、同期の誤検知を検出できるマイコンに関する。   The present invention relates to a microcomputer that executes processing while synchronizing a plurality of cores, and more particularly to a microcomputer that can detect erroneous detection of synchronization.

車両のエンジンは電子制御装置により種々の制御が行われている。例えば、燃焼室への燃料噴射タイミングの決定、イグナイタの点火タイミング、燃料噴射量の決定などは電子制御装置が演算やマップ引きなどにより行っている。このようなエンジン制御はクランク角に応じた適切なタイミングで行うことが好ましく、電子制御装置はNEセンサの信号の入力に基づきエンジン制御に付随する処理を開始する。   Various controls are performed on the vehicle engine by an electronic control unit. For example, the determination of the fuel injection timing to the combustion chamber, the ignition timing of the igniter, the determination of the fuel injection amount, and the like are performed by the electronic control device by calculation or map drawing. Such engine control is preferably performed at an appropriate timing according to the crank angle, and the electronic control device starts processing associated with engine control based on the input of a signal from the NE sensor.

ここで、電子制御装置においてもCPUのマルチコア化が図れるようになってきたため、エンジン制御に関する種々の制御を複数のコアで分担する技術が考案されている(例えば、特許文献1参照。)。特許文献1には、エンジン制御のための処理に関する割り込み要求をマスターコアがスレーブコアに対して行い、スレーブコアが割り込み要求に応じたエンジン制御のための処理を行えない場合、エンジン制御のための処理に関する優先度を高く設定するマルチコアプロセッサが開示されている。   Here, since it has become possible to make the CPU multi-core also in the electronic control device, a technique has been devised in which various controls related to engine control are shared by a plurality of cores (see, for example, Patent Document 1). In Patent Document 1, when a master core issues an interrupt request for processing for engine control to a slave core, and the slave core cannot perform processing for engine control in response to the interrupt request, A multi-core processor that sets a high priority for processing is disclosed.

このように、エンジン制御のための処理を複数のコアで分担する場合、コア同士が処理を同期できるように、一方のコアが他方のコアに処理のタイミングを割込みにより通知することがある。   As described above, when processing for engine control is shared by a plurality of cores, one core may notify the processing timing to the other core by an interrupt so that the cores can synchronize processing.

しかしながら、コア間の割込み要求を処理開始のタイミングとすると、割込みの誤通知が生じることがある。
図1は、割込みの誤通知を説明する図の一例である。時刻t1にマスターコアがスレーブコアに割込みを利用したイベントを通知し、マスターコアとスレーブコアが並行にクランク同期処理を行っている。しかし、時刻t2では、マスターコアがスレーブコアに割込みを利用してイベントを通知していないのに、スレーブコアが誤通知を受け付けている。このような誤通知は、外部からの攻撃的な手法(電気的なノイズ、割込み信号線の接触不良やショートなど)により極めて希であるが生じてしまうことがある。誤通知が生じると、スレーブコアは正しくないタイミングでクランク同期処理を行ってしまう。
However, if an interrupt request between cores is set as the processing start timing, an erroneous notification of an interrupt may occur.
FIG. 1 is an example of a diagram illustrating erroneous notification of an interrupt. At time t1, the master core notifies the slave core of an event using an interrupt, and the master core and the slave core perform crank synchronization processing in parallel. However, at time t2, although the master core does not notify the slave core of an event using an interrupt, the slave core accepts an erroneous notification. Such false notifications may occur very rarely due to an aggressive approach from the outside (such as electrical noise, interrupt signal line contact failure or short circuit). When an erroneous notification occurs, the slave core performs crank synchronization processing at an incorrect timing.

ここで、コア間でデータの送信タイミングを通知する技術が考案されている(例えば、特許文献2参照。)。特許文献2には、メインCPUはイベントデータを読み出した後、メモリに前回書き込んだ値と異なるデータを書き込み、サブCPUはメモリを常時監視して、読み出した時に値が前回読み出した値と比較して変化がある場合、メモリからデータを読み出すマルチプロセッサが開示されている。特許文献2の技術であれば、割込みの代わりにデータの監視により、処理の開始を通知することができる。   Here, a technique for notifying data transmission timing between cores has been devised (see, for example, Patent Document 2). In Patent Document 2, after reading the event data, the main CPU writes data different from the previously written value to the memory, and the sub CPU constantly monitors the memory and compares the value with the previously read value when reading. If there is a change, a multiprocessor is disclosed that reads data from memory. If it is the technique of patent document 2, the start of a process can be notified by monitoring data instead of interruption.

特開2010−113419号公報JP 2010-113419 A 特開平05−346908号公報JP 05-346908 A

しかしながら、特許文献2に開示されたデータの送信タイミングの通知方法では、サブCPUが定期的にメモリにアクセスする必要があるため、サブCPUの処理負荷が大きいという問題がある。また、サブCPUが常時監視するのでなく、メインCPUがデータを書き込む定期的な周期でサブCPUがメモリを監視すれば、サブCPUの処理負荷を低減できる。しかしこの場合は、サブCPUがタイマなどの不具合によりメモリにアクセスするタイミングを逸するおそれが生じる。   However, the data transmission timing notification method disclosed in Patent Document 2 has a problem that the processing load on the sub CPU is heavy because the sub CPU needs to access the memory periodically. Further, if the sub CPU monitors the memory at a regular cycle in which data is written by the main CPU instead of being constantly monitored by the sub CPU, the processing load on the sub CPU can be reduced. However, in this case, there is a risk that the sub CPU may miss the timing of accessing the memory due to a malfunction such as a timer.

したがって、コア間の処理を同期させるには、割込みを利用しながら、処理のタイミングを正確に検出することが好ましいと考えられる。   Therefore, in order to synchronize the processing between the cores, it is preferable to accurately detect the processing timing while using the interrupt.

本発明は、上記課題に鑑み、一方のコアから他方のコアに割込みによりイベントを通知する際、イベントの誤通知を検知できるマイコンを提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a microcomputer capable of detecting an erroneous notification of an event when an event is notified from one core to the other core by an interrupt.

上記課題に鑑み、本発明は、第1のコア及び第2のコアと、前記第1のコアと前記第2のコア間の通信を可能にする通信手段と、前記第1のコアと前記第2のコアが共有する共有メモリと、前記第1のコアが備える、外部信号を取得する毎に繰り返し第1の処理を実行し、前記第1の処理毎に所定情報を前記共有メモリに書き込む第1の処理手段と、前記第1の処理毎に前記通信手段を介して前記第2のコアに処理要求を出力する処理要求手段と、前記第2のコアが備える、前記処理要求をトリガーに第2の処理を実行する第2の処理手段と、を有するマイコンにおいて、前記第2のコアは、前記処理要求を受け付けた場合、前記共有メモリから最新の前記所定情報と前回の前記所定情報を読み出し、最新の前記所定情報と前回の前記所定情報に規定された関係がある場合のみ、前記第2の処理手段に前記第2の処理の実行を許可する比較手段、を有することを特徴とする。   In view of the above problems, the present invention provides a first core and a second core, communication means for enabling communication between the first core and the second core, the first core, and the first core. A shared memory shared by two cores, and a first process that is included in the first core and repeatedly executes a first process each time an external signal is acquired, and writes predetermined information to the shared memory for each first process. 1 processing means, a processing request means for outputting a processing request to the second core via the communication means for each first processing, and a processing request provided in the second core, triggered by the processing request. When the second core receives the processing request, the second core reads the latest predetermined information and the previous predetermined information from the shared memory when receiving the processing request. The latest predetermined information and the previous predetermined information Only if relationship defined in, and having a comparison means, for permitting the execution of the second process on the second processing means.

一方のコアから他方のコアに割込みによりイベントを通知する際、イベントの誤通知を検知できるマイコンを提供することができる。   When an event is notified from one core to the other core by an interrupt, a microcomputer capable of detecting an erroneous notification of the event can be provided.

割込みの誤通知を説明する図の一例である。It is an example of the figure explaining the erroneous notification of interruption. 電子制御装置の特徴部を模式的に説明する図の一例である。It is an example of the figure which illustrates the characterizing part of an electronic controller typically. 電子制御装置により制御されるエンジンの概略構成図の一例である。It is an example of the schematic block diagram of the engine controlled by an electronic controller. 電子制御装置のハードウェア構成図の一例である。It is an example of the hardware block diagram of an electronic controller. 電子制御装置の機能ブロック図の一例である。It is an example of the functional block diagram of an electronic controller. 電子制御装置の動作手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the operation | movement procedure of an electronic controller. スレーブコアが正常なイベント通知を取得した場合のシーケンス図の一例である。It is an example of the sequence diagram when a slave core acquires a normal event notification. スレーブコアがイベントの誤通知を取得した場合のシーケンス図の一例である。It is an example of the sequence diagram when a slave core acquires the erroneous notification of an event. 電子制御装置の機能ブロック図の一例である(実施例2)。It is an example of the functional block diagram of an electronic control apparatus (Example 2). 誤通知回数に基づく演算の停止処理を説明する図の一例である。It is an example of the figure explaining the stop process of the calculation based on the frequency | count of false notification. 電子制御装置の機能ブロック図の一例である(実施例3)。(Example 3) which is an example of the functional block diagram of an electronic controller. 演算結果と誤通知回数に基づく演算処理の停止処理を説明する図の一例である。It is an example of the figure explaining the stop process of the calculation process based on a calculation result and the frequency | count of an erroneous notification. ハイブリッドECUと車載LANを介して接続された電子制御装置を示す図の一例である。It is an example of the figure which shows the electronic control apparatus connected via hybrid ECU and vehicle-mounted LAN.

以下、本発明を実施するための形態について図面を参照しながら説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

図2は、本実施形態の電子制御装置の特徴部を模式的に説明する図の一例である。図2(a)はイベントの誤通知が生じていない場合のマスターコアとスレーブコアの処理手順を示す。
(A1)マスターコアはNEセンサからの信号入力を取得すると処理(例えば、クランクカウンタ操作処理)を行い、処理結果を共有RAMの今回値に書き込む。
(A2)マスターコアは処理が終わるとスレーブコアに割込みによるイベント通知を行う。
(A3)スレーブコアはイベント通知をトリガーに、共有RAMの前回値と今回値を比較する。今回値は、(1)のマスターコアの書き込みが正常に終了していれば、必ず前回値と異なる。
(A4)スレーブコアは今回値と前回値が異なっているはずであるという前提を利用して、今回値と前回値が異なっていれば、今回値を前回値に複写する。これにより、前回値と今回値が等しくなる(図ではどちらも30になる)。
FIG. 2 is an example of a diagram schematically illustrating the characteristic part of the electronic control device of the present embodiment. FIG. 2A shows a processing procedure of the master core and the slave core when no erroneous notification of an event has occurred.
(A1) When the master core acquires a signal input from the NE sensor, the master core performs processing (for example, crank counter operation processing) and writes the processing result in the current value of the shared RAM.
(A2) When the processing is completed, the master core notifies the slave core of an event by interruption.
(A3) The slave core compares the previous value with the current value of the shared RAM using the event notification as a trigger. The current value is always different from the previous value if the writing of the master core in (1) has been completed normally.
(A4) Using the premise that the current value and the previous value should be different, the slave core copies the current value to the previous value if the current value and the previous value are different. As a result, the previous value and the current value are equal (both are 30 in the figure).

マスターコアからスレーブコアに正常にイベント通知が出力される場合には、(A1)〜(A4)が繰り返される。スレーブコアは、今回値と前回値が異なっている場合、処理(例えば、クランク同期処理)を実行する。   When the event notification is normally output from the master core to the slave core, (A1) to (A4) are repeated. If the current value and the previous value are different, the slave core executes processing (for example, crank synchronization processing).

図2(b)はイベントの誤通知が生じた場合のマスターコアとスレーブコアの処理手順を示す。
(B1)マスターコアがイベント通知する前に、イベントの誤通知がスレーブコアに出力される。この場合、マスターコアはNEセンサからの信号入力に基づく処理も今回値の更新も行っていないので、前回値と今回値が同じ状態のままである。
(B2)スレーブコアはイベントの誤通知をトリガーに、共有RAMの前回値と今回値を比較する。
(B3)しかし、前回値と今回値が同じなので、スレーブコアはイベント通知は誤通知であったことを検出できる。イベントの誤通知を検出したスレーブコアは処理(例えば、クランク同期処理)を実行しないので、正常でないタイミングの処理を行うことを防止できる。
FIG. 2B shows a processing procedure of the master core and the slave core when an erroneous notification of an event occurs.
(B1) Before the master core notifies the event, an erroneous notification of the event is output to the slave core. In this case, since the master core does not perform processing based on signal input from the NE sensor nor update the current value, the previous value and the current value remain the same.
(B2) The slave core compares the previous value with the current value of the shared RAM, triggered by an erroneous notification of the event.
(B3) However, since the previous value and the current value are the same, the slave core can detect that the event notification is a false notification. Since the slave core that has detected the erroneous notification of the event does not execute processing (for example, crank synchronization processing), it is possible to prevent processing at an abnormal timing.

〔構成〕
図3は、電子制御装置100により制御されるエンジン200の概略構成図の一例を示す。エンジン200は、ピストン17の往復運動を回転運動に変換するレシプロエンジンである。図では気筒が1つだが通常のエンジン200は直列又はV時方向に複数の気筒を有し、各気筒のコネクティングロッド18が1つのクランクシャフト20に接続されている。
〔Constitution〕
FIG. 3 shows an example of a schematic configuration diagram of the engine 200 controlled by the electronic control unit 100. The engine 200 is a reciprocating engine that converts the reciprocating motion of the piston 17 into a rotational motion. Although a single cylinder is shown in the drawing, a normal engine 200 has a plurality of cylinders in series or in the V-hour direction, and a connecting rod 18 of each cylinder is connected to one crankshaft 20.

気筒内には、コネクティングロッド18と連結されたピストン17が収容され、気筒の内周面とピストン17によって燃焼室が形成される。燃焼室には、燃料を噴射するインジェクタ16、燃焼室で空気と燃料との混合気に点火するイグナイタ13とが設けられている。燃焼室には、吸気バルブ15で仕切られた吸入空気を供給する吸気通路14と、燃焼後の排気が排出される排気バルブ12で仕切られた排気通路11が接続されている。   A piston 17 connected to the connecting rod 18 is accommodated in the cylinder, and a combustion chamber is formed by the inner peripheral surface of the cylinder and the piston 17. The combustion chamber is provided with an injector 16 for injecting fuel, and an igniter 13 for igniting a mixture of air and fuel in the combustion chamber. An intake passage 14 for supplying intake air partitioned by an intake valve 15 and an exhaust passage 11 partitioned by an exhaust valve 12 for discharging exhaust gas after combustion are connected to the combustion chamber.

クランクシャフト20の一端にはクランクシャフトタイミングロータ19が同軸に固定されており、クランクシャフトタイミングロータ19の外縁に対向してクランクポジションセンサ(以下、NEセンサという)21が配置されている。NEセンサ21の原理はどのようなものでもよいが、例えば、クランクシャフトタイミングロータ19の円周に等間隔に突起部を設けておき、クランクシャフト20の回転により突起部が移動することで生じる突起部とNEセンサ21のエアギャップの変化を利用する。NEセンサ21はコイルを有しておりエアギャップの変化により起電力を検出できるので、起電力の周期的な変化からクランクシャフト20の回転角を検出できる。   A crankshaft timing rotor 19 is coaxially fixed to one end of the crankshaft 20, and a crank position sensor (hereinafter referred to as “NE sensor”) 21 is disposed facing the outer edge of the crankshaft timing rotor 19. Although the principle of the NE sensor 21 may be any, for example, protrusions are provided at equal intervals on the circumference of the crankshaft timing rotor 19, and protrusions generated by the protrusions moving by rotation of the crankshaft 20. The change in the air gap between the sensor and the NE sensor 21 is used. Since the NE sensor 21 has a coil and can detect an electromotive force by a change in the air gap, the rotation angle of the crankshaft 20 can be detected from a periodic change in the electromotive force.

また、クランクシャフトタイミングロータ19の突起部は一箇所だけ欠けており、NEセンサ21はこれよりクランクシャフト20の基準角度(クランクシャフトが1回転したこと)を検出できるようになっている。クランクシャフトタイミングロータ19は欠損部がピストン17の上死点に一致するように取り付けられている。   Further, only one portion of the projection of the crankshaft timing rotor 19 is missing, so that the NE sensor 21 can detect the reference angle of the crankshaft 20 (that the crankshaft has rotated once). The crankshaft timing rotor 19 is attached so that the missing portion coincides with the top dead center of the piston 17.

ピストン17が下死点付近まで移動するとタイミングベルトとカムの作用で吸気バルブ15が開き、燃焼室に空気が吸気される。この時、電子制御装置(ECU)100は、クランク角に基づきピストン17の位置を検出して、インジェクタ16に燃料を噴射させる。その後、ピストン17が上死点付近まで移動すると、電子制御装置100は、クランク角に基づきピストン17の位置を検出して、イグナイタ13を通電し燃焼室の混合気に点火する。この燃焼工程によりピストン17が上死点から下死点まで移動し再度、上死点方向に移動を始めると、タイミングベルトとカムの作用で排気バルブ12が開き、燃焼室の燃焼ガスが排気される。このようなピストン17の往復運動に伴い、クランクシャフト20が回転し、車両の駆動輪に伝達される。   When the piston 17 moves to near the bottom dead center, the intake valve 15 is opened by the action of the timing belt and the cam, and air is taken into the combustion chamber. At this time, the electronic control unit (ECU) 100 detects the position of the piston 17 based on the crank angle, and causes the injector 16 to inject fuel. Thereafter, when the piston 17 moves to near the top dead center, the electronic control unit 100 detects the position of the piston 17 based on the crank angle, energizes the igniter 13 and ignites the air-fuel mixture in the combustion chamber. When the piston 17 moves from the top dead center to the bottom dead center by this combustion process and starts moving again in the direction of the top dead center, the exhaust valve 12 is opened by the action of the timing belt and the cam, and the combustion gas in the combustion chamber is exhausted. The As the piston 17 reciprocates, the crankshaft 20 rotates and is transmitted to the drive wheels of the vehicle.

図4は、電子制御装置100のハードウェア構成図の一例を示す。電子制御装置100はプロセッサを備えたマイコンであればよい。電子制御装置100は、マルチレイヤーバス36を介して接続されたコア(区別する場合コア1、コア2という)31、DMAC35、SDRAM37、I/Oブリッジ38及びROM39を有する。2つのコア31は、それぞれCPU32,INT33及びRAM34を有する。   FIG. 4 shows an example of a hardware configuration diagram of the electronic control device 100. The electronic control device 100 may be a microcomputer provided with a processor. The electronic control device 100 includes a core (core 1 and core 2 when distinguished) 31, a DMAC 35, an SDRAM 37, an I / O bridge 38, and a ROM 39 connected via a multilayer bus 36. The two cores 31 have a CPU 32, an INT 33, and a RAM 34, respectively.

CPU32は、IFU(Instruction Fetch Unit)、DEC(DECoder)、RF(Register Fetch)、REG(REGister)、LSU(Load Store Unit)、SH(SHifter)、ALU、MUL及びFPU等の演算回路を有し、パイプライン制御により1クロックで1命令を実行する。   The CPU 32 has arithmetic circuits such as IFU (Instruction Fetch Unit), DEC (DECoder), RF (Register Fetch), REG (REGister), LSU (Load Store Unit), SH (Shifter), ALU, MUL, and FPU. , One instruction is executed in one clock by pipeline control.

RAM1はコア1に専用のメモリ(一次キャッシュ)であり、RAM2はコア2に専用のメモリ(一次キャッシュ)である。本実施形態のコア31では、コア1がマスターコア、コア2がスレーブコアに割り当てられるが、出荷後に、コア1、2とマスターコアとスレーブコアの関係を適宜切り替え可能としてもよい。
INT1とINT2は、通信線43を介してCPU間割り込みを制御すると共に、コア1からコア2又はコア2からコア1に、パラメータ等の送受信を制御する。また、INT1,INT2は、RAM1、RAM2、又は、SDRAM37を共有の通信用メモリ(共有メモリ)にしてパラメータ等を送受信することもできる。
The RAM 1 is a memory dedicated to the core 1 (primary cache), and the RAM 2 is a memory dedicated to the core 2 (primary cache). In the core 31 of the present embodiment, the core 1 is assigned to the master core, and the core 2 is assigned to the slave core. However, after shipment, the relationship between the cores 1 and 2, the master core, and the slave core may be appropriately switched.
INT1 and INT2 control interrupts between CPUs via the communication line 43, and control transmission / reception of parameters and the like from the core 1 to the core 2 or from the core 2 to the core 1. The INT1 and INT2 can also transmit and receive parameters and the like by using the RAM1, RAM2, or SDRAM 37 as a shared communication memory (shared memory).

DMAC35は、コア1及びコア2から要求を受けてプログラム40をSDRAM37、RAM1、RAM2に読み込んだり、周辺機器からのメモリアクセス要求を調停すると共に、I/Oブリッジ38からSDRAM37へ、又は、SDRAM37からI/Oブリッジ38への、コア1、コア2を介することなくデータを転送する。SDRAM37は、コア1及びコア2にプログラム40又はデータを提供するためのメモリ(二次キャッシュ)である。SDRAM37の少なくとも一部はコア1とコア2により共有される。   The DMAC 35 receives a request from the core 1 and the core 2, reads the program 40 into the SDRAM 37, RAM 1, RAM 2, arbitrates a memory access request from a peripheral device, and also from the I / O bridge 38 to the SDRAM 37 or from the SDRAM 37. Data is transferred to the I / O bridge 38 without going through the core 1 and the core 2. The SDRAM 37 is a memory (secondary cache) for providing the program 40 or data to the core 1 and the core 2. At least a part of the SDRAM 37 is shared by the core 1 and the core 2.

ROM39には後述するプログラム40や、OSやデバイスドライバ(プラットフォーム)も記憶されている。   The ROM 39 also stores a program 40 (to be described later), an OS, and a device driver (platform).

I/Oブリッジ38は、マルチレイヤーバス36とI/Oバス42の間で相互に周波数や電圧値などを変換する。I/Oバス42には種々のI/O41が接続されている。I/O41は電子制御装置100と外部の機器を接続するインタフェースであり、例えば、上記のNEセンサ21、CANコントローラ、各種のアクチュエータ、センサ、スイッチ等が接続される。   The I / O bridge 38 converts a frequency, a voltage value, and the like between the multilayer bus 36 and the I / O bus 42. Various I / Os 41 are connected to the I / O bus 42. The I / O 41 is an interface that connects the electronic control device 100 and external devices. For example, the NE sensor 21, the CAN controller, various actuators, sensors, and switches are connected to the I / O 41.

図5は、電子制御装置100の機能ブロック図の一例を示す。図5では説明上、重要な部品についてのみ図示した。共有RAM51はRAM1,RAM2又はSDRAM37のいずれかでよく、マスターコア52とスレーブコア53は2つのコア1、コア2のいずれかである。なお、コア1とコア2は同様のハードウェア構造としているが、マスターコア52とスレーブコア53のハードウェア構造が異なっていてもよい。   FIG. 5 shows an example of a functional block diagram of the electronic control device 100. In FIG. 5, only important parts are illustrated for the sake of explanation. The shared RAM 51 may be any one of the RAM 1, the RAM 2, and the SDRAM 37, and the master core 52 and the slave core 53 are any one of the two cores 1 and 2. Although the core 1 and the core 2 have the same hardware structure, the master core 52 and the slave core 53 may have different hardware structures.

マスターコア52は、CPU32がプログラム40を実行して実現するクランク同期処理部54及びクランクカウンタ操作処理部55を有し、スレーブコア53はクランク同期処理部56及びクランク同期処理実行可否判定処理部57を有する。   The master core 52 includes a crank synchronization processing unit 54 and a crank counter operation processing unit 55 that are realized by the CPU 32 executing the program 40, and the slave core 53 is a crank synchronization processing unit 56 and a crank synchronization processing execution availability determination processing unit 57. Have

まず、クランクカウンタ操作処理部55は、NEセンサ21から入力されるNEセンサ信号に基づいて、エンジン回転角をカウントしたり、エンジン回転数を算出したりする。以下、これらの処理をクランクカウンタ操作処理と称する。NEセンサ21は突起部とのエアギャップにより形成される電圧波形をパルスに整形し、パルスの立ち上がりエッジと立ち下がりエッジの各検出時点(両方を区別せずにNEセンサ信号という)を示す信号をマスターコア52に供給する。   First, the crank counter operation processing unit 55 counts the engine rotation angle or calculates the engine rotation speed based on the NE sensor signal input from the NE sensor 21. Hereinafter, these processes are referred to as a crank counter operation process. The NE sensor 21 shapes a voltage waveform formed by the air gap with the protrusion into a pulse, and outputs a signal indicating each detection time point of the pulse rising edge and falling edge (referred to as NE sensor signal without distinguishing both). Supply to the master core 52.

クランクカウンタ操作処理部55は、パルスの立ち上がりエッジの検出後、立ち下がりエッジが検出されると、クランクカウンタを1つ大きくする。クランクカウンタにより、1〜36に分けられるクランクのステージと、エンジン回転角が示される。また、クランクカウンタ操作処理部55は、パルスの立ち上がりエッジから立ち下がりエッジが検出されるまでの時間を計測して記憶しておき、次に、パルスの立ち上がりエッジから立ち下がりエッジが検出されるまでの時間と比較する。2つの時間は同程度であるが、1周に1回、突起部の欠損により2つの時間の比が倍以上(又は1/2以下)程度になる。この時、クランクシャフト20が1回転したことになるので、2つの時間の比が最後に倍以上になった時から次に倍以上になるまでの時間からエンジン回転速度を求める。また、クランクカウンタ操作処理部55は、2つの時間の比が倍以上となると、クランクカウンタの値を初期化する。本実施形態ではクランクカウンタの値を今回値としてクランクカウンタ操作処理部55が共有RAM51に書き込むものとする。   The crank counter operation processing unit 55 increases the crank counter by one when the falling edge is detected after the rising edge of the pulse is detected. The crank counter divided by 1 to 36 and the engine rotation angle are indicated by the crank counter. Also, the crank counter operation processing unit 55 measures and stores the time from the rising edge of the pulse until the falling edge is detected, and then until the falling edge is detected from the rising edge of the pulse. Compare with time. The two times are about the same, but once per round, the ratio of the two times becomes about twice or more (or less than 1/2) due to the loss of the protrusion. At this time, since the crankshaft 20 has made one revolution, the engine rotational speed is obtained from the time from when the ratio of the two times last doubles to the next double. Further, the crank counter operation processing unit 55 initializes the value of the crank counter when the ratio of the two times becomes twice or more. In this embodiment, it is assumed that the crank counter operation processing unit 55 writes the value of the crank counter as the current value in the shared RAM 51.

従来からのクランク同期処理は、クランクカウンタに応じたイグナイタ13の通電タイミングの決定、イグナイタ13の点火開始タイミングの決定、及び、インジェクタ16による燃料噴射タイミングの決定、等である。また、燃料噴射タイミングの決定の前に燃料噴射量も決定される。   Conventional crank synchronization processing includes determination of energization timing of the igniter 13 according to the crank counter, determination of ignition start timing of the igniter 13, determination of fuel injection timing by the injector 16, and the like. Further, the fuel injection amount is also determined before the fuel injection timing is determined.

本実施形態のように電子制御装置100がマルチコアを有することで、クランク同期処理をマスターコア52とスレーブコア53で負荷分散することができ、より精緻なエンジン制御を可能とすることができる。例えば、従来ではクランクカウンタを24のステージに区分していた場合でも、負荷分散することでより短いステージ間隔(36ステージ)のクランク同期処理が可能になっている。   Since the electronic control device 100 has multi-cores as in the present embodiment, crank synchronization processing can be load-balanced between the master core 52 and the slave core 53, and more precise engine control can be achieved. For example, even when the crank counter is conventionally divided into 24 stages, the crank synchronization process with a shorter stage interval (36 stages) can be performed by distributing the load.

本実施形態では、マスターコア52とスレーブコア53がどのようなクランク同期処理を受け持つか設計できるが、例えば、マスターコア52のクランク同期処理部54がイグナイタ13の通電タイミングの決定とイグナイタ13の点火開始タイミングの決定を行い、スレーブコア53のクランク同期処理部56がインジェクタ16による燃料噴射量の決定と燃料噴射タイミングの決定を行うとする。   In this embodiment, it is possible to design what kind of crank synchronization processing the master core 52 and the slave core 53 are responsible for. For example, the crank synchronization processing unit 54 of the master core 52 determines the energization timing of the igniter 13 and the ignition of the igniter 13. It is assumed that the start timing is determined and the crank synchronization processing unit 56 of the slave core 53 determines the fuel injection amount and the fuel injection timing by the injector 16.

クランクカウンタ操作処理部55はクランクカウンタ操作処理の後、スレーブコア53に割り込みする。スレーブコア53の割り込みハンドラはこの割り込みをトリガーにクランク同期処理実行可否判定処理部57を起動する。クランク同期処理実行可否判定処理部57について詳細は後述するが、クランク同期処理実行可否判定処理部57は、
(a)共有RAM51の今回値と前回値と比較する。
(b)今回値と前回値が同じ場合、イベントの誤通知と判定してクランク同期処理部56を呼び出さない。
(c)今回値と前回値が異なる場合、正しいイベント通知と判定して、
(c-1) 共有RAM51の今回値を前回値にコピーする。
The crank counter operation processing unit 55 interrupts the slave core 53 after the crank counter operation processing. The interrupt handler of the slave core 53 activates the crank synchronization process execution determination processing unit 57 using this interrupt as a trigger. The crank synchronization process execution availability determination processing unit 57 will be described in detail later.
(A) The current value of the shared RAM 51 is compared with the previous value.
(B) If the current value and the previous value are the same, it is determined that the event has been erroneously notified, and the crank synchronization processing unit 56 is not called.
(C) If the current value is different from the previous value, it is determined that the event notification is correct,
(c-1) Copy the current value of the shared RAM 51 to the previous value.

(c-2) クランク同期処理部56を呼び出す(実行する)。     (c-2) Call (execute) the crank synchronization processing unit 56.

この処理により、スレーブコア53のクランク同期処理部56は、イベントが正常に通知された場合にのみクランク同期処理を実行することができる。   With this processing, the crank synchronization processing unit 56 of the slave core 53 can execute the crank synchronization processing only when the event is normally notified.

〔動作手順〕
図6は、本実施例の電子制御装置100の動作手順を示すフローチャート図の一例である。
まず、NEセンサ21がNEセンサ信号をマスターコア52に送信する(S10)。DMAC35がI/Oブリッジ38からマスターコア52のRAM1に送信するとしてもよいし、不図示のINTC(割り込みコントローラ)がNEセンサ21の割込み要求をCPUに通知することで、マスターコア52がDMAC35にRAM1にNEセンサ信号を記憶させてもよい。
[Operation procedure]
FIG. 6 is an example of a flowchart illustrating an operation procedure of the electronic control device 100 according to the present embodiment.
First, the NE sensor 21 transmits an NE sensor signal to the master core 52 (S10). The DMAC 35 may transmit from the I / O bridge 38 to the RAM 1 of the master core 52, or an INTC (interrupt controller) (not shown) notifies the CPU of an interrupt request from the NE sensor 21, so that the master core 52 transmits to the DMAC 35. The NE sensor signal may be stored in the RAM 1.

次に、マスターコア52はNEセンサ信号を受信する(S20)。NEセンサ信号を受信すると、クランクカウンタ操作処理部55がクランクカウンタ操作処理を実行する(S30)。クランクカウンタ操作処理を終えるとクランクカウンタ操作処理部55はクランクカウンタを算出するので、クランクカウンタの今回値を共有RAM51に上書きする(S40)。従来から、マスターコア52はクランクカウンタ同期処理のためクランクカウンタを算出して共有RAM51に書き込む処理を行っているので、クランクカウンタ操作処理に大きな変更はなくコスト増を抑制できる。   Next, the master core 52 receives the NE sensor signal (S20). When the NE sensor signal is received, the crank counter operation processing unit 55 executes crank counter operation processing (S30). When the crank counter operation processing is completed, the crank counter operation processing unit 55 calculates the crank counter, so that the current value of the crank counter is overwritten in the shared RAM 51 (S40). Conventionally, the master core 52 performs a process of calculating a crank counter and writing it to the shared RAM 51 for the crank counter synchronization process, so that there is no significant change in the crank counter operation process and an increase in cost can be suppressed.

なお、電子制御装置100の起動直後、クランクカウンタ操作処理部55は前回値を初期化しておく(例えば最大値(0xff)を設定)。電子制御装置100の起動直後、クランクカウンタ操作処理部55が今回値(例えばゼロ)を書き込んでも、必ず前回値と今回値を異ならせることができる。   Note that immediately after the electronic control device 100 is activated, the crank counter operation processing unit 55 initializes the previous value (for example, sets the maximum value (0xff)). Even if the crank counter operation processing unit 55 writes the current value (for example, zero) immediately after the activation of the electronic control device 100, the previous value can be made different from the current value.

次に、クランクカウンタ操作処理部55はINT1と通信線43を介してスレーブコア53に割り込みする(S50)。この後、マスターコア52ではクランク同期処理部54がクランク同期処理を行う(S60)
スレーブコア53は割込みの受け付け処理を行う(S100)。割込みの受け付け処理は主にINT33が受け持つが、この処理は、例えば、実行中の処理と割込み要求の優先度の判定、割込みを受け付けると判定した場合の実行中の処理のコンテキスト(レジスタの値、演算結果、スタックポインタの値等)の記憶等である。割込みを受け付けると、スレーブコア53はクランク同期処理実行可否判定処理部57を起動させる。
Next, the crank counter operation processing unit 55 interrupts the slave core 53 via the INT1 and the communication line 43 (S50). Thereafter, in the master core 52, the crank synchronization processing unit 54 performs crank synchronization processing (S60).
The slave core 53 performs an interrupt acceptance process (S100). The interrupt acceptance process is mainly handled by the INT 33. This process is performed by, for example, determining the priority of the process being executed and the priority of the interrupt request, and the context of the process being executed when it is determined that the interrupt is accepted (register value, Storage of the calculation result, stack pointer value, etc.). When receiving the interrupt, the slave core 53 activates the crank synchronization process execution determination unit 57.

クランク同期処理実行可否判定処理部57は、共有RAM51の前回値と今回値を比較する(S110)。すなわち、共有RAM51の今回値と前回値が記憶されたアドレスから今回値と前回値を読み出し比較する。今回値と前回値が記憶される共有RAM51のアドレスは予め決まっている。   The crank synchronization process execution determination unit 57 compares the previous value and the current value in the shared RAM 51 (S110). That is, the current value and the previous value are read and compared from the address where the current value and the previous value of the shared RAM 51 are stored. The address of the shared RAM 51 where the current value and the previous value are stored is determined in advance.

今回値と前回値が一致する場合(S120のYes)、クランク同期処理実行可否判定処理部57はイベントの誤通知と判定する(S130)。この場合、スレーブコア53はクランク同期処理を実行することなく、処理を終了する。   When the current value matches the previous value (Yes in S120), the crank synchronization process execution availability determination processing unit 57 determines that the event is erroneously notified (S130). In this case, the slave core 53 ends the process without executing the crank synchronization process.

今回値と前回値が一致しない場合(S120のNo)、クランク同期処理実行可否判定処理部57は正常なイベント通知と判定する(S140)。なお、クランクカウンタは徐々に増えるのでイベント通知が正常であれば今回値と前回値は一致しないが、換言すると、今回値と前回値が一致しない情報であれば、マスターコア52のクランクカウンタ操作処理部55はどのような情報(数値、フラグ、記号、文字等)を共有メモリ51の今回値に記録してもよいことになる。クランクカウンタ以外の情報を記録する場合、クランクカウンタ操作処理部55は少なくとも連続して同じ値とならない情報を記録する。   If the current value does not match the previous value (No in S120), the crank synchronization process execution availability determination processing unit 57 determines that the event notification is normal (S140). Since the crank counter gradually increases, if the event notification is normal, the current value does not match the previous value. In other words, if the current value does not match the previous value, the master core 52 crank counter operation process The unit 55 may record any information (numerical value, flag, symbol, character, etc.) in the current value of the shared memory 51. When recording information other than the crank counter, the crank counter operation processing unit 55 records information that does not have the same value at least continuously.

次に、クランク同期処理実行可否判定処理部57は、すでに読み出している今回値を共有RAM51の前回値にコピーする(S150)。   Next, the crank synchronization process execution determination unit 57 copies the current value that has already been read to the previous value in the shared RAM 51 (S150).

なお、共有メモリ51に所定数(10個程度)のクランクカウンタを記憶できるリングバッファを設けることで、クランク同期処理実行可否判定処理部57が今回値を前回値にコピーすることを省略できる。この場合、クランク同期処理実行可否判定処理部57はイベント通知に連動して増えるポインタ(今回値のアドレスを示す)を備えておき、ポインタの値に応じてリングバッファの隣接した2つのクランクカウンタを読み出せばよい。   In addition, by providing a ring buffer that can store a predetermined number (about 10) of crank counters in the shared memory 51, it is possible to omit copying the current value to the previous value by the crank synchronization process execution determination unit 57. In this case, the crank synchronization process execution determination unit 57 includes a pointer (indicating the address of the current value) that increases in conjunction with the event notification, and sets two adjacent crank counters in the ring buffer according to the pointer value. Read it out.

次に、クランク同期処理実行可否判定処理部57はクランク同期処理部54を呼び出すので、クランク同期処理部54はクランク同期処理を実行する(S160)。   Next, since the crank synchronization processing execution availability determination processing unit 57 calls the crank synchronization processing unit 54, the crank synchronization processing unit 54 executes the crank synchronization processing (S160).

以上のような処理により、スレーブコア53は、外部から生じさせられた電気的なノイズ、割込み信号線の接触不良やショートによるイベントの誤通知を正常な通知と誤判定して、クランク同期処理を実行してしまうことを防止できる。   Through the processing as described above, the slave core 53 misdetermines an erroneous notification of an event caused by an external electric noise, a contact failure of an interrupt signal line or a short circuit as a normal notification, and performs a crank synchronization process. It is possible to prevent execution.

〔シーケンス〕
図7は、スレーブコア53が正常なイベント通知を取得した場合のシーケンス図の一例である。
時刻t1:マスターコア52がNEセンサ信号を受信し、クランクカウンタ操作処理を実行する。
時刻t2:マスターコア52が今回値を共有RAM51に書き込む。
時刻t3:マスターコア52がスレーブコア53にイベントを通知する。この後、マスターコア52はクランク同期処理を実行する。
時刻t4:スレーブコア53が今回値と前回値を読み出し、イベントの誤通知か否かを判定する。イベントの誤通知でない場合、スレーブコア53は今回値を前回値にコピーする。スレーブコア53はクランク同期処理を実行する。
〔sequence〕
FIG. 7 is an example of a sequence diagram when the slave core 53 has acquired a normal event notification.
Time t1: The master core 52 receives the NE sensor signal and executes crank counter operation processing.
Time t2: The master core 52 writes the current value to the shared RAM 51.
Time t3: The master core 52 notifies the slave core 53 of the event. Thereafter, the master core 52 executes crank synchronization processing.
Time t4: The slave core 53 reads the current value and the previous value, and determines whether or not there is an erroneous notification of the event. If it is not an erroneous notification of the event, the slave core 53 copies the current value to the previous value. The slave core 53 executes crank synchronization processing.

以降はNEセンサ21がNEセンサ信号を出力する度に、一連の処理が繰り返される。   Thereafter, each time the NE sensor 21 outputs an NE sensor signal, a series of processing is repeated.

図8は、スレーブコア53がイベントの誤通知を取得した場合のシーケンス図の一例である。時刻t1〜t4までの処理は図7と同様なので説明を省略する。
時刻t5:ノイズなどによりスレーブコア53がイベントの誤検知を取得する。スレーブコア53は今回値と前回値を読み出すが、図示するように今回値と前回値は同じままなので、イベントの誤通知と判定する。この場合、スレーブコア53は今回値を前回値にコピーせず、時刻6にてクランク同期処理を実行することもない。
FIG. 8 is an example of a sequence diagram in the case where the slave core 53 acquires an erroneous notification of an event. The processing from time t1 to t4 is the same as in FIG.
Time t5: The slave core 53 acquires erroneous detection of the event due to noise or the like. The slave core 53 reads the current value and the previous value, but the current value and the previous value remain the same as shown in FIG. In this case, the slave core 53 does not copy the current value to the previous value, and does not execute the crank synchronization process at time 6.

以上説明したように、本実施例の電子制御装置100は、一方のコアから他方のコアに割込みによりイベントを通知する際、イベントの誤通知を検知することができる。スレーブコア53の処理負荷は従来よりも若干、増大するが、共有メモリを常に監視する場合と比べれば格段に小さい処理負荷に過ぎない。   As described above, the electronic control device 100 according to the present embodiment can detect an erroneous notification of an event when an event is notified from one core to the other core by an interrupt. Although the processing load of the slave core 53 slightly increases as compared with the conventional case, the processing load is much smaller than when the shared memory is constantly monitored.

実施例1では2つのコアのみの存在を前提にマスターコア52とスレーブコア53の処理を説明したが、本実施例ではコアが4つある場合の、マスターコア52とスレーブコア53の処理を説明する。   In the first embodiment, the processing of the master core 52 and the slave core 53 has been described on the assumption that only two cores exist. In the present embodiment, the processing of the master core 52 and the slave core 53 when there are four cores is described. To do.

図9は、電子制御装置100の機能ブロック図の一例を示す。図9において図5と同一部の説明は省略する。図9の電子制御装置100はマスターコア(区別するためマスターコアA、Bという)52を2つ、スレーブコア(区別するためスレーブコアA、Bという)53を2つそれぞれ有している。マスターコアAとマスターコアBは同じ機能を有し、スレーブコアAとスレーブコアBは同じ機能を有するが、エンジン200は1つなので電子制御装置100はいずれかの組の演算結果によりエンジン200を制御すればよい。例えば、IG(イグニッション)・ONの度に使用するマスターコアとスレーブコアの組を切り替えること、又は、常に2組のマスターコアとスレーブコアにより同じ演算を行い演算結果が一致する場合にエンジン制御を行うこと、などの利用態様がある。   FIG. 9 shows an example of a functional block diagram of the electronic control device 100. In FIG. 9, the description of the same part as in FIG. 5 is omitted. 9 has two master cores (referred to as master cores A and B for distinction) 52 and two slave cores (referred to as slave cores A and B for distinction) 53, respectively. The master core A and the master core B have the same function, and the slave core A and the slave core B have the same function. However, since the engine 200 is one, the electronic control unit 100 determines the engine 200 according to any set of calculation results. Control is sufficient. For example, switch the master / slave core pair used each time IG (ignition) / ON, or always perform engine control when the same operation is performed by two sets of master cores and slave cores. There are usage modes such as to do.

本実施例のスレーブコアA、Bはクランク同期処理実行可否判定処理部57が実施例1と同様のクランク同期処理の実行可否を判定するが、さらに以下の機能を有する。
・イベントの誤検知を検知する毎に、共有RAM51の誤通知回数を1つ大きくする。
・IG・OFF時には共有RAM51の2つの誤通知回数A、Bを不揮発メモリに退避する。
In the slave cores A and B of this embodiment, the crank synchronization process execution availability determination processing unit 57 determines whether or not the crank synchronization process similar to that of the first embodiment can be executed, but further has the following functions.
Each time an erroneous detection of an event is detected, the number of erroneous notifications in the shared RAM 51 is increased by one.
When the IG is OFF, the two erroneous notification counts A and B in the shared RAM 51 are saved in the nonvolatile memory.

スレーブコアAとスレーブコアBのクランクカウンタ操作処理部55は、誤通知を検知する度に、IG・ONなどの起動時又は定期的に、2つの誤通知回数A,Bを比較する。2つの誤通知回数A,Bの差が所定値以上になると、誤通知回数の大きい方のスレーブコア53が小さい方のスレーブコア53に対し、処理停止要求を通知する。こうすることで、イベントの誤検知が多いスレーブコア53とマスターコア52の組の演算処理を回避することができ、演算結果の信頼性を向上させることができる。   Each time the crank counter operation processing unit 55 of the slave core A and the slave core B detects an erroneous notification, the crank counter operation processing unit 55 compares the two erroneous notification counts A and B at the time of activation such as IG / ON or periodically. When the difference between the two erroneous notification counts A and B exceeds a predetermined value, the slave core 53 with the larger erroneous notification count notifies the slave core 53 with the smaller notification count of the processing stop request. By doing so, it is possible to avoid the arithmetic processing of the combination of the slave core 53 and the master core 52, which often causes erroneous detection of events, and improve the reliability of the arithmetic result.

図10は、誤通知回数に基づく演算の停止処理を説明する図の一例である。図10では、スレーブコアAがイベントの誤通知を検出した後からの処理を説明するが、スレーブコアBがイベントの誤検知を検出した場合もスレーブコアAとBの処理が逆になるだけで処理の流れは同じである。   FIG. 10 is an example of a diagram illustrating calculation stop processing based on the number of erroneous notifications. In FIG. 10, the processing after the slave core A detects an erroneous notification of the event will be described. However, when the slave core B detects an erroneous detection of the event, the processing of the slave cores A and B is only reversed. The process flow is the same.

ステップS130でイベントの誤通知を検出したスレーブコアAのクランク同期処理実行可否判定処理部57は、誤通知回数をカウントアップする(S210)。本実施例では誤通知の検出をしたタイミングで、クランク同期処理実行可否判定処理部57が2つの誤通知回数A,Bを比較する(S220)。   The crank synchronization process execution availability determination processing unit 57 of the slave core A that has detected the erroneous notification of the event in step S130 counts up the number of erroneous notifications (S210). In the present embodiment, at the timing when the erroneous notification is detected, the crank synchronization process execution determination processing unit 57 compares the two erroneous notification counts A and B (S220).

クランク同期処理実行可否判定処理部57は、誤通知回数Aと誤通知回数Bの差の絶対値が閾値を超えたか否かを判定する(S230)。誤通知回数Aと誤通知回数Bは同程度になるはずなので、この閾値は有意な差として、例えば誤通知回数Aと誤通知回数Bのうち大きい方の20〜30%とする。   The crank synchronization process execution possibility determination processing unit 57 determines whether or not the absolute value of the difference between the erroneous notification count A and the erroneous notification count B exceeds a threshold value (S230). Since the number of false notifications A and the number of false notifications B should be approximately the same, this threshold is set to a significant difference, for example, 20-30%, which is the larger of the number of false notifications A and the number of false notifications B.

誤通知回数Aと誤通知回数Bの差の絶対値が閾値を超えていない場合(S230のNo)、クランク同期処理実行可否判定処理部57は何もせず図のフローを終了する。   When the absolute value of the difference between the erroneous notification count A and the erroneous notification count B does not exceed the threshold (No in S230), the crank synchronization process execution availability determination processing unit 57 does nothing and ends the flow of the figure.

誤通知回数Aと誤通知回数Bの差の絶対値が閾値を超えている場合(S230のYes)、誤通知回数が多い方のスレーブコア53とマスターコア52の組は信頼性が低下するおそれがあるので、クランク同期処理実行可否判定処理部57は、誤通知回数が多い方のスレーブコア53とマスターコア52の組の処理を停止させる。
・誤通知回数A−誤通知回数B>閾値
クランク同期処理実行可否判定処理部57は自身のマスターコアAとスレーブコアAの演算を停止させる。
・誤通知回数B−誤通知回数A>閾値
クランク同期処理実行可否判定処理部57は他方のマスターコアBとスレーブコアBの演算を停止させる。
If the absolute value of the difference between the number of false notifications A and the number of false notifications B exceeds the threshold (Yes in S230), the reliability of the pair of the slave core 53 and the master core 52 with the larger number of false notifications may decrease. Therefore, the crank synchronization process execution availability determination processing unit 57 stops the processing of the set of the slave core 53 and the master core 52 having the larger number of erroneous notifications.
The number of erroneous notifications A-the number of erroneous notifications B> threshold The crank synchronization process execution availability determination processing unit 57 stops the operations of its own master core A and slave core A.
The number of erroneous notifications B-the number of erroneous notifications A> threshold The crank synchronization process execution availability determination processing unit 57 stops the computation of the other master core B and slave core B.

このため、クランク同期処理実行可否判定処理部57は、停止指示又は停止通知を他方のスレーブコアBに通知する(S240)。スレーブコアBのクランク同期処理実行可否判定処理部57は停止指示又は停止通知を受信する(S250)。   Therefore, the crank synchronization process execution availability determination processing unit 57 notifies the other slave core B of a stop instruction or a stop notification (S240). The determination processing unit 57 for determining whether or not the slave core B can perform the crank synchronization processing receives a stop instruction or a stop notification (S250).

停止指示の場合、スレーブコアBのクランク同期処理実行可否判定処理部57はマスターコアBと通信するなどして、停止のための処理(制御中のアクチュエータなどの退避、設定の保存等)を行い、停止可能になると停止指示を受け付けたことをスレーブコアAに通知する(S260)。   In the case of a stop instruction, the slave core B crank synchronization process execution availability determination processing unit 57 communicates with the master core B to perform a stop process (e.g., saving the actuator being controlled, saving the settings, etc.). When it becomes possible to stop, the slave core A is notified that the stop instruction has been accepted (S260).

スレーブコアAが停止する場合(停止通知の場合)、スレーブコアBのクランク同期処理実行可否判定処理部57は停止通知を受け付けたことをスレーブコアAに通知する(S260)。   When the slave core A stops (in the case of a stop notification), the crank synchronization process execution availability determination processing unit 57 of the slave core B notifies the slave core A that the stop notification has been received (S260).

これにより、スレーブコアAとBは停止指示又は停止に必要な処理を行う(S270、S280)。停止する側のスレーブコア53とマスターコア52は、演算を継続するスレーブコア53とマスターコア52に必要な変数などがあれば共有メモリに書き出して、電力供給をオフにする。停止しない側のスレーブコア53とマスターコア52は、演算を停止するスレーブコア53とマスターコア52から必要な変数などがあれば共有メモリから読み出して、そのまま演算を継続する。   Thereby, the slave cores A and B perform a stop instruction or a process necessary for the stop (S270, S280). The slave core 53 and the master core 52 on the stopping side write out any necessary variables in the slave core 53 and the master core 52 that continue the calculation, and turn off the power supply. The slave core 53 and the master core 52 on the non-stop side read out from the shared memory if there are necessary variables from the slave core 53 and the master core 52 that stop the calculation, and continue the calculation as it is.

以上説明したように、本実施例ではコアが4つあることを利用して、イベントの誤検知が多いマスターコアとスレーブコアを停止させるので、演算結果の信頼性を向上させることができる。   As described above, in the present embodiment, the master core and the slave core that are frequently erroneously detected in the event are stopped using the fact that there are four cores, so that the reliability of the calculation result can be improved.

実施例2では誤検知回数からマスターコア52とスレーブコア53の組の信頼性の低下を検出したが、本実施例では2つの演算結果が一致する場合にエンジン制御する電子制御装置100において、演算結果が一致しない場合に誤通知回数を利用してスレーブコア53の信頼性の低下を検出する電子制御装置100について説明する。   In the second embodiment, a decrease in reliability of the master core 52 and the slave core 53 is detected from the number of erroneous detections. However, in this embodiment, in the electronic control device 100 that controls the engine when the two calculation results match, An electronic control device 100 that detects a decrease in reliability of the slave core 53 using the number of erroneous notifications when the results do not match will be described.

すなわち、誤通知回数が多いスレーブコア53はノイズなどの影響を受けやすく正しい演算結果が得られにくいと推測して、スレーブコア53の信頼性の低下を検出することができる。   That is, it is assumed that the slave core 53 having a large number of erroneous notifications is easily affected by noise and the like and it is difficult to obtain a correct calculation result, so that a decrease in the reliability of the slave core 53 can be detected.

図11は、電子制御装置100の機能ブロック図の一例を示す。図11において図5と同一部の説明は省略する。図11の電子制御装置100は1つのマスターコア52と、2つのスレーブコア53(スレーブコアA、B)を有している。スレーブコアAとスレーブコアBは同じ機能を有するが、本実施例ではスレーブコアBは演算結果をエンジン制御に利用することなく、共有メモリ51に書き出すものとする。そして、スレーブコアAのクランク同期処理部56は、共有メモリ51から演算結果を読み出し、自己の演算結果と比較して、略一致するかどうかによりスレーブコアAとスレーブコアBの信頼性を検証する。   FIG. 11 shows an example of a functional block diagram of the electronic control device 100. In FIG. 11, the description of the same parts as in FIG. The electronic control device 100 of FIG. 11 has one master core 52 and two slave cores 53 (slave cores A and B). Although the slave core A and the slave core B have the same function, in this embodiment, the slave core B writes the calculation result in the shared memory 51 without using it for engine control. Then, the crank synchronization processing unit 56 of the slave core A reads the calculation result from the shared memory 51, compares it with its own calculation result, and verifies the reliability of the slave core A and the slave core B based on whether or not they substantially match. .

なお、スレーブコアAが演算結果を共有メモリ51に書き出してスレーブコアBが自己の演算結果と比較してもよいし、スレーブコアAとスレーブコアBが共に演算結果を共有メモリに書き出して、不図示のスレーブコアCが演算結果を比較することもできる。   The slave core A may write the calculation result to the shared memory 51 and the slave core B may compare it with its own calculation result. Both the slave core A and the slave core B write the calculation result to the shared memory and The illustrated slave core C can also compare the calculation results.

スレーブコアAは、演算結果が例えば所定回数以上異なった場合、誤通知回数Aと誤通知回数Bの大きい方のスレーブコア53に異常があると推定し、その後の演算を中止させる。こうすることで、誤通知回数の大小だけでなく、演算結果を利用して、異常が生じている可能性の高いスレーブコア53や通信線ン43の断線やショートを特定することができる。また、実施例2では誤通知回数A、Bの差の絶対値が閾値を超える必要があったが、本実施例では誤通知回数A、Bの差の絶対値が閾値を超えなくても異常のある可能性の高いスレーブコア53を特定できる。   For example, when the calculation results differ by a predetermined number of times or more, the slave core A estimates that there is an abnormality in the slave core 53 having the larger number of false notifications A and the number of false notifications B, and stops the subsequent computation. By doing so, it is possible to identify not only the magnitude of the number of erroneous notifications but also the disconnection or short circuit of the slave core 53 or the communication line 43 that is highly likely to be abnormal using the calculation result. In the second embodiment, the absolute value of the difference between the false notification counts A and B needs to exceed the threshold. However, in this embodiment, the absolute value of the difference between the erroneous notification counts A and B does not exceed the threshold. It is possible to identify the slave core 53 that is highly likely to be.

図12は、演算結果と誤通知回数に基づく演算処理の停止処理を説明する図の一例である。図12では、スレーブコアA、Bがクランク同期処理を開始する時以降の手順を説明する。   FIG. 12 is an example of a diagram illustrating a calculation process stop process based on the calculation result and the number of erroneous notifications. FIG. 12 illustrates a procedure after the slave cores A and B start crank synchronization processing.

まず、スレーブBのクランク同期処理部56がクランク同期処理の演算結果を共有メモリに書き込む(S310)。書き込んだ場合、クランク同期処理部56はスレーブコアAに割込みやコア間通信により通知することが好ましい。   First, the crank synchronization processing unit 56 of the slave B writes the calculation result of the crank synchronization processing in the shared memory (S310). When written, the crank synchronization processing unit 56 preferably notifies the slave core A by interruption or inter-core communication.

スレーブコアAのクランク同期処理部56もほぼ同時期にクランク同期処理を終了させる(S320)。クランク同期処理部56は共有メモリ51の演算結果を読み出して、自身の演算結果と一致するか否かを判定する(S330)。なお、演算結果の有効桁数や丸め方にもよるが、どちらのスレーブコアA,Bも正常だが演算結果が完全には一致しないことがあるので、一致したと見なせる範囲(例えば、数%〜10%程度の違い)を設けて、一致判定する。   The crank synchronization processing unit 56 of the slave core A also ends the crank synchronization processing at substantially the same time (S320). The crank synchronization processing unit 56 reads the calculation result of the shared memory 51 and determines whether or not it matches the calculation result of itself (S330). Although depending on the number of significant digits of the calculation result and the rounding method, both slave cores A and B are normal but the calculation result may not completely match, so the range that can be regarded as matching (for example, several% to The difference is determined by about 10%, and the coincidence is determined.

2つの演算結果が一致した場合(S330のYes)、スレーブコアAのクランク同期処理部56は自己の演算結果を用いてエンジン200を制御する(S340)。   When the two calculation results match (Yes in S330), the crank synchronization processing unit 56 of the slave core A controls the engine 200 using its own calculation result (S340).

2つの演算結果が一致しない場合(S330のNo)、スレーブコアAのクランク同期処理部56は、誤通知回数Aと誤通知回数Bを共有メモリ51から読み出し、比較する(S350)。そして、クランク同期処理部56は誤通知回数の大小に応じて停止指示又は停止の処理を実行する(S360)。   When the two calculation results do not match (No in S330), the crank synchronization processing unit 56 of the slave core A reads the erroneous notification count A and the erroneous notification count B from the shared memory 51 and compares them (S350). Then, the crank synchronization processing unit 56 executes a stop instruction or a stop process according to the number of erroneous notifications (S360).

・誤通知回数A>誤通知回数Bの場合
スレーブコアAのクランク同期処理部56は、スレーブコアBにクランク同期処理を依頼する。これにより、以降は、スレーブコアBのクランク同期処理部56がクランク同期処理の演算結果を用いてエンジン200を制御することができる。なお、以降は、スレーブコアBのクランク同期処理部56は共有メモリ51に演算結果を書き出さなくてよい。
When the erroneous notification count A> the erroneous notification count B, the crank synchronization processing unit 56 of the slave core A requests the slave core B to perform crank synchronization processing. Thereby, thereafter, the crank synchronization processing unit 56 of the slave core B can control the engine 200 using the calculation result of the crank synchronization processing. Thereafter, the crank synchronization processing unit 56 of the slave core B does not have to write the calculation result to the shared memory 51.

・誤通知回数A<誤通知回数Bの場合、
スレーブコアAのクランク同期処理部56は、スレーブコアBにクランク同期処理の停止を依頼する。これにより、以降は、スレーブコアBのクランク同期処理部56はクランク同期処理を行わず、共有メモリ51に演算結果を書き出すこともしない。また、スレーブコアAのクランク同期処理部56は、自己のクランク同期処理の演算結果によりエンジン200を制御する。
・ If false notification count A <false notification count B,
The crank synchronization processing unit 56 of the slave core A requests the slave core B to stop the crank synchronization processing. Thereby, thereafter, the crank synchronization processing unit 56 of the slave core B does not perform the crank synchronization processing and does not write the calculation result to the shared memory 51. Further, the crank synchronization processing unit 56 of the slave core A controls the engine 200 based on the calculation result of its own crank synchronization processing.

・誤通知回数A=誤通知回数Bの場合、
この場合、演算結果が一致しないことがイベントの誤検知とは異なる原因の可能性もあるので、例えば、マスターコア52にスレーブコア53のクランク同期処理を依頼し、スレーブコアAとスレーブコアBの演算結果のどちらが正しいかを検証する、又は、第4のコアにスレーブコア53のクランク同期処理を依頼し、スレーブコアAとスレーブコアBの演算結果のどちらが正しいかを検証する、ことができる。スレーブコアAとスレーブコアBの演算結果のどちらが正しいかが分かれば、正しくない方のスレーブコア53にクランク同期処理の停止を依頼する。
・ In case of false notification count A = false notification count B,
In this case, the fact that the calculation results do not match may be different from the erroneous detection of the event. For example, the master core 52 is requested to perform the crank synchronization processing of the slave core 53, and the slave core A and the slave core B It is possible to verify which of the calculation results is correct, or to request the fourth core to perform the crank synchronization processing of the slave core 53 and verify which of the calculation results of the slave core A and the slave core B is correct. If it is known which of the calculation results of the slave core A and the slave core B is correct, the slave core 53 which is not correct is requested to stop the crank synchronization process.

以上説明したように、本実施例の電子制御装置100は、誤通知回数が多いスレーブコア53はノイズなどの影響を受けやすく正しい演算結果が得られにくいと推定して、スレーブコア53の信頼性の低下を検出することができる。   As described above, the electronic control device 100 according to the present embodiment estimates that the slave core 53 having a large number of erroneous notifications is easily affected by noise and the like and cannot easily obtain a correct calculation result. Can be detected.

本実施例ではハイブリッド車両に電子制御装置100が搭載された場合に、イベントの誤通数を検出することを停止する電子制御装置100について説明する。   In this embodiment, an electronic control device 100 that stops detecting the number of erroneous events when the electronic control device 100 is mounted on a hybrid vehicle will be described.

図13は、ハイブリッドECU101と車載LANを介して接続された電子制御装置(エンジンECU)100を示す図の一例である。ハイブリッドECU101は、バッテリ残量、アクセルペダルの踏み込み量、車速等に基づき、パワーモード、エコモード、又は、EVモードの3つのモードに切り替えることができる。このうちEVモードは電気モータだけで走行するモードでエンジン200は強制的に停止される。   FIG. 13 is an example of a diagram showing an electronic control unit (engine ECU) 100 connected to the hybrid ECU 101 via an in-vehicle LAN. The hybrid ECU 101 can be switched to three modes of a power mode, an eco mode, and an EV mode based on the remaining battery level, the accelerator pedal depression amount, the vehicle speed, and the like. Among these, the EV mode is a mode in which the vehicle travels only with the electric motor, and the engine 200 is forcibly stopped.

EVモードにおいても電子制御装置100には電力が供給され、NEセンサ21がNEセンサ信号を出力すれば、クランクカウンタ操作処理やクランク同期処理が実行され得る状態にある。しかし、EVモードでは、エンジン200が停止しているためNEセンサ信号が出力されるはずがなく、マスターコア52からスレーブコア53にイベント通知が出力されるはずがない。   Even in the EV mode, if electric power is supplied to the electronic control unit 100 and the NE sensor 21 outputs the NE sensor signal, the crank counter operation process and the crank synchronization process can be executed. However, in the EV mode, the NE sensor signal cannot be output because the engine 200 is stopped, and the event notification cannot be output from the master core 52 to the slave core 53.

したがって、本実施例のようにハイブリッド車に搭載された電子制御装置100は、EVモードであることを検出すると、クランク同期処理実行可否判定処理部57が、イベントの通知を受け付けただけでそれが誤通知であることを検出できる。したがって、今回値と前回値の比較をしてイベントの誤通知を検出する必要がない。   Therefore, when the electronic control device 100 mounted on the hybrid vehicle as in the present embodiment detects that it is in the EV mode, the crank synchronization process execution availability determination processing unit 57 simply receives the notification of the event. It is possible to detect a false notification. Therefore, it is not necessary to compare the current value with the previous value to detect an erroneous notification of the event.

また、誤通知回数の差に基づき停止するマスターコア52とスレーブコア53を決定する場合、及び、複数のスレーブコア53がクランク同期処理を実行して演算結果が一致した場合にエンジン制御する場合、EVモードにおける誤通知回数をカウントしておけば、信頼性の高いスレーブコア53を特定しやすくなる。   Further, when determining the master core 52 and the slave core 53 to be stopped based on the difference in the number of erroneous notifications, and when performing engine control when a plurality of slave cores 53 execute crank synchronization processing and the calculation results match, If the number of erroneous notifications in the EV mode is counted, it becomes easy to specify the highly reliable slave core 53.

本実施例の電子制御装置100は、ハイブリッド車に搭載された場合、EVモードを利用してイベントの誤検知を容易に検出することができる。   When the electronic control device 100 of this embodiment is mounted on a hybrid vehicle, it can easily detect erroneous detection of an event using the EV mode.

21 NEセンサ
51 共有メモリ
52 マスターコア
53 スレーブコア
54、56 クランク同期処理部
55 クランクカウンタ操作処理部
57 クランク同期実行可否判定処理部
100 電子制御装置
200 エンジン
21 NE sensor 51 Shared memory 52 Master core 53 Slave core 54, 56 Crank synchronization processing unit 55 Crank counter operation processing unit 57 Crank synchronization execution availability determination processing unit 100 Electronic control unit 200 Engine

Claims (9)

第1のコア及び第2のコアと、
前記第1のコアと前記第2のコア間の通信を可能にする通信手段と、
前記第1のコアと前記第2のコアが共有する共有メモリと、
前記第1のコアが備える、外部信号を取得する毎に繰り返し第1の処理を実行し、前記第1の処理毎に所定情報を前記共有メモリに書き込む第1の処理手段と、
前記第1の処理毎に前記通信手段を介して前記第2のコアに処理要求を出力する処理要求手段と、
前記第2のコアが備える、前記処理要求をトリガーに第2の処理を実行する第2の処理手段と、を有するマイコンであって、
前記第2のコアは、前記処理要求を受け付けた場合、前記共有メモリから最新の前記所定情報と前回の前記所定情報を読み出し、最新の前記所定情報と前回の前記所定情報に規定された関係がある場合のみ、前記第2の処理手段に前記第2の処理の実行を許可する比較手段、を有することを特徴とするマイコン。
A first core and a second core;
Communication means for enabling communication between the first core and the second core;
A shared memory shared by the first core and the second core;
A first processing unit included in the first core that repeatedly executes a first process every time an external signal is acquired, and writes predetermined information to the shared memory for each first process;
Processing request means for outputting a processing request to the second core via the communication means for each first processing;
A second processing unit that executes a second process triggered by the processing request provided in the second core;
When the second core receives the processing request, the second core reads the latest predetermined information and the previous predetermined information from the shared memory, and the relationship defined by the latest predetermined information and the previous predetermined information is determined. A microcomputer comprising: a comparison unit that permits the second processing unit to execute the second process only in some cases.
前記比較手段は、最新の前記所定情報と前回の前記所定情報に規定された関係がない場合、前記処理要求が誤通知であると判定する、
ことを特徴とする請求項1記載のマイコン。
The comparison unit determines that the processing request is an erroneous notification when there is no relationship defined in the latest predetermined information and the previous predetermined information.
The microcomputer according to claim 1.
前記比較手段は、最新の前記所定情報と前回の前記所定情報に規定された関係がある場合、前記共有メモリの最新の前記所定情報を前回の前記所定情報にコピーする、
ことを特徴とする請求項1又は2記載のマイコン。
The comparison means, when there is a relationship defined in the latest predetermined information and the previous predetermined information, the latest predetermined information of the shared memory is copied to the previous predetermined information;
The microcomputer according to claim 1 or 2.
前記規定された関係は、最新の前記所定情報と前回の前記所定情報が異なることである、ことを特徴とする請求項1〜3いずれか1項記載のマイコン。   The microcomputer according to claim 1, wherein the prescribed relationship is that the latest predetermined information is different from the previous predetermined information. 前記第1の処理手段は、前記第1の処理毎に数値が大きくなる前記第1の処理の処理結果を前記所定情報として前記共有メモリに記憶し、
前記規定された関係は、最新の前記所定情報が前回の前記所定情報よりも大きいことである、ことを特徴とする請求項4記載のマイコン。
The first processing means stores, in the shared memory, the processing result of the first processing whose numerical value increases for each of the first processing as the predetermined information,
5. The microcomputer according to claim 4, wherein the specified relationship is that the latest predetermined information is larger than the previous predetermined information.
前記第1の処理手段を備えた第3のコアと、
前記第2の処理手段及び前記比較手段を備えた第4のコアと、を有し、
前記第2のコアと前記第4のコアの前記比較手段は、最新の前記所定情報と前回の前記所定情報に規定された関係がなかった回数をそれぞれカウントして、
2つの前記回数の違いが閾値を超えた場合、前記回数が多い方の前記第1のコアと前記第2のコア又は前記第3のコアと前記第4のコアが有する、前記第1の処理手段、前記第2の処理手段及び前記比較手段を停止する、
ことを特徴とする請求項1〜5いずれか1項記載のマイコン。
A third core comprising the first processing means;
A fourth core provided with the second processing means and the comparison means,
The comparing means of the second core and the fourth core respectively count the number of times the relationship between the latest predetermined information and the previous predetermined information is not defined,
When the difference between the two times exceeds a threshold, the first processing of the first core and the second core or the third core and the fourth core having the larger number of times Stopping the means, the second processing means and the comparison means;
The microcomputer according to any one of claims 1 to 5.
前記第2の処理手段及び前記比較手段を備えた第3のコアを有し、
前記第2のコアと前記第3のコアの前記比較手段は、最新の前記所定情報と前回の前記所定情報に規定された関係がなかった回数をそれぞれカウントし、
前記第2のコアの前記第2の処理手段は、前記第3のコアの前記第2の処理手段の処理結果が自己の前記第2の処理手段の処理結果と略一致する場合に処理結果を制御に用い、
前記第3のコアの前記第2の処理手段の処理結果が自己の前記第2の処理手段の処理結果と略一致しない場合、
前記第2のコアの前記第2の処理手段は、自己の前記回数が前記第3のコアの前記回数よりも少ない場合に前記第3のコアの前記第2の処理手段及び前記比較手段を停止し、
自己の前記回数が前記第3のコアの前記回数よりも多い場合に自己の前記第2の処理手段及び前記比較手段を停止する、
ことを特徴とする請求項1〜5いずれか1項記載のマイコン。
A third core comprising the second processing means and the comparison means;
The comparing means of the second core and the third core respectively count the number of times that there was no relationship defined in the latest predetermined information and the previous predetermined information,
The second processing unit of the second core outputs a processing result when the processing result of the second processing unit of the third core substantially matches the processing result of the second processing unit of its own. Used for control,
When the processing result of the second processing means of the third core does not substantially match the processing result of the second processing means of its own,
The second processing unit of the second core stops the second processing unit and the comparison unit of the third core when the number of times of the second core is smaller than the number of times of the third core. And
Stopping the second processing means and the comparing means of itself when the number of times of the self is greater than the number of times of the third core;
The microcomputer according to any one of claims 1 to 5.
前記第1の処理はクランク角をカウントする処理であり、前記第2の処理は、イグナイタの通電タイミングの決定及びイグナイタの点火開始タイミングの決定、又は、インジェクタによる燃料噴射量の決定及び燃料噴射タイミングの決定である、
ことを特徴とする請求項1〜7いずれか1項記載のマイコン。
The first process is a process of counting the crank angle, and the second process is a determination of the energization timing of the igniter and a determination of the ignition start timing of the igniter, or the determination of the fuel injection amount by the injector and the fuel injection timing Is a decision,
The microcomputer according to any one of claims 1 to 7, characterized in that:
複数のコアを有するマイコンの処理同期方法であって、
第1のコアの第1の処理手段が、外部信号を取得する毎に繰り返し第1の処理を実行し、前記第1の処理毎に所定情報を前記第1のコアと第2のコアが共有する前記共有メモリに書き込むステップと、
前記第1のコアの処理要求手段が、前記第1のコアと前記第2のコア間の通信を可能にする通信手段を介して前記第1の処理毎に前記第2のコアに処理要求を出力するステップと、
前記第2のコアの比較手段が、前記処理要求を受け付けた場合、前記共有メモリから最新の前記所定情報と前回の前記所定情報を読み出し、最新の前記所定情報と前回の前記所定情報に規定された関係がある場合のみ、第2の処理手段に第2の処理の実行を許可するステップと、
前記第2のコアの前記第2の処理手段が前記処理要求をトリガーに前記第2の処理を実行するステップと、
を有する処理同期方法。





A process synchronization method for a microcomputer having a plurality of cores,
The first processing unit of the first core repeatedly executes the first process every time an external signal is acquired, and the first core and the second core share predetermined information for each first process. Writing to the shared memory;
The processing request means of the first core sends a processing request to the second core for each of the first processes via a communication means that enables communication between the first core and the second core. Output step;
When the second core comparison unit accepts the processing request, it reads the latest predetermined information and the previous predetermined information from the shared memory, and is defined in the latest predetermined information and the previous predetermined information. A step of permitting the second processing means to execute the second process only when there is a relationship,
The second processing means of the second core executing the second processing triggered by the processing request;
A process synchronization method comprising:





JP2010258047A 2010-11-18 2010-11-18 Microcomputer and processing synchronization method Pending JP2012108786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010258047A JP2012108786A (en) 2010-11-18 2010-11-18 Microcomputer and processing synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010258047A JP2012108786A (en) 2010-11-18 2010-11-18 Microcomputer and processing synchronization method

Publications (1)

Publication Number Publication Date
JP2012108786A true JP2012108786A (en) 2012-06-07

Family

ID=46494330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010258047A Pending JP2012108786A (en) 2010-11-18 2010-11-18 Microcomputer and processing synchronization method

Country Status (1)

Country Link
JP (1) JP2012108786A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016165912A (en) * 2015-03-09 2016-09-15 株式会社デンソー Electronic control unit
JP2017068802A (en) * 2015-10-02 2017-04-06 株式会社デンソー Electronic control unit
WO2018003560A1 (en) 2016-06-30 2018-01-04 日立オートモティブシステムズ株式会社 Electronic control device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016165912A (en) * 2015-03-09 2016-09-15 株式会社デンソー Electronic control unit
JP2017068802A (en) * 2015-10-02 2017-04-06 株式会社デンソー Electronic control unit
WO2018003560A1 (en) 2016-06-30 2018-01-04 日立オートモティブシステムズ株式会社 Electronic control device

Similar Documents

Publication Publication Date Title
JP5816572B2 (en) Vehicle control device
JP2010126012A (en) Vehicle control multi-core system or internal-combustion engine control device
JP2011133337A (en) Abnormality determination device for rotation sensor
JP2012108786A (en) Microcomputer and processing synchronization method
JP2011002993A (en) Watchdog timer monitoring device, and watchdog timer monitoring method
JP4310744B2 (en) Engine control device
JP6729407B2 (en) Microcomputer
US20070109308A1 (en) Inter-cpu data transfer device
US9335749B2 (en) Semiconductor data processing apparatus and engine control apparatus
JP5246154B2 (en) Control device for internal combustion engine
JP5556760B2 (en) Engine control device
JP5659995B2 (en) Electronic control unit
JP2013061783A (en) Multi-core processor
JP2021163425A (en) Electronic control device
JP6466269B2 (en) Electronic control device and stack area usage monitoring method
JP7314838B2 (en) electronic controller
CN109844288B (en) Method for processing engine position data by multi-core computer
JP6771272B2 (en) In-vehicle electronic control device and stack usage
JP2013160133A (en) Electronic control device and control method
US6904543B2 (en) Electronic control having floating-point data check function
JP2681771B2 (en) Electronic ignition timing control method for internal combustion engine
JP6877475B2 (en) Electronic control device and stack usage
JP6071697B2 (en) Internal combustion engine control device, internal combustion engine control method, and program
JP2021152338A (en) Controller
JP2020112104A (en) Internal combustion engine control device