JP2004334641A - Information processor, storage medium, and processor - Google Patents

Information processor, storage medium, and processor Download PDF

Info

Publication number
JP2004334641A
JP2004334641A JP2003131318A JP2003131318A JP2004334641A JP 2004334641 A JP2004334641 A JP 2004334641A JP 2003131318 A JP2003131318 A JP 2003131318A JP 2003131318 A JP2003131318 A JP 2003131318A JP 2004334641 A JP2004334641 A JP 2004334641A
Authority
JP
Japan
Prior art keywords
object code
instruction
processor
information processing
tracing
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.)
Withdrawn
Application number
JP2003131318A
Other languages
Japanese (ja)
Inventor
Tetsuyoshi Shioda
哲義 塩田
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
Priority to JP2003131318A priority Critical patent/JP2004334641A/en
Publication of JP2004334641A publication Critical patent/JP2004334641A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent the malfunction of a circuit in an information processor for performing a compile processing for generating an object code to be executed by a processor by minimizing the change rate of a current consumed in the processor to suppress the drop of power supply voltage. <P>SOLUTION: This information processor which gives the object code generated by performing the compile processing to the processor comprises a trace means for executing a command trace processing for determining the change rate of the number of commands to be simultaneously executed in an initial object code determined from a source code, and a means for executing, when the change rate determined by the trace means is a predetermined value or more, the replacement of each command of the initial project code or the addition of a dummy command to the initial object code so as to minimize the change rate, thereby generating an optimum object code. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、情報処理装置および記録媒体、並びにプロセッサに関し、特に、プロセッサに与えるオブジェクトコードを生成するコンパイル処理を行う情報処理装置、情報処理装置にコンパイル処理を実行させるプログラムを記録した記録媒体、および情報処理装置のコンパイル処理により生成されるオブジェクトコードにしたがって演算を行うプロセッサに関するものである。
【0002】
【従来の技術】
半導体集積回路の電源は、電源ユニットから、基板や半導体パッケージの電源線を通って供給される。しかし、基板や半導体パッケージの電源線の伝播特性には、インダクタンス成分があるため、半導体集積回路で急激に電流消費が変化すると、電源電圧が降下して回路の動作速度が遅くなり、回路の誤動作を引き起こす恐れがある。
【0003】
そこで、特開昭63−5551号公報には、半導体集積回路において、容量素子(キャパシタ)を追加して接続することで、電源電圧降下を抑止することが提案されている。
【0004】
図12の(a)は、この特開昭63−5551号公報に示された、半導体集積回路(LSI)の内部回路に容量素子C1を追加して接続した構成を示す。ここで、インダクタンスL1、L2は、LSIの基板や半導体パッケージの電源線に含まれるインダクタンスを表す。N1、N2はLSI内部回路の電源線を示す。
【0005】
また、特開2000−207209号公報には、複数の演算器(ALU)を有するプロセッサに、複数の命令を同時実行させるオブジェクトコードを生成するコンパイル処理を行う情報処理装置が示されている。
【0006】
図13は、特開2000−207209号公報に示された、従来の情報処理装置が行うコンパイル処理を説明するための図である。
【0007】
図13の情報処理装置10では、ソースコード2に対し通常のコンパイル処理およびスケジューリングを行う手順11が実行される。このコンパイル結果に基づいて、パワーセーブを優先するスケジューリングを行うか否かが判定される。
【0008】
パワーセーブを優先するスケジューリングを行う場合に、上記コンパイル結果において、演算を行わないことを指示するノンオペレーションコマンド(NOP)が連続するようにコマンドの入れ替えを行う手順12が実行される。
【0009】
手順12が終了すると、連続するNOP中の先頭のNOPをSUSPENDコマンド(動作を一時停止することを指示するコマンド)に、最後のNOPをRESUMEコマンド(動作を再開することを指示するコマンド)に変換する手順13が実行される。この手順13が終了すると、情報処理装置10は、その時点のオブジェクトコード3を出力する。
【0010】
図13の情報処理装置10が行うコンパイル処理では、演算器に実行させるプログラム(オブジェクトコード)において、非実行コマンド(NOP)の連続する部分の先頭および最後を、パワーセーブコマンド(SUSPEND、RESUME)に変換している。このコマンド変換は、急激な電流変化を抑える効果をもっている。
【0011】
【特許文献1】
特開昭63−5551号公報
【0012】
【特許文献2】
特開2000−207209号公報
【0013】
【発明が解決しようとする課題】
しかしながら、特開昭63−5551号公報技術を適用した場合でも、半導体集積回路(LSI)で急激に電流が変化する場合には、誤動作する恐れがある。
【0014】
たとえば、図12(a)の半導体集積回路(LSI)の場合に、電源電圧V=1.2V、インダクタンスL1=L2=0.1nH、キャパシタ容量C1=10nFと仮定する。図12(b)は、LSI内部回路を流れる電流I1に急激な変化が生じた場合を示し、図12(c)はシミュレーションによって求めた電源線N1側の電圧変化を示す。
【0015】
図12(b)、(c)に示したように、電源電圧1.2Vに対し、0.25V以上の電圧降下がシミュレーションによって確認されている。この電圧降下により、回路遅延は25%程度遅くなると予測され、誤動作の原因となる。
【0016】
一方、図13の従来例においても、パワーセーブコマンドの発行による消費する電流は、通常コマンドで消費する電流より十分に小さい。動作を再開するコマンド(RESUME)では、クロックのみが動作するので、例えば演算器のデータ演算に必要な消費電流は発生しない。複雑なプロセッサではデータ演算が複雑であるため、RESUME実行時の消費電力は通常動作の1/4程度と見積もられる。
【0017】
例えば、図13の従来例において、4つの命令を同時実行可能なVLIW(very_long_instruction_word)型プロセッサを、図12の従来例と同様の回路定数で実現した場合を考える。
【0018】
図14は、図13の情報処理装置10の動作を説明するための図である。図14(a)は情報処理装置10によるコンパイル結果の一例を示し、図14(b)はそのコンパイル結果を実行した場合のVLIW型プロセッサに生じる電流変化を示し、図14(c)はシミュレーションによって求めたVLIW型プロセッサの電源線N1側の電圧変化を示す。
【0019】
図14に示したように、4つの命令全てがNOPである状態から、RESUMEコマンド発行後、4命令同時に通常命令に遷移することをシミュレーションすると、電源電圧1.2Vに対し、約0.20Vの電圧降下が発生する。これにより、回路速度が20%程度遅くなることになり、回路誤動作の恐れがある。
【0020】
本発明は、上記の点に鑑みてなされたものであり、プロセッサに実行させるオブジェクトコードを生成するコンパイル処理を行う情報処理装置において、プロセッサで消費される電流の変化率を小さくすることにより、電源電圧降下を抑止し、回路の誤動作を防止することを目的とする。
【0021】
【課題を解決するための手段】
上記課題を解決するため、本発明の情報処理装置は、コンパイル処理を行って生成したオブジェクトコードをプロセッサに与える情報処理装置であって、ソースコードから求めた初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段と、前記トレース手段により求められた変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードの各命令の入れ替えを行うことにより、最適オブジェクトコードを生成する命令入れ替え手段とを備えることを特徴とする。
【0022】
上記課題を解決するため、本発明の情報処理装置は、コンパイル処理を行って生成したオブジェクトコードをプロセッサに与える情報処理装置であって、ソースコードから求めた初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段と、前記トレース手段により求められた変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードにダミー命令の追加を行うことにより、最適オブジェクトコードを生成する命令追加手段とを備えることを特徴とする。
【0023】
また、上記課題を解決するため、本発明の記録媒体は、コンパイル処理により求められた初期オブジェクトコードから最適オブジェクトコードを生成するために情報処理装置を、前記初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段、前記トレース手段により求められる変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードの各命令の入れ替え、又は前記初期オブジェクトコードにダミー命令の追加を行うことにより、最適オブジェクトコードを生成する手段
として機能させるためのプログラムを記録したことを特徴とする。
【0024】
さらに、上記課題を解決するため、本発明のプロセッサは、情報処理装置のコンパイル処理により生成されるオブジェクトコードにしたがって各種の演算を行うプロセッサであって、オブジェクトコードをデコードする命令デコーダ部と、前記命令デコーダ部によるデコード結果に基づいて各種の演算を行う複数の演算回路と、前記命令デコーダ部によるデコード結果に基づいてダミー命令のみを実行するダミー回路とを備えることを特徴とする。
【0025】
本発明の情報処理装置によれば、プロセッサに実行させるプログラムのソースコードを変換してオブジェクトコードを生成するコンパイル処理を行う際に、プロセッサで消費される電流の変化率を小さくすることができる。したがって、プロセッサにおける電源電圧降下を抑止し、電源ノイズを抑えることができる。また、プロセッサの誤動作を防止することができ、プロセッサの処理速度を高速化できる。
【0026】
【発明の実施の形態】
以下、本発明の実施の形態について図面を用いて説明する。
【0027】
図1は、本発明の情報処理装置が行うコンパイル処理を説明するための図である。
【0028】
図1の情報処理装置20では、手順21において、ソースコード2に対し従来のコンパイル処理を行い、プロセッサが理解できるオブジェクトコードに変換する。さらに、処理の高速化あるいは電力を削減するために、手順21において、命令の順番を入れ替える処理(スケジューリング)を行う。この手順21により生成されるコードを初期オブジェクトコード4と呼ぶ。
【0029】
次に、情報処理装置20は手順23で、この初期オブジェクトコード4において同時実行する命令数の変化率を求める命令トレース処理を行う。
【0030】
手順23の命令トレース処理が終了すると、情報処理装置20は手順24において、命令トレース処理で求められた同時実行命令数の変化率が所定の許容値以下であるか否かを判定する。
【0031】
この手順24の判定結果がYESである場合、情報処理装置20は、その時点のオブジェクトコードを最適オブジェクトコード3として出力する。
【0032】
手順24の判定結果がNOである場合、情報処理装置20は手順22において、初期オブジェクトコード4の命令入れ替え、または初期オブジェクトコード4にダミー命令の追加を行う。
【0033】
本発明の情報処理装置では、プロセッサに実行させるオブジェクトコードの生成時に、同時実行命令数の変化率を求める命令トレース処理を行う。その変化率が所定の許容値以上であれば、変化率が小さくなるように、命令の入れ替え、もしくは、本来の演算には必要でないダミー命令に置き換える。
【0034】
あるいは、同時実行命令数をトレースする代わりに、命令ごとに定義された電流消費量に相関のある値を用いて、各クロックサイクルで消費する電流を予測して、その変化率が所定の値以上であれば、変化率が小さくなるように、命令の入れ替え、もしくは、本来の演算には必要でないダミー命令に置き換える。
【0035】
図1の情報処理装置によれば、プロセッサで消費される電流の変化率を小さくすることができ、電源電圧降下が抑えられ、誤動作を阻止することができる。
【0036】
図2は、本発明の第1実施例の情報処理装置を適用してVLIW型プロセッサを動作させるシステムの構成を示す。
【0037】
図2のコンパイル処理用情報処理装置20は、ソースコード2に対しコンパイル処理を行って最適オブジェクトコード3を出力する。VLIW型プロセッサ30は、命令キャッシュ部31と、命令フェッチ部32と、命令デコーダ部33と、データキャッシュ34と、レジスタファイル35と、4個の演算器36(#1〜#4)とを含む。
【0038】
図2のシステムでは、情報処理装置20と、メインメモリ40と、プロセッサ30とがバス38によって互いに接続されている。
【0039】
この実施例の情報処理装置20は、まず、プロセッサ30をどのように動作させるかを記述したソースコードを入力する。情報処理装置20は、図1に示した処理を行って生成した最適オブジェクトコード3を出力する。このオブジェクトコード3は、メインメモリ40に蓄積される。
【0040】
プロセッサ30が実行するタイミングにあわせて、メインメモリ40のオブジェクトコードはプロセッサ30内部の命令キャッシュ31へ転送され、さらに、命令フェッチ部32を通って、命令デコーダ部33に転送される。
【0041】
命令デコーダ部33のデコード結果に基づいて、メインメモリ40とデータキャッシュ34間のデータ転送処理、データキャッシュ34とレジスタファイル35間のデータ転送処理、もしくは、レジスタファイル35の値を演算してれレジスタファイル35に書き込む等の処理を行う。
【0042】
図3は、この実施例の情報処理装置の動作を説明するため図である。 図3(a)は手順23で行われる命令トレース処理の結果を示し、図3(b)は手順22で行われる命令入れ替え処理の結果を示す。
【0043】
例えば、図3(a)に示したように、初期オブジェクトコードが、4命令とも非実行命令(NOP)が連続した後、同時に有効命令(INST**)が実行させる順番になったと仮定する。
【0044】
この初期オブジェクトコードに対して、同時命令数トレースを行う。例えば、1個の有効命令に対して1が割当てられる関数を用意する。この関数の出力値を同時実行有効命令数と呼ぶ。
【0045】
図3(a)の例では、CYCLE0からCYCLE4では、全てNOPであるので同時実行有効命令数は0であり、CYCLE5からCYCLE6では、4つの命令が全て有効命令であるので同時実行有効命令数は4である。
【0046】
このトレース結果から、CYCLE4からCYCLE5にかけての変化率は、4と計算される。ここで、プロセッサの消費電力と電源のインダクタンス、容量値、回路のノイズ耐性から計算される同時実行有効命令数の変化率の許容最大値が1であると仮定する。
【0047】
この場合、CYCLE4からCYCLE5にかけての変化率4は、許容最大値1を超えていることになる。したがって、図1の手順24の判定結果はNOとなり、命令入れ替え処理を行う手順22が実行される。
【0048】
この命令入れ替え処理では、初期オブジェクトコードにおいて変化率が許容最大値以下になるように有効命令の順番を替える。例えば、図3(b)に示したように、#1〜#3の命令を、1CYCLEずつ先行して実行する順番にする。このコードで同時実行有効命令数の変化率を計算すると、最大でも1であるため、許容最大値以下になることがわかる。したがって、この実施例の情報処理装置20は、図3(b)のコードを、最適オブジェクトコード3として出力する。
【0049】
図4は、本発明の第1実施例の情報処理装置の動作を説明するための図である。
【0050】
図4(a)は情報処理装置20により生成される最適オブジェクトコード(コンパイル結果)の一例を示し、図4(b)はそのコンパイル結果を実行した場合のVLIW型プロセッサ30に生じる電流変化を示し、図4(c)はシミュレーションによって求めたVLIW型プロセッサ30の電圧変化を示す。
【0051】
図4(a)の最適オブジェクトコードをVLIW型プロセッサ30で実行すると、図4(b)で示したように消費する電流量は、CYCLE2から徐々に増加してCYCLE5で最大値に達する。このときの電流変化量は、図14の従来例の場合より小さく、これによる電圧降下は0.1V以下に抑えられる(図4(c))。この電圧降下による回路速度の劣化は10%以下であり、回路誤動作を抑止できる。
【0052】
次に、図5は本発明の第2実施例の情報処理装置の動作を説明するための図である。図5(a)は手順23で行われる命令トレース処理の結果を示し、図5(b)は手順22で行われる処理の結果を示す。
【0053】
図5の実施例は、図3の実施例で行われる有効命令の入れ替え処理の代わりに、本来の演算には不要であるダミー命令(DUMMY)をNOPの場所に追加するダミー命令追加処理を行うことを特徴とする。
【0054】
ダミー命令では、プロセッサでの電流消費を有効命令と同じ程度にしておく。例えば、次のCYCLEで必ず書き換わるレジスタに、データを書き込む命令をダミー命令とする。このダミー命令に対しては、同時実行有効命令数の算出時に、有効命令と同じように1が割当てられる。
【0055】
図5(b)に示したように、ダミー命令を追加することにより、同時実行有効命令数の変化率は、最大許容値以下に抑えることができる。これにより、図4で示した電流消費や電圧降下と同じ効果を得ることができる。この実施例では、有効命令の順番を入れ替える必要がないので、同じレジスタを使用する有効命令の前後関係等を注意する必要がなく、容易に効果を得ることができる。
【0056】
図6は、本発明の第3実施例の情報処理装置を示す。図7は、図6の情報処理装置の動作を説明するための図である。
【0057】
図1の情報処理装置20が同時実行命令数の変化率を求める命令トレース処理を行うのに対し、本実施例の情報処理装置20Aは、図6に示したように、各命令のプロセッサにおける電流消費量に依存した数値(等価電流消費値)を使用する電流消費量トレース処理を行うことを特徴とする。
【0058】
図6の情報処理装置20Aでは、ソースコード2に対し通常のコンパイル処理およびスケジューリングを行う手順21により、初期オブジェクトコード4が生成される。この初期オブジェクトコード4において同時実行する各命令の等価電流消費値の総和の変化率を求める合計等価電流消費量トレース処理を行う手順23Aが実行される。
【0059】
この電流消費量トレース処理が終了すると、合計等価電流消費量の変化率が許容最大値以下であるか否かを判定する手順24Aが実行される。
【0060】
この手順24Aの判定結果がYESである場合、情報処理装置20Aは、その時点のオブジェクトコードを最適オブジェクトコード3として出力する。
【0061】
手順24Aの判定結果がNOである場合、情報処理装置20Aは、初期オブジェクトコード4の命令入れ替え、または初期オブジェクトコード4にダミー命令の追加を行う手順22を実行する。
【0062】
図6の情報処理装置20Aでは、例えば、各命令を次の3種類に分類する。(a)メインメモリ40とデータキャッシュ34間のデータ転送処理(INSTA**)、(b)データキャッシュ34とレジスタファイル35間のデータ転送処理(INSTB**)、(c)レジスタファイル35の値を演算してレジスタファイル35に書き込む処理(INSTC**)。ここで、「**」は各演算器36の番号(#1〜#4)に対応する。
【0063】
図6の実施例では、それぞれの命令を実行する時にプロセッサ30で消費する電流に相関する等価電流消費値を、各命令に割当てる。例えば、INSTA**には0.5、INSTB**には1.0、INSTC**には1.5をそれぞれ割当てる。各CYCLEで同時実行する命令の等価電流消費値を合算した総和を合計等価電流消費量と呼ぶ。
【0064】
図7(a)に示した初期オブジェクトコードにおいて合計等価電流消費量を求め、CYCLE間での合計等価電流消費量の変化率を求めると、最大値は4となる。
【0065】
ここで、プロセッサ30の消費電力と電源のインダクタンス、容量値、回路のノイズ耐性から計算される合計等価電流消費量の変化率の許容最大値が1であるとする。
【0066】
図7(a)の初期オブジェクトコードでは、CYCLE4からCYCLE5への変化率4が、許容最大値1を超えていることになる。
【0067】
この場合、図6の情報処理装置20Aでは、初期オブジェクトコードに対し命令入れ替え又はダミー命令追加の手順22が実行される。この実施例の手順22では、変化率が許容最大値以下になるように有効命令の順番を入れ替える。
【0068】
その結果、図7(b)に示した最適オブジェクトコードでは、#1〜#3の各命令を、1CYCLEずつ先行して実行する順番にしている。この最適オブジェクトコードで合計等価電流消費量の変化率を計算すると、最大でも1になるため、許容最大値以下になることがわかる。
【0069】
この実施例の情報処理装置30は、図7(b)の最適オブジェクトコードを、プロセッサ30のメインメモリ40へ出力する。この最適オブジェクトコードをVLIW型プロセッサ30で実行すると、図4の実施例で示したような効果を示し、回路誤動作を抑止できる。
【0070】
図8は、本発明の第4実施例の情報処理装置の動作を説明するための図である。
【0071】
図8の実施例では、図7の実施例における有効命令の入れ替え処理を行う代わりに、本来の演算には不要であるダミー命令(DUMMY)をNOPの場所に追加する。ダミー命令では、プロセッサでの電流消費を有効命令と同じ程度にしておく。例えば、次のCYCLEで必ず書き換わるレジスタに、データを書き込む命令をダミー命令とする。
【0072】
このダミー命令は、合計等価電流消費量の変化率を算出するときには、ダミー命令を実行する場合に消費する電流に相関する値を割当てる。図8の例では、各有効命令の等価電流消費量の値としては、図7の実施例と同様に、INSTA**には0.5、INSTB**には1.0、INSTC**には1.5をそれぞれ割当てる。
【0073】
図8の実施例では、等価電流消費量として1.0を割当てたダミー命令を追加することにより、合計等価電流消費量の変化率は、最大許容値以下に抑えることができる。これにより、図4の実施例で示した電流消費や電圧降下と同じ効果を得ることができる。
【0074】
図8の実施例では、有効命令の順番を入れ替える必要がないので、同じレジスタを使用する有効命令の前後関係等を注意する必要がなく、容易に効果を得ることができる。
【0075】
また、図8の実施例においては、同時実行有効命令数ではなく、合計等価電流消費量で評価されるので、命令数が常に1であるプロセッサ(VLIW型でないプロセッサ)にも適用することができる。
【0076】
図9は、本発明の第5実施例の情報処理装置と4命令同時発行可能なプロセッサを示す。図10は、図9のプロセッサ内に設けられる電力消費ダミー回路の一例を示す。
【0077】
図9の実施例のプロセッサ30は、は、上述の第2実施例又は第4実施例の情報処理装置が生成する最適オブジェクトコードで使用するダミー命令の実行を実現する回路を、本来必要な回路とは別にプロセッサ30内部に設けて構成していることを特徴としている。
【0078】
図9に示したように、プロセッサ30は、命令デコーダ部33によるデコード結果に基づいてダミー命令のみを実行する電力消費ダミー回路37を備えている。電力消費ダミー回路37は、例えば、図10に示したように、AND回路71と、複数のインバータ回路72を接続した回路である。
【0079】
上述の第2実施例又は第4実施例の最適オブジェクトコードでは、本来必要な回路を使用して、消費電流が有効命令と同程度であり、かつ、ダミー命令が追加されない場合と同じ処理をするような命令を見つけ出す必要がある。
【0080】
しかし、この実施例のプロセッサ30によれば、あらかじめプロセッサ30にダミー命令のみを実行するダミー回路37を備えているめ、他の命令に依存することなく、ダミー命令を追加することができ、コンパイラ処理を高速化できる。
【0081】
次に、図11は、本発明の一実施例の情報処理装置を適用したマルチプロセッサの一例を示す。
【0082】
上記の各実施例では、VLIW型プロセッサを例としてあげて説明しているが、図11のように複数のプロセッサが1チップに搭載されたマルチプロセッサチップにも同様に適用することができる。
【0083】
図11のマルチプロセッサチップ100には、内部メインプロセッサ30−1、内部サブプロセッサ30−2等が搭載されている。各プロセッサ30−1、30−2等はVLIW型プロセッサである。この場合、本実施例の情報処理装置が生成する最適オブジェクトコードに含まれる、VLIW型の各命令(#1〜#4)は、各プロセッサに与える命令に読み替えられる。
【0084】
(付記1) コンパイル処理を行って生成したオブジェクトコードをプロセッサに与える情報処理装置であって、ソースコードから求めた初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段と、前記トレース手段により求められる変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードの各命令の入れ替えを行うことにより、最適オブジェクトコードを生成する命令入れ替え手段とを備えることを特徴とする情報処理装置。
【0085】
(付記2) コンパイル処理を行って生成したオブジェクトコードをプロセッサに与える情報処理装置であって、ソースコードから求めた初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段と、前記トレース手段により求められる変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードにダミー命令の追加を行うことにより、最適オブジェクトコードを生成する命令追加手段とを備えることを特徴とする情報処理装置。
【0086】
(付記3) 前記トレース手段は、前記命令トレース処理の代りに、各実行命令毎にプロセッサで消費する電流値に相関のある等価電流消費値を入力して、前記初期オブジェクトコードにおいて同時実行する各命令の等価電流消費値の総和の変化率を求める電流消費量トレース処理を行うことを特徴とする付記1又は2記載の情報処理装置。
【0087】
(付記4) コンパイル処理により求められた初期オブジェクトコードから最適オブジェクトコードを生成するために情報処理装置を、前記初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段、前記トレース手段により求められる変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードの各命令の入れ替え、又は前記初期オブジェクトコードにダミー命令の追加を行うことにより、最適オブジェクトコードを生成する手段として機能させるためのプログラムを記録した記録媒体。
【0088】
(付記5) 情報処理装置のコンパイル処理により生成されるオブジェクトコードにしたがって各種の演算を行うプロセッサであって、オブジェクトコードをデコードする命令デコーダ部と、前記命令デコーダ部によるデコード結果に基づいて各種の演算を行う複数の演算回路と、前記命令デコーダ部によるデコード結果に基づいてダミー命令のみを実行するダミー回路とを備えることを特徴とするプロセッサ。
【0089】
(付記6) コンパイル処理を行って生成したオブジェクトコードをプロセッサに与える情報処理方法であって、ソースコードから求めた初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手順と、前記トレース手順により求められる変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードの各命令の入れ替え、又は前記初期オブジェクトコードにダミー命令の追加を行うことにより、最適オブジェクトコードを生成する手順とを有することを特徴とする情報処理方法。
【0090】
(付記7) 前記トレース手順は、前記命令トレース処理の代りに、各実行命令毎にプロセッサで消費する電流値に相関のある等価電流消費値を入力して、前記初期オブジェクトコードにおいて同時実行する各命令の等価電流消費値の総和の変化率を求める電流消費量トレース処理を行うことを特徴とする付記6記載の情報処理方法。
【0091】
(付記8) コンパイル処理により求められた初期オブジェクトコードから最適オブジェクトコードを生成するために情報処理装置を、前記初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段、前記トレース手段により求められる変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードの各命令の入れ替え、又は前記初期オブジェクトコードにダミー命令の追加を行うことにより、最適オブジェクトコードを生成する手段として機能させるためのプログラム。
【0092】
(付記9) 前記トレース手段は、前記命令トレース処理の代りに、各実行命令毎にプロセッサで消費する電流値に相関のある等価電流消費値を入力して、前記初期オブジェクトコードにおいて同時実行する各命令の等価電流消費値の総和の変化率を求める電流消費量トレース処理を行うことを特徴とする付記4記載の記録媒体。
【0093】
(付記10) 前記トレース手段は、前記命令トレース処理の代りに、各実行命令毎にプロセッサで消費する電流値に相関のある等価電流消費値を入力して、前記初期オブジェクトコードにおいて同時実行する各命令の等価電流消費値の総和の変化率を求める電流消費量トレース処理を行うことを特徴とする付記8記載のプログラム。
【0094】
【発明の効果】
以上説明したように、本発明の情報処理装置によれば、プロセッサに実行させるプログラムのソースコードを変換してオブジェクトコードを生成するコンパイル処理を行う際に、プロセッサで消費される電流の変化率を小さくすることができる。したがって、プロセッサにおける電源電圧降下を抑止し、電源ノイズを抑えることができる。また、プロセッサの誤動作を防止することができ、プロセッサの処理速度を高速化できる。
【0095】
【図面の簡単な説明】
【図1】本発明の情報処理装置が行うコンパイル処理を説明するための図である。
【図2】本発明の第1実施例の情報処理装置と4命令同時発行可能なプロセッサを示すブロック図である。
【図3】本発明の第1実施例の情報処理装置の動作を説明するため図である。
【図4】本発明の第1実施例の情報処理装置の動作を説明するための図である。
【図5】本発明の第2実施例の情報処理装置の動作を説明するための図である。
【図6】本発明の第3実施例の情報処理装置を示すブロック図である。
【図7】本発明の第3実施例の情報処理装置の動作を説明するための図である。
【図8】本発明の第4実施例の情報処理装置の動作を説明するための図である。
【図9】本発明の第5実施例の情報処理装置と4命令同時発行可能なプロセッサを示すブロック図である。
【図10】図9のプロセッサ内に設ける電力消費ダミー回路の一例を示すブロック図である。
【図11】本発明の一実施例の情報処理装置を適用したマルチプロセッサの一例を示すブロック図である。
【図12】電流が急激に変化する場合の、従来の半導体集積回路の電源電圧降下を説明するための図である。
【図13】従来の情報処理装置が行うコンパイル処理を説明するための図である。
【図14】図13の情報処理装置の動作を説明するための図である。
【符号の説明】
2 ソースコード
3 最適オブジェクトコード
4 初期オブジェクトコード
20 情報処理装置
30 プロセッサ
31 命令キャッシュ部
32 命令フェッチ部
33 命令デコーダ部
34 データキャッシュ部
35 レジスタファイル
36 演算器
37 電力消費ダミー回路
38 バス
40 メインメモリ
30−1 内部メインプロセッサ
30−2 内部サブプロセッサ
100 マルチプロセッサ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an information processing apparatus, a recording medium, and a processor, and more particularly, to an information processing apparatus that performs a compiling process for generating an object code to be given to a processor, a recording medium that records a program that causes the information processing device to execute a compiling process, and The present invention relates to a processor that performs an operation according to an object code generated by a compile process of an information processing device.
[0002]
[Prior art]
The power of the semiconductor integrated circuit is supplied from a power supply unit through a power supply line of a substrate or a semiconductor package. However, since the propagation characteristics of the power supply line of the substrate or the semiconductor package have an inductance component, if the current consumption changes suddenly in the semiconductor integrated circuit, the power supply voltage drops and the operation speed of the circuit decreases, and the circuit malfunctions. May cause
[0003]
Therefore, Japanese Patent Application Laid-Open No. 63-5551 proposes that a power supply voltage drop is suppressed by additionally connecting a capacitance element (capacitor) in a semiconductor integrated circuit.
[0004]
FIG. 12A shows a configuration in which a capacitive element C1 is additionally connected to an internal circuit of a semiconductor integrated circuit (LSI) disclosed in Japanese Patent Application Laid-Open No. 63-5551. Here, the inductances L1 and L2 represent the inductance included in the power supply line of the substrate of the LSI or the semiconductor package. N1 and N2 indicate power supply lines of the LSI internal circuit.
[0005]
Japanese Patent Application Laid-Open No. 2000-207209 discloses an information processing apparatus that performs a compiling process for generating an object code for causing a processor having a plurality of arithmetic units (ALUs) to execute a plurality of instructions at the same time.
[0006]
FIG. 13 is a diagram for explaining a compiling process performed by a conventional information processing apparatus disclosed in Japanese Patent Application Laid-Open No. 2000-207209.
[0007]
In the information processing apparatus 10 shown in FIG. 13, a procedure 11 for performing normal compile processing and scheduling on the source code 2 is executed. Based on the result of the compilation, it is determined whether or not to perform scheduling giving priority to power saving.
[0008]
In the case of performing scheduling with priority on power saving, a procedure 12 for exchanging commands is performed so that a non-operation command (NOP) for instructing not to perform an operation is consecutive in the compilation result.
[0009]
When the procedure 12 is completed, the first NOP in the consecutive NOPs is converted into a SUSPEND command (a command instructing to suspend the operation), and the last NOP is converted into a RESUME command (a command instructing to resume the operation). Step 13 is performed. When the procedure 13 ends, the information processing device 10 outputs the object code 3 at that time.
[0010]
In the compiling process performed by the information processing apparatus 10 in FIG. 13, in the program (object code) to be executed by the arithmetic unit, the start and end of the continuous portion of the non-executable command (NOP) are converted into the power save commands (SUSPEND, RESUME). Converting. This command conversion has an effect of suppressing a rapid current change.
[0011]
[Patent Document 1]
JP-A-63-5551
[0012]
[Patent Document 2]
JP 2000-207209 A
[0013]
[Problems to be solved by the invention]
However, even when the technology disclosed in Japanese Patent Application Laid-Open No. 63-5551 is applied, malfunction may occur if the current rapidly changes in a semiconductor integrated circuit (LSI).
[0014]
For example, in the case of the semiconductor integrated circuit (LSI) in FIG. 12A, it is assumed that the power supply voltage V = 1.2 V, the inductance L1 = L2 = 0.1 nH, and the capacitor capacitance C1 = 10 nF. FIG. 12B shows a case where a sudden change occurs in the current I1 flowing through the LSI internal circuit, and FIG. 12C shows a voltage change on the power supply line N1 side obtained by simulation.
[0015]
As shown in FIGS. 12B and 12C, a voltage drop of 0.25 V or more with respect to the power supply voltage of 1.2 V has been confirmed by simulation. This voltage drop is expected to delay the circuit delay by about 25%, which causes a malfunction.
[0016]
On the other hand, also in the conventional example of FIG. 13, the current consumed by issuing the power save command is sufficiently smaller than the current consumed by the normal command. In the command (RESUME) for restarting the operation, only the clock operates, so that, for example, current consumption required for data operation of the arithmetic unit does not occur. Since the data operation is complicated in a complicated processor, the power consumption at the time of executing the RESUME is estimated to be about 1 / of the normal operation.
[0017]
For example, consider a case in which a VLIW (very_long_instruction_word) type processor capable of simultaneously executing four instructions in the conventional example of FIG. 13 is realized with the same circuit constants as the conventional example of FIG.
[0018]
FIG. 14 is a diagram for explaining the operation of the information processing apparatus 10 in FIG. FIG. 14A shows an example of a compilation result by the information processing apparatus 10, FIG. 14B shows a current change occurring in the VLIW processor when the compilation result is executed, and FIG. The obtained voltage change on the power supply line N1 side of the VLIW type processor is shown.
[0019]
As shown in FIG. 14, when a simulation is performed in which all four instructions are NOP and the transition to the normal instruction is performed simultaneously for four instructions after issuing the RESUME command. A voltage drop occurs. As a result, the circuit speed is reduced by about 20%, and there is a possibility that the circuit malfunctions.
[0020]
The present invention has been made in view of the above points, and in an information processing apparatus that performs a compiling process for generating an object code to be executed by a processor, a power supply by reducing a rate of change in current consumed by the processor. It is an object to suppress a voltage drop and prevent a malfunction of a circuit.
[0021]
[Means for Solving the Problems]
In order to solve the above-mentioned problem, an information processing apparatus according to the present invention is an information processing apparatus that provides an object code generated by performing a compile process to a processor, the number of instructions to be simultaneously executed in an initial object code obtained from a source code. A tracing means for performing an instruction tracing process for obtaining a change rate, and when the change rate obtained by the tracing means is a predetermined value or more, each instruction of the initial object code is replaced so as to reduce the change rate. In this case, there is provided an instruction replacing means for generating an optimal object code.
[0022]
In order to solve the above-mentioned problem, an information processing apparatus according to the present invention is an information processing apparatus that provides an object code generated by performing a compile process to a processor, the number of instructions to be simultaneously executed in an initial object code obtained from a source code. A tracing means for performing an instruction tracing process for obtaining a change rate; and when the change rate obtained by the tracing means is a predetermined value or more, a dummy instruction is added to the initial object code so as to reduce the change rate. And an instruction adding unit for generating an optimal object code.
[0023]
Further, in order to solve the above-mentioned problem, the recording medium of the present invention provides an information processing apparatus for generating an optimal object code from an initial object code obtained by a compiling process, the number of instructions to be simultaneously executed in the initial object code. A tracing means for performing an instruction tracing process for obtaining a change rate, wherein when the change rate obtained by the tracing means is equal to or more than a predetermined value, each instruction of the initial object code is replaced so as to reduce the change rate; Means for generating optimal object code by adding dummy instructions to object code
It is characterized by recording a program for functioning as.
[0024]
Further, in order to solve the above problem, a processor of the present invention is a processor that performs various operations according to an object code generated by a compile process of an information processing device, and includes an instruction decoder unit that decodes an object code, It is characterized by comprising a plurality of arithmetic circuits for performing various operations based on the result of decoding by the instruction decoder unit, and a dummy circuit for executing only a dummy instruction based on the result of decoding by the instruction decoder unit.
[0025]
According to the information processing apparatus of the present invention, it is possible to reduce the rate of change in the current consumed by the processor when performing the compile process of generating the object code by converting the source code of the program to be executed by the processor. Therefore, power supply voltage drop in the processor can be suppressed, and power supply noise can be suppressed. Further, malfunction of the processor can be prevented, and the processing speed of the processor can be increased.
[0026]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0027]
FIG. 1 is a diagram for explaining a compiling process performed by the information processing apparatus of the present invention.
[0028]
In the information processing apparatus 20 shown in FIG. 1, in step 21, a conventional compiling process is performed on the source code 2 to convert the source code 2 into an object code that can be understood by the processor. Furthermore, in order to speed up the processing or reduce the power, in step 21, a processing (scheduling) of changing the order of the instructions is performed. The code generated by this procedure 21 is called the initial object code 4.
[0029]
Next, in step 23, the information processing apparatus 20 performs an instruction tracing process for obtaining a change rate of the number of instructions to be executed simultaneously in the initial object code 4.
[0030]
When the instruction tracing process in step 23 is completed, in step 24, the information processing apparatus 20 determines whether or not the rate of change in the number of concurrently executed instructions obtained in the instruction tracing process is equal to or less than a predetermined allowable value.
[0031]
If the determination result of step 24 is YES, the information processing device 20 outputs the object code at that time as the optimal object code 3.
[0032]
If the decision result in the step 24 is NO, in a step 22, the information processing apparatus 20 replaces the instruction of the initial object code 4 or adds a dummy instruction to the initial object code 4.
[0033]
In the information processing apparatus according to the present invention, when generating the object code to be executed by the processor, the instruction tracing process for determining the change rate of the number of concurrently executed instructions is performed. If the rate of change is equal to or greater than a predetermined allowable value, instructions are replaced or replaced with dummy instructions that are not necessary for the original operation so that the rate of change is reduced.
[0034]
Alternatively, instead of tracing the number of concurrently executed instructions, the current consumed in each clock cycle is predicted using a value correlated with the current consumption defined for each instruction, and the rate of change is equal to or greater than a predetermined value. If so, the instructions are replaced or replaced with dummy instructions that are not necessary for the original operation so that the rate of change is reduced.
[0035]
According to the information processing apparatus of FIG. 1, the rate of change of the current consumed by the processor can be reduced, the power supply voltage drop can be suppressed, and malfunction can be prevented.
[0036]
FIG. 2 shows a configuration of a system for operating a VLIW processor by applying the information processing apparatus according to the first embodiment of the present invention.
[0037]
The compile processing information processing apparatus 20 in FIG. 2 performs compile processing on the source code 2 and outputs the optimal object code 3. The VLIW type processor 30 includes an instruction cache unit 31, an instruction fetch unit 32, an instruction decoder unit 33, a data cache 34, a register file 35, and four operation units 36 (# 1 to # 4). .
[0038]
In the system shown in FIG. 2, the information processing device 20, the main memory 40, and the processor 30 are connected to each other by a bus 38.
[0039]
First, the information processing apparatus 20 of this embodiment inputs a source code describing how the processor 30 operates. The information processing device 20 outputs the optimal object code 3 generated by performing the processing shown in FIG. This object code 3 is stored in the main memory 40.
[0040]
The object code in the main memory 40 is transferred to the instruction cache 31 in the processor 30 at the timing of execution by the processor 30, and further transferred to the instruction decoder 33 through the instruction fetch unit 32.
[0041]
The data transfer process between the main memory 40 and the data cache 34, the data transfer process between the data cache 34 and the register file 35, or the value of the register file 35 is calculated based on the decoding result of the instruction decoder unit 33. Processing such as writing to the file 35 is performed.
[0042]
FIG. 3 is a diagram for explaining the operation of the information processing apparatus of this embodiment. FIG. 3A shows the result of the instruction tracing process performed in step 23, and FIG. 3B shows the result of the instruction replacement process performed in step 22.
[0043]
For example, as shown in FIG. 3A, it is assumed that the initial object code is in the order of executing the valid instructions (INST **) at the same time after the non-executable instructions (NOP) are consecutive for all four instructions.
[0044]
The number of simultaneous instructions is traced for the initial object code. For example, a function in which 1 is assigned to one valid instruction is prepared. The output value of this function is called the number of concurrently executed instructions.
[0045]
In the example of FIG. 3A, the number of simultaneous execution effective instructions is 0 since CYCLE0 to CYCLE4 are all NOPs, and the number of simultaneous execution effective instructions is 0 since all four instructions are CYCLE5 to CYCLE6. 4.
[0046]
From this trace result, the rate of change from CYCLE4 to CYCLE5 is calculated as 4. Here, it is assumed that the allowable maximum value of the rate of change in the number of simultaneously-executable instructions calculated from the power consumption of the processor, the inductance and capacitance of the power supply, and the noise resistance of the circuit is 1.
[0047]
In this case, the change rate 4 from CYCLE4 to CYCLE5 exceeds the allowable maximum value 1. Therefore, the determination result of the procedure 24 in FIG. 1 is NO, and the procedure 22 for performing the instruction replacement processing is executed.
[0048]
In this instruction replacement process, the order of valid instructions is changed so that the rate of change in the initial object code is equal to or less than the allowable maximum value. For example, as shown in FIG. 3B, the instructions of # 1 to # 3 are executed in order of preceding execution by 1CYCLE. When this code is used to calculate the rate of change in the number of simultaneously-executable instructions, it can be seen that the rate of change is at most 1 and therefore less than the allowable maximum value. Therefore, the information processing apparatus 20 of this embodiment outputs the code of FIG.
[0049]
FIG. 4 is a diagram for explaining the operation of the information processing apparatus according to the first embodiment of the present invention.
[0050]
FIG. 4A shows an example of an optimal object code (compilation result) generated by the information processing apparatus 20, and FIG. 4B shows a current change occurring in the VLIW processor 30 when the compilation result is executed. FIG. 4C shows a voltage change of the VLIW processor 30 obtained by simulation.
[0051]
When the optimum object code of FIG. 4A is executed by the VLIW processor 30, the amount of current consumed gradually increases from CYCLE2 and reaches the maximum value at CYCLE5 as shown in FIG. 4B. The amount of current change at this time is smaller than in the case of the conventional example in FIG. 14, and the voltage drop due to this is suppressed to 0.1 V or less (FIG. 4C). The deterioration of the circuit speed due to this voltage drop is 10% or less, and the circuit malfunction can be suppressed.
[0052]
Next, FIG. 5 is a diagram for explaining the operation of the information processing apparatus according to the second embodiment of the present invention. FIG. 5A shows the result of the instruction trace processing performed in step 23, and FIG. 5B shows the result of the processing performed in step 22.
[0053]
The embodiment of FIG. 5 performs a dummy instruction addition process of adding a dummy instruction (DUMMY) unnecessary for the original operation to the location of the NOP instead of the valid instruction replacement process performed in the embodiment of FIG. It is characterized by the following.
[0054]
In the dummy instruction, the current consumption in the processor is set to the same level as that of the valid instruction. For example, an instruction to write data in a register that is always rewritten by the next CYCLE is a dummy instruction. When calculating the number of simultaneous execution effective instructions, 1 is assigned to this dummy instruction in the same manner as the effective instruction.
[0055]
As shown in FIG. 5B, by adding a dummy instruction, the rate of change in the number of simultaneously executable instructions can be suppressed to a value equal to or less than the maximum allowable value. Thereby, the same effect as the current consumption and the voltage drop shown in FIG. 4 can be obtained. In this embodiment, there is no need to change the order of valid instructions, so that it is not necessary to pay attention to the context of valid instructions using the same register, and the effect can be easily obtained.
[0056]
FIG. 6 shows an information processing apparatus according to the third embodiment of the present invention. FIG. 7 is a diagram for explaining the operation of the information processing apparatus in FIG.
[0057]
While the information processing apparatus 20 of FIG. 1 performs an instruction trace process for obtaining the rate of change in the number of concurrently executed instructions, the information processing apparatus 20A of the present embodiment, as shown in FIG. It is characterized in that a current consumption tracing process using a numerical value (equivalent current consumption value) depending on the consumption is performed.
[0058]
In the information processing apparatus 20A of FIG. 6, the initial object code 4 is generated by the procedure 21 for performing the normal compiling process and scheduling on the source code 2. In the initial object code 4, a procedure 23A of performing a total equivalent current consumption tracing process for obtaining a change rate of a total sum of equivalent current consumption values of instructions executed simultaneously is executed.
[0059]
When the current consumption tracing process is completed, a procedure 24A for determining whether or not the change rate of the total equivalent current consumption is equal to or less than the allowable maximum value is executed.
[0060]
If the determination result of this step 24A is YES, the information processing device 20A outputs the object code at that time as the optimal object code 3.
[0061]
When the determination result of the procedure 24A is NO, the information processing device 20A executes a procedure 22 of replacing the instruction of the initial object code 4 or adding a dummy instruction to the initial object code 4.
[0062]
In the information processing apparatus 20A of FIG. 6, for example, each instruction is classified into the following three types. (A) Data transfer processing between the main memory 40 and the data cache 34 (INSTA **), (b) Data transfer processing between the data cache 34 and the register file 35 (INSTB **), (c) Value of the register file 35 Is calculated and written into the register file 35 (INSTC **). Here, “**” corresponds to the number (# 1 to # 4) of each computing unit 36.
[0063]
In the embodiment of FIG. 6, an equivalent current consumption value correlated with the current consumed by the processor 30 when executing each instruction is assigned to each instruction. For example, 0.5 is assigned to INSTA **, 1.0 is assigned to INSTB **, and 1.5 is assigned to INSTC **. The sum total of the equivalent current consumption values of the instructions executed simultaneously in each CYCLE is called the total equivalent current consumption.
[0064]
When the total equivalent current consumption is obtained in the initial object code shown in FIG. 7A and the rate of change of the total equivalent current consumption between CYCLEs is obtained, the maximum value is 4.
[0065]
Here, it is assumed that the allowable maximum value of the change rate of the total equivalent current consumption calculated from the power consumption of the processor 30, the inductance and capacitance of the power supply, and the noise resistance of the circuit is 1.
[0066]
In the initial object code of FIG. 7A, the rate of change 4 from CYCLE4 to CYCLE5 exceeds the allowable maximum value 1.
[0067]
In this case, in the information processing apparatus 20A of FIG. 6, a procedure 22 for replacing an instruction or adding a dummy instruction to the initial object code is executed. In the procedure 22 of this embodiment, the order of valid instructions is changed so that the rate of change is equal to or less than the maximum allowable value.
[0068]
As a result, in the optimal object code shown in FIG. 7B, the instructions of # 1 to # 3 are executed in order of being executed by 1CYCLE. When the rate of change of the total equivalent current consumption is calculated with this optimum object code, it is 1 at the maximum, and it can be seen that the rate is equal to or less than the allowable maximum value.
[0069]
The information processing device 30 of this embodiment outputs the optimal object code of FIG. 7B to the main memory 40 of the processor 30. When the optimum object code is executed by the VLIW processor 30, the effect as shown in the embodiment of FIG. 4 is exhibited, and the malfunction of the circuit can be suppressed.
[0070]
FIG. 8 is a diagram for explaining the operation of the information processing apparatus according to the fourth embodiment of the present invention.
[0071]
In the embodiment of FIG. 8, a dummy instruction (DUMMY) unnecessary for the original operation is added to the location of the NOP instead of performing the valid instruction replacement processing in the embodiment of FIG. In the dummy instruction, the current consumption in the processor is set to the same level as that of the valid instruction. For example, an instruction to write data in a register that is always rewritten by the next CYCLE is a dummy instruction.
[0072]
When calculating the change rate of the total equivalent current consumption, the dummy instruction assigns a value correlated to the current consumed when executing the dummy instruction. In the example of FIG. 8, as in the embodiment of FIG. 7, the equivalent current consumption value of each valid instruction is 0.5 for INSTA **, 1.0 for INSTB **, and 1.0 for INSTC **. Assigns 1.5 respectively.
[0073]
In the embodiment of FIG. 8, the change rate of the total equivalent current consumption can be suppressed to the maximum allowable value or less by adding a dummy instruction to which 1.0 is assigned as the equivalent current consumption. Thus, the same effects as the current consumption and the voltage drop shown in the embodiment of FIG. 4 can be obtained.
[0074]
In the embodiment of FIG. 8, there is no need to change the order of the valid instructions, so that there is no need to pay attention to the context of valid instructions using the same register, and the effect can be easily obtained.
[0075]
Further, in the embodiment of FIG. 8, since the evaluation is made based on the total equivalent current consumption instead of the number of simultaneously-executable instructions, the present invention can be applied to a processor in which the number of instructions is always 1 (a processor not a VLIW type). .
[0076]
FIG. 9 shows an information processing apparatus according to the fifth embodiment of the present invention and a processor capable of simultaneously issuing four instructions. FIG. 10 shows an example of a power consumption dummy circuit provided in the processor of FIG.
[0077]
The processor 30 according to the embodiment of FIG. 9 includes a circuit that realizes execution of a dummy instruction used in the optimal object code generated by the information processing apparatus according to the second or fourth embodiment described above. It is characterized in that it is provided separately from the processor 30.
[0078]
As illustrated in FIG. 9, the processor 30 includes a power consumption dummy circuit 37 that executes only a dummy instruction based on a result of decoding by the instruction decoder unit 33. The power consumption dummy circuit 37 is, for example, a circuit in which an AND circuit 71 and a plurality of inverter circuits 72 are connected as shown in FIG.
[0079]
In the above-described optimal object code of the second or fourth embodiment, the current consumption is substantially the same as that of the valid instruction and the same processing is performed as in the case where the dummy instruction is not added, by using the originally required circuit. You need to find such an instruction.
[0080]
However, according to the processor 30 of this embodiment, since the processor 30 is provided with the dummy circuit 37 for executing only the dummy instruction in advance, the dummy instruction can be added without depending on other instructions. Processing can be accelerated.
[0081]
Next, FIG. 11 shows an example of a multiprocessor to which the information processing apparatus according to one embodiment of the present invention is applied.
[0082]
In the above embodiments, the VLIW type processor is described as an example. However, the present invention can be similarly applied to a multiprocessor chip in which a plurality of processors are mounted on one chip as shown in FIG.
[0083]
The multiprocessor chip 100 of FIG. 11 includes an internal main processor 30-1, an internal subprocessor 30-2, and the like. Each processor 30-1, 30-2, etc. is a VLIW type processor. In this case, each of the VLIW-type instructions (# 1 to # 4) included in the optimal object code generated by the information processing apparatus of the present embodiment is replaced with an instruction given to each processor.
[0084]
(Supplementary Note 1) An information processing apparatus that provides an object code generated by performing a compile process to a processor, and a trace unit that performs an instruction trace process for determining a change rate of the number of instructions to be executed simultaneously in an initial object code obtained from a source code. And when the rate of change obtained by the tracing means is equal to or greater than a predetermined value, by replacing each instruction of the initial object code so as to reduce the rate of change, an instruction replacing means for generating an optimal object code. An information processing apparatus comprising:
[0085]
(Supplementary Note 2) An information processing apparatus that provides an object code generated by performing a compile process to a processor, and a tracing unit that performs an instruction tracing process for determining a change rate of the number of instructions to be executed simultaneously in the initial object code obtained from the source code An instruction adding means for generating an optimum object code by adding a dummy instruction to the initial object code so as to reduce the change rate when the change rate obtained by the tracing means is equal to or more than a predetermined value; An information processing apparatus comprising:
[0086]
(Supplementary Note 3) In place of the instruction tracing process, the tracing unit may input an equivalent current consumption value correlated with a current value consumed by the processor for each execution instruction, and execute the simultaneous execution in the initial object code. 3. The information processing apparatus according to claim 1, wherein a current consumption tracing process for obtaining a change rate of a total sum of equivalent current consumption values of the instructions is performed.
[0087]
(Supplementary Note 4) A tracing means for performing an instruction tracing process for obtaining a change rate of the number of instructions to be simultaneously executed in the initial object code to generate an optimal object code from the initial object code obtained by the compiling process; When the change rate obtained by the tracing means is a predetermined value or more, by replacing each instruction of the initial object code or adding a dummy instruction to the initial object code so as to reduce the change rate, A recording medium on which a program for functioning as a means for generating an optimal object code is recorded.
[0088]
(Supplementary Note 5) A processor that performs various operations in accordance with an object code generated by a compiling process of the information processing device, and includes an instruction decoder unit that decodes the object code, and various instructions based on a decoding result obtained by the instruction decoder unit. A processor comprising: a plurality of operation circuits for performing an operation; and a dummy circuit for executing only a dummy instruction based on a result of decoding by the instruction decoder unit.
[0089]
(Supplementary Note 6) An information processing method for providing an object code generated by performing a compile process to a processor, and a trace procedure for performing an instruction trace process for determining a change rate of the number of instructions to be simultaneously executed in an initial object code obtained from a source code When the change rate obtained by the tracing procedure is equal to or more than a predetermined value, replacing each instruction of the initial object code or adding a dummy instruction to the initial object code so as to reduce the change rate. And generating an optimal object code.
[0090]
(Supplementary Note 7) In the tracing procedure, instead of the instruction tracing process, an equivalent current consumption value correlated with a current value consumed by the processor is input for each execution instruction, and the simultaneous execution in the initial object code is performed. 7. The information processing method according to claim 6, wherein a current consumption tracing process for obtaining a change rate of a total sum of equivalent current consumption values of the instructions is performed.
[0091]
(Supplementary Note 8) A tracing means for performing an instruction tracing process for obtaining a change rate of the number of instructions to be executed simultaneously in the initial object code in order to generate an optimal object code from the initial object code obtained by the compiling process; When the change rate obtained by the tracing means is a predetermined value or more, by replacing each instruction of the initial object code or adding a dummy instruction to the initial object code so as to reduce the change rate, A program for functioning as a means for generating optimal object code.
[0092]
(Supplementary Note 9) In place of the instruction tracing processing, the tracing unit may input an equivalent current consumption value correlated with a current value consumed by the processor for each execution instruction, and execute the simultaneous execution in the initial object code. The recording medium according to claim 4, wherein a current consumption tracing process for obtaining a change rate of a total sum of equivalent current consumption values of the instructions is performed.
[0093]
(Supplementary Note 10) In place of the instruction tracing process, the tracing unit may input an equivalent current consumption value correlated with a current value consumed by the processor for each execution instruction, and execute the simultaneous execution in the initial object code. The program according to claim 8, wherein a current consumption tracing process for obtaining a change rate of a total sum of equivalent current consumption values of the instructions is performed.
[0094]
【The invention's effect】
As described above, according to the information processing apparatus of the present invention, the rate of change in the current consumed by the processor when performing the compile process of generating the object code by converting the source code of the program to be executed by the processor is described. Can be smaller. Therefore, power supply voltage drop in the processor can be suppressed, and power supply noise can be suppressed. Further, malfunction of the processor can be prevented, and the processing speed of the processor can be increased.
[0095]
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a compiling process performed by an information processing apparatus according to the present invention.
FIG. 2 is a block diagram illustrating an information processing apparatus according to a first embodiment of the present invention and a processor capable of simultaneously issuing four instructions.
FIG. 3 is a diagram for explaining the operation of the information processing apparatus according to the first embodiment of the present invention.
FIG. 4 is a diagram for explaining the operation of the information processing apparatus according to the first embodiment of the present invention.
FIG. 5 is a diagram for explaining the operation of the information processing apparatus according to the second embodiment of the present invention.
FIG. 6 is a block diagram illustrating an information processing apparatus according to a third embodiment of the present invention.
FIG. 7 is a diagram for explaining the operation of the information processing apparatus according to the third embodiment of the present invention.
FIG. 8 is a diagram for explaining the operation of the information processing apparatus according to the fourth embodiment of the present invention.
FIG. 9 is a block diagram illustrating an information processing apparatus according to a fifth embodiment of the present invention and a processor capable of simultaneously issuing four instructions.
FIG. 10 is a block diagram illustrating an example of a power consumption dummy circuit provided in the processor of FIG. 9;
FIG. 11 is a block diagram illustrating an example of a multiprocessor to which the information processing device according to an embodiment of the present invention is applied.
FIG. 12 is a diagram for explaining a power supply voltage drop of a conventional semiconductor integrated circuit when a current changes rapidly.
FIG. 13 is a diagram illustrating a compiling process performed by a conventional information processing apparatus.
FIG. 14 is a diagram for explaining the operation of the information processing apparatus in FIG. 13;
[Explanation of symbols]
2 Source code
3 Optimum object code
4 Initial object code
20 Information processing device
30 processor
31 Instruction Cache Unit
32 Instruction fetch unit
33 Instruction Decoder
34 Data Cache Unit
35 Register file
36 arithmetic unit
37 Power consumption dummy circuit
38 bus
40 main memory
30-1 Internal Main Processor
30-2 Internal Sub Processor
100 multiprocessor

Claims (5)

コンパイル処理を行って生成したオブジェクトコードをプロセッサに与える情報処理装置であって、
ソースコードから求めた初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段と、
前記トレース手段により求められた変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードの各命令の入れ替えを行うことにより、最適オブジェクトコードを生成する命令入れ替え手段と
を備えることを特徴とする情報処理装置。
An information processing device for providing an object code generated by performing a compiling process to a processor,
Tracing means for performing an instruction tracing process for calculating a change rate of the number of instructions to be executed simultaneously in the initial object code obtained from the source code;
When the change rate obtained by the tracing means is equal to or more than a predetermined value, by replacing each instruction of the initial object code so as to reduce the change rate, an instruction replacing means for generating an optimal object code is provided. An information processing apparatus comprising:
コンパイル処理を行って生成したオブジェクトコードをプロセッサに与える情報処理装置であって、
ソースコードから求めた初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段と、
前記トレース手段により求められた変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードにダミー命令の追加を行うことにより、最適オブジェクトコードを生成する命令追加手段と
を備えることを特徴とする情報処理装置。
An information processing device for providing an object code generated by performing a compiling process to a processor,
Tracing means for performing an instruction tracing process for calculating a change rate of the number of instructions to be executed simultaneously in the initial object code obtained from the source code;
An instruction adding means for generating an optimal object code by adding a dummy instruction to the initial object code so as to reduce the change rate when the change rate obtained by the tracing means is a predetermined value or more; An information processing apparatus comprising:
前記トレース手段は、前記命令トレース処理の代りに、各実行命令毎にプロセッサで消費する電流値に相関のある等価電流消費値を入力して、前記初期オブジェクトコードにおいて同時実行する各命令の等価電流消費値の総和の変化率を求める電流消費量トレース処理を行うことを特徴とする請求項1又は2記載の情報処理装置。The tracing means inputs, in place of the instruction tracing processing, an equivalent current consumption value correlated with a current value consumed by the processor for each execution instruction, and an equivalent current of each instruction simultaneously executed in the initial object code. 3. The information processing apparatus according to claim 1, wherein a current consumption tracing process for determining a rate of change of a sum of consumption values is performed. コンパイル処理により求められた初期オブジェクトコードから最適オブジェクトコードを生成するために情報処理装置を、
前記初期オブジェクトコードにおいて同時実行する命令数の変化率を求める命令トレース処理を行うトレース手段、
前記トレース手段により求められる変化率が所定の値以上であるとき、該変化率を小さくするように前記初期オブジェクトコードの各命令の入れ替え、又は前記初期オブジェクトコードにダミー命令の追加を行うことにより、最適オブジェクトコードを生成する手段
として機能させるためのプログラムを記録した記録媒体。
An information processing device for generating an optimal object code from the initial object code obtained by the compiling process,
Tracing means for performing an instruction tracing process for determining a rate of change in the number of instructions executed simultaneously in the initial object code
When the change rate obtained by the tracing means is a predetermined value or more, by replacing each instruction of the initial object code so as to reduce the change rate, or by adding a dummy instruction to the initial object code, A recording medium on which a program for functioning as a means for generating an optimal object code is recorded.
情報処理装置のコンパイル処理により生成されるオブジェクトコードにしたがって各種の演算を行うプロセッサであって、
オブジェクトコードをデコードする命令デコーダ部と、
前記命令デコーダ部によるデコード結果に基づいて各種の演算を行う複数の演算回路と、
前記命令デコーダ部によるデコード結果に基づいてダミー命令のみを実行するダミー回路と
を備えることを特徴とするプロセッサ。
A processor that performs various operations according to an object code generated by a compile process of the information processing device,
An instruction decoder unit for decoding an object code;
A plurality of operation circuits that perform various operations based on the result of decoding by the instruction decoder unit;
A dummy circuit for executing only a dummy instruction based on a result of decoding by the instruction decoder unit.
JP2003131318A 2003-05-09 2003-05-09 Information processor, storage medium, and processor Withdrawn JP2004334641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003131318A JP2004334641A (en) 2003-05-09 2003-05-09 Information processor, storage medium, and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003131318A JP2004334641A (en) 2003-05-09 2003-05-09 Information processor, storage medium, and processor

Publications (1)

Publication Number Publication Date
JP2004334641A true JP2004334641A (en) 2004-11-25

Family

ID=33506524

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003131318A Withdrawn JP2004334641A (en) 2003-05-09 2003-05-09 Information processor, storage medium, and processor

Country Status (1)

Country Link
JP (1) JP2004334641A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011074059A1 (en) 2009-12-14 2011-06-23 富士通株式会社 Arithmetic processing device, information processing device, and method for controlling same
JP2014225195A (en) * 2013-05-17 2014-12-04 富士通株式会社 Semiconductor device and control method for semiconductor device
JP2015022588A (en) * 2013-07-19 2015-02-02 スパンション エルエルシー Conversion program and conversion method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011074059A1 (en) 2009-12-14 2011-06-23 富士通株式会社 Arithmetic processing device, information processing device, and method for controlling same
CN102652297A (en) * 2009-12-14 2012-08-29 富士通株式会社 Arithmetic processing device, information processing device, and method for controlling same
JP5283762B2 (en) * 2009-12-14 2013-09-04 富士通株式会社 Arithmetic processing apparatus, information processing apparatus and control method thereof
JP2014225195A (en) * 2013-05-17 2014-12-04 富士通株式会社 Semiconductor device and control method for semiconductor device
JP2015022588A (en) * 2013-07-19 2015-02-02 スパンション エルエルシー Conversion program and conversion method

Similar Documents

Publication Publication Date Title
US7539879B2 (en) Register file gating to reduce microprocessor power dissipation
US8181054B2 (en) Arrangement and method for controlling power modes of hardware resources
US6625797B1 (en) Means and method for compiling high level software languages into algorithmically equivalent hardware representations
Rele et al. Optimizing static power dissipation by functional units in superscalar processors
JP4082706B2 (en) Multiprocessor system and multigrain parallelizing compiler
JP3331968B2 (en) Register transfer level power consumption optimization circuit, method and recording medium with emphasis on glitch analysis and reduction
US20020002664A1 (en) System and method for power optimization in parallel units
WO2001090887A1 (en) Method fir processing program for high-speed processing by using dynamically reconfigurable hardware and program for executing the processing method
JP2007034887A (en) Method and apparatus for automatically creating shift register file for high-level synthesis compiler
JP4412905B2 (en) Low power operation control device and program optimization device
US7725843B2 (en) Behavioral synthesis apparatus, behavioral synthesis method, method for manufacturing digital circuit, behavioral synthesis control program and computer-readable recording medium
JP2004199139A (en) Processor system, instruction string optimization device and instruction string optimization program
US20110061032A1 (en) High-level synthesis apparatus, high-level synthesis method, and computer readable medium comprising high-level synthesis program
JP2011197803A (en) Program execution control method
JP2004334641A (en) Information processor, storage medium, and processor
US6993674B2 (en) System LSI architecture and method for controlling the clock of a data processing system through the use of instructions
JP5928272B2 (en) Semiconductor integrated circuit and compiler
JP2011129147A (en) Processor system, instruction sequence optimization device, and instruction sequence optimization program
US20020087841A1 (en) Circuit and method for supporting misaligned accesses in the presence of speculative load Instructions
Kondratyev et al. Exploiting area/delay tradeoffs in high-level synthesis
Lee et al. Power-aware code scheduling assisted with power gating and DVS
JP5414323B2 (en) Semiconductor integrated circuit device
You et al. A sink-n-hoist framework for leakage power reduction
Tong et al. Compiler-guided parallelism adaption based on application partition for power-gated ilp processor
JP4768214B2 (en) Compiling method and data processing apparatus.

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060801