JP2824484B2 - Pipeline processing computer - Google Patents

Pipeline processing computer

Info

Publication number
JP2824484B2
JP2824484B2 JP22164692A JP22164692A JP2824484B2 JP 2824484 B2 JP2824484 B2 JP 2824484B2 JP 22164692 A JP22164692 A JP 22164692A JP 22164692 A JP22164692 A JP 22164692A JP 2824484 B2 JP2824484 B2 JP 2824484B2
Authority
JP
Japan
Prior art keywords
instruction
flow
register
scoreboard
stage
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 - Lifetime
Application number
JP22164692A
Other languages
Japanese (ja)
Other versions
JPH0667879A (en
Inventor
達己 中田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP22164692A priority Critical patent/JP2824484B2/en
Publication of JPH0667879A publication Critical patent/JPH0667879A/en
Application granted granted Critical
Publication of JP2824484B2 publication Critical patent/JP2824484B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明はデータ処理装置に係わ
り、さらに詳しくは先行して実行される命令と、その先
行命令に後続して実行される命令との間でのデータの依
存関係をチェックするスコアボードを備えたパイプライ
ン処理計算機に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus, and more particularly, to a data processor for checking a data dependency between an instruction executed before and an instruction executed after the preceding instruction. The present invention relates to a pipeline processing computer provided with a scoreboard.

【0002】パイプライン処理を行う計算機において
は、先行して実行される命令とその先行命令に続いて実
行される命令との間でのデータの依存関係、例えば最初
の命令による演算の結果を次の命令における演算データ
として用いるような関係がある場合には、その依存関係
を乱すことのない処理を行う必要がある。このように演
算に使用されるデータの相互依存関係を管理する制御方
法として、スコアボードを用いる方法がある。
2. Description of the Related Art In a computer that performs a pipeline process, a data dependency between an instruction to be executed in advance and an instruction to be executed following the preceding instruction, for example, a result of an operation by the first instruction is described as follows. When there is a relationship that is used as operation data in the instruction, it is necessary to perform processing that does not disturb the dependency. As a control method for managing the interdependency of the data used for the calculation, there is a method using a scoreboard.

【0003】この方法においては、汎用レジスタのそれ
ぞれに対応して、使用中/未使用を表す記憶手段として
のスコアボードが備えられている。汎用レジスタに書き
込みをする必要のある命令を実行する場合には、そのレ
ジスタ番号に対応するスコアボードのビットをセット
し、そのレジスタに書き込みが行われることを示してお
く。ある命令で結果が汎用レジスタに書き込まれた時に
は、そのレジスタ番号に対応するスコアボードのビット
をリセットし、書き込みが完了したことが示される。
[0003] In this method, a scoreboard is provided as storage means for indicating use / unused in correspondence with each of the general-purpose registers. When an instruction that needs to write to a general-purpose register is executed, the bit of the scoreboard corresponding to the register number is set to indicate that writing to the register is performed. When a result is written to a general-purpose register by a certain instruction, the bit of the scoreboard corresponding to the register number is reset to indicate that the writing is completed.

【0004】後続する命令においては、先行して実行さ
れている命令でレジスタの書き換えが行われるかどうか
を確認するために、演算データを格納するレジスタの番
号に対応するスコアボードのビットを読み出し、それが
セットされている場合には先行して実行中の命令での書
き換えが完了していないことになるため、後続命令の、
演算の開始を待つ必要がある。スコアボードのビットが
リセットされていたら、先行して実行中の命令はレジス
タの内容を書き換えることはない、すなわち後続の命令
が演算の開始を待った結果、先行して実行中の命令での
レジスタの書き換えが完了していることになるので、後
続命令の演算を開始するとができる。
In a subsequent instruction, a bit of a scoreboard corresponding to a register number storing operation data is read in order to confirm whether or not the register executed by the previously executed instruction is rewritten. If it is set, it means that the rewriting by the previously executing instruction has not been completed, so the following instruction
It is necessary to wait for the operation to start. If the scoreboard bit is reset, the previously executing instruction will not rewrite the contents of the register, i.e., the subsequent instruction will wait for the operation to start, resulting in the register being updated by the previously executing instruction. Since the rewriting has been completed, the operation of the subsequent instruction can be started.

【0005】スコアボードを用いる処理の必要性を図
7、および図8を用いて説明する。図7は先行命令での
レジスタへの書き込み完了を待たなかった場合に、デー
タの相互関係を正しく処理できない場合があることを示
している。同図において、第1の乗算命令(mult)
では、レジスタ2の内容(gr2)とレジスタ3の内容
(gr3)とを掛け合わせ、その結果をレジスタ4に格
納する命令を示し、第2の命令としての加算命令(ad
d)では、レジスタ5の内容とレジスタ6の内容を加算
して、レジスタ4に格納する命令を示し、また少し位置
の離れた第3の命令としての加算命令では、第2の命令
としての加算命令の結果が格納されたレジスタ4の内容
とレジスタ7の内容とを加算して、レジスタ8に格納す
る命令を示している。この場合スコアボードを用いるこ
となく処理を実行すると、図に示すように例えば第1の
命令としての乗算命令では演算実行(E)ステージが3
ステージかかるために、第3の命令としての加算命令の
処理においては、第1の命令としての乗算命令の結果が
格納されたレジスタ4の内容が読み出されて加算が実行
されてしまい、間違った結果が得られることになる。
The necessity of processing using a scoreboard will be described with reference to FIGS. 7 and 8. FIG. 7 shows that there is a case where the mutual relation of data cannot be correctly processed without waiting for the completion of writing to the register by the preceding instruction. In the figure, a first multiplication instruction (multi)
Shows an instruction for multiplying the content (gr2) of the register 2 by the content (gr3) of the register 3 and storing the result in the register 4, and an addition instruction (ad
In d), an instruction to add the contents of the register 5 and the contents of the register 6 and store the result in the register 4 is shown. In addition, an addition instruction as a third instruction which is a little away from the position is an addition as a second instruction. The instruction to add the contents of the register 4 storing the result of the instruction and the contents of the register 7 and store the result in the register 8 is shown. In this case, if the processing is executed without using the scoreboard, as shown in the figure, for example, in the multiplication instruction as the first instruction, the operation execution (E) stage is 3
Because of the stage, in the processing of the addition instruction as the third instruction, the contents of the register 4 storing the result of the multiplication instruction as the first instruction are read out, and the addition is executed. The result will be obtained.

【0006】図8は先行命令でのレジスタへのデータ書
き込み完了を後続命令が待つ場合の処理を示している。
同図においては、第1の命令として乗算命令の最初の実
行(E)ステージでレジスタ4に対するスコアボードビ
ットを‘1’とすることによって、その結果がレジスタ
4に書き込まれ、スコアボードビットが‘0’になるま
で、すなわちリセットされるまで第2の加算命令の実行
はインタロックされており、第2の加算命令の処理にお
いて正しいデータを読み出した処理が行われることを示
している。
FIG. 8 shows a process in a case where a subsequent instruction waits for completion of data writing to a register by a preceding instruction.
In the figure, the scoreboard bit for the register 4 is set to "1" at the first execution (E) stage of the multiplication instruction as the first instruction, and the result is written to the register 4, and the scoreboard bit is set to "1". The execution of the second addition instruction is interlocked until it becomes 0 ', that is, until the reset is performed, indicating that the processing of reading out the correct data is performed in the processing of the second addition instruction.

【0007】なおスコアボードにビットをセットするこ
とは、レジスタの値を読み出せない(書き込めない)と
いうことを示している。加算命令のような基本命令の多
くの実行ステージは一般に1ステージのみであり、かつ
バイパス機能によって実行ステージで生成された結果は
データとして読み出すことができる。1ステージで実行
ステージが終了する命令では、図7に示したように後続
の命令に追い越されて誤った動作をする可能性は存在し
ない。そこで加算命令のような基本命令、すなわち1フ
ローで実行でき、かつ1ステージしか実行にかからな
い、最も実行時間の少ない命令では、スコアボードのセ
ット/リセットを行わなくてもデータの相互干渉を防止
することはできる。
Setting a bit in the scoreboard indicates that the value of the register cannot be read (written). Many execution stages of a basic instruction such as an addition instruction generally have only one execution stage, and the result generated in the execution stage by the bypass function can be read as data. For an instruction whose execution stage ends in one stage, there is no possibility that the subsequent instruction will overtake an erroneous operation as shown in FIG. Therefore, in the case of a basic instruction such as an addition instruction, that is, an instruction which can be executed in one flow and takes only one stage and has the shortest execution time, mutual interference of data is prevented without setting / resetting the scoreboard. Can do it.

【0008】図9はスコアボードを使用したパイプライ
ン計算機の従来例の構成ブロック図である。同図におい
て、パイプライン計算機は命令コードを解読する命令デ
コーダ1、演算用データおよび演算結果を格納する汎用
レジスタ(GR)2、例えば加算器としての演算器3、
例えばシフターとしての演算器4、演算器3に対する演
算用データ、すなわちオペランドを保持するオペランド
レジスタ3a,3b,演算器4に対するオペランドを保
持するオペランドレジスタ4a,4b,スコアボード
5,パイプライン動作を制御するパイプラインコントロ
ーラ6、パイプラインコントローラ6の制御の基にパイ
プラインタグを保持するパイプラインタグレジスタ7、
およびアンド回路8から構成されている。
FIG. 9 is a block diagram showing the configuration of a conventional pipeline computer using a scoreboard. In FIG. 1, a pipeline computer includes an instruction decoder 1 for decoding an instruction code, a general-purpose register (GR) 2 for storing operation data and operation results, for example, an operation unit 3 as an adder,
For example, an arithmetic unit 4 as a shifter, operation data for the arithmetic unit 3, that is, operand registers 3a and 3b for holding operands, operand registers 4a and 4b for holding operands for the arithmetic unit 4, a scoreboard 5, and a pipeline operation are controlled. A pipeline controller 6, a pipeline tag register 7 for holding a pipeline tag under the control of the pipeline controller 6,
And an AND circuit 8.

【0009】図9において、命令デコーダ1によって命
令コードが解読され、読み出しレジスタ番号としてソー
スレジスタアドレス0、およびソースレジスタアドレス
1が、また書き込みレジスタ番号としてディスティネー
ションレジスタアドレスが得られ、読み出しレジスタ番
号はGR2の読み出しレジスタポートに入力され、ソー
スオペランドとしてのとしてのリードデータ0とリード
データ1が各オペランドレジスタ3a,3b,4a,お
よび4bに保持される。これらのオペランドレジスタの
出力は演算器3および4に入力され、演算結果はライト
データとしてGR2の書き込みデータポートに入力され
る。この演算結果と同時に、書き込みレジスタ番号とし
てのディスティネーションレジスタアドレスが、パイプ
ラインタグレジスタ7によってタイミングが合わせられ
て、書き込みレジスタアドレスとしてGR2の書き込み
レジスタポートに入力される。書き込み制御信号も命令
デコーダ1によって生成され、パイプラインタグレジス
タ7によってタイミングが合わされてGR2に入力され
るが、この制御信号については図示していない。
In FIG. 9, an instruction code is decoded by an instruction decoder 1 to obtain a source register address 0 and a source register address 1 as read register numbers and a destination register address as a write register number. Read data 0 and read data 1 are input to the read register port of GR2 and held as operand data in the operand registers 3a, 3b, 4a, and 4b. The outputs of these operand registers are input to arithmetic units 3 and 4, and the operation result is input as write data to the write data port of GR2. Simultaneously with this operation result, the destination register address as the write register number is input to the write register port of GR2 as the write register address, with the timing adjusted by the pipeline tag register 7. The write control signal is also generated by the instruction decoder 1 and is input to the GR 2 with the timing adjusted by the pipeline tag register 7, but this control signal is not shown.

【0010】以上はデータの相互干渉がない場合の動作
であるが、データの相互干渉がある場合には、命令デコ
ーダ1から出力される読み出しレジスタ番号、および書
き込みレジスタ番号がスコアボード5の読み出しレジス
タ検査ポート(RD0 CHK,RD1 CHK)およ
び書き込みレジスタ検査ポート(WR CHK)に入力
され、これらのレジスタ番号はそれぞれがスコアボード
5内の使用中/未使用を表すレジスタを選択するための
選択信号とし用いられる。選択されたレジスタからの信
号SRC0 REG BUSY,SRC1 REG B
USY,およびWR REG BUSYはパイプライン
コントローラ6に入力され、図8で示したようにデコー
ドステージをインタロックするかどうかを決定するため
に用いられる。
The above is the operation in the case where there is no mutual interference of data. If there is mutual interference of data, the read register number and the write register number output from the instruction decoder 1 are read from the read register of the scoreboard 5. The check ports (RD0 CHK, RD1 CHK) and the write register check port (WR CHK) are input to the check ports, and these register numbers are used as selection signals for selecting registers in the scoreboard 5 indicating busy / unused. Used. Signal SRC0 REG BUSY, SRC1 REG B from selected register
USY and WR REG BUSY are input to the pipeline controller 6 and are used to determine whether to interlock the decode stage as shown in FIG.

【0011】パイプラインコントローラ6への前述の3
つの信号のいずれかがスコアボードビットが‘1’であ
ることを示していた場合には、Dステージリリース信
号、すなわちデコードステージを完了して実行ステージ
に進んでよいことを示す信号の出力は抑制される。
The above-mentioned 3 to the pipeline controller 6
If one of the two signals indicates that the scoreboard bit is '1', the output of the D stage release signal, ie, the signal indicating that the decoding stage can be completed and the execution stage can be performed, is suppressed. Is done.

【0012】先行する命令において、例えばレジスタへ
の書き込みが完了し、スコアボード5内の使用中/未使
用を表すレジスタのリセットが行われ、パイプラインコ
ントローラ6への前述の3つの信号がいずれもスコアボ
ードビットがセットされていないことを示すようになっ
た場合には、Dステージ信号が4つのオペランドレジス
タに出力されると共に、その信号がパイプラインタグレ
ジスタ7内のDフリップフロップのクロックイネーブル
端子に、またスコアボード5の前にあるアンド回路8に
与えられる。
In the preceding instruction, for example, the writing to the register is completed, the register indicating whether the scoreboard 5 is in use or unused is reset, and all of the above three signals to the pipeline controller 6 are output. If the result indicates that the scoreboard bit is not set, the D stage signal is output to the four operand registers and the signal is output to the clock enable terminal of the D flip-flop in the pipeline tag register 7. And an AND circuit 8 in front of the scoreboard 5.

【0013】これによって後続命令に対する実行ステー
ジの処理が行われるが、この時アンド回路8のもう一方
の入力として与えられている命令デコーダ1からのディ
スティネーションレジスタアドレスがスコアボード5の
WR SET端子に与えられ、書き込みレジスタ番号に
対応したスコアボードのビットがセットされる。更に、
パイプラインコントローラ6から出力されるEステージ
リリース信号がパイプラインタグレジスタ7に入力され
た時点で、ディスティネーションレジスタアドレスはラ
イトレジスタアドレスとしてスコアボードのWR RE
S端子に与えられ、対応するスコアボードビットのリセ
ットが行われると共に、前述のようにこのライトレジス
タアドレスはGR2に与えられる。
The execution stage processing for the subsequent instruction is thereby performed. At this time, the destination register address from the instruction decoder 1 provided as the other input of the AND circuit 8 is supplied to the WR SET terminal of the scoreboard 5. And the bit of the scoreboard corresponding to the write register number is set. Furthermore,
When the E-stage release signal output from the pipeline controller 6 is input to the pipeline tag register 7, the destination register address is set as the write register address and the WR RE of the scoreboard is used.
The signal is applied to the S terminal, the corresponding scoreboard bit is reset, and the write register address is applied to GR2 as described above.

【0014】[0014]

【発明が解決しようとする課題】発明が解決しようとす
る課題を説明する前に、まずマルチフロー処理と、命令
の並列実行時におけるスコアボードの使用について説明
する。マルチフロー処理はステージ展開処理とも呼ば
れ、1つの命令をあたかも複数の命令であるかのように
複数のフローに分けて実行する処理である。
Before describing the problems to be solved by the present invention, first, multiflow processing and use of a scoreboard at the time of executing instructions in parallel will be described. The multi-flow processing is also referred to as a stage development processing, and is a processing in which one instruction is divided into a plurality of flows and executed as if they were a plurality of instructions.

【0015】例えばペアとしての2つの4バイトの汎用
レジスタ(GR)の値を8バイトの浮動小数点レジスタ
(FR)に転送する命令を実行する場合に、汎用レジス
タ側で1つのポートだけを使用して1度に4バイトずつ
読み出し、それを浮動小数点レジスタに転送する処理を
2回行うような処理がマルチフロー処理である。図10
はこの処理の例であり、r1,r1+1で示されるレジ
スタペアの格納内容を2回のフローに分けて転送してい
る様子を示している。
For example, when executing an instruction to transfer the value of two 4-byte general-purpose registers (GR) as a pair to an 8-byte floating-point register (FR), only one port is used on the general-purpose register side. Multi-flow processing is to read four bytes at a time and transfer it to the floating-point register twice. FIG.
Is an example of this processing, and shows how the contents stored in the register pair indicated by r1 and r1 + 1 are transferred in two flows.

【0016】図11は乗算命令に対するマルチフロー処
理の例である。一般に乗算命令の実行頻度は少なく、そ
の性能が低下してもシステム全体の性能に与える影響は
小さい。従って図11においては、乗算用の2つの演算
データが2回のフローに分けて乗算器に転送され、これ
によって演算データを転送するためのデータバスのバス
幅の減少が図られている。
FIG. 11 shows an example of multiflow processing for a multiplication instruction. Generally, the execution frequency of the multiplication instruction is low, and even if the performance is reduced, the influence on the performance of the entire system is small. Therefore, in FIG. 11, two operation data for multiplication are transferred to the multiplier in two separate flows, whereby the bus width of the data bus for transferring the operation data is reduced.

【0017】しかしながらこのようなマルチフロー処理
を行う乗算命令において、スコアボードのセットを行っ
た場合にハングアップ状態となる例が図12に示されて
いる。図12においては、レジスタ2の内容とレジスタ
3の内容とを掛けて、その結果をレジスタ3に格納する
乗算命令を2つのフローに分けて実行する様子が示され
ている。まず第1のフローにおいてはレジスタ2の内容
が乗算器に送られるが、乗算結果をレジスタ3に格納す
るために、第1のフローの実行ステージにおいてレジス
タ3に対応するスコアボードビットがセットされる。こ
のため第2のフローでレジスタ3の内容を読み出そうと
しても、スコアボードのビットがセットされているため
に読み出しを行うことはできず、インターロックの状態
となる。このスコアボードビットはレジスタ3への書き
込みでリセットされるが、第2のフローの実行ステージ
の結果が出るまではリセットされず、第2のフローがデ
コードステージでインターロックしているために永久に
リセットができず、ハングアップ状態となってしまうこ
とになる。このようなハングアップ状態はハード障害状
態であり、デッドロックとも呼ばれ、永遠に解消されな
い状態である。これに対して図8で示したインターロッ
ク状態は、スコアボードビットのリセットによって処理
が再開されるものである。
However, FIG. 12 shows an example in which a hang-up state occurs when a scoreboard is set in a multiplication instruction for performing such multiflow processing. FIG. 12 shows a state in which the contents of the register 2 are multiplied by the contents of the register 3 and the multiplication instruction for storing the result in the register 3 is executed in two flows. First, in the first flow, the contents of the register 2 are sent to the multiplier. In order to store the multiplication result in the register 3, the scoreboard bit corresponding to the register 3 is set in the execution stage of the first flow. . For this reason, even if an attempt is made to read the contents of the register 3 in the second flow, the reading cannot be performed because the bit of the scoreboard is set, and an interlock state is set. This scoreboard bit is reset by writing to register 3, but is not reset until the result of the execution stage of the second flow is obtained, and is permanently set because the second flow is interlocked in the decoding stage. It cannot be reset, resulting in a hang-up state. Such a hang-up state is a hard failure state, also called a deadlock, and is a state that cannot be resolved forever. In contrast, in the interlock state shown in FIG. 8, the processing is restarted by resetting the scoreboard bit.

【0018】次に命令の並列実行時における問題点を説
明する。図13はその問題点の説明図である。この例に
おいては加算命令と乗算命令が並列実行されるが、加算
命令ではレジスタ1の内容とレジスタ2の内容が加算さ
れてレジスタ3に格納され、また乗算命令においてはレ
ジスタ2の内容とレジスタ3との内容との乗算が行わ
れ、その結果はレジスタに格納される。これらの命令
のうち加算命令は最初の3つのステージで終了し、一方
乗算命令は2つのフローに分けられ、すなわちマルチフ
ロー処理として行われる。
Next, problems at the time of parallel execution of instructions will be described. FIG. 13 is an explanatory diagram of the problem. In this example, the addition instruction and the multiplication instruction are executed in parallel. In the addition instruction, the contents of the register 1 and the contents of the register 2 are added and stored in the register 3, and in the multiplication instruction, the contents of the register 2 and the register 3 are added. And the result is stored in the register 4 . Of these instructions, the add instruction ends in the first three stages, while the multiply instruction is split into two flows, ie, performed as a multi-flow operation.

【0019】図12で説明した問題点を避けるために、
例えばスコアボードビットを乗算命令の第2フローにお
いてレジスタ3の内容を読み込む時に立てるとしても、
この時には加算命令の結果がレジスタ3に格納されてお
り、乗算命令の処理はこの加算結果を用いて行われてし
まうことになる。このように命令の並列実行に対して
は、データの相互依存関係を考慮してスコアボードビッ
トを立てると共に、最も実行時間の少ない命令としての
基本命令の実行はデータの相互依存関係を考慮して遅延
させることが必要になるという問題点がある。
In order to avoid the problem described with reference to FIG.
For example, even if the scoreboard bit is set when reading the contents of the register 3 in the second flow of the multiplication instruction,
At this time, the result of the addition instruction is stored in the register 3, and the processing of the multiplication instruction is performed using this addition result. As described above, for parallel execution of instructions, a scoreboard bit is set in consideration of data interdependency, and execution of a basic instruction as an instruction having the shortest execution time is performed in consideration of data interdependency. There is a problem that it is necessary to delay.

【0020】本発明は、マルチフロー処理を必要とする
命令の実行時にスコアボードによるデータの相互依存関
係を正しく維持して処理を行うことと、単一のフローで
実行できる命令とマルチフロー処理を必要とする命令と
の並列実行時におけるデータの相互依存関係を損なうこ
となく正しい処理を実行することとを可能とすることで
ある。
According to the present invention, when an instruction requiring multi-flow processing is executed, processing is performed while maintaining the interdependency of data by the scoreboard correctly, and instructions which can be executed by a single flow and multi-flow processing are executed. An object of the present invention is to enable correct processing to be performed without impairing the interdependency of data during parallel execution with a required instruction.

【0021】[0021]

【課題を解決するための手段】図1は本発明の原理ブロ
ック図である。同図は、先行して実行される命令と、そ
の先行命令に引き続いて実行される命令との間でのデー
タの依存関係をチェックするスコアボードを備え、かつ
1つの命令を複数のフローに分けて実行することができ
るパイプライン処理計算機の原理ブロック図である。
FIG. 1 is a block diagram showing the principle of the present invention. The figure includes a scoreboard for checking a data dependency between an instruction executed in advance and an instruction executed in succession to the preceding instruction, and one instruction is divided into a plurality of flows. FIG. 2 is a block diagram showing the principle of a pipeline processing computer that can be executed by a computer.

【0022】図1において、最終フロー検出手段10
は、例えばマルチフローコントローラであり、1つの命
令を複数のフローに分けて実行する処理としてのマルチ
フロー処理の最終フローを検出するものである。またス
コアボード更新制御手段12は、例えばスコアボード1
1の入力側に設けられる2つのアンド回路であり、マル
チフロー処理の最終フローにおいて、前述のデータ依存
関係に対応するスコアボード11の格納内容の更新を行
わせるものである。
In FIG. 1, the final flow detecting means 10
Is a multi-flow controller, for example, for detecting the final flow of multi-flow processing as processing for executing one instruction by dividing it into a plurality of flows. The scoreboard update control means 12 is, for example, the scoreboard 1
The two AND circuits provided on the input side of the input unit 1 update the contents stored in the scoreboard 11 corresponding to the above-described data dependency in the final flow of the multiflow processing.

【0023】[0023]

【作用】本発明においては、1つの命令を複数のフロー
に分けて実行する処理、すなわちマルチフロー処理の最
終フローでのみスコアボードの格納内容更新処理、すな
わちセット/リセット処理が行われる。図2を用いて本
発明の作用を説明する。
According to the present invention, the processing for updating one instruction divided into a plurality of flows, that is, the update processing of the content stored in the scoreboard, that is, the set / reset processing is performed only in the final flow of the multi-flow processing. The operation of the present invention will be described with reference to FIG.

【0024】図1で説明したように、本発明においては
最終フロー検出手段10がマルチフロー処理の最終フロ
ーを検出した時に、例えばそのフローの命令が実行され
た結果が書き込まれるレジスタに対応するスコアボード
のビットがセットされる。このセットはスコアボード更
新制御手段12によって行われる。図2においては、図
12におけると同じ命令が処理されるが、図12におい
ては第1のフローにおいてレジスタ3に乗算結果が格納
されると判明した時点で第1のフローの実行ステージに
おいてスコアボードビットが‘1’とされたが図21に
おいては第2のフロー、すなわち最終フローの第1の実
行ステージにおいてスコアボードのセットが行われる。
これによってレジスタ3の内容は第2のフローの第1の
実行ステージにおいて汎用レジスタGRに転送され、そ
の後乗算処理が実行されて乗算結果がレジスタ3に格納
される時点でスコアボードビットが‘0’にリセットさ
れる。
As described with reference to FIG. 1, in the present invention, when the final flow detecting means 10 detects the final flow of the multiflow processing, for example, the score corresponding to the register in which the result of executing the instruction of the flow is written. The board bit is set. This set is performed by the scoreboard update control means 12. In FIG. 2, the same instruction as in FIG. 12 is processed, but in FIG. 12, when it is determined that the multiplication result is stored in the register 3 in the first flow, the scoreboard is executed in the execution stage of the first flow. Although the bit is set to '1', the scoreboard is set in the second flow in FIG. 21, that is, in the first execution stage of the final flow.
As a result, the content of the register 3 is transferred to the general-purpose register GR in the first execution stage of the second flow, and thereafter, when the multiplication process is executed and the multiplication result is stored in the register 3, the scoreboard bit is set to “0”. Is reset to

【0025】以上のように、本発明においては、マルチ
フロー処理の最終フローでのみスコアボードのセット/
リセット処理が行われる。その結果、先行命令と後続命
令との間でのデータの依存関係を乱すことのない処理
が、パイプラインのインタロックを含む処理によって保
証される。
As described above, in the present invention, the scoreboard set /
Reset processing is performed. As a result, processing that does not disturb the data dependency between the preceding instruction and the succeeding instruction is guaranteed by the processing including the pipeline interlock.

【0026】またマルチフロー処理を必要とする命令と
必要としない命令との同時実行時には、スコアボードの
セット/リセット処理はマルチフロー処理の最終フロー
で行われると共に、マルチフロー処理を必要としない命
令の実行もマルチフロー処理の最終フローまで遅延させ
られる。
When simultaneously executing an instruction that requires multiflow processing and an instruction that does not require multiflow processing, the scoreboard set / reset processing is performed in the final flow of the multiflow processing, and the instruction that does not require multiflow processing is executed. Is also delayed until the final flow of the multi-flow process.

【0027】[0027]

【実施例】図3は本発明のパイプライン処理計算機の全
体構成ブロック図である。同図において図9の従来例と
同じ部分には符号を付してある。図3において、図9の
従来例と異なる点はマルチフロー処理における最終フロ
ーを検出するためのマルチフローコントローラ20が追
加され、またスコアボード5の入力側にアンド回路8の
代わりにアンド回路21が、また新たにアンド回路22
が設けられていることである。
FIG. 3 is a block diagram showing the overall configuration of a pipeline processing computer according to the present invention. In this figure, the same parts as those in the conventional example of FIG. 9 are denoted by reference numerals. 3 differs from the conventional example of FIG. 9 in that a multiflow controller 20 for detecting the final flow in the multiflow processing is added, and an AND circuit 21 is provided on the input side of the scoreboard 5 instead of the AND circuit 8. , And a new AND circuit 22
Is provided.

【0028】マルチフローコントローラ22には、命令
デコーダ1からマルチフローが2つのフローに分かれて
いることを示すツーフローオペレーション、または3つ
のフローに分かれていることを示すスリーフローオペレ
ーション信号が入力され、またパイプラインコントロー
ラ6からのDステージリリース信号入力される。そして
マルチフローコントローラ20からのラストフロー検出
信号は2つのアンド回路21,22に入力され、またフ
ローカウンタ信号は命令デコーダ1に出力される。アン
ド回路21にはラストフロー検出信号と共に、図9にお
けると同様に書き込みレジスタ番号を示すディスティネ
ーションレジスタアドレスとDステージリリース信号が
入力されており、これらの信号が揃った時点でスコアボ
ード5にライトレジスタセット入力が与えられる。また
アンド回路22には、ラストフロー検出信号と共に、パ
イプラインタグレジスタ7からのライトレジスタアドレ
スが与えられており、これらの信号が揃ったところでス
コアボード5にライトレジスタリセット信号が入力され
る。
The multi-flow controller 22 receives from the instruction decoder 1 a two-flow operation indicating that the multi-flow is divided into two flows or a three-flow operation signal indicating that the multi-flow is divided into three flows. Also, a D stage release signal is input from the pipeline controller 6. Then, the last flow detection signal from the multi-flow controller 20 is input to the two AND circuits 21 and 22, and the flow counter signal is output to the instruction decoder 1. A destination register address indicating a write register number and a D stage release signal are input to the AND circuit 21 as well as the last flow detection signal as in FIG. A register set input is provided. The AND circuit 22 is supplied with a write register address from the pipeline tag register 7 together with the last flow detection signal. When these signals are completed, a write register reset signal is input to the scoreboard 5.

【0029】図3における各ステージの処理の概要を説
明する。まずデコード(D)ステージでは命令をデコー
ドしてマルチフロー命令であること、命令の実行に必要
なフロ数、スコアボードの更新を必要とする命令である
ことをデコードする。デコードした結果及びマルチフロ
ーカウンタの値等をパイプライン・タグに保持し、以後
のステージで使用する。
An outline of the processing of each stage in FIG. 3 will be described. First, in the decode (D) stage, the instruction is decoded to determine that the instruction is a multi-flow instruction, the number of flows required for executing the instruction, and that the instruction requires updating of the scoreboard. The result of decoding, the value of the multiflow counter, and the like are stored in the pipeline tag, and used in the subsequent stages.

【0030】書き込みレジスタ番号に対応するスコアボ
ードのビット数を検査し、もしセットされていたら命令
デコードステージでインターロックする。読み出しレジ
スタ番号に対応するスコアボードのビット数を検査し、
もしセットされていたら命令デコードステージでインタ
ーロックする。
The number of bits of the scoreboard corresponding to the write register number is checked, and if set, interlock is performed in the instruction decode stage. Check the number of bits of the scoreboard corresponding to the read register number,
If set, interlock at the instruction decode stage.

【0031】マルチフロー命令の場合に現在何フロー目
の処理をしているかを示すマルチフローカウンタの出力
は、マルチフロー命令でない場合は常に1フロー目を実
行しているのと等価な値を示している。また最終フロー
であることを検出するために、マルチフローカウンタの
値と命令の実行に必要なフロー数を比較する。マルチフ
ロー命令でない場合はマルチフローカウンタが常に1フ
ロー目を実行しているのと等価な値を示しているので最
終フローであることが検出される。
In the case of a multi-flow instruction, the output of the multi-flow counter indicating the current flow of processing indicates a value equivalent to executing the first flow whenever the instruction is not a multi-flow instruction. ing. Further, in order to detect the final flow, the value of the multiflow counter is compared with the number of flows required for executing the instruction. If the instruction is not a multi-flow instruction, the multi-flow counter always indicates a value equivalent to executing the first flow, so that the final flow is detected.

【0032】演算実行(E)ステージでは演算実行以外
に、演算ステージを実行中の命令がスコアボードの更新
を必要とする命令であり、かつ最終フローを実行してい
たら、書き込みレジスタ番号に対応するスコアボードの
ビットをセットする。一部の命令ではこのステージでレ
ジスタ読み出しを行う場合もある。
In the operation execution (E) stage, in addition to the execution of the operation, if the instruction that is executing the operation stage is an instruction that requires updating of the scoreboard and the final flow is being executed, the instruction corresponding to the write register number is executed. Set the scoreboard bit. For some instructions, register reading may be performed at this stage.

【0033】書き込み(W)ステージでは演算ステージ
で得られた結果をレジスタに書き込むなどの処理以外
に、書き込み(W)ステージを実行中の命令がスコアボ
ードの更新を必要とする命令であり、かつ最終フローを
実行していたら、書き込みレジスタ番号に対応するスコ
アボードのビットをリセットする。
In the write (W) stage, in addition to processing such as writing the result obtained in the operation stage to a register, the instruction executing the write (W) stage is an instruction that requires updating of the scoreboard, and If the final flow has been executed, the bit of the scoreboard corresponding to the write register number is reset.

【0034】図4はマルチコントローラの実施例構成ブ
ロック図である。同図において、マルチコントローラ2
0は命令デコーダ1からのツーフローオペレーション、
及びスリーフローオペレーション信号が入力されるオア
回路23、オア回路23の出力が与えられるインバータ
24、パイプラインコントローラ6が出力するDステー
ジリリース信号とクロック信号とが入力されるアンド回
路25、フローカウンタ26、フローカウンタ26の出
力とツーフローオペレーション信号が入力されるアンド
回路27、フローカウンタ26の出力とスリーフローオ
ペレーション信号が入力されるアンド回路28、インバ
ータ24、アンド回路27、及び28の出力が入力され
るオア回路29、及びオア回路29の出力を反転するイ
ンバータ30から構成されている。
FIG. 4 is a block diagram showing an embodiment of the multi-controller. In FIG.
0 is a two-flow operation from the instruction decoder 1,
And an OR circuit 23 to which a three-flow operation signal is input, an inverter 24 to which an output of the OR circuit 23 is supplied, an AND circuit 25 to which a D-stage release signal and a clock signal output from the pipeline controller 6 are input, and a flow counter 26 , An AND circuit 27 to which the output of the flow counter 26 and the two-flow operation signal are inputted, an AND circuit 28 to which the output of the flow counter 26 and the three-flow operation signal are inputted, and the outputs of the inverter 24 and the AND circuits 27 and 28 are inputted. And an inverter 30 for inverting the output of the OR circuit 29.

【0035】図3において命令デコーダでは実行する命
令がいくつのフローから構成されるかをデコードする。
またマルチフロー命令の場合はFLOW COUNTE
Rの値によって現在実行している命令のフロー番号を教
えており、最終フローであることを検出し(LAST
FLOW信号)、最終フローであった場合にはプログラ
ムカウンタの更新制御や命令バッファ(キュウ)の中か
らの命令の選択を行う。
In FIG. 3, the instruction decoder decodes how many flows the instruction to be executed is composed.
In the case of a multi-flow instruction, FLOW COUNTE
The value of R indicates the flow number of the instruction currently being executed, and detects that it is the last flow (LAST
FLOW signal), if it is the final flow, the update control of the program counter and the selection of an instruction from the instruction buffer (queue) are performed.

【0036】命令デコーダはFLOW COUNTER
の値を使って、フローによって同じ命令でもデコードの
結果を一部変更する。例えば図10で説明したGRから
FRへの転送では、読み出しレジスタ番号を1フロー目
と2フロー目で異なるレジスタ番号を与えて、2つのレ
ジスタを読み出している。
The instruction decoder is a FLOW COUNTER
The decoding result is partially changed for the same instruction depending on the flow using the value of. For example, in the transfer from GR to FR described with reference to FIG. 10, two registers are read by giving different register numbers to the read register numbers for the first and second flows.

【0037】図4において、マルチフロー処理でない単
一のフローで処理される命令に対しては、命令デコーダ
1からツーフローオペレーション、及びスリーフローオ
ペレーション信号は出力されず、オア回路23の出力は
‘0’、インバータ24の出力が‘1’となり、オア回
路29の出力によってそのフローはラストフローである
ことが示される。
In FIG. 4, the instruction decoder 1 does not output a two-flow operation signal and a three-flow operation signal for an instruction processed by a single flow other than the multi-flow processing, and the output of the OR circuit 23 becomes' 0, the output of the inverter 24 becomes '1', and the output of the OR circuit 29 indicates that the flow is the last flow.

【0038】これに対してマルチフロー処理が2つのフ
ローから成る場合には、命令デコーダ1からツーフロー
オペレーション信号がアンド回路27の最も上の入力端
子に与えられる。そこでアンド回路27の出力は、上か
ら2番目の入力端子に‘1’、3番目の入力端子に
‘0’が与えられた時に‘1’となり、オア回路29の
出力はラストフローを示すことになる。すなわちこの時
フローカウンタの出力は‘01’である。アンド回路2
5に対しては、クロック信号と共にパイプラインコント
ローラ6からのDステージリリース信号が入力されてお
り、クロック信号の立ち上がり時にDステージリリース
信号が与えられていればフローカウンタ26の出力がイ
ンクリメントされる。マルチフロー処理におけるフロー
が‘2’の場合には、最初のフローに対してはフローカ
ウンタ26の出力は‘0’となっており、第2のフロー
のDステージが完了したことを示すDステージリリース
信号の入力時にフローカウンタ26の出力が‘1’とな
る。これによってオア回路29からラストフロー検出信
号が出力される。
On the other hand, when the multi-flow process includes two flows, the instruction decoder 1 supplies a two-flow operation signal to the uppermost input terminal of the AND circuit 27. Therefore, the output of the AND circuit 27 becomes "1" when "1" is given to the second input terminal from the top and "0" is given to the third input terminal, and the output of the OR circuit 29 indicates the last flow. become. That is, at this time, the output of the flow counter is “01”. AND circuit 2
5, the D-stage release signal from the pipeline controller 6 is input together with the clock signal, and if the D-stage release signal is given when the clock signal rises, the output of the flow counter 26 is incremented. When the flow in the multi-flow process is “2”, the output of the flow counter 26 is “0” for the first flow, and the D stage indicating that the D stage of the second flow has been completed When the release signal is input, the output of the flow counter 26 becomes “1”. As a result, the OR circuit 29 outputs a last flow detection signal.

【0039】マルチフロー処理が3つのフローから成る
場合には、スリーフローオペレーション信号がアンド回
路28の1番上の入力端子に与えられ、アンド回路28
の出力はその第2の入力端子への入力が‘0’第3の入
力端子への入力が‘1’となった時に‘1’となる。す
なわちフローカウンタ26の出力は第3のフローに対し
てDステージリリース信号が入力された時に‘2’すな
わち‘10’となっており、この時点でオア回路29か
らラストフロー検出信号が出力される。
If the multi-flow processing consists of three flows, a three-flow operation signal is applied to the top input terminal of the AND circuit 28,
Becomes "1" when the input to the second input terminal is "0" and the input to the third input terminal is "1". That is, the output of the flow counter 26 is “2”, that is, “10” when the D stage release signal is input for the third flow, and at this time, the OR circuit 29 outputs the last flow detection signal. .

【0040】また図4において、クロック信号の立ち上
がり時にDステージリリース信号が‘1’でラストフロ
ー検出信号が‘1’である時、すなわちラストフローが
検出された後、次のマルチフロー処理の最初のフローに
対してDステージリリース信号が出力された時にはフロ
ーカウンタがリセットされ、クロック信号の立ち上がり
時にDステージリリース信号が‘1’、ラストフロー検
出信号が‘0’である時にフローカウンタはインクリメ
ントされ、クロック信号の立ち上がり時にDステージリ
リース信号が‘0’である時にはフローカウンタの出力
は変化しないことが示されている。この作用はインバー
タ30によって行われる。
In FIG. 4, when the D-stage release signal is "1" and the last flow detection signal is "1" at the time of rising of the clock signal, that is, after the last flow is detected, the first multi-flow process is started. The flow counter is reset when the D stage release signal is output with respect to the flow of, and the flow counter is incremented when the D stage release signal is "1" at the rise of the clock signal and the last flow detection signal is "0". It shows that the output of the flow counter does not change when the D-stage release signal is "0" at the rising of the clock signal. This operation is performed by the inverter 30.

【0041】図5は本発明におけるスコアボードの実施
例構成ブロック図である。同図において、スコアボード
は2つの4入力16出力デコーダ33,34,16個の
SRフリップフロップ35、3個の16入力1出力セレ
クタ36,37および38から構成されている。
FIG. 5 is a block diagram showing an embodiment of a scoreboard according to the present invention. In the figure, the scoreboard comprises two 4-input 16-output decoders 33, 34, 16 SR flip-flops 35, and three 16-input 1-output selectors 36, 37 and 38.

【0042】図5において、デコーダ33はアンド回路
21からの4ビットのWR SET信号の内容に従っ
て、Dステージライトイネーブル信号(D WE)の入
力時に16個のSRフリップフロップ35のいずれかを
セットするものであり、またデコーダ34はアンド回路
22の出力する4ビットのWR RES信号の内容に従
って、Wステージライトイネーブル信号(W WE)の
入力時にSRフリップフロップ35のいずれかをリセッ
トするものである。
In FIG. 5, the decoder 33 sets one of the 16 SR flip-flops 35 upon input of the D stage write enable signal (DWE) in accordance with the contents of the 4-bit WR SET signal from the AND circuit 21. The decoder 34 resets one of the SR flip-flops 35 according to the contents of the 4-bit WR RES signal output from the AND circuit 22 when the W stage write enable signal (W WE) is input.

【0043】次にセレクタ36は、命令デコーダ1から
出力される読み出しレジスタ番号SRC REG AD
R0信号としてのスコアボード読み出しレジスタ検査ポ
ートへの入力信号RD0 CHK4ビットの内容に従っ
て、16個のSRフリップフロップ35のいずれか1つ
の出力をパイプラインコントローラ6に与えるSRC0
REG BUSY信号として出力するものである。同
様にレジスタ37は読み出しレジスタ検査ポートへの入
力信号RD1 CHK4ビットの内容に従って、16個
のフリップフロップ35のいずれかの出力をSRC1
REG BUSY信号としてパイプラインコントローラ
6に出力し、またセレクタ38は書き込みレジスタ検査
ポートへの入力信号WR CHK4ビットの内容に従っ
て、16個のフリップフロップ35の出力のいずれかを
WR REG BUSY信号としてパイプラインコント
ローラ6に出力するものである。
Next, the selector 36 reads the read register number SRC_REG_AD output from the instruction decoder 1.
SRC0 which supplies one of the outputs of 16 SR flip-flops 35 to pipeline controller 6 according to the contents of input signal RD0 CHK4 bits to score board read register test port as R0 signal
It is output as a REG BUSY signal. Similarly, the register 37 outputs one of the 16 flip-flops 35 according to the contents of the 4-bit input signal RD1 CHK to the read register test port SRC1.
The selector 38 outputs the REG BUSY signal to the pipeline controller 6, and the selector 38 outputs one of the outputs of the 16 flip-flops 35 as the WR REG BUSY signal according to the contents of the 4-bit input signal WR CHK to the write register inspection port. Output to the controller 6.

【0044】図6はパイプラインコントローラの実施例
の構成ブロック図である。図3において、パイプライン
コントローラ6にはスコアボード5からの3つのBUS
Y信号とその他のインターロック条件信号が与えられる
が、3つのBUSY信号とその他のDステージインター
ロック条件信号はオア回路40に入力される。アンド回
路41には、オア回路40の出力とDステージバリッド
信号、すなわちDステージを実行している命令があるこ
とを示す信号と、後述するアンド回路45の出力が入力
される。アンド回路41の出力はDステージを実行して
いる命令が完了したことを示すDステージリリース信号
であり、その値はDステージバリッド信号が‘1’であ
り、オア回路40、及びアンド回路45の出力が共に
‘0’である時に‘1’となる。すなわちDステージバ
リッド信号が‘1’であり、 Dステージが有効であっ
ても、オア回路40が‘1’を出力し、Dステージイン
ターロック条件がある場合、またはアンド回路45が
‘1’を出力し、Eステージで実行中の命令がインター
ロックしている場合にはアンド回路41の出力は‘1’
とならない。これは例えばDステージで実行される命令
がEステージに進んでしまうとEステージでインターロ
ックしている命令が完了しないまま、例えばレジスタへ
の上書きが行われてしまうためであり、このようなスコ
アボード検査によるインターロックはDインターロック
条件の1つと考えられる。
FIG. 6 is a block diagram showing the configuration of an embodiment of the pipeline controller. In FIG. 3, the pipeline controller 6 has three BUSs from the scoreboard 5.
The Y signal and other interlock condition signals are provided, and the three BUSY signals and other D stage interlock condition signals are input to the OR circuit 40. The output of the OR circuit 40 and a D stage valid signal, that is, a signal indicating that there is an instruction executing the D stage, and an output of an AND circuit 45 described later are input to the AND circuit 41. The output of the AND circuit 41 is a D stage release signal indicating that the instruction executing the D stage has been completed. The value of the output is a D stage valid signal of “1”, and the value of the OR circuit 40 and the AND circuit 45 It becomes '1' when both outputs are '0'. That is, even if the D stage valid signal is "1" and the D stage is valid, the OR circuit 40 outputs "1" and the D stage interlock condition exists, or the AND circuit 45 outputs "1". When the instruction being executed in the E stage is interlocked, the output of the AND circuit 41 is "1".
Does not. This is because, for example, if an instruction executed in the D stage advances to the E stage, the register interlocked in the E stage is not completed, for example, the register is overwritten. The interlock by the board inspection is considered as one of the D interlock conditions.

【0045】アンド回路41の出力としてのDステージ
リリース信号は、フリップフロップ42を介してEステ
ージバリッド信号、すなわちDステージの終了によって
Eステージを実行している命令があることを示す信号と
してアンド回路43、及び45に与えられる。アンド回
路43には、図3におけるパイプラインコントローラ6
への他のインターロックコンディション信号としてのE
ステージインターロックコンディション信号と、後述す
るアンド回路48の出力とが与えられており、またこれ
らの2つの信号はオア回路44を介してアンド回路45
に与えられている。すなわちアンド回路45の出力は、
前述のようにEステージで実行されている命令がEステ
ージインターロックコンディションによってインターロ
ックしていることを示している。
The D-stage release signal as the output of the AND circuit 41 is supplied as an E-stage valid signal via the flip-flop 42, that is, a signal indicating that there is an instruction executing the E-stage by the end of the D-stage. 43 and 45. The AND circuit 43 includes the pipeline controller 6 in FIG.
E as another interlock condition signal to
A stage interlock condition signal and an output of an AND circuit 48, which will be described later, are provided. These two signals are supplied to an AND circuit 45 via an OR circuit 44.
Has been given to. That is, the output of the AND circuit 45 is
As described above, it indicates that the instruction executed at the E stage is interlocked by the E stage interlock condition.

【0046】アンド回路43の出力は、Eステージバリ
ッド信号が‘1’でありEステージインターロックコン
ディション信号とアンド回路48の出力とが共に‘0’
である時に‘1’となる。アンド回路43の出力はEス
テージリリース信号、すなわちEステージを実行してい
る命令が完了したことを示すものであり、Dステージリ
リース信号と同様にEステージが有効であってもEステ
ージインターロックコンディションがあるか、またはW
ステージで実行されるべき命令がインターロックしてい
る場合にはその値は‘1’とならない。すなわちEステ
ージで実行されている命令がWステージに進んでしまう
と、Wステージでインターロックしている命令が完了し
ないまま、例えばレジスタへの上書きが行われてしまう
ことになる。
The output of the AND circuit 43 is such that the E stage valid signal is “1” and both the E stage interlock condition signal and the output of the AND circuit 48 are “0”.
It becomes '1' when. The output of the AND circuit 43 indicates the E stage release signal, that is, the completion of the instruction executing the E stage, and similarly to the D stage release signal, even if the E stage is valid, the E stage interlock condition Or W
If the instruction to be executed in the stage is interlocked, its value will not be '1'. That is, when the instruction executed in the E stage advances to the W stage, for example, the register is overwritten without completing the instruction interlocked in the W stage.

【0047】アンド回路43の出力、すなわちEステー
ジリリース信号はフリップフロップ46を介してWステ
ージを実行している命令があることを示すWステージバ
リッド信号としてアンド回路47に与えられる。アンド
回路47には、Wステージインターロックコンディショ
ン信号が与えられており、Wステージバリッド信号が
‘1’であり、Wステージインターロックコンディショ
ン信号が‘0’である時にアンド回路47からWステー
ジリリース信号、すなわちWステージを実行している命
令が完了したことを示す信号が出力される。一方アンド
回路48には、Wステージバリッド信号とWステージイ
ンターロックコンディション信号とが入力されており、
これらが‘1’である時にはアンド回路48の出力が
‘1’となり、その出力は前述のようにアンド回路43
及びオア回路44に与えられる。
The output of the AND circuit 43, that is, the E stage release signal is supplied to the AND circuit 47 via the flip-flop 46 as a W stage valid signal indicating that there is an instruction executing the W stage. The AND circuit 47 is supplied with a W stage interlock condition signal. When the W stage valid signal is “1” and the W stage interlock condition signal is “0”, the AND circuit 47 outputs a W stage release signal. , That is, a signal indicating that the instruction executing the W stage is completed. On the other hand, the W stage valid signal and the W stage interlock condition signal are input to the AND circuit 48,
When these are "1", the output of the AND circuit 48 is "1", and the output is as described above.
And an OR circuit 44.

【0048】次に並列命令実行時における本発明の実施
例について説明する。図13で説明した問題点を解決す
るためには、マルチフロー処理を必要とする命令と、単
一のフローのみの命令とを並列実行する場合には、マル
チフロー処理の最終フローでスコアボードのセット/リ
セットを行うと共に、単一のフローのみの命令の実行を
その最終フローの時点まで遅延させることが必要にな
る。
Next, an embodiment of the present invention at the time of executing a parallel instruction will be described. In order to solve the problem described with reference to FIG. 13, when an instruction requiring multi-flow processing and an instruction only for a single flow are executed in parallel, the scoreboard of the final flow of the multi-flow processing is used. In addition to performing set / reset, it is necessary to delay execution of instructions of only a single flow until the time of its final flow.

【0049】従って、例えばロード命令(メモリアクセ
ス命令)と乗算命令とを同時に実行する場合には単一フ
ローとしてのロード命令の実行とスコアボードのセット
/リセットを乗算命令の最終フローまで遅延させること
によってデータの相互干渉を防止する処理が可能とな
る。
Therefore, for example, when a load instruction (memory access instruction) and a multiplication instruction are executed simultaneously, execution of the load instruction as a single flow and set / reset of the scoreboard are delayed until the final flow of the multiplication instruction. As a result, it is possible to perform a process for preventing data interference.

【0050】以上説明した実施例においては、演算に用
いるデータは2個であり、従って読み出しレジスタが2
個、書き込みレジスタが1個の場合を説明したが、これ
らのデータ及びレジスタの数がこれに限定されないこと
は当然である。またこれらのレジスタ番号(アドレス)
が4ビットであり、従って図5におけるスコアボード内
のフリップフロップが16個の場合を説明したが、これ
らのビット数及びフリップフロップの数もこれに限定さ
れないことは当然である。更にマルチフローのフローの
数を2、または3として図4のマルチフローコントロー
ラを説明したが、マルチフロー処理のフローの数がこれ
に限定されないことは当然である。
In the embodiment described above, the data used for the operation is two, so that the read register has two data.
Although the description has been made of the case where the number of write registers is one, the number of these data and the number of registers is not limited to this. These register numbers (addresses)
Is 4 bits, and therefore, the case where the number of flip-flops in the scoreboard in FIG. 5 is 16 has been described. However, it is needless to say that the number of these bits and the number of flip-flops are not limited thereto. Further, the multiflow controller of FIG. 4 has been described with the number of flows of the multiflow being 2 or 3, but the number of flows of the multiflow processing is not limited to this.

【0051】[0051]

【発明の効果】以上詳細に説明したように、本発明によ
れば1つの命令を複数のフローに分けて処理するマルチ
フロー処理に対してもスコアボードを使用してデータの
相互依存関係を崩すことなく処理を行うことが可能とな
り、また命令を並列に実行する場合にもマルチフロー処
理を必要とする命令に対してはスコアボードのセット/
リセットを最終フローにおいて行い、マルチフロー処理
を必要としない命令をその最終フローまで実行を遅延さ
せることによってデータの相互干渉を解決することが可
能となる。
As described above in detail, according to the present invention, even in a multi-flow process in which one instruction is divided into a plurality of flows and processed, the interdependency of data is broken by using a scoreboard. Processing can be performed without instructions, and even when instructions are executed in parallel, a set of scoreboards /
By performing the reset in the final flow and delaying the execution of an instruction that does not require multiflow processing until the final flow, it is possible to solve the mutual interference of data.

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

【図1】本発明の原理ブロック図である。FIG. 1 is a principle block diagram of the present invention.

【図2】本発明における乗算命令の実行の様子を示す図
である。
FIG. 2 is a diagram showing a state of execution of a multiplication instruction in the present invention.

【図3】本発明におけるパイプライン処理計算機の実施
例の構成を示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration of an embodiment of a pipeline processing computer according to the present invention.

【図4】マルチフローコントローラの実施例の構成を示
すブロック図である。
FIG. 4 is a block diagram illustrating a configuration of an embodiment of a multi-flow controller.

【図5】スコアボードの実施例の構成を示すブロック図
である。
FIG. 5 is a block diagram showing a configuration of an embodiment of a scoreboard.

【図6】パイプラインコントローラの実施例の構成を示
すブロック図である。
FIG. 6 is a block diagram illustrating a configuration of an embodiment of a pipeline controller.

【図7】後続の命令が先行命令の完了を待たない場合の
動作を示す図である。
FIG. 7 is a diagram illustrating an operation when a subsequent instruction does not wait for completion of a preceding instruction.

【図8】スコアボードを用いた処理の動作を示す図であ
る。
FIG. 8 is a diagram illustrating an operation of a process using a scoreboard.

【図9】パイプライン処理計算機の従来例の構成を示す
ブロック図である。
FIG. 9 is a block diagram showing a configuration of a conventional example of a pipeline processing computer.

【図10】マルチフロー処理の例を示す図である。FIG. 10 is a diagram illustrating an example of multiflow processing.

【図11】乗算命令のマルチフロー処理の例を示す図で
ある。
FIG. 11 is a diagram illustrating an example of multiflow processing of a multiplication instruction.

【図12】乗算命令のハングアップ状態の例を示す図で
ある。
FIG. 12 is a diagram illustrating an example of a hang-up state of a multiplication instruction.

【図13】命令の並列実行における問題点を説明する図
である。
FIG. 13 is a diagram illustrating a problem in parallel execution of instructions.

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

1 命令デコーダ 2 汎用レジスタ(GR) 3,4 演算器 5,11 スコアボード 6 パイプラインコントローラ 7 パイプラインタグレジスタ 10 最終フロー検出手段 12 スコアボード更新制御手段 20 マルチフローコントローラ DESCRIPTION OF SYMBOLS 1 Instruction decoder 2 General-purpose register (GR) 3, 4 Operation unit 5, 11 Scoreboard 6 Pipeline controller 7 Pipeline tag register 10 Final flow detection means 12 Scoreboard update control means 20 Multiflow controller

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 先行して実行される命令と、該先行命令
に後続して実行される命令との間でのデータの依存関係
をチェックするスコアボードを備え、かつ1つの命令を
複数のフローに分けて実行することができるパイプライ
ン処理計算機において、 該複数のフローの最終フローを検出する最終フロー検出
手段(10)と、 該検出された最終フローにおいて、前記依存関係に対応
するスコアボード(12)の格納内容の更新を行わせる
スコアボード更新制御手段(11)とを備え、該依存関
係を乱すことのない処理を保証することを特徴とするパ
イプライン処理計算機。
1. A scoreboard for checking a data dependency between an instruction executed before and an instruction executed after the preceding instruction, and a single instruction is transmitted to a plurality of flows. A pipeline processing computer that can be executed separately; a final flow detection means (10) for detecting a final flow of the plurality of flows; and a scoreboard corresponding to the dependency in the detected final flow. 12. A pipeline processing computer comprising: a scoreboard update control means (11) for updating the stored contents of (12), and guaranteeing processing without disturbing the dependency.
【請求項2】 前記パイプライン処理計算機が並列に実
行する命令の中に、複数のフローに分けて実行する命令
が1つ以上あるとき、 該複数のフローに分けて実行する命令に対しては、該複
数のフローの最終フローにおいて前記スコアボードの格
納内容の更新を行い、 単一のフローで実行できる命令に対しては、該命令の実
行と該スコアボードの格納内容の更新とを、該複数のフ
ローに分けて実行する命令の最終フローまで遅延させる
ことを特徴とする請求項1記載のパイプライン処理計算
機。
2. When at least one instruction executed in a plurality of flows is executed among instructions executed in parallel by the pipeline processing computer, an instruction executed in a plurality of flows is executed. In the final flow of the plurality of flows, the content stored in the scoreboard is updated. For an instruction that can be executed in a single flow, the execution of the instruction and the update of the content stored in the scoreboard are performed by 2. The pipeline processing computer according to claim 1, wherein a delay is made until a final flow of instructions to be executed by dividing into a plurality of flows.
JP22164692A 1992-08-20 1992-08-20 Pipeline processing computer Expired - Lifetime JP2824484B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22164692A JP2824484B2 (en) 1992-08-20 1992-08-20 Pipeline processing computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22164692A JP2824484B2 (en) 1992-08-20 1992-08-20 Pipeline processing computer

Publications (2)

Publication Number Publication Date
JPH0667879A JPH0667879A (en) 1994-03-11
JP2824484B2 true JP2824484B2 (en) 1998-11-11

Family

ID=16770045

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22164692A Expired - Lifetime JP2824484B2 (en) 1992-08-20 1992-08-20 Pipeline processing computer

Country Status (1)

Country Link
JP (1) JP2824484B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3400458B2 (en) * 1995-03-06 2003-04-28 株式会社 日立製作所 Information processing device
US6807624B1 (en) 1998-12-17 2004-10-19 Fujitsu Limited Instruction control device and method therefor

Also Published As

Publication number Publication date
JPH0667879A (en) 1994-03-11

Similar Documents

Publication Publication Date Title
EP0111776B1 (en) Interrupt processor
US5404552A (en) Pipeline risc processing unit with improved efficiency when handling data dependency
US5596733A (en) System for exception recovery using a conditional substitution instruction which inserts a replacement result in the destination of the excepting instruction
EP0612012B1 (en) A pipeline computer with scoreboard
JPS592143A (en) Operation controlling system
JPH03116236A (en) Method and system for processing exception
JPS6217252B2 (en)
JPH0496825A (en) Data processor
EP0094535B1 (en) Pipe-line data processing system
KR101183270B1 (en) Method and data processor with reduced stalling due to operand dependencies
JP2620511B2 (en) Data processor
JP3336987B2 (en) Pipelined floating point store
JPH06195229A (en) Apparatus for interrupt handling in pipeline processor
JP3756410B2 (en) System that provides predicate data
US6055628A (en) Microprocessor with a nestable delayed branch instruction without branch related pipeline interlocks
JPH0673105B2 (en) Instruction pipeline type microprocessor
JPS59231652A (en) Detection system for memory access overlap
JP3338488B2 (en) Data processing device verification method and device
US5546551A (en) Method and circuitry for saving and restoring status information in a pipelined computer
JP2690406B2 (en) Processor and data processing system
JP2824484B2 (en) Pipeline processing computer
JPH09212360A (en) Data processor
EP0374598B1 (en) Control store addressing from multiple sources
EP0306891A2 (en) Pipelined slave protocol for high performance CPU-FPU cluster
EP1050800A1 (en) A pipelined execution unit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980804

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

Free format text: PAYMENT UNTIL: 20080911

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20080911

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090911

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20090911

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100911

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20100911

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20110911

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20120911

Year of fee payment: 14

EXPY Cancellation because of completion of term