JP2928684B2 - VLIW type arithmetic processing unit - Google Patents

VLIW type arithmetic processing unit

Info

Publication number
JP2928684B2
JP2928684B2 JP15519092A JP15519092A JP2928684B2 JP 2928684 B2 JP2928684 B2 JP 2928684B2 JP 15519092 A JP15519092 A JP 15519092A JP 15519092 A JP15519092 A JP 15519092A JP 2928684 B2 JP2928684 B2 JP 2928684B2
Authority
JP
Japan
Prior art keywords
instruction
executed
field
vliw
execution
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
JP15519092A
Other languages
Japanese (ja)
Other versions
JPH05197547A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP15519092A priority Critical patent/JP2928684B2/en
Publication of JPH05197547A publication Critical patent/JPH05197547A/en
Application granted granted Critical
Publication of JP2928684B2 publication Critical patent/JP2928684B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、ストアドプログラム
型デジタル計算機におけるVLIW(Very Lon
g Instruction Word)型演算処理装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a VLIW (Very Lon) in a stored program digital computer.
g Instruction Word) type arithmetic processing device.

【0002】[0002]

【従来の技術】マイクロプロセサの処理性能は、その動
作周波数、1命令当たりの所要サイクル数CPI(Cy
cles per Instruction)、および
プログラム実行に必要な命令数の3つの要因で決まる。
すなわち、処理性能を上げたければ、動作周波数を上
げ、CPIを下げ、プログラム実行命令数を減らすこと
が必要となる。
2. Description of the Related Art The processing performance of a microprocessor depends on its operating frequency and the required number of cycles per instruction CPI (Cy).
les per Instruction) and the number of instructions required to execute the program.
That is, to increase the processing performance, it is necessary to increase the operating frequency, lower the CPI, and reduce the number of program execution instructions.

【0003】上記3要素のうち、半導体製造技術の進歩
によりマイクロプロセサチップの動作周波数は年々上が
っているが、その時々で入手可能なチップの動作周波数
には上限がある。
[0003] Of the above three factors, the operating frequency of the microprocessor chip has been increasing year by year due to the progress of the semiconductor manufacturing technology, but the operating frequency of the chip available at that time has an upper limit.

【0004】また、マイクロプロセサにはCISC(C
omplexed Instruction Set
Computer)型とRISC(Reduced I
nstruction Set Computer)型
(およびこれらの折衷型)があり、RISCチップなら
CISCチップよりもCPIを小さくできるが、それで
もCPIは1までにしか下がらない。プログラム実行命
令数はプログラマの能力(あるいはコンパイラの性能)
に依存するが、これを減らすにも限界がある。
[0004] The microprocessor has CISC (C
omplexed Instruction Set
Computer and RISC (Reduced I)
There is an NStructure Set Computer (and a compromise between them), where a RISC chip can have a smaller CPI than a CISC chip, but still has a CPI of only one. The number of program execution instructions is the ability of the programmer (or the performance of the compiler)
However, there is a limit in reducing this.

【0005】このような状況を背景として、VLIWア
ーキテクチャとスーパースカラアーキテクチャが生まれ
てきた。これらのアーキテクチャを採用したプロセサで
は、プログラム中から並列に実行できる命令を見つけ
て、複数の処理を並列に実行する。すなわち、複数の命
令を同時にデコードしてそれらを実行ユニットに送り、
同時に処理を行なう。このような並列処理により、CP
Iを1以下に下げることが可能となる。
[0005] Against this background, a VLIW architecture and a superscalar architecture have emerged. A processor employing these architectures finds an instruction that can be executed in parallel from a program and executes a plurality of processes in parallel. That is, it decodes multiple instructions simultaneously and sends them to the execution unit,
Processing is performed simultaneously. By such parallel processing, CP
I can be reduced to 1 or less.

【0006】VLIW型プロセサおよびスーパースカラ
型プロセサは複数のパイプラインを内臓しており、この
パイプラインにより複数の処理を同時に実行できる点で
は同じであるが、両者は以下の点で相違する。 (1)命令ストリームのスケジューリング方法の相違
The VLIW-type processor and the superscalar-type processor have a plurality of built-in pipelines, which are the same in that a plurality of processes can be executed simultaneously by the pipelines, but they are different in the following points. (1) Difference in instruction stream scheduling method

【0007】スーパースカラでは、プロセサの命令デコ
ーダが並列に実行できる命令を見つけ、命令実行段階で
動的にスケジューリングを行なう。このため、並列性の
検出はフェッチした命令からしか行なえない。
In superscalar, an instruction decoder of a processor finds an instruction that can be executed in parallel, and dynamically schedules the instruction at an instruction execution stage. Therefore, the parallelism can be detected only from the fetched instruction.

【0008】これに対し、VLIWでは、コンパイル時
(あるいはアセンブラコーディング時)にプログラムを
スケジューリングする。そのため、スーパースカラに比
べコンパイラ(あるいはプログラマ)の負担は大きくな
るが、VLIWではハードウエア(命令デコーダ)が簡
単になる。 (2)命令フォーマットの相違
On the other hand, in VLIW, a program is scheduled at the time of compilation (or at the time of assembler coding). Therefore, the burden on the compiler (or programmer) is greater than that of a superscalar, but the hardware (instruction decoder) is simplified in VLIW. (2) Difference in instruction format

【0009】一般に、スーパースカラは従来のRISC
プロセサと同じ32ビット長の命令フォーマットを持っ
ている。そのデコーダは、フェッチした命令から並列に
実行できる命令を選び、パイプラインに投入する。32
ビット長の命令フォーマットをサポートするスーパース
カラプロセサでは従来のRISCプロセサの命令フォー
マットをそのまま利用することができ、オブジェクトコ
ードレベルで、既存のRISCとソフトウエアの互換性
を維持できる。
Generally, a superscalar is a conventional RISC.
It has the same 32-bit instruction format as the processor. The decoder selects an instruction that can be executed in parallel from the fetched instruction and inputs it to the pipeline. 32
A superscalar processor that supports a bit-length instruction format can use the instruction format of a conventional RISC processor as it is, and can maintain software compatibility with existing RISC at the object code level.

【0010】これに対し、VLIWは、一般に32ビッ
トよりも長い命令フォーマットを持っており、1命令で
複数の処理を指定することができる。そのため、既存の
RISCとソフトウエア互換性を維持することはできな
いが、スーパースカラよりも高い性能を出すことができ
る。
On the other hand, VLIW generally has an instruction format longer than 32 bits, and one instruction can specify a plurality of processes. For this reason, software compatibility with the existing RISC cannot be maintained, but higher performance can be obtained than with superscalar.

【0011】ところで、パイプライン構造を持つプロセ
サの場合、1つの命令は複数のステージに分けられて実
行される。1つのステージは原則として1クロックで実
行されるため、パイプラインが順調に動作すれば全ての
命令は見かけ上1クロックで実行されることになる。し
かし、実際には様々な原因でパイプラインは乱れプロセ
サの実質的な処理速度は低下する。これらの原因はハザ
ードと呼ばれる。このハザードをハードウエアで検出し
て自動的にパイプラインを遅らせる機構をインターロッ
クという。
In the case of a processor having a pipeline structure, one instruction is executed in a plurality of stages. Since one stage is executed in principle with one clock, all instructions will be apparently executed in one clock if the pipeline operates smoothly. However, in reality, the pipeline is disturbed for various reasons, and the actual processing speed of the processor is reduced. These causes are called hazards. The mechanism that detects this hazard by hardware and automatically delays the pipeline is called an interlock.

【0012】この発明は、スーパースカラではなくVL
IWアーキテクチャに基づく並列処理システムに関する
ものである。とくに、上記インターロックの機能を改良
し、パイプラインの遅れを最小限に押さえ処理の高速化
を図ったVLIW型演算処理装置に関する。
The present invention is not a super scalar but a VL
The present invention relates to a parallel processing system based on the IW architecture. In particular, the present invention relates to a VLIW type arithmetic processing device in which the function of the interlock is improved and the delay of the pipeline is minimized and the processing speed is increased.

【0013】一般に、VLIW型演算処理装置では複数
の演算を指定できる固定長の命令語を実行して行くが、
1つの命令語中に指定された複数の演算は、少なくとも
ソフトウエア(プログラム)からは同時に実行されてい
るように見えることが必要である。
In general, a VLIW type arithmetic processing unit executes a fixed length instruction word capable of designating a plurality of operations.
A plurality of operations specified in one instruction word need to appear to be executed simultaneously from at least software (program).

【0014】VLIW型演算処理装置では、その処理能
力の向上のために浮動小数点演算などもサポートされて
いる。この浮動小数点演算は、種類によっては(例えば
除算では)その処理に数サイクルを要する。
The VLIW type arithmetic processing unit also supports a floating point operation and the like in order to improve the processing capability. This floating-point operation requires several cycles depending on the type (for example, in division).

【0015】ところが、従来のVLIW型演算処理装置
では、同時に実行されるべく指定された1命令中の複数
演算は、ソフトウエアに対しては、あくまで同時に実行
されるように見せなければならない。そのために、同時
に指定された複数演算中に処理時間が長くかかるものが
あった場合、それ以外の演算が先に終了していたとして
も、この長時間演算処理が完了するまでは、演算が終了
した演算器に次の演算処理をさせず、遊ばせていた。
However, in the conventional VLIW type arithmetic processing unit, a plurality of operations in one instruction designated to be executed at the same time must appear to software so as to be executed at the same time. Therefore, if some of the multiple operations specified at the same time take a long processing time, even if the other operations have been completed first, the operation will be completed until this long operation is completed. The operator did not perform the next arithmetic processing, but was allowed to play.

【0016】[0016]

【発明が解決しようとする課題】上述のように、同時に
実行されるべく指定された1命令語中の複数演算はソフ
トウエア上はあくまで同時に実行されていることになっ
ていなければならないために、従来のVLIW型演算処
理装置では、先行する命令語に含まれる演算処理が全て
終了するまでは次の命令語を実行しないようにしてい
る。このため、同時に指定された複数演算中に処理時間
の長くかかるものがあった場合、それが完了するまで
は、他の演算が既に終了していたとしても、演算の終了
している演算器に対して次の命令を実行させずに待たせ
たまま遊ばせることになる。すると並列演算時間が長く
かかり、VLIWアーキテクチャの並列演算処理能力を
十分に活用できない。
As described above, since a plurality of operations in one instruction word designated to be executed at the same time must be executed at the same time in software, In the conventional VLIW type arithmetic processing device, the next instruction word is not executed until all the arithmetic operations included in the preceding instruction word are completed. For this reason, if some of the multiple operations specified at the same time take a long processing time, even if other operations have already been completed, the operation unit that has completed the operation will be On the other hand, the player is allowed to play while waiting without executing the next instruction. Then, the parallel operation time is long, and the parallel operation processing capability of the VLIW architecture cannot be fully utilized.

【0017】この発明は、上記事情に鑑みなされたもの
で、ソフトウエアに対しては演算の実行順序を保証しつ
つ、先行して起動された時間のかかる演算が実行中であ
っても、できるかぎり後続の命令語を並列に実行できる
ようにし、もって並列処理用演算器の稼働率を向上さ
せ、演算処理装置の全体的な処理能力を改善したVLI
W型演算処理装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and it is possible to guarantee the execution order of operations for software, and to execute even a time-consuming operation that has been activated earlier. VLI that enables subsequent instruction words to be executed in parallel as long as possible, thereby improving the operation rate of the processing unit for parallel processing and improving the overall processing capability of the processing unit.
It is an object to provide a W-type arithmetic processing device.

【0018】[0018]

【課題を解決するための手段】この発明のVLIW型演
算処理装置は、複数の命令語を含むVLIWを格納する
命令バッファ(201)と;
According to the present invention, there is provided a VLIW type arithmetic processing unit comprising: an instruction buffer (201) for storing a VLIW including a plurality of instruction words;

【0019】前記VLIWに含まれる命令語数に対応し
た数の複数フィールドからなるパイプラインを有し、こ
れらのパイプラインで前記VLIWに含まれる命令を独
立に実行する演算ユニット(203)と;前記演算ユニ
ットにより実行される各命令語のオペランド(Rj)に
より参照されるハードウエアリソース(200)と;
An operation unit (203) having a pipeline composed of a plurality of fields corresponding to the number of instruction words included in the VLIW, and independently executing the instructions included in the VLIW in these pipelines; A hardware resource (200) referenced by an operand (Rj) of each instruction word executed by the unit;

【0020】前記演算ユニットのあるフィールド(i=
1)で現在実行中の命令(MUL)の実行結果を格納す
るための第1オペランド(R4)と、前記演算ユニット
の各フィールド(i=0〜3)で現在実行しようとする
命令(Add;i=0,2)により参照されるの第2オ
ペランド(R1〜R4)とを比較し、前記第2オペラン
ド(R1〜R4)が前記第1オペランド(R4)と一致
するもの(R4)を含む場合に、一致信号を提供する比
較器(205)と;前記演算ユニットの各フィールド
(i)で命令実行が終了していない場合に、フィールド
毎に未了信号を発生する手段(208)と;
A certain field (i =
1) a first operand (R4) for storing the execution result of the currently executing instruction (MUL), and an instruction (Add;) to be currently executed in each field (i = 0 to 3) of the arithmetic unit. comparing the second operand (R1 to R4) referred to by i = 0, 2), including the one (R4) in which the second operand (R1 to R4) matches the first operand (R4) A comparator (205) for providing a coincidence signal in the case; and a means (208) for generating an incomplete signal for each field when the instruction execution is not completed in each field (i) of the arithmetic unit;

【0021】前記比較器からの前記一致信号と前記発生
手段からの前記未了信号との論理積を前記演算ユニット
の各フィールド(i)毎にとり、何れかのフィールド
(i)が前記論理積に対して真をもたらす場合に命令取
り込み禁止信号を出力し、全てのフィールド(i)が前
記論理積に対して偽をもたらす場合に命令取り込み信号
を出力する論理回路(209,210)と;
The logical product of the coincidence signal from the comparator and the incomplete signal from the generating means is calculated for each field (i) of the arithmetic unit, and one of the fields (i) is added to the logical product. A logic circuit (209, 210) for outputting an instruction fetch inhibit signal when the result of the instruction is true, and outputting an instruction fetch signal when all the fields (i) produce a false result of the logical product;

【0022】前記論理回路が前記命令取り込み信号を出
力するときは前記命令バッファから前記演算ユニットの
前記パイプラインへ前記VLIWに含まれる1以上の命
令語を同時に転送し、前記論理回路が前記命令取り込み
禁止信号を出力するときは前記命令バッファから前記演
算ユニットへの前記VLIWの命令語転送を停止する命
令出力コントローラ(201A)とを具備している。
When the logic circuit outputs the instruction fetch signal, one or more instruction words included in the VLIW are simultaneously transferred from the instruction buffer to the pipeline of the arithmetic unit, and the logic circuit fetches the instruction fetch signal. An instruction output controller (201A) for stopping the transfer of the VLIW instruction word from the instruction buffer to the arithmetic unit when outputting the inhibit signal is provided.

【0023】[0023]

【作用】この発明のVLIW型演算処理装置では、現在
実行しようとしている命令語より先に実行が開始された
命令が実行中であり、その命令の実行結果を格納する予
定のレジスタ番号と現在実行しようとしている命令によ
って読出されるレジスタ番号とを比較する。そして一致
するレジスタ番号がある場合に当該レジスタ番号のレジ
スタの内容がまだ使用不可能であることが認識される
と、現在実行しようとしている命令を待たせる。それ以
外の場合では、処理に複数サイクルかかる命令が実行中
であっても、その命令の実行結果を参照しない後続の命
令は並列実行させて、複数の命令語の処理の高速化を図
る。
In the VLIW type arithmetic processing unit according to the present invention, an instruction whose execution has been started prior to the instruction word to be executed at present is being executed, and a register number for storing an execution result of the instruction and a currently executed instruction number are stored. Compare with the register number read by the instruction about to be performed. If there is a matching register number and it is recognized that the contents of the register of the register number are still unusable, the instruction to be executed is made to wait. In other cases, even if an instruction that requires a plurality of cycles for processing is being executed, a subsequent instruction that does not refer to the execution result of the instruction is executed in parallel to speed up the processing of a plurality of instruction words.

【0024】[0024]

【実施例】図1は、フィールド0〜3それぞれに4つの
32ビット長命令語(ロード、演算、ストア、ジャン
プ)を配した128ビットのVLIWの一例を示す。こ
の演算命令には、加算(ADD)、減算(SUB)、乗
算(MUL)、除算(DIV)、無処理(NOP)等が
含まれる。
FIG. 1 shows an example of a 128-bit VLIW in which four 32-bit instruction words (load, operation, store, and jump) are arranged in fields 0 to 3, respectively. The operation instructions include addition (ADD), subtraction (SUB), multiplication (MUL), division (DIV), and no processing (NOP).

【0025】図2は、この発明が適用されない場合のV
LIW並列演算処理の一例を示す。この例では、フィー
ルド3で除算(R3/R4)を4クロックかけて実行中
にフィールド0〜2の実行ユニットが3クロック分遊ん
でしまっており、フィールド1で乗算(R1*R2)を
2クロックかけて実行中にフィールド0,2,3の実行
ユニットが1クロック分遊んでしまっている。この遊び
があるために、図2で例示する演算処理の完了には、都
合8クロックかかっている。
FIG. 2 shows V when the present invention is not applied.
An example of the LIW parallel operation processing will be described. In this example, while the division (R3 / R4) is performed in field 3 with 4 clocks, the execution units in fields 0 to 2 are idle for 3 clocks, and the multiplication (R1 * R2) is performed in field 1 for 2 clocks. During execution, the execution units in fields 0, 2, and 3 are idle for one clock. Due to this play, it takes eight clocks to complete the arithmetic processing illustrated in FIG.

【0026】図3は、この発明が適用された場合の、図
2に対応するVLIW並列演算処理の一例を示す。この
例では、フィールド3で4クロック除算(R3/R4)
を実行中に、フィールド1で2クロック乗算(R1*R
2)と2度の1クロック減算(R1−R2)を実行し、
フィールド0とフィールド2で2度の1クロック加算
(R1+R2;R3+R4)とタイミング合わせのため
の1クロックNOPを1度実行している。図3(この発
明が適用された場合)に例示する演算処理では、除算・
乗算の処理中にパイプライン中の実行ユニットが遊ぶ
(NOP実行)割合が少ないので、都合5クロックで図
(この発明が適用されない場合)と同等の演算処理を
終了している。図6は、図3で例示したような並列演算
処理がハードウエア中でどのように進行するかを説明す
るフローチャートである。
FIG. 3 is a diagram when the present invention is applied .
2 shows an example of a VLIW parallel operation process corresponding to No. 2 . In this example, 4 clock division (R3 / R4) in field 3
Is performed, two clock multiplications (R1 * R
2) and twice performing one clock subtraction (R1-R2),
In field 0 and field 2, two one-clock additions (R1 + R2; R3 + R4) and one clock NOP for timing adjustment are executed once. Figure 3 (this departure
In the arithmetic processing exemplified in the case where the
During execution of the multiplication, the execution unit in the pipeline has a small playing (NOP execution) ratio, so the arithmetic processing equivalent to that in FIG. 2 (when the present invention is not applied) is completed with five clocks for convenience. FIG. 6 is a flowchart illustrating how the parallel operation processing illustrated in FIG. 3 proceeds in hardware.

【0027】まず、例えば図3の命令語1に対応する図
2の命令語1がハードウエア(並列演算実行ユニット)
にフェッチされたとする(ST100)。このフェッチ
により、フィールド0〜3の4本のパイプラインには命
令語1のADD,SUB,ADD,SUBが一括して
(同期して)投入される。
First, for example, a diagram corresponding to the instruction word 1 in FIG.
Instruction 1 of 2 is hardware (parallel operation execution unit)
(ST100). By this fetch, ADD, SUB, ADD, and SUB of the instruction word 1 are collectively (synchronously) input to the four pipelines of the fields 0 to 3.

【0028】各フィールド0〜3では、投入された命令
(ADD,SUB,ADD,SUB)のオペランド(命
令語が参照するアドレスまたはデータのこと。ここでは
各パイプラインで参照されるレジスタファイルのレジス
タ番号Rj;jは例えば1〜8)が使用可能かどうかチ
ェックされる(ST110〜ST113)。今は演算を
開始し始めたばかりであり、投入された命令(ADD,
SUB,ADD,SUB)が要求する各フィールド0〜
3のオペランド(R1〜R4)は全て使用可能である
(ST114〜ST117,イエス)。
In each of the fields 0 to 3, the operand (address or data referred to by the instruction word of the input instruction (ADD, SUB, ADD, SUB). In this case, the register of the register file referred to by each pipeline) It is checked whether the numbers Rj; j are usable, for example, from 1 to 8) (ST110 to ST113). Now, the operation has just begun, and the input instructions (ADD,
SUB, ADD, SUB) require each field 0
All three operands (R1 to R4) can be used (ST114 to ST117, YES).

【0029】フィールド0〜3のオペランドが全て使用
可能となると(ST120,イエス)、各フィールド0
〜3の演算に必要なハードウエアリソース(レジスタフ
ァイル中で現在使用可能なレジスタ)があるかどうかチ
ェックされる(ST130〜ST133)。今は演算を
開始し始めたばかりであり、ハードウエアのリソースは
全て使用可能である(ST134〜ST137,イエ
ス)。
When all the operands of the fields 0 to 3 become usable (ST120, YES), each field 0
It is checked whether there are any hardware resources (registers currently available in the register file) necessary for the operations (1) to (3) (ST130 to ST133). Now, the operation has just begun, and all hardware resources can be used (ST134 to ST137, YES).

【0030】フィールド0〜3のハードウエアリソース
が全て使用可能となれば(ST140,イエス)、各フ
ィールド0〜3で、投入された命令(ADD,SUB,
ADD,SUB)の処理が同時に開始する(ST150
〜ST153)。以上の処理により、図3の命令語1に
対する処理が1クロックで完了する。
When all the hardware resources of the fields 0 to 3 become available (ST140, YES), the input instructions (ADD, SUB,
ADD, SUB) starts simultaneously (ST150).
To ST153). With the above processing, the processing for the instruction word 1 in FIG. 3 is completed in one clock.

【0031】次に、図3の命令語2に対応する図2の命
令語2がハードウエア(並列演算実行ユニット)にフェ
ッチされる(ST100)。このフェッチにより、フィ
ールド0〜3の4本のパイプラインには命令語2のAD
D,SUB,ADD,DIVが投入される。
Next, the instruction of FIG. 2 corresponding to the instruction word 2 of FIG.
Instruction 2 is fetched into hardware (parallel operation execution unit) (ST100). By this fetch, the AD pipeline of the instruction word 2 is stored in the four pipelines of the fields 0 to 3.
D, SUB, ADD, and DIV are input.

【0032】各フィールド0〜3では、投入された命令
(ADD,SUB,ADD,DIV)のオペランドが使
用可能かどうかチェックされる(ST110〜ST11
3)。命令語1は1クロックで同時処理完了しており、
かつフィールド3の命令DIVが参照するオペランド
(レジスタR8)はまだ未使用なので、投入された命令
(ADD,SUB,ADD,DIV)が要求する各フィ
ールド0〜3のオペランド(R1〜R4,R8)は全て
使用可能である(ST114〜ST117,イエス)。
In each of the fields 0 to 3, it is checked whether or not the operand of the input instruction (ADD, SUB, ADD, DIV) is usable (ST110 to ST11).
3). Instruction word 1 has been completed simultaneously in one clock.
Since the operand (register R8) referenced by the instruction DIV in the field 3 is not yet used, the operands (R1 to R4, R8) of the fields 0 to 3 required by the input instruction (ADD, SUB, ADD, DIV) are required. Can be used (ST114 to ST117, YES).

【0033】フィールド0〜3のオペランドが全て使用
可能となると(ST120,イエス)、各フィールド0
〜3の演算に必要なハードウエアリソースがあるかどう
かチェックされる(ST130〜ST133)。投入さ
れた命令(ADD,SUB,ADD,DIV)が要求す
るハードウエアのリソースはいずれも他の命令により使
用中でないので、全て使用可能である(ST134〜S
T137,イエス)。
When all the operands of the fields 0 to 3 become usable (ST120, Yes), each field 0
It is checked whether there are any hardware resources required for the operations of (1) to (3) (ST130 to ST133). Since none of the hardware resources requested by the input instructions (ADD, SUB, ADD, DIV) are being used by other instructions, they can all be used (ST134 to S134).
T137, yes).

【0034】フィールド0〜3のハードウエアリソース
が全て使用可能となれば(ST140,イエス)、各フ
ィールド0〜3で、投入された命令(ADD,SUB,
ADD,DIV)の処理が同時に開始する(ST150
〜ST153)。以上のようにして、図3の命令語2が
処理される。
When all the hardware resources of the fields 0 to 3 become available (ST140, YES), the input instructions (ADD, SUB,
ADD, DIV) start simultaneously (ST150).
To ST153). As described above, the instruction word 2 in FIG. 3 is processed.

【0035】次に、図3の命令語3に対応する図2の命
令語3がハードウエアにフェッチされる(ST10
0)。このフェッチにより、フィールド0〜2の3本の
パイプラインには命令語3のADD,MUL,ADDが
投入される。(ここで、図3に対応する図2の処理プロ
グラムを生成したコンパイラは、命令語2でフィールド
3に投入した命令DIVが時間のかかる処理であること
を知っていると仮定する。このため、この時点では図2
フィールド3に実質的な処理を行なう新たな命令は投
入されず、NOPが挿入される。このフィールド3のN
OP部分は、図3の処理実行時には無視される。)
Next, the instruction of FIG. 2 corresponding to the instruction word 3 of FIG.
Edict 3 is fetched into hardware (ST10
0). By this fetch, ADD, MUL, and ADD of the instruction word 3 are input to the three pipelines of the fields 0 to 2. ( Here, it is assumed that the compiler that has generated the processing program of FIG. 2 corresponding to FIG . 3 knows that the instruction DIV input to the field 3 with the instruction word 2 is a time-consuming processing . At this point, FIG.
No new instruction for performing a substantial process is input to the field 3 of , and NOP is inserted. N of this field 3
The OP part is ignored when executing the processing of FIG . )

