JP5644707B2 - Electronic control device and control system - Google Patents

Electronic control device and control system Download PDF

Info

Publication number
JP5644707B2
JP5644707B2 JP2011159100A JP2011159100A JP5644707B2 JP 5644707 B2 JP5644707 B2 JP 5644707B2 JP 2011159100 A JP2011159100 A JP 2011159100A JP 2011159100 A JP2011159100 A JP 2011159100A JP 5644707 B2 JP5644707 B2 JP 5644707B2
Authority
JP
Japan
Prior art keywords
unit
area
virtual memory
address
data
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
JP2011159100A
Other languages
Japanese (ja)
Other versions
JP2013024117A (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 JP2011159100A priority Critical patent/JP5644707B2/en
Publication of JP2013024117A publication Critical patent/JP2013024117A/en
Application granted granted Critical
Publication of JP5644707B2 publication Critical patent/JP5644707B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、マスタユニットが複数のスレーブユニットのメモリにデータを保存するようになっている制御システムに関する。   The present invention relates to a control system in which a master unit stores data in memories of a plurality of slave units.

車両における制御分野では、マスタユニットとしての電子制御装置によって制御されるスレーブユニットとしてのアクチュエータ装置(例えばインジェクタ)に、メモリを内蔵することが知られており、メモリには、そのアクチュエータ装置の製造時において、そのアクチュエータ装置に固有のデータ(例えば、そのアクチュエータ装置の機差分を補正するための補正値)が書き込まれる。そして、そのメモリ内のデータは、電子制御装置に読み込まれて該アクチュエータ装置の制御に用いられる(例えば、特許文献1,2参照)。   In the field of vehicle control, it is known that an actuator device (for example, an injector) as a slave unit controlled by an electronic control device as a master unit incorporates a memory. The data unique to the actuator device (for example, a correction value for correcting the machine difference of the actuator device) is written. The data in the memory is read into the electronic control device and used for controlling the actuator device (see, for example, Patent Documents 1 and 2).

また、電子制御装置がアクチュエータ装置を制御する過程で求めた学習値を、そのアクチュエータ装置のメモリに書き込んで保存しておくことにより、電子制御装置の交換によって学習値が失われてしまうのを防止することも考えられている(例えば、特許文献1参照)。   In addition, the learning value obtained in the process of controlling the actuator device by the electronic control device is written and stored in the memory of the actuator device to prevent the learning value from being lost due to the replacement of the electronic control device. It is also conceivable to do this (for example, see Patent Document 1).

ここで、電子制御装置からアクチュエータ装置のメモリに退避させておくべき保存対象データとしては、そのアクチュエータ装置に固有のデータ以外にも、例えば、車両の識別情報や、フリーズフレームデータ(故障を検出した時点でのエンジン回転数や車速や燃料圧力等といった車両状態のデータ)等のように、制御システムにおいて共通のデータがある。このため、アクチュエータ装置のメモリの記憶領域は、そのアクチュエータ装置に固有のデータが記憶される固有領域と、制御システムにおいて共通のデータが記憶される共通領域とに分けられることとなる。   Here, as data to be saved that should be saved from the electronic control unit to the memory of the actuator device, in addition to data unique to the actuator device, for example, vehicle identification information, freeze frame data (fault detected) There is common data in the control system such as vehicle state data such as engine speed, vehicle speed, and fuel pressure at the time. For this reason, the storage area of the memory of the actuator device is divided into a unique area in which data unique to the actuator device is stored and a common area in which common data is stored in the control system.

そして、例えばエンジンの気筒毎に設けられるインジェクタのように、アクチュエータ装置が複数ある場合、電子制御装置は、各アクチュエータ装置のメモリにおける共通領域に、同じ保存対象データを書き込むように構成することが考えられる。このように構成すれば、複数のアクチュエータ装置の何れかが交換されても、他のアクチュエータ装置のメモリに同じ保存対象データが残るため、その保存対象データを継続的に残すことの確実性が向上する。尚、以下では、同じデータを複数箇所に保存することを、「データの冗長保存」という。   Then, when there are a plurality of actuator devices, such as an injector provided for each cylinder of the engine, the electronic control device may be configured to write the same storage target data in a common area in the memory of each actuator device. It is done. With this configuration, even if one of the plurality of actuator devices is replaced, the same storage target data remains in the memory of another actuator device, so the certainty of continuously storing the storage target data is improved. To do. Hereinafter, storing the same data in a plurality of locations is referred to as “redundant storage of data”.

特開2008−057413号公報JP 2008-057413 A 特開2009−228681号公報JP 2009-228681 A

ところで、電子制御装置が各アクチュエータ装置のメモリにおける共通領域に同じ保存対象データを書き込む前述の制御システムでは、データの冗長保存は実現できるものの、メモリの利用効率が悪いという課題がある。   By the way, in the above-described control system in which the electronic control device writes the same data to be stored in the common area in the memory of each actuator device, although redundant storage of data can be realized, there is a problem that the utilization efficiency of the memory is poor.

つまり、各アクチュエータ装置のメモリにおける共通領域の容量が、A個のデータを記憶可能な容量であるとすると、電子制御装置から見てアクチュエータ装置側に保存可能なデータの数(種類数という意味)は、やはりA個である。そして、その保存可能なデータの数は、アクチュエータ装置の個数が多くなって、全アクチュエータ装置での共通領域の合計容量が増えたとしても、変わらない。   That is, assuming that the capacity of the common area in the memory of each actuator device is a capacity capable of storing A data, the number of data that can be stored on the actuator device side as viewed from the electronic control device (meaning the number of types) Is still A. The number of data that can be stored does not change even if the number of actuator devices increases and the total capacity of the common area in all actuator devices increases.

そこで、本発明は、マスタユニットが複数のスレーブユニットのメモリにデータを保存する制御システムにおいて、スレーブユニットのメモリの利用効率を向上させることを目的としている。   Therefore, an object of the present invention is to improve the utilization efficiency of the memory of the slave unit in the control system in which the master unit stores data in the memories of a plurality of slave units.

請求項1の電子制御装置は、N個(但し、Nは3以上の整数)のスレーブユニットと通信線を介して通信可能に接続されるマスタユニットであり、そのN個のスレーブユニットと共に制御システムを成す。スレーブユニットは、自動車のエンジンの気筒毎に設けられて、対応する気筒に燃料を噴射するインジェクタである。そして、各スレーブユニットには、データの書き換えが可能な不揮発性のメモリが備えられており、そのメモリの特定記憶領域には、マスタユニットとしての当該電子制御装置によって保存対象データが書き込まれる。 The electronic control device according to claim 1 is a master unit that is communicably connected to N (where N is an integer of 3 or more) slave units via a communication line, and the control system together with the N slave units. Is made. The slave unit is an injector that is provided for each cylinder of an automobile engine and injects fuel into the corresponding cylinder. Each slave unit is provided with a non-volatile memory capable of rewriting data, and data to be saved is written into a specific storage area of the memory by the electronic control device as a master unit.

ここで特に、請求項1の電子制御装置は、各スレーブユニットにおける前記特定記憶領域から、連続した仮想メモリ領域を作成する仮想メモリ作成手段を備えている。そして、その仮想メモリ作成手段は、各スレーブユニットにおける前記特定記憶領域を、保存対象データの1つを記憶可能な一定容量の単位記憶領域毎に分割すると共に、その各単位記憶領域を、同じスレーブユニットに保有されるものがN個毎に現れることとなる順番にして、仮想メモリ領域の先頭からの各単位記憶領域として割り当てることにより、仮想メモリ領域を作成する。   Particularly, the electronic control device according to claim 1 includes virtual memory creating means for creating a continuous virtual memory area from the specific storage area in each slave unit. Then, the virtual memory creating means divides the specific storage area in each slave unit into unit storage areas of a certain capacity capable of storing one of the storage target data, and each unit storage area is divided into the same slave A virtual memory area is created by allocating each unit storage area from the beginning of the virtual memory area in the order in which the items held in the unit appear every N times.

更に、請求項1の電子制御装置は、書込手段を備えており、その書込手段は、前記作成された仮想メモリ領域において連続するR個(但し、2≦R<Nの整数)の単位記憶領域の各々に、同じ保存対象データを書き込む。   The electronic control device according to claim 1 further comprises a writing means, and the writing means is a unit of R units (where 2 ≦ R <N) that is continuous in the created virtual memory area. The same data to be saved is written in each storage area.

尚、スレーブユニットにおける特定記憶領域とは、詳しくは、そのスレーブユニットに備えられているメモリの特定記憶領域のことである。また、その特定記憶領域は、メモリの記憶領域の一部と全部との何れでも良い。また、作成された仮想メモリ領域の各単位記憶領域には、何れかのスレーブユニットにおける特定記憶領域の何れかの単位記憶領域が、現実の物理的な記憶領域(一般的な呼び方をすると物理アドレス)として割り当てられている(換言すれば、対応付けられている)ため、書込手段が仮想メモリ領域の何れかの単位記憶領域にデータを書き込むということは、その単位記憶領域に割り当てられている物理的な記憶領域にデータを書き込むということである。   The specific storage area in the slave unit is specifically a specific storage area of a memory provided in the slave unit. Further, the specific storage area may be a part or all of the storage area of the memory. In addition, in each unit storage area of the created virtual memory area, any unit storage area of the specific storage area in any slave unit is an actual physical storage area (in general terms, a physical storage area Address) is assigned (in other words, is associated), the fact that the writing means writes data to any unit storage area of the virtual memory area is assigned to that unit storage area. That is, data is written to a physical storage area.

このような電子制御装置によれば、各スレーブユニットにおける特定記憶領域に同じ保存対象データを書き込む従来の構成と比較すると、データの冗長保存を実現しつつ、スレーブユニットのメモリの利用効率を向上させることができる。つまり、特定記憶領域の容量が同じであれば、保存できるデータ数を増やすことができる。   According to such an electronic control device, compared with a conventional configuration in which the same storage target data is written to a specific storage area in each slave unit, the data storage efficiency is improved and the memory utilization efficiency of the slave unit is improved. be able to. That is, if the specific storage areas have the same capacity, the number of data that can be stored can be increased.

例えば、スレーブユニットの数が4(N=4)で、各スレーブユニットにおける特定記憶領域が30個の単位記憶領域から成っているとする。
この場合、従来の構成では、スレーブユニット側に30個(ここでの個は、種類という意味)のデータしか保存できない。
For example, the number of slave units is 4 (N = 4), and the specific storage area in each slave unit is composed of 30 unit storage areas.
In this case, in the conventional configuration, only 30 pieces of data can be stored on the slave unit side.

これに対して、請求項1の電子制御装置では、R=3とすれば、スレーブユニット側に40個のデータを保存することができ、R=2とすれば、スレーブユニット側に60個のデータを保存することができる。また、各データは、R個の異なるスレーブユニットに保存されることとなるため、データの冗長保存も実現される。つまり、何れかのスレーブユニットが交換されても、そのスレーブユニットに保存されていたデータは、他の何れかのスレーブユニットにも保存されていることとなり、保存対象データを失ってしまうことがない。
しかも、請求項1の電子制御装置は、
前記スレーブユニットの各々について、交換されたか否かを判定する交換検知手段と、
前記交換検知手段により前記スレーブユニットの何れかが交換されたと判定された場合に、その交換されたと判定されたスレーブユニットである交換後スレーブユニットにおける前記特定記憶領域の容量である交換後容量が、前記交換後スレーブユニットの前に当該電子制御装置に接続されていたスレーブユニットである交換前スレーブユニットにおける前記特定記憶領域の容量である交換前容量に対して、変化したか否かを判定する容量変化判定手段と、を備え、
前記仮想メモリ作成手段は、前記容量変化判定手段により前記交換後容量が前記交換前容量に対して変化したと判定された場合に、前記仮想メモリ領域を修正する。
On the other hand, in the electronic control device of claim 1, if R = 3, 40 data can be stored on the slave unit side, and if R = 2, 60 data on the slave unit side. Data can be saved. Also, since each data is stored in R different slave units, redundant storage of data is also realized. In other words, even if any slave unit is replaced, the data stored in that slave unit is also stored in any other slave unit, and the data to be stored is not lost. .
Moreover, the electronic control device according to claim 1 is:
For each of the slave units, replacement detection means for determining whether the slave unit has been replaced,
When it is determined that one of the slave units has been replaced by the replacement detection unit, the post-replacement capacity that is the capacity of the specific storage area in the post-replacement slave unit that is the slave unit that has been determined to be replaced, A capacity for determining whether or not a change has occurred with respect to the capacity before replacement, which is the capacity of the specific storage area in the slave unit before replacement, which is the slave unit connected to the electronic control unit before the slave unit after replacement. Change determination means,
The virtual memory creating unit corrects the virtual memory area when the capacity change determining unit determines that the post-replacement capacity has changed with respect to the pre-replacement capacity.

次に、請求項2の電子制御装置は、請求項1の電子制御装置において、仮想メモリ作成手段は、各スレーブユニットから特定記憶領域の先頭及び容量を示す領域情報を取得し、その取得した領域情報から各スレーブユニットにおける特定記憶領域を特定して、仮想メモリ領域を作成する。   Next, an electronic control device according to a second aspect is the electronic control device according to the first aspect, wherein the virtual memory creating means obtains area information indicating the head and capacity of the specific storage area from each slave unit, and the obtained area. A specific storage area in each slave unit is specified from the information to create a virtual memory area.

この構成によれば、各スレーブユニットの特定記憶領域の先頭位置(先頭アドレス)や容量が変わっても、その特定記憶領域を特定して、仮想メモリ領域を作成することができるようになる。   According to this configuration, even if the head position (head address) or the capacity of the specific storage area of each slave unit changes, the specific storage area can be specified and a virtual memory area can be created.

次に、請求項3の電子制御装置は、請求項1,2の電子制御装置において、データの書き換えが可能な不揮発性のメモリであるマスタ側メモリを備えている。
そして、この電子制御装置において、仮想メモリ作成手段は、各スレーブユニットにおける前記特定記憶領域に容量差があることによって、スレーブユニットにおける前記特定記憶領域の単位記憶領域を前記順番に従い割り当てることができない仮想メモリ領域の単位記憶領域に対しては、マスタ側メモリの単位記憶領域を割り当てる。
According to a third aspect of the present invention, there is provided an electronic control device according to the first or second aspect, further comprising a master-side memory that is a non-volatile memory capable of rewriting data.
In this electronic control device, the virtual memory creating means is a virtual memory that cannot allocate unit storage areas of the specific storage areas in the slave units according to the order because there is a capacity difference in the specific storage areas in the slave units. The unit storage area of the master side memory is allocated to the unit storage area of the memory area.

つまり、特定記憶領域の容量差によって、仮想メモリ領域に割り当てる単位記憶領域が足らなくなったスレーブユニットについては、そのスレーブユニットの足らなくなった分の単位記憶領域の代わりに、マスタ側メモリの単位記憶領域を用いるようにしている。尚、スレーブユニットの単位記憶領域とは、詳しくは、そのスレーブユニットにおける特定記憶領域の単位記憶領域のことであり、更に詳しくは、そのスレーブユニットに備えられているメモリの特定記憶領域を成している単位記憶領域のことである。   In other words, for the slave unit that has run out of unit storage areas to be allocated to the virtual memory area due to the difference in capacity of the specific storage area, the unit storage area of the master side memory is used instead of the unit storage area that the slave unit has run out. Is used. The unit storage area of the slave unit is specifically a unit storage area of the specific storage area in the slave unit, and more specifically, a specific storage area of the memory provided in the slave unit. It is a unit storage area.

そして、この構成によれば、あるスレーブユニットにおける特定記憶領域の容量が、他のスレーブユニットにおける特定記憶領域の容量より小さくても、データの冗長保存を実現することができる。つまり、何れかのスレーブユニットが交換されても、そのスレーブユニットに保存されていたデータは、他のスレーブユニットあるいはマスタ側メモリに保存されていることとなり、保存対象データを失ってしまうことがない。   According to this configuration, redundant storage of data can be realized even if the capacity of a specific storage area in a certain slave unit is smaller than the capacity of a specific storage area in another slave unit. In other words, even if one of the slave units is replaced, the data stored in the slave unit is stored in the other slave unit or the master side memory, and the data to be stored is not lost. .

次に、請求項4の電子制御装置は、請求項3の電子制御装置において、
前記容量変化判定手段により前記交換後容量が前記交換前容量に対して変化したと判定された場合に、前記交換後容量が前記交換前容量に対して増加したか減少したかを判別する判別手段を備え、
前記仮想メモリ作成手段は、
前記判別手段により前記交換後容量が前記交換前容量に対して増加したと判定された場合には、前記仮想メモリ領域を修正する処理として、
それまで本来なら前記交換前スレーブユニットにおける前記特定記憶領域の単位記憶領域が割り当てられるべきなのに前記マスタ側メモリの単位記憶領域を割り当てていた前記仮想メモリ領域の単位記憶領域に対して、前記交換後スレーブユニットにおける前記特定記憶領域の単位記憶領域のうち、増加した単位記憶領域を割り当てる処理を行い、
前記仮想メモリ作成手段は、
前記判別手段により前記交換後容量が前記交換前容量に対して減少したと判定された場合には、前記仮想メモリ領域を修正する処理として、
前記交換前スレーブユニットにおける前記特定記憶領域の単位記憶領域のうち、前記スレーブユニットの交換によって無くなってしまった単位記憶領域を割り当てていた前記仮想メモリ領域の単位記憶領域に対して、前記マスタ側メモリの単位記憶領域を割り当てる処理を行う。
次に、請求項の電子制御装置は、請求項1〜の電子制御装置において復元手段備えている。
Next, an electronic control device according to a fourth aspect is the electronic control device according to the third aspect,
Discriminating means for discriminating whether the post-replacement capacity has increased or decreased with respect to the pre-exchange capacity when it is determined by the capacity change determination means that the post-exchange capacity has changed with respect to the pre-exchange capacity With
The virtual memory creating means
When it is determined by the determination means that the post-replacement capacity has increased with respect to the pre-replacement capacity, as a process of correcting the virtual memory area,
For the unit storage area of the virtual memory area that had previously been allocated the unit storage area of the master side memory although the unit storage area of the specific storage area in the slave unit before replacement should be allocated Among the unit storage areas of the specific storage area in the slave unit, the process of assigning an increased unit storage area,
The virtual memory creating means
When the determination means determines that the post-replacement capacity has decreased with respect to the pre-replacement capacity, as a process of correcting the virtual memory area,
Of the unit storage areas of the specific storage area in the slave unit before replacement, the master side memory with respect to the unit storage area of the virtual memory area that has been allocated a unit storage area that has been lost due to replacement of the slave unit The unit storage area is allocated.
Then, the electronic control device according to claim 5, in the electronic control device according to claim 1-4, provided with a restoring means.

元手段は、交換検知手段によりスレーブユニットの何れかが交換されたと判定された場合に、その交換されたと判定されたスレーブユニット交換後スレーブユニットの前に当該電子制御装置に接続されていたスレーブユニット交換前スレーブユニットにおける特定記憶領域の単位記憶領域に記憶されていた保存対象データと同じ保存対象データが記憶されていた仮想メモリ領域における単位記憶領域を特定して、その特定した単位記憶領域に記憶されている保存対象データから、交換後スレーブユニットにおける特定記憶領域の単位記憶領域に書き込むべき保存対象データを復元する。 Restore unit, when any of the slave units are determined to be replaced by the exchange detection unit, is connected to the electronic control unit before the slave unit which is determined to be the replacement (replacement after slave unit) The unit storage area in the virtual memory area in which the same storage target data as the storage target data stored in the unit storage area of the specific storage area in the slave unit ( slave unit before replacement ) is specified and specified From the storage target data stored in the unit storage area, the storage target data to be written in the unit storage area of the specific storage area in the slave unit after replacement is restored.

この復元手段を備えることにより、交換前スレーブユニットに保存されていた保存対象データを、交換後スレーブユニットにも継承して保存することができるようになる。
尚、Rが3以上であれば、何れか1つのスレーブユニットが交換された場合、そのスレーブユニットに保存されていた保存対象データは、そのスレーブユニット以外に保有されている2つ以上の物理的な単位記憶領域に記憶されていることとなるため、復元手段は、例えば、その2つ以上の単位記憶領域に記憶されている保存対象データに対して多数決の処理を行うことにより、正しい保存対象データをより確実に復元することができる。
By providing this restoring means, it becomes possible to save the data to be saved, which has been saved in the slave unit before exchange, to the slave unit after exchange.
If R is 3 or more, when any one of the slave units is replaced, the storage target data stored in the slave unit is stored in two or more physical units other than the slave unit. Therefore, the restoration means, for example, performs a majority process on the storage target data stored in the two or more unit storage areas, so that the correct storage target is stored. Data can be restored more reliably.

また、複数のスレーブユニットを交換する際には、1つずつ交換するように作業規則を定めることで、保存対象データを失ってしまうことを防止することができる。
求項1〜の電子制御装置において、スレーブユニットは、自動車のエンジンの気筒毎に設けられて、対応する気筒に燃料を噴射するインジェクタである
In addition, when replacing a plurality of slave units, it is possible to prevent the data to be saved from being lost by defining a work rule so that the slave units are replaced one by one.
The electronic control unit Motomeko 1-5, the slave unit is provided for each cylinder of an automobile engine, a injector for injecting fuel into the corresponding cylinder.

このように、複数の各スレーブユニットが気筒毎のインジェクタであれば、以下の点で有利である。
(1)複数の各スレーブユニットが、同じハードウェアのものとなるため、電子制御装置の通信回路や通信手順を、各スレーブユニットで共通なものにすることができる。
Thus, if each of the plurality of slave units is an injector for each cylinder, it is advantageous in the following points.
(1) Since each of the plurality of slave units has the same hardware, the communication circuit and communication procedure of the electronic control device can be made common to each slave unit.

(2)各スレーブユニットのコネクタも同じものになるため、そのコネクタに接続してメモリからデータを読み出すための装置も、共通化することができる。
(3)各スレーブユニットのメモリ(特定記憶領域)に記憶されたデータ(例えばフリーズフレームデータ)を、自動車(車両)とは別の場所で解析したい場合に、インジェクタであれば、通常の制御ユニットよりもコンパクトであるため、持ち運びに便利である。
(2) Since the connectors of the slave units are the same, a device for connecting to the connectors and reading data from the memory can be shared.
(3) When the data (eg freeze frame data) stored in the memory (specific storage area) of each slave unit is to be analyzed at a location different from the automobile (vehicle), if it is an injector, a normal control unit It is more compact and convenient to carry.

一方、請求項6の制御システムによれば、マスタユニットとして、請求項1〜の電子制御装置を備えているため、請求項1〜の電子制御装置について述べた効果が得られる。求項6の制御システムにおいても、スレーブユニットは、エンジンの気筒毎のインジェクタである On the other hand, according to the control system of the sixth aspect, since the electronic control device according to the first to fifth aspects is provided as a master unit, the effects described with respect to the electronic control device according to the first to fifth aspects can be obtained. Also in Motomeko 6 control system, the slave unit is an injector for each cylinder of the engine.

実施形態の制御システムのハードウェア構成を説明する説明図である。It is explanatory drawing explaining the hardware constitutions of the control system of embodiment. 仮想メモリ領域の作成手順を説明する説明図である。It is explanatory drawing explaining the creation procedure of a virtual memory area. 交換判定処理を表すフローチャートである。It is a flowchart showing an exchange determination process. メモリ管理処理を表すフローチャートである。It is a flowchart showing a memory management process. 仮想メモリマッピング処理を表すフローチャートである。It is a flowchart showing a virtual memory mapping process. オールマッピング処理を表すフローチャートである。It is a flowchart showing all mapping processing. 差分マッピング処理を表すフローチャートである。It is a flowchart showing a difference mapping process. 書込処理を表すフローチャートである。It is a flowchart showing a writing process. 作成される仮想メモリ領域(仮想メモリアドレスと物理アドレスとのマッピング情報)の一例を説明する説明図である。It is explanatory drawing explaining an example of the virtual memory area (mapping information of a virtual memory address and a physical address) created.

以下に、本発明が適用された実施形態の制御システムについて説明する。尚、以下に説明する実施形態の制御システムは、車両(自動車)に搭載されて、該車両のエンジンへの燃料噴射を制御するものである。また、そのエンジンは4気筒エンジンであるものとして説明する。   Hereinafter, a control system according to an embodiment to which the present invention is applied will be described. In addition, the control system of embodiment described below is mounted in a vehicle (automobile) and controls the fuel injection to the engine of this vehicle. The engine will be described as a four-cylinder engine.

図1(A)に示すように、本実施形態の制御システム1は、エンジンの気筒#1〜#4毎に設けられて、対応する気筒に燃料を噴射する4つのインジェクタIJ1〜IJ4と、そのインジェクタIJ1〜IJ4を制御する電子制御装置(以下、ECUという)11とからなる。そして、ECU11とインジェクタIJ1〜IJ4は、車両内に配設された通信線12を介して通信可能に接続されている。   As shown in FIG. 1A, the control system 1 of the present embodiment is provided for each of the engine cylinders # 1 to # 4, and four injectors IJ1 to IJ4 for injecting fuel into the corresponding cylinders. An electronic control unit (hereinafter referred to as ECU) 11 that controls the injectors IJ1 to IJ4. The ECU 11 and the injectors IJ1 to IJ4 are communicably connected via a communication line 12 disposed in the vehicle.

ECU11は、CPU13,ROM14及びRAM15等を有したマイコン16と、データの書き換えが可能な不揮発性のメモリ(本実施形態ではEEPROM)17と、マイコン16が通信線12を介してインジェクタIJ1〜IJ4と通信するための通信回路18と、マイコン16からの制御信号に従って各インジェクタIJ1〜IJ4(詳しくは、各インジェクタIJ1〜IJ4に設けられている後述のアクチュエータ)を駆動する駆動回路19と、を備えている。   The ECU 11 includes a microcomputer 16 having a CPU 13, a ROM 14, a RAM 15, a nonvolatile memory (an EEPROM in the present embodiment) 17 capable of rewriting data, and the microcomputer 16 via injectors IJ 1 to IJ 4 via the communication line 12. A communication circuit 18 for communication, and a drive circuit 19 for driving the injectors IJ1 to IJ4 (specifically, actuators described later provided in the injectors IJ1 to IJ4) according to a control signal from the microcomputer 16 are provided. Yes.

一方、各インジェクタIJ1〜IJ4は、駆動されることで燃料の噴射口を開くアクチュエータ21と、データの書き換えが可能な不揮発性のメモリ(本実施形態ではEEPROM)23と、通信処理部25と、通信処理部25がECU11(詳しくはマイコン16)と通信するための通信回路27と、を備えている。尚、通信処理部25は、例えば、マイコンによって実現することができるが、論理回路等の他のハードウェア回路によって構成しても良い。   On the other hand, the injectors IJ1 to IJ4 are each driven by an actuator 21 that opens a fuel injection port, a nonvolatile memory (EEPROM in this embodiment) 23 that can rewrite data, a communication processing unit 25, The communication processing unit 25 includes a communication circuit 27 for communicating with the ECU 11 (specifically, the microcomputer 16). The communication processing unit 25 can be realized by, for example, a microcomputer, but may be configured by other hardware circuits such as a logic circuit.

そして、図示は省略しているが、各インジェクタIJ1〜IJ4のアクチュエータ21には、ECU11の駆動回路19によって出力される駆動信号が、インジェクタIJ1〜IJ4毎の駆動信号線を介して供給される。尚、アクチュエータ21は、例えば電磁式のソレノイドであるが、ピエゾ素子を使ったピエゾアクチュエータ等でも良い。   And although illustration is abbreviate | omitted, the drive signal output by the drive circuit 19 of ECU11 is supplied to the actuator 21 of each injector IJ1-IJ4 via the drive signal line | wire for every injector IJ1-IJ4. The actuator 21 is, for example, an electromagnetic solenoid, but may be a piezo actuator using a piezo element.

更に、図示は省略しているが、各インジェクタIJ1〜IJ4には、当該インジェクタの燃料取り込み口に設けられて該燃料取り込み口の燃料圧力(いわゆるインレット圧)を検出する圧力センサも備えられており、その圧力センサから出力される圧力信号(検出圧力を示すアナログ信号)は、インジェクタIJ1〜IJ4毎のセンサ信号線を介してECU11に入力される。   Furthermore, although not shown, each of the injectors IJ1 to IJ4 is also provided with a pressure sensor that is provided at the fuel intake port of the injector and detects the fuel pressure (so-called inlet pressure) at the fuel intake port. The pressure signal (analog signal indicating the detected pressure) output from the pressure sensor is input to the ECU 11 via a sensor signal line for each of the injectors IJ1 to IJ4.

また、図1(B)に示すように、各インジェクタIJ1〜IJ4のEEPROM23における記憶領域は、そのインジェクタIJn(nは1〜4の何れか)に固有のデータ(以下、固有データともいう)が書き込まれる固有領域29と、当該制御システム1において保存すべき共通のデータ(換言すれば、インジェクタIJ1〜IJ4に特化しないデータであり、以下、共通データともいう)が書き込まれる共通領域30とに分けられている。   As shown in FIG. 1B, the storage area in the EEPROM 23 of each of the injectors IJ1 to IJ4 contains data unique to the injector IJn (n is any one of 1 to 4) (hereinafter also referred to as unique data). The unique area 29 to be written and the common area 30 in which common data to be stored in the control system 1 (in other words, data not specific to the injectors IJ1 to IJ4, hereinafter also referred to as common data) are written. It is divided.

そして、固有領域29に書き込まれる固有データとしては、そのインジェクタIJnのユニットID、共通領域30の先頭アドレス(以下、共通領域先頭アドレスという)、共通領域30の容量を示す共通領域データ数、そのインジェクタIJnを制御する上で該インジェクタIJnの機差分を補正するために用いられる機差補正値等があり、それらは、当該インジェクタIJnの製造時に書き込まれる。また例えば、ECU11のマイコン16がインジェクタIJnを制御する過程で求めた学習値を、そのインジェクタIJnのEEPROM23に書き込むのであれば、その学習値も、固有データとして固有領域29に書き込まれる。   The unique data written in the unique area 29 includes the unit ID of the injector IJn, the start address of the common area 30 (hereinafter referred to as the common area start address), the number of common area data indicating the capacity of the common area 30, and the injector. There are machine difference correction values used for correcting machine differences of the injector IJn in controlling IJn, and these are written when the injector IJn is manufactured. Further, for example, if the learning value obtained in the process in which the microcomputer 16 of the ECU 11 controls the injector IJn is written in the EEPROM 23 of the injector IJn, the learning value is also written in the specific area 29 as specific data.

また、共通領域30に書き込まれる共通データとしては、例えば、車両の識別情報や、フリーズフレームデータ等があり、それらは、ECU11のマイコン16によって書き込まれる。   The common data written in the common area 30 includes, for example, vehicle identification information and freeze frame data, which are written by the microcomputer 16 of the ECU 11.

尚、本実施形態において、インジェクタIJnのユニットIDとしては、気筒#1に用いられるインジェクタであれば「ユニットID=1」、気筒#2に用いられるインジェクタであれば「ユニットID=2」、といった具合に、使用される気筒の番号が付与されるようになっており、このことは、インジェクタIJnが交換されても変わらない。また、そのユニットIDは、通信相手を示す通信IDとしても利用される。   In this embodiment, the unit ID of the injector IJn is “unit ID = 1” if the injector is used for the cylinder # 1, and “unit ID = 2” if the injector is used for the cylinder # 2. To be more specific, the cylinder number to be used is assigned, and this does not change even if the injector IJn is replaced. The unit ID is also used as a communication ID indicating a communication partner.

一方、本実施形態において、ECU11のEEPROM17と、各インジェクタIJ1〜IJ4のEEPROM23は、1つのアドレス領域(アドレスがそれぞれ付与された各領域であり、以下、1アドレス領域という)が所定数バイト(例えば1バイト又は2バイト)の容量となっており、その1アドレス領域毎に、1つのデータが書き込まれるようになっている。このため、EEPROM23の共通領域30では、1アドレス領域が、保存対象データの1つを記憶可能な一定容量の単位記憶領域になっている。そして、上記共通領域データ数は、共通領域30の1アドレス領域数(即ちアドレス数)を示すと共に、共通領域30に記憶可能なデータの数を示している。   On the other hand, in the present embodiment, the EEPROM 17 of the ECU 11 and the EEPROM 23 of the injectors IJ1 to IJ4 each have one address area (each area to which an address is assigned, hereinafter referred to as one address area) of a predetermined number of bytes (for example, The capacity is 1 byte or 2 bytes), and one data is written for each address area. For this reason, in the common area 30 of the EEPROM 23, one address area is a unit storage area of a certain capacity capable of storing one of the save target data. The number of common area data indicates the number of one address area (that is, the number of addresses) of the common area 30 and the number of data that can be stored in the common area 30.

そして、ECU11では、マイコン16が、ROM14内のプログラムをCPU13にて実行することにより、燃料噴射制御の処理を含む各種処理を行う。
例えば、マイコン16は、エンジン回転数や吸入空気量といったエンジンの運転状態に基づいて、各気筒の燃料噴射開始タイミング及び噴射時間を決定する。また、マイコン16は、各インジェクタIJ1〜IJ4から前述した機差補正値を読み出して、RAM15又はEEPROM17に保存しており、上記決定した燃料噴射開始タイミング及び噴射時間から、その機差補正値も用いて、各インジェクタIJ1〜IJ4のアクチュエータ21の駆動開始タイミング及び駆動継続時間を算出し、その算出結果に従って、駆動回路19から各インジェクタIJ1〜IJ4へ、アクチュエータ21を駆動するための駆動信号を出力させる。更に、マイコン16は、各インジェクタIJ1〜IJ4の前述した圧力センサから出力される圧力信号を一定時間毎にサンプリングすることにより、各インジェクタIJ1〜IJ4による実際の燃料噴射特性を検出し、その検出結果を用いてアクチュエータ21の駆動開始タイミング及び駆動継続時間を補正する処理も行う。
And in ECU11, the microcomputer 16 performs the various processes including the process of fuel-injection control by running the program in ROM14 by CPU13.
For example, the microcomputer 16 determines the fuel injection start timing and the injection time for each cylinder based on the engine operating state such as the engine speed and the intake air amount. Further, the microcomputer 16 reads the above-described machine difference correction value from each of the injectors IJ1 to IJ4 and stores it in the RAM 15 or the EEPROM 17, and uses the machine difference correction value from the determined fuel injection start timing and injection time. Thus, the drive start timing and drive duration of the actuator 21 of each injector IJ1 to IJ4 are calculated, and a drive signal for driving the actuator 21 is output from the drive circuit 19 to each injector IJ1 to IJ4 according to the calculation result. . Furthermore, the microcomputer 16 detects the actual fuel injection characteristics of the injectors IJ1 to IJ4 by sampling the pressure signals output from the pressure sensors of the injectors IJ1 to IJ4 at regular intervals, and the detection result. Is also used to correct the drive start timing and drive duration of the actuator 21.

尚、ECU11のマイコン16は、インジェクタIJ1〜IJ4からデータ(情報)を読み出す(読み込む)場合には、通信相手(この場合、読み出し相手)のインジェクタIJnのユニットIDと、データの読み出し先アドレス(EEPROM23におけるアドレス)とを含んだ読み出し要求フレームを、通信線12に送出する。すると、その読み出し要求フレームに含まれているユニットIDを保有するインジェクタIJnの通信処理部25が、その読み出し要求フレームからアドレスを抽出して、当該インジェクタIJnのEEPROM23におけるアドレスのうち、上記抽出したアドレスからデータを読み出して、そのデータをECU11へ送信することとなる。そして、ECU11のマイコン16は、そのインジェクタIJnからのデータを通信回路18を介して取得することとなる。   When reading (reading) data (information) from the injectors IJ1 to IJ4, the microcomputer 16 of the ECU 11 reads the unit ID of the injector IJn of the communication partner (in this case, the reading partner) and the data reading destination address (EEPROM 23). The read request frame including the address in the communication line 12 is sent out. Then, the communication processing unit 25 of the injector IJn that holds the unit ID included in the read request frame extracts an address from the read request frame, and among the addresses in the EEPROM 23 of the injector IJn, the extracted address The data is read out from the data, and the data is transmitted to the ECU 11. Then, the microcomputer 16 of the ECU 11 acquires data from the injector IJn via the communication circuit 18.

また逆に、ECU11のマイコン16は、インジェクタIJ1〜IJ4にデータ(情報)を書き込む場合には、通信相手(この場合、書き込み相手)のインジェクタIJnのユニットIDと、書き込むデータと、データの書き込み先アドレス(EEPROM23におけるアドレス)とを含んだ書き込み要求フレームを、通信線12に送出する。すると、その書き込み要求フレームに含まれているユニットIDを保有するインジェクタIJnの通信処理部25が、その書き込み要求フレームからデータとアドレスとを抽出して、その抽出したデータを、当該インジェクタIJnのEEPROM23のアドレスのうち、上記抽出したアドレスに書き込むこととなる。   Conversely, when the microcomputer 16 of the ECU 11 writes data (information) to the injectors IJ1 to IJ4, the unit ID of the injector IJn of the communication partner (in this case, the writing partner), the data to be written, and the data write destination A write request frame including an address (an address in the EEPROM 23) is sent to the communication line 12. Then, the communication processing unit 25 of the injector IJn having the unit ID included in the write request frame extracts data and an address from the write request frame, and the extracted data is used as the EEPROM 23 of the injector IJn. Of these addresses, the extracted address is written.

そして、ECU11のマイコン16は、インジェクタIJ1〜IJ4におけるEEPROM23の共通領域30(以下、単に、インジェクタIJ1〜IJ4の共通領域30ともいう)に、前述の共通データを書き込むが、本実施形態の制御システム1では、その共通領域30の扱い方及び共通データの書き込み手法に特徴がある。   The microcomputer 16 of the ECU 11 writes the above-described common data in the common area 30 of the EEPROM 23 in the injectors IJ1 to IJ4 (hereinafter also simply referred to as the common area 30 of the injectors IJ1 to IJ4). 1 is characterized in how to handle the common area 30 and a common data writing method.

そこで、まず概要について説明する。
図2に示すように、ECU11のマイコン16は、各インジェクタIJ1〜IJ4の共通領域30から、連続した仮想メモリ領域(仮想メモリ空間)31を作成する。
First, an outline will be described.
As shown in FIG. 2, the microcomputer 16 of the ECU 11 creates a continuous virtual memory area (virtual memory space) 31 from the common area 30 of the injectors IJ1 to IJ4.

具体的には、図2の左側に示すように、各インジェクタIJ1〜IJ4の共通領域30を、ただ単にインジェクタ毎のまとまりでつなげて連続的な仮想のメモリ領域とするのではなく、図2の右側に示すごとく、各インジェクタIJ1〜IJ4の共通領域30を、1アドレス領域毎に分割すると共に、その各1アドレス領域を、同じインジェクタに保有されるものがN個(NはインジェクタIJ1〜IJ4の数であり、本実施形態では4)毎に現れることとなる順番にして、仮想メモリ領域31の先頭からの各1アドレス領域として割り当てることにより、その仮想メモリ領域31を作成する。   Specifically, as shown on the left side of FIG. 2, the common area 30 of each of the injectors IJ1 to IJ4 is not simply connected to each injector as a continuous virtual memory area. As shown on the right side, the common area 30 of each of the injectors IJ1 to IJ4 is divided into one address area, and each of the one address area is held by the same injector (N is the number of the injectors IJ1 to IJ4). In this embodiment, the virtual memory area 31 is created by assigning each address area from the beginning of the virtual memory area 31 in the order of appearance every 4).

本実施形態では、インジェクタIJ1〜IJ4の共通領域30における1アドレス領域(以下、単に、インジェクタIJ1〜IJ4の1アドレス領域ともいう)の各々を、「インジェクタIJ1が保有するもの→インジェクタIJ2が保有するもの→インジェクタIJ3が保有するもの→インジェクタIJ4が保有するもの」の順番(以下、この順番をインジェクタ順ともいう)に繰り返し並べて配置することで、仮想メモリ領域31を形成している。   In the present embodiment, each of one address area in the common area 30 of the injectors IJ1 to IJ4 (hereinafter, also simply referred to as one address area of the injectors IJ1 to IJ4) is expressed as “what the injector IJ1 has → the injector IJ2 has. The virtual memory area 31 is formed by repeatedly arranging them in the order of “things → the ones held by the injector IJ3 → the ones held by the injectors IJ4” (hereinafter, this order is also referred to as the injector order).

尚、図2においては、右上から左下方向の斜め線によるハッチングを付した1つの四角枠が、インジェクタIJ1の1アドレス領域であり、網目線によるハッチングを付した1つの四角枠が、インジェクタIJ2の1アドレス領域であり、左上から右下方向の斜め線によるハッチングを付した1つの四角枠が、インジェクタIJ3の1アドレス領域であり、縦線によるハッチングを付した1つの四角枠が、インジェクタIJ4の1アドレス領域である。   In FIG. 2, one rectangular frame hatched by diagonal lines from the upper right to the lower left is one address area of the injector IJ1, and one square frame hatched by the mesh lines is the one of the injector IJ2. One rectangular area that is one address area and hatched by diagonal lines from the upper left to the lower right direction is one address area of the injector IJ3, and one rectangular frame that is hatched by vertical lines is that of the injector IJ4. One address area.

また、ECU11のマイコン16は、各インジェクタIJ1〜IJ4の共通領域30に容量差があることによって、各インジェクタIJ1〜IJ4の1アドレス領域を前記順番に従い割り当てることができない仮想メモリ領域31の1アドレス領域に対しては、当該ECU11のEEPROM17において仮想メモリ領域31のために用意されている所定領域(以下、ECUメモリという)33の1アドレス領域を割り当てる。そして、そのECUメモリ33の何れかの1アドレス領域を仮想メモリ領域31に割り当てる際には、空きアドレス(即ち、その時点で仮想メモリ領域31に割り当てていないアドレス)のうち、当該ECUメモリ33の先頭アドレスに近いものを優先して用いるようになっている。   Further, the microcomputer 16 of the ECU 11 has one address area of the virtual memory area 31 in which one address area of each of the injectors IJ1 to IJ4 cannot be assigned according to the above order due to a difference in capacity between the common areas 30 of the injectors IJ1 to IJ4. Is assigned one address area of a predetermined area (hereinafter referred to as ECU memory) 33 prepared for the virtual memory area 31 in the EEPROM 17 of the ECU 11. When any one address area of the ECU memory 33 is assigned to the virtual memory area 31, among the empty addresses (that is, addresses not assigned to the virtual memory area 31 at that time), A value close to the head address is preferentially used.

尚、図2においては、ハッチングを付していない白抜きの四角枠が、ECUメモリ33の1アドレス領域である。
そして、図2の例では、インジェクタIJ1の共通領域データ数が3であり、インジェクタIJ2の共通領域データ数が7であり、インジェクタIJ3の共通領域データ数が5であり、インジェクタIJ4の共通領域データ数が2である。
In FIG. 2, a white square frame without hatching is one address area of the ECU memory 33.
In the example of FIG. 2, the common area data number of the injector IJ1 is 3, the common area data number of the injector IJ2 is 7, the common area data number of the injector IJ3 is 5, and the common area data of the injector IJ4. The number is two.

このため、図2の例では、インジェクタIJ1〜IJ4の1アドレス領域の各々を前述のインジェクタ順に繰り返し配置した場合に、まず3サイクル目(m=3の部分参照)で、インジェクタIJ4の1アドレス領域が足らなくなる。   Therefore, in the example of FIG. 2, when each of the address areas of the injectors IJ1 to IJ4 is repeatedly arranged in the order of the injectors described above, first, in the third cycle (refer to the portion of m = 3), one address area of the injector IJ4 Is not enough.

よって、仮想メモリ領域31において、その3サイクル目における4番目の1アドレス領域(先頭から12番目の1アドレス領域であり、本来ならインジェクタIJ4の1アドレス領域が割り当てられるべき仮想の1アドレス領域:e=11の部分参照)には、ECUメモリ33の先頭の1アドレス領域が割り当てられることとなる。   Therefore, in the virtual memory area 31, the fourth one address area in the third cycle (the 12th one address area from the head, and the virtual one address area to which the one address area of the injector IJ4 should be assigned: e = 11), the first one address area of the ECU memory 33 is assigned.

また、次の4サイクル目(m=4の部分参照)では、インジェクタIJ4の1アドレス領域だけでなく、インジェクタIJ1の1アドレス領域も足らなくなる。
よって、仮想メモリ領域31において、その4サイクル目における1番目の1アドレス領域(先頭から13番目の1アドレス領域であり、本来ならインジェクタIJ1の1アドレス領域が割り当てられるべき仮想の1アドレス領域:e=12の部分参照)には、ECUメモリ33の先頭から2番目の1アドレス領域が割り当てられ、同4サイクル目における4番目の1アドレス領域(先頭から16番目の1アドレス領域であり、本来ならインジェクタIJ4の1アドレス領域が割り当てられるべき仮想の1アドレス領域:e=15の部分参照)には、ECUメモリ33の先頭から3番目の1アドレス領域が割り当てられることとなる。
Further, in the next fourth cycle (see the part of m = 4), not only one address area of the injector IJ4 but also one address area of the injector IJ1 is insufficient.
Therefore, in the virtual memory area 31, the first one address area in the fourth cycle (the thirteenth one address area from the beginning, and the virtual one address area to which the one address area of the injector IJ1 should be assigned: e = 12) is assigned the second 1-address area from the beginning of the ECU memory 33, and is the fourth 1-address area (the 16th one-address area from the beginning) in the fourth cycle. A virtual one address area to which one address area of the injector IJ4 is to be assigned (refer to the part of e = 15) is assigned the third one address area from the top of the ECU memory 33.

同様に、次の5サイクル目(m=5の部分参照)でも、インジェクタIJ1,IJ4の1アドレス領域が足らなくなる。
よって、仮想メモリ領域31において、その5サイクル目における1番目の1アドレス領域(先頭から17番目の1アドレス領域:e=16の部分参照)には、ECUメモリ33の先頭から4番目の1アドレス領域が割り当てられ、同5サイクル目における4番目の1アドレス領域(先頭から20番目の1アドレス領域:e=19の部分参照)には、ECUメモリ33の先頭から5番目の1アドレス領域が割り当てられることとなる。
Similarly, even in the next fifth cycle (see the part of m = 5), one address area of the injectors IJ1 and IJ4 is insufficient.
Therefore, in the virtual memory area 31, the first one address area in the fifth cycle (the 17th one address area from the top: see the part of e = 16) is the fourth one address from the top of the ECU memory 33. An area is allocated, and the fifth 1-address area from the top of the ECU memory 33 is allocated to the 4th 1-address area in the fifth cycle (the 20th 1-address area from the top: see the part of e = 19). Will be.

更に、次の6サイクル目(m=6の部分参照)では、インジェクタIJ1,IJ4の1アドレス領域だけでなく、インジェクタIJ3の1アドレス領域も足らなくなる。
よって、仮想メモリ領域31において、その6サイクル目における1番目の1アドレス領域(先頭から21番目の1アドレス領域:m=20の部分参照)には、ECUメモリ33の先頭から6番目の1アドレス領域が割り当てられ、同6サイクル目における3番目の1アドレス領域(先頭から23番目の1アドレス領域であり、本来ならインジェクタIJ3の1アドレス領域が割り当てられるべき仮想の1アドレス領域:e=22の部分参照)には、ECUメモリ33の先頭から7番目の1アドレス領域が割り当てられ、同6サイクル目における4番目の1アドレス領域(先頭から24番目の1アドレス領域:m=23の部分参照)には、ECUメモリ33の先頭から8番目の1アドレス領域が割り当てられることとなる。つまり、6サイクル目における2番目以外の各1アドレス領域には、ECUメモリ33の1アドレス領域がそれぞれ割り当てられることとなる。
Furthermore, in the next 6th cycle (refer to the portion of m = 6), not only one address area of the injectors IJ1 and IJ4 but also one address area of the injector IJ3 is insufficient.
Therefore, in the virtual memory area 31, the first one address area in the sixth cycle (the 21st one address area from the head: see the part of m = 20) is the sixth address from the head of the ECU memory 33. The area is allocated, and the third one address area in the sixth cycle (the first one address area from the head, which is the first one address area of the injector IJ3 is supposed to be allocated to the virtual one address area: e = 22 The 7th one address area from the top of the ECU memory 33 is allocated to the partial reference), and the 4th 1 address area in the sixth cycle (the 24th 1 address area from the top: see the part of m = 23) Is assigned an eighth address area from the top of the ECU memory 33. That is, one address area of the ECU memory 33 is assigned to each one address area other than the second one in the sixth cycle.

そして、次の7サイクル目(m=7の部分参照)でも、上記6サイクル目と同様に、インジェクタIJ1,IJ3,IJ4の1アドレス領域が足らなくなる。
このため、仮想メモリ領域31において、その7サイクル目における2番目以外の各1アドレス領域にも、ECUメモリ33の1アドレス領域がそれぞれ割り当てられることとなる。
In the next seventh cycle (refer to the portion of m = 7), as in the sixth cycle, one address area of the injectors IJ1, IJ3, and IJ4 is insufficient.
Therefore, in the virtual memory area 31, one address area of the ECU memory 33 is also allocated to each one address area other than the second one in the seventh cycle.

そして、インジェクタIJ1〜IJ4の共通領域30のうち、アドレス領域数が最大のものは7であるため、この7サイクル目で仮想メモリ領域31の作成は終了する。
ここで、本実施形態において、ECU11のマイコン16は、図2の右側に示すように、作成した仮想メモリ領域31の先頭から、連続する3個毎の1アドレス領域をグループとし、その各グループの1アドレス領域の各々に、同じ共通データを書き込むようになっている。このため、仮想メモリ領域31に対しては、同一のデータが3個ずつ書き込まれることとなる、そして、以下では、仮想メモリ領域31に書き込む同一データの数を「冗長データ数」という。尚、仮想メモリ領域31の何れかの1アドレス領域にデータを書き込むということは、実際には、その仮想の1アドレス領域に割り当てられている物理的な1アドレス領域(即ち、インジェクタIJ1〜IJ4の共通領域30又はECUメモリ33における何れかの1アドレス領域)にデータを書き込むということである。
Since the maximum number of address areas among the common areas 30 of the injectors IJ1 to IJ4 is 7, the creation of the virtual memory area 31 is completed in the seventh cycle.
Here, in the present embodiment, as shown on the right side of FIG. 2, the microcomputer 16 of the ECU 11 groups every three consecutive address areas from the top of the created virtual memory area 31, and The same common data is written in each address area. For this reason, three pieces of the same data are written in the virtual memory area 31, and hereinafter, the number of the same data written in the virtual memory area 31 is referred to as a “redundant data number”. Note that writing data to any one address area of the virtual memory area 31 actually means that one physical address area (that is, the injectors IJ1 to IJ4) assigned to the virtual one address area. That is, data is written in the common area 30 or any one address area in the ECU memory 33.

このため、図2の例では、仮想メモリ領域31として、最大28個の1アドレス領域を設定することができるが、1アドレス領域の数は冗長データ数(=3)の倍数あれば良いため、先頭から28個目の1アドレス領域は不要となる。よって、仮想メモリ領域31としては、7サイクル目における3番目であって、先頭から27番目の1アドレス領域までを設定している(換言すれば、その27番目の仮想アドレスまで、物理アドレスをマッピングしている)。   For this reason, in the example of FIG. 2, a maximum of 28 1-address areas can be set as the virtual memory area 31, but the number of 1-address areas only needs to be a multiple of the number of redundant data (= 3). The 28th one address area from the beginning is not necessary. Therefore, as the virtual memory area 31, the third address in the seventh cycle and the 27th one address area from the top are set (in other words, the physical address is mapped to the 27th virtual address). doing).

つまり、本実施形態では、インジェクタIJ1〜IJ4の共通領域30のアドレス領域数(共通領域データ数)のうちで、最大のものをMmaxとすると、仮想メモリ領域31の1アドレス領域数(アドレス数)としては、「4×Mmax」以下で且つ冗長データ数(=3)の倍数のうちの最大値だけ設定している。   That is, in this embodiment, if the maximum number of address areas (number of common area data) of the common area 30 of the injectors IJ1 to IJ4 is Mmax, the number of one address area (number of addresses) of the virtual memory area 31. Are set to the maximum value of multiples of the number of redundant data (= 3) which is equal to or less than “4 × Mmax”.

次に、ECU11のマイコン16が、共通データをインジェクタIJ1〜IJ4側に保存するために行う処理の内容について、フローチャートを用いて説明する。
まず図3は、インジェクタIJ1〜IJ4の何れかが交換されたことを検出するための交換判定処理を表すフローチャートである。尚、この交換判定処理は、例えば、車両のイグニッションオンに伴いECU11に動作用電源が投入されてマイコン16が起動すると実行される。また、本実施形態においては、インジェクタIJ1〜IJ4のうちの2個以上が同時に交換されることはないことを想定している。つまり、インジェクタIJ1〜IJ4の交換は、1つずつ行うように作業規則が定められている。
Next, the contents of the process performed by the microcomputer 16 of the ECU 11 for storing the common data on the injectors IJ1 to IJ4 side will be described using a flowchart.
First, FIG. 3 is a flowchart showing a replacement determination process for detecting that any of the injectors IJ1 to IJ4 has been replaced. This replacement determination process is executed, for example, when the operation power is turned on to the ECU 11 and the microcomputer 16 is activated when the vehicle is turned on. In the present embodiment, it is assumed that two or more of the injectors IJ1 to IJ4 are not replaced at the same time. That is, the work rule is determined so that the injectors IJ1 to IJ4 are exchanged one by one.

図3に示すように、マイコン16は、交換判定処理を開始すると、まずS110にて、各インジェクタIJ1〜IJ4から交換判定用情報を読み出して取得する。
この交換判定用情報は、インジェクタIJ1〜IJ4が交換されたか否かを判定するための情報であり、例えばEEPROM23の固有領域29における所定のアドレスに記憶されている。そして、その交換判定用情報は、インジェクタIJ1〜IJ4の製造時点(インジェクタIJ1〜IJ4がECU11に接続される前の時点)では、所定のデフォルト値(例えば0)になっており、当該マイコン16による後述のS140又はS150により、デフォルト値とは異なる所定値(以下、チェック済値という)に書き換えられる。
As shown in FIG. 3, when starting the replacement determination process, the microcomputer 16 first reads and acquires replacement determination information from each of the injectors IJ1 to IJ4 in S110.
This replacement determination information is information for determining whether or not the injectors IJ1 to IJ4 have been replaced. For example, the replacement determination information is stored at a predetermined address in the unique area 29 of the EEPROM 23. The replacement determination information has a predetermined default value (for example, 0) at the time of manufacture of the injectors IJ1 to IJ4 (before the injectors IJ1 to IJ4 are connected to the ECU 11). By S140 or S150 described later, the value is rewritten to a predetermined value (hereinafter referred to as a checked value) different from the default value.

そして、次のS120では、S110で取得した交換判定用情報がチェック済値ではないインジェクタがあるか否かを判定し、そのインジェクタがあれば、S130に進む。
S130では、全てのインジェクタIJ1〜IJ4の交換判定用情報がチェック済値ではないか否かを判定し、全てのインジェクタIJ1〜IJ4の交換判定用情報がチェック済値でなければ、ECU11に4つのインジェクタIJ1〜IJ4が接続された後の最初の起動時であり、4つのインジェクタIJ1〜IJ4は初期状態であると判断して、S140に進む。
In the next S120, it is determined whether or not there is an injector whose replacement determination information acquired in S110 is not a checked value. If there is such an injector, the process proceeds to S130.
In S130, it is determined whether or not the replacement determination information for all the injectors IJ1 to IJ4 is not a checked value, and if the replacement determination information for all the injectors IJ1 to IJ4 is not the checked value, the ECU 11 has four information. At the first startup after the injectors IJ1 to IJ4 are connected, it is determined that the four injectors IJ1 to IJ4 are in the initial state, and the process proceeds to S140.

そして、S140では、各インジェクタIJ1〜IJ4の状態情報S1〜S4を、初期を示す「1」に設定すると共に、各インジェクタIJ1〜IJ4のEEPROM23における交換判定用情報の格納先アドレスにチェック済値を書き込む。この書き込みにより、各インジェクタIJ1〜IJ4側の交換判定用情報は、デフォルト値からチェック済値に書き換えられることとなる。そして、その後、当該交換判定処理を終了する。   In S140, the status information S1 to S4 of the injectors IJ1 to IJ4 is set to “1” indicating the initial state, and a checked value is set to the storage destination address of the replacement determination information in the EEPROM 23 of each injector IJ1 to IJ4. Write. By this writing, the replacement determination information on the injectors IJ1 to IJ4 side is rewritten from the default value to the checked value. Thereafter, the exchange determination process is terminated.

また、上記S130にて否定判定(NOと判定)した場合、即ち、全てのインジェクタではなく、何れか1つのインジェクタの交換判定用情報がチェック済値ではない場合には、そのインジェクタが交換されたと判断して、S150に移行する。   Further, if the determination in S130 is negative (determined as NO), that is, if not all the injectors but the replacement determination information of any one of the injectors is not a checked value, the injector has been replaced. Determination is made and the process proceeds to S150.

S150では、交換判定用情報がチェック済値ではなかったインジェクタIJx(xは1〜4の何れか)の状態情報Sxを、交換を示す「2」に設定すると共に、そのインジェクタIJxのEEPROM23における交換判定用情報の格納先アドレスにチェック済値を書き込む。この書き込みにより、交換されたインジェクタIJx側の交換判定用情報は、デフォルト値からチェック済値に書き換えられることとなる。そして、その後、当該交換判定処理を終了する。   In S150, the status information Sx of the injector IJx (x is any one of 1 to 4) whose replacement determination information is not a checked value is set to “2” indicating replacement, and replacement of the injector IJx in the EEPROM 23 is performed. Write the checked value to the storage address of the judgment information. As a result of this writing, the replacement determination information on the replaced injector IJx side is rewritten from the default value to the checked value. Thereafter, the exchange determination process is terminated.

一方、上記S120にて、交換判定用情報がチェック済値ではないインジェクタがない(即ち、全てのインジェクタの交換判定用情報がチェック済値である)と判定した場合には、インジェクタIJ1〜IJ4は交換されていないと判断して、S160に移行する。そして、S160では、各インジェクタIJ1〜IJ4の状態情報S1〜S4を、非交換を示す「0」に設定し、その後、当該交換判定処理を終了する。   On the other hand, if it is determined in S120 that there is no injector whose replacement determination information is not the checked value (that is, the replacement determination information of all the injectors is the checked value), the injectors IJ1 to IJ4 are If it is determined that they have not been exchanged, the process proceeds to S160. In S160, the state information S1 to S4 of the injectors IJ1 to IJ4 is set to “0” indicating non-exchange, and then the exchange determination process is terminated.

尚、インジェクタのEEPROM23に交換判定用情報としてのチェック済値を書き込む処理(デフォルト値からチェック済値に書き換える処理)は、S140,S150で行わずに、後述する図4のS230の処理(仮想メモリマッピング処理)を実行した直後に行うようにしても良い。そのようにすれば、例えば、図3のS140又はS150の処理が終了してから、図4のS230の処理が完了するまでの間に、マイコン16が何等かの理由で再起動されたとしても、交換判定用情報はチェック済値に書き換えられていないため、図3におけるS120やS130で再び「YES」と判定されて、S140又はS150により状態情報S1〜S4を再び正しく設定することができ、延いては、後述する図4のS230の処理を実行し損ねてしまうことを防止することができる。   Note that the process of writing the checked value as the replacement determination information (the process of rewriting the default value to the checked value) in the EEPROM 23 of the injector is not performed in S140 and S150, but the process of S230 in FIG. The mapping process may be performed immediately after execution. In this case, for example, even if the microcomputer 16 is restarted for some reason after the processing of S140 or S150 in FIG. 3 is completed and until the processing of S230 in FIG. 4 is completed. Since the replacement determination information has not been rewritten to the checked value, it is determined again as “YES” in S120 and S130 in FIG. 3, and the state information S1 to S4 can be correctly set again in S140 or S150. As a result, it is possible to prevent the process of S230 in FIG.

また、S120とS130では、「交換判定用情報がチェック済値ではない」ということに代えて、「交換判定用情報がデフォルト値である」ということを判定しても良い。また、チェック済値は、インジェクタIJ1〜IJ4毎に異なった値にしても良い。また、インジェクタIJ1〜IJ4は、ECU11との接続が解除されると(つまり、車両から取り外されると)、記憶している交換判定用情報がデフォルト値へと自動的に戻るように構成されていても良い。例えば、インジェクタIJ1〜IJ4において、交換判定用情報を、ECU11から常時電源が供給されるバックアップRAMに記憶するように構成すれば、インジェクタIJ1〜IJ4の取り外しに伴って、その交換判定用情報が自動的にリセットされるようにすることができる。   In S120 and S130, it may be determined that “the replacement determination information is a default value” instead of “the replacement determination information is not a checked value”. Further, the checked value may be a value different for each of the injectors IJ1 to IJ4. Further, the injectors IJ1 to IJ4 are configured such that when the connection with the ECU 11 is released (that is, when the injectors IJ1 to IJ4 are removed from the vehicle), the stored replacement determination information automatically returns to the default value. Also good. For example, in the injectors IJ1 to IJ4, if the replacement determination information is configured to be stored in a backup RAM that is constantly supplied with power from the ECU 11, the replacement determination information is automatically updated along with the removal of the injectors IJ1 to IJ4. Can be reset automatically.

次に、図4は、仮想メモリ領域31を作成するためのメモリ管理処理を表すフローチャートである。尚、このメモリ管理処理は、図3の交換判定処理に続いて実行される。
図4に示すように、マイコン16は、メモリ管理処理を開始すると、まずS210にて、インジェクタIJ1〜IJ4の状態情報S1〜S4を読み込む。
Next, FIG. 4 is a flowchart showing a memory management process for creating the virtual memory area 31. This memory management process is executed following the replacement determination process of FIG.
As shown in FIG. 4, when starting the memory management process, the microcomputer 16 first reads state information S1 to S4 of the injectors IJ1 to IJ4 in S210.

次にS220にて、状態情報S1〜S4のうちで「1」又は「2」のものがあるか否かを判定し、「1」又は「2」の状態情報がなければ、そのまま当該メモリ管理処理を終了する。   Next, in S220, it is determined whether there is "1" or "2" among the state information S1 to S4. If there is no state information "1" or "2", the memory management is performed as it is. The process ends.

一方、状態情報S1〜S4のうちで「1」又は「2」のものがあれば(S220:YES)、S230に進み、図5の仮想メモリマッピング処理を行った後、当該メモリ管理処理を終了する。   On the other hand, if any of the status information S1 to S4 is “1” or “2” (S220: YES), the process proceeds to S230, and after performing the virtual memory mapping process of FIG. To do.

ここで、図5に示すように、仮想メモリマッピング処理では、まずS310にて、各インジェクタIJ1〜IJ4から前述の共通領域データ数M1〜M4を読み出して取得する。また、このときに、各インジェクタIJ1〜IJ4から共通領域先頭アドレスAI1〜AI4も読み出して取得しておく。   Here, as shown in FIG. 5, in the virtual memory mapping process, first, in S310, the above-mentioned common area data numbers M1 to M4 are read and acquired from the injectors IJ1 to IJ4. At this time, the common area head addresses AI1 to AI4 are also read and acquired from the injectors IJ1 to IJ4.

そして、次のS320にて、各インジェクタIJ1〜IJ4の共通領域データ数M1〜M4のうちで最大のものを、Mmaxとして記憶する。
次にS330にて、仮想メモリアドレスポインタeと保存データ数カウンタdとを、0に初期化する。尚、仮想メモリアドレスポインタeは、図9に示すように、仮想メモリ領域31のアドレスである仮想メモリアドレスを示すポインタであり、仮想メモリ領域31の先頭アドレスEを0番目にした場合の何番目の仮想メモリアドレスであるかを示すものである。また、保存データ数カウンタdは、作成する仮想メモリ領域31に保存可能なデータ数をカウントするカウンタである。
In the next S320, the largest one of the common area data numbers M1 to M4 of the injectors IJ1 to IJ4 is stored as Mmax.
In step S330, the virtual memory address pointer e and the stored data number counter d are initialized to zero. As shown in FIG. 9, the virtual memory address pointer e is a pointer indicating a virtual memory address that is an address of the virtual memory area 31, and what number when the top address E of the virtual memory area 31 is 0th is shown. This is a virtual memory address. The stored data number counter d is a counter that counts the number of data that can be stored in the virtual memory area 31 to be created.

次にS340にて、処理回数をカウントするためのカウンタmを1に初期化し、その後、一点鎖線枠内に示すS350〜S450からなる処理を行った後、S460にて、カウンタmをインクリメントする。そして、次のS470にて、カウンタmがMmax以下であるか否かを判定し、カウンタmがMmax以下であれば、S340の次のS350へ戻るが、カウンタmがMmax以下でなければ(Mmaxを超えたなら)、当該仮想メモリマッピングを終了する。このため、一点鎖線枠内に示すS350〜S450からなる処理は、Mmaxと同じ回数だけ繰り返される。   Next, in S340, a counter m for counting the number of processes is initialized to 1, and thereafter, the process consisting of S350 to S450 shown in the one-dot chain line frame is performed, and then in S460, the counter m is incremented. In next S470, it is determined whether or not the counter m is equal to or less than Mmax. If the counter m is equal to or less than Mmax, the process returns to S350 next to S340, but if the counter m is not equal to or less than Mmax (Mmax The virtual memory mapping is terminated. For this reason, the process which consists of S350-S450 shown in a dashed-dotted line frame is repeated as many times as Mmax.

また、その一点鎖線枠内の処理において、最初のS350では、処理回数をカウントするためと、処理対象のインジェクタを示すために設けられているカウンタuを1にし、その後、点線枠内に示すS360〜S430からなる処理を行った後、S440にて、カウンタuをインクリメントする。そして、次のS450にて、カウンタuがインジェクタIJ1〜IJ4の個数であるN(=4)以下であるか否かを判定し、カウンタuがN以下であれば、S350の次のS360へ戻るが、カウンタuがN以下でなければ(Nを超えたなら)、S460に進む。   Further, in the process within the one-dot chain line frame, in the first S350, the counter u provided to count the number of processes and to indicate the injector to be processed is set to 1, and then S360 shown in the dotted line frame After performing the process consisting of S430, the counter u is incremented in S440. In next S450, it is determined whether or not the counter u is equal to or smaller than N (= 4) which is the number of injectors IJ1 to IJ4. If the counter u is equal to or smaller than N, the process returns to S360 next to S350. However, if the counter u is not less than or equal to N (if N is exceeded), the process proceeds to S460.

このため、図2に示すように、カウンタuは1からN(=4)の間で1ずつ増加してラップラウンドし、そのカウンタuが1〜Nの何れかになる各回毎に、点線枠内に示すS360〜S430からなる処理が行われる。そして更に、カウンタuが1からNまでの一周をするサイクル毎に、カウンタmが1ずつ増加することとなり、該カウンタmがMmaxを超えた時点で、仮想メモリマッピング処理が終了する。   Therefore, as shown in FIG. 2, the counter u is incremented by 1 between 1 and N (= 4) and wraps round, and each time the counter u becomes 1 to N, a dotted frame The process which consists of S360-S430 shown inside is performed. Further, every time the counter u makes a round from 1 to N, the counter m is incremented by 1. When the counter m exceeds Mmax, the virtual memory mapping process ends.

そして、このように繰り返される点線枠内の処理において、最初のS360では、仮想メモリアドレスポインタeを冗長データ数R(本実施形態ではR=3)で割った余りが0であるか否かを判定する。尚、仮想メモリアドレスポインタeは、点線枠内の処理のうちの後述するS430にてインクリメントされる。このため、仮想メモリアドレスポインタeは、0を初期値として、点線枠内の処理が行われる毎に(カウンタuが変化する毎に)インクリメントされる(図2参照)。   In the process within the dotted frame repeated in this manner, in the first S360, it is determined whether or not the remainder obtained by dividing the virtual memory address pointer e by the redundant data number R (R = 3 in this embodiment) is zero. judge. The virtual memory address pointer e is incremented in S430, which will be described later, in the processing within the dotted line frame. Therefore, the virtual memory address pointer e is incremented every time processing within the dotted frame is performed (every time the counter u changes), with 0 as an initial value (see FIG. 2).

このS360にて、「e/Rの余り」が0でないと判定した場合には、そのままS380に進むが、「e/Rの余り」が0であると判定した場合には、S370に進んで、保存データ数カウンタdをインクリメントした後、S380に進む。このため、図2に示すように、保存データ数カウンタdは、仮想メモリアドレスポインタeが冗長データ数R(=3)の倍数(0を含む)になる毎に、インクリメントされる。   If it is determined in S360 that the “remainder of e / R” is not 0, the process proceeds to S380, but if it is determined that the “remainder of e / R” is 0, the process proceeds to S370. After incrementing the stored data number counter d, the process proceeds to S380. Therefore, as shown in FIG. 2, the stored data number counter d is incremented every time the virtual memory address pointer e becomes a multiple (including 0) of the redundant data number R (= 3).

そして、S380では、マッピング終了条件が成立したか否かを判定する。
マッピング終了条件とは、仮想メモリアドレスポインタeが示す仮想メモリアドレスに対して物理アドレスをマッピングする(対応付ける、割り当てる)ための後述するS400又はS410の処理を行わなくても良い条件であり、物理アドレスとのマッピングが完了した仮想メモリアドレスの数が、「N×Mmax」以下で且つRの倍数のうちの最大値に達したという条件である。そして、S380では、具体的な判定式としては、「d×R>N×Mmax」であるか否かを判定している。
In S380, it is determined whether a mapping end condition is satisfied.
The mapping end condition is a condition that does not require the processing of S400 or S410, which will be described later, for mapping (associating or assigning) a physical address to the virtual memory address indicated by the virtual memory address pointer e. Is the condition that the number of virtual memory addresses for which mapping has been completed reaches “N × Mmax” or less and reaches the maximum value among multiples of R. In S380, as a specific determination formula, it is determined whether or not “d × R> N × Mmax”.

このS380にて、マッピング終了条件が成立したと肯定判定(YESと判定)した場合には、そのまま点線枠内の処理を抜けてS440に移行する。この場合、以後のS380でも肯定判定することとなり、実質的な処理としては、カウンタuのカウントアップ(S440)と、カウンタmのカウントアップ(S460)だけが行われ、カウンタmがMmaxを超えた時点で、当該仮想メモリマッピング処理が終了する。   If it is determined in S380 that the mapping end condition is satisfied (YES determination), the process within the dotted line frame is directly exited and the process proceeds to S440. In this case, an affirmative determination is made in subsequent S380, and as a substantial process, only the count up of the counter u (S440) and the count up of the counter m (S460) are performed, and the counter m exceeds Mmax. At this point, the virtual memory mapping process ends.

一方、上記S380にて、マッピング終了条件が成立していないと判定した場合には、S390に進む。
S390では、カウンタuの現在値に対応する処理対象のインジェクタIJu(uは、カウンタuの現在値であり1〜4の何れか)の状態情報Suが「1」であるか否かを判定する。
On the other hand, if it is determined in S380 that the mapping end condition is not satisfied, the process proceeds to S390.
In S390, it is determined whether or not the status information Su of the injector IJu (u is the current value of the counter u and any one of 1 to 4) corresponding to the current value of the counter u is “1”. .

そして、状態情報Suが「1」であれば(S390:YES)、S400に進み、インジェクタIJuについて、後述する図6のオールマッピング処理を行った後、S430に進んで、仮想メモリアドレスポインタeをインクリメントする。そして、その後、点線枠内の処理を抜けてS440に移行する。尚、状態情報S1〜S4は、「1」に設定されるのであれば、図3のS140にて、全ての状態情報S1〜S4が「1」に設定されるため、S400のオールマッピング処理は、カウンタuが1〜4の全ての場合に行われる(換言すれば、全てのインジェクタIJ1〜IJ4について行われる)こととなる。   If the status information Su is “1” (S390: YES), the process proceeds to S400, and the injector IJu performs an all mapping process of FIG. 6 to be described later, and then proceeds to S430 to set the virtual memory address pointer e. Increment. Thereafter, the process in the dotted line frame is exited and the process proceeds to S440. If the status information S1 to S4 is set to “1”, all the status information S1 to S4 are set to “1” in S140 of FIG. It is performed in all cases where the counter u is 1 to 4 (in other words, it is performed for all the injectors IJ1 to IJ4).

また、上記S390にて、状態情報Suが「1」ではないと判定した場合には、S410に移行して、状態情報Suが「2」であるか否かを判定する。そして、状態情報Suが「2」でなければ(S410:NO)、そのまま上記S430に移行するが、状態情報Suが「2」であれば(S410:YES)、S430に進み、インジェクタIJuについて、後述する図7の差分マッピング処理を行った後、上記S430に進む。尚、状態情報S1〜S4は、「2」に設定されるのであれば、図3のS150にて、何れか1つだけが「2」に設定されるため、S420の差分マッピング処理は、「2」に設定されている状態情報Suに対応するインジェクタIJuであって、交換されたインジェクタIJuについて行われることとなる。   In S390, when it is determined that the state information Su is not “1”, the process proceeds to S410, and it is determined whether or not the state information Su is “2”. If the status information Su is not “2” (S410: NO), the process proceeds to S430 as it is. If the status information Su is “2” (S410: YES), the process proceeds to S430, and the injector IJu is After performing the differential mapping process of FIG. 7 described later, the process proceeds to S430. If the status information S1 to S4 is set to “2”, only one of the status information S1 to S4 is set to “2” in S150 of FIG. This is performed for the injector IJu that corresponds to the status information Su set to “2” and that has been replaced.

次に、図5のS400で行われるオールマッピング処理について説明する。
図6に示すように、オールマッピング処理では、まずS510にて、カウンタuの現在値に対応する処理対象のインジェクタIJuのメモリマッピング(即ち、インジェクタIJuの共通領域30の各アドレスを仮想メモリアドレスの何れかに割り当てること)が未完了であるか否かを判定する。具体的には、インジェクタIJuの共通領域データ数Muと、カウンタmの現在値とを比較して、「m≦Mu」であるか否かを判定する。
Next, the all mapping process performed in S400 of FIG. 5 will be described.
As shown in FIG. 6, in the all mapping process, first, in S510, the memory mapping of the processing target injector IJu corresponding to the current value of the counter u (that is, each address of the common area 30 of the injector IJu is set to the virtual memory address). It is determined whether or not (assignment to any) is incomplete. Specifically, the common area data number Mu of the injector IJu is compared with the current value of the counter m to determine whether or not “m ≦ Mu”.

そして、「m≦Mu」であれば、インジェクタIJuのメモリマッピングが未完了であると判断して、S520に進み、仮想メモリアドレスポインタeが示す仮想メモリアドレス「E+e」に対応する(割り当てる)物理アドレスとして、インジェクタIJuのユニットIDと、インジェクタIJuの共通領域先頭アドレスAIuに「m−1」を加算したアドレスとからなる情報を記憶する。そして、その後、当該オールマッピング処理を終了する。   If “m ≦ Mu”, it is determined that the memory mapping of the injector IJu has not been completed, and the process proceeds to S520, where the physical corresponding to (allocated) the virtual memory address “E + e” indicated by the virtual memory address pointer e. Information including the unit ID of the injector IJu and an address obtained by adding “m−1” to the common area head address AIu of the injector IJu is stored as the address. Then, the all mapping process ends.

また、上記S510にて、「m≦Mu」ではない(m>Mu)と判定した場合には、インジェクタIJuのメモリマッピングが完了しているため(即ち、仮想メモリアドレスに割り当てていないインジェクタIJuの共通領域30のアドレスはもう無いため)、S530に移行する。そのS530では、仮想メモリアドレスポインタeが示す仮想メモリアドレス「E+e」に対応する(割り当てる)物理アドレスとして、当該ECU11のユニットID(本実施形態では0)と、ECUメモリ33の空きアドレス(仮想メモリアドレスに割り当てていないアドレス)のうちの最小のアドレスとからなる情報を記憶する。そして、その後、当該オールマッピング処理を終了する。   If it is determined in S510 that “m ≦ Mu” is not satisfied (m> Mu), the memory mapping of the injector IJu is complete (that is, the injector IJu not assigned to the virtual memory address). Since there is no longer an address in the common area 30, the process proceeds to S530. In S530, as the physical address corresponding to (assigned to) the virtual memory address “E + e” indicated by the virtual memory address pointer e, the unit ID of the ECU 11 (0 in the present embodiment) and the free address of the ECU memory 33 (virtual memory) Information consisting of the smallest address among the addresses not assigned to the address) is stored. Then, the all mapping process ends.

つまり、本実施形態において、仮想メモリアドレスの各々に割り当てる物理アドレスは、物理的なメモリ(実際に存在するメモリであり、インジェクタIJ1〜IJ4のEEPROM23又はECU11のEEPROM17)におけるアドレス(以下、物理メモリアドレスという)と、その物理的なメモリが搭載されているユニット(インジェクタIJ1〜IJ4又はECU11)を示すユニットIDとの、2つの情報からなっている(図9参照)。   That is, in the present embodiment, the physical address assigned to each virtual memory address is an address (hereinafter referred to as a physical memory address) in a physical memory (actually existing memory, the EEPROM 23 of the injectors IJ1 to IJ4 or the EEPROM 17 of the ECU 11). And the unit ID indicating the unit (injectors IJ1 to IJ4 or ECU 11) in which the physical memory is mounted (see FIG. 9).

尚、上記S520,S530の処理で記憶される仮想メモリアドレスと物理アドレスとの対応関係情報であるマッピング情報は、EEPROM17における特定の領域に保存するようになっている。そして、このことは、後述する差分マッピング処理によって設定し直されるマッピング情報についても同様である。   Note that the mapping information, which is the correspondence information between the virtual memory address and the physical address stored in the processing of S520 and S530, is stored in a specific area in the EEPROM 17. This also applies to mapping information that is reset by a differential mapping process described later.

そして、上記のオールマッピング処理が図5のS400で行われることにより、ECU11に4つのインジェクタIJ1〜IJ4が接続された後の、該ECU11の最初の起動時(一般には、ECU11の車両への組み付け直後の起動時)には、仮想メモリ領域31が図2の右側に示したように作成されることとなる。   Then, when the above-described all mapping process is performed in S400 of FIG. 5, after the four injectors IJ1 to IJ4 are connected to the ECU 11, the ECU 11 is started for the first time (generally, the ECU 11 is assembled to the vehicle). At the time of startup immediately after), the virtual memory area 31 is created as shown on the right side of FIG.

例えば、図9は、図2の例で作成される仮想メモリ領域31について、具体的なアドレス値を用いて、仮想メモリアドレスと物理アドレスとのマッピング情報を例示した図である。そして、この図9の例においては、仮想メモリ領域31の先頭アドレスEが「0x0000」で、インジェクタIJ1〜IJ4の共通領域先頭アドレスAI1〜AI4は全て同じで「0x1000」となっている。尚、“0x”は、それ以降の英数字が16進数表示のものであることを示している。   For example, FIG. 9 is a diagram illustrating mapping information between virtual memory addresses and physical addresses using specific address values for the virtual memory area 31 created in the example of FIG. In the example of FIG. 9, the start address E of the virtual memory area 31 is “0x0000”, and the common area start addresses AI1 to AI4 of the injectors IJ1 to IJ4 are all the same and “0x1000”. “0x” indicates that the subsequent alphanumeric characters are displayed in hexadecimal.

その図9に示すように、カウンタuが1から4の間でラップラウンドするサイクルのうち、カウンタmが1の場合である1サイクル目では、カウンタuが1〜4の各場合に、オールマッピング処理(図6)におけるS520の処理が行われることにより、仮想メモリ領域31の先頭から4番目までの4つのアドレス「0x0000」〜「0x0003」の各々に、各インジェクタIJ1〜IJ4の共通領域先頭アドレス(AI1〜AI4=「0x1000」)がマッピングされる。   As shown in FIG. 9, in the first cycle in which the counter m is 1 among the cycles in which the counter u is between 1 and 4, all mapping is performed when the counter u is 1 to 4. By performing the process of S520 in the process (FIG. 6), the common area head address of each of the injectors IJ1 to IJ4 is assigned to each of the four addresses “0x0000” to “0x0003” from the head of the virtual memory area 31 to the fourth. (AI1 to AI4 = “0x1000”) are mapped.

具体的には、仮想メモリアドレス「0x0000」に対しては、インジェクタIJ1のユニットID(=1)と、インジェクタIJ1の共通領域先頭アドレス「0x1000」とが、物理アドレスとしてマッピングされ、仮想メモリアドレス「0x0001」に対しては、インジェクタIJ2のユニットID(=2)と、インジェクタIJ2の共通領域先頭アドレス「0x1000」とが、物理アドレスとしてマッピングされ、仮想メモリアドレス「0x0002」に対しては、インジェクタIJ3のユニットID(=3)と、インジェクタIJ3の共通領域先頭アドレス「0x1000」とが、物理アドレスとしてマッピングされ、仮想メモリアドレス「0x0003」に対しては、インジェクタIJ4のユニットID(=4)と、インジェクタIJ4の共通領域先頭アドレス「0x1000」とが、物理アドレスとしてマッピングされる。   Specifically, for the virtual memory address “0x0000”, the unit ID (= 1) of the injector IJ1 and the common area head address “0x1000” of the injector IJ1 are mapped as physical addresses, and the virtual memory address “ For “0x0001”, the unit ID (= 2) of the injector IJ2 and the common area head address “0x1000” of the injector IJ2 are mapped as physical addresses, and for the virtual memory address “0x0002”, the injector IJ3 Unit ID (= 3) and the common area head address “0x1000” of the injector IJ3 are mapped as physical addresses, and for the virtual memory address “0x0003”, the unit ID (= 4) of the injector IJ4 and Inji Common area start address of Kuta IJ4 as "0x1000", but is mapped as the physical address.

そして、カウンタmが2の場合である2サイクル目では、カウンタuが1〜4の各場合に、オールマッピング処理(図6)におけるS520処理が行われることにより、仮想メモリ領域31の5番目から8番目までの4つのアドレス「0x0004」〜「0x0007」の各々に、各インジェクタIJ1〜IJ4の共通領域30の2番目のアドレス(AI1+1〜AI4+1=「0x1001」)がマッピングされる。   In the second cycle in which the counter m is 2, the S520 process in the all mapping process (FIG. 6) is performed in each case where the counter u is 1 to 4, thereby starting from the fifth in the virtual memory area 31. The second address (AI1 + 1 to AI4 + 1 = “0x1001”) of the common area 30 of each injector IJ1 to IJ4 is mapped to each of the four addresses “0x0004” to “0x0007” up to the eighth.

具体的には、仮想メモリアドレス「0x0004」に対しては、インジェクタIJ1のユニットID(=1)と、インジェクタIJ1の共通領域30の2番目のアドレス「0x1001」とが、物理アドレスとしてマッピングされ、仮想メモリアドレス「0x0005」に対しては、インジェクタIJ2のユニットID(=2)と、インジェクタIJ2の共通領域30の2番目のアドレス「0x1001」とが、物理アドレスとしてマッピングされ、仮想メモリアドレス「0x0006」に対しては、インジェクタIJ3のユニットID(=3)と、インジェクタIJ3の共通領域30の2番目のアドレス「0x1001」とが、物理アドレスとしてマッピングされ、仮想メモリアドレス「0x0007」に対しては、インジェクタIJ4のユニットID(=4)と、インジェクタIJ4の共通領域30の2番目のアドレス「0x1001」とが、物理アドレスとしてマッピングされる。   Specifically, for the virtual memory address “0x0004”, the unit ID (= 1) of the injector IJ1 and the second address “0x1001” of the common area 30 of the injector IJ1 are mapped as physical addresses. For the virtual memory address “0x0005”, the unit ID (= 2) of the injector IJ2 and the second address “0x1001” of the common area 30 of the injector IJ2 are mapped as physical addresses, and the virtual memory address “0x0006” ", The unit ID (= 3) of the injector IJ3 and the second address" 0x1001 "of the common area 30 of the injector IJ3 are mapped as physical addresses, and for the virtual memory address" 0x0007 " Injector IJ4 Knit ID (= 4), and the address of the second common area 30 of the injector IJ4 "0x1001", but is mapped as the physical address.

また、この例において、インジェクタIJ4の共通領域データ数M4は2であるため、この2サイクル目で、インジェクタIJ4のメモリマッピングが完了する。
よって、カウンタmが3の場合である3サイクル目では、カウンタuが1〜3の各場合には、オールマッピング処理(図6)におけるS520の処理が行われて、仮想メモリ領域31の9番目から11番目までの3つのアドレス「0x0008」〜「0x000A」の各々に、各インジェクタIJ1〜IJ3の共通領域30の3番目のアドレス(AI1+2〜AI3+2=「0x1002」)がマッピングされるが、カウンタuが4の場合には、オールマッピング処理(図6)におけるS510で「NO」と判定されてS530の処理が行われることとなる。このため、仮想メモリ領域31の12番目のアドレス「0x000B」には、ECUメモリ33の先頭アドレス(この例では「0x1F00」)がマッピングされることとなる。具体的には、仮想メモリアドレス「0x000B」に対しては、当該ECU11のユニットID(=0)と、ECUメモリ33の先頭アドレス「0x1F00」とが、物理アドレスとしてマッピングされる。
In this example, since the common area data number M4 of the injector IJ4 is 2, the memory mapping of the injector IJ4 is completed in the second cycle.
Therefore, in the third cycle in which the counter m is 3, in the case where the counter u is 1 to 3, the process of S520 in the all mapping process (FIG. 6) is performed, and the ninth of the virtual memory area 31 is performed. The third address (AI1 + 2 to AI3 + 2 = “0x1002”) of the common area 30 of each injector IJ1 to IJ3 is mapped to each of the three addresses “0x0008” to “0x000A” from the first to the eleventh, but the counter u 4 is determined as “NO” in S510 in the all mapping process (FIG. 6), and the process of S530 is performed. For this reason, the 12th address “0x000B” of the virtual memory area 31 is mapped to the head address of the ECU memory 33 (“0x1F00” in this example). Specifically, for the virtual memory address “0x000B”, the unit ID (= 0) of the ECU 11 and the head address “0x1F00” of the ECU memory 33 are mapped as physical addresses.

また、この例において、インジェクタIJ1の共通領域データ数M1は3であるため、この3サイクル目で、インジェクタIJ1のメモリマッピングが完了する。
よって、カウンタmが4の場合である4サイクル目では、カウンタuが2,3の各場合には、オールマッピング処理(図6)におけるS520の処理が行われて、仮想メモリ領域31の14番目と15番目のアドレス「0x000D」,「0x000E」の各々に、各インジェクタIJ2,IJ3の共通領域30の4番目のアドレス(AI2+3,AI3+3=「0x1003」)がマッピングされるが、カウンタuが1,4の各場合には、オールマッピング処理(図6)におけるS510で「NO」と判定されてS530の処理が行われることとなる。このため、仮想メモリ領域31の13番目と16番目のアドレス「0x000C」,「0x000F」の各々には、ECUメモリ33の2番目と3番目の各アドレス(この例では「0x1F01」,「0x1F02」)がマッピングされることとなる。具体的には、仮想メモリアドレス「0x000C」に対しては、当該ECU11のユニットID(=0)と、ECUメモリ33の2番目のアドレス「0x1F01」とが、物理アドレスとしてマッピングされ、仮想メモリアドレス「0x000F」に対しては、当該ECU11のユニットID(=0)と、ECUメモリ33の3番目のアドレス「0x1F02」とが、物理アドレスとしてマッピングされる。
In this example, since the common area data number M1 of the injector IJ1 is 3, the memory mapping of the injector IJ1 is completed in the third cycle.
Therefore, in the fourth cycle, where the counter m is 4, when the counter u is 2 or 3, the process of S520 in the all mapping process (FIG. 6) is performed, and the 14th of the virtual memory area 31 And the 15th address “0x000D” and “0x000E” are mapped to the fourth address (AI2 + 3, AI3 + 3 = “0x1003”) of the common area 30 of the injectors IJ2 and IJ3. In each case 4, it is determined as “NO” in S510 in the all mapping process (FIG. 6), and the process of S530 is performed. For this reason, the 13th and 16th addresses “0x000C” and “0x000F” of the virtual memory area 31 respectively include the second and third addresses of the ECU memory 33 (in this example, “0x1F01” and “0x1F02”). ) Will be mapped. Specifically, for the virtual memory address “0x000C”, the unit ID (= 0) of the ECU 11 and the second address “0x1F01” of the ECU memory 33 are mapped as physical addresses, and the virtual memory address For “0x000F”, the unit ID (= 0) of the ECU 11 and the third address “0x1F02” of the ECU memory 33 are mapped as physical addresses.

