JPWO2007108043A1 - ROM storage data generation method and ROM storage data generation program - Google Patents

ROM storage data generation method and ROM storage data generation program Download PDF

Info

Publication number
JPWO2007108043A1
JPWO2007108043A1 JP2008506061A JP2008506061A JPWO2007108043A1 JP WO2007108043 A1 JPWO2007108043 A1 JP WO2007108043A1 JP 2008506061 A JP2008506061 A JP 2008506061A JP 2008506061 A JP2008506061 A JP 2008506061A JP WO2007108043 A1 JPWO2007108043 A1 JP WO2007108043A1
Authority
JP
Japan
Prior art keywords
information
common part
rom
data generation
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
JP2008506061A
Other languages
Japanese (ja)
Other versions
JP5141551B2 (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Publication of JPWO2007108043A1 publication Critical patent/JPWO2007108043A1/en
Application granted granted Critical
Publication of JP5141551B2 publication Critical patent/JP5141551B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44557Code layout in executable memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

複数のセクションからなるプログラムの中から共通部分の候補を抽出し、その抽出された共通部分の候補を互いに比較して差分の情報を生成する。そして、共通部分の情報量と差分の情報量の和が元の情報量よりも少なければ、共通部分の情報と差分の情報をROM格納データとして出力する。共通部分の情報量と差分の情報量の和が元の情報量よりも多ければ、共通部分の情報と差分の情報に分けずに、元の情報をそのままROM格納データとして出力する。Common part candidates are extracted from a program composed of a plurality of sections, and the extracted common part candidates are compared with each other to generate difference information. If the sum of the information amount of the common part and the difference information amount is smaller than the original information amount, the information of the common part and the difference information are output as ROM storage data. If the sum of the information amount of the common part and the information amount of the difference is larger than the original information amount, the original information is directly output as ROM storage data without being divided into the common part information and the difference information.

Description

本発明は、リードオンリメモリ(ROM)に格納されるデータを生成するROM格納データ生成方法およびその方法をコンピュータに実行させるためのROM格納データ生成プログラムに関するものである。   The present invention relates to a ROM storage data generation method for generating data stored in a read only memory (ROM) and a ROM storage data generation program for causing a computer to execute the method.

従来、複数のプロセッサを内蔵した組み込み非対称型マルチプロセッサシステムでは、オペレーティングシステム(OS)やアプリケーションプログラムは、それらを実行するプロセッサごとに、ROMの異なるメモリアドレス領域に格納されている。例えば、第1のプロセッサが、ROMの第1のセクションと第2のセクションに格納されたOSやプログラムを実行するとする。   Conventionally, in an embedded asymmetric multiprocessor system incorporating a plurality of processors, an operating system (OS) and application programs are stored in different memory address areas of the ROM for each processor that executes them. For example, it is assumed that the first processor executes an OS and a program stored in the first section and the second section of the ROM.

また、第2のプロセッサが、ROMの第3のセクションと第4のセクションに格納されたOSやプログラムを実行するとする。このような場合、プロセッサごとのプログラムのバイナリイメージが、分岐先アドレスやデータのポインタの値などの一部のみが異なり、残りのデータや処理ルーチンが殆ど同じになることがある。   Further, it is assumed that the second processor executes the OS and programs stored in the third section and the fourth section of the ROM. In such a case, the binary image of the program for each processor may differ only in part such as the branch destination address and the value of the data pointer, and the remaining data and processing routine may be almost the same.

例えば、上記例において、第1のセクションと第3のセクションが殆ど同じであるとする。このような場合でも、従来は、図23に示すように、ROM1に、ブートローダ(Boot Loader)2、第1のセクション(Sec1)3、第2のセクション(Sec2)4、第3のセクション(Sec3)5、第4のセクション(Sec4)6、・・・・というように、各セクションは、プロセッサごとに格納される。   For example, in the above example, it is assumed that the first section and the third section are almost the same. Even in such a case, conventionally, as shown in FIG. 23, the ROM 1 includes a boot loader (Boot loader) 2, a first section (Sec1) 3, a second section (Sec2) 4, and a third section (Sec3). ) 5, fourth section (Sec 4) 6,..., Each section is stored for each processor.

そして、マルチプロセッサシステムが動作する際には、ROM1から各プロセッサ用のOSやアプリケーションプログラムが読み出され、作業用のメインメモリに展開される。単一のプロセッサが複数のOSやプログラムを実行するシングルプロセッサシステムにおいても同様である。   When the multiprocessor system operates, the OS and application program for each processor are read from the ROM 1 and loaded in the main work memory. The same applies to a single processor system in which a single processor executes a plurality of OSs and programs.

ところで、マルチプロセッサシステムにおけるブートローディング方式に関して、少なくとも1個のローダROMを共有し、電源投入時に該ローダROMのプログラムによって各プロセッサの揮発性メモリにプログラムをダウンロードするように、構成したことを特徴とする方式が公知である(例えば、特許文献1参照。)。この方式では、ローダROMのプログラムは、各ボードに共通の部分と各ボードによって異なる部分から構成されている。   By the way, with respect to the boot loading method in the multiprocessor system, at least one loader ROM is shared, and when the power is turned on, the program is downloaded to the volatile memory of each processor by the program of the loader ROM. The method of doing is well-known (for example, refer patent document 1). In this method, the loader ROM program is composed of a portion common to each board and a portion that is different for each board.

また、共通部および機能の異なる複数の付加部からなるOSを実行するマイクロコンピュータシステムが公知である(例えば、特許文献2参照。)。このシステムでは、複数のOSの共通部を格納するROMと、複数のOSの付加部をそれぞれ格納するROM群と、複数のOSの付加部から一つの付加部を選択するためのスイッチと、OSの共通部およびスイッチにより選択されたOSの付加部をそれぞれ前記ROMおよび前記ROM群から読み出して処理用メモリに格納する手段が設けられている。   Further, a microcomputer system that executes an OS including a common unit and a plurality of additional units having different functions is known (for example, see Patent Document 2). In this system, a ROM that stores a common part of a plurality of OSs, a ROM group that stores a plurality of additional parts of the OS, a switch for selecting one additional part from the additional parts of the plurality of OSs, an OS Means for reading out from the ROM and the ROM group and storing them in the processing memory, respectively.

特開昭62−272341号公報JP-A-62-272341 特開昭63−58536号公報JP 63-58536 A

しかしながら、上述したように、マルチプロセッサシステムにおいて、ROMに、各プロセッサ上で動作する複数のOSやアプリケーションプログラムをプロセッサごとに単純に格納すると、大容量のROMが必要となる。そのため、マルチプロセッサシステムを構成するシステムボードのコストが増大し、このボードが組み込まれたコンピュータや家庭電化製品などの機器が高価になってしまう。従って、これらの機器を安価に提供するためには、システムボードのコストを下げる必要があり、そのためには、ROMに格納される複数のOSやアプリケーションプログラムの容量を削減する必要がある。   However, as described above, in a multiprocessor system, if a plurality of OSs and application programs operating on each processor are simply stored in each ROM, a large-capacity ROM is required. For this reason, the cost of the system board constituting the multiprocessor system is increased, and equipment such as a computer and a home appliance in which the board is incorporated becomes expensive. Therefore, in order to provide these devices at a low cost, it is necessary to reduce the cost of the system board. To that end, it is necessary to reduce the capacity of a plurality of OSs and application programs stored in the ROM.

シングルプロセッサシステムを構成するシステムボードの場合も同様である。また、上記特許文献1には、ローダROMのプログラムの、各ボードに共通する部分のデータと、各ボードによって異なる部分のデータをどのようにして生成するかということについては記載されていない。同様に、上記特許文献2には、複数のOSの共通部と複数の付加部をどのようにして生成するかということについては記載されていない。   The same applies to the system board constituting a single processor system. Further, Patent Document 1 does not describe how to generate data of a portion common to each board of the loader ROM program and data of a portion different depending on each board. Similarly, Patent Document 2 does not describe how to generate a common unit and a plurality of additional units of a plurality of OSs.

本発明は、上記に鑑みてなされたものであって、システムボードに設けられるROMの容量を削減することができるROM格納データ生成方法およびROM格納データ生成プログラムを提供することを目的とする。   The present invention has been made in view of the above, and an object thereof is to provide a ROM storage data generation method and a ROM storage data generation program capable of reducing the capacity of a ROM provided on a system board.

上述した課題を解決し、目的を達成するために、本発明は、複数のセクションからなるプログラムの中から共通部分の候補を抽出し、その抽出された共通部分の候補を互いに比較して差分の情報を生成することを特徴とする。そして、共通部分の情報量と差分の情報量の和が元の情報量よりも少なければ、共通部分の情報と差分の情報をROM格納データとして出力する。共通部分の情報量と差分の情報量の和が元の情報量よりも多ければ、共通部分の情報と差分の情報に分けずに、元の情報をそのままROM格納データとして出力する。   In order to solve the above-described problems and achieve the object, the present invention extracts common part candidates from a program consisting of a plurality of sections, compares the extracted common part candidates with each other, and calculates a difference. It is characterized by generating information. If the sum of the information amount of the common part and the difference information amount is smaller than the original information amount, the information of the common part and the difference information are output as ROM storage data. If the sum of the information amount of the common part and the information amount of the difference is larger than the original information amount, the original information is directly output as ROM storage data without being divided into the common part information and the difference information.

共通部分の候補を抽出する方法として、以下の5つの方法がある。第1の方法は、各セクションの情報からセクション名を取得し、同じセクション名の領域を共通部分の候補とする方法である。第2の方法は、プログラムのリンク時のリンケージエディタ出力情報からセクション名を取得し、同じセクション名の領域を共通部分の候補とする方法である。第3の方法は、ユーザにより指定された領域を共通部分の候補とする方法である。第4の方法は、バイナリデータ全体を同じサイズの複数の領域に分割し、各領域を共通部分の候補とする方法である。第5の方法は、データの連続性に基づいてバイナリデータ全体を複数の領域に分割し、同じまたは同じようなサイズの領域を共通部分の候補とする方法である。   There are the following five methods for extracting common part candidates. The first method is a method in which a section name is acquired from information of each section, and an area having the same section name is used as a common part candidate. The second method is a method in which a section name is acquired from linkage editor output information at the time of program linking, and an area having the same section name is used as a common part candidate. The third method is a method in which an area designated by the user is used as a common part candidate. The fourth method is a method in which the entire binary data is divided into a plurality of regions of the same size and each region is used as a candidate for a common part. The fifth method is a method in which the entire binary data is divided into a plurality of regions based on the continuity of the data, and regions having the same or similar size are used as candidates for the common portion.

上記第1から第5の抽出方法のうちの2つ以上を組み合わせて、共通部分の候補を抽出するようにしてもよい。ここで、差分の情報として、アドレス全体と固定長の差分データを生成してもよいし、固定長のオフセットアドレスと固定長の差分データを生成するようにしてもよい。また、共通部分の情報と差分の情報を圧縮アルゴリズムによって圧縮してからROM格納データとして出力するようにしてもよい。   You may make it extract the candidate of a common part combining 2 or more of the said 1st to 5th extraction methods. Here, as the difference information, the entire address and fixed length difference data may be generated, or a fixed length offset address and fixed length difference data may be generated. Alternatively, the common part information and the difference information may be compressed by a compression algorithm and then output as ROM storage data.

本発明がマルチプロセッサシステムに適用される場合には、ROMに格納されるプログラムは、複数のプロセッサにより共有されるメモリに展開されて複数のプロセッサにより同時に実行される複数のプログラムを含んでいる。この場合、異なるプロセッサにより実行されるプログラム同士で共通部分の候補が抽出される。これは、プロセッサごとのプログラムやデータのバイナリイメージが、分岐先アドレスやデータのポインタの値などの一部が異なるだけで、残りのデータや処理ルーチンの殆どが同じになることがあるからである。本発明がシングルプロセッサシステムに適用される場合には、ROMに格納されるプログラムは、単一のプロセッサにより実行される複数のプログラムを含んでおり、異なるプログラム同士で共通部分の候補が抽出される。   When the present invention is applied to a multiprocessor system, the programs stored in the ROM include a plurality of programs that are expanded in a memory shared by a plurality of processors and are simultaneously executed by the plurality of processors. In this case, a candidate for a common part is extracted between programs executed by different processors. This is because the program or data binary image for each processor may be the same for most of the remaining data and processing routines, except for some differences such as the branch destination address and data pointer value. . When the present invention is applied to a single processor system, the program stored in the ROM includes a plurality of programs executed by a single processor, and common part candidates are extracted between different programs. .

本発明にかかるROM格納データ生成方法およびROM格納データ生成プログラムは、システムボードに設けられるROMの容量を削減することができるという効果を奏する。従って、このシステムボードが組み込まれたコンピュータや家庭電化製品などの機器を安価に提供することができるという効果を奏する。   The ROM stored data generation method and the ROM stored data generation program according to the present invention have the effect that the capacity of the ROM provided on the system board can be reduced. Accordingly, it is possible to provide an inexpensive device such as a computer or home appliance in which the system board is incorporated.

図1は、本発明にかかるROM格納データ生成方法の実施例のフローチャートである。FIG. 1 is a flowchart of an embodiment of a ROM storage data generation method according to the present invention. 図2は、本発明にかかるROM格納データ生成方法により生成された情報が書き込まれたROMの格納状態を模式的に示す図である。FIG. 2 is a diagram schematically showing a storage state of the ROM in which information generated by the ROM storage data generation method according to the present invention is written. 図3は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第1の方法のフローチャートである。FIG. 3 is a flowchart of a first method for extracting candidates for common parts in the ROM storage data generation method according to the present invention. 図4は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第2の方法のフローチャートである。FIG. 4 is a flowchart of a second method for extracting candidates for the common part of the ROM storage data generation method according to the present invention. 図5は、第2の方法を説明する図である。FIG. 5 is a diagram for explaining the second method. 図6は、第2の方法により共通部分の候補を抽出する際のリンカ出力情報から得たセクション情報の一例を示す図である。FIG. 6 is a diagram illustrating an example of section information obtained from linker output information when a common part candidate is extracted by the second method. 図7は、第2の方法により共通部分の候補を抽出する際のリンカ出力情報から得たセクション情報の他の例を示す図である。FIG. 7 is a diagram illustrating another example of the section information obtained from the linker output information when the common part candidates are extracted by the second method. 図8は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第3の方法のフローチャートである。FIG. 8 is a flowchart of a third method for extracting candidates for common parts in the ROM storage data generation method according to the present invention. 図9は、第3の方法を説明する図である。FIG. 9 is a diagram for explaining the third method. 図10は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第4の方法のフローチャートである。FIG. 10 is a flowchart of a fourth method for extracting candidates for the common part of the ROM storage data generation method according to the present invention. 図11は、第4の方法を説明する図である。FIG. 11 is a diagram for explaining the fourth method. 図12は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第5の方法のフローチャートである。FIG. 12 is a flowchart of a fifth method for extracting candidates for the common part of the ROM storage data generation method according to the present invention. 図13は、第5の方法を説明する図である。FIG. 13 is a diagram for explaining the fifth method. 図14は、元の情報のデータ構造の一例を示す図である。FIG. 14 is a diagram illustrating an example of the data structure of the original information. 図15は、図14に示す元の情報から生成された共通部分の情報と差分の情報のデータ構造の一例を示す図である。FIG. 15 is a diagram illustrating an example of a data structure of common part information and difference information generated from the original information illustrated in FIG. 14. 図16は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 16 is a diagram illustrating an example of a detailed data structure of difference information. 図17は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 17 is a diagram illustrating an example of a detailed data structure of difference information. 図18は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 18 is a diagram illustrating an example of a detailed data structure of difference information. 図19は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 19 is a diagram illustrating an example of a detailed data structure of difference information. 図20は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 20 is a diagram illustrating an example of a detailed data structure of difference information. 図21は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 21 is a diagram illustrating an example of a detailed data structure of difference information. 図22は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 22 is a diagram illustrating an example of a detailed data structure of difference information. 図23は、従来のROMの格納状態を模式的に示す図である。FIG. 23 is a diagram schematically showing a storage state of a conventional ROM.

符号の説明Explanation of symbols

PE0−B1〜PE0−B6,PE1−B1〜PE1−B6 同じサイズに分割された領域
PE0−P1〜PE0−P4,PE1−P1〜PE1−P3 データの連続性に基づいて分割された領域
1 ROM
3,4,5,6 セクション
7 差分の情報
11,12 リンケージエディタ出力情報
15,16,17,18 ユーザ指定領域
19,20 バイナリデータ
21 アドレス全体
22,23,24 差分データ
25,26,27,28 オフセットアドレス
PE0-B1 to PE0-B6, PE1-B1 to PE1-B6 Area divided into the same size PE0-P1 to PE0-P4, PE1-P1 to PE1-P3 Area divided based on data continuity 1 ROM
3, 4, 5, 6 Section 7 Difference information 11, 12 Linkage editor output information 15, 16, 17, 18 User specified area 19, 20 Binary data 21 Entire address 22, 23, 24 Difference data 25, 26, 27, 28 Offset address

以下に、本発明にかかるROM格納データ生成方法およびROM格納データ生成プログラムの実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。本明細書では、ROMには、製造段階で書き込まれたプログラム等を後に書き換えることができないマスクROMだけでなく、製造段階で書き込まれたプログラム等の一部または全部を書き換えることができる書き換え可能な不揮発性メモリ、例えばEPROMやフラッシュメモリ等のEEPROMが含まれる。   Embodiments of a ROM storage data generation method and a ROM storage data generation program according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments. In this specification, the ROM is rewritable that can rewrite part or all of the program written in the manufacturing stage as well as the mask ROM in which the program written in the manufacturing stage cannot be rewritten later. Non-volatile memories such as EEPROMs such as EPROMs and flash memories are included.

図1は、本発明にかかるROM格納データ生成方法の実施例のフローチャートである。図1に示すように、まず、マルチプロセッサシステムの各プロセッサが実行する実行形式ロードモジュールから共通部分の候補を抽出する(ステップS1)。この候補の抽出方法の詳細については、後述する。ついで、抽出された共通部分の候補同士で、それぞれの情報をバイナリ比較する(ステップS2)。そして、比較された共通部分の候補同士の差分の情報を作成する(ステップS3)。なお、図1では、記載を簡略化するため、共通部分Cおよび差分Dとしている。   FIG. 1 is a flowchart of an embodiment of a ROM storage data generation method according to the present invention. As shown in FIG. 1, first, candidates for common parts are extracted from execution format load modules executed by the processors of the multiprocessor system (step S1). Details of this candidate extraction method will be described later. Next, the extracted common part candidates are binary compared with each other (step S2). And the information of the difference between the candidates of the compared common part is created (step S3). In FIG. 1, the common part C and the difference D are used to simplify the description.

次いで、共通部分の情報と差分の情報を足したものの情報量が、元の情報の総和の情報量よりも少ないか否かを判断する(ステップS4)。その結果、少ない場合(ステップS4:Yes)には、共通部分の情報と差分の情報を復元するための展開ルーチンの情報を作成する(ステップS5)。次いで、共通部分の情報、差分の情報および展開ルーチンの情報(各情報)を圧縮アルゴリズムによって圧縮するか否かを判断する(ステップS6)。圧縮する場合(ステップS6:Yes)には、それらの情報を圧縮する(ステップS7)。その際、既存の圧縮アルゴリズムを用いることができる。   Next, it is determined whether the information amount of the sum of the common part information and the difference information is smaller than the total information amount of the original information (step S4). As a result, when the number is small (step S4: Yes), information on the expansion routine for restoring the common part information and the difference information is created (step S5). Next, it is determined whether or not the common part information, the difference information, and the decompression routine information (each information) are compressed by the compression algorithm (step S6). In the case of compression (step S6: Yes), the information is compressed (step S7). At that time, an existing compression algorithm can be used.

次いで、圧縮された共通部分の情報、差分の情報および展開ルーチンの情報を出力し(ステップS8)、終了する。一方、ステップS6で圧縮しない場合(ステップS6:No)には、共通部分の情報、差分の情報および展開ルーチンの情報をそのままを出力し(ステップS8)、終了する。また、ステップS4において、共通部分の情報と差分の情報を足したものの情報量が、元の情報の総和の情報量よりも多い場合(ステップS4:No)には、元の情報をそのまま出力し(ステップS9)、終了する。   Next, the compressed common part information, difference information, and decompression routine information are output (step S8), and the process ends. On the other hand, if compression is not performed in step S6 (step S6: No), the common part information, the difference information, and the decompression routine information are output as they are (step S8), and the process ends. In step S4, if the information amount of the sum of the common part information and the difference information is larger than the total information amount of the original information (step S4: No), the original information is output as it is. (Step S9), the process ends.

ステップS8またはステップS9で出力された共通部分の情報、差分の情報および展開ルーチンの情報、または元の情報は、システムボードに搭載されるROMまたはシステムボードに搭載されたROMに書き込まれる。図2は、共通部分の情報、差分の情報および展開ルーチンの情報が書き込まれたROMの格納状態を模式的に示す図である。図23に示す従来の格納状態では、第1のセクション3と第3のセクション5が殆ど同じであるにもかかわらず、それぞれのセクションが独立してROM1に格納されている。それに対して、図2に示す実施例によれば、ROM1に、ブートローダ2、第1のセクション3、第2のセクション4、第4のセクション6、第1のセクション3とこれに類似の第3のセクションとの差分の情報7、・・・・というように格納される。   The information on the common part, the difference information, the development routine information, or the original information output in step S8 or step S9 is written in the ROM mounted on the system board or the ROM mounted on the system board. FIG. 2 is a diagram schematically showing the storage state of the ROM in which the information on the common part, the difference information, and the development routine information are written. In the conventional storage state shown in FIG. 23, although the first section 3 and the third section 5 are almost the same, each section is stored in the ROM 1 independently. On the other hand, according to the embodiment shown in FIG. 2, the ROM 1 includes the boot loader 2, the first section 3, the second section 4, the fourth section 6, the first section 3, and the like third. Information of difference from the section 7 is stored as follows.

次に、共通部分の候補の抽出方法について説明する。抽出方法については、特に限定しないが、次の5つの方法がある。図3は、共通部分の候補を抽出する第1の方法のフローチャートである。図3に示すように、第1の方法では、まず、各プロセッサが実行するロードモジュール内のセクション情報から、セクション名を取得する(ステップS111)。次いで、同じセクション名の領域を共通部分の候補として登録する(ステップS112)。   Next, a common part candidate extraction method will be described. The extraction method is not particularly limited, but there are the following five methods. FIG. 3 is a flowchart of a first method of extracting common part candidates. As shown in FIG. 3, in the first method, first, a section name is acquired from section information in a load module executed by each processor (step S111). Next, an area having the same section name is registered as a common part candidate (step S112).

同じセクション名の領域を見つけるには、例えば、第1のプロセッサが実行するロードモジュール内のあるセクションの名称と同じ名称のセクションが、第2のプロセッサ、第3のプロセッサ、・・・・がそれぞれ実行するロードモジュール内にあるか否かを検索すればよい。ここで、セクションとは、プログラムの命令コード部、データ部、またはそれらがさらに詳細に分割されたルーチンの集合のことである。   In order to find an area having the same section name, for example, a section having the same name as a section name in a load module executed by the first processor, a second processor, a third processor,. What is necessary is just to search whether it exists in the load module to execute. Here, the section is an instruction code part of the program, a data part, or a set of routines into which they are divided in more detail.

図4は、共通部分の候補を抽出する第2の方法のフローチャートであり、図5は、この第2の方法を説明する図である。図4および図5に示すように、第2の方法では、まず、各プロセッサのプログラムをリンクさせるときに、バイナリデータ(PE#0、PE#1)のリンケージエディタ(リンカ)から出力されるプロセッサごとのリンカマップリストの情報11,12を用いて、それぞれのセクション情報13,14を取得し、それぞれのセクション名を取得する(ステップS121)。次いで、同じセクション名の領域を共通部分の候補として登録する(ステップS122)。   FIG. 4 is a flowchart of a second method for extracting common part candidates, and FIG. 5 is a diagram for explaining the second method. As shown in FIGS. 4 and 5, in the second method, first, when the programs of the respective processors are linked, the processor output from the linkage editor (linker) of binary data (PE # 0, PE # 1). Each section information 13 and 14 is acquired using the information 11 and 12 of each linker map list, and each section name is acquired (step S121). Next, an area having the same section name is registered as a common part candidate (step S122).

例えば、第1のプロセッサのリンカからの出力情報から得たセクション情報の例を図6に示す。また、図7に、第2のプロセッサのリンカからの出力情報から得たセクション情報の例を示す。両図に示す例の場合、「kernel_code_sc」や「LIBCODE_A」というセクション名が共通して含まれている。従って、これらの名称のセクションを共通部分の候補とする。   For example, FIG. 6 shows an example of section information obtained from output information from the linker of the first processor. FIG. 7 shows an example of section information obtained from output information from the linker of the second processor. In the example shown in both figures, section names such as “kernel_code_sc” and “LIBCODE_A” are included in common. Therefore, these named sections are candidates for the common part.

図8は、共通部分の候補を抽出する第3の方法のフローチャートであり、図9は、この第3の方法を説明する図である。図8および図9に示すように、第3の方法では、まず、ユーザが指定した情報を取得する(ステップS131)。そして、そのユーザの指定領域15,16,17,18を共通部分の候補として登録する(ステップS132)。図9に示す例では、ユーザ指定領域15とユーザ指定領域16が共通部分の候補の一つとなり、ユーザ指定領域17とユーザ指定領域18が共通部分の候補の一つとなる。   FIG. 8 is a flowchart of a third method for extracting common part candidates, and FIG. 9 is a diagram for explaining the third method. As shown in FIGS. 8 and 9, in the third method, first, information specified by the user is acquired (step S131). Then, the user's designated areas 15, 16, 17, and 18 are registered as common part candidates (step S132). In the example shown in FIG. 9, the user designation area 15 and the user designation area 16 are one of the common part candidates, and the user designation area 17 and the user designation area 18 are one of the common part candidates.

図10は、共通部分の候補を抽出する第4の方法のフローチャートであり、図11は、この第4の方法を説明する図である。図10および図11に示すように、第4の方法では、まず、各プロセッサのプログラムのバイナリデータの一部または全部を同じサイズの複数の領域に自動的に分割する(ステップS141)。そして、分割された各領域を共通部分の候補として登録する(ステップS142)。   FIG. 10 is a flowchart of a fourth method for extracting common part candidates, and FIG. 11 is a diagram for explaining the fourth method. As shown in FIGS. 10 and 11, in the fourth method, first, part or all of the binary data of the program of each processor is automatically divided into a plurality of regions of the same size (step S141). Then, each divided area is registered as a common part candidate (step S142).

図11に示す例では、第1のプロセッサのプログラムのバイナリデータ(PE#0)19がPE0−B1、PE0−B2、PE0−B3、PE0−B4、PE0−B5およびPE0−B6に分割されており、第2のプロセッサのプログラムのバイナリデータ(PE#1)20がPE1−B1、PE1−B2、PE1−B3、PE1−B4、PE1−B5およびPE1−B6に分割されている。この場合、PE0−B1とPE1−B1が共通部分の候補の一つとなり、PE0−B2とPE1−B2が共通部分の候補の一つとなる。PE0−B3とPE1−B3以降についても同様である。   In the example shown in FIG. 11, the binary data (PE # 0) 19 of the first processor program is divided into PE0-B1, PE0-B2, PE0-B3, PE0-B4, PE0-B5, and PE0-B6. The binary data (PE # 1) 20 of the second processor program is divided into PE1-B1, PE1-B2, PE1-B3, PE1-B4, PE1-B5, and PE1-B6. In this case, PE0-B1 and PE1-B1 are one of the common part candidates, and PE0-B2 and PE1-B2 are one of the common part candidates. The same applies to PE0-B3 and PE1-B3 and later.

図12は、共通部分の候補を抽出する第5の方法のフローチャートであり、図13は、この第5の方法を説明する図である。図12および図13に示すように、第5の方法では、まず、バイナリデータをデータの連続性に基づいて複数の領域に分割する(ステップS151)。具体的には、各プロセッサのプログラムのバイナリデータの一部または全部を、そのバイナリデータの内部の情報が格納されているアドレスに着目し、連続してデータが入っている領域ごとに分割する。そして、分割された各領域のサイズが同じかまたは同じような領域を共通部分の候補として登録する(ステップS152)。   FIG. 12 is a flowchart of a fifth method for extracting common part candidates, and FIG. 13 is a diagram for explaining the fifth method. As shown in FIGS. 12 and 13, in the fifth method, first, binary data is divided into a plurality of regions based on the continuity of data (step S151). Specifically, a part or all of the binary data of the program of each processor is focused on an address where information inside the binary data is stored, and divided into areas where data is continuously stored. Then, an area having the same or similar size of each divided area is registered as a common part candidate (step S152).

図13に示す例では、第1のプロセッサのプログラムのバイナリデータ(PE#0)19がPE0−P1、PE0−P2、PE0−P3およびPE0−P4に分割されており、第2のプロセッサのプログラムのバイナリデータ(PE#1)20がPE1−P1、PE1−P2およびPE1−P3に分割されている。そして、PE0−P1とPE1−P1は、同じようなサイズである。また、PE0−P4とPE1−P3は、同じようなサイズである。この場合、PE0−P1とPE1−P1が共通部分の候補の一つとなり、PE0−P4とPE1−P3が共通部分の候補の一つとなる。   In the example shown in FIG. 13, the binary data (PE # 0) 19 of the program of the first processor is divided into PE0-P1, PE0-P2, PE0-P3 and PE0-P4, and the program of the second processor Binary data (PE # 1) 20 is divided into PE1-P1, PE1-P2, and PE1-P3. PE0-P1 and PE1-P1 are similar in size. PE0-P4 and PE1-P3 have the same size. In this case, PE0-P1 and PE1-P1 are one of the common part candidates, and PE0-P4 and PE1-P3 are one of the common part candidates.

なお、上述した第1〜第5の方法のうちの2つ以上を組み合わせて、共通部分の候補を抽出するようにしてもよい。例えば、第3の方法とそれ以外の方法を組み合わせる場合には、第3の方法によりユーザが指定した領域を優先して共通部分の候補とする。そして、ユーザが指定した領域を除く残りの領域に対して、第1の方法、第2の方法、第4の方法または第5の方法を適用して共通部分の候補を登録する。   In addition, you may make it extract the candidate of a common part combining 2 or more of the 1st-5th methods mentioned above. For example, when the third method and other methods are combined, the area designated by the user by the third method is given priority as a common part candidate. Then, the common portion candidates are registered by applying the first method, the second method, the fourth method, or the fifth method to the remaining regions other than the region designated by the user.

次に、元の情報から生成された共通部分の情報と差分の情報のデータ構造の一例について説明する。図14は、元の情報のデータ構造の一例を示す図であり、図15は、図14の元の情報から生成された共通部分の情報と差分の情報のデータ構造の一例を示す図である。例えば、図14に示すように、第1のセクション3と第3のセクション5が殆ど同じであり、共通部分の候補であるとする。第1のセクション3および第3のセクション5のそれぞれの先頭アドレスをB1およびB2とする。   Next, an example of the data structure of the common part information and the difference information generated from the original information will be described. 14 is a diagram showing an example of the data structure of the original information, and FIG. 15 is a diagram showing an example of the data structure of the common part information and the difference information generated from the original information of FIG. . For example, as shown in FIG. 14, it is assumed that the first section 3 and the third section 5 are almost the same and are candidates for the common part. The first addresses of the first section 3 and the third section 5 are B1 and B2, respectively.

また、第1のセクション3および第3のセクション5において、それぞれの先頭アドレスB1およびB2から、第1のセクション3のアドレスAddr1および第3のセクション5のアドレスAddr2の先頭までのオフセットアドレスをA1とする。同様に、第1のセクション3および第3のセクション5において、それぞれの先頭アドレスB1およびB2から、第1のセクション3のデータData1および第3のセクション5のデータData2の先頭までのオフセットアドレスをA2とする。   In the first section 3 and the third section 5, offset addresses from the respective head addresses B1 and B2 to the head of the address Addr1 of the first section 3 and the address Addr2 of the third section 5 are denoted as A1. To do. Similarly, in the first section 3 and the third section 5, offset addresses from the respective head addresses B1 and B2 to the head of the data Data1 of the first section 3 and the data Data2 of the third section 5 are A2 And

この場合、本実施例によれば、図15に示すように、第1のセクション3が共通部分の情報となる。従って、第1のセクション3については、先頭アドレスがB1であり、アドレスAddr1およびデータData1の先頭までのオフセットアドレスは、それぞれA1およびA2である。そして、第1のセクション3に対する第3のセクション5の差分の情報7として、先頭アドレスB1からのオフセットアドレスA1およびA2を先頭とするアドレスおよびデータを、それぞれAddr2およびData2にするという情報が付加される。   In this case, according to the present embodiment, as shown in FIG. 15, the first section 3 becomes information of the common part. Therefore, for the first section 3, the head address is B1, and the offset addresses to the head of the address Addr1 and the data Data1 are A1 and A2, respectively. Then, as the difference information 7 of the third section 5 with respect to the first section 3, the information that the addresses and data starting from the offset addresses A1 and A2 from the start address B1 are set to Addr2 and Data2, respectively, is added. The

次に、差分の情報のデータ構造の具体例について説明する。図16〜図22は、差分の情報の詳細なデータ構造の一例を示す図である。図16に示す例では、差分の情報7は、絶対アドレスのアドレス全体21と1バイトのデータ(差分データ)22で構成されている。図17に示す例では、差分の情報7は、アドレス全体21と2バイトのデータ(差分データ)23で構成されている。図18に示す例では、差分の情報7は、アドレス全体21と4バイトのデータ(差分データ)24で構成されている。   Next, a specific example of the data structure of difference information will be described. 16 to 22 are diagrams illustrating an example of a detailed data structure of difference information. In the example shown in FIG. 16, the difference information 7 includes an entire address 21 of absolute addresses and 1-byte data (difference data) 22. In the example illustrated in FIG. 17, the difference information 7 includes an entire address 21 and 2-byte data (difference data) 23. In the example shown in FIG. 18, the difference information 7 includes an entire address 21 and 4-byte data (difference data) 24.

また、図19に示す例では、差分の情報7は、4バイトのオフセットアドレス25と4バイトのデータ24で構成されている。図20に示す例では、差分の情報7は、3バイトのオフセットアドレス26と1バイトのデータ22で構成されている。図21に示す例では、差分の情報7は、2バイトのオフセットアドレス27と2バイトのデータ23で構成されている。図22に示す例では、差分の情報7は、1バイトのオフセットアドレス28と1バイトのデータ22で構成されている。なお、アドレスのバイト数やデータのバイト数は、ここに例示したものに限らない。   In the example shown in FIG. 19, the difference information 7 includes a 4-byte offset address 25 and 4-byte data 24. In the example shown in FIG. 20, the difference information 7 includes a 3-byte offset address 26 and 1-byte data 22. In the example illustrated in FIG. 21, the difference information 7 includes a 2-byte offset address 27 and 2-byte data 23. In the example illustrated in FIG. 22, the difference information 7 includes a 1-byte offset address 28 and 1-byte data 22. Note that the number of bytes of the address and the number of bytes of data are not limited to those exemplified here.

以上説明したように、実施例によれば、類似したセクションの情報を共通部分の情報とそれに対する差分の情報に再構成するので、ROMに格納されるプログラム等の容量を削減することができる。従って、コンピュータや家庭電化製品等に組み込まれるシステムボードのROMの必要容量を削減することができる。それによって、このシステムボードが組み込まれた機器を安価に提供することができる。なお、本発明がシングルプロセッサシステムに適用される場合には、ROMに格納されるプログラムは、単一のプロセッサにより実行される複数のプログラムを含んでおり、異なるプログラム同士で共通部分の候補が抽出される。   As described above, according to the embodiment, information on similar sections is reconfigured into information on the common part and information on the difference therebetween, so that the capacity of the program stored in the ROM can be reduced. Accordingly, it is possible to reduce the required capacity of the ROM of the system board incorporated in a computer, a home appliance or the like. As a result, a device in which the system board is incorporated can be provided at low cost. When the present invention is applied to a single processor system, the program stored in the ROM includes a plurality of programs executed by a single processor, and common part candidates are extracted between different programs. Is done.

なお、本実施の形態で説明したROM格納データ生成方法は、予め用意されたプログラムをパーソナルコンピュータやワークステーション等のコンピュータで実行することにより実現することができる。このプログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。またこのプログラムは、インターネット等のネットワークを介して配布することが可能な伝送媒体であってもよい。   The ROM stored data generation method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. Further, this program may be a transmission medium that can be distributed via a network such as the Internet.

以上のように、本発明にかかるROM格納データ生成方法およびROM格納データ生成プログラムは、マルチプロセッサやシングルプロセッサが組み込まれる機器に有用であり、特に、コンピュータ、コンピュータの周辺機または家庭電化製品などに適している。   As described above, the ROM stored data generation method and the ROM stored data generation program according to the present invention are useful for a device in which a multiprocessor or a single processor is incorporated, and particularly for a computer, a computer peripheral device, or a home appliance. Is suitable.

本発明は、リードオンリメモリ(ROM)に格納されるデータを生成するROM格納データ生成方法およびその方法をコンピュータに実行させるためのROM格納データ生成プログラムに関するものである。   The present invention relates to a ROM storage data generation method for generating data stored in a read only memory (ROM) and a ROM storage data generation program for causing a computer to execute the method.

従来、複数のプロセッサを内蔵した組み込み非対称型マルチプロセッサシステムでは、オペレーティングシステム(OS)やアプリケーションプログラムは、それらを実行するプロセッサごとに、ROMの異なるメモリアドレス領域に格納されている。例えば、第1のプロセッサが、ROMの第1のセクションと第2のセクションに格納されたOSやプログラムを実行するとする。   Conventionally, in an embedded asymmetric multiprocessor system incorporating a plurality of processors, an operating system (OS) and application programs are stored in different memory address areas of the ROM for each processor that executes them. For example, it is assumed that the first processor executes an OS and a program stored in the first section and the second section of the ROM.

また、第2のプロセッサが、ROMの第3のセクションと第4のセクションに格納されたOSやプログラムを実行するとする。このような場合、プロセッサごとのプログラムのバイナリイメージが、分岐先アドレスやデータのポインタの値などの一部のみが異なり、残りのデータや処理ルーチンが殆ど同じになることがある。   Further, it is assumed that the second processor executes the OS and programs stored in the third section and the fourth section of the ROM. In such a case, the binary image of the program for each processor may differ only in part such as the branch destination address and the value of the data pointer, and the remaining data and processing routine may be almost the same.

例えば、上記例において、第1のセクションと第3のセクションが殆ど同じであるとする。このような場合でも、従来は、図23に示すように、ROM1に、ブートローダ(Boot Loader)2、第1のセクション(Sec1)3、第2のセクション(Sec2)4、第3のセクション(Sec3)5、第4のセクション(Sec4)6、・・・・というように、各セクションは、プロセッサごとに格納される。   For example, in the above example, it is assumed that the first section and the third section are almost the same. Even in such a case, conventionally, as shown in FIG. 23, the ROM 1 includes a boot loader (Boot loader) 2, a first section (Sec1) 3, a second section (Sec2) 4, and a third section (Sec3). ) 5, fourth section (Sec 4) 6,..., Each section is stored for each processor.

そして、マルチプロセッサシステムが動作する際には、ROM1から各プロセッサ用のOSやアプリケーションプログラムが読み出され、作業用のメインメモリに展開される。単一のプロセッサが複数のOSやプログラムを実行するシングルプロセッサシステムにおいても同様である。   When the multiprocessor system operates, the OS and application program for each processor are read from the ROM 1 and loaded in the main work memory. The same applies to a single processor system in which a single processor executes a plurality of OSs and programs.

ところで、マルチプロセッサシステムにおけるブートローディング方式に関して、少なくとも1個のローダROMを共有し、電源投入時に該ローダROMのプログラムによって各プロセッサの揮発性メモリにプログラムをダウンロードするように、構成したことを特徴とする方式が公知である(例えば、特許文献1参照。)。この方式では、ローダROMのプログラムは、各ボードに共通の部分と各ボードによって異なる部分から構成されている。   By the way, with respect to the boot loading method in the multiprocessor system, at least one loader ROM is shared, and when the power is turned on, the program is downloaded to the volatile memory of each processor by the program of the loader ROM. The method of doing is well-known (for example, refer patent document 1). In this method, the loader ROM program is composed of a portion common to each board and a portion that is different for each board.

また、共通部および機能の異なる複数の付加部からなるOSを実行するマイクロコンピュータシステムが公知である(例えば、特許文献2参照。)。このシステムでは、複数のOSの共通部を格納するROMと、複数のOSの付加部をそれぞれ格納するROM群と、複数のOSの付加部から一つの付加部を選択するためのスイッチと、OSの共通部およびスイッチにより選択されたOSの付加部をそれぞれ前記ROMおよび前記ROM群から読み出して処理用メモリに格納する手段が設けられている。   Further, a microcomputer system that executes an OS including a common unit and a plurality of additional units having different functions is known (for example, see Patent Document 2). In this system, a ROM that stores a common part of a plurality of OSs, a ROM group that stores a plurality of additional parts of the OS, a switch for selecting one additional part from the additional parts of the plurality of OSs, an OS Means for reading out from the ROM and the ROM group and storing them in the processing memory, respectively.

特開昭62−272341号公報JP-A-62-272341 特開昭63−58536号公報JP 63-58536 A

しかしながら、上述したように、マルチプロセッサシステムにおいて、ROMに、各プロセッサ上で動作する複数のOSやアプリケーションプログラムをプロセッサごとに単純に格納すると、大容量のROMが必要となる。そのため、マルチプロセッサシステムを構成するシステムボードのコストが増大し、このボードが組み込まれたコンピュータや家庭電化製品などの機器が高価になってしまう。従って、これらの機器を安価に提供するためには、システムボードのコストを下げる必要があり、そのためには、ROMに格納される複数のOSやアプリケーションプログラムの容量を削減する必要がある。   However, as described above, in a multiprocessor system, if a plurality of OSs and application programs operating on each processor are simply stored in each ROM, a large-capacity ROM is required. For this reason, the cost of the system board constituting the multiprocessor system is increased, and equipment such as a computer and a home appliance in which the board is incorporated becomes expensive. Therefore, in order to provide these devices at a low cost, it is necessary to reduce the cost of the system board. To that end, it is necessary to reduce the capacity of a plurality of OSs and application programs stored in the ROM.

シングルプロセッサシステムを構成するシステムボードの場合も同様である。また、上記特許文献1には、ローダROMのプログラムの、各ボードに共通する部分のデータと、各ボードによって異なる部分のデータをどのようにして生成するかということについては記載されていない。同様に、上記特許文献2には、複数のOSの共通部と複数の付加部をどのようにして生成するかということについては記載されていない。   The same applies to the system board constituting a single processor system. Further, Patent Document 1 does not describe how to generate data of a portion common to each board of the loader ROM program and data of a portion different depending on each board. Similarly, Patent Document 2 does not describe how to generate a common unit and a plurality of additional units of a plurality of OSs.

本発明は、上記に鑑みてなされたものであって、システムボードに設けられるROMの容量を削減することができるROM格納データ生成方法およびROM格納データ生成プログラムを提供することを目的とする。   The present invention has been made in view of the above, and an object thereof is to provide a ROM storage data generation method and a ROM storage data generation program capable of reducing the capacity of a ROM provided on a system board.

上述した課題を解決し、目的を達成するために、本発明は、複数のセクションからなるプログラムの中から共通部分の候補を抽出し、その抽出された共通部分の候補を互いに比較して差分の情報を生成することを特徴とする。そして、共通部分の情報量と差分の情報量の和が元の情報量よりも少なければ、共通部分の情報と差分の情報をROM格納データとして出力する。共通部分の情報量と差分の情報量の和が元の情報量よりも多ければ、共通部分の情報と差分の情報に分けずに、元の情報をそのままROM格納データとして出力する。   In order to solve the above-described problems and achieve the object, the present invention extracts common part candidates from a program consisting of a plurality of sections, compares the extracted common part candidates with each other, and calculates a difference. It is characterized by generating information. If the sum of the information amount of the common part and the difference information amount is smaller than the original information amount, the information of the common part and the difference information are output as ROM storage data. If the sum of the information amount of the common part and the information amount of the difference is larger than the original information amount, the original information is directly output as ROM storage data without being divided into the common part information and the difference information.

共通部分の候補を抽出する方法として、以下の5つの方法がある。第1の方法は、各セクションの情報からセクション名を取得し、同じセクション名の領域を共通部分の候補とする方法である。第2の方法は、プログラムのリンク時のリンケージエディタ出力情報からセクション名を取得し、同じセクション名の領域を共通部分の候補とする方法である。第3の方法は、ユーザにより指定された領域を共通部分の候補とする方法である。第4の方法は、バイナリデータ全体を同じサイズの複数の領域に分割し、各領域を共通部分の候補とする方法である。第5の方法は、データの連続性に基づいてバイナリデータ全体を複数の領域に分割し、同じまたは同じようなサイズの領域を共通部分の候補とする方法である。   There are the following five methods for extracting common part candidates. The first method is a method in which a section name is acquired from information of each section, and an area having the same section name is used as a common part candidate. The second method is a method in which a section name is acquired from linkage editor output information at the time of program linking, and an area having the same section name is used as a common part candidate. The third method is a method in which an area designated by the user is used as a common part candidate. The fourth method is a method in which the entire binary data is divided into a plurality of regions of the same size and each region is used as a candidate for a common part. The fifth method is a method in which the entire binary data is divided into a plurality of regions based on the continuity of the data, and regions having the same or similar size are used as candidates for the common portion.

上記第1から第5の抽出方法のうちの2つ以上を組み合わせて、共通部分の候補を抽出するようにしてもよい。ここで、差分の情報として、アドレス全体と固定長の差分データを生成してもよいし、固定長のオフセットアドレスと固定長の差分データを生成するようにしてもよい。また、共通部分の情報と差分の情報を圧縮アルゴリズムによって圧縮してからROM格納データとして出力するようにしてもよい。   You may make it extract the candidate of a common part combining 2 or more of the said 1st to 5th extraction methods. Here, as the difference information, the entire address and fixed length difference data may be generated, or a fixed length offset address and fixed length difference data may be generated. Alternatively, the common part information and the difference information may be compressed by a compression algorithm and then output as ROM storage data.

本発明がマルチプロセッサシステムに適用される場合には、ROMに格納されるプログラムは、複数のプロセッサにより共有されるメモリに展開されて複数のプロセッサにより同時に実行される複数のプログラムを含んでいる。この場合、異なるプロセッサにより実行されるプログラム同士で共通部分の候補が抽出される。これは、プロセッサごとのプログラムやデータのバイナリイメージが、分岐先アドレスやデータのポインタの値などの一部が異なるだけで、残りのデータや処理ルーチンの殆どが同じになることがあるからである。本発明がシングルプロセッサシステムに適用される場合には、ROMに格納されるプログラムは、単一のプロセッサにより実行される複数のプログラムを含んでおり、異なるプログラム同士で共通部分の候補が抽出される。   When the present invention is applied to a multiprocessor system, the programs stored in the ROM include a plurality of programs that are expanded in a memory shared by a plurality of processors and are simultaneously executed by the plurality of processors. In this case, a candidate for a common part is extracted between programs executed by different processors. This is because the program or data binary image for each processor may be the same for most of the remaining data and processing routines, except for some differences such as the branch destination address and data pointer value. . When the present invention is applied to a single processor system, the program stored in the ROM includes a plurality of programs executed by a single processor, and common part candidates are extracted between different programs. .

本発明にかかるROM格納データ生成方法およびROM格納データ生成プログラムは、システムボードに設けられるROMの容量を削減することができるという効果を奏する。従って、このシステムボードが組み込まれたコンピュータや家庭電化製品などの機器を安価に提供することができるという効果を奏する。   The ROM stored data generation method and the ROM stored data generation program according to the present invention have the effect that the capacity of the ROM provided on the system board can be reduced. Accordingly, it is possible to provide an inexpensive device such as a computer or home appliance in which the system board is incorporated.

以下に、本発明にかかるROM格納データ生成方法およびROM格納データ生成プログラムの実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。本明細書では、ROMには、製造段階で書き込まれたプログラム等を後に書き換えることができないマスクROMだけでなく、製造段階で書き込まれたプログラム等の一部または全部を書き換えることができる書き換え可能な不揮発性メモリ、例えばEPROMやフラッシュメモリ等のEEPROMが含まれる。   Embodiments of a ROM storage data generation method and a ROM storage data generation program according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments. In this specification, the ROM is rewritable that can rewrite part or all of the program written in the manufacturing stage as well as the mask ROM in which the program written in the manufacturing stage cannot be rewritten later. Non-volatile memories such as EEPROMs such as EPROMs and flash memories are included.

図1は、本発明にかかるROM格納データ生成方法の実施例のフローチャートである。図1に示すように、まず、マルチプロセッサシステムの各プロセッサが実行する実行形式ロードモジュールから共通部分の候補を抽出する(ステップS1)。この候補の抽出方法の詳細については、後述する。ついで、抽出された共通部分の候補同士で、それぞれの情報をバイナリ比較する(ステップS2)。そして、比較された共通部分の候補同士の差分の情報を作成する(ステップS3)。なお、図1では、記載を簡略化するため、共通部分Cおよび差分Dとしている。   FIG. 1 is a flowchart of an embodiment of a ROM storage data generation method according to the present invention. As shown in FIG. 1, first, candidates for common parts are extracted from execution format load modules executed by the processors of the multiprocessor system (step S1). Details of this candidate extraction method will be described later. Next, the extracted common part candidates are binary compared with each other (step S2). And the information of the difference between the candidates of the compared common part is created (step S3). In FIG. 1, the common part C and the difference D are used to simplify the description.

次いで、共通部分の情報と差分の情報を足したものの情報量が、元の情報の総和の情報量よりも少ないか否かを判断する(ステップS4)。その結果、少ない場合(ステップS4:Yes)には、共通部分の情報と差分の情報を復元するための展開ルーチンの情報を作成する(ステップS5)。次いで、共通部分の情報、差分の情報および展開ルーチンの情報(各情報)を圧縮アルゴリズムによって圧縮するか否かを判断する(ステップS6)。圧縮する場合(ステップS6:Yes)には、それらの情報を圧縮する(ステップS7)。その際、既存の圧縮アルゴリズムを用いることができる。   Next, it is determined whether the information amount of the sum of the common part information and the difference information is smaller than the total information amount of the original information (step S4). As a result, when the number is small (step S4: Yes), information on the expansion routine for restoring the common part information and the difference information is created (step S5). Next, it is determined whether or not the common part information, the difference information, and the decompression routine information (each information) are compressed by the compression algorithm (step S6). In the case of compression (step S6: Yes), the information is compressed (step S7). At that time, an existing compression algorithm can be used.

次いで、圧縮された共通部分の情報、差分の情報および展開ルーチンの情報を出力し(ステップS8)、終了する。一方、ステップS6で圧縮しない場合(ステップS6:No)には、共通部分の情報、差分の情報および展開ルーチンの情報をそのままを出力し(ステップS8)、終了する。また、ステップS4において、共通部分の情報と差分の情報を足したものの情報量が、元の情報の総和の情報量よりも多い場合(ステップS4:No)には、元の情報をそのまま出力し(ステップS9)、終了する。   Next, the compressed common part information, difference information, and decompression routine information are output (step S8), and the process ends. On the other hand, if compression is not performed in step S6 (step S6: No), the common part information, the difference information, and the decompression routine information are output as they are (step S8), and the process ends. In step S4, if the information amount of the sum of the common part information and the difference information is larger than the total information amount of the original information (step S4: No), the original information is output as it is. (Step S9), the process ends.

ステップS8またはステップS9で出力された共通部分の情報、差分の情報および展開ルーチンの情報、または元の情報は、システムボードに搭載されるROMまたはシステムボードに搭載されたROMに書き込まれる。図2は、共通部分の情報、差分の情報および展開ルーチンの情報が書き込まれたROMの格納状態を模式的に示す図である。図23に示す従来の格納状態では、第1のセクション3と第3のセクション5が殆ど同じであるにもかかわらず、それぞれのセクションが独立してROM1に格納されている。それに対して、図2に示す実施例によれば、ROM1に、ブートローダ2、第1のセクション3、第2のセクション4、第4のセクション6、第1のセクション3とこれに類似の第3のセクションとの差分の情報7、・・・・というように格納される。   The information on the common part, the difference information, the development routine information, or the original information output in step S8 or step S9 is written in the ROM mounted on the system board or the ROM mounted on the system board. FIG. 2 is a diagram schematically showing the storage state of the ROM in which the information on the common part, the difference information, and the development routine information are written. In the conventional storage state shown in FIG. 23, although the first section 3 and the third section 5 are almost the same, each section is stored in the ROM 1 independently. On the other hand, according to the embodiment shown in FIG. 2, the ROM 1 includes the boot loader 2, the first section 3, the second section 4, the fourth section 6, the first section 3, and the like third. Information of difference from the section 7 is stored as follows.

次に、共通部分の候補の抽出方法について説明する。抽出方法については、特に限定しないが、次の5つの方法がある。図3は、共通部分の候補を抽出する第1の方法のフローチャートである。図3に示すように、第1の方法では、まず、各プロセッサが実行するロードモジュール内のセクション情報から、セクション名を取得する(ステップS111)。次いで、同じセクション名の領域を共通部分の候補として登録する(ステップS112)。   Next, a common part candidate extraction method will be described. The extraction method is not particularly limited, but there are the following five methods. FIG. 3 is a flowchart of a first method of extracting common part candidates. As shown in FIG. 3, in the first method, first, a section name is acquired from section information in a load module executed by each processor (step S111). Next, an area having the same section name is registered as a common part candidate (step S112).

同じセクション名の領域を見つけるには、例えば、第1のプロセッサが実行するロードモジュール内のあるセクションの名称と同じ名称のセクションが、第2のプロセッサ、第3のプロセッサ、・・・・がそれぞれ実行するロードモジュール内にあるか否かを検索すればよい。ここで、セクションとは、プログラムの命令コード部、データ部、またはそれらがさらに詳細に分割されたルーチンの集合のことである。   In order to find an area having the same section name, for example, a section having the same name as a section name in a load module executed by the first processor, a second processor, a third processor,. What is necessary is just to search whether it exists in the load module to execute. Here, the section is an instruction code part of the program, a data part, or a set of routines into which they are divided in more detail.

図4は、共通部分の候補を抽出する第2の方法のフローチャートであり、図5は、この第2の方法を説明する図である。図4および図5に示すように、第2の方法では、まず、各プロセッサのプログラムをリンクさせるときに、バイナリデータ(PE#0、PE#1)のリンケージエディタ(リンカ)から出力されるプロセッサごとのリンカマップリストの情報11,12を用いて、それぞれのセクション情報13,14を取得し、それぞれのセクション名を取得する(ステップS121)。次いで、同じセクション名の領域を共通部分の候補として登録する(ステップS122)。   FIG. 4 is a flowchart of a second method for extracting common part candidates, and FIG. 5 is a diagram for explaining the second method. As shown in FIGS. 4 and 5, in the second method, first, when the programs of the respective processors are linked, the processor output from the linkage editor (linker) of binary data (PE # 0, PE # 1). Each section information 13 and 14 is acquired using the information 11 and 12 of each linker map list, and each section name is acquired (step S121). Next, an area having the same section name is registered as a common part candidate (step S122).

例えば、第1のプロセッサのリンカからの出力情報から得たセクション情報の例を図6に示す。また、図7に、第2のプロセッサのリンカからの出力情報から得たセクション情報の例を示す。両図に示す例の場合、「kernel_code_sc」や「LIBCODE_A」というセクション名が共通して含まれている。従って、これらの名称のセクションを共通部分の候補とする。   For example, FIG. 6 shows an example of section information obtained from output information from the linker of the first processor. FIG. 7 shows an example of section information obtained from output information from the linker of the second processor. In the example shown in both figures, section names such as “kernel_code_sc” and “LIBCODE_A” are included in common. Therefore, these named sections are candidates for the common part.

図8は、共通部分の候補を抽出する第3の方法のフローチャートであり、図9は、この第3の方法を説明する図である。図8および図9に示すように、第3の方法では、まず、ユーザが指定した情報を取得する(ステップS131)。そして、そのユーザの指定領域15,16,17,18を共通部分の候補として登録する(ステップS132)。図9に示す例では、ユーザ指定領域15とユーザ指定領域16が共通部分の候補の一つとなり、ユーザ指定領域17とユーザ指定領域18が共通部分の候補の一つとなる。   FIG. 8 is a flowchart of a third method for extracting common part candidates, and FIG. 9 is a diagram for explaining the third method. As shown in FIGS. 8 and 9, in the third method, first, information specified by the user is acquired (step S131). Then, the user's designated areas 15, 16, 17, and 18 are registered as common part candidates (step S132). In the example shown in FIG. 9, the user designation area 15 and the user designation area 16 are one of the common part candidates, and the user designation area 17 and the user designation area 18 are one of the common part candidates.

図10は、共通部分の候補を抽出する第4の方法のフローチャートであり、図11は、この第4の方法を説明する図である。図10および図11に示すように、第4の方法では、まず、各プロセッサのプログラムのバイナリデータの一部または全部を同じサイズの複数の領域に自動的に分割する(ステップS141)。そして、分割された各領域を共通部分の候補として登録する(ステップS142)。   FIG. 10 is a flowchart of a fourth method for extracting common part candidates, and FIG. 11 is a diagram for explaining the fourth method. As shown in FIGS. 10 and 11, in the fourth method, first, part or all of the binary data of the program of each processor is automatically divided into a plurality of regions of the same size (step S141). Then, each divided area is registered as a common part candidate (step S142).

図11に示す例では、第1のプロセッサのプログラムのバイナリデータ(PE#0)19がPE0−B1、PE0−B2、PE0−B3、PE0−B4、PE0−B5およびPE0−B6に分割されており、第2のプロセッサのプログラムのバイナリデータ(PE#1)20がPE1−B1、PE1−B2、PE1−B3、PE1−B4、PE1−B5およびPE1−B6に分割されている。この場合、PE0−B1とPE1−B1が共通部分の候補の一つとなり、PE0−B2とPE1−B2が共通部分の候補の一つとなる。PE0−B3とPE1−B3以降についても同様である。   In the example shown in FIG. 11, the binary data (PE # 0) 19 of the first processor program is divided into PE0-B1, PE0-B2, PE0-B3, PE0-B4, PE0-B5, and PE0-B6. The binary data (PE # 1) 20 of the second processor program is divided into PE1-B1, PE1-B2, PE1-B3, PE1-B4, PE1-B5, and PE1-B6. In this case, PE0-B1 and PE1-B1 are one of the common part candidates, and PE0-B2 and PE1-B2 are one of the common part candidates. The same applies to PE0-B3 and PE1-B3 and later.

図12は、共通部分の候補を抽出する第5の方法のフローチャートであり、図13は、この第5の方法を説明する図である。図12および図13に示すように、第5の方法では、まず、バイナリデータをデータの連続性に基づいて複数の領域に分割する(ステップS151)。具体的には、各プロセッサのプログラムのバイナリデータの一部または全部を、そのバイナリデータの内部の情報が格納されているアドレスに着目し、連続してデータが入っている領域ごとに分割する。そして、分割された各領域のサイズが同じかまたは同じような領域を共通部分の候補として登録する(ステップS152)。   FIG. 12 is a flowchart of a fifth method for extracting common part candidates, and FIG. 13 is a diagram for explaining the fifth method. As shown in FIGS. 12 and 13, in the fifth method, first, binary data is divided into a plurality of regions based on the continuity of data (step S151). Specifically, a part or all of the binary data of the program of each processor is focused on an address where information inside the binary data is stored, and divided into areas where data is continuously stored. Then, an area having the same or similar size of each divided area is registered as a common part candidate (step S152).

図13に示す例では、第1のプロセッサのプログラムのバイナリデータ(PE#0)19がPE0−P1、PE0−P2、PE0−P3およびPE0−P4に分割されており、第2のプロセッサのプログラムのバイナリデータ(PE#1)20がPE1−P1、PE1−P2およびPE1−P3に分割されている。そして、PE0−P1とPE1−P1は、同じようなサイズである。また、PE0−P4とPE1−P3は、同じようなサイズである。この場合、PE0−P1とPE1−P1が共通部分の候補の一つとなり、PE0−P4とPE1−P3が共通部分の候補の一つとなる。   In the example shown in FIG. 13, the binary data (PE # 0) 19 of the program of the first processor is divided into PE0-P1, PE0-P2, PE0-P3 and PE0-P4, and the program of the second processor Binary data (PE # 1) 20 is divided into PE1-P1, PE1-P2, and PE1-P3. PE0-P1 and PE1-P1 are similar in size. PE0-P4 and PE1-P3 have the same size. In this case, PE0-P1 and PE1-P1 are one of the common part candidates, and PE0-P4 and PE1-P3 are one of the common part candidates.

なお、上述した第1〜第5の方法のうちの2つ以上を組み合わせて、共通部分の候補を抽出するようにしてもよい。例えば、第3の方法とそれ以外の方法を組み合わせる場合には、第3の方法によりユーザが指定した領域を優先して共通部分の候補とする。そして、ユーザが指定した領域を除く残りの領域に対して、第1の方法、第2の方法、第4の方法または第5の方法を適用して共通部分の候補を登録する。   In addition, you may make it extract the candidate of a common part combining 2 or more of the 1st-5th methods mentioned above. For example, when the third method and other methods are combined, the area designated by the user by the third method is given priority as a common part candidate. Then, the common portion candidates are registered by applying the first method, the second method, the fourth method, or the fifth method to the remaining regions other than the region designated by the user.

次に、元の情報から生成された共通部分の情報と差分の情報のデータ構造の一例について説明する。図14は、元の情報のデータ構造の一例を示す図であり、図15は、図14の元の情報から生成された共通部分の情報と差分の情報のデータ構造の一例を示す図である。例えば、図14に示すように、第1のセクション3と第3のセクション5が殆ど同じであり、共通部分の候補であるとする。第1のセクション3および第3のセクション5のそれぞれの先頭アドレスをB1およびB2とする。   Next, an example of the data structure of the common part information and the difference information generated from the original information will be described. 14 is a diagram showing an example of the data structure of the original information, and FIG. 15 is a diagram showing an example of the data structure of the common part information and the difference information generated from the original information of FIG. . For example, as shown in FIG. 14, it is assumed that the first section 3 and the third section 5 are almost the same and are candidates for the common part. The first addresses of the first section 3 and the third section 5 are B1 and B2, respectively.

また、第1のセクション3および第3のセクション5において、それぞれの先頭アドレスB1およびB2から、第1のセクション3のアドレスAddr1および第3のセクション5のアドレスAddr2の先頭までのオフセットアドレスをA1とする。同様に、第1のセクション3および第3のセクション5において、それぞれの先頭アドレスB1およびB2から、第1のセクション3のデータData1および第3のセクション5のデータData2の先頭までのオフセットアドレスをA2とする。   In the first section 3 and the third section 5, offset addresses from the respective head addresses B1 and B2 to the head of the address Addr1 of the first section 3 and the address Addr2 of the third section 5 are denoted as A1. To do. Similarly, in the first section 3 and the third section 5, offset addresses from the respective head addresses B1 and B2 to the head of the data Data1 of the first section 3 and the data Data2 of the third section 5 are A2 And

この場合、本実施例によれば、図15に示すように、第1のセクション3が共通部分の情報となる。従って、第1のセクション3については、先頭アドレスがB1であり、アドレスAddr1およびデータData1の先頭までのオフセットアドレスは、それぞれA1およびA2である。そして、第1のセクション3に対する第3のセクション5の差分の情報7として、先頭アドレスB1からのオフセットアドレスA1およびA2を先頭とするアドレスおよびデータを、それぞれAddr2およびData2にするという情報が付加される。   In this case, according to the present embodiment, as shown in FIG. 15, the first section 3 becomes information of the common part. Therefore, for the first section 3, the head address is B1, and the offset addresses to the head of the address Addr1 and the data Data1 are A1 and A2, respectively. Then, as the difference information 7 of the third section 5 with respect to the first section 3, the information that the addresses and data starting from the offset addresses A1 and A2 from the start address B1 are set to Addr2 and Data2, respectively, is added. The

次に、差分の情報のデータ構造の具体例について説明する。図16〜図22は、差分の情報の詳細なデータ構造の一例を示す図である。図16に示す例では、差分の情報7は、絶対アドレスのアドレス全体21と1バイトのデータ(差分データ)22で構成されている。図17に示す例では、差分の情報7は、アドレス全体21と2バイトのデータ(差分データ)23で構成されている。図18に示す例では、差分の情報7は、アドレス全体21と4バイトのデータ(差分データ)24で構成されている。   Next, a specific example of the data structure of difference information will be described. 16 to 22 are diagrams illustrating an example of a detailed data structure of difference information. In the example shown in FIG. 16, the difference information 7 includes an entire address 21 of absolute addresses and 1-byte data (difference data) 22. In the example illustrated in FIG. 17, the difference information 7 includes an entire address 21 and 2-byte data (difference data) 23. In the example shown in FIG. 18, the difference information 7 includes an entire address 21 and 4-byte data (difference data) 24.

また、図19に示す例では、差分の情報7は、4バイトのオフセットアドレス25と4バイトのデータ24で構成されている。図20に示す例では、差分の情報7は、3バイトのオフセットアドレス26と1バイトのデータ22で構成されている。図21に示す例では、差分の情報7は、2バイトのオフセットアドレス27と2バイトのデータ23で構成されている。図22に示す例では、差分の情報7は、1バイトのオフセットアドレス28と1バイトのデータ22で構成されている。なお、アドレスのバイト数やデータのバイト数は、ここに例示したものに限らない。   In the example shown in FIG. 19, the difference information 7 includes a 4-byte offset address 25 and 4-byte data 24. In the example shown in FIG. 20, the difference information 7 includes a 3-byte offset address 26 and 1-byte data 22. In the example illustrated in FIG. 21, the difference information 7 includes a 2-byte offset address 27 and 2-byte data 23. In the example illustrated in FIG. 22, the difference information 7 includes a 1-byte offset address 28 and 1-byte data 22. Note that the number of bytes of the address and the number of bytes of data are not limited to those exemplified here.

以上説明したように、実施例によれば、類似したセクションの情報を共通部分の情報とそれに対する差分の情報に再構成するので、ROMに格納されるプログラム等の容量を削減することができる。従って、コンピュータや家庭電化製品等に組み込まれるシステムボードのROMの必要容量を削減することができる。それによって、このシステムボードが組み込まれた機器を安価に提供することができる。なお、本発明がシングルプロセッサシステムに適用される場合には、ROMに格納されるプログラムは、単一のプロセッサにより実行される複数のプログラムを含んでおり、異なるプログラム同士で共通部分の候補が抽出される。   As described above, according to the embodiment, information on similar sections is reconfigured into information on the common part and information on the difference therebetween, so that the capacity of the program stored in the ROM can be reduced. Accordingly, it is possible to reduce the required capacity of the ROM of the system board incorporated in a computer, a home appliance or the like. As a result, a device in which the system board is incorporated can be provided at low cost. When the present invention is applied to a single processor system, the program stored in the ROM includes a plurality of programs executed by a single processor, and common part candidates are extracted between different programs. Is done.

なお、本実施の形態で説明したROM格納データ生成方法は、予め用意されたプログラムをパーソナルコンピュータやワークステーション等のコンピュータで実行することにより実現することができる。このプログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。またこのプログラムは、インターネット等のネットワークを介して配布することが可能な伝送媒体であってもよい。上述した実施の形態に関し、さらに以下の付記を開示する。   The ROM stored data generation method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. Further, this program may be a transmission medium that can be distributed via a network such as the Internet. The following additional notes are disclosed with respect to the embodiment described above.

(付記1)複数のセクションからなるプログラムの中から共通部分の候補を抽出するステップと、抽出された前記共通部分の候補を互いに比較して差分の情報を生成するステップと、前記共通部分の情報量と前記差分の情報量の和が元の情報量よりも少ないときに、前記共通部分の情報と前記差分の情報をROM格納データとして出力するステップと、を含むことを特徴とするROM格納データ生成方法。 (Additional remark 1) The step which extracts the candidate of a common part from the program which consists of a plurality of sections, The step which compares the extracted candidate of the said common part mutually and produces | generates the information of a difference, The information of the said common part ROM storage data, comprising: outputting the common part information and the difference information as ROM storage data when the sum of the amount and the difference information amount is smaller than the original information amount. Generation method.

(付記2)共通部分の候補を抽出する際に、各セクションの情報からセクション名を取得し、同じセクション名の領域を共通部分の候補とすることを特徴とする付記1に記載のROM格納データ生成方法。 (Supplementary note 2) The ROM storage data according to supplementary note 1, wherein when the common part candidate is extracted, the section name is obtained from the information of each section, and the area having the same section name is used as the common part candidate. Generation method.

(付記3)共通部分の候補を抽出する際に、プログラムのリンク時のリンケージエディタ出力情報からセクション名を取得し、同じセクション名の領域を共通部分の候補とすることを特徴とする付記1に記載のROM格納データ生成方法。 (Additional remark 3) When extracting a candidate for a common part, a section name is acquired from linkage editor output information at the time of linking a program, and an area having the same section name is used as a candidate for a common part. The ROM storage data generation method as described.

(付記4)共通部分の候補を抽出する際に、ユーザにより指定された領域を共通部分の候補とすることを特徴とする付記1に記載のROM格納データ生成方法。 (Supplementary note 4) The ROM stored data generation method according to supplementary note 1, wherein when a common part candidate is extracted, an area designated by a user is used as a common part candidate.

(付記5)共通部分の候補を抽出する際に、バイナリデータ全体を同じサイズの複数の領域に分割し、各領域を共通部分の候補とすることを特徴とする付記1に記載のROM格納データ生成方法。 (Supplementary note 5) The ROM stored data according to supplementary note 1, wherein when extracting a candidate for a common part, the entire binary data is divided into a plurality of areas of the same size, and each area is made a candidate for a common part. Generation method.

(付記6)共通部分の候補を抽出する際に、データの連続性に基づいてバイナリデータ全体を複数の領域に分割し、同じまたは同じようなサイズの領域を共通部分の候補とすることを特徴とする付記1に記載のROM格納データ生成方法。 (Supplementary note 6) When extracting common part candidates, the entire binary data is divided into a plurality of areas based on the continuity of the data, and areas of the same or similar size are used as common part candidates. The ROM stored data generation method according to appendix 1.

(付記7)前記差分の情報として、アドレス全体と固定長の差分データを生成することを特徴とする付記1に記載のROM格納データ生成方法。 (Supplementary note 7) The ROM storage data generation method according to supplementary note 1, wherein as the difference information, difference data of the entire address and fixed length is generated.

(付記8)前記差分の情報として、固定長のオフセットアドレスと固定長の差分データを生成することを特徴とする付記1に記載のROM格納データ生成方法。 (Supplementary note 8) The ROM stored data generation method according to supplementary note 1, wherein a fixed-length offset address and a fixed-length difference data are generated as the difference information.

(付記9)前記共通部分の情報と前記差分の情報をROM格納データとして出力する際に、前記共通部分の情報と前記差分の情報を圧縮アルゴリズムによって圧縮してから出力することを特徴とする付記1に記載のROM格納データ生成方法。 (Supplementary note 9) When outputting the common part information and the difference information as ROM storage data, the common part information and the difference information are compressed by a compression algorithm and then outputted. 2. The ROM storage data generation method according to 1.

(付記10)前記プログラムは、複数のプロセッサにより共有されるメモリに展開されて複数の前記プロセッサにより同時に実行される複数のプログラムを含んでおり、異なるプロセッサにより実行されるプログラム同士で共通部分の候補を抽出することを特徴とする付記1〜9のいずれか一つに記載のROM格納データ生成方法。 (Supplementary Note 10) The program includes a plurality of programs that are expanded in a memory shared by a plurality of processors and are simultaneously executed by the plurality of processors, and a candidate for a common part between programs executed by different processors The ROM stored data generation method according to any one of appendices 1 to 9, wherein the data is extracted.

(付記11)前記プログラムは、単一のプロセッサにより実行される複数のプログラムを含んでおり、異なるプログラム同士で共通部分の候補を抽出することを特徴とする付記1〜9のいずれか一つに記載のROM格納データ生成方法。 (Additional remark 11) The said program contains the several program run by a single processor, The candidate of a common part is extracted among different programs, Any one of Additional remark 1-9 characterized by the above-mentioned. The ROM storage data generation method as described.

(付記12)コンピュータに、前記付記1〜11のいずれか一つに記載のROM格納データ生成方法を実行させるためのROM格納データ生成プログラム。 (Additional remark 12) The ROM storage data generation program for making a computer perform the ROM stored data generation method as described in any one of the said additional remarks 1-11.

以上のように、本発明にかかるROM格納データ生成方法およびROM格納データ生成プログラムは、マルチプロセッサやシングルプロセッサが組み込まれる機器に有用であり、特に、コンピュータ、コンピュータの周辺機または家庭電化製品などに適している。   As described above, the ROM stored data generation method and the ROM stored data generation program according to the present invention are useful for a device in which a multiprocessor or a single processor is incorporated, and particularly for a computer, a computer peripheral device, or a home appliance. Is suitable.

図1は、本発明にかかるROM格納データ生成方法の実施例のフローチャートである。FIG. 1 is a flowchart of an embodiment of a ROM storage data generation method according to the present invention. 図2は、本発明にかかるROM格納データ生成方法により生成された情報が書き込まれたROMの格納状態を模式的に示す図である。FIG. 2 is a diagram schematically showing a storage state of the ROM in which information generated by the ROM storage data generation method according to the present invention is written. 図3は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第1の方法のフローチャートである。FIG. 3 is a flowchart of a first method for extracting candidates for common parts in the ROM storage data generation method according to the present invention. 図4は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第2の方法のフローチャートである。FIG. 4 is a flowchart of a second method for extracting candidates for the common part of the ROM storage data generation method according to the present invention. 図5は、第2の方法を説明する図である。FIG. 5 is a diagram for explaining the second method. 図6は、第2の方法により共通部分の候補を抽出する際のリンカ出力情報から得たセクション情報の一例を示す図である。FIG. 6 is a diagram illustrating an example of section information obtained from linker output information when a common part candidate is extracted by the second method. 図7は、第2の方法により共通部分の候補を抽出する際のリンカ出力情報から得たセクション情報の他の例を示す図である。FIG. 7 is a diagram illustrating another example of the section information obtained from the linker output information when the common part candidates are extracted by the second method. 図8は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第3の方法のフローチャートである。FIG. 8 is a flowchart of a third method for extracting candidates for common parts in the ROM storage data generation method according to the present invention. 図9は、第3の方法を説明する図である。FIG. 9 is a diagram for explaining the third method. 図10は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第4の方法のフローチャートである。FIG. 10 is a flowchart of a fourth method for extracting candidates for the common part of the ROM storage data generation method according to the present invention. 図11は、第4の方法を説明する図である。FIG. 11 is a diagram for explaining the fourth method. 図12は、本発明にかかるROM格納データ生成方法の共通部分の候補を抽出する第5の方法のフローチャートである。FIG. 12 is a flowchart of a fifth method for extracting candidates for the common part of the ROM storage data generation method according to the present invention. 図13は、第5の方法を説明する図である。FIG. 13 is a diagram for explaining the fifth method. 図14は、元の情報のデータ構造の一例を示す図である。FIG. 14 is a diagram illustrating an example of the data structure of the original information. 図15は、図14に示す元の情報から生成された共通部分の情報と差分の情報のデータ構造の一例を示す図である。FIG. 15 is a diagram illustrating an example of a data structure of common part information and difference information generated from the original information illustrated in FIG. 14. 図16は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 16 is a diagram illustrating an example of a detailed data structure of difference information. 図17は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 17 is a diagram illustrating an example of a detailed data structure of difference information. 図18は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 18 is a diagram illustrating an example of a detailed data structure of difference information. 図19は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 19 is a diagram illustrating an example of a detailed data structure of difference information. 図20は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 20 is a diagram illustrating an example of a detailed data structure of difference information. 図21は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 21 is a diagram illustrating an example of a detailed data structure of difference information. 図22は、差分の情報の詳細なデータ構造の一例を示す図である。FIG. 22 is a diagram illustrating an example of a detailed data structure of difference information. 図23は、従来のROMの格納状態を模式的に示す図である。FIG. 23 is a diagram schematically showing a storage state of a conventional ROM.

符号の説明Explanation of symbols

PE0−B1〜PE0−B6,PE1−B1〜PE1−B6 同じサイズに分割された領域
PE0−P1〜PE0−P4,PE1−P1〜PE1−P3 データの連続性に基づいて分割された領域
1 ROM
3,4,5,6 セクション
7 差分の情報
11,12 リンケージエディタ出力情報
15,16,17,18 ユーザ指定領域
19,20 バイナリデータ
21 アドレス全体
22,23,24 差分データ
25,26,27,28 オフセットアドレス
PE0-B1 to PE0-B6, PE1-B1 to PE1-B6 Area divided into the same size PE0-P1 to PE0-P4, PE1-P1 to PE1-P3 Area divided based on data continuity 1 ROM
3, 4, 5, 6 Section 7 Difference information 11, 12 Linkage editor output information 15, 16, 17, 18 User specified area 19, 20 Binary data 21 Entire address 22, 23, 24 Difference data 25, 26, 27, 28 Offset address

Claims (12)

複数のセクションからなるプログラムの中から共通部分の候補を抽出するステップと、抽出された前記共通部分の候補を互いに比較して差分の情報を生成するステップと、前記共通部分の情報量と前記差分の情報量の和が元の情報量よりも少ないときに、前記共通部分の情報と前記差分の情報をROM格納データとして出力するステップと、を含むことを特徴とするROM格納データ生成方法。   Extracting a candidate for a common part from a program composed of a plurality of sections; generating a difference information by comparing the extracted candidates for the common part with each other; and an information amount of the common part and the difference And outputting the information on the common part and the difference information as ROM storage data when the sum of the information amounts is smaller than the original information amount. 共通部分の候補を抽出する際に、各セクションの情報からセクション名を取得し、同じセクション名の領域を共通部分の候補とすることを特徴とする請求項1に記載のROM格納データ生成方法。   2. The ROM storage data generation method according to claim 1, wherein when the common part candidate is extracted, a section name is acquired from information of each section, and an area having the same section name is set as a common part candidate. 共通部分の候補を抽出する際に、プログラムのリンク時のリンケージエディタ出力情報からセクション名を取得し、同じセクション名の領域を共通部分の候補とすることを特徴とする請求項1に記載のROM格納データ生成方法。   2. The ROM according to claim 1, wherein when the common part candidate is extracted, a section name is obtained from linkage editor output information when the program is linked, and an area having the same section name is used as a common part candidate. Stored data generation method. 共通部分の候補を抽出する際に、ユーザにより指定された領域を共通部分の候補とすることを特徴とする請求項1に記載のROM格納データ生成方法。   2. The ROM storage data generation method according to claim 1, wherein when the common part candidate is extracted, an area designated by the user is set as a common part candidate. 共通部分の候補を抽出する際に、バイナリデータ全体を同じサイズの複数の領域に分割し、各領域を共通部分の候補とすることを特徴とする請求項1に記載のROM格納データ生成方法。   2. The ROM storage data generation method according to claim 1, wherein when extracting the common part candidate, the entire binary data is divided into a plurality of areas of the same size, and each area is set as a common part candidate. 共通部分の候補を抽出する際に、データの連続性に基づいてバイナリデータ全体を複数の領域に分割し、同じまたは同じようなサイズの領域を共通部分の候補とすることを特徴とする請求項1に記載のROM格納データ生成方法。   The common part candidate is extracted by dividing the entire binary data into a plurality of areas based on the continuity of the data, and an area having the same or similar size is used as a candidate for the common part. 2. The ROM storage data generation method according to 1. 前記差分の情報として、アドレス全体と固定長の差分データを生成することを特徴とする請求項1に記載のROM格納データ生成方法。   The ROM stored data generation method according to claim 1, wherein as the difference information, difference data having an entire address and a fixed length is generated. 前記差分の情報として、固定長のオフセットアドレスと固定長の差分データを生成することを特徴とする請求項1に記載のROM格納データ生成方法。   The ROM stored data generation method according to claim 1, wherein a fixed-length offset address and fixed-length difference data are generated as the difference information. 前記共通部分の情報と前記差分の情報をROM格納データとして出力する際に、前記共通部分の情報と前記差分の情報を圧縮アルゴリズムによって圧縮してから出力することを特徴とする請求項1に記載のROM格納データ生成方法。   The information on the common part and the information on the difference are output as ROM storage data after being compressed by a compression algorithm when the information on the common part and the information on the difference are output as ROM storage data. ROM storage data generation method. 前記プログラムは、複数のプロセッサにより共有されるメモリに展開されて複数の前記プロセッサにより同時に実行される複数のプログラムを含んでおり、異なるプロセッサにより実行されるプログラム同士で共通部分の候補を抽出することを特徴とする請求項1〜9のいずれか一つに記載のROM格納データ生成方法。   The program includes a plurality of programs which are expanded in a memory shared by a plurality of processors and are simultaneously executed by the plurality of processors, and a common part candidate is extracted between programs executed by different processors. The ROM storage data generation method according to claim 1, wherein: 前記プログラムは、単一のプロセッサにより実行される複数のプログラムを含んでおり、異なるプログラム同士で共通部分の候補を抽出することを特徴とする請求項1〜9のいずれか一つに記載のROM格納データ生成方法。   The ROM according to any one of claims 1 to 9, wherein the program includes a plurality of programs executed by a single processor, and a common part candidate is extracted between different programs. Stored data generation method. コンピュータに、前記請求項1〜11のいずれか一つに記載のROM格納データ生成方法を実行させるためのROM格納データ生成プログラム。   A ROM storage data generation program for causing a computer to execute the ROM storage data generation method according to any one of claims 1 to 11.
JP2008506061A 2006-03-15 2006-03-15 ROM storage data generation method and ROM storage data generation program Expired - Fee Related JP5141551B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/305151 WO2007108043A1 (en) 2006-03-15 2006-03-15 Rom storage data generation method and rom storage data generation program

Publications (2)

Publication Number Publication Date
JPWO2007108043A1 true JPWO2007108043A1 (en) 2009-07-30
JP5141551B2 JP5141551B2 (en) 2013-02-13

Family

ID=38522084

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008506061A Expired - Fee Related JP5141551B2 (en) 2006-03-15 2006-03-15 ROM storage data generation method and ROM storage data generation program

Country Status (2)

Country Link
JP (1) JP5141551B2 (en)
WO (1) WO2007108043A1 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6358536A (en) * 1986-08-29 1988-03-14 Nec Corp Microcomputer system
JPH01267766A (en) * 1988-04-20 1989-10-25 Mitsubishi Electric Corp System for loading program
JPH07248921A (en) * 1994-03-09 1995-09-26 Hitachi Ltd Initial program loading method for parallel processor system
JPH08247798A (en) * 1995-03-10 1996-09-27 Yokogawa Electric Corp Data compression method
JPH113229A (en) * 1997-06-10 1999-01-06 Matsushita Electric Ind Co Ltd Program loading method and system for realizing the method
JP4009427B2 (en) * 2001-02-07 2007-11-14 Necシステムテクノロジー株式会社 First startup time reduction method, installation method, personal computer, program
JP2003157187A (en) * 2001-11-21 2003-05-30 System Intelligent Kk Algorithm for extracting difference between two pieces of binary information

Also Published As

Publication number Publication date
JP5141551B2 (en) 2013-02-13
WO2007108043A1 (en) 2007-09-27

Similar Documents

Publication Publication Date Title
JP5039031B2 (en) Method and apparatus for executing native code and target code in combination during program code conversion
WO2011142095A1 (en) Information processing device and information processing method
JP2000242501A (en) Information processor, information processing method and program writing device
JP2007293383A (en) Program development support device and method for operating same device
EP0840242A2 (en) Method for creating a virtual file system
JP2007535241A5 (en)
WO2017014318A1 (en) Instruction set simulator and simulator generation method therefor
JP5225071B2 (en) Method for verifying pseudo code loaded on embedded systems, especially smart cards
TW201721412A (en) Selecting and loading firmware volumes
CN102388363B (en) Electron device and perform the method for instruction in virtual machine
CN113504918A (en) Equipment tree configuration optimization method and device, computer equipment and storage medium
JP2009020696A (en) Information proceing apparatus and system
US20080196009A1 (en) Apparatus and method for componentizing legacy system
JP5777843B1 (en) Processor, processing device, and program creation method
US8276132B1 (en) System and method for representing and managing a multi-architecture co-processor application program
JP5141551B2 (en) ROM storage data generation method and ROM storage data generation program
JP5128602B2 (en) Method and apparatus for making dynamically linked function calls for program code conversion
US10310871B2 (en) Non-transitory computer-readable recording medium storing control program, control device and control method
US20080077912A1 (en) Software development methods, systems, and storage media storing software developed thereby
US8645758B2 (en) Determining page faulting behavior of a memory operation
US8694975B2 (en) Programming system in multi-core environment, and method and program of the same
JP2002182926A (en) Compiling method and computer readable recording medium
JP2015197821A (en) Assembly code conversion device and conversion method thereof
US8281294B1 (en) System and method for representing and managing a multi-architecture co-processor application program
WO2020235360A1 (en) Vehicular device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120130

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120612

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120912

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120925

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20120928

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121105

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151130

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5141551

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees