WO2007108043A1 - Rom格納データ生成方法およびrom格納データ生成プログラム - Google Patents

Rom格納データ生成方法およびrom格納データ生成プログラム Download PDF

Info

Publication number
WO2007108043A1
WO2007108043A1 PCT/JP2006/305151 JP2006305151W WO2007108043A1 WO 2007108043 A1 WO2007108043 A1 WO 2007108043A1 JP 2006305151 W JP2006305151 W JP 2006305151W WO 2007108043 A1 WO2007108043 A1 WO 2007108043A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
common part
storage data
rom storage
data generation
Prior art date
Application number
PCT/JP2006/305151
Other languages
English (en)
French (fr)
Inventor
Teruhiko Kamigata
Original Assignee
Fujitsu Limited
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 Limited filed Critical Fujitsu Limited
Priority to PCT/JP2006/305151 priority Critical patent/WO2007108043A1/ja
Priority to JP2008506061A priority patent/JP5141551B2/ja
Publication of WO2007108043A1 publication Critical patent/WO2007108043A1/ja

Links

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

Definitions

  • 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.
  • ROM read only memory
  • an operating system (OS) and application programs are stored in different memory address areas of the ROM for each processor that executes them.
  • OS operating system
  • application programs are stored in different memory address areas of the ROM for each processor that executes them.
  • a first processor executes an OS or program stored in the first and second sections of ROM.
  • the second processor executes an OS and a program stored in the third section and the fourth section of the ROM.
  • the binary image power of the program for each processor may differ only in part such as the branch destination address and data pointer value, and the remaining data and processing routines may be almost the same.
  • the ROM 1 has the boot loader (Boot Loader) 2, the first section (Seel) 3, the second section (Sec2) 4, the third section (Sec3 ) 5, 4th section (Sec4) 6, ...
  • Each section is stored per processor.
  • the OS and application program for each processor are read from the ROM 1 and loaded in the main work memory.
  • a microcomputer system that executes an OS including a common unit and a plurality of additional units having different functions is known (see, for example, Patent Document 2).
  • a common unit of a plurality of OSs is included.
  • ROM to store
  • ROM group to store additional parts of multiple OSs
  • switch for selecting one additional part from multiple additional parts of OS
  • switch Means for reading the ROM and the ROM group power and storing them in the processing memory.
  • Patent Document 1 Japanese Patent Laid-Open No. 62-272341
  • Patent Document 2 JP-A 63-58536
  • Patent Document 1 describes how to generate data for a portion of the loader ROM program that is common to each board and data for portions that differ for each board. Absent.
  • Patent Document 2 describes how to generate a common part and a plurality of additional parts of a plurality of OSs.
  • the present invention has been made in view of the above, and a ROM storage data generation method and ROM storage data capable of reducing the capacity of a ROM provided on a system board
  • An object is to provide a generation program.
  • the present invention extracts candidates for a common common part of a program composed of a plurality of sections, and compares the extracted common part candidates with each other. And generating 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 difference information amount is larger than the original information amount, the original information is output as ROM storage data as it is without being divided into the common part information and the difference information.
  • the first method is to obtain the section name from the information of each section and use the same section name area as a candidate for the common part.
  • the second method is to obtain the section name from the linkage editor output information when the program is linked, and use the same section name area as a candidate for the common part.
  • the third method is to use the area specified by the user as a candidate for the common part.
  • the fourth method is a method in which the entire nounary data is divided into a plurality of regions of the same size, and each region is 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 part.
  • Two or more of the first to fifth extraction methods may be combined to extract a common part candidate.
  • 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.
  • the common part information and the difference information may be compressed using a compression algorithm and then output as ROM storage data.
  • a program stored in a ROM is expanded into a memory shared by a plurality of processors and a plurality of programs that are simultaneously executed by the plurality of processors. Contains. In this case, candidates for common parts are extracted between programs executed by different processors. This is the binary image power of programs and data for each processor Branch destination address and data pointer It is also the power that most of the remaining data and processing routines can be the same even if only a part of the value of is different.
  • the program stored in ROM includes a plurality of programs executed by a single processor, and common part candidates are extracted between different programs. The
  • the ROM stored data generation method and the ROM stored data generation program that are useful for the present invention have the effect of reducing the capacity of the ROM provided on the system board. Therefore, there is an effect that it is possible to provide equipment such as a computer and home appliances incorporating the system board at low cost.
  • FIG. 1 is a flowchart of an embodiment of a ROM stored data generation method according to the present invention.
  • FIG. 2 is a diagram schematically showing a storage state of a ROM in which information generated by the ROM storage data generation method according to the present invention is written.
  • FIG. 3 is a flowchart of a first method for extracting common part candidates in the ROM storage data generation method according to the present invention.
  • 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.
  • FIG. 5 is a diagram for explaining a second method.
  • FIG. 6 is a diagram showing an example of section information obtained from linker output information when a common part candidate is extracted by the second method.
  • FIG. 7 is a diagram showing another example of section information obtained from linker output information when a common part candidate is extracted by the second method.
  • FIG. 8 is a flowchart of a third method for extracting common part candidates in the ROM storage data generation method according to the present invention.
  • FIG. 9 is a diagram for explaining a third method.
  • 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.
  • FIG. 11 is a diagram for explaining a fourth method.
  • 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.
  • FIG. 13 is a diagram for explaining a fifth method.
  • FIG. 14 is a diagram illustrating an example of a data structure of original information.
  • FIG. 15 is a diagram showing an example of a data structure of common part information and difference information generated from the original information shown in FIG.
  • FIG. 16 is a diagram illustrating an example of a detailed data structure of difference information.
  • FIG. 17 is a diagram illustrating an example of a detailed data structure of difference information.
  • FIG. 18 is a diagram illustrating an example of a detailed data structure of difference information.
  • FIG. 19 is a diagram illustrating an example of a detailed data structure of difference information.
  • FIG. 20 is a diagram illustrating an example of a detailed data structure of difference information.
  • FIG. 21 is a diagram showing an example of a detailed data structure of difference information.
  • FIG. 22 is a diagram illustrating an example of a detailed data structure of difference information.
  • FIG. 23 is a diagram schematically showing a conventional ROM storage state.
  • ROM storage data generation method and a ROM storage data generation program according to the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.
  • a program written in the manufacturing stage cannot be rewritten later.
  • a part or all of a program written in the manufacturing stage can be rewritten.
  • Possible non-volatile memory eg EEPROM such as EPROM or flash memory.
  • FIG. 1 is a flowchart of an embodiment of a ROM storage data generation method useful for the present invention.
  • candidates for common parts are also extracted from the execution-type load module power executed by each processor in the multiprocessor system (step Sl). Details of this candidate extraction method will be described later.
  • the extracted common part candidates are binary compared with each other (step S2).
  • the information of the difference between the common part candidates compared is created (step S3).
  • common part C and difference D are used for simplicity.
  • step S4 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. 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 it is possible to compress the common part information, the difference information, and the decompression routine information (each information) by the compression algorithm (step S6). If it is compressed (step S6: Yes), the information is compressed (step S7). At that time, an existing compression algorithm can be used.
  • step S8 the compressed common part information, difference information, and decompression routine information are output (step S8), and the process ends.
  • 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.
  • step S4 if the information of the common part and the difference information is larger than the total information amount of the original information, the original information is output as it is (step S4: No). (Step S9), the process ends.
  • FIG. 2 is a diagram schematically showing the storage state of the ROM in which the common part information, the difference information, and the development routine information are written.
  • the ROM 1 has the boot loader 2, the first section 3, the second section 4, the fourth section 6, the first section 3, and the like. Difference information with the three sections 7, ... stored.
  • Figure 3 is a flowchart of the first method for extracting common part candidates. As shown in Figure 3, in the first method, the section name is first obtained from the section information in the load module executed by each processor (step
  • the section is an instruction code part of the program, a data part, or a set of routines into which they are further divided.
  • FIG. 4 is a flowchart of the second method for extracting common part candidates
  • FIG. 5 is a diagram for explaining the second method.
  • the program of each processor when linked, it is output from the linkage editor (linker) of binary data (PE # 0, PE # 1).
  • linkage editor linker
  • PE # 0, PE # 1 binary data
  • the respective section information 13 and 14 are obtained, and the respective section names are obtained (step S121).
  • an area with the same section name is registered as a candidate for the common part (step S122).
  • FIG. 6 shows an example of section information obtained from the output information from the linker of the first processor.
  • Figure 7 shows the section where the output information power from the linker of the second processor was obtained.
  • An example of information is shown.
  • the section names "kernel-code-sc" and "LIBCODE-A" are included in common. Therefore, the sections with these names are candidates for common parts.
  • FIG. 8 is a flowchart of a third method for extracting common part candidates
  • FIG. 9 is a diagram for explaining the third method.
  • the third method first, information specified by the user is acquired (step S131). Then, the designated areas 15, 16, 17, and 18 of the user are registered as common part candidates (step S132). In the example shown in FIG. 9, the user designated area 15 and the user designated area 16 are one of the common part candidates, and the user designated area 17 and the user designated area 18 are one of the common part candidates.
  • FIG. 10 is a flowchart of a fourth method for extracting common part candidates
  • FIG. 11 is a diagram for explaining the fourth method.
  • the fourth method first, part or all of the binary data of the program of each processor is automatically divided into a plurality of areas of the same size (step S141). Then, each divided area is registered as a common part candidate (step S 142).
  • the binary data (PE # 0) 19 of the first processor program is transferred to PEO—Bl, PEO—B2, PEO—B3, PEO—B4, PEO—B5, and PEO—B6.
  • the second processor program binary data (PE # 1) is divided into 20 forces PE1—B1, PE1—B2, PE1—B3, PE1—B4, PE1—B5 and PE1—B6.
  • PE0-B1 and PE1-B1 are one of the common part candidates
  • PE0-B2 and PE1-B2 are one of the common part candidates.
  • FIG. 12 is a flowchart of the fifth method for extracting common part candidates
  • FIG. 13 is a diagram for explaining the fifth method.
  • binary data is divided into a plurality of regions based on the continuity of the data (step S151).
  • a part or all of the binary data of the program of each processor focuses on the address where the internal information of the binary data is stored, and is divided into areas that contain data continuously. .
  • an area having the same or similar size of each divided area is registered as a common part candidate (step S 152).
  • FIG. 12 is a flowchart of the fifth method for extracting common part candidates
  • FIG. 13 is a diagram for explaining the fifth method.
  • step S151 binary data is divided into a plurality of regions based on the continuity of the data
  • a part or all of the binary data of the program of each processor focuses on the address where the internal information of the binary data is stored, and is divided into areas that contain data continuously.
  • an area having the same or similar size of each divided area is registered as a
  • the binary data (PE # 0) 19 of the first processor program is divided into PEO—P1, PEO—P2, PEO—P3, and PEO—P4.
  • the processor program binary data (PE # 1) is divided into 20 power Pl, PE1—P2 and PE1—P3.
  • PEO-P1 and PE1-P1 are the same size.
  • PEO-P4 and PE1-P3 are similar in size. In this case, PEO-P1 and PE1 P1 are one of the common part candidates, and PEO-P4 and PE1-P3 are one of the common part candidates.
  • a candidate for the common portion may be extracted by combining two or more of the first to fifth methods described 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 candidate for the common part is registered by applying the first method, the second method, the fourth method, or the fifth method to the remaining regions excluding the region designated by the user.
  • FIG. 14 is a diagram showing an example of the data structure of the original information
  • FIG. 15 is a diagram showing an example of the data structure of the common part information and the difference information in which the original information power of FIG. 14 is also generated. is there.
  • the first section 3 and the third section 5 are almost the same and are candidates for the common part.
  • B1 and B2 be the first addresses of the first section 3 and third section 5, respectively.
  • the address is A1.
  • the address is A2.
  • the first section 3 is information on the common part. Therefore, for the first section 3, the head address is B1, and the offset addresses to the head of the address Addrl and data Datal are A1 and A2, respectively. Then, the difference information 7 of the third section 5 with respect to the first section 3 is Thus, if the address and data starting from the offset address Al and A2 from the start address Bl are set to Addr2 and Data2, respectively, input information is added.
  • 16 to 22 are diagrams showing an example of a detailed data structure of the difference information.
  • the difference information 7 is composed of an entire address 21 of absolute addresses and 1-byte data (difference data) 22.
  • the difference information 7 is composed of the entire address 21 and 2-byte data (difference data) 23.
  • the difference information 7 is composed of the entire address 21 and 4-byte data (difference data) 24.
  • the difference information 7 includes a 4-byte offset address 25 and 4-byte data 24.
  • the difference information 7 is composed of a 3-byte offset address 26 and a 1-byte data 22.
  • the difference information 7 is composed of a 2-byte offset address 27 and a 2-byte data 23 !.
  • the difference information 7 includes a 1-byte offset address 28 and a 1-byte data 22. Note that the number of address bytes and the number of data bytes are not limited to those shown here.
  • the ROM storage data generation method described in the present 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, or a DVD, and is executed by being read out by the computer.
  • Mako This program may be a transmission medium that can be distributed via a network such as the Internet.
  • 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 in particular, a computer, a computer peripheral device, or a home appliance. Suitable for products.

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格納データとして出力する。

Description

ROM格納データ生成方法および ROM格納データ生成プログラム 技術分野
[0001] 本発明は、リードオンリメモリ(ROM)に格納されるデータを生成する ROM格納デ ータ生成方法およびその方法をコンピュータに実行させるための ROM格納データ 生成プログラムに関するものである。 背景技術
[0002] 従来、複数のプロセッサを内蔵した組み込み非対称型マルチプロセッサシステムで は、オペレーティングシステム(OS)やアプリケーションプログラムは、それらを実行す るプロセッサごとに、 ROMの異なるメモリアドレス領域に格納されている。例えば、第 1のプロセッサが、 ROMの第 1のセクションと第 2のセクションに格納された OSやプロ グラムを実行するとする。
[0003] また、第 2のプロセッサが、 ROMの第 3のセクションと第 4のセクションに格納された OSやプログラムを実行するとする。このような場合、プロセッサごとのプログラムのバ イナリイメージ力 分岐先アドレスやデータのポインタの値などの一部のみが異なり、 残りのデータや処理ルーチンが殆ど同じになることがある。
[0004] 例えば、上記例において、第 1のセクションと第 3のセクションが殆ど同じであるとす る。このような場合でも、従来は、図 23に示すように、 ROM1に、ブートローダ(Boot Loader) 2、第 1のセクション(Seel) 3、第 2のセクション(Sec2) 4、第 3のセクション (Sec3) 5、第 4のセクション(Sec4) 6、 · · · ·というように、各セクションは、プロセッサ ごとに格納される。
[0005] そして、マルチプロセッサシステムが動作する際には、 ROM1から各プロセッサ用 の OSやアプリケーションプログラムが読み出され、作業用のメインメモリに展開される 。単一のプロセッサが複数の OSやプログラムを実行するシングルプロセッサシステム においても同様である。
[0006] ところで、マルチプロセッサシステムにおけるブートローデイング方式に関して、少な くとも 1個のローダ ROMを共有し、電源投入時に該ローダ ROMのプログラムによつ て各プロセッサの揮発性メモリにプログラムをダウンロードするように、構成したことを 特徴とする方式が公知である(例えば、特許文献 1参照。 ) oこの方式では、ローダ R OMのプログラムは、各ボードに共通の部分と各ボードによって異なる部分力 構成 されている。
[0007] また、共通部および機能の異なる複数の付加部からなる OSを実行するマイクロコン ピュータシステムが公知である(例えば、特許文献 2参照。 ) 0このシステムでは、複数 の OSの共通部を格納する ROMと、複数の OSの付加部をそれぞれ格納する ROM 群と、複数の OSの付加部から一つの付加部を選択するためのスィッチと、 OSの共 通部およびスィッチにより選択された OSの付加部をそれぞれ前記 ROMおよび前記 ROM群力 読み出して処理用メモリに格納する手段が設けられている。
[0008] 特許文献 1:特開昭 62— 272341号公報
特許文献 2:特開昭 63 - 58536号公報
発明の開示
発明が解決しょうとする課題
[0009] しかしながら、上述したように、マルチプロセッサシステムにおいて、 ROMに、各プ 口セッサ上で動作する複数の OSやアプリケーションプログラムをプロセッサごとに単 純に格納すると、大容量の ROMが必要となる。そのため、マルチプロセッサシステム を構成するシステムボードのコストが増大し、このボードが組み込まれたコンピュータ や家庭電ィ匕製品などの機器が高価になってしまう。従って、これらの機器を安価に提 供するためには、システムボードのコストを下げる必要があり、そのためには、 ROM に格納される複数の OSやアプリケーションプログラムの容量を削減する必要がある。
[0010] シングルプロセッサシステムを構成するシステムボードの場合も同様である。また、 上記特許文献 1には、ローダ ROMのプログラムの、各ボードに共通する部分のデー タと、各ボードによって異なる部分のデータをどのようにして生成するかということにつ いては記載されていない。同様に、上記特許文献 2には、複数の OSの共通部と複数 の付加部をどのようにして生成するかと 、うことにつ ヽては記載されて ヽな 、。
[0011] 本発明は、上記に鑑みてなされたものであって、システムボードに設けられる ROM の容量を削減することができる ROM格納データ生成方法および ROM格納データ 生成プログラムを提供することを目的とする。 課題を解決するための手段
[0012] 上述した課題を解決し、目的を達成するために、本発明は、複数のセクションから なるプログラムの中力 共通部分の候補を抽出し、その抽出された共通部分の候補 を互いに比較して差分の情報を生成することを特徴とする。そして、共通部分の情報 量と差分の情報量の和が元の情報量よりも少なければ、共通部分の情報と差分の情 報を ROM格納データとして出力する。共通部分の情報量と差分の情報量の和が元 の情報量よりも多ければ、共通部分の情報と差分の情報に分けずに、元の情報をそ のまま ROM格納データとして出力する。
[0013] 共通部分の候補を抽出する方法として、以下の 5つの方法がある。第 1の方法は、 各セクションの情報からセクション名を取得し、同じセクション名の領域を共通部分の 候補とする方法である。第 2の方法は、プログラムのリンク時のリンケージエディタ出 力情報カゝらセクション名を取得し、同じセクション名の領域を共通部分の候補とする 方法である。第 3の方法は、ユーザにより指定された領域を共通部分の候補とする方 法である。第 4の方法は、ノイナリデータ全体を同じサイズの複数の領域に分割し、 各領域を共通部分の候補とする方法である。第 5の方法は、データの連続性に基づ いてバイナリデータ全体を複数の領域に分割し、同じまたは同じようなサイズの領域 を共通部分の候補とする方法である。
[0014] 上記第 1から第 5の抽出方法のうちの 2つ以上を組み合わせて、共通部分の候補を 抽出するよう〖こしてもよい。ここで、差分の情報として、アドレス全体と固定長の差分 データを生成してもよ 、し、固定長のオフセットアドレスと固定長の差分データを生成 するようにしてもよい。また、共通部分の情報と差分の情報を圧縮アルゴリズムによつ て圧縮してから ROM格納データとして出力するようにしてもょ 、。
[0015] 本発明がマルチプロセッサシステムに適用される場合には、 ROMに格納されるプ ログラムは、複数のプロセッサにより共有されるメモリに展開されて複数のプロセッサ により同時に実行される複数のプログラムを含んでいる。この場合、異なるプロセッサ により実行されるプログラム同士で共通部分の候補が抽出される。これは、プロセッサ ごとのプログラムやデータのバイナリイメージ力 分岐先アドレスやデータのポインタ の値などの一部が異なるだけで、残りのデータや処理ルーチンの殆どが同じになるこ とがある力もである。本発明がシングルプロセッサシステムに適用される場合には、 R OMに格納されるプログラムは、単一のプロセッサにより実行される複数のプログラム を含んでおり、異なるプログラム同士で共通部分の候補が抽出される。
発明の効果
[0016] 本発明に力かる ROM格納データ生成方法および ROM格納データ生成プロダラ ムは、システムボードに設けられる ROMの容量を削減することができるという効果を 奏する。従って、このシステムボードが組み込まれたコンピュータや家庭電ィ匕製品な どの機器を安価に提供することができるという効果を奏する。
図面の簡単な説明
[0017] [図 1]図 1は、本発明に力かる ROM格納データ生成方法の実施例のフローチャート である。
[図 2]図 2は、本発明にかかる ROM格納データ生成方法により生成された情報が書 き込まれた ROMの格納状態を模式的に示す図である。
[図 3]図 3は、本発明にかかる ROM格納データ生成方法の共通部分の候補を抽出 する第 1の方法のフローチャートである。
[図 4]図 4は、本発明にかかる ROM格納データ生成方法の共通部分の候補を抽出 する第 2の方法のフローチャートである。
[図 5]図 5は、第 2の方法を説明する図である。
[図 6]図 6は、第 2の方法により共通部分の候補を抽出する際のリンカ出力情報から 得たセクション情報の一例を示す図である。
[図 7]図 7は、第 2の方法により共通部分の候補を抽出する際のリンカ出力情報から 得たセクション情報の他の例を示す図である。
[図 8]図 8は、本発明にかかる ROM格納データ生成方法の共通部分の候補を抽出 する第 3の方法のフローチャートである。
[図 9]図 9は、第 3の方法を説明する図である。
[図 10]図 10は、本発明にかかる ROM格納データ生成方法の共通部分の候補を抽 出する第 4の方法のフローチャートである。 [図 11]図 11は、第 4の方法を説明する図である。
[図 12]図 12は、本発明にかかる ROM格納データ生成方法の共通部分の候補を抽 出する第 5の方法のフローチャートである。
[図 13]図 13は、第 5の方法を説明する図である。
[図 14]図 14は、元の情報のデータ構造の一例を示す図である。
[図 15]図 15は、図 14に示す元の情報から生成された共通部分の情報と差分の情報 のデータ構造の一例を示す図である。
[図 16]図 16は、差分の情報の詳細なデータ構造の一例を示す図である。
[図 17]図 17は、差分の情報の詳細なデータ構造の一例を示す図である。
[図 18]図 18は、差分の情報の詳細なデータ構造の一例を示す図である。
[図 19]図 19は、差分の情報の詳細なデータ構造の一例を示す図である。
[図 20]図 20は、差分の情報の詳細なデータ構造の一例を示す図である。
[図 21]図 21は、差分の情報の詳細なデータ構造の一例を示す図である。
[図 22]図 22は、差分の情報の詳細なデータ構造の一例を示す図である。
[図 23]図 23は、従来の ROMの格納状態を模式的に示す図である。
符号の説明
PEO— B1〜PE0— B6, PE1— B1〜PE1— B6 同じサイズに分割された領域 PEO— 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 オフセッ卜アド、レス 発明を実施するための最良の形態
[0019] 以下に、本発明にかかる ROM格納データ生成方法および ROM格納データ生成 プログラムの実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの 発明が限定されるものではない。本明細書では、 ROMには、製造段階で書き込まれ たプログラム等を後に書き換えることができな 、マスク ROMだけでなく、製造段階で 書き込まれたプログラム等の一部または全部を書き換えることができる書き換え可能 な不揮発性メモリ、例えば EPROMやフラッシュメモリ等の EEPROMが含まれる。
[0020] 図 1は、本発明に力かる ROM格納データ生成方法の実施例のフローチャートであ る。図 1に示すように、まず、マルチプロセッサシステムの各プロセッサが実行する実 行形式ロードモジュール力も共通部分の候補を抽出する (ステップ Sl)。この候補の 抽出方法の詳細については、後述する。ついで、抽出された共通部分の候補同士で 、それぞれの情報をバイナリ比較する (ステップ S2)。そして、比較された共通部分の 候補同士の差分の情報を作成する (ステップ S3)。なお、図 1では、記載を簡略化す るため、共通部分 Cおよび差分 Dとしている。
[0021] 次いで、共通部分の情報と差分の情報を足したものの情報量が、元の情報の総和 の情報量よりも少ないか否かを判断する (ステップ S4)。その結果、少ない場合 (ステ ップ S4 :Yes)には、共通部分の情報と差分の情報を復元するための展開ルーチン の情報を作成する (ステップ S5)。次いで、共通部分の情報、差分の情報および展開 ルーチンの情報 (各情報)を圧縮アルゴリズムによって圧縮する力否かを判断する (ス テツプ S6)。圧縮する場合 (ステップ S6 : Yes)には、それらの情報を圧縮する (ステツ プ S7)。その際、既存の圧縮アルゴリズムを用いることができる。
[0022] 次 、で、圧縮された共通部分の情報、差分の情報および展開ルーチンの情報を出 力し (ステップ S8)、終了する。一方、ステップ S6で圧縮しない場合 (ステップ S6 : No )には、共通部分の情報、差分の情報および展開ルーチンの情報をそのままを出力 し (ステップ S8)、終了する。また、ステップ S4において、共通部分の情報と差分の情 報を足したものの情報量力 元の情報の総和の情報量よりも多 、場合 (ステップ S4: No)には、元の情報をそのまま出力し (ステップ S9)、終了する。
[0023] ステップ 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、 · · · ·というように格納される。
[0024] 次に、共通部分の候補の抽出方法について説明する。抽出方法については、特に 限定しないが、次の 5つの方法がある。図 3は、共通部分の候補を抽出する第 1の方 法のフローチャートである。図 3に示すように、第 1の方法では、まず、各プロセッサが 実行するロードモジュール内のセクション情報から、セクション名を取得する(ステップ
5111)。次いで、同じセクション名の領域を共通部分の候補として登録する (ステップ
5112)。
[0025] 同じセクション名の領域を見つけるには、例えば、第 1のプロセッサが実行するロー ドモジュール内のあるセクションの名称と同じ名称のセクション力 第 2のプロセッサ、 第 3のプロセッサ、 · · · ·がそれぞれ実行するロードモジュール内にある力否かを検索 すればよい。ここで、セクションとは、プログラムの命令コード部、データ部、またはそ れらがさらに詳細に分割されたルーチンの集合のことである。
[0026] 図 4は、共通部分の候補を抽出する第 2の方法のフローチャートであり、図 5は、こ の第 2の方法を説明する図である。図 4および図 5に示すように、第 2の方法では、ま ず、各プロセッサのプログラムをリンクさせるときに、バイナリデータ(PE # 0、 PE # 1) のリンケージエディタ(リンカ)から出力されるプロセッサごとのリンカマップリストの情 報 11, 12を用いて、それぞれのセクション情報 13, 14を取得し、それぞれのセクショ ン名を取得する (ステップ S121)。次いで、同じセクション名の領域を共通部分の候 補として登録する (ステップ S 122)。
[0027] 例えば、第 1のプロセッサのリンカからの出力情報力も得たセクション情報の例を図 6に示す。また、図 7に、第 2のプロセッサのリンカからの出力情報力 得たセクション 情報の例を示す。両図に示す例の場合、「kernel— code— sc」 「LIBCODE— A」 というセクション名が共通して含まれている。従って、これらの名称のセクションを共通 部分の候補とする。
[0028] 図 8は、共通部分の候補を抽出する第 3の方法のフローチャートであり、図 9は、こ の第 3の方法を説明する図である。図 8および図 9に示すように、第 3の方法では、ま ず、ユーザが指定した情報を取得する (ステップ S131)。そして、そのユーザの指定 領域 15, 16, 17, 18を共通部分の候補として登録する (ステップ S132)。図 9に示 す例では、ユーザ指定領域 15とユーザ指定領域 16が共通部分の候補の一つとなり 、ユーザ指定領域 17とユーザ指定領域 18が共通部分の候補の一つとなる。
[0029] 図 10は、共通部分の候補を抽出する第 4の方法のフローチャートであり、図 11は、 この第 4の方法を説明する図である。図 10および図 11に示すように、第 4の方法では 、まず、各プロセッサのプログラムのバイナリデータの一部または全部を同じサイズの 複数の領域に自動的に分割する (ステップ S141)。そして、分割された各領域を共 通部分の候補として登録する (ステップ S 142)。
[0030] 図 11に示す例では、第 1のプロセッサのプログラムのバイナリデータ(PE # 0) 19が PEO— Bl、 PEO— B2、 PEO— B3、 PEO— B4、 PEO— B5および PEO— B6に分割 されており、第 2のプロセッサのプログラムのバイナリデータ(PE # 1) 20力 PE1— B1 、 PE1— B2、 PE1— B3、 PE1— B4、 PE1— B5および PE1— B6に分割されている 。この場合、 PE0— B1と PE1— B1が共通部分の候補の一つとなり、 PE0— B2とPE 1— B2が共通部分の候補の一つとなる。 PE0— B3と PE1— B3以降についても同様 である。
[0031] 図 12は、共通部分の候補を抽出する第 5の方法のフローチャートであり、図 13は、 この第 5の方法を説明する図である。図 12および図 13に示すように、第 5の方法では 、まず、バイナリデータをデータの連続性に基づいて複数の領域に分割する (ステツ プ S151)。具体的には、各プロセッサのプログラムのバイナリデータの一部または全 部を、そのバイナリデータの内部の情報が格納されているアドレスに着目し、連続し てデータが入っている領域ごとに分割する。そして、分割された各領域のサイズが同 じかまたは同じような領域を共通部分の候補として登録する (ステップ S 152)。 [0032] 図 13に示す例では、第 1のプロセッサのプログラムのバイナリデータ(PE # 0) 19が PEO— Pl、 PEO— P2、 PEO— P3および PEO— P4に分割されており、第 2のプロセ ッサのプログラムのバイナリデータ(PE # 1) 20力 Pl、 PE1— P2および PE1 —P3に分割されている。そして、 PEO— P1と PE1— P1は、同じようなサイズである。 また、 PEO— P4と PE1— P3は、同じようなサイズである。この場合、 PEO— P1と PE1 P1が共通部分の候補の一つとなり、 PEO— P4と PE1— P3が共通部分の候補の 一つとなる。
[0033] なお、上述した第 1〜第 5の方法のうちの 2つ以上を組み合わせて、共通部分の候 補を抽出するようにしてもよい。例えば、第 3の方法とそれ以外の方法を組み合わせ る場合には、第 3の方法によりユーザが指定した領域を優先して共通部分の候補と する。そして、ユーザが指定した領域を除く残りの領域に対して、第 1の方法、第 2の 方法、第 4の方法または第 5の方法を適用して共通部分の候補を登録する。
[0034] 次に、元の情報力 生成された共通部分の情報と差分の情報のデータ構造の一例 について説明する。図 14は、元の情報のデータ構造の一例を示す図であり、図 15は 、図 14の元の情報力も生成された共通部分の情報と差分の情報のデータ構造の一 例を示す図である。例えば、図 14に示すように、第 1のセクション 3と第 3のセクション 5が殆ど同じであり、共通部分の候補であるとする。第 1のセクション 3および第 3のセ クシヨン 5のそれぞれの先頭アドレスを B1および B2とする。
[0035] また、第 1のセクション 3および第 3のセクション 5において、それぞれの先頭アドレス B1および B2から、第 1のセクション 3のアドレス Addrlおよび第 3のセクション 5のアド レス Addr2の先頭までのオフセットアドレスを A1とする。同様に、第 1のセクション 3お よび第 3のセクション 5において、それぞれの先頭アドレス B1および B2から、第 1のセ クシヨン 3のデータ Datalおよび第 3のセクション 5のデータ Data2の先頭までのオフ セットアドレスを A2とする。
[0036] この場合、本実施例によれば、図 15に示すように、第 1のセクション 3が共通部分の 情報となる。従って、第 1のセクション 3については、先頭アドレスが B1であり、ァドレ ス Addrlおよびデータ Datalの先頭までのオフセットアドレスは、それぞれ A1および A2である。そして、第 1のセクション 3に対する第 3のセクション 5の差分の情報 7とし て、先頭アドレス Blからのオフセットアドレス Alおよび A2を先頭とするアドレスおよ びデータを、それぞれ Addr2および Data2にすると ヽぅ情報が付加される。
[0037] 次に、差分の情報のデータ構造の具体例について説明する。図 16〜図 22は、差 分の情報の詳細なデータ構造の一例を示す図である。図 16に示す例では、差分の 情報 7は、絶対アドレスのアドレス全体 21と 1バイトのデータ(差分データ) 22で構成 されている。図 17に示す例では、差分の情報 7は、アドレス全体 21と 2バイトのデータ (差分データ) 23で構成されている。図 18に示す例では、差分の情報 7は、アドレス 全体 21と 4バイトのデータ(差分データ) 24で構成されている。
[0038] また、図 19に示す例では、差分の情報 7は、 4バイトのオフセットアドレス 25と 4バイ トのデータ 24で構成されている。図 20に示す例では、差分の情報 7は、 3バイトのォ フセットアドレス 26と 1バイトのデータ 22で構成されている。図 21に示す例では、差 分の情報 7は、 2バイトのオフセットアドレス 27と 2バイトのデータ 23で構成されて!、る 。図 22に示す例では、差分の情報 7は、 1バイトのオフセットアドレス 28と 1バイトのデ ータ 22で構成されている。なお、アドレスのバイト数やデータのバイト数は、ここに例 示したものに限らない。
[0039] 以上説明したように、実施例によれば、類似したセクションの情報を共通部分の情 報とそれに対する差分の情報に再構成するので、 ROMに格納されるプログラム等の 容量を削減することができる。従って、コンピュータや家庭電化製品等に組み込まれ るシステムボードの ROMの必要容量を削減することができる。それによつて、このシ ステムボードが組み込まれた機器を安価に提供することができる。なお、本発明がシ ングルプロセッサシステムに適用される場合には、 ROMに格納されるプログラムは、 単一のプロセッサにより実行される複数のプログラムを含んでおり、異なるプログラム 同士で共通部分の候補が抽出される。
[0040] なお、本実施の形態で説明した ROM格納データ生成方法は、予め用意されたプ ログラムをパーソナルコンピュータやワークステーション等のコンピュータで実行する こと〖こより実現することができる。このプログラムは、ハードディスク、フレキシブルディ スク、 CD-ROM, MO、 DVD等のコンピュータで読み取り可能な記録媒体に記録 され、コンピュータによって記録媒体力 読み出されることによって実行される。またこ のプログラムは、インターネット等のネットワークを介して配布することが可能な伝送媒 体であってもよい。
産業上の利用可能性
以上のように、本発明にかかる ROM格納データ生成方法および ROM格納データ 生成プログラムは、マルチプロセッサやシングルプロセッサが組み込まれる機器に有 用であり、特に、コンピュータ、コンピュータの周辺機または家庭電ィ匕製品などに適し ている。

Claims

請求の範囲
[1] 複数のセクション力 なるプログラムの中力 共通部分の候補を抽出するステップと
、抽出された前記共通部分の候補を互いに比較して差分の情報を生成するステップ と、前記共通部分の情報量と前記差分の情報量の和が元の情報量よりも少ないとき に、前記共通部分の情報と前記差分の情報を ROM格納データとして出力するステ ップと、を含むことを特徴とする ROM格納データ生成方法。
[2] 共通部分の候補を抽出する際に、各セクションの情報力 セクション名を取得し、同 じセクション名の領域を共通部分の候補とすることを特徴とする請求項 1に記載の RO
M格納データ生成方法。
[3] 共通部分の候補を抽出する際に、プログラムのリンク時のリンケージエディタ出力情 報カゝらセクション名を取得し、同じセクション名の領域を共通部分の候補とすることを 特徴とする請求項 1に記載の ROM格納データ生成方法。
[4] 共通部分の候補を抽出する際に、ユーザにより指定された領域を共通部分の候補 とすることを特徴とする請求項 1に記載の ROM格納データ生成方法。
[5] 共通部分の候補を抽出する際に、バイナリデータ全体を同じサイズの複数の領域 に分割し、各領域を共通部分の候補とすることを特徴とする請求項 1に記載の ROM 格納データ生成方法。
[6] 共通部分の候補を抽出する際に、データの連続性に基づいてバイナリデータ全体 を複数の領域に分割し、同じまたは同じようなサイズの領域を共通部分の候補とする ことを特徴とする請求項 1に記載の ROM格納データ生成方法。
[7] 前記差分の情報として、アドレス全体と固定長の差分データを生成することを特徴 とする請求項 1に記載の ROM格納データ生成方法。
[8] 前記差分の情報として、固定長のオフセットアドレスと固定長の差分データを生成 することを特徴とする請求項 1に記載の ROM格納データ生成方法。
[9] 前記共通部分の情報と前記差分の情報を ROM格納データとして出力する際に、 前記共通部分の情報と前記差分の情報を圧縮アルゴリズムによって圧縮してから出 力することを特徴とする請求項 1に記載の ROM格納データ生成方法。
[10] 前記プログラムは、複数のプロセッサにより共有されるメモリに展開されて複数の前 記プロセッサにより同時に実行される複数のプログラムを含んでおり、異なるプロセッ サにより実行されるプログラム同士で共通部分の候補を抽出することを特徴とする請 求項 1〜9のいずれか一つに記載の ROM格納データ生成方法。
[11] 前記プログラムは、単一のプロセッサにより実行される複数のプログラムを含んでお り、異なるプログラム同士で共通部分の候補を抽出することを特徴とする請求項 1〜9 の!、ずれか一つに記載の ROM格納データ生成方法。
[12] コンピュータに、前記請求項 1〜: L 1のいずれか一つに記載の ROM格納データ生 成方法を実行させるための ROM格納データ生成プログラム。
PCT/JP2006/305151 2006-03-15 2006-03-15 Rom格納データ生成方法およびrom格納データ生成プログラム WO2007108043A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2006/305151 WO2007108043A1 (ja) 2006-03-15 2006-03-15 Rom格納データ生成方法およびrom格納データ生成プログラム
JP2008506061A JP5141551B2 (ja) 2006-03-15 2006-03-15 Rom格納データ生成方法およびrom格納データ生成プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/305151 WO2007108043A1 (ja) 2006-03-15 2006-03-15 Rom格納データ生成方法およびrom格納データ生成プログラム

Publications (1)

Publication Number Publication Date
WO2007108043A1 true WO2007108043A1 (ja) 2007-09-27

Family

ID=38522084

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/305151 WO2007108043A1 (ja) 2006-03-15 2006-03-15 Rom格納データ生成方法およびrom格納データ生成プログラム

Country Status (2)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6358536A (ja) * 1986-08-29 1988-03-14 Nec Corp マイクロコンピユ−タシステム
JPH07248921A (ja) * 1994-03-09 1995-09-26 Hitachi Ltd 並列プロセッサシステムのイニシャルプログラムロード方法
JP2002236587A (ja) * 2001-02-07 2002-08-23 Nec System Technologies Ltd 初回起動時間短縮方法、インストール方法、パーソナルコンピュータ、プログラム

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01267766A (ja) * 1988-04-20 1989-10-25 Mitsubishi Electric Corp プログラムローディング方式
JPH08247798A (ja) * 1995-03-10 1996-09-27 Yokogawa Electric Corp データ圧縮方法
JPH113229A (ja) * 1997-06-10 1999-01-06 Matsushita Electric Ind Co Ltd プログラムロード方法およびそれを実現するシステム
JP2003157187A (ja) * 2001-11-21 2003-05-30 System Intelligent Kk 2つのバイナリ情報の差分を抽出するアルゴリズム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6358536A (ja) * 1986-08-29 1988-03-14 Nec Corp マイクロコンピユ−タシステム
JPH07248921A (ja) * 1994-03-09 1995-09-26 Hitachi Ltd 並列プロセッサシステムのイニシャルプログラムロード方法
JP2002236587A (ja) * 2001-02-07 2002-08-23 Nec System Technologies Ltd 初回起動時間短縮方法、インストール方法、パーソナルコンピュータ、プログラム

Also Published As

Publication number Publication date
JPWO2007108043A1 (ja) 2009-07-30
JP5141551B2 (ja) 2013-02-13

Similar Documents

Publication Publication Date Title
JP2992223B2 (ja) コンピュータシステム、命令ビット長圧縮方法、命令発生方法、及びコンピュータシステム動作方法
US5878267A (en) Compressed instruction format for use in a VLIW processor and processor for processing such instructions
Choi et al. Synthesis of application specific instructions for embedded DSP software
US8583895B2 (en) Compressed instruction format for use in a VLIW processor
WO2005002060A2 (en) Method for firmware variable storage with eager compression, fail-safe extraction and restart time compression scan
JP7241689B2 (ja) インラインのデコードベースのマイクロオペレーション展開による文字列比較処理
US10747532B2 (en) Selecting processing based on expected value of selected character
US10564967B2 (en) Move string processing via inline decode-based micro-operations expansion
US10613862B2 (en) String sequence operations with arbitrary terminators
US20180253306A1 (en) Dynamically selecting a memory boundary to be used in performing operations
CN113383309A (zh) 用于执行压缩/解压操作的通用处理器指令
JP5225071B2 (ja) 埋め込みシステム、特にスマートカードにロードされる疑似コードの検証方法
WO2006125768A1 (en) Flexible data file format
EP0843848B1 (en) Vliw processor which processes compressed instruction format
US5862398A (en) Compiler generating swizzled instructions usable in a simplified cache layout
US20150039864A1 (en) Systems and methods for defeating malware with randomized opcode values
WO2007108043A1 (ja) Rom格納データ生成方法およびrom格納データ生成プログラム
US20170228243A1 (en) Non-transitory computer-readable recording medium storing control program, control device and control method
TWI337718B (ja)
JP3915019B2 (ja) Vliwプロセッサ、プログラム生成装置、および記録媒体
JP6260179B2 (ja) 演算装置及び演算方法
JP2828611B2 (ja) コンピュータシステム及び命令実行方法
JPH11212804A (ja) 仮想マシン及びプログラム変換装置
JP2006195644A (ja) 仮想マシン実行装置及び方法
JPH09218784A (ja) マイクロコンピュータの命令解読部

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 06729172

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2008506061

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06729172

Country of ref document: EP

Kind code of ref document: A1