【0036】各フィールド0〜2では、投入された命令
(ADD,MUL,ADD)のオペランドが使用可能か
どうかチェックされる(ST110〜ST113)。こ
こで、フィールド3はまだ命令語2のDIVを処理中で
あり、この命令DIVの処理はフィールド3の2つのA
LU内で行なわれている。このため、フィールド3のオ
ペランド(R3,R4,R8)はまだ塞がっておらず、
使用可能である(ST117,イエス)。また、命令語
2のフィールド0〜2は1クロックで同時処理完了して
いるので、投入された命令(ADD,MUL,ADD)
が要求する各フィールド0〜2のオペランド(R1〜R
4)も全て使用可能である(ST114〜ST116,
イエス)。
In each of the fields 0 to 2, it is checked whether the operands of the input instructions (ADD, MUL, ADD) are usable (ST110 to ST113). Here, the field 3 is still processing the DIV of the instruction word 2, and the processing of the instruction DIV is performed by the two A
It is performed in the LU. Therefore, the operands (R3, R4, R8) of field 3 are not yet closed,
It can be used (ST117, Yes). Further, since the fields 0 to 2 of the instruction word 2 have been simultaneously processed in one clock, the input instruction (ADD, MUL, ADD)
Requires the operands of each of fields 0 to 2 (R1 to R2)
4) can also be used (ST114 to ST116,
Jesus).

【0037】フィールド0〜3のオペランドが全て使用
可能となると(ST120,イエス)、各フィールド0
〜3の演算に必要なハードウエアリソースがあるかどう
かチェックされる(ST130〜ST133)。
When all the operands of the fields 0 to 3 become available (ST120, Yes), each of the fields 0 to 3 becomes available.
It is checked whether there are any hardware resources required for the operations of (1) to (3) (ST130 to ST133).

【0038】この場合、フィールド1で処理中の命令M
ULはリソース(レジスタR4)を使っており、このリ
ソース(レジスタR4)をフィールド2の命令ADDが
参照しているため、フィールド2の演算に必要なハード
ウエアリソースはない(ST136,ノー)。そこで、
このリソース(レジスタR4)が空くまで(つまりフィ
ールド1の命令MULの実行が終わるまで)、フィール
ド2は何もしない命令NOPを挟んで待つ(ST13
2,ST136のループ)。
In this case, the instruction M being processed in field 1
The UL uses a resource (register R4), and since the instruction ADD of field 2 refers to this resource (register R4), there is no hardware resource required for the operation of field 2 (ST136, NO). Therefore,
Until this resource (register R4) becomes empty (that is, until the execution of the instruction MUL in field 1 is completed), field 2 waits for an instruction NOP that does nothing (ST13).
2, loop of ST136).

【0039】このとき、フィールド2の命令ADDはフ
ィールド0の命令ADDが使うリソース(レジスタR
3)も参照している。このため、フィールド1の命令M
ULの実行が終わるまでフィールド2が命令NOP(1
クロック)を実行して待っている間、フィールド0も命
令NOP(1クロック)を実行して待つ(ST130,
ST134のループ)。
At this time, the instruction ADD in the field 2 is a resource (register R) used by the instruction ADD in the field 0.
See also 3). Therefore, the instruction M in the field 1
Until the execution of the UL is completed, the field 2 holds the instruction NOP (1
Clock), the field 0 also executes the instruction NOP (1 clock) and waits (ST130,
ST134 loop).

【0040】フィールド0、2に命令NOPを挟むこと
によりフィールド0〜3のハードウエアリソースが全て
使用可能となり(ST140,イエス)、各フィールド
0〜3で、投入された命令(ADD,MUL,ADD)
および実行中の命令(DIV)の並列処理が、2クロッ
クかけて同時進行する(ST150〜ST153)。以
上のようにして、図3の命令語3が処理される。
By placing the instruction NOP in the fields 0 and 2, all the hardware resources in the fields 0 to 3 can be used (ST140, Yes), and the input instructions (ADD, MUL, ADD) )
In addition, the parallel processing of the instruction (DIV) being executed proceeds simultaneously over two clocks (ST150 to ST153). As described above, the instruction word 3 in FIG. 3 is processed.

【0041】次に、図3の命令語4に対応する図2の命
令語4がハードウエアにフェッチされる(ST10
0)。このフェッチにより、フィールド0〜2の3本の
パイプラインには命令語4のADD,SUB,ADDが
投入される。(ここで、図3に対応する図2の処理プロ
グラムを生成したコンパイラは、命令語2でフィールド
3に投入した命令DIVが時間のかかる処理であること
を知っていると仮定する。このため、ここでも図2の
ィールド3に実質的な処理を行なう新たな命令は投入さ
ず、NOPが挿入される。このフィールド3のNOP
部分は、図3の処理実行時には無視される。
Next, the instruction of FIG. 2 corresponding to the instruction word 4 of FIG.
The edict 4 is fetched into the hardware (ST10).
0). By this fetch, ADD, SUB, and ADD of the instruction word 4 are input to the three pipelines of the fields 0 to 2. ( Here, it is assumed that the compiler that has generated the processing program of FIG. 2 corresponding to FIG . 3 knows that the instruction DIV input to the field 3 with the instruction word 2 is a time-consuming processing . Also in this case, a new instruction for performing substantial processing is not input to the field 3 of Fig. 2 and a NOP is inserted.
The part is ignored when the processing of FIG. 3 is executed. )

【0042】各フィールド0〜2では、投入された命令
(ADD,SUB,ADD)のオペランドが使用可能か
どうかチェックされる(ST110〜ST113)。命
令語3のフィールド0〜2は2クロックで同時処理完了
しているので、投入された命令(ADD,SUB,AD
D)が要求する各フィールド0〜2のオペランド(R1
〜R4)は全て使用可能である(ST114〜ST11
6,イエス)。また、フィールド3はまだ命令語2のD
IVをフィールド3のALUで処理中であり、この命令
DIVに対するオペランド(R3,R4,R8)は使用
可能である(ST117,イエス)。
In each of the fields 0 to 2, it is checked whether the operands of the input instruction (ADD, SUB, ADD) are usable (ST110 to ST113). Since the fields 0 to 2 of the instruction word 3 have been simultaneously processed in two clocks, the input instruction (ADD, SUB, AD
D) requires the operands (R1
To R4) can all be used (ST114 to ST11).
6, yes). In addition, field 3 still has D of instruction word 2
The IV is being processed by the ALU in the field 3, and the operands (R3, R4, R8) for this instruction DIV can be used (ST117, YES).

【0043】フィールド0〜3のオペランドが全て使用
可能となると(ST120,イエス)、各フィールド0
〜3の演算に必要なハードウエアリソースがあるかどう
かチェックされる(ST130〜ST133)。投入さ
れた命令(ADD,SUB,ADD)および実行中の命
令(DIV)が要求するハードウエアのリソースは塞が
っていないので、全て使用可能である(ST134〜S
T137,イエス)。
When all of the operands in fields 0 to 3 become available (ST120, Yes), each
It is checked whether there are any hardware resources required for the operations of (1) to (3) (ST130 to ST133). Since the hardware resources required by the input instruction (ADD, SUB, ADD) and the instruction being executed (DIV) are not blocked, all of them can be used (ST134 to S134).
T137, yes).

【0044】フィールド0〜3のハードウエアリソース
が全て使用可能となれば(ST140,イエス)、各フ
ィールド0〜3で、投入された命令(ADD,SUB,
ADD)および実行中の命令(DIV)の並列処理が同
時進行する(ST150〜ST153)。以上のように
して、図3の命令語4が処理される。
When all the hardware resources in the fields 0 to 3 become available (ST140, Yes), the input instructions (ADD, SUB,
ADD) and the parallel processing of the instruction being executed (DIV) proceed simultaneously (ST150 to ST153). As described above, the instruction word 4 in FIG. 3 is processed.

【0045】図7は、この発明の一実施例に係るVLI
W並列演算処理装置の構成を説明するブロック図であ
る。この実施例装置は、レジスタファイル200と、命
令バッファ部201と、演算ユニット203と、レジス
タ比較回路205と、演算指定デコーダ206と、オア
回路207と、アンド回路209と、オア回路210と
を備えている。
FIG. 7 shows a VLI according to an embodiment of the present invention.
FIG. 2 is a block diagram illustrating a configuration of a W parallel processing device. This embodiment includes a register file 200, an instruction buffer unit 201, an operation unit 203, a register comparison circuit 205, an operation designation decoder 206, an OR circuit 207, an AND circuit 209, and an OR circuit 210. ing.

【0046】命令バッファ部201は、図1に示すよう
な複数演算を包含する命令語群からなるVLIWを格納
する。命令バッファ部201は、後述する信号211に
よって命令バッファ201B内のVLIWを出力する命
令出力コントローラ201Aと、命令バッファ201B
内の命令の次に実行される命令を格納するバッファ20
1Cを含んでいる。
The instruction buffer unit 201 stores a VLIW composed of an instruction word group including a plurality of operations as shown in FIG. The instruction buffer unit 201 includes an instruction output controller 201A that outputs a VLIW in the instruction buffer 201B according to a signal 211 described later, and an instruction buffer 201B.
20 for storing the instruction to be executed next to the instruction in
1C.

【0047】命令バッファ部201に格納されたVLI
Wは、信号線202Aを介して演算ユニット203に転
送される。演算ユニット203は、転送されたVLIW
に含まれる複数演算を、レジスタファイル200を用い
て、4本のパイプライン(フィールド0〜3)により並
列処理する。この処理のために、これらのパイプライン
はそれぞれ独自の演算器(ALU)を複数台(例えば2
台)備えている。
VLI stored in instruction buffer unit 201
W is transferred to the arithmetic unit 203 via the signal line 202A. The arithmetic unit 203 receives the transferred VLIW
Are processed in parallel by four pipelines (fields 0 to 3) using the register file 200. For this processing, these pipelines each have a plurality of independent arithmetic units (ALUs) (for example, 2 units).
Table).

【0048】演算ユニット203で現在実行中の演算の
結果が格納されるところのレジスタファイル200のレ
ジスタ番号Rj(jは例えば1〜8)は、信号線204
i(i=0,1,2,3)を介して、レジスタ比較回路
205に与えられる。このレジスタ比較回路205に
は、信号線202Bを介して、次に実行しようとするV
LIWによって参照されるレジスタ番号も与えられる。
レジスタ比較回路205は、前者のレジスタ番号と後者
のレジスタ番号をと比較し、両者が一致するかどうかを
調べる。
The register number Rj (j is, for example, 1 to 8) of the register file 200 in which the result of the operation currently being executed by the operation unit 203 is stored is indicated by a signal line 204.
It is given to the register comparison circuit 205 via i (i = 0, 1, 2, 3). The register comparison circuit 205 supplies, via the signal line 202B, the V
The register number referenced by the LIW is also provided.
The register comparison circuit 205 compares the former register number with the latter register number, and checks whether or not they match.

【0049】すなわち、レジスタ比較回路205は4つ
の比較ブロック0〜3により構成され、これらのブロッ
ク0〜3は演算ユニット203のフィールド0〜3にそ
れぞれ対応している。各ブロックi(i=0〜3)で
は、そのフィールドiで現在実行中の演算の結果が格納
されるレジスタ番号Rj(j=1〜8)と、次の命令語
によって参照される全てのレジスタ番号との一致が調べ
られる。
That is, the register comparison circuit 205 is composed of four comparison blocks 0 to 3, and these blocks 0 to 3 correspond to the fields 0 to 3 of the arithmetic unit 203, respectively. In each block i (i = 0 to 3), the register number Rj (j = 1 to 8) in which the result of the operation currently being executed is stored in the field i, and all the registers referenced by the next instruction word The match with the number is checked.

【0050】演算指定デコーダ206には、命令バッフ
ァ202Bから、信号線202Bを介して、次に実行し
ようとしている命令語が与えられる。デコーダ206は
与えられた命令語から、NOP以外の演算が指定されて
いるフィールドiを検出する。そのようなフィールドi
が検出されたなら、デコーダ206はこのフィールドi
の演算器が空くまで次の命令語の実行を待たせる信号2
06iを出力する。
The instruction word to be executed next is supplied to the operation designation decoder 206 from the instruction buffer 202B via the signal line 202B. The decoder 206 detects a field i in which an operation other than NOP is specified, from a given instruction word. Such a field i
Is detected, the decoder 206 sets this field i
Signal 2 that causes the execution of the next instruction word to wait until the arithmetic unit becomes empty
06i is output.

【0051】オア回路207は、レジスタ比較回路20
5の各ブロックiごとの出力205iと演算指定デコー
ダ206の各フィールドiごとの出力206iとの論理
和を取る。またアンド回路209は、オア回路207の
各ORゲートiごとの出力207iと信号208iとの
論理和を取る。信号208iは、演算ユニット203の
各フィールドiから取り出されるもので、各フィールド
iごとに現在実行中の演算がまだ完了していないことを
示す。
The OR circuit 207 includes the register comparing circuit 20
The logical sum of the output 205i for each block i and the output 206i for each field i of the operation designation decoder 206 is calculated. The AND circuit 209 calculates the logical sum of the output 207i of each OR gate i of the OR circuit 207 and the signal 208i. The signal 208i is extracted from each field i of the arithmetic unit 203, and indicates that the operation currently being executed has not been completed for each field i.

【0052】アンド回路209の各ANDゲートiごと
の出力209iはオア回路210に入力される。オア回
路210の出力は、信号線211を介して、命令出力コ
ントローラ201Aに送られる。
The output 209 i of each AND gate i of the AND circuit 209 is input to the OR circuit 210. The output of the OR circuit 210 is sent to the command output controller 201A via the signal line 211.

【0053】次に、図8および図9を参照して、上記構
成のVLIW型演算処理装置の動作を説明する。(この
動作はマイクロプログラムではなくハードウエアロジッ
クにより実行される。)
Next, the operation of the VLIW type arithmetic processing unit having the above configuration will be described with reference to FIGS. (This operation is performed not by a microprogram but by hardware logic.)

【0054】この実施例のVLIW型演算処理装置は、
次のような特徴を持つ。すなわち、原則として複数命令
語の並列処理を可とするが、現在実行中の命令語の演算
結果が格納されるレジスタファイル200のレジスタ番
号(オペランド)と、次に実行しようとしている命令語
によって参照されるレジスタ番号(オペランド)とが一
致し、かつ一致したレジスタ番号のレジスタへ結果を格
納する演算がまだ完了していない場合に、命令バッファ
部201から演算ユニット203への命令フェッチを待
たせることに特徴を持つ。
The VLIW type arithmetic processing unit of this embodiment is
It has the following features. That is, parallel processing of a plurality of instruction words is permitted in principle, but reference is made by the register number (operand) of the register file 200 in which the operation result of the currently executed instruction word is stored and the instruction word to be executed next. The instruction buffer unit 201 waits for the instruction fetch from the instruction unit 203 when the register number (operand) to be matched matches and the operation for storing the result in the register with the matched register number has not been completed yet. It has features.

【0055】そこで、命令バッファ部201から信号線
202Aを介して1つのVLIWが演算ユニット203
にフェッチされ(ST10)演算処理がなされると、演
算ユニット203のフィールドiで現在実行中の演算結
果が格納されるレジスタ番号(Rj)が信号線204i
から取り出され、次に実行しようとしているVLIWに
含まれる全ての命令語によって参照されるレジスタ番号
が命令バッファ201Bの信号線202Bから取り出さ
れる。信号線204iおよび信号線202Bから取り出
されたレジスタ番号は、比較回路205において、一致
するかどうかチェックされる。
Therefore, one VLIW is transferred from the instruction buffer unit 201 to the arithmetic unit 203 via the signal line 202A.
(ST10) and the arithmetic processing is performed, the register number (Rj) in which the operation result currently being executed is stored in the field i of the arithmetic unit 203 is indicated by a signal line 204i.
And the register numbers referenced by all the instruction words included in the VLIW to be executed next are extracted from the signal line 202B of the instruction buffer 201B. The comparison circuit 205 checks whether or not the register numbers extracted from the signal lines 204i and 202B match.

【0056】比較回路205の4ブロック0〜3各々は
演算ユニット203のフィールド0〜3に対応してお
り、1つのブロックiではそのフィールドiで現在実行
中の演算結果が格納されるレジスタ番号と次のVLIW
内の命令語によって参照される全てのレジスタ番号との
一致が調べられる。一致があれば(ST14,イエス)
比較回路205の出力205iは″1″となり(ST1
6)、不一致ならば(ST14,ノー)出力205i
は″0″となる(ST18)。
Each of the four blocks 0 to 3 of the comparison circuit 205 corresponds to the fields 0 to 3 of the operation unit 203. In one block i, the register number in which the operation result currently being executed is stored in the field i is Next VLIW
Is checked for a match with all register numbers referred to by the instruction word in. If there is a match (ST14, yes)
The output 205i of the comparison circuit 205 becomes "1" (ST1
6) If they do not match (ST14, NO), output 205i
Becomes "0" (ST18).

【0057】比較回路205からの一致出力205iは
オア回路207の各ORゲート0〜3の一方に入力され
る。各ORゲート0〜3の他方には、演算指定デコーダ
206からの出力206iが入力される。
The coincidence output 205i from the comparison circuit 205 is input to one of the OR gates 0 to 3 of the OR circuit 207. The output 206i from the operation designation decoder 206 is input to the other of the OR gates 0 to 3.

【0058】演算指定デコーダ206は、次に実行しよ
うとしている命令語中で、NOPおよびこの演算が指定
されているフィールドiを検出する(ST20)。フィ
ールドiでNOPが検出されると(ST22,イエ
ス)、そのフィールドiに対応するORゲートにロジッ
ク″0″の出力206iが与えられる(ST24)。N
OPが検出されなければ(ST22,ノー)、出力20
6iは″1″となる(ST26)。
The operation designation decoder 206 detects the NOP and the field i in which the operation is designated in the next instruction word to be executed (ST20). When NOP is detected in the field i (ST22, YES), an output 206i of logic "0" is given to the OR gate corresponding to the field i (ST24). N
If the OP is not detected (ST22, No), the output 20
6i becomes "1" (ST26).

【0059】出力205iおよび出力206iの何れか
が″1″であれば(ST28,イエス)、オア回路20
7の各ORゲート0〜3の出力207iは″1″となる
(ST30)。出力207iが″1″というのは、「次
に実行しようとする命令語が、フィールドi用のハード
ウエアリソースを使用する」か、あるいは「次に実行し
ようとする命令語が、フィールドiで現在実行中の演算
結果を参照する」ということを意味する。この出力20
7iはアンド回路209の対応するANDゲートの一方
入力に与えられる。
If either the output 205i or the output 206i is "1" (ST28, YES), the OR circuit 20
7, the output 207i of each of the OR gates 0 to 3 becomes "1" (ST30). The output 207i is "1" because "the instruction to be executed next uses the hardware resources for the field i" or "the instruction to be executed next is the current instruction in the field i. Refer to the result of the operation being executed. " This output 20
7i is applied to one input of a corresponding AND gate of AND circuit 209.

【0060】一方、フィールドiで現在実行中の演算が
その処理サイクル中でまだ終了していないなら(ST3
2,イエス)、未終了のフィールドiの出力208i
が″1″となる(ST34)。この出力208iはアン
ド回路209の対応するANDゲートの他方入力に与え
られる。
On the other hand, if the operation currently being executed in field i is not completed in the processing cycle (ST3)
2, yes), output 208i of unfinished field i
Becomes "1" (ST34). This output 208i is provided to the other input of the corresponding AND gate of AND circuit 209.

【0061】フィールドiについての出力207iおよ
び出力208iがともに″1″であれば(ST36,イ
エス)、このフィールドiに対応するアンド回路209
のANDゲートの出力209iは″1″となる(ST3
8)。この出力209iが″1″というのは、「フィー
ルドiで現在実行中の演算が終了するのを待て」という
ことを意味する。
If the output 207i and the output 208i for the field i are both "1" (ST36, YES), the AND circuit 209 corresponding to the field i
Of the AND gate 209i becomes "1" (ST3).
8). The fact that the output 209i is "1" means "waiting for the currently executed operation to be completed in the field i".

【0062】アンド回路209の何れかのANDゲート
0〜3の出力209iが真(ロジック″1″)であれば
(ST40,イエス)、オア回路210の出力は真(ロ
ジック″1″)となる(ST42)。すると、信号線2
11を介して命令バッファ部201の出力コントローラ
201Aに待ち信号(ロジック″1″)が伝達され、命
令バッファ部201は演算ユニット203へのVLIW
の一括転送を停止する。
If the output 209i of any of the AND gates 0 to 3 of the AND circuit 209 is true (logic "1") (ST40, YES), the output of the OR circuit 210 becomes true (logic "1"). (ST42). Then, signal line 2
11, a wait signal (logic “1”) is transmitted to the output controller 201A of the instruction buffer unit 201, and the instruction buffer unit 201 sends a VLIW signal to the arithmetic unit 203.
Stop batch transfer of.

【0063】フィールド0〜3全ての演算が完了すると
出力208iは全て″0″になる(ST44,イエ
ス)。するとオア回路207の出力207iに関係なく
アンド回路209の出力209iは全て″0″になるか
ら、信号線211の出力も″0″になる(ST46)。
すると命令出力コントローラ201Aでの命令転送禁止
が解除され、バッファ201B内の次のVLIWが演算
ユニット203にフェッチされる(ST48)。
When all the operations of the fields 0 to 3 are completed, the outputs 208i all become "0" (ST44, YES). Then, regardless of the output 207i of the OR circuit 207, all the outputs 209i of the AND circuit 209 become "0", so that the output of the signal line 211 also becomes "0" (ST46).
Then, the instruction transfer prohibition in the instruction output controller 201A is released, and the next VLIW in the buffer 201B is fetched by the arithmetic unit 203 (ST48).

【0064】このようにして、図2に示すような命令語
1〜4が命令バッファ部201に格納されていてこれら
の命令語を順次実行しようとする場合を想定すると、上
記実施例のVLIW型演算処理装置では次の処理が実現
される。
In this way, assuming that the instruction words 1 to 4 as shown in FIG. 2 are stored in the instruction buffer unit 201 and these instruction words are to be executed sequentially, the VLIW type of the above embodiment is assumed. The following processing is realized in the arithmetic processing device.

【0065】すなわち、命令語2と命令語3と命令語4
における演算器の参照関係についてコンパイラレベルで
考察すれば、命令語2では2つの加算と1つの減算と1
つの除算との4演算を行ない、その演算結果をレジスタ
R1,R3,R4,R8に格納するようにしている。こ
のうち、R1,R3,R4は命令語3で読出されるが、
R8は命令語3、命令語4とも参照しない。このR8の
中味は除算結果なので、処理に4クロックかかるのでは
あるが、命令語3と命令語4は必ずしもこの除算の完了
を待ち合わせる必要はない。
That is, the instruction word 2, the instruction word 3, and the instruction word 4
Considering the reference relations of the arithmetic units at the compiler level, in the instruction word 2, two additions, one subtraction and one
Four operations of two divisions are performed, and the operation results are stored in registers R1, R3, R4, and R8. Of these, R1, R3, and R4 are read by instruction word 3,
R8 does not refer to instruction 3 or instruction 4. Since the contents of R8 are the result of the division, it takes four clocks for the processing, but the instruction words 3 and 4 do not necessarily have to wait for the completion of the division.

【0066】命令語3は、2つの加算と1つの乗算の計
3つの演算を実行して、R1,R3,R4に結果を格納
する。これらのR1,R3,R4は命令語4で読出され
るのであるが、とくに乗算の結果が格納されるR4は命
令語4で参照される。このため、命令語4は、命令語3
の直後の命令であるが、命令語3の乗算の完了を待ち合
わせる必要がある。
Instruction 3 executes a total of three operations of two additions and one multiplication, and stores the results in R1, R3, and R4. These R1, R3, and R4 are read out by the instruction word 4. In particular, R4 in which the result of the multiplication is stored is referred to by the instruction word 4. Therefore, the instruction word 4 is replaced with the instruction word 3
However, it is necessary to wait for completion of the multiplication of the instruction word 3.

【0067】したがって、図2に示す命令語1〜4を順
次処理する場合には、図3に示すように、命令語2の除
算を実行している最中に命令語3と命令語4を実行する
ことができる。ただし、命令語4は命令語3の乗算結果
を参照しているので、命令語3の乗算結果が出るのを待
ってから命令語4を実行することになる。この場合、命
令語3と命令語4の実行時間は合わせて3クロック分と
なるが、これは命令語2の除算と並行して実行されるの
で、命令語2の完了と命令語4の完了は同時になる。
Therefore, when the instruction words 1 to 4 shown in FIG. 2 are sequentially processed, as shown in FIG. 3, the instruction words 3 and 4 are executed while the division of the instruction word 2 is being executed. Can be performed. However, since the instruction 4 refers to the result of the multiplication of the instruction 3, the instruction 4 is executed after waiting for the result of the multiplication of the instruction 3. In this case, the execution time of the instruction word 3 and the execution time of the instruction word 4 are 3 clocks in total, but this is executed in parallel with the division of the instruction word 2, so that the completion of the instruction word 2 and the completion of the instruction word 4 are completed. Will be at the same time.

【0068】こうして、図2に示すような命令語1〜4
を実行する場合、図3に示すような処理内容と時間経過
となる。すなわち、図3では、各命令語1〜4の処理時
間の総和(所要クロック数)は、図2の場合の8クロッ
クと比べて3クロック少ない5クロックとなる。
Thus, the instruction words 1 to 4 as shown in FIG.
Is executed, the processing content and time elapse as shown in FIG. That is, in FIG. 3, the total processing time (the required number of clocks) of each of the instruction words 1 to 4 is 5 clocks, which is 3 clocks smaller than 8 clocks in the case of FIG. 2.

【0069】また、図4に示す命令語1〜4を順次処理
する場合には、図5に示すような処理内容と時間経過と
なる。図2の場合では命令語4のフィールド3はNOP
であるのに対して、図4に示す命令語4のフィールド3
は加算を指定している。その他については、図2の命令
語の内容と図4の命令語の内容とは同じである。上記命
令語3のフィールド3における内容の違いが処理にどう
影響するかについて、以下説明する。
When the instruction words 1 to 4 shown in FIG. 4 are sequentially processed, the processing contents and time elapse as shown in FIG. In the case of FIG. 2, the field 3 of the instruction word 4 is NOP
Whereas field 3 of instruction word 4 shown in FIG.
Specifies addition. In other respects, the contents of the instruction word in FIG. 2 and the contents of the instruction word in FIG. 4 are the same. How the difference in the content of the instruction word 3 in the field 3 affects the processing will be described below.

【0070】演算ユニット203では、各フィールド0
〜3において、加算・減算・乗算・除算・NOPの何れ
かの演算を行なうことができるが、同時には1種類の演
算しか処理できない。そうであれば、図4の命令語4
は、命令語2のフィールド3の除算が完了するまでは実
行できないことになる。このため、先行する演算を実行
中の演算器を後続する命令が使用しようとする場合に
は、先行演算が完了するまで後続の演算を待たせる制御
が必要がある。すなわち、図4の命令語4の実行は命令
語2の除算が完了した後に開始されるべきである。この
ような制御を基に図4に示す命令語1〜4が順次処理さ
れると、図5に示すようになり、命令語1から命令語4
までの全実行時間は6クロックとなる。
In the arithmetic unit 203, each field 0
In ~ 3, any one of addition, subtraction, multiplication, division, and NOP can be performed, but only one type of operation can be processed at the same time. If so, the instruction word 4 in FIG.
Cannot be executed until the division of the field 3 of the instruction word 2 is completed. Therefore, when a subsequent instruction intends to use a computing unit that is executing a preceding operation, it is necessary to control the subsequent operation to wait until the preceding operation is completed. That is, the execution of the instruction 4 in FIG. 4 should be started after the division of the instruction 2 is completed. When the instruction words 1 to 4 shown in FIG. 4 are sequentially processed based on such control, the result is as shown in FIG.
The total execution time up to is 6 clocks.

【0071】なお、演算ユニット203の各フィールド
0〜3において同時に異なった種類の演算が実行できる
ような構成であれば、図4の命令語4は命令語2の除算
と並行して処理できるので、図4の命令列の全実行時間
は5クロックで済むことになる。
Note that if the configuration is such that different types of operations can be executed simultaneously in each of the fields 0 to 3 of the operation unit 203, the instruction 4 in FIG. 4 can be processed in parallel with the division of the instruction 2. 4 requires only five clocks.

【0072】以上のように、この発明の実施例でば、先
行する演算が実行中のために内容未確定のレジスタを後
続命令語が参照しようとする場合と、まだ演算実行中の
演算器を使用しようとする場合には、演算が完了して結
果が確定するまで後続命令語の実行を待たせる制御を導
入しているが、これらの場合以外では、先行する命令語
の演算が実行中であっても、原則としてその演算の完了
を待たずに後続命令語が実行できるようにして、並列処
理能力を向上させている。
As described above, according to the embodiment of the present invention, the case where the preceding instruction is trying to refer to a register whose content is undetermined because the preceding operation is being executed, and the case where the operation unit still executing the operation is When trying to use it, a control is introduced to wait for the execution of the subsequent instruction until the operation is completed and the result is determined. In other cases, however, the operation of the preceding instruction is being executed. Even if there is, in principle, the subsequent instruction word can be executed without waiting for the completion of the operation, thereby improving the parallel processing capability.

【0073】図10は、この発明の他実施例に係るVL
IW並列演算処理装置を示す。図10の実施例は、図7
の実施例から、次に実行されるVLIW中からNOP命
令を検出する構成(演算指定デコーダ206)を省略し
たものとなっている。
FIG. 10 shows a VL according to another embodiment of the present invention.
1 shows an IW parallel processing device. The embodiment of FIG.
In this embodiment, the configuration for detecting the NOP instruction from the next executed VLIW (the operation designation decoder 206) is omitted.

【0074】図10の構成では、VLIWによるオペラ
ンドの参照関係をコンパイラレベルで考慮して、以下の
制御を行なうことで、フィールド0〜3における処理の
並列性を確保している。
In the configuration shown in FIG. 10, the parallelism of the processing in the fields 0 to 3 is ensured by performing the following control in consideration of the reference relation of the operand by the VLIW at the compiler level.

【0075】すなわち、ある命令語により参照されるオ
ペランド(レジスタ番号)に演算結果を格納しようとす
るところの、先行起動された演算(例えば乗算)がまだ
完了していない場合は、その完了を待ち、そうでない場
合は、まだ処理途中の先行起動演算(例えば除算)があ
っても、この処理途中の演算と並行して後続命令を実行
できるような制御を行なう。
That is, if the operation (for example, multiplication) which is to be started before the operation result is to be stored in the operand (register number) referred to by a certain instruction word is not completed, the operation waits for the completion. Otherwise, even if there is a preceding activation operation (for example, division) still in the process, control is performed so that the subsequent instruction can be executed in parallel with the operation in the middle of the process.

【0076】これにより、例えば図3において、フィー
ルド3で除算処理途中にその他の演算処理をフィールド
0〜2で並列に実行できる。換言すると、VLIWのオ
ペランドフェッチステージでは全てのフィールドに対し
て命令語を同期して一括投入するが、それらの命令語の
実行ステージではフィールド毎に独立した並列処理を行
なうことにより、各フィールドの演算手段(ALU等)
の遊びを極力減らす制御が行なわれる。
Thus, for example, in FIG. 3, other arithmetic processing can be executed in parallel in fields 0 to 2 during division processing in field 3. In other words, in the operand fetch stage of the VLIW, instructions are synchronously and collectively input to all fields, but in the execution stage of those instructions, independent processing is performed for each field so that the operation of each field is performed. Means (ALU, etc.)
The control for minimizing the play of the vehicle is performed.

【0077】[0077]

【発明の効果】以上述べたように、この発明では、先行
する命令語の演算結果を格納しようとするレジスタ番号
が後続の命令語の演算で参照されない場合(または先行
命令語演算のために使用中の演算器が後続命令語演算に
よって使用されない場合)、先行する命令語の演算完了
を待たずに後続命令語の並列実行を行なうよう構成した
ので、並列処理効率が高く、全体として演算処理の高速
化が図れる。
As described above, according to the present invention, when the register number for storing the operation result of the preceding instruction word is not referred to in the operation of the following instruction word (or used for the operation of the preceding instruction word). In the case where the middle arithmetic unit is not used by the subsequent instruction word operation), the subsequent instruction word is configured to be executed in parallel without waiting for the completion of the operation of the preceding instruction word, so that the parallel processing efficiency is high, and Higher speed can be achieved.

【0078】さらに、上記構成において、処理に時間の
かかる演算の結果を参照する他の演算の命令語が、前者
の演算の命令語から極力離れるようなコードを生成する
コンパイラを用意すれば、この発明の装置の処理能力を
さらに改善することができる。
Further, in the above configuration, if a compiler is provided which generates a code such that the instruction word of another operation referring to the result of the operation requiring a long time for processing is as far as possible from the instruction word of the former operation, The throughput of the device of the invention can be further improved.

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

【図1】図1は、VLIW命令の一例を示す図。FIG. 1 is a diagram illustrating an example of a VLIW instruction;

【図2】図2は、この発明が適用されない場合のVLI
W並列演算処理の一例を説明する図。
FIG. 2 shows a VLI when the present invention is not applied;
The figure explaining an example of W parallel operation processing.

【図3】図3は、この発明が適用された場合のVLIW
並列演算処理の一例を説明する図。
FIG. 3 is a diagram illustrating a VLIW when the present invention is applied;
FIG. 9 illustrates an example of a parallel operation process.

【図4】図4は、この発明が適用されない場合のVLI
W並列演算処理の他例を説明する図。
FIG. 4 is a diagram showing a VLI when the present invention is not applied;
The figure explaining the other example of W parallel operation processing.

【図5】図5は、この発明が適用された場合のVLIW
並列演算処理の他例を説明する図。
FIG. 5 is a diagram showing a VLIW when the present invention is applied;
The figure explaining the other example of a parallel operation process.

【図6】図6は、この発明のVLIW並列演算の処理の
流れを例示するフローチャート。
FIG. 6 is a flowchart illustrating the flow of a VLIW parallel operation process according to the present invention;

【図7】図7は、この発明の一実施例に係るVLIW並
列演算処理装置の構成を説明するブロック図。
FIG. 7 is a block diagram illustrating a configuration of a VLIW parallel processing device according to an embodiment of the present invention.

【図8】図8は、図7の装置によるVLIW並列演算処
理の動作を説明するフローチャートの一部。
FIG. 8 is a part of a flowchart for explaining the operation of the VLIW parallel operation processing by the apparatus of FIG. 7;

【図9】図9は、図7の装置によるVLIW並列演算処
理の動作を説明するフローチャートの他部。
FIG. 9 is another part of the flowchart for explaining the operation of the VLIW parallel operation processing by the apparatus of FIG. 7;

【図10】図7は、この発明の他実施例に係るVLIW
並列演算処理装置の構成を示すブロック図。
FIG. 7 is a VLIW according to another embodiment of the present invention.
FIG. 2 is a block diagram illustrating a configuration of a parallel operation processing device.

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

200…レジスタファイル(ハードウエアリソース)、
201…命令バッファ部(格納手段)、201A…命令
出力コントローラ(停止手段)、201B,201C…
命令バッファ、203…演算ユニット(実行手段)、2
05…レジスタ比較回路(提供手段)、206…演算指
定デコーダ(実行手段)、207…OR回路、208…
信号線(発生手段)、209…AND回路(出力手
段)、210…OR回路(出力手段)、205i…一致
信号、208i…未了信号、211…命令取り込み信号
(″0″)/命令取り込み禁止信号(″1″)。
200: register file (hardware resource),
201: instruction buffer unit (storage means), 201A: instruction output controller (stop means), 201B, 201C ...
Instruction buffer, 203: arithmetic unit (execution means), 2
05: register comparison circuit (providing means), 206: operation designation decoder (execution means), 207: OR circuit, 208 ...
Signal lines (generation means), 209 AND circuit (output means), 210 ... OR circuit (output means), 205i ... match signal, 208i ... incomplete signal, 211 ... instruction fetch signal ("0") / instruction fetch inhibition Signal ("1").

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数の命令語を含むVLIWを格納する
格納手段と; 前記VLIWに含まれる命令語数に対応した数の複数フ
ィールドからなるパイプラインを有し、これらのパイプ
ラインで前記VLIWに含まれる命令を独立に実行する
実行手段と; 前記実行手段により実行される各命令語のオペランドに
より参照されるハードウエアリソースと; 前記実行手段のあるフィールドで現在実行中の命令の実
行結果を格納するための第1オペランドと、前記実行手
段の各フィールドで現在実行しようとする命令により参
照される第2オペランドとを比較し、前記第2オペラン
ドが前記第1オペランドと一致するものを含む場合に、
一致信号を提供する提供手段と; 前記実行手段の各フィールドで命令実行が終了していな
い場合に、フィールド毎に未了信号を発生する発生手段
と; 前記提供手段からの前記一致信号と前記発生手段からの
前記未了信号との論理積を前記実行手段の各フィールド
毎にとり、何れかのフィールドが前記論理積に対して真
をもたらす場合に命令取り込み禁止信号を出力し、全て
のフィールドが前記論理積に対して偽をもたらす場合
命令取り込み信号を出力する出力手段と; 前記出力手段が前記命令取り込み信号を出力するときは
前記格納手段から前記実行手段の前記パイプラインへ前
記VLIWに含まれる1以上の命令語を同時に転送し、
前記出力手段が前記命令取り込み禁止信号を出力すると
きは前記格納手段から前記実行手段への前記VLIWの
命令語転送を停止する手段とを具備したことを特徴とす
るVLIW型演算処理装置。
Storage means for storing a VLIW including a plurality of instruction words; and a pipeline comprising a plurality of fields corresponding in number to the number of instruction words included in the VLIW, and being included in the VLIW by these pipelines. Execution means for independently executing instructions to be executed; hardware resources referenced by operands of respective instruction words executed by the execution means; and a field of the execution means for storing an execution result of an instruction currently being executed. Comparing the first operand for execution with the second operand referenced by the instruction currently being executed in each field of the execution means, and if the second operand includes one that matches the first operand,
Providing means for providing a match signal; generating means for generating an incomplete signal for each field when instruction execution is not completed in each field of the execution means; and the match signal from the providing means and the generation ANDing with the incomplete signal from the means for each field of the execution means, and outputting an instruction fetch inhibition signal when any of the fields yields true for the logical AND; Output means for outputting an instruction fetch signal when a false result is obtained for the logical product; and when the output means outputs the instruction fetch signal, the instruction is included in the VLIW from the storage means to the pipeline of the execution means. Simultaneously transfer one or more command words,
Means for stopping transfer of the VLIW instruction word from the storage means to the execution means when the output means outputs the instruction fetch inhibition signal.
JP15519092A 1991-10-31 1992-06-15 VLIW type arithmetic processing unit Expired - Fee Related JP2928684B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15519092A JP2928684B2 (en) 1991-10-31 1992-06-15 VLIW type arithmetic processing unit

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP3-286100 1991-10-31
JP28622491 1991-10-31
JP28610091 1991-10-31
JP3-286224 1991-10-31
JP15519092A JP2928684B2 (en) 1991-10-31 1992-06-15 VLIW type arithmetic processing unit

Publications (2)

Publication Number Publication Date
JPH05197547A JPH05197547A (en) 1993-08-06
JP2928684B2 true JP2928684B2 (en) 1999-08-03

Family

ID=27320789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15519092A Expired - Fee Related JP2928684B2 (en) 1991-10-31 1992-06-15 VLIW type arithmetic processing unit

Country Status (1)

Country Link
JP (1) JP2928684B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999015958A1 (en) * 1997-09-19 1999-04-01 Hitachi, Ltd. Vliw calculator having partial pre-execution fonction
JP3534987B2 (en) * 1997-10-20 2004-06-07 富士通株式会社 Information processing equipment
JP2000284970A (en) * 1999-03-29 2000-10-13 Matsushita Electric Ind Co Ltd Program converting device and processor
JP3730455B2 (en) 1999-10-01 2006-01-05 富士通株式会社 Information processing apparatus and information processing method
US7725516B2 (en) 2005-10-05 2010-05-25 Qualcomm Incorporated Fast DCT algorithm for DSP with VLIW architecture
JP2012150589A (en) * 2011-01-18 2012-08-09 Toshiba Corp Arithmetic unit

Also Published As

Publication number Publication date
JPH05197547A (en) 1993-08-06

Similar Documents

Publication Publication Date Title
US10776127B2 (en) Reducing data hazards in pipelined processors to provide high processor utilization
US5404552A (en) Pipeline risc processing unit with improved efficiency when handling data dependency
US5640588A (en) CPU architecture performing dynamic instruction scheduling at time of execution within single clock cycle
EP0737915B1 (en) Method and apparatus for improving system performance in a data processing system
US6356994B1 (en) Methods and apparatus for instruction addressing in indirect VLIW processors
EP0454985B1 (en) Scalable compound instruction set machine architecture
US5867684A (en) Method and processor that permit concurrent execution of a store multiple instruction and a dependent instruction
JP3120152B2 (en) Computer system
US6216223B1 (en) Methods and apparatus to dynamically reconfigure the instruction pipeline of an indirect very long instruction word scalable processor
US5787303A (en) Digital computer system capable of processing a plurality of instructions in parallel based on a VLIW architecture
US6401190B1 (en) Parallel computing units having special registers storing large bit widths
US7454598B2 (en) Controlling out of order execution pipelines issue tagging
JPH07281896A (en) Information processor
US20140075157A1 (en) Methods and Apparatus for Adapting Pipeline Stage Latency Based on Instruction Type
US6738893B1 (en) Method and apparatus for scheduling to reduce space and increase speed of microprocessor operations
JP3589698B2 (en) Method and apparatus for simplifying interlock hardware
US20030046517A1 (en) Apparatus to facilitate multithreading in a computer processor pipeline
US6317821B1 (en) Virtual single-cycle execution in pipelined processors
JP2928684B2 (en) VLIW type arithmetic processing unit
US6609191B1 (en) Method and apparatus for speculative microinstruction pairing
GB2381602A (en) Partial decoding in a pipeline processor before fetching an instruction
US5841998A (en) System and method of processing instructions for a processor
US5850563A (en) Processor and method for out-of-order completion of floating-point operations during load/store multiple operations
US6944750B1 (en) Pre-steering register renamed instructions to execution unit associated locations in instruction cache
US6629235B1 (en) Condition code register architecture for supporting multiple execution units

Legal Events

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