JPS6257028A - Branch control system in information processor of pipeline control - Google Patents

Branch control system in information processor of pipeline control

Info

Publication number
JPS6257028A
JPS6257028A JP19721685A JP19721685A JPS6257028A JP S6257028 A JPS6257028 A JP S6257028A JP 19721685 A JP19721685 A JP 19721685A JP 19721685 A JP19721685 A JP 19721685A JP S6257028 A JPS6257028 A JP S6257028A
Authority
JP
Japan
Prior art keywords
instruction
branch
address
cycle
register
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.)
Granted
Application number
JP19721685A
Other languages
Japanese (ja)
Other versions
JPH0431134B2 (en
Inventor
Aiichiro Inoue
愛一郎 井上
Yuji Oinaga
勇次 追永
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 JP19721685A priority Critical patent/JPS6257028A/en
Publication of JPS6257028A publication Critical patent/JPS6257028A/en
Publication of JPH0431134B2 publication Critical patent/JPH0431134B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To decrease the execution cycle after release of interlock by executing the calculation of a branch destination address and the fetch of a target instruction precedingly when a branch instruction is interlocked. CONSTITUTION:In the flow of a branch-on counter instruction (BCT), when the instruction is interlocked in the AW cycle of the instruction just before, an address computing element (OEAG) 24 is used, the address of branch destination is calculated at the 2nd cycle D. In the flow of the target instruction next, an address from the BCT instruction is sent as an output of the OEAG 24, it is given in an instruction effective address register IEAR 30a to apply the instruction fetch from an instruction fetch local buffer memory IF-LBS 30 and the result is set to an instruction address register IARB 33 for the succeeding instruction fetch. The fetched instruction enters an instruction word register 31 or 32, whether or not the BCT instruction is to be fetched is executed to select either of the register 31, 32 and an instruction is given to the pipeline.

Description

【発明の詳細な説明】 〔概要〕 パイプライン制御の情報処理装置で、ブランチ命令がア
ドレス計算のサイクルでインターロックとなった場合に
、そのブランチ先アドレスの計算とターゲット命令のフ
ェッチを先行して実行することにより、インターロック
解除後の実行サイクルを短縮する。
[Detailed Description of the Invention] [Summary] In a pipeline-controlled information processing device, when a branch instruction becomes interlocked in an address calculation cycle, calculation of the branch destination address and fetch of the target instruction are performed in advance. By executing this, the execution cycle after the interlock is released is shortened.

〔産業上の利用分野〕[Industrial application field]

本発明は、パイプライン制御の情報処理装置における命
令実行制御方式に関するものであり、特に先行命令イン
ターロック時のブランチ命令の制御方式に関する。
The present invention relates to an instruction execution control method in a pipeline-controlled information processing device, and particularly to a control method for branch instructions during a preceding instruction interlock.

〔従来の技術〕[Conventional technology]

1サイクル方式のパイプライン制御の情報処理装置では
、基本的には複数のステージからなるパイプラインに、
各サイクルごとに命令を供給し。
In an information processing device that uses one-cycle pipeline control, the pipeline is basically made up of multiple stages.
Provides instructions every cycle.

複数の命令を各サイクルでステージ単位にずらせて並行
処理することにより、処理の高速化を図るものである。
By processing multiple instructions in parallel by shifting them stage by stage in each cycle, processing speed is increased.

たとえば1次のフローで示されるような動作シーケンス
がとられる。
For example, an operation sequence as shown in the first-order flow is taken.

命令→DATBEW 命令→DATBEW 命令→DATBEW ここで。Command → DATBEW Command → DATBEW Command → DATBEW here.

D=命令デコード Aニアドレス生成 Tニアドレス変換 B:バッファ E:実行 W:書き込み の各サイクルを表している。D = instruction decode A near address generation T-near address conversion B: Buffer E: Execute W:Write represents each cycle.

このようなパイプライン制御の情輻処理装置では、ブラ
ンチ命令の1つであるBCT(ブランチ・オン・カウン
タ)命令を用いて、同一処理を一定回数繰り返すループ
を構成する方法がとられることが多い。
Such pipeline-controlled information processing devices often use a BCT (branch on counter) instruction, which is one of the branch instructions, to construct a loop that repeats the same process a certain number of times. .

このBCT命令は、実行時に、指定された汎用レジスタ
(ループカウンタ)から“1”を減算し。
This BCT instruction subtracts "1" from the specified general-purpose register (loop counter) when executed.

減結果が“0”でない場合にはブランチして、ブtて ランチ先の命令(ターゲット命令と呼ぶ)を実行させ、
減算結果の値が“O”の場合には、ループの次の命令を
実行させるものである。たとえば。
If the reduction result is not "0", branch and execute the instruction at the branch destination (called the target instruction),
If the value of the subtraction result is "O", the next instruction in the loop is executed. for example.

BCT命令を用いたループは1次のように表される。A loop using BCT instructions is expressed as follows.

LOOP    AR BCT  R1,LOOP ところで、’BCT命令の前に、多数のサイクルを要す
る演算命令、たとえば浮動小数点演算命令が置かれてい
る場合、第3図に示すように、先行する命令がインター
ロックされることによって。
LOOP AR BCT R1, LOOP By the way, if an arithmetic instruction that requires a large number of cycles, such as a floating point arithmetic instruction, is placed before the 'BCT instruction, the preceding instruction is interlocked as shown in Figure 3. By doing that.

BCT命令の直前の命令がAサイクルで待たされ。The instruction immediately before the BCT instruction is forced to wait in A cycle.

BCT命令はDサイクルで待たされるという状況がしば
しば見られる。
A situation is often seen in which the BCT instruction is forced to wait in the D cycle.

なお3図中のターゲット命令の1.IT、IBは、命令
フェッチのサイクルを示している。すなわち、BCT命
令は、Dサイクルでの待ち状態が解除された後、ブラン
チ条件が成立している場合(ループカウンタの値=O)
、ブランチ先のアドレスが生成され、ターゲット命令の
フェッチと実行が行われる。
Note that 1. of the target commands in Figure 3. IT and IB indicate instruction fetch cycles. In other words, the BCT instruction is executed when the branch condition is satisfied after the wait state in the D cycle is released (loop counter value = O).
, the branch destination address is generated, and the target instruction is fetched and executed.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

プログラムのループ中に、インターロックを生じる命令
があると、以後の命令の実行時間も大幅に遅れ、処理速
度が著しく低下するという問題があった。
If there is an instruction that causes an interlock during a program loop, there is a problem in that the execution time of subsequent instructions is significantly delayed, resulting in a significant decrease in processing speed.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、インターロックを生じる命令の後にブランチ
命令がある場合、ブランチ命令が命令デコードサイクル
で待たされている間に、ブランチ先のターゲット命令の
アドレス計算とフェッチが可能であることを利用して、
インターロックによる遅れの回復を図るものである。
The present invention takes advantage of the fact that when a branch instruction follows an instruction that causes an interlock, it is possible to calculate and fetch the address of the target instruction at the branch destination while the branch instruction is waiting in an instruction decode cycle. ,
This is intended to recover from delays caused by interlocks.

第1図は9本発明の原理を示すパイプラインの命令実行
制御シーケンスのフローの例である。
FIG. 1 is an example flow of a pipeline instruction execution control sequence illustrating the principle of the present invention.

図において、Dは命令デコード、Aはアドレス生成、T
はアドレス変換、Bはバッファ、Eは実行、Wは書き込
み、I、IT、IBは命令フェッチの各サイクルを示す
。またBCTは、ブランチ・オン・カウンタ命令である
In the figure, D is instruction decoding, A is address generation, and T
indicates address conversion, B indicates buffer, E indicates execution, W indicates write, and I, IT, and IB indicate instruction fetch cycles. Also, BCT is a branch on counter instruction.

■の命令は、演算に複数サイクルを要する命令であり、
E(実行)サイクルにおいてインターロックがかけられ
る。このため、以後の■ないし■の命令はそれぞれB、
T、A、Dの各サイクルで待ち状態となる。
The instruction in ■ is an instruction that requires multiple cycles to perform the operation.
An interlock is applied in the E (execution) cycle. Therefore, the subsequent commands ■ through ■ are B, respectively.
It enters a waiting state in each cycle of T, A, and D.

■のBCT’命令は、Dサイクルで待ち状態に入゛る。The BCT' instruction (2) enters the wait state in the D cycle.

BCT命令は、Dサイクルで、オペランドアドレスを計
算した後、結果をレジスタに一旦保持し1次にブランチ
先のアドレスを計算して、■のターゲット命令をフェッ
チするI、IT、IBサイクルを実行する。
The BCT instruction calculates the operand address in the D cycle, holds the result in a register, calculates the branch destination address first, and executes the I, IT, and IB cycles to fetch the target instruction in ■. .

その後、インターロックが解除されたとき、ブランチ条
件が満足されていれば直ちにターゲット命令の実行が可
能となる。
Thereafter, when the interlock is released, the target instruction can be executed immediately if the branch condition is satisfied.

〔作用〕[Effect]

本発明によれば、先行命令にインターロックが生じたと
き、後続のブランチ命令がDサイクルで待ちとなる最適
の状況では、ブランチ先のターゲット命令のフェッチに
よる損失時間は、インターロック期間中のブランチ命令
の待ち時間に吸収されるため、インターロック解除後の
ターゲット命令の実行開始が早められる。
According to the present invention, when an interlock occurs in a preceding instruction, in the optimal situation where the subsequent branch instruction waits in D cycles, the time lost due to fetching the target instruction at the branch destination is reduced by the branch instruction during the interlock period. Since it is absorbed by the instruction waiting time, execution of the target instruction after the interlock is released is accelerated.

〔実施例〕〔Example〕

第2図は1本発明の1実施例によるパイプラインのフロ
ーを示す図である。
FIG. 2 is a diagram showing a pipeline flow according to one embodiment of the present invention.

図において、(a)はブランチ・オン・カウンタ命令B
CTの直前の命令のパイプラインのフロー。
In the figure, (a) is a branch on counter instruction B.
Pipeline flow of the instruction immediately before CT.

(blはブランチ・オン・カウンタ命令BCTのパイプ
ラインのフロー、(C)はターゲット命令のパイプライ
ンのフローを示す。
(bl shows the pipeline flow of the branch-on-counter instruction BCT, and (C) shows the pipeline flow of the target instruction.

また21はペースレジスタBR,22はインデクスレジ
スタXR,23はディスプレイスメントレジスタDR,
24はオペランド実効アドレス演算器0EAG、25は
オペランド実効アドレスコピーレジスタ0EAR−CO
PY、26はオペランドローカルバッファメモリ0P−
LBS、26aはオペランド実効アドレスレジスタ0E
AR。
Further, 21 is a pace register BR, 22 is an index register XR, 23 is a displacement register DR,
24 is an operand effective address calculator 0EAG, 25 is an operand effective address copy register 0EAR-CO
PY, 26 is operand local buffer memory 0P-
LBS, 26a is operand effective address register 0E
A.R.

27はオペランド書き込みレジスタOWR,28は命令
アドレスレジスタIARA、33は命令アドレスレジス
タIARB、29は命令実効アドレス演算器IEAG、
30は命令フェッチローカルバッファメモリIF−LB
S、30aは命令実効アドレスレジスタIEAR,31
は命令語レジスタIWRA、3°2は命令語レジスタI
WRBを表している。
27 is an operand write register OWR, 28 is an instruction address register IARA, 33 is an instruction address register IARB, 29 is an instruction effective address calculator IEAG,
30 is an instruction fetch local buffer memory IF-LB
S, 30a is an instruction effective address register IEAR, 31
is instruction word register IWRA, 3°2 is instruction word register I
It represents WRB.

この実施例では、オペランドと命令は、それぞれ別のア
ドレス計算用の演算器(OE A GとIEAG)とバ
ッファメモリ (OP −L B SとIF−LBS)
とを持っている。
In this embodiment, operands and instructions are handled by separate address calculation units (OEAG and IEAG) and buffer memories (OP-LBS and IF-LBS).
and have.

最初のフロー(a)は、オペランドフェッチを伴う命令
のものであり、Aサイクルで、オペランドアドレスを0
EAG24により計算し、結果を0EAR−COPY2
5に入れて、Aサイクルでインターロックしている(A
Wサイクル)。
The first flow (a) is for an instruction that involves an operand fetch, and in cycle A, the operand address is set to 0.
Calculated by EAG24 and the result is 0EAR-COPY2
5 and interlocked in A cycle (A
W cycle).

そしてインターロックが解除された後、オペランドのア
クセスのため、0EAR−COPY25の内容を0EA
R26aに入れて、0P−LBS26から0WR27に
データを読み出している。
After the interlock is released, the contents of 0EAR-COPY25 are copied to 0EA for operand access.
The data is read from 0P-LBS26 to 0WR27.

次のフロー(blは、BCT命令のフローでアリ。Next flow (bl is the flow of BCT instruction.

前のフロー(alがAWサイクルでインターロックして
いる時、0EAG24が使えるので、はじめのDサイク
ルでBR21,XR22,DR23にそれぞれ第2オペ
ランドのベース、インデクス、ディスプレイスメントの
値を入れ、2サイクル目のDで、0EAG24を用いて
ブランチ先のアドレスを計算している。
Previous flow (When al is interlocked in the AW cycle, 0EAG24 can be used, so in the first D cycle, put the base, index, and displacement values of the second operand into BR21, XR22, and DR23, respectively, and perform 2 cycles At step D, the branch destination address is calculated using 0EAG24.

そしてその後、インターロックが解除すると。And then the interlock is released.

順にA、T、B、E、Wの各サイクルへ進む。The process proceeds to cycles A, T, B, E, and W in order.

なお、ブランチするかしないかの決定は、本図の実施例
では、Dサイクルで行えるものとしている。
In the embodiment shown in this figure, it is assumed that the decision as to whether to branch or not can be made in the D cycle.

次のフロー(C)は、ターゲットの命令のフローを示し
ている。
The next flow (C) shows the target instruction flow.

フロー(blのBCT命令からのアドレスが、 0EA
G24の出力として送られ、これをI EAR30aに
入れて、命令フェッチをI F−LBS 30から行う
と同時に、以後の命令のフェッチのため。
If the address from the BCT instruction of flow (bl is 0EA
It is sent as the output of G24 and is put into the I EAR 30a to perform an instruction fetch from the I F-LBS 30 and at the same time for fetching subsequent instructions.

IARB33にセットする。Set to IARB33.

フェッチされた命令は、IWRA3”1またはIWRB
32に入り、BCT命令のブランチするか否かの決定に
従って、IWRA31.IWRB32のいずれかが選択
されて、パイプラインに命令が投入される。
The fetched instruction is IWRA3”1 or IWRB
32 and, in accordance with the branch-or-no-branch decision of the BCT instruction, IWRA 31. One of the IWRBs 32 is selected and an instruction is input to the pipeline.

図は、IW’RA31に通常の実行順序による命令、I
WRB32にブランチ先のターゲット命令が入っていて
、ブランチすることが決定されたことから、ターゲット
側のIWRB32が選択されている様子を示す。
The figure shows instructions in the normal execution order in IW'RA31, I
It is shown that the IWRB 32 on the target side is selected because the WRB 32 contains the target instruction of the branch destination and it has been decided to branch.

また、この場合、即ちブランチする場合においては、命
令アドレスレジスタは、IARB33が選択されて、以
後の命令のフェッチが行われる。
In this case, that is, in the case of branching, IARB33 is selected as the instruction address register, and subsequent instructions are fetched.

一方、ブランチしない場合には、命令アドレスレジスタ
はIARA28が選択されて、以後の命、令のフェッチ
が行われる。
On the other hand, if there is no branch, IARA 28 is selected as the instruction address register, and subsequent instructions are fetched.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、ループ中のブランチ命令のブランチ先
アドレスの計算とターゲット命令のフェッチとが先行命
令のインターロック期間中に実行されるため、インター
ロッ久解除後のブランチ。
According to the present invention, since the calculation of the branch destination address of the branch instruction in the loop and the fetch of the target instruction are executed during the interlock period of the preceding instruction, the branch after the interlock is released.

すなわちターゲット命令の実行が直ちに開始できるため
、命令実行時間が短縮され、情報処理装置の処理速度の
向上を図ることができる。
In other words, since execution of the target instruction can be started immediately, the instruction execution time can be shortened, and the processing speed of the information processing device can be improved.

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

第1図は本発明の原理によるパイプラインの制御シーケ
ンスのフロー図、第2図は本発明の1実施例のパイプラ
インのフロー図、第3図は従来方式によるパイプライン
の制御シーケンスのフロー図である。 第1図中。 D=命令デコードサイクル Aニアドレス生成サイクル Tニアドレス変換サイクル B:バッファサイクル E:実行サイクル W:書き込みサイクル
Fig. 1 is a flow diagram of a pipeline control sequence according to the principle of the present invention, Fig. 2 is a flow diagram of a pipeline according to an embodiment of the present invention, and Fig. 3 is a flow diagram of a pipeline control sequence according to a conventional method. It is. In Figure 1. D=Instruction decode cycle A Near address generation cycle T Near address conversion cycle B: Buffer cycle E: Execution cycle W: Write cycle

Claims (1)

【特許請求の範囲】[Claims] パイプライン制御の情報処理装置において、直前の命令
がアドレス計算のサイクルでインターロックされる時に
、この演算結果をレジスタに保存して、アドレス計算で
用いた演算器を解放し、上記インターロックされている
命令の直後にブランチ命令がある場合、その命令デコー
ドのサイクルで上記解放された演算器によりブランチ先
アドレスの計算を行い、ターゲットの命令フェッチを行
うことを特徴とするブランチ制御方式。
In a pipeline-controlled information processing device, when the immediately preceding instruction is interlocked in an address calculation cycle, this operation result is stored in a register, the arithmetic unit used in address calculation is released, and the above interlocked If there is a branch instruction immediately after a branch instruction, the freed arithmetic unit calculates the branch destination address in the cycle of decoding the instruction, and fetches the target instruction.
JP19721685A 1985-09-06 1985-09-06 Branch control system in information processor of pipeline control Granted JPS6257028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19721685A JPS6257028A (en) 1985-09-06 1985-09-06 Branch control system in information processor of pipeline control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19721685A JPS6257028A (en) 1985-09-06 1985-09-06 Branch control system in information processor of pipeline control

Publications (2)

Publication Number Publication Date
JPS6257028A true JPS6257028A (en) 1987-03-12
JPH0431134B2 JPH0431134B2 (en) 1992-05-25

Family

ID=16370763

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19721685A Granted JPS6257028A (en) 1985-09-06 1985-09-06 Branch control system in information processor of pipeline control

Country Status (1)

Country Link
JP (1) JPS6257028A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007057116A (en) * 2005-08-22 2007-03-08 Sharp Corp Indoor ventilation system, and its method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007057116A (en) * 2005-08-22 2007-03-08 Sharp Corp Indoor ventilation system, and its method

Also Published As

Publication number Publication date
JPH0431134B2 (en) 1992-05-25

Similar Documents

Publication Publication Date Title
JPH0348536B2 (en)
JPS62226232A (en) Control system for branch instruction
US6055628A (en) Microprocessor with a nestable delayed branch instruction without branch related pipeline interlocks
JPS6257028A (en) Branch control system in information processor of pipeline control
CN112579168B (en) Instruction execution unit, processor and signal processing method
JP3335735B2 (en) Arithmetic processing unit
JP2558831B2 (en) Pipeline control method
JP2944563B2 (en) Pipeline type information processing device
JPS61173345A (en) Computer system
JPS60198640A (en) Pipeline type information processor
JP2503223B2 (en) Prior control method
JP2597744B2 (en) Branch control method
JP3743155B2 (en) Pipeline controlled computer
JPS60247743A (en) Pipeline arithmetic controller
JPH04316127A (en) Information processor
JPH02211533A (en) Computer apparatus for performing selective execution of instruction following branch instruction
JPH05204638A (en) Pipeline processor
JPS6373335A (en) Information processor
JPS61143850A (en) Processor
JPH04116726A (en) Information processor
JPH04276827A (en) Pipe line processor
JPS5892041A (en) Data processor
JPS61100836A (en) System for processing comparison and instruction of moving instruction logic
JPH03161834A (en) Information processor
JPS63197233A (en) Information processor