JP3394353B2 - Machine instruction scheduling device - Google Patents

Machine instruction scheduling device

Info

Publication number
JP3394353B2
JP3394353B2 JP06475695A JP6475695A JP3394353B2 JP 3394353 B2 JP3394353 B2 JP 3394353B2 JP 06475695 A JP06475695 A JP 06475695A JP 6475695 A JP6475695 A JP 6475695A JP 3394353 B2 JP3394353 B2 JP 3394353B2
Authority
JP
Japan
Prior art keywords
machine language
instruction
machine
language instruction
schedule
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.)
Expired - Fee Related
Application number
JP06475695A
Other languages
Japanese (ja)
Other versions
JPH08234999A (en
Inventor
雄司 小川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP06475695A priority Critical patent/JP3394353B2/en
Publication of JPH08234999A publication Critical patent/JPH08234999A/en
Application granted granted Critical
Publication of JP3394353B2 publication Critical patent/JP3394353B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、原始プログラムを目的
プログラムへ翻訳する技術に関し、特に機械語命令の順
序を変更することにより目的プログラムの実行効率を向
上させる機械語命令スケジューリング装置に関する。
The present invention relates to relates to a technique for translating a source program into the object program, to machine language instruction scheduling system to improve the execution efficiency of the object program by particular reorder machine instructions.

【0002】[0002]

【従来の技術】近年、電子計算機に於いては、より高速
に情報処理を行うために、高速なハードウェアが開発さ
れると共に、その高速性能をできる限り引き出してより
効率的にプログラムを実行するためのソフトウェア技術
も同時に開発されてきた。
2. Description of the Related Art In recent years, in electronic computers, high-speed hardware has been developed in order to perform information processing at a higher speed, and the high-speed performance is extracted as much as possible to execute programs more efficiently. The software technology for it has also been developed.

【0003】このような、ソフトウェア技術の1つとし
て、コンパイラの最適化部に於ける機械語命令列のスケ
ジュール技術があり、従来のこの種の技術としては次の
ようなものが知られている。
As one of such software technologies, there is a machine language instruction sequence scheduling technology in an optimizing section of a compiler, and the following conventional technology of this type is known. .

【0004】最適化を行う前の機械語命令列の中から、
各機械語命令間のデータ依存関係に基づいて、先に実行
されていなくてはならない機械語命令が既にスケジュー
ルされているスケジュール可能状態にある機械語命令を
全て抽出する。
From the machine language instruction sequence before optimization,
Based on the data dependency between the machine language instructions, all machine language instructions in the schedulable state in which the machine language instructions that must be executed first are already scheduled are extracted.

【0005】スケジュール可能状態にある機械語命令を
抽出すると、その中から、命令発行タイミングを既にス
ケジュールされている機械語命令と資源の競合が生じな
いタイミングとしたときに命令発行タイミングを最も早
くすることができる機械語命令を1つ選択し、選択した
機械語命令を既にスケジュールされている機械語命令の
次にスケジュールする。以上の処理を全ての機械語命令
をスケジュールするまで、繰り返し行う。このように、
機械語命令の順序を変更することにより、ハードウェア
のインターロック(内部停止)が少ない、実行効率の高
い機械語命令列を生成することができる。ここで、既に
スケジュールされている機械語命令と資源の競合を生じ
ることのない最も早い命令発行タイミングは、図12に
示すような資源要求テーブルを利用して求めている。資
源要求テーブルは、各機械語命令毎に設けられ、対応す
る機械語命令が必要とする資源をマシンクロック単位で
記述したものであり、図12に示した資源要求テーブル
は、対応する命令がその実行開始から0,1マシンクロ
ック後のマシンクロックで資源Aを、実行開始から1マ
シンクロック後のマシンクロックで資源Bを、実行開始
から0,1,2マシンクロック後のマシンクロックで資
源Cを、実行開始から2,3マシンクロック後のマシン
クロックで資源Dを必要にしていることを示している。
When a machine language instruction that is in a schedulable state is extracted, the instruction issuance timing is set to the earliest when the instruction issuance timing is set to a timing at which the already-scheduled machine language instruction does not conflict with resources. Select one of the available machine language instructions and schedule the selected machine language instruction next to the already scheduled machine language instruction. The above processing is repeated until all machine language instructions are scheduled. in this way,
By changing the order of the machine language instructions, it is possible to generate a machine language instruction sequence with less hardware interlock (internal stop) and high execution efficiency. Here, the earliest instruction issuance timing that does not cause a resource conflict with a machine language instruction that has already been scheduled is obtained by using a resource request table as shown in FIG. The resource request table is provided for each machine language instruction and describes the resources required by the corresponding machine language instruction in machine clock units. The resource request table shown in FIG. The resource A is used at the machine clock 0,1 machine clocks after the execution start, the resource B is made at the machine clock one machine clock after the execution start, and the resource C is made at the machine clock 0,1,2 machine clocks after the execution start. , The resource D is required at the machine clock a few machine clocks after the start of execution.

【0006】[0006]

【発明が解決しようとする課題】ところで、上記したよ
うな資源要求テーブルを作成するためには、各機械語命
令が実行されたとき、どのような資源が必要とされるの
かをハードウェアの細部に至るまで調べることが必要に
なる。しかし、ハードウェアの細部に至るまで資源情報
を正確に調べることは困難であり、全ての機械語命令に
ついて完全な資源要求テーブルを作成することは困難で
ある。
By the way, in order to create the resource request table as described above, it is necessary to determine what kind of resource is required when each machine language instruction is executed in detail of the hardware. It is necessary to investigate up to. However, it is difficult to accurately check the resource information down to the details of the hardware, and it is difficult to create a complete resource request table for all machine language instructions.

【0007】従って、資源要求テーブルに基づいて、ス
ケジュール済みの機械語命令Xと資源の競合が生じない
と判断して機械語命令Yを機械語命令Xの次にスケジュ
ールした場合でも、資源要求テーブルが完全なものでな
いために、実行時に機械語命令Xと機械語命令Yとの間
で資源の競合が生じ、インターロックが発生する場合が
ある。このような場合、もし、上記機械語命令X,Yと
資源の競合が生じないスケジュール可能状態にある機械
語命令Zが存在すれば、その機械語命令Zを機械語命令
Xの次にスケジュールし、機械語命令Zの次に機械語命
令Yをスケジュールすることにより、目的プログラムの
実行効率を向上させることができる。しかし、上述した
従来の技術では、資源要求テーブルの内容に基づいて資
源の競合が生じないように機械語命令をスケジュールし
ているだけであるため、一旦機械語命令Xの次に機械語
命令Yをスケジュールできると判断してしまった場合に
は上記したようにすることは不可能である。
Therefore, even if it is determined that the scheduled machine language instruction X does not conflict with the resource based on the resource request table and the machine language instruction Y is scheduled next to the machine language instruction X, the resource request table Is not perfect, a resource conflict may occur between the machine language instruction X and the machine language instruction Y at the time of execution, and an interlock may occur. In such a case, if there is a machine language instruction Z that is in a schedulable state in which there is no resource conflict with the machine language instructions X and Y, the machine language instruction Z is scheduled next to the machine language instruction X. By scheduling the machine language instruction Y next to the machine language instruction Z, the execution efficiency of the target program can be improved. However, in the above-described conventional technique, the machine language instruction is only scheduled based on the content of the resource request table so that the resource contention does not occur. If you decide that you can schedule, it is impossible to do the above.

【0008】そこで、本発明の目的は、資源の競合が生
じないように機械語命令をスケジュールするだけの場合
に比較して、インターロックの発生が少ない機械語命令
列を生成することができる機械語命令スケジューリング
装置を提供することにある。
Therefore, an object of the present invention is to generate a machine language instruction sequence with less interlocking as compared with the case of only scheduling machine language instructions so that resource contention does not occur. word instruction scheduling
To provide a device .

【0009】尚、関連する技術として特公昭62−52
899号公報には、ベクトル・レジスタの大きさmとベ
クトル・レジスタの個数nとの積が一定であるという条
件の下で大きさm及び個数nを定める処理と、ソース・
プログラムで指定された処理を行う仮りのオブジェクト
・プログラムの複数演算器上での動作タイミング及び各
動作時間のシミュレートを基にして実行タイムチャート
を作成し、当該実行タイムチャートから実時間方向に於
ける空き状態の演算器を見付け、当該演算器の空時間を
他の命令の実行に割り当てるように命令をスケジュール
してオブジェクト・プログラムを作成する処理とを含む
一連の処理を、ベクトル・レジスタの大きさmと個数n
とをm×n=一定の範囲で変化させながら行い、最も全
実行時間の短いオブジェクト・プログラムを得るオブジ
ェクト・プログラム最適化方式が示されている。
As a related technique, Japanese Patent Publication No. Sho 62-52.
No. 899, a process of determining the size m and the number n under the condition that the product of the size m of the vector register and the number n of the vector register is constant,
Create an execution time chart based on the simulation of the operation timing and each operation time on multiple computing units of a temporary object program that performs the processing specified by the program, and from the execution time chart in the real time direction. To find an empty computing unit and create an object program by scheduling instructions so that the empty time of the computing unit is allocated to the execution of other instructions. Size m and number n
An object program optimizing method for obtaining an object program with the shortest total execution time by performing and while changing m and n within a certain range is shown.

【0010】上記したオブジェクト・プログラム最適化
方式は、ベクトル・レジスタのサイズと個数の分割が自
由に設定できるような計算機システムに於いて、どのよ
うな分割が最適であるかを求めることを最大の目的とし
ているが、どのような分割状態であっても、その状態で
最適なオブジェクト・プログラムを得るために、「複数
演算器上での動作タイミング及び各演算器上での動作時
間のシミュレートを基にして実行タイムチャートを作成
し、この実行タイムチャートから時間軸方向に於ける空
き状態の演算器を見付け、ここに他の命令を移す。」よ
うにしている。しかし、上記したオブジェクト・プログ
ラム最適化方式には、各演算器がどの命令で使用される
のか、時間軸方向に於ける演算器の空き状態をどのよう
に追跡するのかはについては説明がない。また、上記し
たオブジェクト・プログラム最適化方式では、実行タイ
ムチャートに基づいて空き状態の演算器を見付け、当該
演算器の空き時間を他の命令の実行に割り当てるという
資源競合の排他制御を行っているだけであるので、若
し、実行タイムチャートが正確でない場合には上述した
従来の技術と同様の問題が発生する。
The object program optimizing method described above is the maximum to find out what kind of division is optimal in a computer system in which division of the size and number of vector registers can be freely set. In order to obtain the optimum object program in any state, the objective is to "simulate the operation timing on multiple arithmetic units and the operating time on each arithmetic unit." Based on this, an execution time chart is created. From this execution time chart, a vacant arithmetic unit in the time axis direction is found, and another instruction is moved to this. " However, the above-mentioned object program optimizing method has no description about which instruction is used by each arithmetic unit and how to track the empty state of the arithmetic unit in the time axis direction. Further, in the above object program optimization method, exclusive control of resource competition is performed by finding an idle computing unit based on the execution time chart and allocating the idle time of the computing unit to the execution of another instruction. Therefore, if the execution time chart is not accurate, the same problem as the above-mentioned conventional technique occurs.

【0011】また、特開平3−242731号公報に
は、ソースプログラムの解釈を行って中間コードに展開
するソースプログラム解釈手段と、各々の演算部で実行
される命令を直列に並べた直列アセンブリ命令列を中間
コードから生成する直列アセンブリ命令列生成手段と、
プログラム中に出現する各データにハードウェア資源を
割り当てる資源割り当て手段と、資源割り当て完了後、
並列アセンブリ命令列を生成する並列アセンブリ生成手
段とを備えたコンパイル処理方式が示されている。ここ
で、並列アセンブリ生成手段では、直列アセンブリ命令
列に対して、先ずデータ依存性解析部に於いて命令中に
出現するデータ相互の依存性を解析して有向グラフで表
現し、次に命令並列化処理部に於いて各々の命令が実行
される演算部と実行が行われるクロックとを決定するこ
とにより目的プログラムたる並列アセンブリ命令列を生
成するようにしている。しかし、上記したコンパイル処
理方式では、命令発行タイミングの制御が及ぶ範囲は、
有向グラフによって示されるデータ依存関係のある命令
間のみであって、データ依存関係を持たないが、命令発
行タイミングを制限する命令間の関係(例えば、命令A
の次に現れる命令Bは、命令Aの実行開始の3マシンク
ロック後に実行を開始する)に基づいて命令発行タイミ
ングを制御することができないという問題があった。
Further, Japanese Laid-Open Patent Publication No. 3-242731 discloses a source program interpreting means for interpreting a source program and expanding it into an intermediate code, and a serial assembly instruction in which instructions to be executed by respective arithmetic units are arranged in series. Serial assembly instruction sequence generating means for generating a sequence from intermediate code,
Resource allocation means for allocating hardware resources to each data appearing in the program, and after resource allocation is completed,
A compile processing method including a parallel assembly generation means for generating a parallel assembly instruction string is shown. Here, in the parallel assembly generation means, for the serial assembly instruction string, first, the data dependency analysis unit analyzes the mutual dependency of the data appearing in the instruction and expresses it as a directed graph, and then the instruction parallelization is performed. In the processing unit, a parallel assembly instruction string, which is the target program, is generated by determining the arithmetic unit for executing each instruction and the clock for executing the instruction. However, in the above-mentioned compile processing method, the control range of the instruction issue timing is
A relationship between instructions that have a data dependency relationship, which does not have a data dependency relationship, but which limits the instruction issue timing (for example, instruction A
There is a problem that the instruction issue timing cannot be controlled on the basis of the instruction B appearing next to the instruction B, which starts execution 3 machine clocks after the execution start of the instruction A).

【0012】[0012]

【課題を解決するための手段】本発明の機械語命令スケ
ジューリング装置は、原始プログラムに基づいて生成さ
れた機械語命令列の並びをプログラムの実行効率が向上
するようにスケジュールするコンパイル装置の機械語命
令スケジューリング装置に於いて、前記機械語命令列の
中から、スケジュール可能状態にある全ての機械語命令
を抽出するスケジュール候補命令抽出手段と、各機械語
命令毎にその機械語命令の実行にあたって必要となる資
源がマシンクロック単位で記述された資源要求テーブル
と、機械語命令毎に機械語命令間の命令発行タイミング
の制約を示す制約情報が記述されたタイミングマップテ
ーブルと、前記スケジュール候補命令抽出手段が抽出し
た機械語命令のうちのいずれかについて、現在スケジュ
ールを試みているマシンクロックに於いてスケジュール
済みの機械語命令と資源の競合が生じないか否か判断
し、資源の競合が生じないと判断した場合は、その機械
語命令とスケジュール済みの機械語命令とが、前記タイ
ミングマップテーブル中の制約情報が示す機械語命令間
の命令発行タイミングの制約を満足しているか否か判断
し、制約を満足していると判断したときは、その機械語
命令をスケジュール済みの機械語命令の次にスケジュー
ルするスケジュール処理を行う制御手段とを備え、前記
制御手段は、前記資源の競合が生じないか否かの判断に
おいて、資源の競合が生じると判断した場合には、前記
機械語命令以外の前記スケジュール候補命令抽出手段が
抽出した機械語命令があるか判断し、ある場合は、その
うちのいずれかについて、前記スケジュール処理を行
い、ない場合には、マシンクロックを一つ進めて、再
度、前記スケジュール候補命令抽出手段が抽出した機械
語命令のうちのいずれかについて、前記スケジュール処
理を行い、前記制約を満足しているか否かの判断におい
て、制約を満足していないと判断したときには、前記機
械語命令以外の前記スケジュール候補命令抽出手段が抽
出した機械語命令があるか判断し、ある場合は、そのう
ちのいずれかについて、前記スケジュール処理を行い、
ない場合には、マシンクロックを一つ進めて、再度、前
記スケジュール候補命令抽出手段が抽出した機械語命令
のうちのいずれかについて、前記スケジュール処理を行
うことを特徴とする。
A machine language instruction scale according to the present invention
In the machine language instruction scheduling device of the compiling device, the jailing device schedules a sequence of machine language instruction sequences generated based on a source program so as to improve the execution efficiency of the program. From the schedule candidate instruction extracting means for extracting all the machine language instructions in the schedulable state, and a resource request table in which the resources necessary for executing the machine language instruction are described in machine clock units for each machine language instruction. If the machine language instructions between instruction issue timing timing map table constraint information is described that indicates constraints, said schedule candidate instruction extraction unit extracts each machine instructions
The current schedule for one of the machine instructions
Schedule on the machine clock trying to
Judge whether there is a conflict between the existing machine instructions and resources
However, if it is determined that there will be no competition for resources,
Language instructions and scheduled machine language instructions
Between machine language instructions indicated by constraint information in the memory map table
Whether or not the constraint of the instruction issuance timing is satisfied
And, when it is judged that the constraint is satisfied, the machine language
Instructions are scheduled after scheduled machine instructions
And a control means for performing a schedule process for
The control means determines whether or not competition for the resources will occur.
If it is determined that competition for resources will occur,
The schedule candidate instruction extracting means other than the machine language instruction is
Judge whether there is an extracted machine language instruction, and if there is,
Perform the schedule process for any of the
If not, advance the machine clock by one and restart.
The machine extracted by the schedule candidate instruction extracting means
The schedule process for any of the word commands
To determine whether or not the above constraints are satisfied.
When it is determined that the constraints are not satisfied,
The schedule candidate instruction extraction means other than the machine language instruction is extracted.
Judge whether there is a machine language instruction issued, and if so,
For any of the above, perform the schedule process,
If not, advance the machine clock by one and then again.
Machine language instruction extracted by the schedule candidate instruction extraction means
Perform the schedule process for any of the
It is characterized by

【0013】[0013]

【作用】スケジュール候補命令抽出手段が、機械語命令
列の中から、スケジュール可能状態にある全ての機械語
命令を抽出し、資源要求排他制御手段が、資源要求テー
ブルの内容に基づいて、スケジュール候補命令抽出手段
が抽出した機械語命令の中から、現在スケジュールを試
みているマシンクロックに於いてスケジュール済みの機
械語命令と資源の競合が生じない機械語命令を1つずつ
順次に選択し、スケジュール済みの機械語命令と資源の
競合が生じない機械語命令を全て選択したときにはスケ
ジュールを試みるマシンクロックを1つ進め、発行タイ
ミング制御手段が、資源要求排他制御手段で選択された
機械語命令とスケジュール済みの機械語命令とが、タイ
ミングマップテーブル中の制約情報が示す機械語命令間
の命令発行タイミングの制約を満足させていると判断し
たときは、資源要求排他制御手段で選択された機械語命
令をスケジュール済みの機械語命令の次にスケジュール
する。
The candidate candidate instruction extracting means extracts all machine language instructions in the schedulable state from the machine language instruction sequence, and the resource request exclusive control means makes the resource request table.
Schedule candidate instruction extraction means based on the contents of the bull
The current schedule from the machine language instructions extracted by
Scheduled machine at the machine clock you are looking at
One machine language instruction at a time without conflict between machine language instructions and resources
Sequential selection of scheduled machine instructions and resources
If all machine language instructions that do not cause conflicts are selected,
Advance the machine clock to try Joule by one, and issue Thailand
The resource control means has been selected by the resource request exclusive control means.
Machine language instructions and scheduled machine language instructions
Between machine language instructions indicated by constraint information in the memory map table
Judging that the instruction issue timing constraint of
The machine language instruction selected by the resource request exclusive control means.
To schedule a decree to the next scheduled machine language instruction.

【0014】[0014]

【実施例】次に本発明の実施例について図面を参照して
詳細に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0015】図1は本発明の実施例のブロック図であ
り、本実施例の命令スケジューリング装置(命令スケジ
ューラ1は、データ依存グラフ3を作成するデータ依
存グラフ作成手段2と、スケジュール候補命令5を抽出
するスケジュール候補命令抽出手段4と、制御手段6と
から構成されている。
FIG. 1 is a block diagram of an embodiment of the present invention. An instruction scheduling device ( instruction scheduler ) 1 of this embodiment comprises a data dependence graph creating means 2 for creating a data dependence graph 3 and a schedule candidate instruction 5. It is composed of a schedule candidate command extracting means 4 for extracting the control information and a control means 6.

【0016】データ依存グラフ作成手段2は、原始プロ
グラムに対して構文解析,意味解析等を行うことにより
生成された機械語命令列9に基づいて、データ依存グラ
フ3を作成する機能を有する。ここで、機械語命令列9
の各機械語命令の並びは、原始プログラム中の対応する
命令の並びと同じになっている。
The data dependence graph creating means 2 has a function of creating a data dependence graph 3 based on a machine language instruction sequence 9 generated by performing syntax analysis, semantic analysis, etc. on a source program. Here, the machine language instruction sequence 9
The sequence of each machine language instruction of is the same as the sequence of the corresponding instructions in the source program.

【0017】スケジュール候補命令抽出手段4は、デー
タ依存グラフ作成手段2が作成したデータ依存グラフ3
に基づいて、現在スケジュールを試みているマシンクロ
ックに於いてスケジュール可能な機械語命令を示す情報
をスケジュール候補命令5として抽出する機能を有す
る。
The schedule candidate instruction extracting means 4 is a data dependence graph 3 created by the data dependence graph creating means 2.
Based on the above, it has a function of extracting, as a schedule candidate instruction 5, information indicating a machine language instruction that can be scheduled in the machine clock currently being scheduled.

【0018】制御手段6は、資源要求排他制御手段7及
び発行タイミング制御手段8から構成され、それらを使
用してスケジュール候補命令5の中から、命令発行タイ
ミングを既にスケジュールされている機械語命令と資源
の競合が生じないタイミングとし、且つ既にスケジュー
ルされている機械語命令との間の命令発行タイミングの
制約を満足させるものにしたとき、命令発行タイミング
を最も早くすることができる機械語命令を1つ選択し、
選択した機械語命令を既にスケジュールされている機械
語命令の次にスケジュールする機能を有する。
The control means 6 is composed of a resource request exclusive control means 7 and an issuance timing control means 8 and uses them to select a machine language instruction whose instruction issuance timing has already been scheduled from among the schedule candidate instructions 5. When the timing at which resource conflict does not occur and the constraint of the instruction issue timing with the already scheduled machine language instruction is satisfied, the machine language instruction that can make the instruction issue timing the earliest is 1 Choose one,
It has a function of scheduling the selected machine language instruction next to the already scheduled machine language instruction.

【0019】資源要求排他制御手段7は、資源要求排他
制御部71と、資源要求テーブル72−1〜72−m
と、資源要求黒板73とから構成されている。
The resource request exclusion control means 7 includes a resource request exclusion controller 71 and resource request tables 72-1 to 72-m.
And a resource request blackboard 73.

【0020】資源要求テーブル72−1〜72−mは、
各機械語命令毎に設けられているものであり、各資源要
求テーブル72−1〜72−mには、図12に示すよう
に、対応する機械語命令の実行にあたって必要となる資
源がマシンクロック単位で記述されている。
The resource request tables 72-1 to 72-m are
The resource request tables 72-1 to 72-m are provided for each machine language instruction. As shown in FIG. 12, the resources required for executing the corresponding machine language instruction are stored in the machine clock. It is described in units.

【0021】資源要求黒板73には、スケジュールされ
た機械語命令に対応する資源要求テーブルの内容が、ス
ケジュール順に登録される。
On the resource request blackboard 73, the contents of the resource request table corresponding to the scheduled machine language instructions are registered in the order of schedule.

【0022】資源要求排他制御部71は、資源要求テー
ブル72−1〜72−mの内容と資源要求黒板73の内
容とに基づいて、スケジュール候補命令5の中から、現
在スケジュールを試みているマシンクロックに於いて既
にスケジュールされている機械語命令と資源の競合が生
じない機械語命令を1つずつ順次に選択する機能,既に
スケジュールされている機械語命令と資源の競合が生じ
ない機械語命令を全て選択したときにはスケジュールを
試みるマシンクロックを1つ進める機能,資源要求黒板
73にスケジュール済みの機械語命令に対応する資源要
求テーブルの内容を登録する機能等を有する。
The resource request exclusive control unit 71, based on the contents of the resource request tables 72-1 to 72-m and the contents of the resource request blackboard 73, selects the machine currently trying to schedule from among the schedule candidate instructions 5. Function to sequentially select machine language instructions that do not cause resource conflict with already scheduled machine language instructions in clock, machine language instruction that does not cause resource conflict with already scheduled machine language instructions When all are selected, it has a function of advancing the machine clock by one to try the schedule, a function of registering the contents of the resource request table corresponding to the scheduled machine language instruction on the resource request blackboard 73, and the like.

【0023】発行タイミング制御手段8は、タイミング
制御部81と、タイミングマップテーブル82−1〜8
2−nと、タイミングマップ黒板83と、スケジュール
テーブル84とから構成されている。
The issue timing control means 8 includes a timing control section 81 and timing map tables 82-1 to 82-1.
2-n, a timing map blackboard 83, and a schedule table 84.

【0024】タイミングマップテーブル82−1〜82
−nは、他の機械語命令との間に命令発行タイミングの
制約があり、その制約を満足させないで機械語命令を発
行した場合にはインターロックが発生する機械語命令に
対して設けられる。図2は、或る機械語命令iについて
のタイミングマップテーブル82−iの構成例を示した
図であり、経過タイミング部21と、発行抑止タイミン
グ部22とから構成されている。
Timing map tables 82-1 to 82-2
-N is provided for a machine language instruction which has an instruction issue timing constraint with other machine language instructions and causes an interlock when the machine language instruction is issued without satisfying the constraint. FIG. 2 is a diagram showing a configuration example of the timing map table 82-i for a certain machine language instruction i, which is composed of an elapsed timing unit 21 and an issuance inhibition timing unit 22.

【0025】経過タイミング部21には、機械語命令i
が発行されてから実行が終了するまでの間の経過タイミ
ングが記述される。図2の例は、機械語命令iが発行さ
れてから0,1,2,3マシンクロック後のタイミング
をi0,i1,i2,i3で表している。尚、機械語命
令iが他の機械語命令の命令発行タイミングを制約しな
いものである場合には、経過タイミング部21は不要で
ある。
In the progress timing section 21, the machine language instruction i
Describes the elapsed timing from when the is issued until the execution ends. In the example of FIG. 2, the timing 0, 1, 2, 3 machine clocks after the machine language instruction i is issued is represented by i0, i1, i2, i3. If the machine language instruction i does not restrict the instruction issue timing of another machine language instruction, the elapsed timing unit 21 is not necessary.

【0026】また、発行抑止タイミング部22には、機
械語命令iの発行にあたって重なることが許されない機
械語命令のタイミングが記述される。この図2の例は、
機械語命令iの命令発行タイミングが、機械語命令jが
発行されてから0,1,2マシンクロック後のタイミン
グj0,j1,j2と重なってはならないこと及び命令
kが発行されてから0マシンクロック後のタイミングk
0と重なってはならないことを示している。尚、機械語
命令iが他の機械語命令によって発行タイミングが制約
されないものである場合には、発行抑止タイミング部2
2は不要である。
Further, the issue suppression timing section 22 describes the timing of machine language instructions which are not allowed to overlap in issuing the machine language instruction i. The example of this FIG.
The instruction issue timing of the machine language instruction i should not overlap with the timing j0, j1, j2 0,1, 2 machine clocks after the machine language instruction j is issued, and 0 machine after the instruction k is issued. Timing after clock k
It indicates that it should not overlap with zero. If the issue timing of the machine language instruction i is not restricted by another machine language instruction, the issue suppression timing unit 2
2 is unnecessary.

【0027】以上のような構成,内容を有するタイミン
グマップテーブル82−1〜82−nは、例えば、ハー
ドウェアのマニュアル等に記述されている機械語命令間
の命令発行タイミングの制約を抜き出すことにより作成
される。尚、上記したような機械語命令間の命令発行タ
イミングの制約は、究極的には何らかの資源の競合によ
るもので、資源要求テーブルに表現可能な場合もあるか
もしれないが、言語処理系を設定する立場からハードウ
ェアの細部に至るまで正確に資源情報を調べることがで
きないことも考えられる。このような場合には、タイミ
ングマップテーブルを使用して機械語命令間の命令発行
タイミングの制約を考慮することにより、資源要求テー
ブルの不完全さを補うことが可能になる。
The timing map tables 82-1 to 82-n having the above-described structure and contents are obtained by, for example, extracting the constraint of instruction issue timing between machine language instructions described in a hardware manual or the like. Created. It should be noted that the above-mentioned restrictions on the instruction issue timing between machine language instructions are ultimately due to some kind of resource competition, and it may be possible to express them in the resource request table. It is possible that resource information cannot be accurately examined from the standpoint of doing so to the details of the hardware. In such a case, it is possible to compensate for the incompleteness of the resource request table by using the timing map table and considering the constraint of the instruction issue timing between machine language instructions.

【0028】タイミングマップ黒板83には、スケジュ
ール済みの機械語命令に対応するタイミングマップテー
ブルの内容がスケジュール順に登録される。
On the timing map blackboard 83, the contents of the timing map table corresponding to the scheduled machine language instructions are registered in the order of schedule.

【0029】スケジュールテーブル84には、スケジュ
ールされた機械語命令と、その機械語命令をスケジュー
ルしたマシンクロックとが登録される。
In the schedule table 84, a scheduled machine language instruction and a machine clock that schedules the machine language instruction are registered.

【0030】タイミング制御部81は、タイミングマッ
プテーブル82−1〜82−nの内容とタイミングマッ
プ黒板83の内容とに基づいて、資源要求排他制御部7
1で選択された機械語命令と既にスケジュールされてい
る機械語命令とが、機械語命令間の命令発行タイミング
の制約を満足させていると判断したとき、資源要求排他
制御部71で選択された機械語命令及びその機械語命令
をスケジュールしたマシンクロックをスケジュールテー
ブル84に登録する機能,スケジュール済みの機械語命
令に対応するタイミングマップテーブルの内容をタイミ
ングマップ黒板83に登録する機能等を有する。
The timing controller 81 controls the resource request exclusion controller 7 based on the contents of the timing map tables 82-1 to 82-n and the contents of the timing map blackboard 83.
When it is determined that the machine language instruction selected in 1 and the already scheduled machine language instruction satisfy the constraint of the instruction issue timing between the machine language instructions, the resource request exclusive control unit 71 selects them. It has a function of registering a machine language instruction and a machine clock that schedules the machine language instruction in the schedule table 84, a function of registering the contents of the timing map table corresponding to the scheduled machine language instruction in the timing map blackboard 83, and the like.

【0031】図3は制御手段6の処理例を示す流れ図で
あり、以下、命令スケジューラ1に機械語命令列9とし
て図4に示す機械語命令列が入力された場合を例にとっ
て本実施例の動作を説明する。尚、図4に示した機械語
命令列9は、図5に示す原始プログラム中の命令をその
ままの順序で機械語命令に変換しただけのものである。
FIG. 3 is a flow chart showing a processing example of the control means 6, and in the present embodiment, the case where the machine language instruction sequence shown in FIG. 4 is input to the instruction scheduler 1 as the machine language instruction sequence 9 will be described below as an example. The operation will be described. The machine language instruction sequence 9 shown in FIG. 4 is obtained by converting the instructions in the source program shown in FIG. 5 into machine language instructions in the same order.

【0032】先ず、図4に示した各機械語命令について
説明すると共に、図4に示した各機械語命令に対応する
資源要求テーブル及び図4に示した第2番目,第3番
目,第5番目,第6番目の機械語命令に対応するタイミ
ングマップテーブルについて説明する。
First, each machine language instruction shown in FIG. 4 will be described, and the resource request table corresponding to each machine language instruction shown in FIG. 4 and the second, third, and fifth shown in FIG. The timing map table corresponding to the sixth and sixth machine language instructions will be described.

【0033】図4中の第1番目の機械語命令”LD %
0,A”は、変数Aに割り当てられた記憶領域からレジ
スタ番号0のレジスタに値をロードする命令であり、こ
の機械語命令に対応する資源要求テーブルは、例えば、
図6(A)に示す内容を有している。この図6(A)に
示す資源要求テーブルは、上記した機械語命令が、実行
開始から0マシンクロック後のマシンクロックで資源i
nst−slotを、実行開始から0,1マシンクロッ
ク後のマシンクロックで資源m−busと資源reg0
とを必要としていることを示している。ここで、資源i
nst−slotは1マシンクロックで複数の機械語命
令が発行されないように排他制御する資源を、m−bu
sは記憶領域とレジスタの間のメモリバスを、reg0
はレジスタ番号0のレジスタを示している。
The first machine language instruction "LD% in FIG. 4"
0, A ″ is an instruction to load a value from the storage area assigned to the variable A into the register with register number 0, and the resource request table corresponding to this machine language instruction is, for example,
It has the contents shown in FIG. In the resource request table shown in FIG. 6 (A), the machine language instruction described above has the resource i at the machine clock 0 machine clock after the start of execution.
For nst-slot, the resource m-bus and the resource reg0 are set at the machine clock 0,1 machine clocks after the start of execution.
Indicates that you need and. Where resource i
The nst-slot is an m-bu resource for exclusive control so that a plurality of machine language instructions are not issued in one machine clock.
s is the memory bus between the storage area and the register, reg0
Indicates the register with register number 0.

【0034】図4中の第2番目の機械語命令”MUL
%1,%0,2”は、レジスタ番号0のレジスタの内容
に2を乗じた結果をレジスタ番号1のレジスタに格納す
る命令であり、この機械語命令に対応する資源要求テー
ブルは、例えば、図6(B)に示す内容を有している。
この図6(B)に示す資源要求テーブルは、上記した機
械語命令が、実行開始から0マシンクロック後のマシン
クロックで資源inst−slot,mulr,reg
0を、実行開始から0,1マシンクロック後のマシンク
ロックで資源reg1を、実行開始から1マシンクロッ
ク後のマシンクロックで資源addrを必要にしている
ことを示している。ここで、資源mulrは乗算器を、
資源addrは加算器を、資源reg1はレジスタ番号
1のレジスタを示している。また、上記機械語命令に対
応するタイミングマップテーブルは、例えば、図7
(A)に示す内容を有している。ここで、mul0,m
ul1,mul2は、上記した機械語命令の経過タイミ
ングを示し、それぞれ上記機械語命令の実行開始から
0,1,2マシンクロック後のタイミングを示してい
る。
The second machine language instruction "MUL" in FIG.
% 1,% 0,2 "is an instruction to store the result of multiplying the contents of the register of register number 0 by 2 in the register of register number 1. The resource request table corresponding to this machine language instruction is, for example, It has the contents shown in FIG.
In the resource request table shown in FIG. 6 (B), the machine instructions described above are resources inst-slot, mulr, reg at a machine clock 0 machine clock after the start of execution.
0 indicates that the resource reg1 is required at the machine clock 0,1 machine clocks after the start of execution, and the resource addr is required at the machine clock one machine clock after the start of execution. Here, the resource mulr is a multiplier,
The resource addr indicates an adder, and the resource reg1 indicates the register of register number 1. Further, the timing map table corresponding to the machine language instruction is, for example, as shown in FIG.
It has the contents shown in (A). Where mul0, m
ul1 and mul2 indicate the elapsed timings of the machine language instructions described above, and the timings 0, 1 and 2 machine clocks after the start of execution of the machine language instructions, respectively.

【0035】図4中の第3番目の機械語命令”ST %
1,X”は、レジスタ番号1のレジスタの内容を変数X
に割り当てられた記憶領域へ格納する命令であり、この
機械語命令に対応する資源要求テーブルは、例えば、図
6(C)に示す内容を有している。この図6(C)に示
す資源要求テーブルは、上記した機械語命令が、実行開
始から0マシンクロック後のマシンクロックで資源in
st−slot,reg1を、実行開始から0,1マシ
ンクロック後のマシンクロックで資源m−busを必要
にしていることを示している。また、上記した機械語命
令に対応するタイミングマップテーブルは、例えば、図
7(B)に示す内容を有しており、このタイミングマッ
プテーブルは、上記機械語命令を発行するのは、ADD
命令の実行開始の2マシンクロック後であり且つMUL
命令の実行開始の3マシンクロック後でなくてはならな
いことを示している。
The third machine language instruction "ST% in FIG. 4"
1, X ”is the contents of the register of register number 1 being variable X
The resource request table corresponding to this machine language instruction has the content shown in FIG. 6C, for example. In the resource request table shown in FIG. 6 (C), the machine language instruction described above has resources in at the machine clock 0 machine clock after the start of execution.
It is shown that the resource m-bus is required for the machine clock 0,1 machine clocks after the start of execution of st-slot, reg1. Further, the timing map table corresponding to the above machine language instruction has, for example, the content shown in FIG. 7B, and this timing map table issues the machine language instruction according to ADD.
Two machine clocks after the start of instruction execution and MUL
It indicates that it must be executed 3 machine clocks after the start of execution of the instruction.

【0036】図4中の第4番目の機械語命令”LD %
2,B”は、変数Bに割り当てられた記憶領域からレジ
スタ番号2のレジスタに値をロードする命令であり、こ
の機械語命令に対応する資源要求テーブルは、例えば、
図6(D)に示す内容を有している。この資源要求テー
ブルが意味することは、図6(A)の資源要求テーブル
が意味することとほぼ同じである。
The fourth machine language instruction "LD%" in FIG.
2, B ″ is an instruction to load a value from the storage area assigned to the variable B to the register of register number 2, and the resource request table corresponding to this machine language instruction is, for example,
It has the contents shown in FIG. The meaning of this resource request table is almost the same as the meaning of the resource request table of FIG.

【0037】図4中の第5番目の機械語命令”ADD
%3,%0,%2”は、レジスタ番号0のレジスタの内
容とレジスタ番号2のレジスタの内容との和を、レジス
タ番号3のレジスタに格納する命令であり、この機械語
命令に対応する資源要求テーブルは、例えば、図6
(E)に示す内容を有している。この図6(E)に示し
た資源要求テーブルは、上記機械語命令の実行開始から
0マシンクロック後のマシンクロックで資源inst−
slot,addr,reg3,reg0,reg2を
必要にしていることを表している。また、上記した機械
語命令に対応するタイミングマップテーブルは、例え
ば、図7(C)に示す内容を有している。ここで、ad
d0,add1は上記機械語命令の経過タイミングを示
し、それぞれ上記機械語命令の実行開始から0,1マシ
ンクロック後のタイミングを示している。
The fifth machine language instruction "ADD" in FIG.
"% 3,% 0,% 2" is an instruction for storing the sum of the contents of the register of register number 0 and the contents of the register of register number 2 in the register of register number 3, and corresponds to this machine language instruction. The resource request table is, for example, as shown in FIG.
It has the contents shown in (E). In the resource request table shown in FIG. 6 (E), the resource inst- is started at the machine clock 0 machine clock after the execution start of the machine language instruction.
This indicates that slot, addr, reg3, reg0, and reg2 are required. The timing map table corresponding to the above machine language instruction has, for example, the content shown in FIG. Where ad
d0 and add1 indicate elapsed timings of the machine language instructions, respectively, timings 0 and 1 machine clocks after the start of execution of the machine language instructions.

【0038】図4中の第6番目の機械語命令”ST %
3,Y”は、レジスタ番号3のレジスタの内容を変数Y
に割り当てられた記憶領域に格納する機械語命令であ
り、この機械語命令に対応する資源要求テーブルは、例
えば図6(F)に示す内容を有している。この図6
(F)に示した資源要求テーブルは、上記機械語命令
が、その実行開始から0マシンクロック後のマシンクロ
ックで資源inst−slot,reg3を必要とし、
実行開始から0,1マシンクロック後のマシンクロック
で資源m−busを必要としていることを表している。
また、上記機械語命令に対応するタイミングマップテー
ブルは、例えば、図7(D)に示す内容を有しており、
このタイミングマップテーブルは、上記機械語命令を発
行するのは、ADD命令の実行開始の2マシンクロック
後であり且つMUL命令の実行開始の3マシンクロック
後でなくてはならないことを示している。
The sixth machine language instruction "ST%" in FIG.
3, Y ”is the variable Y for the contents of the register of register number 3.
A machine language instruction to be stored in the storage area allocated to the resource request table corresponding to this machine language instruction has, for example, the contents shown in FIG. 6 (F). This Figure 6
In the resource request table shown in (F), the machine language instruction requires the resources inst-slot, reg3 at the machine clock 0 machine clock after the start of execution.
This indicates that the resource m-bus is required at the machine clock that is 0,1 machine clocks after the start of execution.
The timing map table corresponding to the machine language instruction has, for example, the content shown in FIG.
This timing map table indicates that the machine language instruction must be issued two machine clocks after the start of execution of the ADD instruction and three machine clocks after the start of execution of the MUL instruction.

【0039】次に、命令スケジューラ1に図4に示す機
械語命令列9が入力された場合の動作を説明する。
Next, the operation when the machine language instruction sequence 9 shown in FIG. 4 is input to the instruction scheduler 1 will be described.

【0040】命令スケジューラ1内のデータ依存グラフ
作成手段2は、図4に示す機械語命令列9が入力される
と、機械語命令列9中の各機械語命令間のデータ依存関
係を示す図8に示すデータ依存グラフ3を作成する。
When the machine language instruction sequence 9 shown in FIG. 4 is input, the data dependency graph creating means 2 in the instruction scheduler 1 is a diagram showing the data dependency relationship between the machine language instructions in the machine language instruction sequence 9. A data dependence graph 3 shown in 8 is created.

【0041】図8に於いて、ノードN1〜N6はそれぞ
れ図4に示した第1番目〜第6番目の機械語命令に対応
するものであり、ノード間を結合する線分は、上部のノ
ードに対応する機械語命令の結果を下部のノードに対応
する機械語命令が参照するデータ依存関係を示してい
る。
In FIG. 8, nodes N1 to N6 correspond to the first to sixth machine language instructions shown in FIG. 4, respectively, and the line segment connecting the nodes is the upper node. The result of the machine language instruction corresponding to is the data dependency that the machine language instruction corresponding to the lower node refers to.

【0042】図9はノードN1〜N6の内容例を示す図
であり、ノード番号901と、命令ポインタ902と、
資源要求テーブルポインタ903と、タイミングマップ
テーブルポインタ904と、定義ノードポインタ905
と、参照ノードポインタ906と、残りノード数907
とが設定される。
FIG. 9 is a diagram showing an example of the contents of the nodes N1 to N6. The node number 901, the instruction pointer 902,
Resource request table pointer 903, timing map table pointer 904, definition node pointer 905
, Reference node pointer 906, and number of remaining nodes 907
And are set.

【0043】ノード番号901は、そのノードを一意に
示す番号である。命令ポインタ902は、そのノードと
対応する機械語命令の文字列へのポインタである。資源
要求テーブルポインタ903は、命令ポインタ902に
よってポイントされる機械語命令と対応する資源要求テ
ーブルへのポインタである。タイミングマップテーブル
ポインタ904は、命令ポインタ902によってポイン
トされる機械語命令と対応するタイミングマップテーブ
ルへのポインタである。定義ノードポインタ905は、
そのノードに対応する機械語命令が結果を参照する機械
語命令に対応するノードへのポインタである。参照ノー
ドポインタ906は、そのノードに対応する機械語命令
の結果を参照する機械語命令に対応するノードへのポイ
ンタである。残りノード数907は、そのノードに対応
する機械語命令が結果を参照する機械語命令の内の未ス
ケジュールの機械語命令の数(ノードの数)を示す。
The node number 901 is a number uniquely indicating the node. The instruction pointer 902 is a pointer to a character string of a machine language instruction corresponding to the node. The resource request table pointer 903 is a pointer to the resource request table corresponding to the machine language instruction pointed to by the instruction pointer 902. The timing map table pointer 904 is a pointer to the timing map table corresponding to the machine language instruction pointed to by the instruction pointer 902. The definition node pointer 905 is
The machine language instruction corresponding to that node is a pointer to the node corresponding to the machine language instruction that refers to the result. The reference node pointer 906 is a pointer to the node corresponding to the machine language instruction that refers to the result of the machine language instruction corresponding to that node. The number of remaining nodes 907 indicates the number of unscheduled machine language instructions (the number of nodes) among the machine language instructions whose results are referenced by the machine language instruction corresponding to the node.

【0044】図10は、図4に示した第5番目の機械語
命令に対応するノードN5の内容例を示した図である。
このノードN5には、ノード番号901として「5」
が、命令ポインタ902として機械語命令列9中の第5
番目の機械語命令の文字列”ADD %3,%0,%
2”へのポインタが、資源要求テーブルポインタ903
として図6(E)に示した資源要求テーブルへのポイン
タが、タイミングマップテーブルポインタ904として
図7(C)に示したタイミングマップテーブルへのポイ
ンタが、定義ノードポインタ905としてノードN1,
N4へのポインタが、参照ノードポインタ906として
ノードN6へのポインタが、残りノード数907として
「2」が設定されている。尚、本実施例では表現されて
いないが、結果の参照関係にはないが、同じレジスタに
結果を出力するために、命令スケジュールに順序に依存
関係が生じる場合には、レジスタを破壊する機械語命令
に対応するノードがレジスタを破壊する前に、破壊され
る前のレジスタを参照している機械語命令に対応するノ
ードが上記レジスタを参照するようなデータ依存グラフ
3を生成すれば、レジスタを破壊する命令が先にスケジ
ュールされることはない。
FIG. 10 is a diagram showing an example of the contents of the node N5 corresponding to the fifth machine language instruction shown in FIG.
The node number 901 of this node N5 is "5".
Is the fifth instruction in the machine language instruction sequence 9 as the instruction pointer 902.
The character string of the th machine language instruction "ADD% 3,% 0,%
The pointer to 2 ″ is the resource request table pointer 903.
6E, a pointer to the resource request table shown in FIG. 6E, a pointer to the timing map table shown in FIG. 7C as a timing map table pointer 904, and a node N1 as a definition node pointer 905.
A pointer to the node N4 is set as the reference node pointer 906, a pointer to the node N6 is set, and “2” is set as the remaining node number 907. Although not expressed in this embodiment, the result is output to the same register, but if the instruction schedule has a dependency on the order, the machine language that destroys the register is not expressed. Before the node corresponding to the instruction destroys the register, if the node corresponding to the machine language instruction referencing the register before the destruction refers to the above-described data dependence graph 3, the register is generated. The order to destroy is not scheduled first.

【0045】スケジュール候補命令抽出手段4は、デー
タ依存グラフ作成手段2によって図8に示すデータ依存
グラフ3が作成されると、先に実行されていなくてはな
らない命令が既にスケジュールされているスケジュール
可能状態にある機械語命令に対応するノードをデータ依
存グラフ3から抽出し、抽出したノードへのポインタを
スケジュール候補命令5として出力する。
When the data dependence graph creating means 2 creates the data dependence graph 3 shown in FIG. 8, the schedule candidate instruction extracting means 4 can schedule a command which must be executed first. The node corresponding to the machine language instruction in the state is extracted from the data dependence graph 3, and the pointer to the extracted node is output as the schedule candidate instruction 5.

【0046】この時点では、スケジュール可能状態にあ
る機械語命令に対応するノードは、ノードN1,N4の
2つであるので、スケジュール候補命令抽出手段4は、
ノードN1,N4へのポインタをスケジュール候補命令
5として出力する。
At this point in time, the two nodes N1 and N4 corresponding to the machine language instruction in the schedulable state are the schedule candidate instruction extracting means 4
The pointers to the nodes N1 and N4 are output as the schedule candidate instruction 5.

【0047】スケジュール候補命令抽出手段4からスケ
ジュール候補命令5としてノードN1,N4へのポイン
タが出力されると、制御手段6は図3の流れ図に示す処
理を開始する。
When the pointers to the nodes N1 and N4 are output as the schedule candidate instruction 5 from the schedule candidate instruction extracting means 4, the control means 6 starts the processing shown in the flowchart of FIG.

【0048】先ず、ステップS1に於いて、資源要求排
他制御部71及びタイミング制御部81が、それぞ資源
要求黒板73及びタイミングマップ黒板83をクリアし
て両者を白紙の状態にすると共に、現時点でスケジュー
ルを試みているマシンクロックのクロック番号を保持す
る変数clockを「0」に初期設定する。
First, in step S1, the resource request exclusive control unit 71 and the timing control unit 81 clear the resource request blackboard 73 and the timing map blackboard 83 respectively to make them both blank and at the present time. Initialize a variable clock that holds the clock number of the machine clock for which the schedule is attempted to "0".

【0049】その後、資源要求排他制御部71が、スケ
ジュール候補命令5としてスケジュール候補命令抽出手
段4から出力されている、残りノード数907が「0」
のノードN1,N4へのポインタの内の1つを変数no
deに設定する(ステップS3)。今、例えば、資源要
求排他制御部71がノードN1,N4へのポインタの
内、ノードN1へのポインタを変数nodeに設定した
とする。
After that, the resource request exclusive control unit 71 outputs the schedule candidate instruction 5 from the schedule candidate instruction extracting means 4 and the remaining node number 907 is "0".
One of the pointers to the nodes N1 and N4 of
Set to de (step S3). Now, for example, it is assumed that the resource request exclusive control unit 71 sets the pointer to the node N1 among the pointers to the nodes N1 and N4 in the variable node.

【0050】変数nodeにノードN1へのポインタを
設定すると、資源要求排他制御部71は、ノードN1の
資源要求テーブルポインタ903によってポイントされ
る資源要求テーブルの内容を資源要求黒板73に登録で
きるか否かを判断する(ステップS6)。この時点で
は、資源要求黒板73は白紙の状態であるので、資源要
求排他制御部71は登録できると判断することになる。
When the pointer to the node N1 is set in the variable node, the resource request exclusive control unit 71 determines whether the content of the resource request table pointed to by the resource request table pointer 903 of the node N1 can be registered in the resource request blackboard 73. It is determined (step S6). At this point, the resource request blackboard 73 is in a blank state, so the resource request exclusive control unit 71 determines that it can be registered.

【0051】資源要求排他制御部71で登録できると判
断されると、タイミング制御部81がノードN1のタイ
ミングマップテーブルポインタ904によってポイント
されるタイミングマップテーブルの内容をタイミングマ
ップ黒板83に登録できるか否かを判断する(ステップ
S7)。尚、タイミングマップテーブルポインタ904
の内容がNULLの場合、即ちノードN1に対応するタ
イミングマップテーブルが存在しない場合は、タイミン
グ制御部81は、登録できると判断するものであり、こ
の場合、ノードN1のタイミングマップテーブルポイン
タ904はNULLとなっているので、ステップS7の
判断結果はYESとなる。
If the resource request exclusive control unit 71 determines that it can be registered, whether the timing control unit 81 can register the content of the timing map table pointed to by the timing map table pointer 904 of the node N1 in the timing map blackboard 83. It is determined (step S7). The timing map table pointer 904
Is NULL, that is, when the timing map table corresponding to the node N1 does not exist, the timing control unit 81 determines that it can be registered. In this case, the timing map table pointer 904 of the node N1 is NULL. Therefore, the determination result of step S7 is YES.

【0052】ステップS7の判断結果がYESとなる
と、資源要求排他制御部71は、ノードN1の資源要求
テーブルポインタ903によってポイントされる資源要
求テーブルの内容を、資源要求黒板73の変数cloc
kによって示される位置に登録し、タイミング制御部8
1はノードN1のタイミングマップテーブルポインタ9
04によってポイントされるタイミングマップテーブル
の内容をタイミングマップ黒板83の変数clockに
よって示される位置に登録すると共に、ノードN1の命
令ポインタ902によってポイントされる機械語命令及
びその機械語命令をスケジュールしたマシンクロックを
スケジュールテーブル84に登録する(ステップS
8)。尚、タイミングマップテーブルポインタ904の
内容がNULLの場合は、タイミング制御部81は、タ
イミングマップ黒板83へのタイミングマップテーブル
の登録はできると判断はするが、実際の登録動作は行わ
ない。この例の場合、ノードN1は図4の第1番目の機
械語命令”LD %0,A”に対応し、機械語命令”L
D %0,A”に対応する資源要求テーブルの内容は図
6(A)に示すものであるので、図11に示すように、
資源要求黒板73のclock=0に、図6(A)に示
す資源要求テーブルの内容が登録されるが、ノードN1
のタイミングマップテーブルポインタ904の内容はN
ULLであるので、タイミングマップ黒板83へのタイ
ミングマップテーブルの登録は行われない。
If the decision result in the step S7 is YES, the resource request exclusive control unit 71 sets the content of the resource request table pointed to by the resource request table pointer 903 of the node N1 to the variable cloc of the resource request blackboard 73.
The timing control unit 8 registers at the position indicated by k.
1 is the timing map table pointer 9 of the node N1
The contents of the timing map table pointed to by 04 are registered in the position indicated by the variable clock on the timing map blackboard 83, and the machine language instruction pointed by the instruction pointer 902 of the node N1 and the machine clock that schedules the machine language instruction Is registered in the schedule table 84 (step S
8). When the content of the timing map table pointer 904 is NULL, the timing control unit 81 determines that the timing map table can be registered in the timing map blackboard 83, but the actual registration operation is not performed. In this example, the node N1 corresponds to the first machine language instruction “LD% 0, A” in FIG.
Since the contents of the resource request table corresponding to D% 0, A "are as shown in FIG. 6A, as shown in FIG.
The contents of the resource request table shown in FIG. 6A are registered in clock = 0 of the resource request blackboard 73, but the node N1
Contents of the timing map table pointer 904 of
Since it is UL, the timing map table is not registered on the timing map blackboard 83.

【0053】また、ステップS8に於いて、タイミング
制御部81は、データ依存グラフ3中のノードN1の参
照ノードポインタ906によってポインタされる全ての
ノードの残りノード数907を1デクリメイトし、その
後、スケジュール候補命令抽出手段4に対してスケジュ
ール候補命令5の抽出を指示する処理も行う。
Further, in step S8, the timing control section 81 decrements the remaining node number 907 of all the nodes pointed to by the reference node pointer 906 of the node N1 in the data dependence graph 3 by 1, and thereafter schedules The process of instructing the candidate instruction extracting means 4 to extract the schedule candidate instruction 5 is also performed.

【0054】この指示を受けると、スケジュール候補命
令抽出手段4は、データ依存グラフ3に基づいて、先に
実行されていなくてはならない機械語命令が既にスケジ
ュールされていてスケジュール可能状態にある機械語命
令に対応するノードを抽出し、そのノードへのポインタ
をスケジュール候補命令5として出力する。この場合,
ノードN2,N4へのポインタがスケジュール候補命令
5として出力される。
Upon receipt of this instruction, the schedule candidate instruction extracting means 4 is in a machine language in which the machine language instruction, which must be executed first, has already been scheduled and is ready to be scheduled, based on the data dependence graph 3. The node corresponding to the instruction is extracted, and the pointer to the node is output as the schedule candidate instruction 5. in this case,
The pointers to the nodes N2 and N4 are output as the schedule candidate instruction 5.

【0055】ノードN2,N4へのポインタがスケジュ
ール候補命令5として出力されると、資源要求排他制御
部71は、その内の1つを変数nodeに設定する(ス
テップS3)。今、例えば、資源要求排他制御部71が
ノードN4へのポインタを変数nodeに設定したとす
る。
When the pointers to the nodes N2 and N4 are output as the schedule candidate instruction 5, the resource request exclusive control unit 71 sets one of them in the variable node (step S3). Now, for example, it is assumed that the resource request exclusive control unit 71 sets a pointer to the node N4 in the variable node.

【0056】変数nodeにノードN4へのポインタを
設定すると、資源要求排他制御部71は、ノードN4の
資源要求テーブルポインタ903によってポイントされ
る資源要求テーブルの内容を資源要求黒板73に登録で
きるか否かを判断する(ステップS6)。この場合、ノ
ードN4の資源要求テーブルは、図6(D)に示すもの
であり、また、資源要求黒板73のclock=0の位
置には図6(A)に示す資源要求テーブルの内容が登録
されており、clock=0では資源inst−slo
t,m−busが重なり合う(競合する)ので、登録で
きないと判断することになる。
When the pointer to the node N4 is set in the variable node, the resource request exclusive control unit 71 determines whether the contents of the resource request table pointed to by the resource request table pointer 903 of the node N4 can be registered in the resource request blackboard 73. It is determined (step S6). In this case, the resource request table of the node N4 is as shown in FIG. 6D, and the content of the resource request table shown in FIG. 6A is registered at the position of clock = 0 on the resource request blackboard 73. And clock = 0, the resource inst-slo
Since t and m-bus overlap (conflict), it is determined that registration cannot be performed.

【0057】ステップS6で登録できないと判断する
と、資源要求排他制御部71は、スケジュール候補命令
5中の未処理のノードの内の1つ(この場合ノードN
2)に対して前述したと同様に、ノードN2の資源要求
テーブルを資源要求黒板73に登録できるか否かを判断
する(ステップS3,S6)。この場合、ノードN2の
資源要求テーブルは、図6(B)に示すものであり、c
lock=0では資源inst−slot,reg0が
重なり合うので、登録できないと判断することになる。
If it is determined in step S6 that registration is not possible, the resource request exclusive control unit 71 determines that one of the unprocessed nodes in the schedule candidate instruction 5 (node N in this case).
Similarly to 2), it is determined whether the resource request table of the node N2 can be registered in the resource request blackboard 73 (steps S3 and S6). In this case, the resource request table of the node N2 is as shown in FIG.
When lock = 0, the resources inst-slot and reg0 overlap each other, so it is determined that registration is not possible.

【0058】ステップS6でノードN2の資源要求テー
ブルを資源要求黒板73に登録できないと判断すると、
資源要求排他制御部71は、スケジュール候補命令5中
に未処理のノードが存在しないことから(ステップS4
がNO)、変数clockを1インクリメイトし(ステ
ップS5)、再び前述したと同様の処理を行う。
When it is determined in step S6 that the resource request table of the node N2 cannot be registered in the resource request blackboard 73,
The resource request exclusive control unit 71 determines that there is no unprocessed node in the schedule candidate instruction 5 (step S4).
Is NO), the variable clock is incremented by 1 (step S5), and the same processing as described above is performed again.

【0059】変数clockを1インクリメントしてc
lock=1にしても、変数nodeにノードN4への
ポインタを設定した場合には、資源m−busが重なり
合い、変数nodeにノードN2へのポインタを設定し
た場合には資源reg0が重なり合うので、資源要求排
他制御部71は、資源要求黒板73にノードN4,N2
の資源要求テーブルの内容を登録できないと判断し(ス
テップS6)、変数clockを1インクリメントする
(ステップS5)。
The variable clock is incremented by 1 to c
Even if lock = 1, the resource m-bus overlaps when the pointer to the node N4 is set in the variable node, and the resource reg0 overlaps when the pointer to the node N2 is set in the variable node. The request exclusive control unit 71 displays the nodes N4 and N2 on the resource request blackboard 73.
It is determined that the contents of the resource request table of 1 cannot be registered (step S6), and the variable clock is incremented by 1 (step S5).

【0060】変数clockを1インクリメントしてc
lock=2にした後に、変数nodeにノードN4へ
のポインタを設定した場合には、資源要求黒板73のc
lock=2の位置は空白になっており、資源の競合が
生じないので、ノードN4の資源要求テーブルの内容は
登録できると判断される(ステップS6)。
The variable clock is incremented by 1 and c
When the pointer to the node N4 is set in the variable node after setting lock = 2, c of the resource request blackboard 73 is set.
Since the position of lock = 2 is blank and resource conflict does not occur, it is determined that the content of the resource request table of the node N4 can be registered (step S6).

【0061】資源要求排他制御部71がノードN4の資
源要求テーブルの内容を資源要求黒板73に登録できる
と判断すると、タイミング制御部81は、ノードN4の
タイミングマップテーブルの内容をタイミングマップ黒
板83に登録できるか否かを判断する(ステップS
7)。この場合、ノードN4に対応するタイミングマッ
プテーブルは存在しないので、タイミング制御部81は
登録できると判断する。
When the resource request exclusive control unit 71 determines that the content of the resource request table of the node N4 can be registered in the resource request blackboard 73, the timing control unit 81 stores the content of the timing map table of the node N4 in the timing map blackboard 83. Determine if you can register (step S
7). In this case, since the timing map table corresponding to the node N4 does not exist, the timing control unit 81 determines that it can be registered.

【0062】タイミング制御部81で登録できると判断
されると、資源要求排他制御部71は、図6(D)に示
すノードN4の資源要求テーブルの内容を資源要求黒板
73のclock=2の位置に登録する(ステップS
8)。また、ステップS8に於いて、タイミング制御部
81は、データ依存グラフ3中のノードN3の参照ノー
ドポインタ906によってポイントされる全てのノード
の残りノード数を1デクリメントし、その後、スケジュ
ール候補命令抽出手段4に対してスケジュール候補命令
の抽出を指示する。
When the timing control unit 81 determines that the resource request exclusion control unit 71 can register the contents of the resource request table of the node N4 shown in FIG. To register (step S
8). Further, in step S8, the timing control unit 81 decrements the remaining node number of all the nodes pointed to by the reference node pointer 906 of the node N3 in the data dependence graph 3, by one, and thereafter, the schedule candidate instruction extracting means. 4 is instructed to extract the schedule candidate instruction.

【0063】この指示を受けると、スケジュール候補命
令抽出手段4は、先に実行されていなくてはならない機
械語命令が既にスケジュールされていてスケジュール可
能状態にある機械語命令に対応するノードをデータ依存
グラフ3から抽出し、そのノードへのポインタをスケジ
ュール候補命令5として出力する。この場合、ノードN
2,N5へのポインタがスケジュール候補命令5として
出力されることになる。
When this instruction is received, the schedule candidate instruction extracting means 4 makes the node corresponding to the machine language instruction, which has already been scheduled and must be executed, dependent on the node corresponding to the data. It is extracted from the graph 3 and the pointer to that node is output as the schedule candidate instruction 5. In this case, node N
2, pointers to N5 are output as the schedule candidate instruction 5.

【0064】資源要求排他制御部71は、スケジュール
候補命令抽出手段4からスケジュール候補命令5として
ノードN2,N5へのポインタが出力されると、その内
の1つの(例えばノードN2へのポインタ)を変数no
deに設定し(ステップS3)、ノードN2について前
述したと同様の処理を行う。
When the pointers to the nodes N2 and N5 are output as the schedule candidate instruction 5 from the schedule candidate instruction extracting means 4, the resource request exclusive control unit 71 outputs one of them (for example, the pointer to the node N2). Variable no
It is set to de (step S3), and the same processing as described above is performed for the node N2.

