JPWO2016121442A1 - In-vehicle control device, program writing device, program generation device, and program - Google Patents

In-vehicle control device, program writing device, program generation device, and program Download PDF

Info

Publication number
JPWO2016121442A1
JPWO2016121442A1 JP2016571893A JP2016571893A JPWO2016121442A1 JP WO2016121442 A1 JPWO2016121442 A1 JP WO2016121442A1 JP 2016571893 A JP2016571893 A JP 2016571893A JP 2016571893 A JP2016571893 A JP 2016571893A JP WO2016121442 A1 JPWO2016121442 A1 JP WO2016121442A1
Authority
JP
Japan
Prior art keywords
data
block
program
compressed
difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016571893A
Other languages
Japanese (ja)
Other versions
JP6434994B2 (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.)
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
Publication of JPWO2016121442A1 publication Critical patent/JPWO2016121442A1/en
Application granted granted Critical
Publication of JP6434994B2 publication Critical patent/JP6434994B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • B60R16/023Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
    • B60R16/0231Circuits relating to the driving or the functioning of the vehicle
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device

Abstract

高速かつ容易にリプログラミングを行うことができる車載制御装置、プログラム書き込み装置、プログラム生成装置及びプログラムを提供する。ECU300は、マイコン301、SRAM302、FLASHメモリ303、通信装置305を備える。FLASHメモリ303は、複数のブロックから構成され、旧プログラムを記憶する。通信装置305は、ブロックデータ、ブロックデータの種類、及びブロックデータを書き込むブロックのアドレスを含むフレームを受信する(S250)。マイコン301は、ブロックデータの種類に応じて(S255、S260)、ブロックデータから新プログラムをSRAM302に復元し(S260)、復元された新プログラムの1片をアドレスに対応するブロックへ書き込む(S265、S270)。Provided are an in-vehicle control device, a program writing device, a program generation device, and a program that can perform reprogramming at high speed and easily. The ECU 300 includes a microcomputer 301, SRAM 302, FLASH memory 303, and communication device 305. The FLASH memory 303 is composed of a plurality of blocks and stores old programs. The communication device 305 receives the frame including the block data, the type of the block data, and the address of the block in which the block data is written (S250). The microcomputer 301 restores a new program from the block data to the SRAM 302 according to the type of block data (S255, S260) (S260), and writes one piece of the restored new program to the block corresponding to the address (S265, S270).

Description

本発明は、車載制御装置、プログラム書き込み装置、プログラム生成装置及びプログラムに関する。   The present invention relates to an in-vehicle control device, a program writing device, a program generation device, and a program.

従来のリプログラミングでは、低速なCAN(Controller Area Network)を介して書込みツールとしてのPC(Personal Computer)と車載制御装置(ECU:Engine Control Unit)を接続し、ロードモジュール(新プログラム)を分割転送しながらECUのフラッシュメモリへ書込みを行っている。   In conventional reprogramming, a PC (Personal Computer) as a writing tool and an in-vehicle controller (ECU: Engine Control Unit) are connected via a low-speed CAN (Controller Area Network), and the load module (new program) is divided and transferred. While writing to the flash memory of the ECU.

また、旧プログラムに対する新プログラムの更新部分が小さい場合においても、新プログラム全体をCAN経由で転送し、新プログラム全体の書込みを行っている。   Even when the updated part of the new program with respect to the old program is small, the entire new program is transferred via CAN and the entire new program is written.

従って、書込みに要する時間がかかるという問題があった。これに対し、従来から差分リプログラミングの考え方が提案されている(例えば、特許文献1参照)。すなわち、特許文献1の段落〔0020〕には、書き換え方式の1つとして「差分書換」が記載されている。   Therefore, there is a problem that it takes time to write. On the other hand, the concept of differential reprogramming has been conventionally proposed (see, for example, Patent Document 1). That is, paragraph [0020] of Patent Document 1 describes “differential rewriting” as one of the rewriting methods.

特開2011−081604号公報JP 2011-081604 A

特許文献1に開示されるような技術では、一般的に新プログラム全体と旧プログラム全体の差分を送信する。   In the technique disclosed in Patent Literature 1, generally, the difference between the entire new program and the entire old program is transmitted.

しかし、ECUのマイコンでは、プログラムを格納するFLASHメモリのサイズは大きいが、ワークメモリとして用いられるSRAM(Static Random Access Memory)のサイズは小さい。そのため、新プログラム全体と旧プログラム全体の差分をSRAMに記憶し、新プログラム全体を復元することが困難であった。   However, in the microcomputer of the ECU, the size of the FLASH memory for storing the program is large, but the size of the SRAM (Static Random Access Memory) used as the work memory is small. For this reason, it is difficult to store the difference between the entire new program and the entire old program in the SRAM and restore the entire new program.

本発明の目的は、高速かつ容易にリプログラミングを行うことができる車載制御装置、プログラム書き込み装置、プログラム生成装置及びプログラムを提供することにある。   An object of the present invention is to provide an in-vehicle control device, a program writing device, a program generation device, and a program that can perform reprogramming at high speed and easily.

上記目的を達成するために、本発明の基本的な考え方は、ECUのマイコンに内蔵されているFLASHメモリが複数のブロックで構成されている点に着目し、新プログラムと旧プログラムをブロック単位に分割し、当該ブロックの新プログラムと複数ブロックの旧プログラムとの差分を圧縮した差分圧縮データを車両制御装置へ転送し、車両制御装置側で受信した差分圧縮データを伸長してFLASHメモリの複数ブロックの旧プログラムを用いて新プログラムを復元して、FLASHメモリの当該ブロックへ書込むことを各ブロックごとに繰返すことを基本にしている。これにより、差分をさらに圧縮していることから、小さなSRAMでもブロック単位に復元することで新プログラム全体を復元できるようになる。当然ながら、SRAMのサイズに余裕があれば、新プログラムも複数のブロック単位に差分圧縮データを生成し、復元しても良い。また本発明は、新旧プログラムの単純な差分では無く、差分を圧縮した差分圧縮データによる書込み時間短縮を目的としている。   In order to achieve the above object, the basic idea of the present invention is that the FLASH memory built in the microcomputer of the ECU is composed of a plurality of blocks, and the new program and the old program are divided into blocks. Dividing and transferring the difference compressed data obtained by compressing the difference between the new program of the block and the old program of the plurality of blocks to the vehicle control device, and decompressing the differential compression data received on the vehicle control device side, the plurality of blocks of the FLASH memory The new program is restored using the old program and the writing to the corresponding block of the FLASH memory is repeated for each block. As a result, since the difference is further compressed, the entire new program can be restored by restoring the block unit even with a small SRAM. Of course, if there is room in the SRAM size, the new program may also generate and restore differentially compressed data in units of a plurality of blocks. Another object of the present invention is to reduce the writing time by using differentially compressed data obtained by compressing a difference, not a simple difference between old and new programs.

以上の基本的な考え方を基本にして、本発明は、複数のブロックから構成され、旧プログラムを記憶する不揮発性メモリ(FLASH)と、揮発性メモリ(SRAM)と、前記ブロック毎のサイズで分割し、当該ブロックの新プログラムと複数のブロックの旧プログラムとの差分を生成して圧縮した差分圧縮データまたは当該ブロックの新プログラムを圧縮した圧縮データを含む構成のブロックデータ、前記ブロックデータの種類、及び不揮発性メモリ(FLASH)の前記ブロックのアドレスを含むフレームを受信する通信装置と、前記ブロックデータの種類に応じて、前記ブロックデータと複数ブロックの旧プログラムから当該ブロックの新プログラムを揮発性メモリ(SRAM)に復元したり、前記ブロックデータから当該ブロックの新プログラムを揮発性メモリ(SRAM)に復元して、復元された当該ブロックの新プログラムを前記アドレスに対応する当該ブロックへ書き込む演算装置と、を備えるようにしたものである。   Based on the above basic concept, the present invention is composed of a plurality of blocks, and is divided into a nonvolatile memory (FLASH) for storing old programs, a volatile memory (SRAM), and the size of each block. Differential block data that is generated by compressing a difference between a new program of the block and an old program of a plurality of blocks, or block data that includes compressed data obtained by compressing the new program of the block, the type of the block data, And a communication device that receives a frame including the address of the block of the non-volatile memory (FLASH), and the block program and the new program of the block from the block program and the old program of a plurality of blocks according to the type of the block data (SRAM) or new program of the block from the block data To restore the volatile memory (SRAM), in which a new program of the restored the block was set to and an arithmetic device for writing into the block corresponding to the address.

本発明によれば、高速かつ容易にリプログラミングを行うことができる。上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。   According to the present invention, reprogramming can be performed quickly and easily. Problems, configurations, and effects other than those described above will be clarified by the following description of embodiments.

発明の実施形態によるシステムの全体構成を示す模式図である。1 is a schematic diagram showing an overall configuration of a system according to an embodiment of the invention. 図1に示すPCの構成図である。It is a block diagram of PC shown in FIG. 図1に示す車載システムの構成図である。It is a block diagram of the vehicle-mounted system shown in FIG. 図3に示すECUのSRAMの内部の構成を示す模式図である。FIG. 4 is a schematic diagram showing an internal configuration of an SRAM of the ECU shown in FIG. 3. 図3に示すECUのFLASHメモリの内部の構成を示す模式図である。FIG. 4 is a schematic diagram showing an internal configuration of a FLASH memory of the ECU shown in FIG. 3. 差分圧縮データ生成ソフトの構成図である。It is a block diagram of difference compression data generation software. 圧縮データ生成ソフトの構成図である。It is a block diagram of compressed data generation software. 選択機能付き差分圧縮データ生成ソフトの構成図である。It is a block diagram of differential compression data generation software with a selection function. 制約機能付き差分圧縮データ生成ソフトの構成図である。It is a block diagram of differential compression data generation software with a restriction | limiting function. 図1のPCの処理を示す選択機能付き差分圧縮データ生成ソフトのフローチャートである。It is a flowchart of the differential compression data generation software with a selection function which shows the process of PC of FIG. 図1のPCの処理を示す制約機能付き差分圧縮データ生成ソフトのフローチャートである。It is a flowchart of the difference compression data generation software with a restriction | limiting function which shows the process of PC of FIG. 小変更の新プログラムにおけるブロック選択の概要である。It is an outline of block selection in a new program with small changes. 大きなプログラムが追加された新プログラムにおけるブロック選択の概要である。It is an outline of block selection in a new program in which a large program is added. 大きなプログラムが追加された新プログラムにおける複数の旧ブロック選択の概要である。It is the outline | summary of the several old block selection in the new program with which the big program was added. 大きなプログラムが削除された新プログラムにおける複数の旧ブロック選択の概要である。It is the outline | summary of the several old block selection in the new program from which the big program was deleted. ブロック選択のフローチャートである。It is a flowchart of block selection. 大きなプログラムが追加された新プログラムにおける複数の旧ブロック選択時のフローチャートである。It is a flowchart at the time of the some old block selection in the new program to which the big program was added. 大きなプログラムが削除された新プログラムにおける複数の旧ブロック選択時のフローチャートである。It is a flowchart at the time of the some old block selection in the new program from which the big program was deleted. 図1に示すサーバの処理を示すフローチャートである。It is a flowchart which shows the process of the server shown in FIG. 図3に示すゲートウェイの処理を示すフローチャートである。It is a flowchart which shows the process of the gateway shown in FIG. ゲートウェイが生成するフレームの構成図の一例である。It is an example of the block diagram of the flame | frame which a gateway produces | generates. 復元ソフトの構成図である。It is a block diagram of restoration software. 選択機能付き差分圧縮データ生成ソフトと制約機能付き差分圧縮データ生成ソフトに対応したECUの復元ソフトの構成である。It is the structure of the decompression | restoration software of ECU corresponding to differential compression data generation software with a selection function and differential compression data generation software with a restriction | limiting function. 選択機能付き差分圧縮データ生成ソフトに対応したECUのFLASH書込み処理フローチャートである。It is a FLASH writing process flowchart of ECU corresponding to differential compression data generation software with a selection function. 制約機能付き差分圧縮データ生成ソフトに対応したECUのFLASH書込み処理フローチャートである。It is a FLASH writing process flowchart of ECU corresponding to differential compression data generation software with a restriction | limiting function.

以下、図面を用いて本発明の実施形態による車載制御装置を含むシステムの構成及び動作を説明する。   Hereinafter, the configuration and operation of a system including an in-vehicle control device according to an embodiment of the present invention will be described with reference to the drawings.

最初に、図1を用いて、システムの全体構成を説明する。図1は、本発明の実施形態によるシステムの全体構成を示す模式図である。   First, the overall configuration of the system will be described with reference to FIG. FIG. 1 is a schematic diagram showing the overall configuration of a system according to an embodiment of the present invention.

本システムは、プログラム生成装置100、車載システム3を備える。   This system includes a program generation device 100 and an in-vehicle system 3.

プログラム生成装置100は、新プログラムと車載システム3に含まれる車載制御装置に記憶された旧プログラムからデータを生成し、生成したデータを車載システム3に送信する。なお、その詳細は、図8〜図15を用いて後述する。   The program generation device 100 generates data from the new program and the old program stored in the vehicle-mounted control device included in the vehicle-mounted system 3, and transmits the generated data to the vehicle-mounted system 3. Details thereof will be described later with reference to FIGS.

プログラム生成装置100は、PC1、サーバ2を備える。PC1は、例えば、LAN(Local Area Network)を介して、サーバ2に接続される。なお、クロスケーブルを用いて、直接PC1とサーバ2を接続してもよい。   The program generation device 100 includes a PC 1 and a server 2. The PC 1 is connected to the server 2 via, for example, a LAN (Local Area Network). Note that the PC 1 and the server 2 may be directly connected using a cross cable.

プログラム生成装置100は、無線で車載システム3と通信を行う。通信は、例えば、インターネット、携帯電話網、無線LANなどを経由して行われる。なお、図1では、図面を見やすくするため、ルータ、アクセスポイントなどの中継機器は表示していない。   The program generation device 100 communicates with the in-vehicle system 3 wirelessly. Communication is performed, for example, via the Internet, a mobile phone network, a wireless LAN, or the like. In FIG. 1, relay devices such as routers and access points are not displayed for easy viewing of the drawing.

車載システム3は、プログラム生成装置100からデータを受信し、受信したデータに基づいて、車載システム3に含まれる車載制御装置のプログラムを更新する。なお、その詳細は、図16〜図21を用いて後述する。   The in-vehicle system 3 receives data from the program generation device 100 and updates the program of the in-vehicle control device included in the in-vehicle system 3 based on the received data. Details thereof will be described later with reference to FIGS.

次に、図2を用いて、PC1の構成を説明する。図2は、図1に示すPC1の構成図である。   Next, the configuration of the PC 1 will be described with reference to FIG. FIG. 2 is a configuration diagram of the PC 1 shown in FIG.

PC1は、CPU(Central Processing Unit)などの演算装置201、キーボード及びマウスなどの入力装置202、LCD(Liquid Crystal Display)などの表示装置203、NIC(Network Interface Card)などの通信装置204、RAM(Random Access Memory)、ROM(Read Only Memory)、HDD(Hard Disk Drive)などの記憶装置205を備える。演算装置201、入力装置202、表示装置203、通信装置204は、バスに接続されている。   The PC 1 includes an arithmetic device 201 such as a CPU (Central Processing Unit), an input device 202 such as a keyboard and a mouse, a display device 203 such as an LCD (Liquid Crystal Display), a communication device 204 such as a NIC (Network Interface Card), a RAM ( A storage device 205 such as a random access memory (ROM), a read only memory (ROM), or a hard disk drive (HDD) is provided. The arithmetic device 201, the input device 202, the display device 203, and the communication device 204 are connected to a bus.

記憶装置205は、車載システム3に含まれる車載制御装置のフラッシュメモリに記憶されたプログラムと同じ旧プログラム及び旧プログラムを更新した新プログラムを記憶している。   The storage device 205 stores the same old program as the program stored in the flash memory of the in-vehicle control device included in the in-vehicle system 3 and a new program obtained by updating the old program.

なお、図1に示したサーバ2の構成もPC1の構成と同様である。すなわち、サーバ2は、演算装置201S、入力装置202S、表示装置203S、通信装置204S、記憶装置205Sを備える。   The configuration of the server 2 shown in FIG. 1 is the same as that of the PC 1. That is, the server 2 includes an arithmetic device 201S, an input device 202S, a display device 203S, a communication device 204S, and a storage device 205S.

次に、図3を用いて、車載システム3の構成を説明する。図3は、図1に示す車載システム3の構成図である。   Next, the configuration of the in-vehicle system 3 will be described with reference to FIG. FIG. 3 is a configuration diagram of the in-vehicle system 3 shown in FIG.

車載システム3は、1つのゲートウェイ310(プログラム書き込み装置)、複数のECU300(300〜300)を備える。ゲートウェイ310及びECU300は、相互に車載ネットワークCANを介して通信する。The in-vehicle system 3 includes one gateway 310 (program writing device) and a plurality of ECUs 300 (300 1 to 300 n ). The gateway 310 and the ECU 300 communicate with each other via the in-vehicle network CAN.

ゲートウェイ310は、認証が成功した場合、車両の外部のネットワークと車両の内部のCANの間でデータを中継する。   When the authentication is successful, the gateway 310 relays data between the network outside the vehicle and the CAN inside the vehicle.

ECU300は、マイコン301、ECU300毎の用途に応じた各種のIC(Integrated Circuit)304、CANトランシーバなどの通信装置305を備える。マイコン301は、SRAM302(揮発性メモリ)、FLASHメモリ303(不揮発性メモリ)を内蔵する。   The ECU 300 includes a communication device 305 such as a microcomputer 301, various ICs (Integrated Circuits) 304 corresponding to each ECU 300, and a CAN transceiver. The microcomputer 301 includes an SRAM 302 (volatile memory) and a FLASH memory 303 (nonvolatile memory).

なお、ゲートウェイ310の構成もECU300の構成と基本的に同じであるが、車両の外部のネットワークのプロトコルに応じた通信装置をさらに備える。すなわち、ゲートウェイ310は、マイコン311、各種のIC314、CANトランシーバなどの通信装置315、車両の外部のネットワークのプロトコルに応じた通信装置316を備える。マイコン311は、SRAM312、FLASHメモリ313を内蔵する。   The configuration of gateway 310 is basically the same as the configuration of ECU 300, but further includes a communication device according to a network protocol outside the vehicle. In other words, the gateway 310 includes a microcomputer 311, various ICs 314, a communication device 315 such as a CAN transceiver, and a communication device 316 according to a network protocol outside the vehicle. The microcomputer 311 includes an SRAM 312 and a FLASH memory 313.

次に、図4を用いて、ECU300のSRAM302の構成を説明する。図4は、図3に示すSRAM302の内部の構成を示す模式図である。   Next, the configuration of the SRAM 302 of the ECU 300 will be described with reference to FIG. FIG. 4 is a schematic diagram showing an internal configuration of the SRAM 302 shown in FIG.

SRAM302は、データを一時的に記憶するための第1の領域302a、第1の領域302aに記憶されたデータを復元するための第2の領域302bを備える。   The SRAM 302 includes a first area 302a for temporarily storing data and a second area 302b for restoring the data stored in the first area 302a.

本実施形態では、一例として、SRAM302のサイズは96kBであり、第1の領域302aのサイズは16kBであり、第2の領域302bのサイズは64kBである。   In the present embodiment, as an example, the size of the SRAM 302 is 96 kB, the size of the first region 302a is 16 kB, and the size of the second region 302b is 64 kB.

次に、図5を用いて、FLASHメモリ303の構成を説明する。図5は、図3に示すFLASHメモリ303の内部の構成を示す模式図である。   Next, the configuration of the FLASH memory 303 will be described with reference to FIG. FIG. 5 is a schematic diagram showing an internal configuration of the FLASH memory 303 shown in FIG.

FLASHメモリ303は、複数のサイズのブロックから構成される。本実施形態では、一例として、FLASHメモリ303のサイズは2MBである。FLASHメモリ303は、8kB、64kBの2種類のブロックから構成される。ここで、ブロックとは、データを消去する最小単位である。例えば、8kBのブロックに4kBのデータを書き込む場合、8kBのデータを消去してから4kBのデータを書き込む。   The FLASH memory 303 is composed of blocks of a plurality of sizes. In the present embodiment, as an example, the size of the FLASH memory 303 is 2 MB. The FLASH memory 303 is composed of two types of blocks of 8 kB and 64 kB. Here, the block is a minimum unit for erasing data. For example, when 4 kB data is written in an 8 kB block, 4 kB data is written after erasing 8 kB data.

図5に示すように、FLASHメモリ303では、8kB、8kB、64kB、64kB、64kB、64kB、64kBのブロックにわたって旧プログラムが記憶されている。   As shown in FIG. 5, the FLASH memory 303 stores old programs over 8 kB, 8 kB, 64 kB, 64 kB, 64 kB, 64 kB, and 64 kB blocks.

また、FLASHメモリ303は、SRAM302の第1の領域302aに一時的に記憶されたデータの種類に応じて、第1の領域302aのデータと既にFLASHメモリ303に存在する旧プログラムからSRAM302の第2の領域302bに新プログラムを復元したり、第1の領域302aの圧縮データを伸長して新プログラムを復元することができる、いわゆる復元ソフトを記憶している。   Further, the FLASH memory 303 is configured so that the data in the first area 302a and the old program already existing in the FLASH memory 303 are stored in the second area of the SRAM 302 according to the type of data temporarily stored in the first area 302a of the SRAM 302. In this area 302b, so-called restoration software that can restore the new program or decompress the compressed data in the first area 302a to restore the new program is stored.

次に、図6を用いて、差分圧縮データ生成ソフトの概要を説明する。なお、PC1の演算装置201は、差分圧縮データ生成ソフト600を実行することにより、以下の処理を実行する。   Next, the outline of the differential compression data generation software will be described with reference to FIG. Note that the computing device 201 of the PC 1 executes the following processing by executing the differential compressed data generation software 600.

演算装置201(差分圧縮データ生成ソフト600)は、旧プログラム610と新プログラム620を入力として差分データ630を生成する。差分生成部601は旧プログラムと新プログラムの差分を生成し、圧縮部602はその差分を圧縮して差分圧縮データ630を生成する。このように差分圧縮生成ソフト600は、単に差分を生成するだけではなく、圧縮してより小さな差分圧縮データを生成する。   The arithmetic unit 201 (difference compressed data generation software 600) generates the difference data 630 with the old program 610 and the new program 620 as inputs. The difference generation unit 601 generates a difference between the old program and the new program, and the compression unit 602 compresses the difference to generate differential compressed data 630. As described above, the differential compression generation software 600 not only generates a difference but also generates smaller differential compression data by compression.

次に、図7を用いて、圧縮データ生成ソフトの概要を説明する。なお、PC1の演算装置201は、圧縮データ生成ソフト700を実行することにより、以下の処理を実行する。   Next, an outline of the compressed data generation software will be described with reference to FIG. Note that the computing device 201 of the PC 1 executes the following processing by executing the compressed data generation software 700.

演算装置201(圧縮データ生成ソフト700)は、新プログラム620を入力として圧縮データ730を生成する。圧縮部701はプログラムを圧縮する機能をもつ。このように圧縮データ生成ソフトは、単純に入力プログラムを圧縮して圧縮データを生成する動作を行っている。   The arithmetic device 201 (compressed data generation software 700) receives the new program 620 as input and generates compressed data 730. The compression unit 701 has a function of compressing a program. Thus, the compressed data generation software performs an operation of simply compressing the input program and generating compressed data.

次に図8を用いて、本発明の1つである選択機能付き差分圧縮データ生成ソフト800を説明する。   Next, the differential compression data generation software 800 with a selection function, which is one of the present invention, will be described with reference to FIG.

一般に新旧プログラムの差分圧縮データと新プログラムの圧縮データのサイズを比較すると、差分圧縮データのほうが小さくなる。これは、差分圧縮データのほうが旧プログラムの情報を活用できるので、よりコンパクトにすることができるためである。しかしながら、新旧プログラムが全く異なるプログラムである場合には、逆に異なる部分が多すぎるため差分が大きくなりすぎて圧縮データの方が小さくなることがある。さらに、旧プログラムがECU300内のFLASHメモリに記憶されていない場合(最初の書込みの場合)、差分圧縮データを生成することができない。   In general, when the size of the differential compressed data of the old and new programs is compared with the size of the compressed data of the new program, the differential compressed data is smaller. This is because the differentially compressed data can utilize the information of the old program and can be made more compact. However, when the old and new programs are completely different programs, there are too many different parts, and the difference becomes too large and the compressed data may become smaller. Further, if the old program is not stored in the FLASH memory in the ECU 300 (in the case of the first writing), the differentially compressed data cannot be generated.

そこでこの点に着目して発明した図8の選択機能付き差分圧縮データ生成ソフト800の構成とその動作を説明する。選択機能付き差分圧縮データ生成ソフト800は、差分生成部810と圧縮部820に加えて、入力判定部830と選択部840を追加した構成である。すなわち、入力判定部830は、旧プログラム610と新プログラム620が入力なのか、新プログラム620だけが入力なのか判定831で判定する。旧プログラム610と新プログラム620が存在する場合(831:YES)、差分生成部810により差分を生成し、圧縮部820で差分を圧縮した差分圧縮データ841を生成して選択部840へ渡す。   Therefore, the configuration and operation of the differential compression data generation software 800 with a selection function invented in FIG. The differential compression data generation software 800 with a selection function has a configuration in which an input determination unit 830 and a selection unit 840 are added to the difference generation unit 810 and the compression unit 820. That is, the input determination unit 830 determines whether the old program 610 and the new program 620 are input or only the new program 620 is input in a determination 831. When the old program 610 and the new program 620 exist (831: YES), a difference is generated by the difference generation unit 810, and differential compressed data 841 obtained by compressing the difference by the compression unit 820 is generated and passed to the selection unit 840.

選択部840は判定842において差分圧縮データ841のサイズが基準値(閾値)以下であれば(842:YES)、差分圧縮データ841を出力データ850として出力する。もし基準値より大きいのであれば(842:NO),圧縮部820へ815を経由して新プログラム620を圧縮する指示を行う。圧縮部820は圧縮データ843を生成し、選択部840に一時的に保持する。選択部840は選択手段844により差分圧縮データ841と圧縮データ843のサイズの小さな方を選択して出力データ850へ出力する。   If the size of the differential compression data 841 is equal to or smaller than the reference value (threshold) in the determination 842 (842: YES), the selection unit 840 outputs the differential compression data 841 as the output data 850. If it is larger than the reference value (842: NO), the compression unit 820 is instructed to compress the new program 620 via 815. The compression unit 820 generates compressed data 843 and temporarily holds it in the selection unit 840. The selection unit 840 uses the selection unit 844 to select the smaller of the difference compressed data 841 and the compressed data 843 and outputs the selected data to the output data 850.

この結果、より小さな差分圧縮データまたは圧縮データを得ることができる。一方入力判定部830の判定831でNOの場合は815を経由して新プログラム620を圧縮部820へ渡し、圧縮データ843を生成する。選択部840は選択手段844で圧縮データ843を選択して出力データ850へ出力する。   As a result, smaller differential compressed data or compressed data can be obtained. On the other hand, if the determination 831 of the input determination unit 830 is NO, the new program 620 is passed to the compression unit 820 via 815 to generate compressed data 843. The selection unit 840 uses the selection unit 844 to select the compressed data 843 and output it to the output data 850.

このように、選択機能付き差分圧縮データ生成ソフト800は、差分圧縮データ生成ソフト600よりも小さなサイズの出力データを生成することができる。さらに旧プログラムが存在しない場合でも新プログラムを圧縮して出力することができる。ただし、もう少し簡略化した構成も考えられる。例えば843の圧縮データを生成した場合、選択手段844によるサイズ比較は行わずに圧縮データ843を出力データ850としても良い。これは判定842において既に差分圧縮データは基準値以上と判断しているので選択手段844は不要と考えることができるからである。また、入力となる新プログラムは、複数のブロックに分割された1つのブロックにおける新プログラム、旧プログラムは複数のブロックに分割されたいくつかのブロックにおける旧プログラムでも良い。   As described above, the differential compressed data generation software 800 with a selection function can generate output data having a smaller size than the differential compressed data generation software 600. Furthermore, even when the old program does not exist, the new program can be compressed and output. However, a slightly simplified configuration is also conceivable. For example, when compressed data 843 is generated, the compressed data 843 may be used as the output data 850 without performing size comparison by the selection unit 844. This is because the determination unit 844 can be considered unnecessary because the difference compressed data is already determined to be equal to or greater than the reference value in the determination 842. The new program to be input may be a new program in one block divided into a plurality of blocks, and the old program may be an old program in several blocks divided into a plurality of blocks.

次に図9を用いて、本発明の1つである制約機能付き差分圧縮データ生成ソフト900の構成とその動作を説明する。   Next, with reference to FIG. 9, the configuration and operation of differential compression data generation software 900 with a restriction function, which is one of the present invention, will be described.

最初に制約機能の必要性を説明する。差分圧縮データや圧縮データは、ECU300へ送信されると、ECU300の第1の領域302aに受信される。しかしながら差分圧縮データや圧縮データが第1の領域302aよりも大きいサイズであれば、そのデータを全て受信することができず、結果として復元することができない。これが制約の必要性である。   First, the necessity of the constraint function will be explained. When the differential compressed data and the compressed data are transmitted to the ECU 300, the differential compressed data and the compressed data are received by the first region 302a of the ECU 300. However, if the differentially compressed data or the compressed data has a size larger than that of the first area 302a, it is not possible to receive all of the data, and as a result, it cannot be restored. This is the need for constraints.

そこで制約機能付き差分圧縮データ生成ソフト900は、入力判定部910と差分生成部950と圧縮部960と選択部970に加えて制約部980を付加した構成である。以下処理動作を説明する。入力には、ECU300の第1の領域サイズ1S(925)があり制約部980で使用する情報である。   Therefore, the differential compressed data generation software 900 with a constraint function has a configuration in which a constraint unit 980 is added in addition to the input determination unit 910, the difference generation unit 950, the compression unit 960, and the selection unit 970. The processing operation will be described below. The input includes the first area size 1S (925) of the ECU 300 and is information used by the restriction unit 980.

まず、入力判定部910は、旧プログラム610と新プログラム620が入力されているか、新プログラム620だけが入力されているかを判定911で判定を行い、旧プログラム610と新プログラム620が存在すれば(911:YES)、差分生成部950は差分を生成し、圧縮部960は差分を圧縮した差分圧縮データ971を生成する。選択部970は判定972において差分圧縮データサイズが基準値以下であれば制約部980へ差分圧縮データ971を選択データ981として渡す。   First, the input determination unit 910 determines whether the old program 610 and the new program 620 are input or only the new program 620 is input in the determination 911, and if the old program 610 and the new program 620 exist ( 911: YES), the difference generation unit 950 generates a difference, and the compression unit 960 generates difference compressed data 971 obtained by compressing the difference. If the difference compressed data size is equal to or smaller than the reference value in determination 972, the selection unit 970 passes the difference compressed data 971 as selection data 981 to the constraint unit 980.

もし差分圧縮データ971のサイズが基準値より大きいのであれば(972:NO)、圧縮部960へ915を経由して新プログラム620を圧縮する指示を行う。圧縮部960は新プログラム620を圧縮して圧縮データ973を生成する。選択部970の選択手段974は差分圧縮データ971と圧縮データ973のサイズの小さな方を選択データ981として制約部980へ渡す。   If the size of the differentially compressed data 971 is larger than the reference value (972: NO), the compression unit 960 is instructed to compress the new program 620 via 915. The compression unit 960 compresses the new program 620 and generates compressed data 973. The selection unit 974 of the selection unit 970 passes the smaller of the difference compressed data 971 and the compressed data 973 as selection data 981 to the restriction unit 980.

制約部980は制約手段982において選択データ981のサイズ(SS)と第1の領域サイズ(1S)を比較し、選択データ981の方が小さければ(SS≦1S),選択データ981を出力データ930として出力する。ここで選択データ981は差分圧縮データ971または圧縮データ973のいずれかとなる。一方選択データ981のサイズ(SS)が第1の領域サイズ(1S)よりも大きければ(SS>1S),出力データ930は新プログラムそのものとなる。   The restriction unit 980 compares the size (SS) of the selection data 981 with the first area size (1S) in the restriction means 982, and if the selection data 981 is smaller (SS ≦ 1S), the selection data 981 is output to the output data 930. Output as. Here, the selection data 981 is either the differential compressed data 971 or the compressed data 973. On the other hand, if the size (SS) of the selection data 981 is larger than the first area size (1S) (SS> 1S), the output data 930 becomes the new program itself.

新プログラムであれば、FLASHメモリの当該のブロックを消去した後に第1の領域へ分割送信して当該ブロックへ複数回に分けて書込むことができる。   In the case of a new program, after erasing the block in the FLASH memory, it can be divided and transmitted to the first area and written to the block in multiple times.

次にPC1が図8の選択機能付き差分圧縮データ生成ソフト800を用いて差分圧縮データまたは圧縮データを生成し、サーバ2へ送信するまでのフローチャートを図10を用いて説明する。   Next, a flowchart until the PC 1 generates differential compressed data or compressed data using the differential compressed data generation software 800 with a selection function shown in FIG. 8 and transmits it to the server 2 will be described with reference to FIG.

基本的な考え方は、旧プログラムと新プログラム全体に対して差分圧縮データや圧縮データを生成するのでは無く、新旧プログラムを複数のブロックに分割し、1つのブロックに配置されている新プログラムとECU300のFLASHメモリ303の1つまたは複数のブロックに配置されている旧プログラムの差分圧縮データまたは圧縮データを生成する点にある。   The basic idea is not to generate differential compressed data or compressed data for the old program and the entire new program, but to divide the old and new programs into a plurality of blocks and the ECU 300 and the new program arranged in one block. In other words, differential compressed data or compressed data of an old program arranged in one or a plurality of blocks of the FLASH memory 303 is generated.

PC1の演算装置201は、まずステップS10で旧プログラムが存在するかチェックする。存在しない場合は(S10:NO)、ステップS40で新プログラムをECU300のFLASHメモリ303のブロックB(J)(J=1,2、・・・、N)のサイズに分割する。ステップS45でブロックB(J)を選択して、ステップS60まで繰返し処理を行う。ステップS50で選択機能付き差分圧縮データ生成ソフト800を用いて、選択したブロックB(J)の新プログラムを圧縮して圧縮データを生成する。また圧縮データのサイズも記憶しておく。   The computing device 201 of the PC 1 first checks in step S10 whether an old program exists. If it does not exist (S10: NO), the new program is divided into blocks B (J) (J = 1, 2,..., N) of the FLASH memory 303 of the ECU 300 in step S40. In step S45, block B (J) is selected, and the process is repeated until step S60. In step S50, the compressed data is generated by compressing the new program of the selected block B (J) using the differential compression data generation software 800 with a selection function. The size of the compressed data is also stored.

次にステップS55でB(J)の圧縮データをサーバ2へ送信する。ステップS60で全てのブロックを処理完了したかチェックし、J=Nならば(S60:YES)処理を終了する。J≠NならばJ=J+1としてステップS45へ戻り、繰返し実行する。   In step S55, the compressed data B (J) is transmitted to the server 2. In step S60, it is checked whether all blocks have been processed. If J = N (S60: YES), the process ends. If J.noteq.N, then J = J + 1 and return to step S45 to execute repeatedly.

ステップS10で旧プログラムが存在する場合は(S10:YES)、ステップS15でECU300のFLASHメモリ303のブロックB(I)(I=1、2、…、N)のサイズ毎に新プログラム及び旧プログラムを分割する。ここで、PC1の記憶装置205は、ECU300のFLASHメモリ303のブロックB(I)毎のサイズ、ブロックB(I)のアドレス、及びECU300のID(識別子)を記憶している。   If an old program exists in step S10 (S10: YES), a new program and an old program are determined for each block B (I) (I = 1, 2,..., N) size in the FLASH memory 303 of the ECU 300 in step S15. Split. Here, the storage device 205 of the PC 1 stores the size of each block B (I) of the FLASH memory 303 of the ECU 300, the address of the block B (I), and the ID (identifier) of the ECU 300.

PC1の演算装置201は、ブロックB(I)に関するループの初期設定(I=1)を行う(ステップS20)。PC1の演算装置201はステップS25でブロックB(I)の新プログラムとI個のブロックB(I)、B(I−1),B(I−2),・・・、B(1)の旧プログラムを入力して選択機能付き差分圧縮データ生成ソフト800を実行する。この結果、ブロックB(I)の差分圧縮データまたは圧縮データが生成される。またそのサイズも記憶しておく。次にステップS30でブロックB(I)の差分圧縮データまたは圧縮データをサーバ2へ送信する。次にステップS35で全てのブロックを処理したかチェックしI=Nならば終了する。I≠NならばI=I+1にしてステップS20へ戻り、繰返し実行する。   The computing device 201 of the PC 1 performs initial setting (I = 1) of the loop relating to the block B (I) (step S20). In step S25, the computing device 201 of the PC 1 stores the new program of the block B (I) and the I blocks B (I), B (I-1), B (I-2), ..., B (1). The old program is input and the differential compression data generation software 800 with a selection function is executed. As a result, differential compressed data or compressed data of block B (I) is generated. The size is also stored. In step S30, the differential compressed data or compressed data of block B (I) is transmitted to the server 2. In step S35, it is checked whether all blocks have been processed. If I = N, the process ends. If I ≠ N, set I = I + 1, return to step S20, and execute repeatedly.

以上でECU300のFLASHメモリ303のブロックサイズ毎に差分圧縮データまたは圧縮データ、そのデータサイズ、ブロックのサイズ、ブロックのアドレスをサーバ2へ送信できた。   As described above, the differential compressed data or the compressed data, the data size, the block size, and the block address can be transmitted to the server 2 for each block size of the FLASH memory 303 of the ECU 300.

次にもう1つの発明であるPC1が図9の制約機能付き差分圧縮データ生成ソフト900を用いて差分圧縮データまたは圧縮データまたは新プログラムそのものをサーバ2へ送信するまでのフローチャートを図11を用いて説明する。同様に基本的な考え方は、新旧プログラム全体の差分圧縮データや圧縮データを生成するのでは無く、新旧プログラムを複数のブロックに分割し、1つのブロックに配置されている新プログラムとECU300のFLASHメモリ303の1つまたは複数のブロックに配置されている旧プログラムの差分圧縮データまたは圧縮データを生成する点にある。   Next, FIG. 11 shows a flowchart until the PC 1 according to another invention transmits the differential compressed data, the compressed data, or the new program itself to the server 2 using the differential compressed data generation software 900 with the restriction function shown in FIG. explain. Similarly, the basic idea is not to generate differentially compressed data or compressed data of the entire old and new programs, but to divide the old and new programs into a plurality of blocks, and the new program arranged in one block and the flash memory of the ECU 300 The point is that differential compressed data or compressed data of the old program arranged in one or a plurality of blocks 303 is generated.

PC1の演算装置201は、ステップS70で旧プログラムが存在するかチェックする。存在しない場合は(S70:NO),ステップS100以降の処理で新プログラムをブロックに分割して圧縮データまたは新プログラムそのものをサーバ2へ送信する処理を行う。   The computing device 201 of the PC 1 checks whether an old program exists in step S70. If it does not exist (S70: NO), a process of transmitting the compressed data or the new program itself to the server 2 by dividing the new program into blocks in the processes after step S100 is performed.

まずステップS100で新プログラムをECU300のFLASHメモリ303のブロックB(J)(J=1,2、・・・、N)のサイズに分割する。ステップS105でブロックB(J)を選択して、ステップS120まで繰返し処理を行う。ステップS110において選択したブロックB(J)の新プログラムと第1の領域サイズ1S(図9の925)を入力して制約機能付き差分圧縮データ生成ソフト900を実行する。   First, in step S100, the new program is divided into blocks B (J) (J = 1, 2,..., N) in the FLASH memory 303 of the ECU 300. In step S105, the block B (J) is selected, and the process is repeated until step S120. The new program of the block B (J) selected in step S110 and the first area size 1S (925 in FIG. 9) are input to execute the differential compressed data generation software 900 with a restriction function.

この結果、ブロックB(J)の圧縮データまたは新プログラムそのものが出力される。またそのデータサイズも記憶しておく。次のステップS115においてB(J)の圧縮データまたは新プログラムそのものをサーバ2へ送信する。ステップS120で全てのブロックを処理完了したかチェックし、J=Nならば(S120:YES)、処理を終了する。J≠NならばJ=J+1としてステップS105へ戻り、繰返し実行する。   As a result, the compressed data of the block B (J) or the new program itself is output. The data size is also stored. In the next step S115, the compressed data of B (J) or the new program itself is transmitted to the server 2. In step S120, it is checked whether all the blocks have been processed. If J = N (S120: YES), the process ends. If J ≠ N, J = J + 1 and return to step S105 to execute repeatedly.

ステップS70で旧プログラムが存在する場合は(S70:YES)、ステップS75でECU300のFLASHメモリ303のブロックB(I)(I=1、2、…、N)のサイズ毎に新プログラムと旧プログラムを分割する。ここで、PC1の記憶装置205は、ECU300のFLASHメモリ303のブロックB(I)毎のサイズ、ブロックB(I)のアドレス、及びECU300のID(識別子)を記憶している。PC1の演算装置101は、ブロックB(I)に関するループの初期設定(I=1)を行う(ステップS80)。   If an old program exists in step S70 (S70: YES), a new program and an old program are determined for each block B (I) (I = 1, 2,..., N) size in the FLASH memory 303 of the ECU 300 in step S75. Split. Here, the storage device 205 of the PC 1 stores the size of each block B (I) of the FLASH memory 303 of the ECU 300, the address of the block B (I), and the ID (identifier) of the ECU 300. The computing device 101 of the PC 1 performs initial setting (I = 1) of the loop relating to the block B (I) (step S80).

PC1の演算装置201はステップS85においてブロックB(I)に配置されている新プログラムとI個のブロックB(I)、B(I−1),B(I−2),・・・、B(1)に配置されている旧プログラムと第1の領域サイズ1S(図9の925)を入力して制約機能付き差分圧縮データ生成ソフト900を実行する。この結果、B(I)の差分圧縮データまたは圧縮データまたは新プログラムそのものが出力されるので、ステップS90においてサーバ2へ送信する。次にステップS95で全てのブロックB(I)(I=1〜N)を処理したかチェックしI=Nならば終了する。I≠NならばI=I+1としてステップS80へ戻り、繰返し実行する。   The computing device 201 of the PC 1 determines that the new program and I blocks B (I), B (I-1), B (I-2),. The old program arranged in (1) and the first area size 1S (925 in FIG. 9) are input to execute the differential compressed data generation software 900 with a restriction function. As a result, differential compressed data or compressed data of B (I) or the new program itself is output, and is transmitted to the server 2 in step S90. In step S95, it is checked whether all blocks B (I) (I = 1 to N) have been processed. If I = N, the process ends. If I.noteq.N, then I = I + 1 and return to step S80 to execute repeatedly.

以上でECU300のFLASHメモリ303のブロックサイズ毎に差分圧縮データまたは圧縮データまたは新プログラム、そのデータサイズ、ブロックのサイズ、ブロックのアドレスをサーバ2へ送信できた。   As described above, the differential compressed data, the compressed data, or the new program, the data size, the block size, and the block address can be transmitted to the server 2 for each block size of the FLASH memory 303 of the ECU 300.

以上述べた図10、図11のPC1の処理フローは、新旧プログラムをECU300のFLASHメモリの同一ブロックB(I)単位に分割して、分割された1つのブロックに配置されている新プログラムと複数のブロックに配置されている旧ブログラムから差分圧縮データを作成した。この理由を図12、図13、図13A,図13Bを用いて説明する。   The processing flow of the PC 1 in FIG. 10 and FIG. 11 described above divides the old and new programs into the same block B (I) unit of the FLASH memory of the ECU 300, and a plurality of new programs and multiple programs arranged in one divided block. The differential compression data was created from the old program placed in this block. The reason for this will be described with reference to FIGS. 12, 13, 13A, and 13B.

図12のOL10は旧プログラムをECUのFLASHメモリのブロックB(1)〜B(7)に分割した構成を示している。一方、N10は新プログラムをECUのFLASHメモリのブロックB(1)〜B(7)に分割した構成を示している。新プログラムにおけるV10は追加・変更された箇所である。すなわち旧プログラムを追加・変更した部分である。   OL10 in FIG. 12 shows a configuration in which the old program is divided into blocks B (1) to B (7) of the FLASH memory of the ECU. On the other hand, N10 indicates a configuration in which the new program is divided into blocks B (1) to B (7) of the FLASH memory of the ECU. V10 in the new program is an added / changed part. That is, it is the part where the old program is added or changed.

一方R10,R20,R30はV10の追加・変更に伴い、V10内の変数への参照アドレスが変更されたマイコンの命令列を示している。すなわちV10の追加・変更により変数のアドレスが変更されたため、これに伴い、これまでの変数のアドレスも変更されるので、同時にR10〜R30の参照アドレスも変更となる。このため、新プログラムN10のブロックB(3)はV10による追加・変更、ブロックB(5)はR10とR20による変更、ブロックB(6)はR30による変更が発生している。   On the other hand, R10, R20, and R30 indicate the instruction sequence of the microcomputer in which the reference address to the variable in V10 is changed with the addition / change of V10. That is, since the address of the variable is changed by adding / changing V10, the address of the variable so far is also changed accordingly, so the reference addresses of R10 to R30 are also changed at the same time. For this reason, the block B (3) of the new program N10 is added or changed by V10, the block B (5) is changed by R10 and R20, and the block B (6) is changed by R30.

ここで注目すべきは本当の変更はV10の1箇所だけであり、R10〜R30の変更は、V10の変更に伴う副次的な変更が発生しているにもかかわらず、新プログラム全体から見ると、あまり大きな変更では無いという点である。従って、このような小変更の場合には、新旧プログラムを同一のブロックB(I)単位に差分圧縮データを生成しても、そのデータサイズは基準値以下になることが多い。   It should be noted here that the only real change is V10, and the changes of R10 to R30 are seen from the whole new program despite the occurrence of secondary changes accompanying the change of V10. That is not a very big change. Therefore, in the case of such a small change, even if the old and new programs generate differentially compressed data in the same block B (I) unit, the data size is often below the reference value.

このため、ソフト不良などを原因とするプログラム更新を行う場合には、新旧プログラムをブロックに分割し、同一ブロック同志で差分圧縮データを生成しても十分小さな差分圧縮データを得ることができる。   For this reason, when updating a program due to a software defect or the like, sufficiently small difference compressed data can be obtained even if the old and new programs are divided into blocks and the difference compressed data is generated between the same blocks.

一方、図13は旧プログラムOL20と大きな変更が存在する新プログラムN20を示した図である。ここでN20のB(4)には、大きな追加変更部分AD10がある。R100,R110,R120,R130、R140,R150は、AD10の追加・変更に伴う参照変数のアドレス変更を示している。ここでN20のブロックB(3)の新プログラムは変更箇所が無いため旧プログラムOL20のB(3)と同一であるが、N20のブロックB(4)の新プログラムはOL20のブロックB(4)の旧プログラムとは当然ながら全く異なる。   On the other hand, FIG. 13 is a diagram showing an old program OL20 and a new program N20 in which significant changes exist. Here, B (4) of N20 has a large additional change portion AD10. R100, R110, R120, R130, R140, and R150 indicate the address change of the reference variable accompanying the addition / change of AD10. Here, the new program of block B (3) of N20 is the same as B (3) of old program OL20 because there is no change, but the new program of block B (4) of N20 is block B (4) of OL20. Naturally, it is completely different from the old program.

次のN20のブロックB(5)の新プログラムは、OL20のブロックB(5)の旧プログラムとは大きく異なり、OL20のブロックB(4)の旧プログラムと類似していることが多い。これはAD10の追加によりOL20のB(4)の旧プログラムがN20のB(5)の新プログラム部分へ移動したためと考えられる。従って、差分圧縮データを生成するに最適なブロックの選択方法は、単に同一ブロック間で行えば良いということでは無いことがわかる。   The next new program of block B (5) of N20 is very different from the old program of block B (5) of OL20 and is often similar to the old program of block B (4) of OL20. This is thought to be because the old program of B (4) of OL20 has moved to the new program part of B (5) of N20 due to the addition of AD10. Therefore, it can be understood that the optimum block selection method for generating differentially compressed data is not simply performed between the same blocks.

ここで、図13のCP100はB(3)の新旧プログラム同志で差分圧縮データを生成した方が良いことを示している。一方、図13のCP110は、B(5)の新プログラムはB(4)の旧プログラムと類似していることを示しており、図13のCP120は、B(6)の新プログラムはB(5)の旧プログラムと類似していることを示している。結果として、B(4)の旧プログラムとB(5)の新プログラムで差分圧縮データを生成し、B(5)の旧プログラムとB(6)の新プログラムで差分圧縮データを生成した方が差分圧縮データサイズを小さくできることを示している。   Here, CP 100 in FIG. 13 indicates that it is better to generate differentially compressed data between old and new programs of B (3). On the other hand, CP110 in FIG. 13 shows that the new program of B (5) is similar to the old program of B (4), and CP120 in FIG. It shows that it is similar to the old program of 5). As a result, the difference compressed data is generated by the old program of B (4) and the new program of B (5), and the difference compressed data is generated by the old program of B (5) and the new program of B (6). It shows that the differential compression data size can be reduced.

以上述べたように、ブロックB(K)(K=1〜N)の新プログラムに最適なブロックB(I)の旧プログラムを選択する概要を詳細に説明した。   As described above, the outline of selecting the old program of the block B (I) most suitable for the new program of the block B (K) (K = 1 to N) has been described in detail.

しかし、新プログラムのブロック(K)に最適な旧ブロックB(I)を1つだけ選択する概要について説明したが、旧ブロックB(I)は複数個でも良い。   However, although the outline of selecting only one old block B (I) optimal for the block (K) of the new program has been described, a plurality of old blocks B (I) may be provided.

図13Aは、新プログラムN20に大きなプログラムが追加された場合に、新ブロックB(K)にとって最適な複数の旧ブロックB(I)(I=1〜K)を選択する概要を説明した図である。すなわち新ブロックB(4)に大きなプログラムAD10が追加されると、新ブロックB(5)に対応する旧ブロックはB(4)が最適であると既に説明したが、逆に言えば旧ブロックB(4)を含む複数の旧ブロックB(1)〜B(4)を選択すれば良い。   FIG. 13A is a diagram illustrating an outline of selecting a plurality of old blocks B (I) (I = 1 to K) that are optimal for the new block B (K) when a large program is added to the new program N20. is there. That is, when a large program AD10 is added to the new block B (4), the old block corresponding to the new block B (5) has already been described as being optimal for B (4). A plurality of old blocks B (1) to B (4) including (4) may be selected.

一般に差分生成アルゴリズムは旧ブロックにおける類似のバイナリーコードを見つけ出し、差分を生成するので、より大きな旧プログラムの方が、より小さな差分を生成できるからである。従って、新ブロックB(6)に最適な複数の旧ブロックは図13AのCP100Aで指示されているB(1)〜B(6)の6個の旧ブロックであり、新ブロックB(5)に最適な複数の旧ブロックは図13AのCP110Aで指示されているB(1)〜B(5)であり、新ブロックB(4)に最適な複数の旧ブロックは図13AのCP120Aで指示されているB(1)〜B(4)である。   This is because, generally, the difference generation algorithm finds similar binary code in the old block and generates a difference, so that a larger old program can generate a smaller difference. Therefore, the plurality of old blocks most suitable for the new block B (6) are the six old blocks B (1) to B (6) designated by the CP 100A in FIG. 13A, and the new block B (5) The most suitable old blocks are B (1) to B (5) indicated by CP 110A in FIG. 13A, and the most suitable old blocks for new block B (4) are indicated by CP 120A in FIG. 13A. B (1) to B (4).

このように、大きなプログラムが追加された場合は、ブロックの番号の大きな順に差分圧縮データを生成すること、新プログラムのブロックに対応した複数の旧ブロックの選択は当該ブロックから小さい番号のブロックの順に複数個選択することが重要である。このように旧プログラムのブロックを選択すれば、ブロックを新プログラムへ書き換えたとしても、復元で使用する旧プログラムを選択することが可能となる。   As described above, when a large program is added, differentially compressed data is generated in descending order of the block number, and selection of a plurality of old blocks corresponding to the block of the new program is performed in the order of the block having the smallest number from that block. It is important to select a plurality. If the block of the old program is selected in this way, it is possible to select the old program to be used for restoration even if the block is rewritten to the new program.

図13Bは、旧プログラムOL20から大きなプログラムが削除された場合に、新プログラムのブロックB(K)にとって最適な旧プログラムの複数のブロックB(I)(I=N〜K)を選択する概要を説明した図である。   FIG. 13B shows an outline of selecting a plurality of blocks B (I) (I = N to K) of the old program that are most suitable for the block B (K) of the new program when a large program is deleted from the old program OL20. FIG.

新プログラムN20のブロックB(4)は、大きなプログラムAD10Bが削除されたことを示している。この結果、その内容は旧プログラムOL20のブロックB(5)の内容に近いものであることを示した図である。この結果、N20のブロックB(5)はOL20のブロックはB(6)が最適であると考えられる。従って、N20のブロックB(5)に最適な旧プログラムのブロックは、OL20のブロックB(6)を含む複数のブロックB(5)〜B(7)を選択すれば良い。一般に差分生成アルゴリズムは旧プログラムにおける類似のバイナリーコードを見つけ出し、差分を生成するので、より大きな旧プログラムの方が、より小さな差分を生成できるからである。   Block B (4) of the new program N20 indicates that the large program AD10B has been deleted. As a result, it is shown that the content is close to the content of the block B (5) of the old program OL20. As a result, it is considered that the N20 block B (5) is the optimal OL20 block B (6). Therefore, the blocks of the old program that are optimal for the block B (5) of N20 may be selected from a plurality of blocks B (5) to B (7) including the block B (6) of OL20. In general, the difference generation algorithm finds similar binary code in the old program and generates the difference, so that the larger old program can generate a smaller difference.

従って、N20のブロックB(4)に最適なOL20の複数のブロックはCP100Bで指示されているB(4)〜B(7)の4個の旧ブロックであり、N20のブロックB(5)に最適なOL20の複数のブロックはCP110Bで指示されているB(5)〜B(7)であり、N20のブロックB(6)に最適なOL20の複数のブロックはCP120Bで指示されているB(6)〜B(7)である。このように、大きなプログラムが削除された場合は、ブロックの番号の小さな順に差分圧縮データを生成すること、新ブロックに対応した複数の旧ブロックの選択は当該ブロックから大きい番号のブロックの順に複数個選択することが重要である。このように旧プログラムのブロックを選択すれば、ブロックを新プログラムへ書き換えたとしても復元で使用する旧プログラムを選択することが可能となる。   Therefore, the plurality of OL20 blocks most suitable for the N20 block B (4) are the four old blocks B (4) to B (7) designated by the CP 100B, and the N20 block B (5) A plurality of blocks of the optimal OL 20 are B (5) to B (7) designated by the CP 110B, and a plurality of blocks of the optimal OL 20 for the block B (6) of the N 20 are B (B) designated by the CP 120B. 6) to B (7). As described above, when a large program is deleted, differentially compressed data is generated in ascending order of block numbers, and a plurality of old blocks corresponding to the new block are selected in order from the block having the largest number. It is important to choose. By selecting the block of the old program in this way, it is possible to select the old program to be used for restoration even if the block is rewritten to the new program.

以上述べた図13、図13A,図13Bの概要に従い、PC1で新プログラムのブロックB(K)に最適な旧プログラムのブロックB(I)または複数の旧ブロックを選択するフローチャートを図14、図14A,図14Bに示す。これにより、差分圧縮データを生成するに最適な旧ブロックまたは複数の旧ブロックを選択できる。   FIG. 14, FIG. 14 is a flowchart for selecting the old program block B (I) or a plurality of old blocks optimal for the new program block B (K) on the PC 1 in accordance with the outline of FIG. 13, FIG. 14A and 14B. Thereby, it is possible to select an old block or a plurality of old blocks that are optimal for generating differentially compressed data.

最初に、図13におけるブロックB(K)(K=1〜N)の新プログラムに最適なブロックB(I)の旧プログラムを選択する処理フローを図14に示す。   First, FIG. 14 shows a processing flow for selecting the old program of block B (I) that is optimal for the new program of block B (K) (K = 1 to N) in FIG.

PC1の演算装置201は、ステップS130で新プログラムをECU300のFLASHメモリ303のブロックB(K)(K=1〜N)に分割する。次にステップS135でブロックB(K)(K=1:初期値)の新プログラムを選択する。ステップS140で旧プログラムをECU300のFLASHメモリ303のブロックB(I)(I=1〜N)に分割する。ステップS145でブロックB(I)(I=1:初期値)を選択し、ステップS150でB(K)とB(I)の差分圧縮データを生成する。次にステップS155で差分圧縮データサイズと基準値を比較し、差分圧縮データサイズが基準値以下の場合(ステップS155:YES)、ステップS170でブロックB(I)の旧プログラムを選択する。逆に、差分圧縮データサイズが基準値より大きい場合(ステップS155:NO)、ステップS160においてI=I+1としてステップS145へ戻り、処理を繰返す。もし全てのブロックB(I)の旧プログラムをステップS155で比較した結果、NOであった場合はステップS160でI=Nとなるので、ステップS165を実行し、ブロック無し(B(K)の圧縮を選択)を選択する。次にステップS175で全てのB(K)(K=1〜N)の処理を完了したかチェックし、K=Nならば処理を終了となる。もしK≠NならばK=K+1としてステップS135へ戻り処理を繰返す。   The computing device 201 of the PC 1 divides the new program into blocks B (K) (K = 1 to N) of the FLASH memory 303 of the ECU 300 in step S130. In step S135, a new program of block B (K) (K = 1: initial value) is selected. In step S140, the old program is divided into blocks B (I) (I = 1 to N) of the FLASH memory 303 of the ECU 300. In step S145, block B (I) (I = 1: initial value) is selected, and in step S150, differentially compressed data of B (K) and B (I) is generated. Next, in step S155, the difference compressed data size is compared with the reference value. If the difference compressed data size is equal to or smaller than the reference value (step S155: YES), the old program of block B (I) is selected in step S170. Conversely, if the differentially compressed data size is larger than the reference value (step S155: NO), I = I + 1 is set in step S160, the process returns to step S145, and the process is repeated. If the result of comparing the old programs of all the blocks B (I) in step S155 is NO, since I = N in step S160, step S165 is executed, and no block (B (K) compression is performed. Select). In step S175, it is checked whether all B (K) (K = 1 to N) processing is completed. If K = N, the processing ends. If K ≠ N, K = K + 1 is set, and the process returns to step S135 to repeat the process.

以上でB(K)(K=1〜N)毎に最適なブロックの旧プログラムを選択できたことになる。   Thus, an old program having an optimum block can be selected for each B (K) (K = 1 to N).

図14Aは、大きなプログラムが追加された新プログラムにおける複数の旧ブロック選択時のフローチャートである。   FIG. 14A is a flowchart when a plurality of old blocks are selected in a new program to which a large program is added.

PC1の演算装置201は、ステップS130Aで新プログラムをECU300のFLASHメモリ303のブロックB(K)(K=N〜1)に分割する。次にステップS135AでブロックB(K)(K=N:初期値)の新プログラムを選択する。ステップS140Aで旧プログラムをECU300のFLASHメモリ303のブロックB(I)(I=1〜N)に分割する。   The computing device 201 of the PC 1 divides the new program into blocks B (K) (K = N to 1) of the FLASH memory 303 of the ECU 300 in step S130A. In step S135A, a new program of block B (K) (K = N: initial value) is selected. In step S140A, the old program is divided into blocks B (I) (I = 1 to N) of the FLASH memory 303 of the ECU 300.

ステップS145AでK個のブロックBB(BB=B(1)〜B(K))の旧プログラムを選択し、ステップS150AでB(K)の新プログラムとBBの旧プログラムの差分圧縮データを生成する。次にステップS155Aで差分圧縮データサイズと基準値を比較し、差分圧縮データサイズが基準値以下の場合(ステップS155A:YES)、ステップS170AでブロックB(1)からブロックB(K)の旧プログラムを選択する。逆に、差分圧縮データサイズが基準値より大きい場合(ステップS155A:NO)、ステップS165Aにおいてブロック無し(B(K)の新プログラムを圧縮)を選択し、ステップS175AにおいてK=K−1としてステップS135Aへ戻り、処理を繰返す。なお、K=1で処理は終了する。このように、最後のブロック番号NのブロックB(N)の新プログラムから開始して、B(K)の新プログラムに対応する複数ブロックの旧プログラム(B(1)〜B(K))を選択し、その差分圧縮データを生成している。   In step S145A, an old program of K blocks BB (BB = B (1) to B (K)) is selected, and differential compressed data of the new program of B (K) and the old program of BB is generated in step S150A. . Next, in step S155A, the differential compression data size is compared with the reference value. If the differential compression data size is equal to or smaller than the reference value (step S155A: YES), the old program from block B (1) to block B (K) is determined in step S170A. Select. On the other hand, if the differential compression data size is larger than the reference value (step S155A: NO), no block (compress B (K) new program) is selected in step S165A, and step K175 is set in step S175A. Returning to S135A, the process is repeated. The process ends when K = 1. Thus, starting from the new program of the block B (N) of the last block number N, the old programs (B (1) to B (K)) of a plurality of blocks corresponding to the new program of B (K) The selected compressed data is generated.

また、差分圧縮データと旧プログラムから復号する順番も、最後のブロックから開始すれば良い。   The order of decoding from the differentially compressed data and the old program may be started from the last block.

図14Bは、大きなプログラムが削除された新プログラムにおける複数の旧ブロック選択時のフローチャートである。   FIG. 14B is a flowchart when a plurality of old blocks are selected in a new program from which a large program is deleted.

PC1の演算装置201は、ステップS130Bで新プログラムをECU300のFLASHメモリ303のブロックB(K)(K=1〜N)に分割する。次にステップS135BでブロックB(K)(K=1:初期値)の新プログラムを選択する。ステップS140Bで旧プログラムをECU300のFLASHメモリ303のブロックB(I)(I=1〜N)に分割する。   The computing device 201 of the PC 1 divides the new program into blocks B (K) (K = 1 to N) of the FLASH memory 303 of the ECU 300 in step S130B. In step S135B, a new program for block B (K) (K = 1: initial value) is selected. In step S140B, the old program is divided into blocks B (I) (I = 1 to N) of the FLASH memory 303 of the ECU 300.

ステップS145Bで複数のブロックBB(BB=B(K)〜B(N))の旧プログラムを選択し、ステップS150BでB(K)の新プログラムとBBの旧プログラムの差分圧縮データを生成する。次にステップS155Bで差分圧縮データサイズと基準値を比較し、差分圧縮データサイズが基準値以下の場合(ステップS155B:YES)、ステップS170BでブロックB(K)からブロックB(N)の旧プログラムを選択する。逆に、差分圧縮データサイズが基準値より大きい場合(ステップS155B:NO)、ステップS165Bにおいてブロック無し(B(K)の新プログラムを圧縮)を選択し、ステップS175BにおいてK=K+1としてステップS135Bへ戻り、処理を繰返す。なお、K=Nで処理は終了する。このように、最初のブロック番号1のブロックB(1)の新プログラムから開始して、B(K)の新プログラムに対応する複数ブロックの旧プログラム(B(K)〜B(N))を選択し、その差分圧縮データを生成している。   In step S145B, an old program of a plurality of blocks BB (BB = B (K) to B (N)) is selected. In step S150B, differential compressed data of the new program of B (K) and the old program of BB is generated. Next, in step S155B, the difference compressed data size is compared with the reference value. If the difference compressed data size is equal to or smaller than the reference value (step S155B: YES), the old program from block B (K) to block B (N) in step S170B. Select. On the other hand, if the differential compression data size is larger than the reference value (step S155B: NO), no block (compress B (K) new program) is selected in step S165B, and K = K + 1 is set in step S175B to step S135B. Return and repeat the process. The process ends when K = N. Thus, starting from the new program of block B (1) with the first block number 1, the old programs (B (K) to B (N)) of a plurality of blocks corresponding to the new program of B (K) The selected compressed data is generated.

また、差分圧縮データと旧プログラムから復号する順番も、最初のブロックから開始すれば良い。   Further, the order of decoding from the differentially compressed data and the old program may be started from the first block.

以上によりブロックの新プログラムに最適な複数のブロックの旧プログラムを選択する方法を詳細に説明した。なお、図14A及び図14Bで説明した例では、差分圧縮データは複数のブロックに対応する第1のデータ(旧プログラム)と1つのブロックに対応する第2のデータ(新プログラム)の差分を圧縮したものである。ここで、第1のデータは旧プログラムをブロックのサイズに分割することにより得られるデータを少なくとも1つ含み、第2のデータは新プログラムをブロックのサイズに分割することにより得られるデータを1つ含む。   As described above, the method of selecting the old program of a plurality of blocks most suitable for the new program of blocks has been described in detail. In the example described with reference to FIGS. 14A and 14B, the differentially compressed data compresses the difference between the first data (old program) corresponding to a plurality of blocks and the second data (new program) corresponding to one block. It is a thing. Here, the first data includes at least one data obtained by dividing the old program into block sizes, and the second data includes one data obtained by dividing the new program into block sizes. Including.

次に、図15を用いて、サーバ2の動作を説明する。図15は、図1に示すサーバ2の処理を示すフローチャートである。   Next, the operation of the server 2 will be described with reference to FIG. FIG. 15 is a flowchart showing processing of the server 2 shown in FIG.

サーバ2の演算装置201Sは、PC1の要求に応答して、PC1からブロックB(K)(K=1〜N)のデータ(差分圧縮データまたは圧縮データまたは新プログラムそのもの)を通信装置204で受信する(ステップS180)。サーバ2の演算装置201Sは、PC1から受信したデータを記憶装置205に記憶する(ステップS185)。ここで、サーバ2の演算装置201Sは、全ブロックB(K)(K=1〜N)について、ステップS180からステップS185の処理を行う。   The computing device 201S of the server 2 receives data of the block B (K) (K = 1 to N) (differential compressed data or compressed data or the new program itself) from the PC 1 in response to the request of the PC 1 by the communication device 204. (Step S180). The arithmetic device 201S of the server 2 stores the data received from the PC 1 in the storage device 205 (step S185). Here, the computing device 201S of the server 2 performs the processing from step S180 to step S185 for all blocks B (K) (K = 1 to N).

次にサーバ2の演算装置201Sは、所定のイベントをトリガーとして、記憶装置205に記憶したB(K)(K=1〜N)のデータをゲートウェイ310へ送信する(ステップS190)。所定のイベントは、例えば、所定タイミングにおけるゲートウェイ310からの要求、ユーザが所定の操作を実行したことに起因するゲートウェイ310からの要求などである。   Next, the arithmetic device 201S of the server 2 transmits the data of B (K) (K = 1 to N) stored in the storage device 205 to the gateway 310 using a predetermined event as a trigger (step S190). The predetermined event is, for example, a request from the gateway 310 at a predetermined timing, a request from the gateway 310 caused by a user performing a predetermined operation, or the like.

次に、ゲートウェイ310の動作を説明する。図16は、図3に示すゲートウェイ310の処理を示すフローチャートである。   Next, the operation of the gateway 310 will be described. FIG. 16 is a flowchart showing processing of the gateway 310 shown in FIG.

ゲートウェイ310のマイコン311は、サーバ2の要求に応答して、ブロックB(K)(K=1〜N)のデータ(差分圧縮データまたは圧縮データまたは新プログラムそのもの)を、通信装置316を介して受信する(ステップS200)。ゲートウェイ310のマイコン311は、サーバ2から受信したデータをFLASHメモリ313に記憶する(ステップS205)。次にゲートウェイ310のマイコン311は、全ブロックB(K)
(K=1〜N)について、ステップS200からステップS205の処理を行う。
In response to the request from the server 2, the microcomputer 311 of the gateway 310 sends the data of the block B (K) (K = 1 to N) (differential compressed data or compressed data or the new program itself) via the communication device 316. Receive (step S200). The microcomputer 311 of the gateway 310 stores the data received from the server 2 in the FLASH memory 313 (step S205). Next, the microcomputer 311 of the gateway 310 sets all blocks B (K).
For (K = 1 to N), the processing from step S200 to step S205 is performed.

ゲートウェイ310のマイコン311は、ECU300のFLASHメモリ303に記憶されたプログラムを更新する条件が成立しているか否かを判定する(ステップS210)。例えば、所定の運転状態において、ユーザが所定の操作をした場合に、プログラムを更新する条件は満たされたと判定される。   The microcomputer 311 of the gateway 310 determines whether or not a condition for updating the program stored in the FLASH memory 303 of the ECU 300 is satisfied (step S210). For example, when a user performs a predetermined operation in a predetermined driving state, it is determined that the condition for updating the program is satisfied.

プログラムを更新する条件が満たされた場合(ステップS210:YES)、ゲートウェイ310のマイコン311は、FLASHメモリ313に記憶されたデータからフレームを生成する(ステップS215)。   When the condition for updating the program is satisfied (step S210: YES), the microcomputer 311 of the gateway 310 generates a frame from the data stored in the FLASH memory 313 (step S215).

詳細には、ゲートウェイ310のマイコン311は、図17に示すように、ECU300へのコマンドf1、ブロックデータの種類f2、ブロックデータのサイズf3、ブロックデータを書き込むブロックのアドレスf4、復元処理で参照する旧プログラムのブロックのアドレスf5, ブロックデータf6を含むフレームを生成する。   More specifically, as shown in FIG. 17, the microcomputer 311 of the gateway 310 refers to the command f1, the block data type f2, the block data size f3, the block data address f4 to which the block data is written, and the restoration process. A frame including the address f5 and block data f6 of the block of the old program is generated.

ここでコマンドf1は、書き込みを指示するコマンドが設定される。ブロックデータは、ブロックB(K)の差分圧縮データまたは圧縮データまたは新プログラムである。ブロックデータの種類f2は、ブロックデータが差分圧縮データ、圧縮データ、新プログラムのいずれかであることを示す。ブロックデータのサイズf3は差分圧縮データサイズ、圧縮データサイズ、新プログラムそのもののサイズのいずれかを示す。   Here, as the command f1, a command for instructing writing is set. The block data is differentially compressed data or compressed data of block B (K) or a new program. The block data type f2 indicates that the block data is one of differentially compressed data, compressed data, and a new program. The block data size f3 indicates any one of the differential compression data size, the compression data size, and the size of the new program itself.

このようにして、ゲートウェイ310(プログラム書き込み装置)のマイコン311(演算装置)は、ブロックデータf6にブロックデータの種類f2を付加したフレームを生成する。   In this way, the microcomputer 311 (arithmetic unit) of the gateway 310 (program writing device) generates a frame in which the block data type f2 is added to the block data f6.

なお、図17では、図示していないが、フレームには、送信ノードのID、受信ノードのIDが含まれる。ここで、送信ノードは、ゲートウェイ310のIDであり、受信ノードは、ECU300のIDである。   Although not shown in FIG. 17, the frame includes the ID of the transmitting node and the ID of the receiving node. Here, the transmission node is the ID of the gateway 310, and the reception node is the ID of the ECU 300.

図16に戻り、ゲートウェイ310のマイコン311は、生成したフレームを、通信装置316を介してECU300へ送信する(ステップS220)。   Returning to FIG. 16, the microcomputer 311 of the gateway 310 transmits the generated frame to the ECU 300 via the communication device 316 (step S220).

次にECU300のFLASHメモリ303に配置された復元ソフトについて説明する。図18は、復元ソフトの構成である。なお、ECU300の演算装置301は、復元ソフト1800を実行することにより、以下の処理を実行する。   Next, restoration software arranged in the FLASH memory 303 of the ECU 300 will be described. FIG. 18 shows the configuration of the restoration software. Note that the arithmetic unit 301 of the ECU 300 executes the following processing by executing the restoration software 1800.

演算装置301(復元ソフト1800)への入力は差分圧縮データ1810と旧プログラム1820である。復元ソフト1800は、圧縮された差分圧縮データを伸長する伸長部1840と伸長部1840の出力である差分と旧プログラム1820から新プログラム1830を復元する差分復元部1850で構成されている。このように復元ソフト1800は伸長部と差分復元部で構成されている。   The input to the arithmetic unit 301 (restoration software 1800) is the differential compressed data 1810 and the old program 1820. The restoration software 1800 includes a decompression unit 1840 that decompresses the compressed differential compressed data, a difference that is output from the decompression unit 1840, and a differential restoration unit 1850 that restores the new program 1830 from the old program 1820. As described above, the restoration software 1800 includes an extension unit and a difference restoration unit.

一方、選択機能付き差分圧縮データや制約機能付き差分圧縮データを取り扱うには、差分圧縮データばかりでなく圧縮データも復元する必要がある。図19に選択機能付き差分圧縮データ生成ソフト800(図8)と制約機能付き差分圧縮データ生成ソフト900(図9)に対応した新しい復元ソフト1900の構成を示す。なお、ECU300の演算装置301は、復元ソフト1900を実行することにより、以下の処理を実行する。   On the other hand, in order to handle differential compressed data with a selection function and differential compressed data with a constraint function, it is necessary to restore not only the differential compressed data but also the compressed data. FIG. 19 shows a configuration of new decompression software 1900 corresponding to differential compression data generation software 800 with a selection function (FIG. 8) and differential compression data generation software 900 with a restriction function (FIG. 9). Note that the arithmetic unit 301 of the ECU 300 executes the following processing by executing the restoration software 1900.

まず演算装置301(復元ソフト1900)への入力はブロックデータ1910と旧プログラム1920である。ブロックデータ1910は差分圧縮データまたは圧縮データである。新プログラムそのものは、後述する図21で説明するが、本復元ソフト1900では取り扱わない。このため本復元ソフト1900の入力となるブロックデータ1910は差分圧縮データまたは圧縮データとする。   First, the block data 1910 and the old program 1920 are input to the arithmetic unit 301 (restoration software 1900). Block data 1910 is differentially compressed data or compressed data. The new program itself will be described later with reference to FIG. 21, but is not handled by the restoration software 1900. Therefore, the block data 1910 that is input to the decompression software 1900 is assumed to be differentially compressed data or compressed data.

復元ソフト1900は伸長部1940と差分復元部1950に加えてデータ種類判定部1960を備えている点が特徴である。ブロックデータ1910が入力されると伸長部1940はブロックデータ1910を伸長したデータを生成する。データ種類判定部1960は判定1961で伸長したデータの種類が差分であれば差分を差分復元部1950へ渡す。差分復元部1950は差分と旧プログラム1920を入力として新プログラム1930を生成する。一方判定1961で伸長したデータの種類が新プログラムの場合は1930へ新プログラムを出力する。   The restoration software 1900 is characterized in that it includes a data type determination unit 1960 in addition to the decompression unit 1940 and the difference restoration unit 1950. When the block data 1910 is input, the decompression unit 1940 generates data obtained by decompressing the block data 1910. If the type of data expanded in the determination 1961 is a difference, the data type determination unit 1960 passes the difference to the difference restoration unit 1950. The difference restoration unit 1950 generates a new program 1930 with the difference and the old program 1920 as inputs. On the other hand, if the type of data expanded in decision 1961 is a new program, the new program is output to 1930.

このように、復元ソフト1900は、1900内部で差分または新プログラムを判定する機能を有している。図8の選択機能付き差分圧縮データ生成ソフト800の出力データ850には差分圧縮データまたは圧縮データかを判別できる情報が記載されており、同様に図9の制約機能付き差分圧縮データ生成ソフト900の出力データ930にも差分圧縮データまたは圧縮データまたは新プログラムそのもののいずれかであることを示す判別情報が記載されている。   As described above, the restoration software 1900 has a function of determining a difference or a new program within 1900. The output data 850 of the differential compression data generation software 800 with a selection function in FIG. 8 describes information that can be determined as differential compression data or compression data. Similarly, the output of the differential compression data generation software 900 with a restriction function in FIG. The output data 930 also includes discrimination information indicating that it is either differential compressed data, compressed data, or the new program itself.

次に選択機能付き差分圧縮データ生成ソフト800で送信されたブロックデータ(図10)を復元してECU300のFLASHメモリ303を更新するフローチャートを図20を用いて説明する。   Next, a flowchart for restoring the block data (FIG. 10) transmitted by the differential compressed data generation software 800 with a selection function and updating the FLASH memory 303 of the ECU 300 will be described with reference to FIG.

ECU300はステップS230でフレームを受信すると、ステップS235でそのブロックデータとECU300内のFLASHメモリのブロックの旧プログラムを復元ソフト1900へ入力して復元ソフト1900を実行する。その結果新プログラムをSRAMの第2領域に復元している。次にステップS240でECU300のアドレスf4のFLASHのブロックを消去し、書込み可能な状態にしている。最後にステップS245でSRAMの第2の領域の新プログラムをブロックに書込み、処理を終了する。   When ECU 300 receives the frame in step S230, ECU 300 inputs the block data and the old program of the block of the FLASH memory in ECU 300 to restoration software 1900 and executes restoration software 1900 in step S235. As a result, the new program is restored to the second area of the SRAM. Next, in step S240, the FLASH block at address f4 of the ECU 300 is erased to enable writing. Finally, in step S245, the new program in the second area of the SRAM is written into the block, and the process is terminated.

以上でブロック単位に新プログラムを更新することができた。全プログラムを更新するためには、全てのフレームを受信(ステップS230)して、各ブロックの新プログラムを書込むことで達成できる。   The new program can be updated on a block basis. Updating all programs can be accomplished by receiving all frames (step S230) and writing a new program for each block.

次に制約機能付き差分圧縮データ生成ソフト900で送信されたブロックデータ(図11)を復元してECU300のFLASHメモリ303を更新するフローチャートを図21を用いて説明する。   Next, a flowchart for restoring the block data (FIG. 11) transmitted by the differential compression data generation software 900 with the restriction function and updating the FLASH memory 303 of the ECU 300 will be described with reference to FIG.

ECU300はステップS250でフレームを受信すると、ステップS255でブロックデータの種類f2から差分圧縮データまたは圧縮データと、新プログラムそのものの2つにケースに区分している。差分圧縮データまたは圧縮データのケースはステップS260でそのブロックデータとECU300内のFLASHメモリのブロックの旧プログラムを復元ソフト1900へ入力して復元ソフト1900を実行している。   When ECU 300 receives the frame in step S250, ECU 300 divides the case into two types, block data type f2, differential compressed data or compressed data, and new program itself in step S255. In the case of differentially compressed data or compressed data, in step S260, the block data and the old program of the FLASH memory block in the ECU 300 are input to the restoration software 1900 to execute the restoration software 1900.

その結果、新プログラムをSRAMの第2領域に復元している。次にステップS265でECU300のアドレスf4のFLASHのブロックを消去し、書込み可能な状態にしている。次にステップS270でSRAMの第2の領域の新プログラムをブロックに書込み、処理を終了する。一方ステップS255でブロックデータの種類f2が新プログラムそのもののケースであれば、ステップS265でECU300のアドレスf4のFLASHのブロックを消去し、書込み可能な状態にしている。次にステップS270で新プログラムをブロックに書込み、処理を終了する。   As a result, the new program is restored to the second area of the SRAM. Next, in step S265, the FLASH block at the address f4 of the ECU 300 is erased to make it writable. Next, in step S270, the new program in the second area of the SRAM is written into the block, and the process ends. On the other hand, if the block data type f2 is the case of the new program itself in step S255, the FLASH block at the address f4 of the ECU 300 is erased and is in a writable state in step S265. In step S270, the new program is written to the block, and the process is terminated.

以上でブロック単位に新プログラムを更新することができた。全プログラムを更新するためには、全てのフレームを受信(ステップS250)し、各ブロックの新プログラムを書込むことで達成できる。   The new program can be updated on a block basis. Updating all programs can be accomplished by receiving all frames (step S250) and writing a new program for each block.

以上説明したように、本実施形態によれば、高速かつ容易にリプログラミングを行うことができる。また、ユーザは、ディーラへ車両を持ち込むことなく、どこでもリプログラミングを行うことができる。   As described above, according to the present embodiment, reprogramming can be performed quickly and easily. Also, the user can perform reprogramming anywhere without bringing the vehicle to the dealer.

なお、本発明は上記した実施形態に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施形態は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施形態の構成の一部を他の実施形態の構成に置き換えることが可能であり、また、ある実施形態の構成に他の実施形態の構成を加えることも可能である。また、各実施形態の構成の一部について、他の構成の追加・削除・置換をすることが可能である。   In addition, this invention is not limited to above-described embodiment, Various modifications are included. For example, the above-described embodiment has been described in detail for easy understanding of the present invention, and is not necessarily limited to one having all the configurations described. Further, a part of the configuration of an embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of an embodiment. In addition, it is possible to add, delete, and replace other configurations for a part of the configuration of each embodiment.

上記実施形態では、プログラム生成装置100は、2台のコンピュータ(PC1及びサーバ2)から構成されるが、コンピュータの台数は任意である。   In the above-described embodiment, the program generation device 100 includes two computers (PC 1 and server 2), but the number of computers is arbitrary.

上記実施形態では、PC1からサーバ2へブロック単位で送信しているが、PC1やサーバ2のメモリ容量が十分あれば差分圧縮データや圧縮データを複数ブロックまとめて送信しても良い。またサーバ2からゲートウェイ310への送信は、ゲートウェイ310のSRAM312とFLASHメモリ313の容量に依存する。SRAM312とFLASHメモリ313が十分なサイズであれば、まとめて送信しても良い。   In the above embodiment, transmission is performed in block units from the PC 1 to the server 2. However, if the memory capacity of the PC 1 or the server 2 is sufficient, a plurality of blocks of differential compressed data or compressed data may be transmitted together. Transmission from the server 2 to the gateway 310 depends on the capacity of the SRAM 312 and the FLASH memory 313 of the gateway 310. If the SRAM 312 and the FLASH memory 313 are sufficiently large, they may be transmitted together.

一方ゲートウェイ310からCANを介してECU300への送信は、ECUのSRAM容量302が小さいことから、1または複数のブロック単位で送信すべきである。本実施例では、復元に必要なSRAMサイズとして1つブロックサイズとしているがSRAM302のサイズに応じて複数のブロック単位で差分圧縮データや圧縮データを生成しても良い。この選択はSRAM302のサイズで決めて良い。   On the other hand, transmission from the gateway 310 to the ECU 300 via the CAN should be performed in units of one or a plurality of blocks because the SRAM capacity 302 of the ECU is small. In this embodiment, one block size is used as the SRAM size necessary for restoration, but differentially compressed data and compressed data may be generated in units of a plurality of blocks according to the size of the SRAM 302. This selection may be determined by the size of the SRAM 302.

上記実施形態では、FLASHメモリ303は、2種類のサイズのブロックから構成されるが、異なる3つ以上のサイズのブロックから構成されていてもよい。また、FLASHメモリ303は、1種類のサイズのブロックから構成されていてもよい。   In the above embodiment, the FLASH memory 303 is composed of blocks of two types, but may be composed of blocks of three or more different sizes. Further, the FLASH memory 303 may be composed of blocks of one kind of size.

また、上記の各構成、機能等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード、DVD等の記録媒体に置くことができる。   Further, each of the above-described configurations, functions, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit. Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor. Information such as programs, tables, and files for realizing each function can be stored in a recording device such as a memory, a hard disk, or an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.

なお、本発明の実施形態は以下の態様であってもよい。   In addition, the following aspects may be sufficient as embodiment of this invention.

(第1の態様)
演算装置は、
ブロックデータの種類が差分圧縮データである場合、ブロックデータとアドレスに対応するブロックに記憶された旧プログラムから新プログラムを復元して、復元された新プログラムをブロックの書込みアドレスへ書き込むことを特徴とする車載制御装置。
(First aspect)
The arithmetic unit is
When the type of block data is differentially compressed data, the new program is restored from the old program stored in the block corresponding to the block data and address, and the restored new program is written to the block write address. In-vehicle control device.

(第2の態様)
演算装置は、
ブロックデータの種類が圧縮データである場合、ブロックデータから新プログラムを復元して、復元された新プログラムをブロックの書込みアドレスへ書き込むことを特徴とする車載制御装置。
(Second aspect)
The arithmetic unit is
An in-vehicle control device characterized in that, when the type of block data is compressed data, a new program is restored from the block data, and the restored new program is written to the write address of the block.

(第3の態様)
不揮発性メモリは、
少なくとも2つの異なるサイズのブロックから構成される
ことを特徴とする車載制御装置。
(Third aspect)
Non-volatile memory
An in-vehicle control device comprising at least two blocks of different sizes.

(第4の態様)
不揮発性メモリは、FLASHメモリである
ことを特徴とする車載制御装置。
(Fourth aspect)
The in-vehicle control device, wherein the nonvolatile memory is a FLASH memory.

(第5の態様)
揮発性メモリは、SRAMである
ことを特徴とする車載制御装置。
(5th aspect)
The in-vehicle control device, wherein the volatile memory is an SRAM.

(第6の態様)
演算装置は、マイコンであり、
揮発性メモリ及び不揮発性メモリは、マイコンに内蔵される
ことを特徴とする車載制御装置。
(Sixth aspect)
The arithmetic unit is a microcomputer,
A volatile memory and a nonvolatile memory are built in a microcomputer.

(第7の態様)
第1のデータの入力の有無を判定する入力判定工程を備え、
選択工程は、
入力判定工程により第1のデータの入力が無いと判定された場合、第2のデータを圧縮した圧縮データを出力することを含む差分圧縮データ生成プログラム。
(Seventh aspect)
An input determination step for determining whether or not the first data is input;
The selection process is
A differential compressed data generation program including outputting compressed data obtained by compressing second data when it is determined by the input determining step that the first data is not input.

(第8の態様)
第1のデータの入力の有無を判定する入力判定工程を備え、
選択工程は、
入力判定工程により第1のデータの入力が有ると判定され、かつ、差分圧縮データのサイズが基準値より小さい場合、差分圧縮データを出力することを含む差分圧縮データ生成プログラム。
(Eighth aspect)
An input determination step for determining whether or not the first data is input;
The selection process is
A differential compressed data generation program including outputting differential compressed data when it is determined in the input determining step that the first data is input and the size of the differential compressed data is smaller than a reference value.

1…PC
2…サーバ
3…車載システム
100…プログラム生成装置
101…演算装置
102…入力装置
103…表示装置
104…通信装置
105…記憶装置
201…演算装置
202…入力装置
203…表示装置
204…通信装置
205…記憶装置
300…ECU(車載制御装置)
301…マイコン(演算装置)
302…SRAM(揮発性メモリ)
302a…SRAMの第1の領域
302b…SRAMの第2の領域
303…FLASHメモリ(不揮発性メモリ)
304…各種のIC
305…通信装置
310…ゲートウェイ(プログラム書き込み装置)
311…マイコン
312…SRAM
313…FLASHメモリ
314…各種のIC
315…通信装置(CANプロトコル)
316…通信装置(車両の外部のネットワークのプロトコル)
600…差分圧縮データ生成ソフト
700…圧縮データ生成ソフト
800…選択機能付き差分圧縮データ生成ソフト
900…制約機能付き差分圧縮データ生成ソフト
1800…差分圧縮データ復元ソフト
1900…新しい差分圧縮データ復元ソフト
1 ... PC
2 ... Server 3 ... In-vehicle system 100 ... Program generation device 101 ... Arithmetic device 102 ... Input device 103 ... Display device 104 ... Communication device 105 ... Storage device 201 ... Arithmetic device 202 ... Input device 203 ... Display device 204 ... Communication device 205 ... Storage device 300 ... ECU (on-vehicle control device)
301: Microcomputer (arithmetic unit)
302 ... SRAM (volatile memory)
302a: SRAM first area 302b: SRAM second area 303: FLASH memory (nonvolatile memory)
304 ... Various ICs
305 ... Communication device 310 ... Gateway (program writing device)
311 ... Microcomputer 312 ... SRAM
313: FLASH memory 314: Various ICs
315 ... Communication device (CAN protocol)
316: Communication device (network protocol outside the vehicle)
600 ... Differential compression data generation software 700 ... Compression data generation software 800 ... Differential compression data generation software 900 with selection function ... Differential compression data generation software 1800 with restriction function ... Differential compression data decompression software 1900 ... New differential compression data decompression software

Claims (20)

複数のブロックから構成され、旧プログラムを記憶する不揮発性メモリと、
揮発性メモリと、
前記旧プログラムを前記ブロックのサイズに分割することにより得られるデータを少なくとも1つ含む第1のデータと新プログラムを前記ブロックのサイズに分割することにより得られるデータを1つ含む第2のデータの差分を圧縮した差分圧縮データ、又は前記第2のデータを圧縮した圧縮データを含んで構成されるブロックデータ、前記ブロックデータの種類、前記ブロックの書込みアドレスを含むフレームを受信する通信装置と、
前記ブロックデータの種類に応じて、前記第2のデータを前記揮発性メモリに復元し、復元された前記第2のデータを前記ブロックの書込みアドレスへ書き込む演算装置と、
を備えることを特徴とする車載制御装置。
A non-volatile memory configured by a plurality of blocks and storing an old program;
Volatile memory,
First data including at least one data obtained by dividing the old program into the block size and second data including one data obtained by dividing the new program into the block size A communication device that receives differential compressed data obtained by compressing a difference, or block data including compressed data obtained by compressing the second data, a type of the block data, and a frame including a write address of the block;
An arithmetic device that restores the second data to the volatile memory according to the type of the block data, and writes the restored second data to the write address of the block;
A vehicle-mounted control device comprising:
請求項1に記載の車載制御装置であって、
前記差分圧縮データは、
同一ブロックの前記第1のデータと前記第2のデータの差分を圧縮したものであることを特徴とする車載制御装置。
The in-vehicle control device according to claim 1,
The differentially compressed data is
A vehicle-mounted control device, wherein a difference between the first data and the second data in the same block is compressed.
請求項1に記載の車載制御装置であって、
前記差分圧縮データは、
異なるブロックの前記第1のデータと前記第2のデータの差分を圧縮したものであることを特徴とする車載制御装置。
The in-vehicle control device according to claim 1,
The differentially compressed data is
A vehicle-mounted control device, wherein a difference between the first data and the second data in different blocks is compressed.
請求項1に記載の車載制御装置であって、
前記差分圧縮データは、
前記第1のデータと前記第2のデータの差分のうち、サイズが基準値以下の差分を圧縮したものであることを特徴とする車載制御装置。
The in-vehicle control device according to claim 1,
The differentially compressed data is
A vehicle-mounted control device, wherein a difference whose size is equal to or smaller than a reference value among the differences between the first data and the second data is compressed.
請求項1に記載の車載制御装置であって、
前記差分圧縮データは、
複数の前記ブロックに対応する前記第1のデータと1つのブロックに対応する前記第2のデータの差分を圧縮したものであることを特徴とする車載制御装置。
The in-vehicle control device according to claim 1,
The differentially compressed data is
A vehicle-mounted control device, wherein a difference between the first data corresponding to a plurality of the blocks and the second data corresponding to one block is compressed.
請求項5に記載の車載制御装置であって、
前記第1のデータは、
最初のブロックから前記1つのブロックまでの複数ブロックに配置されている旧プログラムで構成することを特徴とする車載制御装置。
The in-vehicle control device according to claim 5,
The first data is:
An in-vehicle control device comprising an old program arranged in a plurality of blocks from the first block to the one block.
請求項5に記載の車載制御装置であって、
前記第1のデータは、
前記1つのブロックから最後のブロックまでの複数ブロックに配置されている旧プログラムで構成することを特徴とする車載制御装置。
The in-vehicle control device according to claim 5,
The first data is:
An in-vehicle control device comprising an old program arranged in a plurality of blocks from the one block to the last block.
複数のブロックから構成され、車両制御装置の不揮発性メモリに記憶される旧プログラムを前記ブロックのサイズに分割することにより得られるデータを少なくとも1つ含む第1のデータと、新プログラムを前記ブロックのサイズに分割することにより得られるデータを1つ含む第2のデータの差分を圧縮した差分圧縮データ、又は前記第2のデータを圧縮した圧縮データを含んで構成されるブロックデータに前記ブロックデータの種類を付加したフレームを生成する演算装置と、
前記フレームを車載制御装置へ送信する通信装置と、
を備えるプログラム書き込み装置。
First block including at least one data obtained by dividing an old program stored in a non-volatile memory of the vehicle control device into a size of the block, and a new program of the block The block data is converted into differentially compressed data obtained by compressing the difference of second data including one piece of data obtained by dividing the data into size, or compressed data obtained by compressing the second data. An arithmetic unit for generating a frame with added types;
A communication device for transmitting the frame to the in-vehicle control device;
A program writing apparatus comprising:
請求項8に記載のプログラム書き込み装置であって、
前記差分圧縮データは、
同一ブロックの前記第1のデータと前記第2のデータの差分を圧縮したものであることを特徴とするプログラム書き込み装置。
The program writing device according to claim 8,
The differentially compressed data is
A program writing apparatus, wherein a difference between the first data and the second data in the same block is compressed.
請求項8に記載のプログラム書き込み装置であって、
前記差分圧縮データは、
異なるブロックの前記第1のデータと前記第2のデータの差分を圧縮したものであることを特徴とするプログラム書き込み装置。
The program writing device according to claim 8,
The differentially compressed data is
A program writing apparatus, wherein a difference between the first data and the second data in different blocks is compressed.
請求項8に記載のプログラム書込み装置であって、
前記第1のデータは、
最初のブロックから前記1つのブロックまでの複数ブロックに配置されている旧プログラムで構成することを特徴とするプログラム書込み装置。
The program writing device according to claim 8,
The first data is:
A program writing apparatus comprising an old program arranged in a plurality of blocks from a first block to the one block.
請求項8に記載のプログラム書込み装置であって、
前記第1のデータは、
前記1つのブロックから最後のブロックまでの複数ブロックに配置されている旧プログラムで構成することを特徴とするプログラム書込み装置。
The program writing device according to claim 8,
The first data is:
A program writing apparatus comprising an old program arranged in a plurality of blocks from the one block to the last block.
請求項8に記載のプログラム書き込み装置であって、
前記差分圧縮データは、
所定個数の前記第1のデータと前記所定個数の前記第2のデータの差分を圧縮したものであることを特徴とするプログラム書き込み装置。
The program writing device according to claim 8,
The differentially compressed data is
A program writing apparatus, wherein a difference between a predetermined number of the first data and the predetermined number of the second data is compressed.
請求項8に記載のプログラム書き込み装置であって、
前記圧縮データは、
所定個数の前記第2のデータを圧縮したものであることを特徴とするプログラム書き込み装置。
The program writing device according to claim 8,
The compressed data is
A program writing apparatus, wherein a predetermined number of the second data is compressed.
車両制御装置の不揮発性メモリに記憶されたプログラムと同じ旧プログラム、及び前記旧プログラムを更新した新プログラムを記憶する記憶装置と、
前記旧プログラムを前記不揮発性メモリのブロックのサイズに分割することにより得られるデータを少なくとも1つ含む第1のデータ及び前記新プログラムを前記不揮発性メモリの前記ブロックのサイズに分割することにより得られるデータを1つ含む第2のデータを生成する分割部、前記第1のデータと前記第2のデータの差分を生成する差分生成部、前記差分を圧縮した差分圧縮データを生成する圧縮部、及び前記差分圧縮データのサイズが基準値以上の場合、前記第2のデータを圧縮した圧縮データを生成し、前記差分圧縮データまたは前記圧縮データのいずれか小さい方をブロックデータとして選択する選択部を有する演算装置と、
前記ブロックデータを前記車載制御装置へ送信する通信装置と、
を備えることを特徴とするプログラム生成装置。
A storage device for storing the same old program as the program stored in the nonvolatile memory of the vehicle control device, and a new program obtained by updating the old program;
It is obtained by dividing the first data including at least one data obtained by dividing the old program into the block size of the nonvolatile memory and the new program into the block size of the nonvolatile memory. A division unit that generates second data including one data, a difference generation unit that generates a difference between the first data and the second data, a compression unit that generates differential compressed data obtained by compressing the difference, and A selection unit configured to generate compressed data obtained by compressing the second data when the size of the differentially compressed data is equal to or larger than a reference value, and to select the smaller of the differentially compressed data or the compressed data as block data; An arithmetic unit;
A communication device for transmitting the block data to the in-vehicle control device;
A program generation device comprising:
請求項15に記載のプログラム生成装置であって、
前記第1のデータの入力の有無を判定する入力判定部をさらに備え、
前記選択部は、
前記入力判定部により前記第1のデータの入力が有ると判定された場合、前記差分圧縮データを出力し、前記入力判定部により前記第1のデータの入力が無いと判定された場合、前記第2のデータを圧縮した圧縮データを出力することを特徴とするプログラム生成装置。
The program generation device according to claim 15,
An input determination unit for determining whether or not the first data is input;
The selection unit includes:
When the input determining unit determines that the first data is input, the differential compressed data is output. When the input determining unit determines that the first data is not input, the first data is output. A program generation apparatus that outputs compressed data obtained by compressing the second data.
請求項15に記載のプログラム生成装置であって、
前記演算装置は、
前記ブロックデータを一時的に記憶するための前記車載制御装置の揮発性メモリの第1の領域のサイズと前記ブロックデータのサイズを比較して前記ブロックデータの方が大きい場合には、前記ブロックデータを破棄して前記第2のデータそのものを前記ブロックデータとして設定する制約部を有することを特徴とするプログラム生成装置。
The program generation device according to claim 15,
The arithmetic unit is:
If the block data is larger by comparing the size of the block data with the size of the first area of the volatile memory of the in-vehicle controller for temporarily storing the block data, the block data And a restriction unit that sets the second data itself as the block data.
旧プログラムを不揮発性メモリのブロックのサイズに分割することにより得られるデータを少なくとも1つ含む第1のデータと、新プログラムを前記不揮発性メモリの前記ブロックのサイズに分割することにより得られるデータを1つ含む第2のデータの差分を生成する差分生成工程と、
前記差分を圧縮した差分圧縮データ、又は前記第2のデータを圧縮した圧縮データのいずれかを出力する選択工程と、
を演算装置に実行させるプログラム。
First data including at least one data obtained by dividing the old program into the size of the block of the nonvolatile memory, and data obtained by dividing the new program into the size of the block of the nonvolatile memory A difference generation step of generating a difference between second data including one;
A selection step of outputting either differential compressed data obtained by compressing the difference or compressed data obtained by compressing the second data;
A program that causes an arithmetic unit to execute.
請求項18に記載のプログラムであって、
前記第1のデータの入力の有無を判定する入力判定工程をさらに備え、
前記選択工程は、
前記入力判定工程により前記第1のデータの入力が有ると判定された場合、前記差分圧縮データを出力し、前記入力判定工程により前記第1のデータの入力が無いと判定された場合、前記第2のデータを圧縮した圧縮データを出力することを特徴とするプログラム。
The program according to claim 18, wherein
An input determination step of determining whether or not the first data is input;
The selection step includes
When the input determination step determines that the first data is input, the differential compression data is output. When the input determination step determines that the first data is not input, the first data A program characterized by outputting compressed data obtained by compressing the data of No. 2.
圧縮データを伸長する伸長工程と、
前記伸長工程により生成されたデータが、旧プログラムを不揮発性メモリのブロックのサイズに分割することにより得られるデータを少なくとも1つ含む第1のデータと新プログラムを前記不揮発性メモリの前記ブロックのサイズに分割することにより得られるデータを1つ含む第2のデータの差分、又は前記第2のデータそのものであるか否かを判定するデータ種類判定工程と、
前記差分と前記不揮発性メモリの前記ブロックに格納された旧プログラムから新プログラムを復元する差分復元工程と、
前記データ種類判定工程によりデータの種類が差分であると判定された場合、前記差分復元工程により復元された新プログラムを出力し、前記データ種類判定工程によりデータの種類が前記第2のデータそのものであると判定された場合、前記第2のデータを出力する出力工程と、
を演算装置に実行させるプログラム。
A decompression process for decompressing the compressed data;
The data generated by the decompression step includes first data including at least one data obtained by dividing the old program into the size of the block of the nonvolatile memory, and a new program including the size of the block of the nonvolatile memory. A data type determination step for determining whether or not the difference between the second data including one piece of data obtained by dividing the data into two or the second data itself;
A differential restoration step of restoring a new program from the old program stored in the block of the difference and the nonvolatile memory;
If the data type determination step determines that the data type is a difference, the new program restored by the difference restoration step is output, and the data type determination step determines that the data type is the second data itself. If it is determined that there is an output step of outputting the second data;
A program that causes an arithmetic unit to execute.
JP2016571893A 2015-01-26 2016-01-08 In-vehicle control device, program writing device, program generation device, and program Active JP6434994B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2015012021 2015-01-26
JP2015012021 2015-01-26
PCT/JP2016/050409 WO2016121442A1 (en) 2015-01-26 2016-01-08 Vehicle-mounted control device, program writing device, program generating device and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2018211085A Division JP6739498B2 (en) 2015-01-26 2018-11-09 In-vehicle control device and program writing device

Publications (2)

Publication Number Publication Date
JPWO2016121442A1 true JPWO2016121442A1 (en) 2017-08-03
JP6434994B2 JP6434994B2 (en) 2018-12-05

Family

ID=56543062

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2016571893A Active JP6434994B2 (en) 2015-01-26 2016-01-08 In-vehicle control device, program writing device, program generation device, and program
JP2018211085A Active JP6739498B2 (en) 2015-01-26 2018-11-09 In-vehicle control device and program writing device

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2018211085A Active JP6739498B2 (en) 2015-01-26 2018-11-09 In-vehicle control device and program writing device

Country Status (5)

Country Link
US (2) US10228934B2 (en)
EP (1) EP3252605B1 (en)
JP (2) JP6434994B2 (en)
CN (1) CN107077396B (en)
WO (1) WO2016121442A1 (en)

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10430176B2 (en) 2014-11-17 2019-10-01 Hitachi Automotive Systems, Ltd. In-vehicle control device, program update system, and program update software
WO2016121442A1 (en) * 2015-01-26 2016-08-04 日立オートモティブシステムズ株式会社 Vehicle-mounted control device, program writing device, program generating device and program
JP6281535B2 (en) * 2015-07-23 2018-02-21 株式会社デンソー Relay device, ECU, and in-vehicle system
KR101917378B1 (en) * 2016-10-10 2018-11-09 현대오트론 주식회사 Reprogramming apparatus, electronic control unit, and reprogramming method using thereof
JP6782654B2 (en) * 2017-03-24 2020-11-11 日立オートモティブシステムズ株式会社 In-vehicle control device and program update software
WO2018173911A1 (en) * 2017-03-24 2018-09-27 日立オートモティブシステムズ株式会社 Car onboard control device and program updating software
CN110494847B (en) * 2017-04-12 2023-02-17 住友电气工业株式会社 Relay device, transmission method, and computer program
US10402192B2 (en) 2017-07-25 2019-09-03 Aurora Labs Ltd. Constructing software delta updates for vehicle ECU software and abnormality detection based on toolchain
JP6731892B2 (en) * 2017-07-28 2020-07-29 日立オートモティブシステムズ株式会社 Tampering detection device for in-vehicle memory
JP2019036238A (en) * 2017-08-21 2019-03-07 株式会社東芝 Update controller, terminal, update control method, and program
US11449329B2 (en) * 2018-02-16 2022-09-20 Hitachi Astemo, Ltd. Vehicle control device and program update system
JP7311245B2 (en) 2018-03-07 2023-07-19 トヨタ自動車株式会社 Master device, master, control method, program and vehicle
JP6718483B2 (en) * 2018-06-29 2020-07-08 株式会社Subaru vehicle
WO2020032119A1 (en) * 2018-08-10 2020-02-13 株式会社デンソー Electronic control device, vehicular electronic control system, difference data consistency determination method, and difference data consistency determination program
JP7354631B2 (en) 2018-08-10 2023-10-03 株式会社デンソー Electronic control device, electronic control system for vehicle, method for determining consistency of differential data, and program for determining consistency of differential data
JP7265120B2 (en) * 2019-01-10 2023-04-26 富士通株式会社 Data collection program, data collection device and data collection method
JP2021043843A (en) * 2019-09-13 2021-03-18 日立オートモティブシステムズ株式会社 Transfer apparatus, electronic control apparatus, and method of manufacturing the same
US11341789B2 (en) 2019-09-30 2022-05-24 Toyota Motor North America, Inc. Remote/offline processing of vehicle data
WO2021117942A1 (en) * 2019-12-12 2021-06-17 전자부품연구원 Low-complexity deep learning acceleration hardware data processing device
WO2021131754A1 (en) * 2019-12-24 2021-07-01 京セラ株式会社 Communication apparatus and program
CN113448596A (en) * 2020-03-24 2021-09-28 上海汽车集团股份有限公司 Vehicle controller flashing system and method and related equipment
WO2022003418A1 (en) 2020-06-29 2022-01-06 Aurora Labs Ltd. Efficient controller data generation and extraction
JP7420025B2 (en) 2020-09-07 2024-01-23 トヨタ自動車株式会社 Program update method and update system
US20220300256A1 (en) * 2021-03-22 2022-09-22 Wind River Systems, Inc. Validating Binary Image Content

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073417A (en) * 2011-09-28 2013-04-22 Clarion Co Ltd Method and system for arranging object data, server device thereof, client device, and program
JP2014112419A (en) * 2009-01-29 2014-06-19 Nec Corp Mobile terminal apparatus, software update method, operation control method, and program
JP2014182571A (en) * 2013-03-19 2014-09-29 Denso Corp On-vehicle electronic control device program rewriting system and on-vehicle relay device

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814474B2 (en) * 2000-11-17 2010-10-12 Hewlett-Packard Development Company, L.P. Updatable mobile handset based on Linux with compression and decompression techniques
JP4285679B2 (en) * 2002-03-11 2009-06-24 富士通株式会社 Differential transfer method, program and system
US6999976B2 (en) * 2002-05-29 2006-02-14 International Business Machines Corporation Method, apparatus, and program for using a Java archive to encode a file system delta
US7058783B2 (en) * 2002-09-18 2006-06-06 Oracle International Corporation Method and mechanism for on-line data compression and in-place updates
JP4153324B2 (en) * 2003-01-31 2008-09-24 松下電器産業株式会社 DIFFERENTIAL DATA GENERATION DEVICE AND METHOD, UPDATED DATA RESTORE DEVICE AND METHOD, AND PROGRAM
US7509635B2 (en) * 2003-09-26 2009-03-24 Red Hat, Inc. Software and data file updating process
DE602004013120T2 (en) * 2004-03-10 2009-05-14 Sony Ericsson Mobile Communications Ab Automated backup storage in firmware upgrades
JP2008522254A (en) * 2004-11-08 2008-06-26 イノパス・ソフトウェアー・インコーポレーテッド Static file system difference detection and update
WO2007039907A2 (en) * 2005-10-06 2007-04-12 Red Bend Ltd. Methods and systems for updating content including a compressed version
US8463983B2 (en) * 2009-09-15 2013-06-11 International Business Machines Corporation Container marker scheme for reducing write amplification in solid state devices
JP5218366B2 (en) 2009-10-07 2013-06-26 トヨタ自動車株式会社 Vehicle program update device
JP2013517565A (en) * 2010-01-12 2013-05-16 グーグル インコーポレイテッド Operating system automatic update procedure
JP5559001B2 (en) * 2010-10-15 2014-07-23 株式会社日立ソリューションズ Embedded program update method, embedded program update program, electronic device, network system
US9053107B1 (en) * 2011-12-06 2015-06-09 Google Inc. Determining updates for files based on an organization of the files on different blocks of a storage device
JP5522155B2 (en) * 2011-12-09 2014-06-18 株式会社デンソー Program rewriting method, program rewriting device, and electronic control device
US8615500B1 (en) * 2012-03-29 2013-12-24 Emc Corporation Partial block allocation for file system block compression using virtual block metadata
CN103051723B (en) * 2012-12-27 2016-08-31 广州市动景计算机科技有限公司 A kind of method for updating increment and server, terminal
US11347498B2 (en) * 2013-02-26 2022-05-31 Red Hat, Inc. Bytecode modification
JP2015207145A (en) * 2014-04-21 2015-11-19 株式会社ソニー・コンピュータエンタテインメント Information processing device and difference information generation device
WO2016121442A1 (en) * 2015-01-26 2016-08-04 日立オートモティブシステムズ株式会社 Vehicle-mounted control device, program writing device, program generating device and program
US10101992B2 (en) * 2015-06-15 2018-10-16 Lear Corporation Telematics control unit comprising a differential update package
US20170228741A1 (en) * 2016-02-05 2017-08-10 GM Global Technology Operations LLC Dynamic display of open source software compliance information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014112419A (en) * 2009-01-29 2014-06-19 Nec Corp Mobile terminal apparatus, software update method, operation control method, and program
JP2013073417A (en) * 2011-09-28 2013-04-22 Clarion Co Ltd Method and system for arranging object data, server device thereof, client device, and program
JP2014182571A (en) * 2013-03-19 2014-09-29 Denso Corp On-vehicle electronic control device program rewriting system and on-vehicle relay device

Also Published As

Publication number Publication date
US10228934B2 (en) 2019-03-12
EP3252605B1 (en) 2022-04-06
WO2016121442A1 (en) 2016-08-04
EP3252605A4 (en) 2019-01-16
JP6434994B2 (en) 2018-12-05
US10649769B2 (en) 2020-05-12
JP6739498B2 (en) 2020-08-12
US20180018164A1 (en) 2018-01-18
EP3252605A1 (en) 2017-12-06
CN107077396A (en) 2017-08-18
US20190171445A1 (en) 2019-06-06
CN107077396B (en) 2020-12-04
JP2019061690A (en) 2019-04-18

Similar Documents

Publication Publication Date Title
JP6434994B2 (en) In-vehicle control device, program writing device, program generation device, and program
US10430176B2 (en) In-vehicle control device, program update system, and program update software
TWI291098B (en) Method and system for data optimization and protection in DSP firmware
KR100456736B1 (en) Method for reducing booting time of a digital device having a flash memory
JP2006059217A (en) Software memory image generation apparatus and built-in device software update system and program
JP6812826B2 (en) Storage method, storage device and storage program
JP6009290B2 (en) Electronic control device for vehicle
JP5100500B2 (en) Data rewriting system, new edition data creation device, difference data creation device, new edition data creation program, and difference data creation program
JP2018018207A (en) Electronic apparatus, data saving method, and program
US7783691B2 (en) Sharing of a logic operator having a work register
CN107305582B (en) Metadata processing method and device
US20180067677A1 (en) Array control program, array control method, and array control apparatus
CN109976678B (en) Storage method and equipment
CN113051226A (en) System level compiling method, electronic device and storage medium
JP7161125B2 (en) Information processing system, information processing device and information processing program
JP4888166B2 (en) Information processing apparatus, process compression method, and program
US8296500B2 (en) Memory system and computer system
JPWO2017188416A1 (en) Circuit device, circuit rewriting method, and program
JP2019175024A (en) In-vehicle control device
CN113434502A (en) Heterogeneous database consistency implementation method and system, electronic device and storage medium
CN117973274A (en) Logic optimization method and related equipment
JP6193674B2 (en) CONVERSION CIRCUIT DESIGN DEVICE, CONVERSION CIRCUIT DESIGN PROGRAM, AND CONVERSION CIRCUIT DESIGN METHOD
CN116896587A (en) Processing method and device for repeated network request, computer equipment and storage medium
JP2020140621A (en) Information processing device and information processing method
CN110866151A (en) Feature traversal method and related equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170414

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180403

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180530

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

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20181010

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181109

R150 Certificate of patent or registration of utility model

Ref document number: 6434994

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250