そして、図9では図示を省略しているが、物理アドレスとのマッピングが完了した仮想メモリアドレスの数が、「N×Mmax」以下で且つRの倍数のうちの最大値(図2の例では27)に達すると、図5のS380で「YES」と判定されて、仮想メモリ領域31の作成が完了することとなる。   Although not shown in FIG. 9, the number of virtual memory addresses that have been mapped to physical addresses is equal to or less than “N × Mmax” and is the maximum value among multiples of R (in the example of FIG. 2). 27), “YES” is determined in S380 of FIG. 5, and the creation of the virtual memory area 31 is completed.

一方、ECU11のマイコン16は、仮想メモリ領域31の作成が完了している状態で、図8に示す書込処理を、例えば一定時間毎に実行する。
そして、図8に示すように、マイコン16は、書込処理を開始すると、まずS710にて、インジェクタIJ1〜IJ4側に保存すべき共通データであって、未保存の共通データがあるか否かを判定する。
On the other hand, the microcomputer 16 of the ECU 11 executes the writing process shown in FIG. 8 at regular intervals, for example, in a state where the creation of the virtual memory area 31 is completed.
Then, as shown in FIG. 8, when the microcomputer 16 starts the writing process, first, in S710, it is common data to be saved on the injectors IJ1 to IJ4 side, and whether there is unsaved common data or not. Determine.

そして、未保存の共通データがなければ、そのまま当該書込処理を終了するが、未保存の共通データがあれば、S720に進む。例えば、保存すべき共通データがフリーズフレームデータであれば、故障を検出したことによって新たなフリーズフレームデータが生じた場合に、S720へ進むこととなる。   If there is no unsaved common data, the writing process is terminated as it is, but if there is unsaved common data, the process proceeds to S720. For example, if the common data to be stored is freeze frame data, the process proceeds to S720 when new freeze frame data is generated by detecting a failure.

S720では、該当のデータ(未保存の共通データ)を、仮想メモリ領域31において連続するR(=3)個の各アドレスに書き込み、その後、当該書込処理を終了する。
尚、S720では、仮想メモリ領域31におけるデータ未書込のアドレスのうち、先頭に近いものを優先的に選択してデータを書き込む。
In S720, the corresponding data (unsaved common data) is written to R (= 3) consecutive addresses in the virtual memory area 31, and then the writing process is terminated.
Note that in S720, among the unwritten addresses in the virtual memory area 31, the address closest to the head is preferentially selected and the data is written.

このため、図2の右側に示したように、仮想メモリ領域31には、先頭から3個ずつのアドレスの各グループに、同じデータが書き込まれる。よって、図2の例では、仮想メモリ領域31に、最大で9個(9種類)のデータが書き込まれることとなる。   Therefore, as shown on the right side of FIG. 2, the same data is written in each group of three addresses from the top in the virtual memory area 31. Therefore, in the example of FIG. 2, a maximum of nine (9 types) data are written in the virtual memory area 31.

また、仮想メモリ領域31のアドレス(仮想メモリアドレス)へのデータ書き込みは、その仮想メモリアドレスに割り当てられている物理アドレスへのデータ書き込みを行うということである。   Further, data writing to an address (virtual memory address) in the virtual memory area 31 means that data writing is performed to a physical address assigned to the virtual memory address.

このため、書き込み対象の仮想メモリアドレスに割り当てられている物理アドレスのうち、ユニットIDの方を「IDw」とし、物理メモリアドレスの方を「ADw」とすると、IDwが1〜4の何れかであれば、ユニットIDとして「IDw」を含み、書き込み先アドレスとして「ADw」を含む前述の書き込み要求フレームを、通信線12に送出することにより、ユニットIDとして「IDw」を持つインジェクタにおけるEEPROM23(共通領域30)のアドレスのうちの「ADw」に、データを書き込むことととなる。また、IDwが0ならば、当該ECU11のEEPROM17(特にECUメモリ33)のアドレスのうちの「ADw」に、通信を用いることなくデータを書き込むことととなる。   Therefore, if the unit ID is “IDw” and the physical memory address is “ADw” among the physical addresses assigned to the virtual memory address to be written, the IDw is any one of 1 to 4. If present, the above-mentioned write request frame including “IDw” as the unit ID and “ADw” as the write destination address is sent to the communication line 12, so that the EEPROM 23 in the injector having “IDw” as the unit ID (common) Data is written to “ADw” in the address of the area 30). If IDw is 0, data is written to “ADw” in the address of the EEPROM 17 (particularly, the ECU memory 33) of the ECU 11 without using communication.

一方、図8の書込処理では行わないが、仮想メモリ領域31のアドレス(仮想メモリアドレス)からのデータ読み出しは、その仮想メモリアドレスに割り当てられている物理アドレスからのデータ読み出しを行うということである。   On the other hand, although not performed in the writing process of FIG. 8, data reading from the address (virtual memory address) of the virtual memory area 31 is performed by reading data from the physical address assigned to the virtual memory address. is there.

このため、読み出し対象の仮想メモリアドレスに割り当てられている物理アドレスのうち、ユニットIDの方を「IDr」とし、物理メモリアドレスの方を「ADr」とすると、IDrが1〜4の何れかであれば、ユニットIDとして「IDr」を含み、読み出し先アドレスとして「ADr」を含む前述の読み出し要求フレームを、通信線12に送出することにより、ユニットIDとして「IDr」を持つインジェクタにおけるEEPROM23(共通領域30)のアドレスのうちの「ADr」から、データを読み出すことととなる。また、IDrが0ならば、当該ECU11のEEPROM17(特にECUメモリ33)のアドレスのうちの「ADr」から、通信を用いることなくデータを読み出すことととなる。   Therefore, out of the physical addresses assigned to the virtual memory address to be read, if the unit ID is “IDr” and the physical memory address is “ADr”, IDr is any one of 1 to 4. If there is, the above-mentioned read request frame including “IDr” as the unit ID and “ADr” as the read destination address is sent to the communication line 12, so that the EEPROM 23 in the injector having “IDr” as the unit ID (common) Data is read from “ADr” in the address of the area 30). If IDr is 0, data is read out from “ADr” in the address of the EEPROM 17 (particularly, the ECU memory 33) of the ECU 11 without using communication.

次に、図5に関する説明に戻り、その図5のS420で行われる差分マッピング処理について説明する。
図7に示すように、差分マッピング処理では、まずS610にて、カウンタuの現在値に対応する処理対象のインジェクタ(この場合、交換されたインジェクタ)IJuの共通領域データ数Muが、そのインジェクタIJuの交換前からどれだけ変わったかを示すメモリ容量差分Mduを算出する。具体的には、今回の仮想メモリマッピング処理のS310で取得したインジェクタIJnの共通領域データ数Muから、前回に実行した仮想メモリマッピング処理のS310で取得したインジェクタIJuの共通領域データ数(即ち、交換前のインジェクタIJuの共通領域データ数)Mouを引いた値を、メモリ容量差分Mduとして算出する。
Next, returning to the description of FIG. 5, the difference mapping process performed in S420 of FIG. 5 will be described.
As shown in FIG. 7, in the differential mapping process, first, in S610, the common area data number Mu of the processing target injector (in this case, the replaced injector) IJu corresponding to the current value of the counter u is determined as the injector IJu. A memory capacity difference Mdu indicating how much has changed since the replacement is calculated. Specifically, from the common area data number Mu of the injector IJn acquired in S310 of the current virtual memory mapping process, the number of common area data of the injector IJu acquired in S310 of the previously executed virtual memory mapping process (ie, exchange The value obtained by subtracting Mou (the number of common area data of the previous injector IJu) is calculated as the memory capacity difference Mdu.

次にS620にて、インジェクタIJuの共通領域先頭アドレスAIuが変わったか否かを判定する。具体的には、今回の仮想メモリマッピング処理のS310で取得したインジェクタIJnの共通領域先頭アドレスAIuが、前回に実行した仮想メモリマッピング処理のS310で取得したインジェクタIJuの共通領域先頭アドレス(即ち、交換前のインジェクタIJuの共通領域先頭アドレス)AIouから、変わっているか否かを判定する。そして、インジェクタIJuの共通領域先頭アドレスAIuが変わっていないと判定した場合には、S630に進む。   Next, in S620, it is determined whether or not the common area head address AIu of the injector IJu has changed. Specifically, the common area start address AIu of the injector IJn acquired in S310 of the current virtual memory mapping process is the common area start address of the injector IJu acquired in S310 of the previously executed virtual memory mapping process (that is, the exchange It is determined whether or not there is a change from the common area head address (AIou) of the previous injector IJu. If it is determined that the common area start address AIu of the injector IJu has not changed, the process proceeds to S630.

S630では、インジェクタIJuの共通領域データ数Muに増減があったか否かを判定する。具体的には、S610で算出したメモリ容量差分Mduが0でないか否かを判定する。そして、「Mdu=0」であれば、共通領域データ数Muに増減はなかったと判断して、そのままS700に移行する。尚、この場合には、インジェクタIJuの共通領域先頭アドレスAIuと共通領域データ数Muとが両方共に変わっていないため、仮想メモリ領域31の物理アドレスとのマッピング情報を変更することなく、S700へ移行することとなる。   In S630, it is determined whether the common area data number Mu of the injector IJu has increased or decreased. Specifically, it is determined whether the memory capacity difference Mdu calculated in S610 is not zero. If “Mdu = 0”, it is determined that the common area data number Mu has not increased or decreased, and the process directly proceeds to S700. In this case, since both the common area start address AIu and the common area data number Mu of the injector IJu have not changed, the process proceeds to S700 without changing the mapping information with the physical address of the virtual memory area 31. Will be.

これに対し、S630にて、共通領域データ数Muに増減があった(Mdu≠0)と判定した場合には、S640に進む。
そして、S640では、「Mdu<0」であるか否かを判定し、「Mdu<0」でなければ、共通領域データ数Muが増加したと判断して、S650に進む。
On the other hand, if it is determined in S630 that the common area data number Mu has increased or decreased (Mdu ≠ 0), the process proceeds to S640.
In S640, it is determined whether or not “Mdu <0”. If “Mdu <0”, it is determined that the number of common area data Mu has increased, and the process proceeds to S650.

S650では、カウンタmの現在値を読み込んで、「Mou<m≦Mu」であるか否かを判定する。そして、「Mou<m≦Mu」でなければ、そのままS700に移行するが、「Mou<m≦Mu」であれば、S660に進み、図6のS520と同じ処理を行う。即ち、仮想メモリアドレスポインタeが示す仮想メモリアドレス「E+e」に対応する物理アドレスとして、インジェクタIJuのユニットIDと、インジェクタIJuの共通領域先頭アドレスAIuに「m−1」を加算したアドレスとからなる情報を記憶する。そして、その後、S700に進む。   In S650, the current value of the counter m is read to determine whether or not “Mou <m ≦ Mu”. If “Mou <m ≦ Mu”, the process proceeds to S700 as it is, but if “Mou <m ≦ Mu”, the process proceeds to S660, and the same processing as S520 in FIG. 6 is performed. That is, the physical address corresponding to the virtual memory address “E + e” indicated by the virtual memory address pointer e is composed of the unit ID of the injector IJu and the address obtained by adding “m−1” to the common area start address AIu of the injector IJu. Store information. Then, the process proceeds to S700.

つまり、インジェクタIJuの共通領域先頭アドレスAIuは変わらず、共通領域データ数(共通領域30のアドレス数)Muが増加した場合には、それまで本来ならインジェクタIJuの共通領域30のアドレスが割り当てられるべきなのにECUメモリ33のアドレスを割り当てていた仮想メモリアドレスに対して、今回増加したインジェクタIJuの共通領域30のアドレスを割り当てるようにしている。   That is, the common area start address AIu of the injector IJu does not change, and when the common area data number (the number of addresses of the common area 30) Mu increases, the address of the common area 30 of the injector IJu should be assigned until then. However, the address of the common area 30 of the injector IJu increased this time is assigned to the virtual memory address to which the address of the ECU memory 33 has been assigned.

例えば、図9の例において、インジェクタIJ4が交換されて、該インジェクタIJ4の共通領域先頭アドレスAI4は変わらず、共通領域データ数M4が2から4に増加したとすると、「m=3、u=4」の場合と、「m=4、u=4」の場合とに、S660の処理が行われる。その結果、それまでECUメモリ33の先頭アドレス「0x1F00」と3番目のアドレス「0x1F02」とが割り当てられていた仮想メモリアドレス「0x000B」,「0x000F」の各々に対して、インジェクタIJ4の共通領域30の3番目のアドレス(AI4+2=「0x1002」)と4番目のアドレス(AI4+3=「0x1003」)とが割り当てられることとなる。   For example, in the example of FIG. 9, if the injector IJ4 is replaced, the common area start address AI4 of the injector IJ4 does not change, and the common area data number M4 increases from 2 to 4, “m = 3, u = 4 ”and“ m = 4, u = 4 ”, the process of S660 is performed. As a result, the common area 30 of the injector IJ4 is assigned to each of the virtual memory addresses “0x000B” and “0x000F” to which the first address “0x1F00” and the third address “0x1F02” of the ECU memory 33 have been assigned. The third address (AI4 + 2 = “0x1002”) and the fourth address (AI4 + 3 = “0x1003”) are assigned.

また、上記S640にて、「Mdu<0」であると判定した場合には、共通領域データ数Muが減少したと判断して、S670に移行する。
S670では、カウンタmの現在値を読み込んで、「Mu<m≦Mou」であるか否かを判定する。そして、「Mu<m≦Mou」でなければ、そのままS700に移行するが、「Mu<m≦Mou」であれば、S680に進み、図6のS530と同じ処理を行う。即ち、仮想メモリアドレスポインタeが示す仮想メモリアドレス「E+e」に対応する物理アドレスの情報として、当該ECU11のユニットIDと、ECUメモリ33の空きアドレスのうちの最小のアドレスとからなる情報を記憶する。そして、その後、S700に進む。
If it is determined in S640 that “Mdu <0”, it is determined that the number of common area data Mu has decreased, and the process proceeds to S670.
In S670, the current value of the counter m is read to determine whether “Mu <m ≦ Mou”. If “Mu <m ≦ Mou”, the process proceeds to S700 as it is, but if “Mu <m ≦ Mou”, the process proceeds to S680, and the same processing as S530 in FIG. 6 is performed. That is, as the physical address information corresponding to the virtual memory address “E + e” indicated by the virtual memory address pointer e, information including the unit ID of the ECU 11 and the minimum address among the free addresses of the ECU memory 33 is stored. . Then, the process proceeds to S700.

つまり、インジェクタIJuの共通領域先頭アドレスAIuは変わらず、共通領域データ数(共通領域30のアドレス数)Muが減少した場合には、その減少により無くなってしまったインジェクタIJuの共通領域30のアドレスを割り当てていた仮想メモリアドレスに対して、ECUメモリ33の空きアドレスを割り当てるようにしている。   That is, the common area start address AIu of the injector IJu does not change, and when the number of common area data (the number of addresses of the common area 30) Mu decreases, the address of the common area 30 of the injector IJu that has been lost due to the decrease An empty address of the ECU memory 33 is assigned to the assigned virtual memory address.

例えば、図9の例において、インジェクタIJ1が交換されて、該インジェクタIJ1の共通領域先頭アドレスAI4は変わらず、共通領域データ数M1が3から2に減少したとすると、「m=3、u=1」の場合に、S680の処理が行われる。その結果、それまでインジェクタIJ1の共通領域30の3番目のアドレスが割り当てられていた仮想メモリアドレス「0x0008」に対して、ECUメモリ33のアドレス「0x1F0A」が割り当てられることとなる。尚、この例においては、ECUメモリ33の「0x1F00」〜「0x1F09」の10個のアドレスが既に使用されているため(図2参照)、空きアドレスのうちで最小の「0x1F0A」が、仮想メモリアドレス「0x0008」に割り当てられる。   For example, in the example of FIG. 9, if the injector IJ1 is replaced, the common area start address AI4 of the injector IJ1 does not change, and the common area data number M1 decreases from 3 to 2, “m = 3, u = In the case of “1”, the process of S680 is performed. As a result, the address “0x1F0A” of the ECU memory 33 is assigned to the virtual memory address “0x0008” to which the third address of the common area 30 of the injector IJ1 has been assigned. In this example, since ten addresses “0x1F00” to “0x1F09” of the ECU memory 33 are already used (see FIG. 2), the smallest “0x1F0A” among the free addresses is the virtual memory. Assigned to address “0x0008”.

一方、上記S620にて、インジェクタIJuの共通領域先頭アドレスAIuが変わったと判定した場合には、S690に移行する。
そして、S690では、図6のS510と同様に、「m≦Mu」であるか否かを判定し、「m≦Mu」であれば、インジェクタIJuのメモリマッピングが未完了であると判断して、S693に進み、図6のS520と同じ処理を行う。そして、その後、S700に進む。
On the other hand, if it is determined in S620 that the common area head address AIu of the injector IJu has changed, the process proceeds to S690.
In S690, as in S510 of FIG. 6, it is determined whether or not “m ≦ Mu”. If “m ≦ Mu”, it is determined that the memory mapping of the injector IJu is incomplete. , The process proceeds to S693, and the same process as S520 in FIG. 6 is performed. Then, the process proceeds to S700.

また、上記S690にて、「m≦Mu」ではない(m>Mu)と判定した場合には、S695に移行する。尚、この時点において、交換後のインジェクタIJuの共通領域30の各アドレスであって、Mu個の各アドレスは、S693の処理により、仮想メモリアドレスのうち、先頭から「u+4×i」番目(但しi=0,1,…,Mu−1)の各仮想メモリアドレスにそれぞれ割り当てられている。   If it is determined in S690 that “m ≦ Mu” is not satisfied (m> Mu), the process proceeds to S695. At this time, each of the addresses in the common area 30 of the injector IJu after replacement, and each of the Mu addresses is the “u + 4 × i” -th (from the top) of the virtual memory addresses by the processing of S693 (however, i = 0, 1,..., Mu−1) are assigned to the respective virtual memory addresses.

そして、S695では、「Mdu<0」であるか否かを判定し、「Mdu<0」でなければ、共通領域データ数Muが同じか増加したということであり、これ以上は仮想メモリ領域31の物理アドレスとのマッピング情報を変更する必要がないと判断して、そのままS700に進む。   In S695, it is determined whether or not “Mdu <0”. If “Mdu <0”, the common area data number Mu is the same or increased. It is determined that there is no need to change the mapping information with the physical address, and the process directly proceeds to S700.

また、上記S695にて、「Mdu<0」であると判定した場合には、共通領域データ数Muが減少したと判断して、前述したS670に移行する。
このため、「Mu<m≦Mou」でなければ(S670:NO)、そのままS700に移行することとなり、また、「Mu<m≦Mou」であれば(S670:YES)、S680にて、図6のS530と同じ処理を行った後、S700に進むこととなる。
If it is determined in S695 that “Mdu <0”, it is determined that the number of common area data Mu has decreased, and the process proceeds to S670 described above.
For this reason, if “Mu <m ≦ Mou” is not satisfied (S670: NO), the process proceeds to S700 as it is, and if “Mu <m ≦ Mou” is satisfied (S670: YES), the process proceeds to S680. After performing the same process as S530 of No. 6, the process proceeds to S700.

つまり、インジェクタIJuの共通領域先頭アドレスAIuが変わった場合には、共通領域データ数Muの増減にかかわらず、そのインジェクタIJnの共通領域30の各アドレスを物理アドレスとして割り当てるべきMu個の各仮想メモリアドレス(上記「u+4×i」番目(i=0,1,…,Mu−1)の各仮想メモリアドレス)について、S693の処理を行うことにより、該当する物理アドレスの再設定をしている。   In other words, when the common area start address AIu of the injector IJu changes, regardless of whether the common area data number Mu increases or decreases, each of the Mu virtual memories to which the addresses of the common area 30 of the injector IJn should be assigned as physical addresses. For the address (the above-mentioned “u + 4 × i” -th (i = 0, 1,..., Mu−1) virtual memory addresses), the corresponding physical address is reset by performing the process of S693.

そして、その再設定が終了したら(S690:NO)、共通領域データ数Muの増減を判断して、共通領域データ数Muが同じか増加しているのであれば(S695:NO)、そのままS700へ進んで、それ以上は仮想メモリ領域31の物理アドレスとのマッピング情報を変更しない。このため、インジェクタIJuの交換前からECUメモリ33のアドレスが割り当てられていた仮想メモリアドレスに関しては、物理アドレスとのマッピング情報を何ら変更しない。   When the resetting is completed (S690: NO), the increase / decrease in the common area data number Mu is determined. If the common area data number Mu is the same or increased (S695: NO), the process directly proceeds to S700. Going forward, the mapping information with the physical address of the virtual memory area 31 is not changed. For this reason, the mapping information with the physical address is not changed at all for the virtual memory address to which the address of the ECU memory 33 has been assigned before the replacement of the injector IJu.

また、共通領域データ数Muが減少していれば(S695:YES)、その減少により無くなってしまったインジェクタIJuの共通領域30のアドレスを割り当てていた仮想メモリアドレスに対して、S680の処理により、ECUメモリ33の空きアドレスを割り当てるようにしている。そして、共通領域データ数Muが減少した場合でも、S670でNOと判定したなら、S700へ進んで、それ以上は仮想メモリ領域31の物理アドレスとのマッピング情報を変更しない。よって、この場合も、インジェクタIJuの交換前からECUメモリ33のアドレスが割り当てられていた仮想メモリアドレスに関しては、物理アドレスとのマッピング情報を何ら変更しない。   If the common area data number Mu is reduced (S695: YES), the process of S680 is performed on the virtual memory address to which the address of the common area 30 of the injector IJu that has been lost due to the reduction is assigned. An empty address in the ECU memory 33 is assigned. Even if the common area data number Mu decreases, if NO is determined in S670, the process proceeds to S700, and the mapping information with the physical address of the virtual memory area 31 is not changed any more. Therefore, also in this case, the mapping information with the physical address is not changed at all for the virtual memory address to which the address of the ECU memory 33 has been assigned before the replacement of the injector IJu.

そして、何れかのインジェクタIJuが交換された場合には、上記S610〜S695の処理により、仮想メモリ領域31の物理アドレスとのマッピング情報を、必要最小限の範囲で変更している。   When any of the injectors IJu is exchanged, the mapping information with the physical address of the virtual memory area 31 is changed within the minimum necessary range by the processing of S610 to S695.

一方、差分マッピング処理において、全ての処理経路から移行することとなる最後のS700では、データ復帰処理を行い、その後、当該差分マッピング処理を終了する。
ここで、S700のデータ復帰処理は、交換前のインジェクタに保存されていた共通データを、交換後のインジェクタIJuに継承して保存するための処理であり、下記の[第1処理]〜[第3処理]からなる。
On the other hand, in the difference mapping process, in the last S700 to be shifted from all the processing paths, the data restoration process is performed, and then the difference mapping process is ended.
Here, the data restoration process in S700 is a process for inheriting and storing the common data stored in the injector before the replacement in the injector IJu after the replacement. 3 processing].

[第1処理]
現在の仮想メモリアドレスポインタe(ここでは、そのeの現在値を「e0」と記載する)が示す仮想メモリアドレス「E+e0」と同じデータが記憶される他の「R−1」個(本実施形態ではR=3であるため2個)の仮想メモリアドレスを特定する。
[First processing]
Other “R−1” data (this embodiment) in which the same data as the virtual memory address “E + e0” indicated by the current virtual memory address pointer e (here, the current value of the e is described as “e0”) is stored. In the embodiment, since R = 3, 2) virtual memory addresses are specified.

[第2処理]
第1処理によって特定した「R−1」個の仮想メモリアドレスに記憶されているデータ(詳しくは、その仮想メモリアドレスに割り当てられている物理アドレスに記憶されているデータ)から、仮想メモリアドレス「E+e0」に書き込むべきデータを復元する。
[Second processing]
From the data stored in the “R−1” virtual memory addresses identified by the first process (specifically, the data stored in the physical address assigned to the virtual memory address), the virtual memory address “ The data to be written to “E + e0” is restored.

[第3処理]
第2処理によって復元したデータを、仮想メモリアドレス「E+e0」に書き込む。
更に具体的に説明すると、まず第1処理では、e0が、0から3つずつ(0〜2,3〜5,6〜8,9〜11,…)の各グループのうち、何れのグループに入っているかを判別すると共に、その判別したグループの3つの値のうちで、e0以外の2つの値e1,e2を特定し、仮想メモリ領域31の先頭アドレスEに上記2つの値e1,e2をそれぞれ加算した各アドレス「E+e1」,「E+e2」を、仮想メモリアドレス「E+e0」と同じデータが記憶される他の2つの仮想メモリアドレスとして算出する。
[Third process]
The data restored by the second process is written to the virtual memory address “E + e0”.
More specifically, first, in the first process, e0 is assigned to any group among groups 0 to 3 (0 to 2, 3 to 5, 6 to 8, 9 to 11,...). It is determined whether it is included, and among the three values of the determined group, two values e1 and e2 other than e0 are specified, and the above two values e1 and e2 are assigned to the top address E of the virtual memory area 31. The added addresses “E + e1” and “E + e2” are calculated as the other two virtual memory addresses in which the same data as the virtual memory address “E + e0” is stored.

尚、e0が、0から3つずつの何れのグループに入っているかは、「{(d−1)×3}〜{d×3−1}」の式に、現在の保存データ数カウンタdの値を代入することで判別することができる(図2参照)。   It should be noted that whether the group e0 is in the group from 0 to 3 is determined by the expression “{(d−1) × 3} to {d × 3-1}” in the current stored data number counter d. Can be determined by substituting the value of (see FIG. 2).

そして、第2処理では、まず、第1処理で算出した2つの仮想メモリアドレス「E+e1」,「E+e2」の各々から、データを読み出す。尚、仮想メモリアドレスからのデータの読み出しは、既述した通り、その仮想メモリアドレスに割り当てられている物理アドレスからデータを読み出すということである。そして更に、第2処理では、仮想メモリアドレス「E+e1」,「E+e2」の各々から読み出した2つのデータD1,D2が一致しているか否かを判定し、両データD1,D2が一致していれば、そのデータを、仮想メモリアドレス「E+e0」への書き込み対象データ(即ち、復元したデータ)とする。また、2つのデータD1,D2が一致していない場合には、どちらが真なのか特定できないため、仮想メモリアドレス「E+e0」への書き込み対象データは、例えば所定の初期値(固定値)とする。   In the second process, first, data is read from each of the two virtual memory addresses “E + e1” and “E + e2” calculated in the first process. Note that reading data from a virtual memory address means reading data from a physical address assigned to the virtual memory address as described above. Further, in the second process, it is determined whether or not the two data D1 and D2 read from each of the virtual memory addresses “E + e1” and “E + e2” match, and both the data D1 and D2 match. For example, the data is data to be written to the virtual memory address “E + e0” (that is, restored data). Further, when the two data D1 and D2 do not match, it is not possible to specify which is true, and therefore, the data to be written to the virtual memory address “E + e0” is set to a predetermined initial value (fixed value), for example.

そして、第3処理では、第2処理で求めた書き込み対象データを、仮想メモリアドレス「E+e0」に書き込む。つまり、仮想メモリアドレス「E+e0」に割り当てられている物理アドレスへ、書き込み対象データを書き込む処理を行う。   In the third process, the write target data obtained in the second process is written to the virtual memory address “E + e0”. That is, a process of writing the write target data to the physical address assigned to the virtual memory address “E + e0” is performed.

尚、本実施形態において、冗長データ数Rは、2よりも大きく且つインジェクタの個数Nよりは小さい値に設定されるが、Nが5以上であって、冗長データ数Rを4以上に設定した場合、例えば、上記第2処理では、「R−1」個の仮想メモリアドレスに記憶されている「R−1」個のデータに対して、多数決の処理を行い、一致しているものの数が最多のデータを、仮想メモリアドレス「E+e0」への書き込み対象データとすることができる。   In this embodiment, the redundant data number R is set to a value larger than 2 and smaller than the number N of injectors, but N is 5 or more and the redundant data number R is set to 4 or more. In this case, for example, in the second process, the majority process is performed on “R−1” data stored in “R−1” virtual memory addresses, and the number of matching data is determined. The most data can be set as data to be written to the virtual memory address “E + e0”.

一方、本実施形態では、ECU11が、マスタユニットとしての電子制御装置に相当し、インジェクタIJ1〜IJ4が、スレーブユニットに相当し、インジェクタIJ1〜IJ4に設けられたEEPROM23の共通領域30が、データの書き換えが可能な不揮発性メモリの特定記憶領域に相当し、共通データが、保存対象データに相当している。また、共通領域先頭アドレス及び共通領域データ数が、特定記憶領域の先頭及び容量を示す領域情報に相当している。   On the other hand, in the present embodiment, the ECU 11 corresponds to an electronic control device as a master unit, the injectors IJ1 to IJ4 correspond to slave units, and the common area 30 of the EEPROM 23 provided in the injectors IJ1 to IJ4 This corresponds to a specific storage area of a rewritable nonvolatile memory, and the common data corresponds to data to be saved. Further, the common area head address and the number of common area data correspond to area information indicating the head and capacity of the specific storage area.

そして、ECU11のマイコン16が、仮想メモリ作成手段と書込手段との各々に相当しており、図4のメモリ管理処理(特に図5の仮想メモリマッピング処理)が、仮想メモリ作成手段としての処理に相当し、図8の書込処理が、書込手段としての処理に相当している。また、ECU11のEEPROM17(特にECUメモリ33)が、マスタ側メモリに相当している。更に、ECU11のマイコン16は、交換検知手段にも相当しており、図3の交換判定処理が、交換検知手段としての処理に相当している。   The microcomputer 16 of the ECU 11 corresponds to each of the virtual memory creating means and the writing means, and the memory management process of FIG. 4 (particularly the virtual memory mapping process of FIG. 5) is a process as the virtual memory creating means. The writing process of FIG. 8 corresponds to a process as writing means. Further, the EEPROM 17 (particularly the ECU memory 33) of the ECU 11 corresponds to the master side memory. Further, the microcomputer 16 of the ECU 11 corresponds to a replacement detection unit, and the replacement determination process in FIG. 3 corresponds to a process as a replacement detection unit.

また、ECU11のマイコン16は、復元手段にも相当しており、図7のS700の処理のうちの第1処理と第2処理が、復元手段としての処理に相当している。つまり、図7の差分マッピング処理が行われる各回のうち、カウンタmがMou(交換前のインジェクタIJuの共通領域データ数)以下である各回においては、S700の第1処理により、交換前のインジェクタIJuの共通領域30におけるアドレスのうちで、現在の仮想メモリアドレスポインタeが示す仮想メモリアドレス「E+e」に割り当てられていたアドレスについて、そのアドレスに記憶されていたデータと同じデータが記憶されていた仮想メモリアドレス(仮想メモリ領域における単位記憶領域)が特定されることとなる。そして、その回において、第2処理により、「Mu≧Mou」であれば、第1処理で特定した仮想メモリアドレスに記憶されているデータから、交換後のインジェクタIJuの共通領域30におけるアドレスのうちで、上記仮想メモリアドレス「E+e」に割り当てられているアドレスへ書き込むべきデータを、復元することとなる。   Further, the microcomputer 16 of the ECU 11 also corresponds to a restoration unit, and the first process and the second process in the process of S700 in FIG. 7 correspond to the process as the restoration unit. That is, among the times when the differential mapping process of FIG. 7 is performed, each time the counter m is less than or equal to Mou (the number of common area data of the injector IJu before replacement), the first process of S700 performs the injector IJu before replacement. Among the addresses in the common area 30, for the address assigned to the virtual memory address “E + e” indicated by the current virtual memory address pointer e, the virtual data in which the same data as the data stored in the address is stored is stored. A memory address (unit storage area in the virtual memory area) is specified. At that time, if “Mu ≧ Mou” is obtained in the second process, the data stored in the virtual memory address specified in the first process is used to determine the address in the common area 30 of the injector IJu after the replacement. Thus, the data to be written to the address assigned to the virtual memory address “E + e” is restored.

以上のような本実施形態の制御システム1におけるECU11によれば、各インジェクタIJ1〜IJ4の共通領域30に同じデータをそれぞれ書き込む構成と比較すると、データの冗長保存を実現しつつ、メモリの利用効率を向上させることができる。つまり、共通領域30の容量が同じであれば、保存できるデータ数を増やすことができる。   According to the ECU 11 in the control system 1 of the present embodiment as described above, compared with a configuration in which the same data is written in the common area 30 of each of the injectors IJ1 to IJ4, memory use efficiency is achieved while realizing redundant storage of data. Can be improved. That is, if the capacity of the common area 30 is the same, the number of data that can be stored can be increased.

例えば、各インジェクタIJ1〜IJ4の共通領域30におけるアドレス数が30個であるとする。この場合、各インジェクタIJ1〜IJ4の共通領域30に同じデータをそれぞれ書き込む構成では、インジェクタIJ1〜IJ4側に30個(種類)のデータしか保存できない。   For example, it is assumed that the number of addresses in the common area 30 of the injectors IJ1 to IJ4 is 30. In this case, in the configuration in which the same data is written in the common area 30 of each of the injectors IJ1 to IJ4, only 30 (types) of data can be stored on the injectors IJ1 to IJ4 side.

これに対して、本実施形態では、冗長データ数Rを3にしていることから、インジェクタIJ1〜IJ4側には40個のデータを保存することができる。そして、各データは、R個の異なるインジェクタに保存されることとなるため、データの冗長保存も実現される。つまり、何れかのインジェクタが交換されても、そのインジェクタに保存されていたデータは、他の何れかのインジェクタにも保存されていることとなり(尚、本実施形態ではECU11側に保存されている場合もあり得る)、保存対象データを失ってしまうことがない。   On the other hand, in this embodiment, since the redundant data number R is 3, 40 data can be stored on the injectors IJ1 to IJ4 side. Since each data is stored in R different injectors, redundant storage of data is also realized. That is, even if any injector is replaced, the data stored in the injector is also stored in any other injector (in this embodiment, stored in the ECU 11 side). In some cases, the data to be saved is not lost.

また、ECU11のマイコン16は、各インジェクタIJ1〜IJ4から、共通領域先頭アドレスと共通領域データ数を取得し、その取得した情報から各インジェクタIJ1〜IJ4の共通領域30を特定して仮想メモリ領域31を作成するため、各インジェクタIJ1〜IJ4の共通領域30の先頭アドレスや容量が変わっても、仮想メモリ領域31を作成することができる。   Further, the microcomputer 16 of the ECU 11 acquires the common area head address and the number of common area data from each of the injectors IJ1 to IJ4, specifies the common area 30 of each injector IJ1 to IJ4 from the acquired information, and virtual memory area 31 Therefore, the virtual memory area 31 can be created even if the head address or capacity of the common area 30 of the injectors IJ1 to IJ4 changes.

また、ECU11のマイコン16は、各インジェクタIJ1〜IJ4の共通領域30に容量差があることに伴って、インジェクタIJ1〜IJ4の共通領域30のアドレスを前述のインジェクタ順(IJ1→IJ2→IJ3→IJ4の順)に割り当てることができない仮想メモリアドレスに対しては、ECUメモリ33のアドレスを割り当てるようになっている(S530)。このため、あるインジェクタの共通領域30の容量が、他のインジェクタの共通領域30の容量より小さくても、データの冗長保存を実現することができる。   Further, the microcomputer 16 of the ECU 11 sets the address of the common area 30 of the injectors IJ1 to IJ4 in the order of the injectors (IJ1 → IJ2 → IJ3 → IJ4) due to the difference in capacity between the common areas 30 of the injectors IJ1 to IJ4. For the virtual memory addresses that cannot be assigned in this order, the addresses in the ECU memory 33 are assigned (S530). For this reason, even if the capacity of the common area 30 of a certain injector is smaller than the capacity of the common area 30 of another injector, it is possible to realize redundant storage of data.

また、図7のS700で行うデータ復帰処理により、交換前のインジェクタに保存されていた共通データを、交換後のインジェクタにも継承して保存することができる。
また、本実施形態では、ECU11から見たスレーブユニットが、自動車のエンジンの気筒毎に設けられるインジェクタIJ1〜IJ4であるため、前述した(1)〜(3)の点で有利である。
In addition, by the data restoration process performed in S700 of FIG. 7, the common data stored in the injector before replacement can be inherited and stored in the injector after replacement.
Further, in the present embodiment, the slave unit viewed from the ECU 11 is the injectors IJ1 to IJ4 provided for each cylinder of the automobile engine, which is advantageous in the above points (1) to (3).

以上、本発明の一実施形態について説明したが、本発明はこうした実施形態に何等限定されるものではなく、本発明の要旨を逸脱しない範囲において、種々なる態様で実施し得ることは勿論である。   As mentioned above, although one Embodiment of this invention was described, this invention is not limited to such Embodiment at all, Of course, in the range which does not deviate from the summary of this invention, it can implement in a various aspect. .

例えば、ECU11と各インジェクタIJ1〜IJ4との通信は、別々の通信線による一対一の通信であっても良い。その場合、インジェクタIJ1〜IJ4との通信には、ユニットIDを用いる必要がなくなる。   For example, the communication between the ECU 11 and each of the injectors IJ1 to IJ4 may be one-to-one communication using separate communication lines. In that case, it is not necessary to use the unit ID for communication with the injectors IJ1 to IJ4.

また、データの書き換えが可能な不揮発性メモリとしては、EEPROM以外でも良く、例えばフラッシュメモリでも良い。また、保存対象データの1つを記憶可能な単位記憶領域としては、1アドレス領域に限らず、2つ以上のアドレスの領域でも良い。   Further, the nonvolatile memory capable of rewriting data may be other than the EEPROM, for example, a flash memory. Further, the unit storage area capable of storing one of the save target data is not limited to one address area, but may be an area having two or more addresses.

また、スレーブユニット(インジェクタIJ1〜IJ4)の個数Nは、4に限らず、3以上であれば良く、冗長データ数Rは「2以上で且つNより小」であれば良い。
尚、R=2の場合、図7のS700では、前述した第1処理により、1つの仮想メモリアドレスが特定されることとなるため、それに続く第2処理及び第3処理では、第1処理で特定した仮想メモリアドレスに記憶されているデータを、現在の仮想メモリアドレスポインタeが示す仮想メモリアドレス「E+e」に書き込むべきデータとして扱うことになる。
The number N of slave units (injectors IJ1 to IJ4) is not limited to 4, but may be 3 or more, and the redundant data number R may be “2 or more and less than N”.
When R = 2, in S700 of FIG. 7, one virtual memory address is specified by the first process described above. Therefore, in the subsequent second process and third process, the first process is performed. Data stored at the specified virtual memory address is handled as data to be written to the virtual memory address “E + e” indicated by the current virtual memory address pointer e.

一方、スレーブユニットは、インジェクタ以外でも良く、例えば、ECU11以外の他の電子制御装置でも良い。   On the other hand, the slave unit may be other than the injector, for example, an electronic control device other than the ECU 11.

1…制御システム、11…ECU(電子制御装置)、IJ1〜IJ4…インジェクタ
12…通信線、13…CPU、14…ROM、15…RAM、16…マイコン
17,23…EEPROM、18,27…通信回路、19…駆動回路
21…アクチュエータ、29…固有領域、30…共通領域、31…仮想メモリ領域
33…ECUメモリ、25…通信処理部
DESCRIPTION OF SYMBOLS 1 ... Control system, 11 ... ECU (electronic control unit), IJ1-IJ4 ... Injector 12 ... Communication line, 13 ... CPU, 14 ... ROM, 15 ... RAM, 16 ... Microcomputer 17, 23 ... EEPROM, 18, 27 ... Communication Circuit, 19 ... Drive circuit 21 ... Actuator, 29 ... Eigen area, 30 ... Common area, 31 ... Virtual memory area 33 ... ECU memory, 25 ... Communication processor

Claims (6)

マスタユニットと、該マスタユニットと通信線を介して通信可能に接続されるN個(但し、Nは3以上の整数)のスレーブユニットとを備え、
前記N個の各スレーブユニットは、自動車のエンジンの気筒毎に設けられて、対応する気筒に燃料を噴射するインジェクタであり、
前記各スレーブユニットには、データの書き換えが可能な不揮発性のメモリが備えられていると共に、該メモリの特定記憶領域には、前記マスタユニットによって保存対象データが書き込まれる制御システムにおいて、
前記マスタユニットとして用いられる電子制御装置であって、
前記各スレーブユニットにおける前記特定記憶領域から、連続した仮想メモリ領域を作成する手段として、前記各スレーブユニットにおける前記特定記憶領域を、前記保存対象データの1つを記憶可能な一定容量の単位記憶領域毎に分割すると共に、その各単位記憶領域を、同じスレーブユニットに保有されるものがN個毎に現れることとなる順番にして、前記仮想メモリ領域の先頭からの各単位記憶領域として割り当てることにより、前記仮想メモリ領域を作成する仮想メモリ作成手段を備え、
更に、前記作成された仮想メモリ領域において連続するR個(但し、2≦R<Nの整数)の前記単位記憶領域の各々に、同じ保存対象データを書き込む書込手段を備え
しかも、前記スレーブユニットの各々について、交換されたか否かを判定する交換検知手段と、
前記交換検知手段により前記スレーブユニットの何れかが交換されたと判定された場合に、その交換されたと判定されたスレーブユニットである交換後スレーブユニットにおける前記特定記憶領域の容量である交換後容量が、前記交換後スレーブユニットの前に当該電子制御装置に接続されていたスレーブユニットである交換前スレーブユニットにおける前記特定記憶領域の容量である交換前容量に対して、変化したか否かを判定する容量変化判定手段と、を備え、
前記仮想メモリ作成手段は、
前記容量変化判定手段により前記交換後容量が前記交換前容量に対して変化したと判定された場合に、前記仮想メモリ領域を修正すること、
を特徴とする電子制御装置。
A master unit, and N (N is an integer of 3 or more) slave units connected to the master unit via a communication line so as to be communicable,
Each of the N slave units is an injector that is provided for each cylinder of an automobile engine and injects fuel into the corresponding cylinder.
In each control unit in which each slave unit is provided with a nonvolatile memory capable of rewriting data, and data to be saved is written into the specific storage area of the memory by the master unit,
An electronic control device used as the master unit,
As a means for creating a continuous virtual memory area from the specific storage area in each slave unit, the specific storage area in each slave unit is a unit storage area of a certain capacity capable of storing one of the save target data By dividing each unit storage area and assigning each unit storage area as each unit storage area from the top of the virtual memory area in the order in which every N pieces owned by the same slave unit will appear. A virtual memory creating means for creating the virtual memory area,
And a writing means for writing the same data to be stored in each of the R unit memory areas that are consecutive in the created virtual memory area (where 2 ≦ R <N) .
Moreover, for each of the slave units, exchange detection means for determining whether or not the slave unit has been exchanged,
When it is determined that one of the slave units has been replaced by the replacement detection unit, the post-replacement capacity that is the capacity of the specific storage area in the post-replacement slave unit that is the slave unit that has been determined to be replaced, A capacity for determining whether or not a change has occurred with respect to the capacity before replacement, which is the capacity of the specific storage area in the slave unit before replacement, which is the slave unit connected to the electronic control unit before the slave unit after replacement. Change determination means,
The virtual memory creating means
Correcting the virtual memory area when the capacity change determining means determines that the post-replacement capacity has changed with respect to the pre-replacement capacity;
An electronic control device.
請求項1に記載の電子制御装置において、
前記仮想メモリ作成手段は、
前記各スレーブユニットから前記特定記憶領域の先頭及び容量を示す領域情報を取得し、その取得した領域情報から前記各スレーブユニットにおける前記特定記憶領域を特定して、前記仮想メモリ領域を作成すること、
を特徴とする電子制御装置。
The electronic control device according to claim 1.
The virtual memory creating means
Acquiring area information indicating the head and capacity of the specific storage area from each slave unit, specifying the specific storage area in each slave unit from the acquired area information, and creating the virtual memory area;
An electronic control device.
請求項1又は請求項2に記載の電子制御装置において、
データの書き換えが可能な不揮発性のメモリであるマスタ側メモリを備えており、
前記仮想メモリ作成手段は、
前記各スレーブユニットにおける前記特定記憶領域に容量差があることによって、前記スレーブユニットにおける前記特定記憶領域の単位記憶領域を前記順番に従い割り当てることができない前記仮想メモリ領域の単位記憶領域に対しては、前記マスタ側メモリの単位記憶領域を割り当てること、
を特徴とする電子制御装置。
The electronic control device according to claim 1 or 2,
It has a master memory that is a non-volatile memory that can rewrite data.
The virtual memory creating means
For the unit storage areas of the virtual memory area that cannot be allocated according to the order, the unit storage areas of the specific storage areas in the slave units due to the capacity difference in the specific storage areas in the slave units, Allocating a unit storage area of the master side memory;
An electronic control device.
請求項3に記載の電子制御装置において、
前記容量変化判定手段により前記交換後容量が前記交換前容量に対して変化したと判定された場合に、前記交換後容量が前記交換前容量に対して増加したか減少したかを判別する判別手段を備え、
前記仮想メモリ作成手段は、
前記判別手段により前記交換後容量が前記交換前容量に対して増加したと判定された場合には、前記仮想メモリ領域を修正する処理として、
それまで本来なら前記交換前スレーブユニットにおける前記特定記憶領域の単位記憶領域が割り当てられるべきなのに前記マスタ側メモリの単位記憶領域を割り当てていた前記仮想メモリ領域の単位記憶領域に対して、前記交換後スレーブユニットにおける前記特定記憶領域の単位記憶領域のうち、増加した単位記憶領域を割り当てる処理を行い、
前記仮想メモリ作成手段は、
前記判別手段により前記交換後容量が前記交換前容量に対して減少したと判定された場合には、前記仮想メモリ領域を修正する処理として、
前記交換前スレーブユニットにおける前記特定記憶領域の単位記憶領域のうち、前記スレーブユニットの交換によって無くなってしまった単位記憶領域を割り当てていた前記仮想メモリ領域の単位記憶領域に対して、前記マスタ側メモリの単位記憶領域を割り当てる処理を行うこと、
を特徴とする電子制御装置。
The electronic control device according to claim 3.
Discriminating means for discriminating whether the post-replacement capacity has increased or decreased with respect to the pre-exchange capacity when it is determined by the capacity change determination means that the post-exchange capacity has changed with respect to the pre-exchange capacity With
The virtual memory creating means
When it is determined by the determination means that the post-replacement capacity has increased with respect to the pre-replacement capacity, as a process of correcting the virtual memory area,
For the unit storage area of the virtual memory area that had previously been allocated the unit storage area of the master side memory although the unit storage area of the specific storage area in the slave unit before replacement should be allocated Among the unit storage areas of the specific storage area in the slave unit, the process of assigning an increased unit storage area,
The virtual memory creating means
When the determination means determines that the post-replacement capacity has decreased with respect to the pre-replacement capacity, as a process of correcting the virtual memory area,
Of the unit storage areas of the specific storage area in the slave unit before replacement, the master side memory with respect to the unit storage area of the virtual memory area that has been allocated a unit storage area that has been lost due to replacement of the slave unit Process to allocate unit storage areas of
An electronic control device.
請求項1ないし請求項の何れか1項に記載の電子制御装置において、
記交換検知手段により前記スレーブユニットの何れかが交換されたと判定された場合に、前記交換前スレーブユニットにおける前記特定記憶領域の単位記憶領域に記憶されていた保存対象データと同じ保存対象データが記憶されていた前記仮想メモリ領域における単位記憶領域を特定して、その特定した単位記憶領域に記憶されている保存対象データから、前記交換後スレーブユニットにおける前記特定記憶領域の単位記憶領域に書き込むべき保存対象データを復元する復元手段
を備えていることを特徴とする電子制御装置。
The electronic control device according to any one of claims 1 to 4 ,
If any of the slave units is determined to have been replaced by the previous SL exchange detecting means, the same data to be stored and storage target data stored in the unit storage area of the specific storage area in the exchange before the slave unit The unit storage area in the stored virtual memory area should be specified, and the storage target data stored in the specified unit storage area should be written to the unit storage area of the specified storage area in the slave unit after replacement Restoration means for restoring data to be saved ,
An electronic control device comprising:
マスタユニットと、該マスタユニットと通信線を介して通信可能に接続されるN個(但し、Nは3以上の整数)のスレーブユニットとを備え、
前記N個の各スレーブユニットは、自動車のエンジンの気筒毎に設けられて、対応する気筒に燃料を噴射するインジェクタであり、
前記各スレーブユニットには、データの書き換えが可能な不揮発性のメモリが備えられていると共に、該メモリの特定記憶領域には、前記マスタユニットによって保存対象データが書き込まれる制御システムにおいて、
前記マスタユニットとして、請求項1ないし請求項の何れか1項に記載の電子制御装置を備えていること、
を特徴とする制御システム。
A master unit, and N (N is an integer of 3 or more) slave units connected to the master unit via a communication line so as to be communicable,
Each of the N slave units is an injector that is provided for each cylinder of an automobile engine and injects fuel into the corresponding cylinder.
In each control unit in which each slave unit is provided with a nonvolatile memory capable of rewriting data, and data to be saved is written into the specific storage area of the memory by the master unit,
The electronic control device according to any one of claims 1 to 5 is provided as the master unit.
Control system characterized by.
JP2011159100A 2011-07-20 2011-07-20 Electronic control device and control system Active JP5644707B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011159100A JP5644707B2 (en) 2011-07-20 2011-07-20 Electronic control device and control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011159100A JP5644707B2 (en) 2011-07-20 2011-07-20 Electronic control device and control system

Publications (2)

Publication Number Publication Date
JP2013024117A JP2013024117A (en) 2013-02-04
JP5644707B2 true JP5644707B2 (en) 2014-12-24

Family

ID=47782759

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011159100A Active JP5644707B2 (en) 2011-07-20 2011-07-20 Electronic control device and control system

Country Status (1)

Country Link
JP (1) JP5644707B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101603547B1 (en) 2014-11-06 2016-03-15 현대자동차주식회사 Calibration Memory Controlling Method and Apparatus for Vehicle Controller
KR102513941B1 (en) 2018-06-19 2023-03-27 현대자동차주식회사 Automatic Driving control apparatus, vehicle having the same and method for controlling the same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1715167A4 (en) * 2004-02-13 2011-04-20 Bosch Corp Vehicle data backup method
US7873803B2 (en) * 2007-09-25 2011-01-18 Sandisk Corporation Nonvolatile memory with self recovery
JP4873048B2 (en) * 2009-06-09 2012-02-08 株式会社デンソー Fuel injection control device

Also Published As

Publication number Publication date
JP2013024117A (en) 2013-02-04

Similar Documents

Publication Publication Date Title
US8341497B2 (en) Semiconductor storage
CN101782871B (en) Information processing device, processor and memory management method
JP3892851B2 (en) Memory card and semiconductor device
KR20140060912A (en) Method and apparatus for updating boot loader
US7925821B2 (en) Nonvolatile semiconductor storage device and method of managing the same
CN109918024B (en) Storage management method and device, single-chip microcomputer equipment and readable storage medium
JP4478731B2 (en) Communication device and gateway device
JP5644707B2 (en) Electronic control device and control system
US20150325291A1 (en) Refresh of a memory area of a non-volatile memory unit
WO2014120205A1 (en) Replacement of a corrupt driver variable record
US20180217758A1 (en) Data storage device and method for rewriting parameters thereof
JP5499987B2 (en) Shared cache memory device
JP5908304B2 (en) Fuel injection control system
JP5747680B2 (en) Information processing apparatus, image forming apparatus, and program
JP6009290B2 (en) Electronic control device for vehicle
TW201303585A (en) Data storing method and apparatus applied to flash memory storage device
CN101398874A (en) Method for loading program to internal SRAM of MPU by utilizing hash function and operation method
KR20200126155A (en) Semiconductor memory device performing command merging and operating method thereof
JP2013003984A (en) Information processing apparatus, image forming apparatus, and program
JP2018041153A (en) Storage system and input/output processing method
JP2003271420A (en) Electronic control device
US9305409B2 (en) Electronic control unit
US20220357986A1 (en) Method and computer for the management of data exchanges between a plurality of tasks
JP5786702B2 (en) Security token, instruction execution method in security token, and computer program
KR102552666B1 (en) Electronic device and operation method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130821

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140225

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140418

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141020

R151 Written notification of patent or utility model registration

Ref document number: 5644707

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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