JP2014063350A - Automotive electronic control device - Google Patents

Automotive electronic control device Download PDF

Info

Publication number
JP2014063350A
JP2014063350A JP2012208012A JP2012208012A JP2014063350A JP 2014063350 A JP2014063350 A JP 2014063350A JP 2012208012 A JP2012208012 A JP 2012208012A JP 2012208012 A JP2012208012 A JP 2012208012A JP 2014063350 A JP2014063350 A JP 2014063350A
Authority
JP
Japan
Prior art keywords
module
ecu
control device
electronic control
control program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012208012A
Other languages
Japanese (ja)
Inventor
Yusuke Abe
雄介 阿部
Koji Yuasa
康司 湯浅
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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
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 Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2012208012A priority Critical patent/JP2014063350A/en
Publication of JP2014063350A publication Critical patent/JP2014063350A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve efficiency of functional verification of an electronic control device.SOLUTION: An electronic control device mounted on an automobile has a ROM 130 (nonvolatile memory) storing multiple modules in which a control program is divided for every any function, and a RAM 140 (volatile memory) storing a modification module in which a processing content of at least one module is modified in the control program. The module stored in the ROM 130 is incorporated a processing to switch an operation instruction performing appointed computing and a call instruction calling the modification module linked to the module, according to presence of a switching request. When the electronic control device receives the switching request from outside, the modification module is called from the module and the modification module is executed in place of the module.

Description

本発明は、自動車に搭載された電子制御装置に関する。   The present invention relates to an electronic control device mounted on an automobile.

自動車に搭載される電子制御装置では、各種機能を分割したモジュール単位で、制御プログラムが開発されている。制御プログラムの検証段階においては、例えば、新規な制御を追加する、制御対象のアクチュエータが変更になるなど、電子制御装置の不揮発性メモリに格納されているモジュールの一部を変更する場合がある。この場合、モジュールの変更を容易にするために、特開2010−173633号公報(特許文献1)に記載されるように、電子制御装置と接続されたツールにおいて、電子制御装置から変数を受け取り、その変数を用いた演算を行い、その演算結果を電子制御装置に返す技術が提案されている。   In an electronic control device mounted on an automobile, a control program is developed for each module obtained by dividing various functions. In the verification stage of the control program, some of the modules stored in the nonvolatile memory of the electronic control device may be changed, for example, by adding new control or changing the actuator to be controlled. In this case, in order to facilitate the change of the module, as described in JP 2010-173633 A (Patent Document 1), a tool connected to the electronic control device receives variables from the electronic control device, There has been proposed a technique for performing an operation using the variable and returning the operation result to the electronic control unit.

特開2010−173633号公報JP 2010-173633 A

しかしながら、従来技術においては、電子制御装置とツールとの間で変数又は演算結果の通信を頻繁に行う必要があるため、電子制御装置の通信速度が一般的に遅いことと相俟って通信負荷が増大してしまうおそれがあった。通信負荷の増大は、レスポンスを低下するため、電子制御装置の機能検証に要する時間を長くする要因となってしまう。   However, in the prior art, since it is necessary to frequently communicate variables or calculation results between the electronic control device and the tool, the communication load is coupled with the fact that the communication speed of the electronic control device is generally slow. May increase. An increase in the communication load decreases the response, and thus increases the time required for function verification of the electronic control device.

そこで、本発明は、機能検証の効率を向上させた、自動車用電子制御装置を提供することを目的とする。   Accordingly, an object of the present invention is to provide an automotive electronic control device with improved function verification efficiency.

自動車用電子制御装置は、制御プログラムを格納する不揮発性メモリと、制御プログラムの機能の一部を分割したモジュールを格納する揮発性メモリと、を有する。そして、自動車用電子制御装置は、外部からの指示に応答して、不揮発性メモリに格納された制御プログラムの機能の一部の代わりに、揮発性メモリに格納されたモジュールを実行する。   The automotive electronic control device includes a nonvolatile memory that stores a control program and a volatile memory that stores a module obtained by dividing a part of the function of the control program. Then, in response to an instruction from the outside, the automobile electronic control device executes the module stored in the volatile memory instead of a part of the function of the control program stored in the nonvolatile memory.

かかる自動車用電子制御装置によれば、電子制御装置の機能検証の効率を向上させることができる。   According to such an electronic control device for automobiles, the efficiency of functional verification of the electronic control device can be improved.

電子制御装置の検証システムの一例を示す全体構成図である。It is a whole block diagram which shows an example of the verification system of an electronic control apparatus. 電子制御装置の一例を示す内部構造図である。It is an internal structure figure which shows an example of an electronic controller. ツールの一例を示す内部構造図である。It is an internal structure figure which shows an example of a tool. 制御プログラムのモジュールに組み込まれた処理の説明図である。It is explanatory drawing of the process integrated in the module of the control program. 電子制御装置の機能を検証する手順の概要図である。It is a schematic diagram of the procedure which verifies the function of an electronic control apparatus. ツールにおける初期化処理の一例を示すフローチャートである。It is a flowchart which shows an example of the initialization process in a tool. 電子制御装置における初期化処理の一例を示すフローチャートである。It is a flowchart which shows an example of the initialization process in an electronic controller. 電子制御装置のRAM(Random Access Memory)に展開される変更モジュールの一例の説明図である。It is explanatory drawing of an example of the change module expand | deployed by RAM (Random Access Memory) of an electronic controller. 電子制御装置におけるモジュール実行処理の一例を示すフローチャートである。It is a flowchart which shows an example of the module execution process in an electronic controller. 電子制御装置のROM(Read Only Memory)及びRAMに格納されるモジュール及び変更モジュールの具体的事例の説明図である。It is explanatory drawing of the specific example of the module stored in ROM (Read Only Memory) and RAM of an electronic controller, and a change module. 切替要求がない場合のモジュール実行過程の説明図である。It is explanatory drawing of the module execution process when there is no switching request | requirement. 切替要求がある場合のモジュール実行過程の説明図である。It is explanatory drawing of the module execution process when there exists a switching request | requirement. 制御プログラムのモジュールに組み込まれた処理の他の例を示し、(A)は組み込み処理の概要図、(B)は1回目のコール時の動作の説明図、(C)は2回目以降のコール時の動作の説明図である。The other example of the process integrated in the module of the control program is shown, (A) is a schematic diagram of the embedded process, (B) is an explanatory diagram of the operation at the time of the first call, (C) is the second and subsequent calls It is explanatory drawing of operation | movement at the time.

以下、添付された図面を参照し、本発明を実施するための実施形態について詳述する。
図1は、自動車に搭載された電子制御装置(ECU:Electronic Control Unit)の検証システムの一例を示す。
Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 shows an example of a verification system of an electronic control unit (ECU) mounted on an automobile.

検証対象となるECU100は、CAN(Controller Area Network),シリアル通信,FlexRay(登録商標)などのネットワークケーブル200を介して、作業者がECU100の検証作業を行う、ツール300(検証装置)に着脱可能に接続される。   The ECU 100 to be verified can be attached to and detached from a tool 300 (verification apparatus) in which an operator performs verification work on the ECU 100 via a network cable 200 such as CAN (Controller Area Network), serial communication, FlexRay (registered trademark), or the like. Connected to.

ECU100は、自動車に搭載された各種機器、例えば、燃料噴射弁,変速機,電動ブレーキシステム,ABS(Antilock Brake System),可変バルブタイミング機構,ブラシレスモータなどを制御する電子機器であって、マイクロコンピュータを内蔵している。具体的には、ECU100は、図2に示すように、CPU(Central Processing Unit)などのプロセッサ110と、ネットワークに接続するための通信回路120と、不揮発性メモリの一例としてのROM130と、揮発性メモリの一例としてのRAM140と、プロセッサ110,通信回路120,ROM130及びRAM140を相互に接続するバス150と、を有している。ここで、通信回路120は、ネットワークケーブル200を着脱可能に接続するコネクタ(図示せず)を含む。また、ROM130には、制御対象の車載機器を制御するための制御プログラムとして、各種機能を任意の単位(例えば、関数ごと)で分割したモジュールのすべてが格納されている。制御プログラムをモジュール化すると、一部のモジュールのみを書き換えることで、制御プログラムを変更できるので好都合である。なお、不揮発メモリとして、電気的にデータを消去及び書換可能なフラッシュROMを使用することもできる。   The ECU 100 is an electronic device that controls various devices mounted on an automobile, such as a fuel injection valve, a transmission, an electric brake system, an ABS (Antilock Brake System), a variable valve timing mechanism, a brushless motor, and the like. Built in. Specifically, as shown in FIG. 2, the ECU 100 includes a processor 110 such as a CPU (Central Processing Unit), a communication circuit 120 for connecting to a network, a ROM 130 as an example of a nonvolatile memory, The RAM 140 is an example of a memory, and a processor 110, a communication circuit 120, a ROM 130, and a bus 150 that connects the RAM 140 to each other. Here, the communication circuit 120 includes a connector (not shown) that detachably connects the network cable 200. The ROM 130 stores all modules obtained by dividing various functions in arbitrary units (for example, for each function) as a control program for controlling the in-vehicle device to be controlled. When the control program is modularized, it is advantageous because the control program can be changed by rewriting only some of the modules. As the nonvolatile memory, a flash ROM that can electrically erase and rewrite data can be used.

ツール300は、作業者がECU100の検証作業を行う電子機器であって、例えば、パーソナルコンピュータなどのコンピュータから構成される。具体的には、ツール300は、図3に示すように、CPUなどのプロセッサ310と、ネットワークに接続するための通信回路320と、ハードディスク装置,SSD(Solid State Drive)などのストレージ330と、作業者へのインターフェースとなる入出力装置340と、を有している。ここで、通信回路320は、ネットワークケーブル200を着脱可能に接続するコネクタ(図示せず)を含む。また、入出力装置340は、LCD(Liquid Crystal Display)などのディスプレイと、キーボードと、マウスなどのポインティングデバイスと、を含む。なお、ストレージ330は、例えば、図示しないネットワークに接続されたNAS(Network Attached Storage),サーバのストレージなどであってもよい。   The tool 300 is an electronic device in which an operator performs a verification operation of the ECU 100, and includes, for example, a computer such as a personal computer. Specifically, as shown in FIG. 3, the tool 300 includes a processor 310 such as a CPU, a communication circuit 320 for connecting to a network, a storage 330 such as a hard disk device and an SSD (Solid State Drive), An input / output device 340 serving as an interface to a person. Here, the communication circuit 320 includes a connector (not shown) that removably connects the network cable 200. The input / output device 340 includes a display such as an LCD (Liquid Crystal Display), a keyboard, and a pointing device such as a mouse. The storage 330 may be, for example, a NAS (Network Attached Storage) connected to a network (not shown), a server storage, or the like.

ストレージ330には、ECU100のROM130に格納された制御プログラムのうち、少なくとも一部の機能を変更したモジュール(以下「変更モジュール」という)1〜Nが格納されている。変更モジュール1〜Nは、例えば、制御プログラムを開発するシステムで作成され、図示しないネットワークを介してツール300のストレージ330に格納される。なお、ストレージ330には、変更モジュールが少なくとも1つ格納されていればよい。   The storage 330 stores modules (hereinafter referred to as “change modules”) 1 to N in which at least some of the functions of the control program stored in the ROM 130 of the ECU 100 are changed. The change modules 1 to N are created by a system for developing a control program, for example, and stored in the storage 330 of the tool 300 via a network (not shown). The storage 330 only needs to store at least one change module.

ECU100において、ROM130に格納された制御プログラムのモジュールに代えて、任意の変更モジュールを実行可能なように、次のような工夫がなされている。即ち、ROM130に格納された制御プログラムのモジュールの一例として、図4に示すように、外部、例えば、ツール300からの切替要求の有無に応じて、所定の演算を行う演算命令と、変更モジュールのコール命令と、を切り替える処理が組み込まれている。図示のモジュールでは、関数f()について、切替要求がない場合には、X=A*B,Y=A−Bという演算を行う一方、切替要求がある場合には、変更モジュールの関数f’()をコールすることが記述されている。なお、A,B,X及びYは、広域変数である。   In the ECU 100, the following device is devised so that an arbitrary change module can be executed instead of the module of the control program stored in the ROM 130. That is, as an example of the module of the control program stored in the ROM 130, as shown in FIG. 4, an operation instruction for performing a predetermined operation according to the presence or absence of a switching request from the outside, for example, the tool 300, and a change module A process for switching between call instructions is incorporated. In the illustrated module, when there is no switching request for the function f (), the calculation of X = A * B, Y = A−B is performed, while when there is a switching request, the function f ′ of the change module. Calling () is described. A, B, X and Y are global variables.

図5は、変更モジュールを使用して、ECU100の機能を検証する手順の概要を示す。
ステップ1(図では「S1」と略記する。以下同様。)では、作業者が、ネットワークケーブル200及び電源ケーブル(図示せず)を介して、ツール300にECU100を接続する。ツール300にECU100が接続されると、ECU100への電源供給が開始され、例えば、ブートローダにより、ROM130に格納された制御プログラムの実行が開始される。
FIG. 5 shows an outline of a procedure for verifying the function of the ECU 100 using the change module.
In step 1 (abbreviated as “S1” in the figure, the same applies hereinafter), the operator connects the ECU 100 to the tool 300 via the network cable 200 and a power cable (not shown). When the ECU 100 is connected to the tool 300, power supply to the ECU 100 is started, and for example, execution of a control program stored in the ROM 130 is started by a boot loader.

ステップ2では、ツール300を操作する作業者の指示に応答して、ツール300が、作業者が選択した少なくとも1つの変更モジュールをECU100へ送信する「初期化」を実行する。   In step 2, in response to an instruction from the operator who operates the tool 300, the tool 300 executes “initialization” in which at least one change module selected by the operator is transmitted to the ECU 100.

ステップ3では、ツール300を操作する作業者の指示に応答して、ツール300が、ECU100の機能検証を行う。ツール300は、例えば、ECU100から送信された車両情報,外部から入力された他の情報,作業者により入力された他の情報などを使用して、シミュレーションなどによって車両を代用し、ECU100が所望の機能を実現しているか否かを診断する機能検証を行う。なお、ECU100の機能検証作業においては、ツール300を操作する作業者は、対話型形式で作業を進めることができる。   In step 3, the tool 300 verifies the function of the ECU 100 in response to an instruction from an operator who operates the tool 300. The tool 300 uses, for example, vehicle information transmitted from the ECU 100, other information input from the outside, other information input by an operator, and the like, by using a simulation or the like. Perform functional verification to diagnose whether the function is realized. In the function verification work of the ECU 100, an operator who operates the tool 300 can proceed with the work in an interactive format.

ステップ4では、ツール300が、作業者により終了指示が入力されたか否かを介して、ECU100の機能検証が終了したか否かを判定する。そして、ツール300は、ECU100の機能検証が終了したと判定すれば処理をステップ5へと進める一方(Yes)、ECU100の機能検証が終了していないと判定すれば処理をステップ2へと戻す(No)。なお、この判定処理は、作業者が行うようにしてもよい。   In step 4, the tool 300 determines whether or not the function verification of the ECU 100 has been completed through whether or not an end instruction has been input by the operator. If the tool 300 determines that the function verification of the ECU 100 has been completed, the tool 300 proceeds to step 5 (Yes), whereas if it is determined that the function verification of the ECU 100 has not ended, the process returns to step 2 ( No). This determination process may be performed by an operator.

ステップ5では、作業者が、ECU100からネットワークケーブル200及び電源ケーブルを取り外すことで、ツール300からECU100を取り外す。なお、ツール300からECU100を取り外す前に、ツール300からECU100へとシャットダウン指令を送信し、ECU100を前もって停止させるようにしてもよい。   In step 5, the operator removes the ECU 100 from the tool 300 by removing the network cable 200 and the power cable from the ECU 100. Before removing ECU 100 from tool 300, a shutdown command may be transmitted from tool 300 to ECU 100 to stop ECU 100 in advance.

図6は、ツール300を操作する作業者が変更モジュールを選択し、例えば、「初期化実行」ボタンを押したことを契機として、ツール300のプロセッサ310が実行する初期化処理の一例を示す。ここで、変更モジュールの選択は、例えば、ツール300の入出力装置340を用いた対話型形式で行うようにしてもよい。なお、ツール300のプロセッサ310は、変更モジュールを列挙した初期化指令を受けた場合に、初期化処理を実行するようにしてもよい。   FIG. 6 shows an example of an initialization process executed by the processor 310 of the tool 300 when an operator operating the tool 300 selects a change module and presses an “initialization execution” button, for example. Here, the change module may be selected in an interactive format using the input / output device 340 of the tool 300, for example. Note that the processor 310 of the tool 300 may execute an initialization process when receiving an initialization command listing the changed modules.

ステップ11では、プロセッサ310が、作業者により選択された少なくとも1つの変更モジュールをECU100へと送信する。
ステップ12では、プロセッサ310が、ECU100から展開完了通知、即ち、ECU100が変更モジュールをRAM140に展開したことを示す通知があったか否かを判定する。そして、プロセッサ310は、ECU100から展開完了通知があったと判定すれば処理をステップ13へと進める一方(Yes)、ECU100から展開完了通知がないと判定すれば処理をステップ12へと戻す(No)。要するに、プロセッサ130は、ECU100に変更モジュールを送信してからその応答があるまで待機する。
In step 11, the processor 310 transmits at least one change module selected by the operator to the ECU 100.
In step 12, the processor 310 determines whether there is a deployment completion notification from the ECU 100, that is, a notification indicating that the ECU 100 has deployed the changed module in the RAM 140. If processor 310 determines that there is a deployment completion notification from ECU 100, the process proceeds to step 13 (Yes), while if it determines that there is no deployment completion notification from ECU 100, the process returns to step 12 (No). . In short, the processor 130 waits until there is a response after transmitting the change module to the ECU 100.

ステップ13では、プロセッサ310が、ECU100に切替要求、即ち、ECU100のROM130に格納されている制御プログラムのモジュールに代えて、変更モジュールを実行すべき旨の要求を送信する。切替要求を受信したECU100は、例えば、フラグを使用して、切替要求があったことを保持する。   In step 13, the processor 310 transmits a switching request to the ECU 100, that is, a request to execute the change module instead of the module of the control program stored in the ROM 130 of the ECU 100. The ECU 100 that has received the switching request uses, for example, a flag to hold that there has been a switching request.

なお、ECU100への切替要求の送信は、ツール300を操作する作業者の指示に応答して行うようにしてもよい。このようにすれば、ECU100に変更モジュールを送信した後、任意のタイミングでモジュールを切り替えることができる。   The transmission of the switching request to the ECU 100 may be performed in response to an instruction from an operator who operates the tool 300. If it does in this way, after transmitting a change module to ECU100, a module can be changed at arbitrary timing.

図7は、ECU100が変更モジュールを受信したことを契機として、ECU100のプロセッサ110が実行する初期化処理の一例を示す。
ステップ21では、プロセッサ110が、ツール300から送信されてきたすべての変更モジュールをRAM140に展開する。このとき、RAM140の各変更モジュール、例えば、変更モジュール1には、図8に示すように、変更モジュール1内でのみ使用(参照)する変数A,B,X及びY(専用変数)を格納する専用領域が確保されている。また、RAM140には、ROM130に格納されている制御プログラムの各モジュールが共用して使用(参照)する、変数A,B,X及びY(共用変数)を格納する共用領域が確保されている。なお、変更モジュールに識別子の一例としてのIDを付し、このIDを使用して制御プログラムのモジュールとの関連付けを行う。
FIG. 7 shows an example of an initialization process executed by the processor 110 of the ECU 100 when the ECU 100 receives the change module.
In step 21, the processor 110 expands all the change modules transmitted from the tool 300 in the RAM 140. At this time, each change module of the RAM 140, for example, the change module 1, stores variables A, B, X, and Y (dedicated variables) that are used (referenced) only within the change module 1, as shown in FIG. A dedicated area is reserved. The RAM 140 has a shared area for storing variables A, B, X, and Y (shared variables) that are shared (used) by each module of the control program stored in the ROM 130. An ID as an example of an identifier is assigned to the change module, and the ID is used to associate the change module with the module of the control program.

ステップ22では、プロセッサ110が、展開完了通知をツール300に送信する。
かかる初期化処理によれば、ツール300において作業者が変更モジュールを選択して初期化実行を指示すると、ツール300からECU100へと変更モジュールが送信される。そして、変更モジュールを受信したECU100では、変更モジュールの実行を可能とすべく、変更モジュールがRAM140に展開される。このため、ECU100のROM130に格納された制御プログラムのモジュールに代えて、任意の変更モジュールを実行する準備を行うことができる。
In step 22, the processor 110 transmits a deployment completion notification to the tool 300.
According to such an initialization process, when an operator selects a change module in the tool 300 and instructs initialization, the change module is transmitted from the tool 300 to the ECU 100. In the ECU 100 that has received the change module, the change module is expanded in the RAM 140 so that the change module can be executed. For this reason, it can replace with the module of the control program stored in ROM130 of ECU100, and can prepare for performing arbitrary change modules.

図9は、制御プログラムの実行が開始されたことを契機として、ECU100のプロセッサ110が所定時間(例えば、100ms)ごとに実行するモジュール実行処理の一例を示す。なお、モジュール実行処理は、制御対象の制御内容に応じたモジュールの順番で順次実行される。   FIG. 9 shows an example of module execution processing that is executed every predetermined time (for example, 100 ms) by the processor 110 of the ECU 100 when the execution of the control program is started. The module execution process is sequentially executed in the order of modules corresponding to the control contents to be controlled.

ステップ31では、プロセッサ110が、ツール300から切替要求があったか否かを判定する。そして、プロセッサ110は、ツール300から切替要求があったと判定すれば処理をステップ32へと進める一方(Yes)、ツール300から切替要求がなかったと判定すれば処理をステップ35へと進める(No)。   In step 31, the processor 110 determines whether or not there is a switching request from the tool 300. If the processor 110 determines that there is a switching request from the tool 300, the process proceeds to step 32 (Yes), whereas if it is determined that there is no switching request from the tool 300, the process proceeds to step 35 (No). .

ステップ32では、プロセッサ110が、IDを使用して実行対象のモジュールに関連付けられている変更モジュールを特定し、RAM140の共用領域に格納されている変数を変更モジュールの専用領域にコピーする。   In step 32, the processor 110 identifies the change module associated with the execution target module using the ID, and copies the variable stored in the shared area of the RAM 140 to the exclusive area of the change module.

ステップ33では、プロセッサ110が、実行対象のモジュールを実行する。実行対象のモジュールを実行すると、ツール300から切替要求があることから、そのモジュールから変更モジュールがコールされる。そして、変更モジュールは、その専用領域に格納されている変数を使用して所定の演算などを行い、その演算結果を専用領域に格納する。   In step 33, the processor 110 executes the execution target module. When a module to be executed is executed, a change module is called from the module because there is a switching request from the tool 300. Then, the change module performs a predetermined calculation using the variable stored in the dedicated area, and stores the calculation result in the dedicated area.

ステップ34では、プロセッサ110が、専用モジュールの専用領域に格納されている変数をRAM140の共用領域にコピーする。これにより、制御プログラムの他のモジュールが、共用領域に格納された変数を使用して各処理を行うことができる。   In step 34, the processor 110 copies the variable stored in the dedicated area of the dedicated module to the shared area of the RAM 140. Thereby, other modules of the control program can perform each process using the variable stored in the shared area.

ステップ35では、プロセッサ110が、実行対象のモジュールを実行する。実行対象のモジュールを実行すると、そのモジュールは共用領域に格納されている変数を使用して所定の演算などを行い、その演算結果を共用領域に格納する。   In step 35, the processor 110 executes the execution target module. When a module to be executed is executed, the module performs a predetermined operation using variables stored in the shared area, and stores the operation result in the shared area.

かかるモジュール実行処理によれば、ツール300から切替要求がない場合には、実行対象のモジュールが実行される。
一方、ツール300から切替要求がある場合には、RAM140の共用領域に格納されている変数を、実行対象のモジュールに関連付けられている変更モジュールの専用領域にコピーした後、モジュールが実行される。即ち、変更モジュールは、制御プログラムが使用する共用領域のアドレスを知り得ないため、変更モジュールを実行する前に、共用領域の変数を専用領域にコピーすることで、変数を使用できるようになる。そして、実行対象のモジュールが実行されると、そのモジュールに関連付けられている変更モジュールがコールされ、変更モジュールの専用領域に格納されている変数を使用して所定の演算などが行われ、その演算結果が専用領域に格納される。その後、変更モジュールの専用領域に格納された変数がRAM140の共用領域にコピーされ、他のモジュールから使用できるようになる。
According to such module execution processing, when there is no switching request from the tool 300, the module to be executed is executed.
On the other hand, when there is a switching request from the tool 300, the module is executed after copying the variable stored in the shared area of the RAM 140 to the exclusive area of the change module associated with the execution target module. That is, since the change module cannot know the address of the shared area used by the control program, the variable can be used by copying the variable in the shared area to the dedicated area before executing the change module. When the execution target module is executed, the change module associated with the module is called, and a predetermined operation is performed using a variable stored in the exclusive area of the change module. The result is stored in a dedicated area. Thereafter, the variable stored in the dedicated area of the change module is copied to the shared area of the RAM 140 and can be used from other modules.

従って、ECU100が外部からの切替要求を受信することで、制御プログラムのモジュールに代えて、そのモジュールに関連付けられている変更モジュールを実行することができる。このとき、ツール300からECU100へと切替要求を一度送信すればよく、ネットワークの通信速度よりも高速な、ECU100の内部処理においてモジュールの切り替えが行われる。このため、通信負荷の増大の抑制を通してレスポンスが向上し、ECU100の機能検証の効率を向上させることができる。   Therefore, when the ECU 100 receives a switching request from the outside, the change module associated with the module can be executed instead of the module of the control program. At this time, a switching request may be transmitted once from the tool 300 to the ECU 100, and the module is switched in the internal processing of the ECU 100, which is faster than the communication speed of the network. For this reason, a response improves through suppression of the increase in communication load, and the efficiency of the function verification of ECU100 can be improved.

ここで、かかるモジュール実行処理の理解を容易ならしめるために、具体的な事例を想定して説明する。その前提条件として、図10に示すように、ECU100のROM130には、前述したモジュール1が格納されていると共に、ECU100のRAM140には、ROM130のモジュール1に関連付けられている変更モジュール1が格納されているものとする。RAM140に格納されている変更モジュール1は、関数f’()として、X=A+B,Y=X*Bを演算する。そして、RAM140の共用領域には、変数A,B,X及びYの一例として、3,7,−及び−が夫々格納されているものとする。ここで、変数X及びYの値「−」は、値が不定であることを示している。   Here, in order to facilitate understanding of such module execution processing, a specific example will be assumed and described. As a prerequisite, as shown in FIG. 10, the aforementioned module 1 is stored in the ROM 130 of the ECU 100, and the change module 1 associated with the module 1 of the ROM 130 is stored in the RAM 140 of the ECU 100. It shall be. The change module 1 stored in the RAM 140 calculates X = A + B and Y = X * B as the function f ′ (). In the common area of the RAM 140, 3, 7,-, and-are stored as examples of variables A, B, X, and Y, respectively. Here, the value “−” of the variables X and Y indicates that the value is indefinite.

切替要求がない場合には、図11に示すように、共用領域に格納されている変数を使用して、ROM130に格納されているモジュール1の演算が実行される。モジュール1では、変数Aと変数Bとを乗算した値を変数Xに代入すると共に、変数Xから変数Bを減算した値を変数Yに代入する。この演算により、共用領域の変数X及びYは、夫々、21及び14に更新される。   When there is no switching request, as shown in FIG. 11, the operation of the module 1 stored in the ROM 130 is executed using the variable stored in the shared area. In module 1, a value obtained by multiplying variable A and variable B is assigned to variable X, and a value obtained by subtracting variable B from variable X is assigned to variable Y. By this calculation, the variables X and Y in the shared area are updated to 21 and 14, respectively.

一方、切替要求がある場合には、図12に示すように、共用領域に格納されている変数が変更モジュール1の専用領域にコピーされ、ROM130に格納されているモジュール1が実行される。このとき、モジュール1から変更モジュール1がコールされ、その専用領域に格納されている変数を使用した演算が実行される。変更モジュール1では、変数Aと変数Bとを加算した値を変数Xに代入すると共に、変数Xと変数Bとを乗算した値を変数Yに代入する。この演算により、専用領域の変数X及びYは、夫々、10及び70に更新される。その後、変更モジュール1の専用領域に格納された変数がRAM140の共用領域にコピーされる。   On the other hand, when there is a switching request, as shown in FIG. 12, the variable stored in the shared area is copied to the dedicated area of the change module 1, and the module 1 stored in the ROM 130 is executed. At this time, the change module 1 is called from the module 1, and an operation using the variable stored in the dedicated area is executed. In the change module 1, a value obtained by adding the variable A and the variable B is substituted for the variable X, and a value obtained by multiplying the variable X and the variable B is substituted for the variable Y. By this calculation, the variables X and Y in the dedicated area are updated to 10 and 70, respectively. Thereafter, the variable stored in the dedicated area of the change module 1 is copied to the shared area of the RAM 140.

ECU100のROM130に格納されたモジュールは、図13(A)に示すようにしてもよい。即ち、関数f()の処理として、同図の(1)には、関数f()の1回目のコールでは何もせず、2回目以降のコールでは変更モジュールをコールした後、関数f()の終了アドレスへとジャンプする命令を記述する。また、同図の(2)には、関数f()の1回目のコールでは関数f()の終了アドレスを記憶し、2回目以降のコールでは何もしない命令を記述する。   The module stored in the ROM 130 of the ECU 100 may be as shown in FIG. That is, as the processing of the function f (), (1) in the figure does not do anything in the first call of the function f (), and after the second and subsequent calls, the function f () is called. Write an instruction to jump to the end address of. Also, in (2) of the figure, the end address of the function f () is stored in the first call of the function f (), and an instruction that does nothing in the second and subsequent calls is described.

このようにすれば、関数f()の1回目のコールでは、図13(B)に示すように、(1)では何もせず、(2)では関数f()の終了アドレスが記憶される。また、関数f()の2回目以降のコールでは、図13(C)に示すように、(1)では変更モジュールのコール後、1回目のコールで記憶された終了アドレスにジャンプし、(2)では何もしない。従って、モジュールから任意の変更モジュールをコールすることができる。   In this way, in the first call of the function f (), as shown in FIG. 13B, nothing is done in (1), and the end address of the function f () is stored in (2). . Further, in the second and subsequent calls of the function f (), as shown in FIG. 13C, in (1), after the change module call, jump to the end address stored in the first call, (2 ) Do nothing. Therefore, any change module can be called from the module.

ここで、前記実施形態から把握し得る請求項以外の実施形態について、以下に効果と共に記載する。
(イ)前記不揮発性メモリに格納されている制御プログラムには、外部からの指示の有無に応じて、所定の演算を行う命令と、前記モジュールをコールする命令と、を切り替える処理が組み込まれていることを特徴とする請求項1〜請求項3のいずれか1つに記載の自動車用電子制御装置。
かかる構成によれば、外部から指示を与えることで、制御プログラムからモジュールがコールされるので、制御プログラムの機能の一部に代えてモジュールを実行することができる。
Here, embodiments other than the claims that can be grasped from the embodiment will be described together with the effects.
(A) The control program stored in the non-volatile memory incorporates processing for switching between an instruction for performing a predetermined operation and an instruction for calling the module according to the presence or absence of an instruction from the outside. The automobile electronic control device according to claim 1, wherein the electronic control device is used.
According to such a configuration, the module is called from the control program by giving an instruction from the outside, so that the module can be executed instead of a part of the function of the control program.

(ロ)前記制御プログラムの機能の一部と前記モジュールとは、識別子により関連付けられていることを特徴とする請求項1〜請求項3、(イ)のいずれか1つに記載の自動車用電子制御装置。
かかる構成によれば、制御プログラムの機能の一部に代えて実行するモジュールを容易に特定することができる。
(B) A part of the function of the control program and the module are associated with each other by an identifier, and the vehicle electronics according to any one of claims 1 to 3 and (a) Control device.
According to such a configuration, it is possible to easily specify a module to be executed instead of a part of the function of the control program.

(ハ)前記揮発性メモリに格納されたモジュールを実行するに先立って、前記制御プログラムで使用する共用変数を、前記モジュールのみが使用する専用変数にコピーし、前記モジュールの実行後に、前記専用変数を前記共用変数にコピーすることを特徴とする請求項1〜請求項3、(イ)、(ロ)のいずれか1つに記載の自動車用電子制御装置。   (C) Before executing the module stored in the volatile memory, the shared variable used in the control program is copied to a dedicated variable used only by the module, and after the execution of the module, the dedicated variable is copied. The vehicle electronic control device according to any one of claims 1 to 3, (a), and (b), wherein: is copied to the shared variable.

かかる構成によれば、制御プログラムの共用変数のアドレスが分からなくても、モジュールの実行前に、共用変数を専用変数にコピーすることで、共用変数に格納された値を使用した演算などを行うことができる。また、モジュールの実行結果である専用変数に格納された値が、モジュールの実行後に共用変数にコピーされるので、その値を制御プログラムが使用できるようになる。   According to such a configuration, even if the address of the shared variable of the control program is not known, the operation using the value stored in the shared variable is performed by copying the shared variable to the dedicated variable before executing the module. be able to. In addition, since the value stored in the dedicated variable, which is the module execution result, is copied to the shared variable after the module is executed, the value can be used by the control program.

(ニ)前記専用変数は、前記モジュールに確保された領域に格納されることを特徴とする(ハ)に記載の自動車用電子制御装置。
かかる構成によれば、モジュールと専用変数とを容易に関連付けることができる。
(D) The electronic control device for an automobile according to (c), wherein the dedicated variable is stored in an area secured in the module.
With this configuration, the module and the dedicated variable can be easily associated with each other.

(ホ)前記制御プログラムは、所定規則で分割された複数のモジュールから構成されていることを特徴とする請求項1〜請求項3、(イ)〜(ニ)のいずれか1つに記載の自動車用電子制御装置。
かかる構成によれば、制御プログラムの一部を変更したい場合に、該当するモジュールを置き換えることで容易に対応することができる。
(E) The control program is composed of a plurality of modules divided according to a predetermined rule, according to any one of claims 1 to 3, and (b) to (d). Electronic control device for automobiles.
According to such a configuration, when a part of the control program is to be changed, it can be easily handled by replacing the corresponding module.

100 ECU
110 プロセッサ
130 ROM
140 RAM
100 ECU
110 processor 130 ROM
140 RAM

Claims (3)

制御プログラムを格納する不揮発性メモリと、前記制御プログラムの機能の一部を分割したモジュールを格納する揮発性メモリと、を有する自動車用電子制御装置であって、
外部からの指示に応答して、前記不揮発性メモリに格納された制御プログラムの機能の一部の代わりに、前記揮発性メモリに格納されたモジュールを実行することを特徴とする自動車用電子制御装置。
An automotive electronic control device comprising: a nonvolatile memory that stores a control program; and a volatile memory that stores a module obtained by dividing a part of the function of the control program.
In response to an instruction from the outside, an electronic control device for a vehicle that executes a module stored in the volatile memory instead of a part of the function of the control program stored in the nonvolatile memory .
前記実行されるモジュールは、外部から指定可能であることを特徴とする請求項1に記載の自動車用電子制御装置。   The automobile electronic control device according to claim 1, wherein the module to be executed can be designated from the outside. 外部からモジュールを受信した場合に、前記揮発性メモリに前記モジュールを展開することを特徴とする請求項1又は請求項2に記載の自動車用電子制御装置。   3. The automobile electronic control device according to claim 1, wherein when the module is received from outside, the module is expanded in the volatile memory.
JP2012208012A 2012-09-21 2012-09-21 Automotive electronic control device Pending JP2014063350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012208012A JP2014063350A (en) 2012-09-21 2012-09-21 Automotive electronic control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012208012A JP2014063350A (en) 2012-09-21 2012-09-21 Automotive electronic control device

Publications (1)

Publication Number Publication Date
JP2014063350A true JP2014063350A (en) 2014-04-10

Family

ID=50618526

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012208012A Pending JP2014063350A (en) 2012-09-21 2012-09-21 Automotive electronic control device

Country Status (1)

Country Link
JP (1) JP2014063350A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106292462A (en) * 2016-10-10 2017-01-04 无锡伟博汽车科技有限公司 A kind of ECU driving recording harvester based on CCP agreement and method
CN110737603A (en) * 2018-07-18 2020-01-31 炬新(珠海)微电子有限公司 method and device for replacing functions in ROM

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106292462A (en) * 2016-10-10 2017-01-04 无锡伟博汽车科技有限公司 A kind of ECU driving recording harvester based on CCP agreement and method
CN110737603A (en) * 2018-07-18 2020-01-31 炬新(珠海)微电子有限公司 method and device for replacing functions in ROM

Similar Documents

Publication Publication Date Title
US10725762B2 (en) Gateway device, in-vehicle network system, and firmware update method
US20180341476A1 (en) Software updating device, software updating system, and software updating method
US8970884B2 (en) Image forming apparatus
US20240053977A1 (en) Gateway device, in-vehicle network system, and firmware update method
WO2013042513A1 (en) Electronic control device for automobile and data communication method
JP2016134049A (en) Vehicle controller
JP2018190143A (en) Information processing apparatus
JP5307133B2 (en) Device emulation support apparatus, device emulation support method, device emulation support circuit, and information processing apparatus
CN110764486B (en) Method and device for operating vehicle-mounted controller, vehicle-mounted controller and storage medium
JP2015015024A (en) Method for driving control device and control device with model calculation unit
JP2019109745A (en) Automobile electronic controller
JP2010072843A (en) Verification device, verifying apparatus and verification system
JP2014063350A (en) Automotive electronic control device
US20130030568A1 (en) Robot system control method and a device therefor
KR102109125B1 (en) Method for managing state of ECU in vehicle based on automotive open system architecture
JP6237543B2 (en) In-vehicle device
US20220391192A1 (en) Ota master, center, system, method, non-transitory storage medium, and vehicle
US20220035620A1 (en) Software update device, update control method, non-transitory storage medium, and server
JP7411467B2 (en) Electronic control device and program rewriting control method
CN110377272B (en) Method and device for realizing SDK based on TBOX
JP2018160208A (en) On-vehicle controller and program update software
JP2015179465A (en) Automotive electronic control unit and verification method for same
JP2013232028A (en) Microcomputer
CN114527994A (en) Firmware programming method and system and vehicle control system
CN113254053B (en) Firmware upgrading method and system for dual-CPU system

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20140528