【0065】以下前述したと同様の処理が行われ、図1
1に示すように、ノードN4,N2,N5に対応する機
械語命令の資源要求テーブル,タイミングマップテーブ
ルの内容が順次資源要求黒板73,タイミングマップ黒
板83に登録され、ノードN4,N2,N5に対応する
機械語命令及びそれをスケジュールしたマシンクロック
が順次スケジュールテーブル84に登録される。
Thereafter, the same processing as described above is performed, and FIG.
As shown in FIG. 1, the contents of the resource request table and the timing map table of the machine language instruction corresponding to the nodes N4, N2, N5 are sequentially registered in the resource request blackboard 73 and the timing map blackboard 83, and the nodes N4, N2, N5 The corresponding machine language instruction and the machine clock that schedules it are sequentially registered in the schedule table 84.

【0066】ノードN5に対応する機械語命令の資源要
求テーブル,タイミングマッププログラムが資源要求黒
板73,タイミングマップ黒板83に登録されると、ス
ケジュール候補命令抽出手段4は、スケジュール候補命
令5としてデータ依存グラフ3中のノードN3,N6へ
のポインタを出力する。
When the resource request table and the timing map program of the machine language instruction corresponding to the node N5 are registered in the resource request blackboard 73 and the timing map blackboard 83, the schedule candidate command extracting means 4 is data dependent as the schedule candidate command 5. The pointers to the nodes N3 and N6 in the graph 3 are output.

【0067】資源要求排他制御部71は、スケジュール
候補命令5としてノードN3,N6へのポインタが出力
されると、その内の1つ(ノードN3へのポインタとす
る)を変数nodeに設定する(ステップS3)。この
時、変数clockは「5」になっている。
When the pointers to the nodes N3 and N6 are output as the schedule candidate instruction 5, the resource request exclusive control unit 71 sets one of them (the pointer to the node N3) in the variable node ( Step S3). At this time, the variable clock is “5”.

【0068】その後、資源要求排他制御部71は、ノー
ドN3の資源要求テーブルを資源要求黒板73に登録で
きるか否かを判断する(ステップS6)。この場合、ノ
ードN3の資源要求テーブルは、図6(C)に示す内容
を有し、資源要求黒板73のclock=5の位置では
資源inst−slotが重なり合うので、ステップS
6の判断結果はNOとなる。この結果、資源要求排他制
御部71は、スケジュール候補命令5中の残りのノード
N6の内容を変数nodeに設定し(ステップS3)、
ステップS6の処理を行う。
After that, the resource request exclusive control unit 71 determines whether or not the resource request table of the node N3 can be registered in the resource request blackboard 73 (step S6). In this case, the resource request table of the node N3 has the content shown in FIG. 6C, and the resource inst-slot overlaps at the position of clock = 5 on the resource request blackboard 73, so step S
The determination result of 6 is NO. As a result, the resource request exclusive control unit 71 sets the content of the remaining node N6 in the schedule candidate instruction 5 in the variable node (step S3),
The process of step S6 is performed.

【0069】この場合、ノードN6の資源要求テーブル
は、図6(F)に示す内容を有し、資源要求黒板73の
clock=5の位置では、資源inst−slot,
reg3が重なり合うので、ステップS6の判断結果は
NOとなる。
In this case, the resource request table of the node N6 has the contents shown in FIG. 6 (F), and at the position of clock = 5 on the resource request blackboard 73, the resource inst-slot,
Since reg3 overlaps, the determination result of step S6 is NO.

【0070】その後、資源要求排他制御部71は、スケ
ジュール候補命令5中に未処理のノードが存在しないこ
とから(ステップS4がNO)、変数clockを1イ
ンクリメントし(ステップS5)、その後、前述したと
同様の処理を行う。
Thereafter, the resource request exclusive control unit 71 increments the variable clock by 1 (step S5) since there is no unprocessed node in the schedule candidate instruction 5 (step S4 is NO), and then the above-mentioned processing is performed. Perform the same processing as.

【0071】変数clockを1インクリメントしてc
lock=6にした後に、変数nodeにノードN3の
内容を設定した場合には、資源要求黒板73のcloc
k=6の位置は空白になっているので、資源要求排他制
御部71はノードN3の資源要求テーブルを資源要求黒
板73に登録可能であると判断することになる(ステッ
プS6)。
The variable clock is incremented by 1 to c
When the content of the node N3 is set in the variable node after setting lock = 6, the cloc of the resource request blackboard 73
Since the position of k = 6 is blank, the resource request exclusive control unit 71 determines that the resource request table of the node N3 can be registered in the resource request blackboard 73 (step S6).

【0072】資源要求排他制御部71でノードN3の資
源要求テーブルが登録可能であると判断されると、タイ
ミング制御部81は、ノードN3のタイミングマップテ
ーブルをタイミングマップ黒板83に登録できるか否か
を判断する(ステップS7)。
When the resource request exclusive control unit 71 determines that the resource request table of the node N3 can be registered, the timing control unit 81 can register the timing map table of the node N3 on the timing map blackboard 83. Is determined (step S7).

【0073】この場合、ノードN3のタイミングマップ
テーブルは、図7(B)に示す内容を有しており、タイ
ミングマップ黒板83のclock=6の位置では、タ
イミングadd1が重なり合うので、タイミング制御部
81は、ノードN3のタイミングマップテーブルをタイ
ミングマップ黒板83に登録できないと判断することに
なる。
In this case, the timing map table of the node N3 has the contents shown in FIG. 7B. Since the timing add1 overlaps at the position of clock = 6 on the timing map blackboard 83, the timing control unit 81 Determines that the timing map table of the node N3 cannot be registered in the timing map blackboard 83.

【0074】タイミング制御部81で、ノードN3のタ
イミングマップテーブルをタイミングマップ黒板83に
登録できないと判断されると(ステップS7がNO)、
資源要求排他制御部71はスケジュール候補命令5中の
残りのノードN6の内容を変数nodeに設定し(ステ
ップS3)、ステップS6の処理を行う。
When the timing controller 81 determines that the timing map table of the node N3 cannot be registered in the timing map blackboard 83 (NO in step S7),
The resource request exclusive control unit 71 sets the content of the remaining node N6 in the schedule candidate instruction 5 in the variable node (step S3), and performs the process of step S6.

【0075】この場合、ノードN6の資源要求テーブル
の内容は、図6(F)に示すものであるので、資源要求
黒板73のclock=6の位置に登録可能であると判
断される。
In this case, since the content of the resource request table of the node N6 is as shown in FIG. 6F, it is determined that the resource request blackboard 73 can be registered at the position of clock = 6.

【0076】資源要求排他制御部71でノードN6の資
源要求テーブルが登録可能であると判断されると、タイ
ミング制御部81は、ノードN6のタイミングマップテ
ーブルをタイミングマップ黒板83に登録できるか否か
を判断する(ステップS7)。
When the resource request exclusive control unit 71 determines that the resource request table of the node N6 can be registered, the timing control unit 81 can register the timing map table of the node N6 on the timing map blackboard 83. Is determined (step S7).

【0077】この場合、ノードN6のタイミングマップ
テーブルは、図7(D)に示す内容を有しており、タイ
ミングマップ黒板83のclock=6の位置では、タ
イミングadd1が重なり合うので、タイミング制御部
81は、ノードN3のタイミングマップテーブルをタイ
ミングマップ黒板83に登録できないと判断することに
なる。
In this case, the timing map table of the node N6 has the contents shown in FIG. 7D, and the timing add1 overlaps at the position of clock = 6 on the timing map blackboard 83. Determines that the timing map table of the node N3 cannot be registered in the timing map blackboard 83.

【0078】タイミングマップ黒板83で、ノードN6
のタイミングマップテーブルをタイミングマップ黒板8
3に登録できないと判断されると、資源要求排他制御部
71は、スケジュール候補命令5中に未処理のノードが
ないので(ステップS4がNO)、変数clockを1
インクリメントし(ステップS5)、その後、前述した
と同様の処理を行う。
Timing map Blackboard 83, node N6
Timing map table of timing map blackboard 8
If it is determined that the schedule request instruction 5 has no unprocessed nodes (NO in step S4), the resource request exclusive control unit 71 sets the variable clock to 1
It is incremented (step S5), and then the same processing as described above is performed.

【0079】変数clockを1インクリメントしてc
lock=7にした後、変数nodeにノードN3への
ポインタを設定した場合(ステップS3)は、資源要求
黒板73のclock=7の位置は空白になっているの
で、資源要求排他制御部71はノードN3の資源要求テ
ーブルを資源要求黒板73に登録可能であると判断する
ことになる(ステップS6)。
The variable clock is incremented by 1 and c
When the pointer to the node N3 is set to the variable node after setting lock = 7 (step S3), the position of clock = 7 on the resource request blackboard 73 is blank, so the resource request exclusive control unit 71 It is determined that the resource request table of the node N3 can be registered in the resource request blackboard 73 (step S6).

【0080】資源要求排他制御部71でノードN3の資
源要求テーブルが登録可能であると判断されると、タイ
ミング制御部81は、ノードN3のタイミングマップテ
ーブルをタイミングマップ黒板83に登録できるか否か
を判断する(ステップS7)。
When the resource request exclusive control unit 71 determines that the resource request table of the node N3 can be registered, the timing control unit 81 can register the timing map table of the node N3 on the timing map blackboard 83. Is determined (step S7).

【0081】この場合、ノードN3のタイミングマップ
テーブルのclock7の位置は空白になっているの
で、タイミング制御部81は、ノードN3のタイミング
マップテーブルの内容をタイミングマップ黒板83に登
録できると判断することになる。以下前述したと同様の
処理が行われ、ノードN3,N6に対応する機械語命令
の資源要求テーブル,タイミングマップテーブルの内容
が順次資源要求黒板73,タイミングマップ黒板83に
登録されると共にノードN3,N6に対応する機械語命
令及びそれをスケジュールしたマシンクロックがスケジ
ュールテーブル84に順次登録される。そして、全ての
ノードについて前述した処理を行うと、制御手段6はそ
の処理を終了する。
In this case, since the position of clock7 in the timing map table of the node N3 is blank, the timing controller 81 judges that the contents of the timing map table of the node N3 can be registered in the timing map blackboard 83. become. Thereafter, the same processing as that described above is performed, and the contents of the resource request table and the timing map table of the machine language instruction corresponding to the nodes N3 and N6 are sequentially registered in the resource request blackboard 73 and the timing map blackboard 83, and at the same time, the node N3. The machine language instruction corresponding to N6 and the machine clock that schedules it are sequentially registered in the schedule table 84. Then, when the above-described processing is performed for all the nodes, the control means 6 ends the processing.

【0082】このように、本実施例では、資源の競合に
基づいてのみ機械語命令をスケジュールするのではな
く、各機械語命令間の命令発行タイミングの制約も考慮
して機械語命令をスケジュールするものであるので、図
11のclock=5,6,7に示すように、機械語命
令「ST %1,X」は、機械語命令「ADD %3,
%0,%2」の発行タイミングから2マシンクロック後
にスケジュールされるようになる。従って、もし、cl
ock6にスケジュールしてもclock=5にスケジ
ュールされている機械語命令「ADD %3,%0,%
2」及び機械語命令「ST %1,X」と資源の競合が
生じず、且つ命令発行タイミングの制約を満足する機械
語命令が存在すれば、その機械語命令をclock=6
にスケジュールすることが可能になるので、資源の競合
のみに基づいて機械語命令をスケジュールした場合に比
較してプログラムの実行効率を向上させることが可能に
なる。
As described above, in this embodiment, the machine language instructions are not only scheduled based on the resource competition, but the machine language instructions are scheduled in consideration of the constraint of the instruction issue timing between the machine language instructions. Therefore, as shown in clock = 5, 6, 7 in FIG. 11, the machine language instruction “ST% 1, X” is the machine language instruction “ADD% 3.
It will be scheduled two machine clocks after the issuance timing of "% 0,% 2". Therefore, if cl
The machine language instruction "ADD% 3,% 0,%" that is scheduled to clock = 5 even if it is scheduled to ock6
2 ”and the machine language instruction“ ST% 1, X ”does not cause resource competition, and if there is a machine language instruction satisfying the constraint of the instruction issue timing, the machine language instruction is clock = 6.
Therefore, it is possible to improve the execution efficiency of the program as compared with the case where the machine language instruction is scheduled only based on the resource competition.

【0083】[0083]

【発明の効果】以上説明したように本発明は、各機械語
命令間の命令発行タイミングの制約考慮して機械語命
令をスケジュールする発行タイミング制御手段を備えて
いるので、ハードウェア資源の競合に基づいてのみ機械
語命令をスケジュールするだけであった従来の技術に比
較して、ハードウェア内のインターロックを少なくする
ことができる機械語命令を生成することができ、この結
果、目的プログラムの実行効率を向上させることが可能
になる効果がある。
The present invention described above, according to the present invention, since there <br/> includes issuing timing control means for scheduling the machine language instructions in consideration of the constraints of the instruction issue timing between the machine language instructions, hard It is possible to generate a machine language instruction that can reduce interlock in the hardware as compared with the conventional technique that only schedules the machine language instruction only on the basis of the contention of the hardware resource. The effect is that the execution efficiency of the target program can be improved.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施例のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】タイミングマップテーブルの構成例を示す図で
ある。
FIG. 2 is a diagram showing a configuration example of a timing map table.

【図3】制御手段6の処理例を示す流れ図である。FIG. 3 is a flowchart showing a processing example of a control unit 6.

【図4】機械語命令列の一例を示す図である。FIG. 4 is a diagram showing an example of a machine language instruction sequence.

【図5】原始プログラムの一例を示す図である。FIG. 5 is a diagram showing an example of a source program.

【図6】資源要求テーブルの内容例を示す図である。FIG. 6 is a diagram showing an example of contents of a resource request table.

【図7】タイミングマップテーブルの内容例を示す図で
ある。
FIG. 7 is a diagram showing an example of contents of a timing map table.

【図8】データ依存グラフ3の一例を示す図である。FIG. 8 is a diagram showing an example of a data dependence graph 3.

【図9】データ依存グラフ3中のノードの内容例を示す
図である。
9 is a diagram showing an example of the contents of nodes in the data dependence graph 3. FIG.

【図10】ノードN5の内容例を示した図である。FIG. 10 is a diagram showing an example of contents of a node N5.

【図11】資源要求黒板73,タイミングマップ黒板8
3の内容例を示した図である。
FIG. 11: Resource request blackboard 73, timing map blackboard 8
It is the figure which showed the example of contents of 3.

【図12】資源要求テーブルの内容例を示した図であ
る。
FIG. 12 is a diagram showing an example of contents of a resource request table.

【符号の説明】[Explanation of symbols]

1…命令スケジューラ 2…データ依存グラフ作成手段 3…データ依存グラフ 4…スケジュール候補命令抽出手段 5…スケジュール候補命令 6…制御手段 7…資源要求排他制御手段 71…資源要求排他制御部 72−1〜72−m…資源要求テーブル 73…資源要求黒板 8…発行タイミング制御手段 81…タイミング制御部 82−1〜82−n…タイミングマップテーブル 83…タイミングマップ黒板 84…スケジュールテーブル 1 ... Instruction scheduler 2 ... Data dependence graph creation means 3 ... Data dependence graph 4. Schedule candidate instruction extracting means 5 ... Schedule candidate instruction 6 ... Control means 7 ... Resource request exclusive control means 71 ... Resource request exclusive control unit 72-1 to 72-m ... Resource request table 73 ... Resource request blackboard 8 ... Issuance timing control means 81 ... Timing control unit 82-1 to 82-n ... Timing map table 83 ... Timing map blackboard 84 ... Schedule table

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平6−131197(JP,A) 国際公開94/22079(WO,A1) M.JOHNSON著,村上訳「スー パースカラ・プロセッサ」(1994−8) 日経BP社,p.175〜198 (58)調査した分野(Int.Cl.7,DB名) G06F 9/45 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-6-131197 (JP, A) International Publication 94/22079 (WO, A1) M.M. JOHNSON, Translated by Murakami "Superscalar Processor" (1994-8) Nikkei BP, p. 175〜198 (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 9/45

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 原始プログラムに基づいて生成された機
械語命令列の並びをプログラムの実行効率が向上するよ
うにスケジュールするコンパイル装置の機械語命令スケ
ジューリング装置に於いて、 前記機械語命令列の中から、スケジュール可能状態にあ
る全ての機械語命令を抽出するスケジュール候補命令抽
出手段と、 各機械語命令毎にその機械語命令の実行にあたって必要
となる資源がマシンクロック単位で記述された資源要求
テーブルと、 機械語命令毎に機械語命令間の命令発行タイミングの制
約を示す制約情報が記述されたタイミングマップテーブ
ルと、前記スケジュール候補命令抽出手段が抽出した機械語命
令のうちのいずれかについて、現在スケジュールを試み
ているマシンクロックに於いてスケジュール済みの機械
語命令と資源の競合が生じないか否か判断し、資源の競
合が生じないと判断した場合は、その機械語命令とスケ
ジュール済みの機械語命令とが、前記タイミングマップ
テーブル中の制約情報が示す機械語命令間の命令発行タ
イミングの制約を満足しているか否か判断し、制約を満
足していると判断したときは、その機械語命令をスケジ
ュール済みの機械語命令の次にスケジュールするスケジ
ュール処理を行う制御手段と を備え、 前記制御手段は、前記資源の競合が生じないか否かの判
断において、資源の競合が生じると判断した場合には、
前記機械語命令以外の前記スケジュール候補命令抽出手
段が抽出した機械語命令があるか判断し、ある場合は、
そのうちのいずれかについて、前記スケジュール処理を
行い、ない場合には、マシンクロックを一つ進めて、再
度、前記スケジュール候補命令抽出手段が抽出した機械
語命令のうちのいずれかについて、前記スケジュール処
理を行い、前記制約を満足しているか否かの判断におい
て、制約を満足していないと判断したときには、前記機
械語命令以外の前記スケジュール候補命令抽出手段が抽
出した機械語命令があるか判断し、ある場合は、そのう
ちのいずれかについて、前記スケジュール処理を行い、
ない場合には、マシンクロックを一つ進めて、再度、前
記スケジュール候補 命令抽出手段が抽出した機械語命令
のうちのいずれかについて、前記スケジュール処理を行
うことを特徴とする機械語命令スケジューリング装置。
1. A machine language instruction scheduling device of a compiling device for scheduling a sequence of machine language instruction sequences generated based on a source program so that the execution efficiency of the program is improved, in the machine language instruction sequence. From the schedule candidate instruction extracting means for extracting all machine language instructions in a schedulable state, and a resource request table in which the resources necessary for executing the machine language instruction are described in machine clock units for each machine language instruction. And a timing map table in which constraint information indicating a constraint of instruction issue timing between machine language instructions is described for each machine language instruction, and a machine language instruction extracted by the schedule candidate instruction extracting means.
Trying the current schedule for any of the orders
Scheduled Machine at Machine Clock
Determine whether or not there is a conflict between the word command and the resource, and compete for the resource.
If it is determined that no match occurs, the machine language instruction and schedule
The machine language instruction that has been completed is the timing map
Instruction issuer between machine language instructions indicated by constraint information in the table
Judge whether or not the imming constraint is satisfied and satisfy the constraint.
When it is determined that they are added, the machine language instruction is
Schedule to schedule next to a machined instruction
And control means for performing Yuru processing, said control means, whether or not competition of the resource does not occur or determine
If it is determined that competition for resources will occur,
A candidate for extracting the schedule candidate instruction other than the machine language instruction
Judge whether there is a machine language instruction extracted by Dan, and if there is,
For any of them,
If not, advance the machine clock by one and restart.
The machine extracted by the schedule candidate instruction extracting means
The schedule process for any of the word commands
To determine whether or not the above constraints are satisfied.
When it is determined that the constraints are not satisfied,
The schedule candidate instruction extraction means other than the machine language instruction is extracted.
Judge whether there is a machine language instruction issued, and if so,
For any of the above, perform the schedule process,
If not, advance the machine clock by one and then again.
Machine language instruction extracted by the schedule candidate instruction extraction means
Perform the schedule process for any of the
A machine language instruction scheduling apparatus characterized by the following features.
【請求項2】 前記原始プログラムに基づいて生成され
た機械語命令列の各機械語命令間のデータ依存関係を表
すデータ依存グラフを作成するデータ依存グラフ作成手
段を備え、 前記スケジュール候補命令抽出手段は、前記データ依存
グラフに基づいてスケジュール可能状態にある機械語命
令を抽出することを特徴とする請求項1記載の機械語命
令スケジューリング装置。
2. A schedule dependence instruction extraction means, comprising data dependence graph creation means for creating a data dependence graph representing a data dependence relationship between machine language instructions of a machine language instruction sequence generated based on the source program. The machine language instruction scheduling device according to claim 1, wherein the machine language instruction scheduling apparatus extracts a machine language instruction that is in a schedulable state based on the data dependence graph.
JP06475695A 1995-02-28 1995-02-28 Machine instruction scheduling device Expired - Fee Related JP3394353B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP06475695A JP3394353B2 (en) 1995-02-28 1995-02-28 Machine instruction scheduling device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP06475695A JP3394353B2 (en) 1995-02-28 1995-02-28 Machine instruction scheduling device

Publications (2)

Publication Number Publication Date
JPH08234999A JPH08234999A (en) 1996-09-13
JP3394353B2 true JP3394353B2 (en) 2003-04-07

Family

ID=13267344

Family Applications (1)

Application Number Title Priority Date Filing Date
JP06475695A Expired - Fee Related JP3394353B2 (en) 1995-02-28 1995-02-28 Machine instruction scheduling device

Country Status (1)

Country Link
JP (1) JP3394353B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000284970A (en) * 1999-03-29 2000-10-13 Matsushita Electric Ind Co Ltd Program converting device and processor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
M.JOHNSON著,村上訳「スーパースカラ・プロセッサ」(1994−8)日経BP社,p.175〜198

Also Published As

Publication number Publication date
JPH08234999A (en) 1996-09-13

Similar Documents

Publication Publication Date Title
US8230395B1 (en) Memory mapping for single and multi-processing implementations of code generated from a block diagram model
US5881283A (en) Job scheduling analysis method and system using historical job execution data
De Micheli et al. Readings in hardware/software co-design
JP3032031B2 (en) Loop optimization method and apparatus
EP0743599A2 (en) Method of generating code for programmable processor, code generator and application thereof
US6889243B1 (en) Job scheduling analysis method and system using historical job execution data
JP2001202397A (en) Architecture design supporting system for system-on-chip and architecture generating method
JPH1097430A (en) Method and system for inserting assembly code routine into source code routine for optimization
US20120054722A1 (en) Trace generating unit, system, and program of the same
JP5516596B2 (en) Method and apparatus for design space search in high level synthesis
CA2433379A1 (en) Modulo scheduling of multiple instruction chains
EP0847022A2 (en) Method for designing an architectural system
Orr et al. Integrating task duplication in optimal task scheduling with communication delays
Memik et al. A scheduling algorithm for optimization and early planning in high-level synthesis
JP3394353B2 (en) Machine instruction scheduling device
JP3370304B2 (en) High-level synthesis system, high-level synthesis method, and recording medium used for implementing high-level synthesis method
Keßler et al. A dynamic programming approach to optimal integrated code generation
Bergamaschi et al. Scheduling under resource constraints and module assignment
CN115004150A (en) Method and apparatus for predicting and scheduling duplicate instructions in software pipelining loops
JP5229716B2 (en) Behavioral synthesis system, behavioral synthesis method, and behavioral synthesis program
Becker et al. Extending automotive legacy systems with existing end-to-end timing constraints
WO2011090032A1 (en) Parallel processing program generation method, parallel processing program generation program, and parallel processing program generation apparatus
JP5444784B2 (en) Context creation program, compiler apparatus, and context creation method
JP2009169862A (en) Program conversion device, method, program and recording medium
Andrikos et al. Optimal and heuristic scheduling algorithms for asynchronous high-level synthesis

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees