JP2012236451A - Program - Google Patents

Program Download PDF

Info

Publication number
JP2012236451A
JP2012236451A JP2011105305A JP2011105305A JP2012236451A JP 2012236451 A JP2012236451 A JP 2012236451A JP 2011105305 A JP2011105305 A JP 2011105305A JP 2011105305 A JP2011105305 A JP 2011105305A JP 2012236451 A JP2012236451 A JP 2012236451A
Authority
JP
Japan
Prior art keywords
vehicle
data
stored
program
information
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
JP2011105305A
Other languages
Japanese (ja)
Other versions
JP5585941B2 (en
Inventor
Ryota Asai
亮太 浅井
Nobuhito Yamaguchi
信人 山口
Yusuke Kaneko
雄介 金子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2011105305A priority Critical patent/JP5585941B2/en
Publication of JP2012236451A publication Critical patent/JP2012236451A/en
Application granted granted Critical
Publication of JP5585941B2 publication Critical patent/JP5585941B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a program capable of reducing nonvolatile memory more than a conventional method and of lessening a processing load and processing time during memory processing when storing information stored in the nonvolatile memory of an electronic control device in a vehicle.SOLUTION: A control program 23 is a program which is loaded in a RAM 21 to control an on-vehicle device 3 of vehicle 1. A stored program 24 is a program which transfers various data by control program execution on the RAM 21 as stored data 25 when turning a vehicle 1 to ignition off, and restores the stored data 25 to be returned to the RAM 21 to a nonvolatile memory 22 when turning the same to ignition on. The stored program 24 stores a state of a stack 231 in the control program 23 and values such as various set value functions 232a in the nonvolatile memory 22 at the minimum bit number.

Description

本発明は、プログラムに関する。   The present invention relates to a program.

車両の電子制御ユニット(ECU: Electric Control Unit)では、イグニッションオフされたときに、揮発性メモリ上のユーザ設定や諸元等の車両情報を不揮発性メモリに記憶させ、再度イグニッションオンされた時に不揮発性メモリ上の車両情報を揮発性メモリに戻す。例えば下記特許文献1には、車両の情報を揮発性メモリから不揮発性メモリに短時間で移す技術が開示されている。   In an electronic control unit (ECU) of a vehicle, when ignition is turned off, vehicle information such as user settings and specifications on a volatile memory is stored in a nonvolatile memory, and when an ignition is turned on again, the vehicle information is stored in a nonvolatile memory. The vehicle information in the volatile memory is returned to the volatile memory. For example, Patent Document 1 below discloses a technique for transferring vehicle information from a volatile memory to a nonvolatile memory in a short time.

特開2006−193017号公報JP 2006-193017 A

車載等の組み込みソフトではメモリ容量の制限が厳しく、不揮発性メモリに記憶できるデータ量は限られている。また車両の電子制御装置の場合、不揮発性メモリは通常のメモリとは別に搭載するため、コスト面の制約から容量のより大きな不揮発性メモリに変更することは容易ではない。   Embedded software such as in-vehicle has a severe memory capacity limitation, and the amount of data that can be stored in a nonvolatile memory is limited. In the case of an electronic control device for a vehicle, since the nonvolatile memory is mounted separately from the normal memory, it is not easy to change to a nonvolatile memory having a larger capacity due to cost limitations.

したがって、記憶すべきデータを圧縮する必要がある。一般にデータを圧縮する技術として、例えば画像圧縮技術のJPEGやファイル圧縮技術のzipが知られているが、処理負荷や必要なROMサイズが大きく、車載ソフトに用いるのは適当ではない。またJPEGやzipでは圧縮の必要のないデータまで圧縮する欠点も有している。   Therefore, it is necessary to compress the data to be stored. For example, JPEG which is an image compression technique and zip which is a file compression technique are known as techniques for compressing data. However, the processing load and the required ROM size are large, and it is not suitable for use in in-vehicle software. In addition, JPEG and zip also have a drawback of compressing even data that does not need to be compressed.

車載ソフトでは、機能やバリエーションの増加やソフトウェアの再利用性を向上させるための技術として例えばオブジェクト指向の導入が考えられるが、その場合記憶したいデータ量は今後ますます多くなる。よって、オブジェクト指向のソフトウェアを含む車載用のソフトウェアにおいて、不揮発性メモリに記憶するデータを効果的に圧縮する技術の開発が必要である。上記特許文献1では、車両故障時における揮発性メモリから不揮発性メモリへの情報移動のみを扱っており、車両故障時以外は対象外である。   For in-vehicle software, for example, the introduction of object orientation is considered as a technique for increasing functions and variations and improving the reusability of software. In that case, the amount of data to be stored will increase in the future. Therefore, in-vehicle software including object-oriented software, it is necessary to develop a technique for effectively compressing data stored in a nonvolatile memory. In Patent Document 1, only information movement from the volatile memory to the non-volatile memory at the time of vehicle failure is dealt with, and it is out of scope except at the time of vehicle failure.

そこで本発明が解決しようとする課題は、上述の項目を鑑み、車両の電子制御装置の揮発性メモリに記憶された情報を不揮発性メモリに記憶する際に、従来技術における記憶手法よりも不揮発性メモリが小容量化でき、記憶処理の処理負荷や処理時間も低減できるプログラムを提供することにある。   In view of the above-mentioned items, the problem to be solved by the present invention is that the information stored in the volatile memory of the vehicle electronic control device is more nonvolatile than the storage technique in the prior art. An object of the present invention is to provide a program capable of reducing the memory capacity and reducing the processing load and processing time of storage processing.

上記課題を達成するために、本発明に係るプログラムは、車両に装備された電子制御装置が有する揮発性メモリに記憶された、前記車両の車載機器の制御状態を示す複数のデータのそれぞれに対して異なった2進数を割り当て、その2進数のビット数は全ての前記データに異なった2進数値を割り当てられる最小のビット数とする割り当てステップと、前記車両の駆動部の停止時に、前記車両に備えられた不揮発性メモリに、前記割り当てステップで求められた2進数値を記憶する記憶ステップと、を車両に装備されたコンピュータに実行させることを特徴とする。   In order to achieve the above object, a program according to the present invention is provided for each of a plurality of pieces of data indicating a control state of an in-vehicle device of a vehicle stored in a volatile memory included in an electronic control device installed in the vehicle. Assigning different binary numbers, the number of bits of the binary numbers being the minimum number of bits that can be assigned different binary values to all the data, and when stopping the drive unit of the vehicle, A storage step of storing the binary value obtained in the assigning step in a non-volatile memory provided is executed by a computer mounted on the vehicle.

これにより本発明に係るプログラムでは、車両の電子制御装置の揮発性メモリに記憶された、車載機器の制御状態を示す複数のデータに異なった2進数を最小のビット数で割り当て、車両の駆動部の停止時に不揮発性メモリにその2進数を記憶する。したがって従来技術のようにオブジェクトのポインタをそのまま記憶したり、データ全体をzip等で圧縮するのではなく、記憶すべきデータのうち圧縮する必要のあるデータのみを最小のビット数で記憶できる。よって不揮発性メモリに容量を低減でき、さらには記憶処理における処理負荷や処理時間も低減することができる。特に車載機器の場合、とり得る制御状態の数は相対的に少ない場合が多いため、少ないビット数の2進数に圧縮でき、メモリ容量の制約が厳しい車載組み込みソフトに対して本発明はきわめて有効である。   Thus, in the program according to the present invention, a different binary number is assigned to a plurality of data indicating the control state of the in-vehicle device stored in the volatile memory of the vehicle electronic control device with the minimum number of bits, and the vehicle drive unit The binary number is stored in the non-volatile memory when the operation is stopped. Therefore, instead of storing the object pointer as it is in the prior art or compressing the entire data by zip or the like, only the data that needs to be compressed among the data to be stored can be stored with the minimum number of bits. Therefore, the capacity of the nonvolatile memory can be reduced, and further, the processing load and processing time in the storage process can be reduced. In particular, in the case of in-vehicle devices, since the number of control states that can be taken is relatively small, the present invention is extremely effective for in-vehicle embedded software that can be compressed to a binary number with a small number of bits and has a severe memory capacity limitation. is there.

また前記車両の駆動部の始動時に、前記不揮発性メモリに記憶された前記2進数の情報を、その2進数に関連付けられた前記車載機器の制御状態を示すデータの情報に変換して、前記揮発性メモリに復元する復元ステップを、車両に装備されたコンピュータに実行させるとしてもよい。   Further, when starting the drive unit of the vehicle, the binary information stored in the nonvolatile memory is converted into data information indicating a control state of the in-vehicle device associated with the binary number, and the volatile The restoration step of restoring to the memory may be executed by a computer installed in the vehicle.

この発明によれば、車両の駆動部の停止時に不揮発性メモリに2進数として記憶されたデータを、駆動部の始動時に揮発性メモリに車載機器の制御情報として復元するので、最小ビット数の2進数の読み出しでよく、復元処理における処理負荷や処理時間が低減できる。   According to the present invention, data stored as a binary number in the nonvolatile memory when the drive unit of the vehicle is stopped is restored as control information of the in-vehicle device in the volatile memory when the drive unit is started. Reading of a decimal number is sufficient, and the processing load and processing time in the restoration process can be reduced.

また前記データの数に応じて、全ての前記異なった2進数値を記述できるビット数を算出する算出ステップを、車両に装備されたコンピュータに実行させるとしてもよい。   Further, a calculation step for calculating the number of bits that can describe all the different binary values in accordance with the number of the data may be executed by a computer installed in the vehicle.

この発明によれば、車両の電子制御装置の揮発性メモリに記憶された複数のデータに異なった2進数を最小のビット数で割り当てる際に、データの数に応じて最小ビット数を自動的に算出する。したがって車両における各種システム構成を変更してもプログラムを変更する必要がなく、システム変更に自動的に適切に対応するプログラムが実現できる。   According to the present invention, when assigning different binary numbers to a plurality of data stored in the volatile memory of the electronic control unit of the vehicle with the minimum number of bits, the minimum number of bits is automatically set according to the number of data. calculate. Therefore, it is not necessary to change the program even if various system configurations in the vehicle are changed, and a program that automatically and appropriately responds to the system change can be realized.

また前記割り当てステップは、車両に装備された電子制御装置が有する揮発性メモリに記憶された、前記車両の車載機器の複数の設定値のそれぞれに対して、異なった2進数を割り当て、その2進数のビット数は、不揮発性メモリに記憶すべき全ての設定値に異なった2進数値を割り当てられる最小のビット数とする設定値割り当てステップを含むとしてもよい。   The assigning step assigns a different binary number to each of a plurality of set values of the in-vehicle device of the vehicle stored in a volatile memory included in an electronic control device mounted on the vehicle, and the binary number The number of bits may include a set value assigning step in which a different binary value is assigned to all the set values to be stored in the nonvolatile memory.

この発明によれば、車両の駆動部の停止時に車載機器の制御状態を示すデータに最小ビット数の2進数を割り当てて不揮発性メモリに記憶するのみでなく、車載機器の設定値にも最小ビット数の2進数を割り当てて不揮発性メモリに記憶する。したがって駆動部停止時に記憶しておくべき重要な制御状態や設定値などの情報を最小ビット数で不揮発性メモリに記憶させることができ、不揮発性メモリの小容量化、記憶処理負荷、処理時間の低減を達成できる。   According to the present invention, not only the binary value of the minimum bit number is assigned to the data indicating the control state of the in-vehicle device when the driving unit of the vehicle is stopped, but also stored in the nonvolatile memory, the minimum bit is also set in the set value of the in-vehicle device. A binary number is assigned and stored in non-volatile memory. Therefore, information such as important control states and setting values that should be stored when the drive unit is stopped can be stored in the nonvolatile memory with the minimum number of bits, and the capacity of the nonvolatile memory, the storage processing load, and the processing time can be reduced. Reduction can be achieved.

またオブジェクト指向のプログラム言語で記述されたプログラムであり、前記制御状態を示すデータは、そのプログラムにおけるオブジェクトであるとしてもよい。   Further, the program may be written in an object-oriented programming language, and the data indicating the control state may be an object in the program.

この発明によれば、オブジェクト指向のプログラム言語で記述されたプログラムにおいて、車載機器の制御状態を示すオブジェクトに最小のビット数の2進数が割り当てられて、車両の駆動部の停止時に不揮発性メモリに記憶される。したがって車載ソフトウェアとして、機能やバリエーションの増加やソフトウェアの再利用性を向上させるための技術としてオブジェクト指向のプログラムが導入された状況において、従来技術のようにオブジェクトのポインタをそのまま記憶したり、データ全体をzip等で圧縮するのではなく、記憶すべきデータのうち圧縮する必要のあるデータのみを最小のビット数で記憶する。よって不揮発性メモリに容量を低減でき、さらには記憶処理における処理負荷や処理時間も低減することができる。特に車載機器の場合、とり得る制御状態の数は相対的に少ない場合が多いため、少ないビット数の2進数に圧縮でき、メモリ容量の制約が厳しい車載組み込みソフトに対して本発明はきわめて有効である。   According to the present invention, in a program written in an object-oriented programming language, a binary number having a minimum number of bits is assigned to an object indicating the control state of an in-vehicle device, and the nonvolatile memory is stored when the driving unit of the vehicle is stopped. Remembered. Therefore, in the situation where object-oriented programs were introduced as in-vehicle software as a technology for increasing functions and variations and improving software reusability, object pointers were stored as they were in the conventional technology, or the entire data Is not compressed with zip or the like, but only the data that needs to be compressed among the data to be stored is stored with the minimum number of bits. Therefore, the capacity of the nonvolatile memory can be reduced, and further, the processing load and processing time in the storage process can be reduced. In particular, in the case of in-vehicle devices, since the number of control states that can be taken is relatively small, the present invention is extremely effective for in-vehicle embedded software that can be compressed to a binary number with a small number of bits and has a severe memory capacity limitation. is there.

また前記2進数値の情報量は前記オブジェクトのポインタの情報量よりも小さいとしてもよい。   The information amount of the binary value may be smaller than the information amount of the object pointer.

この発明によれば、2進数値の情報量はオブジェクトのポインタの情報量よりも小さくするので、車両の電子制御装置の揮発性メモリに記憶された複数のオブジェクトを不揮発性メモリに記憶する際に、オブジェクトのポインタの情報量よりも小さい情報量の2進数で記憶する。したがって従来技術のようにオブジェクトのポインタをそのまま記憶する場合よりも不揮発性メモリに容量を低減でき、さらには記憶処理における処理負荷や処理時間も低減することができる。   According to the present invention, since the information amount of the binary value is made smaller than the information amount of the object pointer, when storing a plurality of objects stored in the volatile memory of the electronic control unit of the vehicle, The binary information having an information amount smaller than the information amount of the object pointer is stored. Therefore, the capacity can be reduced in the nonvolatile memory as compared with the case where the object pointer is stored as it is as in the prior art, and further, the processing load and processing time in the storage processing can be reduced.

本発明の記憶制御システムの一実施例における構成図。The block diagram in one Example of the storage control system of this invention. 車載装置の例を示す図。The figure which shows the example of a vehicle-mounted apparatus. スタックの状態の一例を示す図。The figure which shows an example of the state of a stack. マップ作成処理の第1の例を示すフローチャート。The flowchart which shows the 1st example of map creation processing. マップ作成処理の第2の例を示すフローチャート。The flowchart which shows the 2nd example of map creation processing. 不揮発性メモリへの記憶処理の第1の例を示すフローチャート。The flowchart which shows the 1st example of the memory | storage process to a non-volatile memory. 不揮発性メモリからの復元処理の第1の例を示すフローチャート。The flowchart which shows the 1st example of the decompression | restoration process from a non-volatile memory. 不揮発性メモリへの記憶処理の第2の例を示すフローチャート。The flowchart which shows the 2nd example of the memory | storage process to a non-volatile memory. 不揮発性メモリからの復元処理の第2の例を示すフローチャート。The flowchart which shows the 2nd example of the restoration process from a non-volatile memory. 指数の割り当ての第1の例を示す図。The figure which shows the 1st example of allocation of an index | exponent. 指数の割り当ての第2の例を示す図。The figure which shows the 2nd example of allocation of an index | exponent. 指数の割り当ての第3の例を示す図。The figure which shows the 3rd example of allocation of an index | exponent. 保存データの第1の例を示す図。The figure which shows the 1st example of preserve | saved data. 保存データの第2の例を示す図。The figure which shows the 2nd example of preserve | saved data. 従来技術における保存データの例を示す図。The figure which shows the example of the preservation | save data in a prior art.

以下、本発明の実施形態を図面を参照しつつ説明する。まず図1は、本発明に係る記憶制御システムの装置構成の概略図である。   Embodiments of the present invention will be described below with reference to the drawings. First, FIG. 1 is a schematic diagram of an apparatus configuration of a storage control system according to the present invention.

本発明に係る記憶制御システムは、車両2に、ECU2と、ECU2によって制御される車載装置3とを備える。また車両2はイグニッションスイッチ4と駆動部40を備える。駆動部40は例えばエンジンや電気的モータなどからなって車両の進行のために車輪を駆動する。ユーザがイグニッションスイッチ4をオン操作することにより駆動部40が始動する。   The storage control system according to the present invention includes an ECU 2 and a vehicle-mounted device 3 controlled by the ECU 2 in a vehicle 2. The vehicle 2 includes an ignition switch 4 and a drive unit 40. The drive part 40 consists of an engine, an electric motor, etc., for example, and drives a wheel for advancing of a vehicle. When the user turns on the ignition switch 4, the drive unit 40 is started.

ECU2は、通常のコンピュータと同様の構造を有し、CPU20、RAM21、不揮発性メモリ22を備える。CPU20は車載装置3の制御に関する情報処理を行い、RAM21はCPU20の作業領域として機能する揮発性の記憶部(メモリ)である。不揮発性メモリ22は、例えばEEPROMなどによる不揮発性の記憶部であり、車載装置3の制御に関する各種データやプログラムを記憶する。   The ECU 2 has the same structure as a normal computer and includes a CPU 20, a RAM 21, and a nonvolatile memory 22. The CPU 20 performs information processing related to the control of the in-vehicle device 3, and the RAM 21 is a volatile storage unit (memory) that functions as a work area of the CPU 20. The nonvolatile memory 22 is a nonvolatile storage unit such as an EEPROM, and stores various data and programs related to the control of the in-vehicle device 3.

不揮発性メモリ22は、制御プログラム23、保存プログラム24、保存データ25を記憶(保存、格納)している。制御プログラム23は、車載装置3の制御を司るプログラムである。保存プログラム24は、RAM21に記憶された車載装置3の制御に関係する情報(のうちの一部)を不揮発性メモリ22に保存する処理を司るプログラムである。制御プログラム23と保存プログラム24とはRAM21にロードされてCPU20によって自動的に実行されるとすればよい。保存データ25は保存プログラム24を実行することによってRAM21から不揮発性メモリ22に移されるデータ(情報)である(詳細は後述)。   The nonvolatile memory 22 stores (saves and stores) a control program 23, a save program 24, and save data 25. The control program 23 is a program that controls the in-vehicle device 3. The storage program 24 is a program that manages processing for storing, in the nonvolatile memory 22, information related to the control of the in-vehicle device 3 stored in the RAM 21 (a part of the information). The control program 23 and the storage program 24 may be loaded into the RAM 21 and automatically executed by the CPU 20. The stored data 25 is data (information) transferred from the RAM 21 to the nonvolatile memory 22 by executing the storage program 24 (details will be described later).

制御プログラム23は、オブジェクト指向のプログラム言語(例えばJava(登録商標)、C++など)によって記述されたプログラムである。したがって制御プログラム23は、(複数の)オブジェクト230a、230b、230c、・・を含む。個々のオブジェクト230a、230b、230c等は具体的には、例えば車載装置3のコンポーネント(後述)や車載装置3そのものや、その機能(あるいは制御状態)をプログラム内で表現したものとすればよい。   The control program 23 is a program described in an object-oriented program language (for example, Java (registered trademark), C ++, etc.). Therefore, the control program 23 includes (a plurality of) objects 230a, 230b, 230c,. Specifically, each of the objects 230a, 230b, 230c, and the like may be expressed in a program such as a component of the in-vehicle device 3 (described later), the in-vehicle device 3 itself, and its function (or control state).

また制御プログラム23は、例えばスタック231や設定値関数232a、232b等を含む。スタック231は、例えば車載装置3における特定のコンポーネントにおける操作(機能、制御状態)の履歴を記憶する。設定値関数232a、232b等は車載装置3における各種設定値を表すプログラム内の関数(例えばオブジェクトが属するクラスで定義されたメンバ関数)である。   The control program 23 includes, for example, a stack 231 and set value functions 232a and 232b. The stack 231 stores, for example, a history of operations (functions, control states) in specific components in the in-vehicle device 3. The set value functions 232a, 232b, etc. are functions in the program (for example, member functions defined by the class to which the object belongs) representing various set values in the in-vehicle device 3.

スタック231の例が図3に示されている。同図の例においては、オブジェクト230aから230fを車載エアコン装置における機能A、機能B、機能C、機能D、機能E、機能Fとしている。機能Aなどは具体的には、例えばオート機能などとすればよい。   An example of the stack 231 is shown in FIG. In the example of the figure, the objects 230a to 230f are function A, function B, function C, function D, function E, and function F in the in-vehicle air conditioner. Specifically, the function A and the like may be an auto function, for example.

スタック231はFILO(First In Last Out)の仕組みによって、機能A、機能B、機能C、機能D、機能E、機能Fのうちでユーザから選択された機能が、時間的に先のものほど図示下側に記憶されることにより例えば車載エアコン装置の制御状態の時間的推移が記憶される。図3の例ではユーザは順に機能A、機能D、機能Cを選択しており、その履歴がスタック231に記憶されている。   In the stack 231, the function selected from the user among the function A, function B, function C, function D, function E, and function F by the FILO (First In Last Out) mechanism is illustrated as the earlier in time. By storing in the lower side, for example, the temporal transition of the control state of the in-vehicle air conditioner is stored. In the example of FIG. 3, the user sequentially selects function A, function D, and function C, and the history is stored in the stack 231.

図1に戻って、車載装置3は車両2に装備された各種装置である。車載装置3の1つの具体例として図2に示された車載エアコン装置3aがある。車載エアコン装置3aは、車両2の車室内の空調を制御する。車載エアコン装置3aは、その部分的な構成部位(コンポーネント)を有する。コンポーネント30、31、32等の例として、ユーザが所望の車内温度を設定する温度設定部33、内外気の切替を行う吸込口34などを備える。以上の構成は車内通信によって接続されて情報の受け渡しが可能となっている。   Returning to FIG. 1, the in-vehicle device 3 is various devices equipped in the vehicle 2. One specific example of the in-vehicle device 3 is the in-vehicle air conditioner 3a shown in FIG. The in-vehicle air conditioner 3 a controls the air conditioning in the passenger compartment of the vehicle 2. The in-vehicle air conditioner 3a has a partial component (component). Examples of the components 30, 31, 32, and the like include a temperature setting unit 33 for setting a desired in-vehicle temperature, a suction port 34 for switching between inside and outside air, and the like. The above configuration is connected by in-vehicle communication and can exchange information.

図1の構成のもとで記憶制御システムは、車両1のイグニッションオフ時に、RAM21(揮発性メモリ)から不揮発性メモリ22に所定の車両情報を圧縮して保存データ25として移動して保存させる。そして再度イグニッションをオン操作したときに保存データ25をRAM21に復元して戻す。保存プログラム24が以上の保存、復元処理を実行する。保存プログラム24による処理手順例が図4から図9に示されている。   With the configuration of FIG. 1, the storage control system compresses predetermined vehicle information from the RAM 21 (volatile memory) to the nonvolatile memory 22 and moves it as saved data 25 when the vehicle 1 is turned off. When the ignition is turned on again, the saved data 25 is restored to the RAM 21 and returned. The storage program 24 executes the above storage and restoration processes. Examples of processing procedures by the storage program 24 are shown in FIGS.

まず図4はマップ作成のための処理手順例を示す。ここでマップとは、不揮発性メモリ22への車両情報の記憶、不揮発性メモリ22からの車両情報の復元のために必要となる情報(の集まり)である。具体的には例えば、スタック231のサイズ、スタック231を使用するオブジェクト数、スタック231を使用する各オブジェクトに割り当てられた番号(あるいは指数)、不揮発性メモリ22における記憶開始場所(開始バイト位置とその中での開始ビット位置)等である。   First, FIG. 4 shows an example of a processing procedure for creating a map. Here, the map is information (collection) required for storing vehicle information in the nonvolatile memory 22 and restoring vehicle information from the nonvolatile memory 22. Specifically, for example, the size of the stack 231, the number of objects using the stack 231, the number (or index) assigned to each object using the stack 231, the storage start location in the nonvolatile memory 22 (start byte position and its number) The start bit position in).

図4の処理ではまずS10で、不揮発性メモリ22に記憶させる1組の情報を指定する。ここで1組の情報とは、車両の情報、あるいは車載装置3に関する情報とすればよい。図1の例の場合、例えばスタック231の状態が1組の情報であり、設定値関数232a、232bの数値が別の1組の情報である。なお1組の情報は複数の情報を有するものには限定せず、1個の情報のみを有するものも含むとする。   In the process of FIG. 4, first, in S10, a set of information to be stored in the nonvolatile memory 22 is designated. Here, the set of information may be vehicle information or information on the in-vehicle device 3. In the example of FIG. 1, for example, the state of the stack 231 is one set of information, and the numerical values of the setting value functions 232a and 232b are another set of information. Note that one set of information is not limited to information having a plurality of information, but includes information having only one information.

次にS20で不揮発性メモリ22における記憶開始場所を指定する。記憶開始場所は具体的には、開始バイト位置と、そのなかでの開始ビット位置とすればよい。   Next, the storage start location in the nonvolatile memory 22 is designated in S20. Specifically, the storage start location may be a start byte position and a start bit position in the start byte position.

次にS30で記憶させる複数の情報に指数(番号)を割り振る。その例が図10から図12に示されている。図10の例では、スタック231に格納される可能性のある機能Aから機能Fに、指数1から6が割り振られている。図11の例では、設定値関数232aとしての設定温度において、摂氏16度から32度までに、指数1から17が割り振られている。図12の例では、設定値関数232bとしての吸込口状態において、内気、外気、半内気にそれぞれ指数1から3が割り振られている。   Next, an index (number) is assigned to a plurality of information stored in S30. Examples thereof are shown in FIGS. In the example of FIG. 10, indices 1 to 6 are assigned to functions A to F that may be stored in the stack 231. In the example of FIG. 11, indexes 1 to 17 are assigned from 16 degrees to 32 degrees Celsius at the set temperature as the set value function 232 a. In the example of FIG. 12, in the suction port state as the set value function 232b, indices 1 to 3 are assigned to the inside air, the outside air, and the semi-inside air, respectively.

図4に戻って、次にS40で指数を2進数化する際のビット数を指定する。そしてS50で記憶する各情報の指数を2進数化(あるいは2進数に変換)する。その際、S40で指定したビット数の2進数とする。   Returning to FIG. 4, next, the number of bits for binarizing the exponent is designated in S40. Then, the exponent of each information stored in S50 is binarized (or converted into a binary number). At this time, the binary number having the number of bits designated in S40 is used.

図10の例では、機能Aから機能Fの指数1から6は、3ビットの2進数で表現できるので、001から110の2進数に変換されている。図11の例では、摂氏16度から32度までの指数1から17は5ビットの2進数で表現できるので、00001から10001の2進数に変換されている。図12の例では、内気、外気、半内気の指数1から3は2ビットの2進数で表現できるので、01から11の2進数に変換されている。   In the example of FIG. 10, the indices 1 to 6 of the function A to the function F can be expressed by 3-bit binary numbers, and are thus converted into binary numbers of 001 to 110. In the example of FIG. 11, indexes 1 to 17 from 16 degrees to 32 degrees Celsius can be expressed by 5-bit binary numbers, and are converted to binary numbers from 00001 to 10001. In the example of FIG. 12, the exponents 1 to 3 of the inside air, the outside air, and the semi-inside air can be expressed by 2-bit binary numbers, and are thus converted into binary numbers from 01 to 11.

以上が図4の処理手順である。図4の処理では1組の情報ごとに指数を割り振り、その指数の2進数表現の際のビット数(記憶ビット数)を決定している。したがって図10から図12の例のように、例えばスタックの状態に対しては記憶ビット数は3、設定温度に対しては記憶ビット数は5、吸込口状態に対しては記憶ビット数は2と設定される。   The above is the processing procedure of FIG. In the processing of FIG. 4, an exponent is assigned to each set of information, and the number of bits (the number of stored bits) in the binary representation of the exponent is determined. Accordingly, as in the examples of FIGS. 10 to 12, for example, the number of storage bits is 3 for the stack state, the storage bit number is 5 for the set temperature, and the storage bit number is 2 for the inlet state. Is set.

なお図10から図12の例は全てのデータに指数が割り振ってある例だが、本発明はこれに限定せず、例えば重要度が低く、不揮発性メモリ22に記憶する必要性が低い(記憶しない)データには指数を割り振らなくともよい。   Note that the examples in FIGS. 10 to 12 are examples in which indexes are assigned to all data, but the present invention is not limited to this. For example, the degree of importance is low and the necessity of storing in the nonvolatile memory 22 is low (not stored) ) Data does not have to be assigned an index.

次に、図5の処理手順は図4におけるS40をS41からS44の手順に置き換えたものとなっている。図4では、保存プログラムを作成するプログラム側で、指数の2進数表現におけるビット数を指定したが、図5では、保存プログラム内で最小ビット数を算出する。以下で図4と異なる部分のみを説明する。   Next, the processing procedure in FIG. 5 is obtained by replacing S40 in FIG. 4 with the procedure from S41 to S44. In FIG. 4, the number of bits in the binary representation of the exponent is specified on the program creating the storage program, but in FIG. 5, the minimum number of bits is calculated in the storage program. Only the parts different from FIG. 4 will be described below.

具体的にまずS41では変数bitSizeを1に設定する。そしてS42で、2のbitSize乗から1を減算した数値が指数の最大値(例えば図10の例ならば6)以上であるか否かを判定する。指数の最大値以上の場合(S42:YES)はS44に進み、指数の最大値未満の場合(S42:NO)はS43に進む。S43に進んだら変数bitSizeの値を1増加させて、再びS42に戻り、S42がYESになるまで同じ手順を繰り返す。S44に進んだら、その時点での変数bitSizeの値を、記憶する2進数のビット数とする。   Specifically, first, in step S41, the variable bitSize is set to 1. Then, in S42, it is determined whether or not the numerical value obtained by subtracting 1 from 2 to the power of bitSize is equal to or larger than the maximum value of the exponent (for example, 6 in the example of FIG. 10). If it is equal to or greater than the maximum value of the index (S42: YES), the process proceeds to S44, and if it is less than the maximum value of the index (S42: NO), the process proceeds to S43. When the process proceeds to S43, the value of the variable bitSize is incremented by 1, the process returns to S42 again, and the same procedure is repeated until S42 becomes YES. After proceeding to S44, the value of the variable bitSize at that time is set as the number of binary bits to be stored.

以上が図5の処理手順である。図5の場合、例えばスタック231に記憶される機能数が変更された場合にも自動的に最小な記憶ビット数を算出するので、システム変更に対して自動的にかつ適切に対応できる。   The above is the processing procedure of FIG. In the case of FIG. 5, for example, even when the number of functions stored in the stack 231 is changed, the minimum number of stored bits is automatically calculated, so that it is possible to automatically and appropriately cope with a system change.

次に、図6から図9を説明する。図6および図8には不揮発性メモリ22への圧縮保存処理の手順が、図7および図9には不揮発性メモリ22からの復元処理の手順が示されている。ただし、図6および図7においては記憶ビット数とデータ記憶位置をプログラム内で固定された数値とし、図8および図9においては記憶ビット数とデータ記憶位置を圧縮時に算出する。図6および図7は図4と組み合わされ、図8および図9は図5と組み合わされるとすればよい。   Next, FIGS. 6 to 9 will be described. 6 and 8 show the procedure of the compression and storage process in the nonvolatile memory 22, and FIGS. 7 and 9 show the procedure of the restoration process from the nonvolatile memory 22. However, in FIGS. 6 and 7, the number of stored bits and the data storage position are numerical values fixed in the program, and in FIGS. 8 and 9, the number of stored bits and the data storage position are calculated at the time of compression. 6 and 7 may be combined with FIG. 4, and FIGS. 8 and 9 may be combined with FIG.

まず図6を説明する。図6には、イグニッションオフ時にRAM21内の所定の情報を不揮発性メモリ22へ記憶する処理の手順が示されている。図6の処理手順はイグニッションスイッチ4がオフされたら自動的に開始されるようにすればよい。   First, FIG. 6 will be described. FIG. 6 shows a procedure of processing for storing predetermined information in the RAM 21 in the nonvolatile memory 22 when the ignition is turned off. The processing procedure of FIG. 6 may be automatically started when the ignition switch 4 is turned off.

図6の処理ではまずS100でCPU20は保存データを0に初期化する。次にS110でCPU20は、保存データ25として記憶させる情報(上記の1組の情報)を取得する。次にS120でCPU20は、S110で取得した情報の不揮発性メモリ22における記憶開始場所を指定する。これは記憶する情報が何であるかに応じて予め決めておけばよい。   In the process of FIG. 6, first, the CPU 20 initializes stored data to 0 in S100. Next, in S110, the CPU 20 acquires information to be stored as the saved data 25 (the set of information described above). Next, in S120, the CPU 20 designates a storage start location in the nonvolatile memory 22 of the information acquired in S110. This may be determined in advance according to what information is stored.

次にS130でCPU20は、情報から1つのデータ(元データ)を取得する。1つの元データとは、例えば上述の例では、スタック231に格納された1個の機能(機能Cなど)である。下記の変換の前のデータを元データと呼称している。   Next, in S130, the CPU 20 acquires one piece of data (original data) from the information. One original data is, for example, one function (function C or the like) stored in the stack 231 in the above example. The data before the following conversion is called original data.

次にS140でCPU20は、元データに上述のS30で指数が割り当てられているか否かを判定する。指数が割り当てられている場合(S140:YES)はS150に進み、指数が割り当てられていない場合(S140:NO)はS160に進む。   Next, in S140, the CPU 20 determines whether or not an index is assigned to the original data in S30 described above. If an index is assigned (S140: YES), the process proceeds to S150, and if an index is not assigned (S140: NO), the process proceeds to S160.

S150に進んだらCPU20は、不揮発性メモリ22に記憶するために元データを変換する。具体的には、元データに割り振られた指数を変換後のデータ(以下、変換データ)とする。そしてS170でCPU20は、変換データを記憶ビットサイズの2進数に圧縮する。この処理で取得される2進数は上述のS50で定めた2進数とすればよい。   After proceeding to S150, the CPU 20 converts the original data to be stored in the nonvolatile memory 22. Specifically, the index assigned to the original data is converted data (hereinafter referred to as converted data). In S170, the CPU 20 compresses the converted data into a binary number having a storage bit size. The binary number acquired in this process may be the binary number determined in S50 described above.

一方S160に進んだらCPU20は、指数が割り当てられていないデータを無視して、次のデータを詰めるか否かを判定する。次のデータを詰める場合(S160:YES)は、変換データに何の操作も施さずにS210へ進む。次のデータを詰めない場合(S160:NO)は、S180に進んで変換データをゼロとする。S180が終了したらS190へ進む。   On the other hand, when the process proceeds to S160, the CPU 20 ignores the data to which no index is assigned and determines whether or not to pack the next data. When the next data is packed (S160: YES), the process proceeds to S210 without performing any operation on the converted data. When the next data is not packed (S160: NO), the process proceeds to S180 and the converted data is set to zero. When S180 ends, the process proceeds to S190.

S190でCPU20は、保存データを記憶ビットサイズ分左にシフトする。そしてS200で、シフトの結果右側に空いたビットに、変換データが圧縮された2進数を代入する。そしてS210でCPU20は、圧縮していないデータがまだあるか否かを判定する。圧縮していないデータがまだある場合(S210:YES)はS130へ戻って上記手順を繰り返す。圧縮していないデータがない場合(S210:NO)はS220へ進む。   In S190, the CPU 20 shifts the stored data to the left by the storage bit size. In step S200, a binary number in which the converted data is compressed is substituted into a bit vacated on the right side as a result of the shift. In S210, the CPU 20 determines whether there is still uncompressed data. If there is still uncompressed data (S210: YES), the process returns to S130 and the above procedure is repeated. If there is no uncompressed data (S210: NO), the process proceeds to S220.

S220でCPU20は、以上の処理によりRAM21内で作成した保存データ25を不揮発性メモリ22に記憶させる。次にS230でCPU20は、圧縮していない情報(上述の1組の情報)がまだあるか否かを判定する。圧縮していない情報がまだある場合(S230:YES)はS100に戻って上記手順を繰り返す。圧縮していない情報がもうない場合(S230:NO)は図6の処理を終了する。   In S <b> 220, the CPU 20 stores the saved data 25 created in the RAM 21 by the above processing in the nonvolatile memory 22. Next, in S230, the CPU 20 determines whether there is still uncompressed information (the above-mentioned set of information). If there is still uncompressed information (S230: YES), the process returns to S100 and the above procedure is repeated. If there is no more uncompressed information (S230: NO), the process of FIG. 6 is terminated.

以上述べた図6の処理では、予めエンジニア(プログラマ)が保存プログラム24内に、設定された記憶ビットサイズを記述しておき、それにしたがって各データに2進数が指定されて、それが不揮発性メモリ22に記憶される。したがって予め記憶ビットサイズが設定されており、相対的に簡略化された処理となる。この場合、保存プログラム24は、図4と図6(と図7)を組み合わせて作成すればよい。   In the processing of FIG. 6 described above, an engineer (programmer) describes the set storage bit size in the storage program 24 in advance, and a binary number is designated for each data accordingly, and this is stored in the nonvolatile memory. 22 is stored. Therefore, the storage bit size is set in advance, and the process is relatively simplified. In this case, the storage program 24 may be created by combining FIGS. 4 and 6 (and FIG. 7).

次に図7を説明する。図7には、再度イグニッションオンにした時に不揮発性メモリ22内の保存データ25を復元してRAM21へ戻す処理の手順が示されている。図7の処理はイグニッションスイッチ4がオンされたら自動的に開始されるようにすればよい。   Next, FIG. 7 will be described. FIG. 7 shows a procedure of processing for restoring the stored data 25 in the nonvolatile memory 22 and returning it to the RAM 21 when the ignition is turned on again. The process in FIG. 7 may be automatically started when the ignition switch 4 is turned on.

図7の処理ではまずS300でCPU20は、保存データ25のなかの復元する情報(上述の1組の情報)を指定する。次にS310でCPU20は、S20で指定された情報の保存データ25内における記憶開始場所(開始バイト位置と、そのなかの開始ビット位置)の情報を取得する。   In the process of FIG. 7, first, in S300, the CPU 20 designates information to be restored (the above-mentioned set of information) in the saved data 25. Next, in S310, the CPU 20 acquires information on the storage start location (start byte position and start bit position in the storage data 25) of the information specified in S20.

次にS320でCPU20は、S310で取得された位置から記憶ビットサイズ分の2進数を取得する。そしてS330でCPU20は、取得した2進数に指数が割り振られている否かを判定する。指数が割り振られている場合(S330:YES)はS340に進み、指数が割り振られていない場合(S330:NO)はS350に進む。   Next, in S320, the CPU 20 acquires a binary number corresponding to the storage bit size from the position acquired in S310. In S330, the CPU 20 determines whether or not an exponent is allocated to the acquired binary number. If an index is allocated (S330: YES), the process proceeds to S340, and if an index is not allocated (S330: NO), the process proceeds to S350.

S340に進んだらCPU20は、取得したデータの指数から元データを復元する。具体的には例えば図10から図12に示されたような、データと2進数の関係からデータ(元データ)を復元する。S350に進んだ場合、CPU20は元データを0とする。続いてS360でCPU20は、元データをRAM21に戻す。   After proceeding to S340, the CPU 20 restores the original data from the acquired data index. Specifically, for example, data (original data) is restored from the relationship between data and binary numbers as shown in FIGS. When the process proceeds to S350, the CPU 20 sets the original data to 0. Subsequently, in S360, the CPU 20 returns the original data to the RAM 21.

そしてS370でCPU20は、復元するデータのうちで復元していない記憶ビットサイズ分の2進数がまだあるか否かを判定する。復元していない2進数データがまだある場合(S370:YES)は、S320に戻って上記処理を繰り返す。復元していない2進数データがもうない場合(S370:NO)は、S390に進む。   In S370, the CPU 20 determines whether there is still a binary number corresponding to the storage bit size that has not been restored among the data to be restored. If there is still binary data that has not been restored (S370: YES), the process returns to S320 and the above process is repeated. If there is no binary data that has not been restored (S370: NO), the process proceeds to S390.

S390に進んだらCPU20は、不揮発性メモリ22内の保存データ25のなかに復元されていない情報(上述の1組の情報)がまだあるか否かを判定する。復元されていない情報がまだある場合(S390:YES)はS300に戻って上記処理を繰り返す。保存データ25がすべて復元された場合(S390:NO)は図7の処理を終了する。   After proceeding to S390, the CPU 20 determines whether there is still unrestored information (the above-mentioned set of information) in the stored data 25 in the nonvolatile memory 22. If there is still information that has not been restored (S390: YES), the process returns to S300 and the above process is repeated. If all the saved data 25 has been restored (S390: NO), the processing in FIG. 7 ends.

以上が図7の処理手順である。図7の処理では、予めエンジニア(プログラマ)が保存プログラム24内に、設定された記憶ビットサイズを記述しておき、それにしたがって不揮発性メモリ22に2進数として記憶された各データがRAM21に復元される。したがって予め記憶ビットサイズが設定されており、相対的に簡略化された処理となる。   The above is the processing procedure of FIG. In the processing of FIG. 7, an engineer (programmer) describes the set storage bit size in advance in the storage program 24, and each data stored as a binary number in the nonvolatile memory 22 is restored to the RAM 21 accordingly. The Therefore, the storage bit size is set in advance, and the process is relatively simplified.

次に図8を説明する。図8には記憶ビット数とデータ記憶位置を圧縮時に算出するタイプの、不揮発性メモリ22への圧縮保存処理の手順が示されている。図8の処理手順は、図6の処理手順においてS125およびS211、S212を付加したものである。以下で図6と異なる部分を説明する。   Next, FIG. 8 will be described. FIG. 8 shows the procedure of compression storage processing in the nonvolatile memory 22 of the type for calculating the number of storage bits and the data storage position at the time of compression. The processing procedure of FIG. 8 is obtained by adding S125, S211 and S212 to the processing procedure of FIG. Hereinafter, parts different from FIG. 6 will be described.

図8のS125では、CPU20は指数の最大値(最大数)から記憶ビットサイズを算出する。この算出処理は、図5(におけるS41からS44)によって実行すればよい。   In S125 of FIG. 8, the CPU 20 calculates the storage bit size from the maximum value (maximum number) of the exponent. This calculation process may be executed according to FIG. 5 (S41 to S44).

図8のS211、S212では、保存データ中における種類の異なる情報(図1の例では例えばスタック231と設定値関数232aと設定値関数232bとが種類の異なる情報である)の間に、間であることを示すしるしのビットデータを挿入するための処理を実行する。要するに保存プログラム24は、不揮発性メモリに記憶する情報において、1組の前記複数のオブジェクトと別の組の複数のオブジェクトの間に、間であることを示すビットデータを挿入する挿入ステップを備える。具体的には、まずS211でCPU20は、保存データをしるしのビットサイズ分左にシフトする。次にS212でCPU20は、しるしのビットデータを左シフトで右側に空いたビットに代入する。しるしのビットデータは具体的には、例えばビットサイズの桁数での最大値や、ビットサイズの桁数でゼロなどとすればよい。   In S211 and S212 of FIG. 8, between different types of information in the stored data (in the example of FIG. 1, for example, the stack 231, the set value function 232a, and the set value function 232b are different types of information) A process for inserting bit data of an indicia indicating the presence is executed. In short, the storage program 24 includes an insertion step of inserting bit data indicating that there is a gap between one set of the plurality of objects and another set of the plurality of objects in the information stored in the nonvolatile memory. Specifically, first, in S211, the CPU 20 shifts the stored data to the left by the bit size of the mark. Next, in S212, the CPU 20 substitutes the bit data of the sign into the bit left on the right side by the left shift. Specifically, the sign bit data may be set to, for example, a maximum value in the number of digits of the bit size or zero in the number of digits of the bit size.

以上が図8の図6からの変更部分である。図8の処理では、不揮発性メモリ22に保存データ25を記憶する際に、記憶する情報(1組の情報)ごとにそのつど記憶ビット数を算出して、その記憶ビット数の2進数を記憶していくとともに、保存データ25内のある1組の情報と別の1組の情報の間にしるしを格納して、情報の区切りを明確化する。したがって車両1において各種システム変更を行っても保存プログラム24を書き換える必要はなく、システム変更に柔軟に対応して、最適な記憶ビット数を自動的に算出する。   The above is the change from FIG. 6 in FIG. In the process of FIG. 8, when storing the saved data 25 in the nonvolatile memory 22, the number of stored bits is calculated for each stored information (a set of information) and the binary number of the stored bits is stored. At the same time, a mark is stored between one set of information in the stored data 25 and another set of information to clarify the delimiter of the information. Therefore, even if various system changes are made in the vehicle 1, it is not necessary to rewrite the storage program 24, and the optimum number of stored bits is automatically calculated in response to the system change flexibly.

次に図9を説明する。図9には、記憶ビット数とデータ記憶位置を圧縮時に算出するタイプの、不揮発性メモリ22からRAM21への復元処理の手順が示されている。図9の処理手順は、図7の処理手順においてS315を付加し、S370をS325に変更したものである。以下で図7と異なる部分を説明する。   Next, FIG. 9 will be described. FIG. 9 shows the procedure of the restoration process from the nonvolatile memory 22 to the RAM 21 of the type for calculating the number of storage bits and the data storage position at the time of compression. The processing procedure of FIG. 9 is obtained by adding S315 in the processing procedure of FIG. 7 and changing S370 to S325. Hereinafter, parts different from FIG. 7 will be described.

図9のS315では、CPU20は指数の最大値(最大数)から記憶ビットサイズを算出する。この算出処理は、図5(におけるS41からS44)によって実行すればよい。   In S315 of FIG. 9, the CPU 20 calculates the storage bit size from the maximum value (maximum number) of the exponent. This calculation process may be executed according to FIG. 5 (S41 to S44).

図9のS325は、S320の次に処理され、取得したデータがしるしであるか否かを判定する。取得したデータがしるしである場合(S325:YES)はS390に進み、取得したデータがしるしでない場合(S325:NO)はS330に進む。   S325 in FIG. 9 is processed next to S320, and it is determined whether or not the acquired data is an indication. If the acquired data is a sign (S325: YES), the process proceeds to S390, and if the acquired data is not a sign (S325: NO), the process proceeds to S330.

以上のとおり、図9の処理では、保存された情報の記憶ビットサイズの情報は用いず、異なった情報間の区切りとしてしるしを用いて、しるしを取得したら1つの情報の復元が終了したと認識する。したがって図8と同様、車両1において各種システム変更を行っても保存プログラム24を書き換える必要はなく、システム変更に柔軟に対応して、最適な記憶ビット数が自動的に算出されて、それに応じて復元処理が実行される。以上の場合、保存プログラム24は、図5、図8、図9を組み合わせて作成すればよい。   As described above, in the process of FIG. 9, the storage bit size information of the stored information is not used, but when the indicia is acquired as a delimiter between different pieces of information, it is recognized that the restoration of one information is completed. To do. Therefore, as in FIG. 8, it is not necessary to rewrite the storage program 24 even if various system changes are made in the vehicle 1, and the optimum number of storage bits is automatically calculated in response to the system change flexibly, and accordingly A restoration process is executed. In the above case, the storage program 24 may be created by combining FIG. 5, FIG. 8, and FIG.

図14には、図10の2進数表現を用いて図3のスタックを保存した保存データ25の例が示されている。図3のスタック231の格納状態は、順に機能A、機能D、機能C、空、なので、図12に示されているように、順に「001」、「100」、「011」、「000」を記憶する。図12の例では空を「000」としているが、図10に示された2進数以外ならばよい。   FIG. 14 shows an example of saved data 25 in which the stack of FIG. 3 is saved using the binary representation of FIG. Since the storage states of the stack 231 in FIG. 3 are function A, function D, function C, and empty in order, as shown in FIG. 12, “001”, “100”, “011”, “000” are sequentially displayed. Remember. In the example of FIG. 12, the sky is set to “000”, but it may be other than the binary number shown in FIG.

図15には、従来技術における図3のスタックの場合の保存データ25の例が示されている。従来技術では、図3のスタック231を記憶する場合、機能A、機能D、機能Cのポインタ(オブジェクト指向のプログラム言語においてオブジェクトのメモリ内のアドレスを示す変数)を保存データとするが、通常ポインタは4バイトの情報なので、図15のとおり、図3のスタックの状態の記憶のために合計16バイト必要となる。これに対して本発明の図14の例では、図3のスタックの状態の記憶のために合計12ビットしか使用しておらず、情報量が約10分の1となっている。したがって不揮発性メモリ22の小容量化や、保存処理の処理負荷、処理時間の低減が実現できる。   FIG. 15 shows an example of saved data 25 in the case of the stack of FIG. 3 in the prior art. In the prior art, when storing the stack 231 of FIG. 3, the pointers of the functions A, D, and C (variables indicating the addresses in the object memory in the object-oriented programming language) are stored data. Is 4 bytes of information, and as shown in FIG. 15, a total of 16 bytes are required to store the stack state of FIG. On the other hand, in the example of FIG. 14 of the present invention, only a total of 12 bits are used for storing the state of the stack of FIG. 3, and the information amount is about 1/10. Therefore, it is possible to reduce the capacity of the nonvolatile memory 22 and to reduce the processing load and processing time of the storage process.

なお保存データ25は図14ではなく図13のようにしてもよい。図13の例では、スタック231に格納された機能A、機能D、機能C、空、の指数を保存データ25内に順に記憶している(なおここでは空の指数を0としている)。通常、指数である整数値は1バイトの情報なので、図13の例では合計4バイト使用される。したがって図15の従来技術よりは情報量が4分の1に低減でき、不揮発性メモリ22を小容量化できる。(なお図13との比較においても図14は不揮発性メモリ22に記憶する情報量が低減される。すなわち図14における記憶ビット数の2進数の情報量はオブジェクトに割り振った指数(整数値)の情報量よりも小さい。要するに、この場合2進数の情報量はオブジェクトに番号付けられた整数値の情報量よりも小さい。)   The stored data 25 may be as shown in FIG. 13 instead of FIG. In the example of FIG. 13, the indices of function A, function D, function C, and empty stored in the stack 231 are stored in order in the saved data 25 (note that the empty index is 0 here). Normally, an integer value that is an exponent is 1 byte of information, so a total of 4 bytes are used in the example of FIG. Therefore, the amount of information can be reduced to a quarter of that of the prior art of FIG. 15, and the capacity of the nonvolatile memory 22 can be reduced. (Also in comparison with FIG. 13, the amount of information stored in the nonvolatile memory 22 is reduced in FIG. 14. That is, the binary information amount in FIG. 14 is the index (integer value) assigned to the object. (In this case, the binary information amount is smaller than the integer information number assigned to the object.)

発明者の知見によれば、各種の車載装置3に対して、上述の指数の最大数は大半は7以下、8から15は1割もなく、16から30はほとんどない。記憶ビット数で言えば、大半が3ビットであり、4ビットは1割もなく、5ビットはほとんどない。したがって本発明の手法で最小ビット数の2進数に圧縮した場合、良好な圧縮率が達成できる。   According to the inventor's knowledge, the maximum number of the above-mentioned indexes is almost 7 or less, 8 to 15 is not 10%, and 16 to 30 is hardly found for various on-vehicle devices 3. In terms of the number of stored bits, most are 3 bits, 4 bits are not 10%, and 5 bits are almost none. Therefore, a good compression ratio can be achieved when the binary number having the minimum number of bits is compressed by the method of the present invention.

上記実施例では、制御プログラム23、保存プログラム24をオブジェクト指向のプログラム言語で記述されたプログラムとしたが、本発明はこうした実施形態に限定されない。本発明では、車両に装備された電子制御装置が有する揮発性メモリに記憶された、車両の車載機器の制御状態を示す複数のデータのそれぞれに対して異なった2進数を割り当て、その2進数のビット数は全てのデータに異なった2進数値を割り当てられる最小のビット数とする割り当てステップと、車両の駆動部の停止時に、車両に備えられた不揮発性メモリに、割り当てステップで求められた2進数値を記憶する記憶ステップと、を車両に装備されたコンピュータに実行させることを特徴とする。   In the above embodiment, the control program 23 and the storage program 24 are programs described in an object-oriented programming language, but the present invention is not limited to such an embodiment. In the present invention, a different binary number is assigned to each of a plurality of data indicating the control state of the in-vehicle device of the vehicle, which is stored in a volatile memory included in the electronic control device installed in the vehicle, and the binary number The number of bits is determined by the assignment step in the assignment step to set the minimum number of bits to which different binary values can be assigned to all data, and the assignment step in the nonvolatile memory provided in the vehicle when the vehicle drive unit is stopped. A storage step of storing a decimal value is executed by a computer installed in the vehicle.

当然オブジェクト指向のプログラム言語でない場合でも、上記のように図11、図12に示された設定温度や吸込口状態に対応する2進数表現をイグニッションオフ時に不揮発性メモリ22に記憶すればよい。またプログラム内で図10に示された各機能がオブジェクトとして記述されていない場合でも、イグニッションオフ時にスタック231の状態を記憶する際に、上記のようにスタック内の各機能の2進数表現を不揮発性メモリ22に記憶すればよい。   Naturally, even if it is not an object-oriented programming language, the binary expression corresponding to the set temperature and the suction port state shown in FIGS. 11 and 12 may be stored in the nonvolatile memory 22 when the ignition is turned off. Further, even when each function shown in FIG. 10 is not described as an object in the program, when storing the state of the stack 231 when the ignition is turned off, the binary number representation of each function in the stack is nonvolatile as described above. May be stored in the memory 22.

1 車両
2 ECU(電子制御装置)
3 車載装置(車載機器)
21 RAM(揮発性メモリ)
22 不揮発性メモリ
23 制御プログラム
24 保存プログラム
25 保存データ
1 Vehicle 2 ECU (Electronic Control Device)
3 On-vehicle equipment (on-vehicle equipment)
21 RAM (volatile memory)
22 Nonvolatile memory 23 Control program 24 Saved program 25 Saved data

Claims (6)

車両に装備された電子制御装置が有する揮発性メモリに記憶された、前記車両の車載機器の制御状態を示す複数のデータのそれぞれに対して異なった2進数を割り当て、その2進数のビット数は、不揮発性メモリに記憶すべき全ての前記データに異なった2進数値を割り当てられる最小のビット数とする割り当てステップと、
前記車両の駆動部の停止時に、前記車両に備えられた不揮発性メモリに、前記割り当てステップで求められた2進数値を記憶する記憶ステップと、
を車両に装備されたコンピュータに実行させることを特徴とするプログラム。
A different binary number is assigned to each of a plurality of data stored in a volatile memory of an electronic control device installed in the vehicle and indicating the control state of the in-vehicle device of the vehicle, and the number of bits of the binary number is Assigning a minimum number of bits that can be assigned a different binary value to all the data to be stored in the non-volatile memory;
A storage step of storing the binary value obtained in the assigning step in a non-volatile memory provided in the vehicle when the driving unit of the vehicle is stopped;
Is executed by a computer installed in the vehicle.
前記車両の駆動部の始動時に、前記不揮発性メモリに記憶された前記2進数の情報を、その2進数に関連付けられた前記車載機器の制御状態を示すデータの情報に変換して、前記揮発性メモリに復元する復元ステップを、車両に装備されたコンピュータに実行させる請求項1に記載のプログラム。   When starting the drive unit of the vehicle, the information on the binary number stored in the nonvolatile memory is converted into data information indicating the control state of the in-vehicle device associated with the binary number, and the volatile The program according to claim 1, which causes a computer installed in a vehicle to execute a restoration step of restoring to a memory. 前記データの数に応じて、全ての前記異なった2進数値を記述できるビット数を算出する算出ステップを、車両に装備されたコンピュータに実行させる請求項1又は2に記載のプログラム。   The program according to claim 1 or 2, which causes a computer mounted on a vehicle to execute a calculation step of calculating the number of bits that can describe all the different binary values in accordance with the number of data. 前記割り当てステップは、車両に装備された電子制御装置が有する揮発性メモリに記憶された、前記車両の車載機器の複数の設定値のそれぞれに対して、異なった2進数を割り当て、その2進数のビット数は、不揮発性メモリに記憶すべき全ての設定値に異なった2進数値を割り当てられる最小のビット数とする設定値割り当てステップを含む請求項1乃至3のいずれか1項に記載のプログラム。   The assigning step assigns a different binary number to each of a plurality of set values of the in-vehicle device of the vehicle stored in a volatile memory included in an electronic control device installed in the vehicle, 4. The program according to claim 1, wherein the number of bits includes a setting value assigning step in which a different binary value is assigned to all the setting values to be stored in the nonvolatile memory. . オブジェクト指向のプログラム言語で記述されたプログラムであり、
前記制御状態を示すデータは、そのプログラムにおけるオブジェクトである請求項1乃至4のいずれか1項に記載のプログラム。
A program written in an object-oriented programming language
The program according to any one of claims 1 to 4, wherein the data indicating the control state is an object in the program.
前記2進数値の情報量は前記オブジェクトのポインタの情報量よりも小さい請求項5に記載のプログラム。   The program according to claim 5, wherein the information amount of the binary value is smaller than the information amount of the pointer of the object.
JP2011105305A 2011-05-10 2011-05-10 program Expired - Fee Related JP5585941B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011105305A JP5585941B2 (en) 2011-05-10 2011-05-10 program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011105305A JP5585941B2 (en) 2011-05-10 2011-05-10 program

Publications (2)

Publication Number Publication Date
JP2012236451A true JP2012236451A (en) 2012-12-06
JP5585941B2 JP5585941B2 (en) 2014-09-10

Family

ID=47459782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011105305A Expired - Fee Related JP5585941B2 (en) 2011-05-10 2011-05-10 program

Country Status (1)

Country Link
JP (1) JP5585941B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140102962A (en) * 2013-02-15 2014-08-25 콘티넨탈 오토모티브 시스템 주식회사 Method for saving data when opening ignition key

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006193017A (en) * 2005-01-12 2006-07-27 Nissan Motor Co Ltd Vehicle information recording device and vehicle information recording method
JP2009227248A (en) * 2008-03-25 2009-10-08 Aisin Aw Co Ltd Method of writing control data into on-vehicle control device, and on-vehicle control device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006193017A (en) * 2005-01-12 2006-07-27 Nissan Motor Co Ltd Vehicle information recording device and vehicle information recording method
JP2009227248A (en) * 2008-03-25 2009-10-08 Aisin Aw Co Ltd Method of writing control data into on-vehicle control device, and on-vehicle control device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140102962A (en) * 2013-02-15 2014-08-25 콘티넨탈 오토모티브 시스템 주식회사 Method for saving data when opening ignition key

Also Published As

Publication number Publication date
JP5585941B2 (en) 2014-09-10

Similar Documents

Publication Publication Date Title
EP3252605B1 (en) Vehicle-mounted control device, program writing device, program generating device and program
US20140108704A1 (en) Data decompression method for a controller equipped with limited ram
EP2630573A2 (en) Methods and devices for reducing compressed page loading time on page fault
CN107092560B (en) Solid-state storage device and flash translation layer mapping table rebuilding method applied to same
US20090144512A1 (en) Memory access control device, control method, and program
JP4629750B2 (en) Embedded control unit
CN106990983B (en) Singlechip programming method, device and system and singlechip
JP5585941B2 (en) program
CN110597644B (en) Data stream transmission method, transmission device, electronic equipment and storage medium
CN104035725A (en) Electronic apparatus for data access and data access method therefor
CN107912063A (en) A kind of method for recovering internal storage and device
CN113497627A (en) Data compression and decompression method, device and system
CN116486510A (en) Fault information processing method, device, computer equipment and storage medium
CN114020333B (en) CUDA multithreading processing method, system and related equipment
US7676651B2 (en) Micro controller for decompressing and compressing variable length codes via a compressed code dictionary
JP2010020416A (en) Data transfer method and data transfer unit
JP2011158967A (en) Electronic control device
CN114003309A (en) Software module loading method and device based on microprocessor
CN115037570B (en) Charging and discharging travel event status code and event number uploading method and system, computer readable storage medium and electronic equipment
CN112583415B (en) Data compression storage method and system for ink cartridge chip
KR20120017686A (en) Method for upgrading and recovering operating system of audio/video navigation system for automobile
CN113625953B (en) Data processing method, device, equipment and storage medium
US6760834B2 (en) Microprocessor for saving contextual data when switching to a test program
CN110651253A (en) Memory management system, information processing apparatus, and memory management method
JP2008226082A (en) Data compression/decompression device, program for making computer execute, and data compression/decompression method

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20121017

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131114

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

R151 Written notification of patent or utility model registration

Ref document number: 5585941

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140713

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees