JPS6364130A - Branching instruction control method - Google Patents

Branching instruction control method

Info

Publication number
JPS6364130A
JPS6364130A JP20830986A JP20830986A JPS6364130A JP S6364130 A JPS6364130 A JP S6364130A JP 20830986 A JP20830986 A JP 20830986A JP 20830986 A JP20830986 A JP 20830986A JP S6364130 A JPS6364130 A JP S6364130A
Authority
JP
Japan
Prior art keywords
instruction
branch
register
address
multiplexer
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.)
Pending
Application number
JP20830986A
Other languages
Japanese (ja)
Inventor
Ikuo Yasuda
育生 安田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP20830986A priority Critical patent/JPS6364130A/en
Publication of JPS6364130A publication Critical patent/JPS6364130A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To shorten an instruction executing time by reading the instruction of a branch destination address and executing the instruction immediately after the branch instruction in parallel by a pipeline control. CONSTITUTION:A pipeline register selecting circuit 17 is set to select an address register 3, an incrementer 7 and a pipeline register file 8. The reading address of a memory 1 is accommodated in the register 3, this is outputted through a multiplexer 2 to the memory 1 and the output data of the memory 1 are inputted to the file 8. The incrementer 7 adds +1 to an address and outputs it to a multiplexer 5. As the result A+1 is accommodated to the register 3. The data accommodated to the file 8 by a pipeline control circuit 10 decode an instruction A with an instruction register and an instruction decoder 12 through a multiplexer 11, at the time of an operation instruction, an operation and operation control circuit 14 is operated and the operation result is sent to a branch deciding circuit 16. Thus, the reading of the instruction and the execution are performed in parallel.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、情報処理分野、計測制御分野等に使用する電
子計算機の分岐命令制御方法に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a branch instruction control method for an electronic computer used in the information processing field, measurement control field, and the like.

従来の技術 従来、この種の分岐命令制御方法は演算命令実行後に分
岐命令を実行させ、分岐条件が成立した場合に所定の分
岐先へ分岐させるようになっている。
2. Description of the Related Art Conventionally, this type of branch instruction control method executes a branch instruction after execution of an arithmetic instruction, and branches to a predetermined branch destination when a branch condition is met.

発明が解決しようとする間頂点 しかしながら、上記従来の分岐命令制御方法では、 ■ 演算命令を実行し、結果として分岐条件を生成する
However, in the conventional branch instruction control method described above, (1) an arithmetic instruction is executed and a branch condition is generated as a result.

■ 分岐制御命令により、分岐条件が成立しているか否
かをチェックし、成立している場合、分岐先アドレスを
計算する。
(2) Check whether the branch condition is met using a branch control instruction, and if it is true, calculate the branch destination address.

■ 上記で計算したアドレスの命令を読み出し実行する
■ Read and execute the instruction at the address calculated above.

というシーケンシャルな平頭で制御を行っており、上記
命令実行時間は■、■、■の合計で決まるので、時間が
かかるという問題があった。
Control is performed in a sequential manner, and the above instruction execution time is determined by the sum of (1), (2), and (2), so there is a problem that it takes a long time.

そこで、本発明は、このような従来の問題点を解決する
ものであり、命令実行時間を短くすることができるよう
にした分岐命令制御方法を提供しようとするものである
SUMMARY OF THE INVENTION The present invention aims to solve these conventional problems and to provide a branch instruction control method that can shorten instruction execution time.

問題点を解決するための手段 本発明は、上記目的を達、成するために、命令の読み出
し実行をパイプライン化し、分岐命令をこれ以降に実行
される演算結果の分岐条件に対し作用させ、分岐命令直
後の演算命令の実行と分波先アドレスの読み出しとを並
行して行うものである。
Means for Solving the Problems In order to achieve the above object, the present invention pipelines instruction read execution, causes a branch instruction to act on a branch condition of an operation result to be executed thereafter, The execution of the arithmetic instruction immediately after the branch instruction and the reading of the branch destination address are performed in parallel.

作    用 本発明は、上記のような構成により次のような作用を有
する。すなわち、 ■ 分岐命令を実行することにより、分岐先アドレスを
計算すると共に、以降に実行される命令により発生する
演算結果に従い分岐する分岐条件を設定する。
Effects The present invention has the following effects due to the above configuration. That is, (1) By executing a branch instruction, a branch destination address is calculated, and a branch condition for branching is set according to the operation result generated by the instruction to be executed thereafter.

■ 演算命令を実行しながら、上記■で計算した分岐先
アドレスの命令を読み出す。
■ While executing the arithmetic instruction, read the instruction at the branch destination address calculated in (■) above.

■ 演算の結果が上記■で設定された分岐条件を満足さ
せた場合、上記■で求めた分岐先アドレスの命令を実行
する。
(2) If the result of the operation satisfies the branch condition set in (2) above, execute the instruction at the branch destination address determined in (2) above.

このように、上記■において演算命令の実行と分岐先ア
ドレスの命令の読み出しとを並行して行うことにより実
行時間の短縮を実現することができる。
In this way, execution time can be shortened by executing the arithmetic instruction and reading the instruction at the branch destination address in parallel in (1) above.

実施例 以下、本発明の実施例について図面を参照しながら説明
する。
EXAMPLES Hereinafter, examples of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例を示すブロック図である。第
1図において、1はメモリで、実行する命令を格納する
。2はメモリ1ヘアドレスを入力するためのマルチプレ
クサ、3,4はメモリ1を読み出すアドレスを一時的に
格納するアドレスレジスタで、マルチプレクサ2は後述
するパイプラインレジスタ選択回路17の信号によりア
ドレスレジスタ3または4のいづれかをメモリ1へのア
ドレスとして選択する。5,6はマルチプレクサで、共
に後述するインクリメンタ7と命令実行シーケンス制御
回路13に接続されており、パイプラインレジスタ選択
回路17の信号によりインクリメンタ7または命令実行
シーケンス制御回路13からの信号のいずれか一方を選
択し、それぞれアドレスレジスタ3,4へ出力する。7
はインクリメンタで、マルチブレクー9−2からの出力
であるメモリアドレスをインクリメントし、マルチプレ
クサ5と6へ出力する。8,9はメモリ1からのデータ
(命令)を格納するパイプラインレジスタ選択回路17
の信号によりメモリ1のデータがそれらのいずれに入力
されるかが決まり、またそれらの出力のいずれが後述す
るマルチプレクサ11 へ入力されるかが決まる。10
はパイプライン制御回路で、パイプラインレジスタファ
イル8゜9の書き込み・読み出しを制御する。11はマ
ルチプレクサで、パイプラインレジスタ選択回路17 
の信号に従いパイプラインレジスタファイル8.9の入
力のいずれかを命令レジスタおよび命令デコーダ12へ
出力する。命令レジスタおよび命令デコーダ12は実行
すべき命令を一時的に記憶すると共に、命令を解説し、
命令に対応した回路を選択する。13は命令実行シーケ
ンス制御回路、14は演算および演算制御回路、15は
分岐条件レジスタで、命令実行シーケンス制御回路13
 において分岐命令を実行した場合の分岐条件が設定さ
れる。16は分岐判定回路で、演算および演算制御回路
14、分岐条件レジスタ15の入力に基づき分岐すべき
かどうか判定し、その結果を命令実行シーケンス制御回
路13、パイプラインレジスタ選択回路17へ出力する
FIG. 1 is a block diagram showing one embodiment of the present invention. In FIG. 1, 1 is a memory that stores instructions to be executed. 2 is a multiplexer for inputting an address to memory 1; 3 and 4 are address registers for temporarily storing an address to read from memory 1; multiplexer 2 selects address register 3 or 4 as the address to memory 1. Numerals 5 and 6 are multiplexers, both of which are connected to an incrementer 7 and an instruction execution sequence control circuit 13, which will be described later. One of them is selected and outputted to address registers 3 and 4, respectively. 7
is an incrementer that increments the memory address output from the multiplexer 9-2 and outputs it to the multiplexers 5 and 6. 8 and 9 are pipeline register selection circuits 17 that store data (instructions) from memory 1;
The signal determines which of them the data in the memory 1 is input to, and also determines which of their outputs is input to the multiplexer 11, which will be described later. 10
is a pipeline control circuit that controls writing and reading of the pipeline register file 8.9. 11 is a multiplexer, and pipeline register selection circuit 17
According to the signal, any of the inputs of the pipeline register file 8.9 is output to the instruction register and instruction decoder 12. The instruction register and instruction decoder 12 temporarily stores instructions to be executed, and interprets the instructions.
Select the circuit corresponding to the instruction. 13 is an instruction execution sequence control circuit; 14 is an arithmetic and arithmetic control circuit; 15 is a branch condition register;
A branch condition is set when a branch instruction is executed in . A branch determination circuit 16 determines whether or not to branch based on the inputs of the arithmetic and arithmetic control circuit 14 and the branch condition register 15, and outputs the result to the instruction execution sequence control circuit 13 and pipeline register selection circuit 17.

パイプラインレジスタ選択回路17は分岐判定回路16
からの出力に従い(分岐条件が成立したか否かにより)
、上記のようにマルチプレクサ5.6パイプラインレジ
スタフアイル8,9、マルチプレクサ11 を制御する
Pipeline register selection circuit 17 is branch judgment circuit 16
According to the output from (depending on whether the branch condition is met or not)
, controls multiplexer 5.6, pipeline register files 8, 9, and multiplexer 11 as described above.

次に分岐命令制御方法(二ついて第2図に示す分岐制御
ンーケンスチャートを参照しながら説明する。今、パイ
プラインレジスタ選択回路17はアドレスレジスタ3、
インクリメンタ7、パイプラインレジスタファイル8を
選択するように設定されているとする。メモリ1の読み
出しアドレスはアドレスレジスタ3に格納されており(
Aになっている)、これがマルチプレクサ2を介してメ
モリ1へのアドレスとして出力され、メモリ1の出力デ
ータがパイプラインレジスタファイル8へ入力される。
Next, a branch instruction control method will be explained with reference to the branch control sequence chart shown in FIG.
Assume that settings are made to select incrementer 7 and pipeline register file 8. The read address of memory 1 is stored in address register 3 (
A), this is output as an address to the memory 1 via the multiplexer 2, and the output data of the memory 1 is input to the pipeline register file 8.

パイプラインレジスタファイル8ヘデータが格納される
と、インクリメンタ7はアドレスを+1してこれをマル
チプレクサ5へ出力する。
When the data is stored in the pipeline register file 8, the incrementer 7 increments the address by 1 and outputs this to the multiplexer 5.

その結果、アドレスレジスタ3へはA+1が格納され、
メモリ1へのアドレス+1されたことになる。一方、パ
イプラインレジスタファイル8へ入力されたデータはパ
イプライン制御回路10によりパイプラインレジスタフ
ァイル8へ格納され、このデータはマルチプレクサ11
を介して命令レジスタおよび命令デコーダ12に入力さ
れる。この命令レジスタおよび命令デコーダ12でAの
命令を解読し、演算命令であれば、演算および演算制御
回路14を作動させ、この演算および演算制御回路14
での演算結果が分岐判定回路16へ送られる。以上のよ
うに命令の読み出しとその実行(AからA+5番地まで
の読み出し、A+3番地までの実行)が並行して行われ
る。
As a result, A+1 is stored in address register 3,
This means that the address to memory 1 has been increased by 1. On the other hand, the data input to the pipeline register file 8 is stored in the pipeline register file 8 by the pipeline control circuit 10, and this data is stored in the pipeline register file 8 by the multiplexer 11.
is input to the instruction register and instruction decoder 12 via the instruction register and instruction decoder 12. The instruction register and instruction decoder 12 decode the instruction A, and if it is an arithmetic instruction, the arithmetic and arithmetic control circuit 14 is activated;
The result of the calculation is sent to the branch determination circuit 16. As described above, the reading of an instruction and its execution (reading from address A to A+5, execution to address A+3) are performed in parallel.

パイプラインレジスタファイル8からの出力データ(命
令)が分岐命令であった場合、例えば、A+3番地の命
令が以後の演算結果がZEROならBへ分岐せよという
命令であった場合、命令レジスタおよび命令デコーダ1
2で命令が解読され、命令レジスタおよび命令デコーダ
12が命令実行シーケンス制御回路13を作動させる。
If the output data (instruction) from the pipeline register file 8 is a branch instruction, for example, if the instruction at address A+3 is an instruction to branch to B if the subsequent operation result is ZERO, the instruction register and instruction decoder 1
The instruction is decoded at step 2, and the instruction register and instruction decoder 12 activate the instruction execution sequence control circuit 13.

命令実行シーケンス制御回路13は分岐条件を分岐条件
レジスタ15 に設定すると共に、パイプラインレジス
タ選択回路17を作動させ、命令の入力経路として、ア
ドレスレジスタ4、マルチプレクサ6、パイプラインレ
ジスタファイル9を選択するように指示する。同時に分
岐アドレスを計算しくその結果計算結果なりとする)、
アドレスレジスタ4に書き込む。これによりアドレスレ
ジスタ4からメモリ1へのアドレスBが出力され、その
データがパイプラインレジスタファイル9へ格納される
The instruction execution sequence control circuit 13 sets the branch condition in the branch condition register 15 and activates the pipeline register selection circuit 17 to select the address register 4, multiplexer 6, and pipeline register file 9 as the instruction input path. instruct them to do so. At the same time, the branch address is calculated and the result is the calculation result),
Write to address register 4. As a result, address B is output from the address register 4 to the memory 1, and the data is stored in the pipeline register file 9.

この動作と並行してA+4番地の命令がパイプラインレ
ジスタファイル8、マルチプレクサ11、命令レジスタ
および命令デコーダ12、演算および演算制御回路14
を経由して実行され、演算結果が分岐判定回路16へ送
られる。分岐判定回路16では演算および演算制御回路
14の演算結果と分岐命令で設定された分岐条件レジス
タ15 の内容を比較し、その結果を命令実行シーケン
ス制御回路13、パイプラインレジスタ選択回路17へ
送る。分岐条件が成立したならパイプラインレジスタ選
択回路17はマルチプレクサ6、アドレスレジスタ4、
パイプラインレジスタファイル9を選択(すなわち、B
+1、B+2、・・・・・)し、命令実行シーケンス制
御回路13は分岐条件レジスタ15をクリアする。不成
立の場合、パイプラインレジスタ選択回路17はマルチ
プレクサ5、アドレスレジスタ3、パイプラインレジス
タファイル8を選択(すなわち、A+5、A+6、・・
・)を選択する。
In parallel with this operation, the instruction at address A+4 is transferred to the pipeline register file 8, multiplexer 11, instruction register and instruction decoder 12, arithmetic and arithmetic control circuit 14.
The calculation result is sent to the branch judgment circuit 16. The branch determination circuit 16 compares the calculation result of the calculation and calculation control circuit 14 with the contents of the branch condition register 15 set by the branch instruction, and sends the result to the instruction execution sequence control circuit 13 and the pipeline register selection circuit 17. If the branch condition is satisfied, the pipeline register selection circuit 17 selects multiplexer 6, address register 4,
Select pipeline register file 9 (i.e. B
+1, B+2, . . .), and the instruction execution sequence control circuit 13 clears the branch condition register 15. If not established, the pipeline register selection circuit 17 selects the multiplexer 5, address register 3, and pipeline register file 8 (i.e., A+5, A+6, . . .
・) Select.

発明の効果 本発明は上記のように分岐命令が以後の演算命令に対し
て分岐条件を設定することになり、パイプライン制御に
より分岐先アドレスの命令の読み出しと、分岐命令の直
後の命令の実行を並行して行うことができ、従って命令
実行時間の短縮を実現することができる。
Effects of the Invention In the present invention, as described above, a branch instruction sets a branch condition for subsequent operation instructions, and pipeline control allows reading of the instruction at the branch destination address and execution of the instruction immediately after the branch instruction. can be executed in parallel, and therefore the instruction execution time can be shortened.

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

第1図は本発明の一実施例における分岐命令制御方法説
明用のブロック図、第2図は本発明方法のシーケンスチ
ャートである。 1・・・メモリ、2・・・マルチプレクサ、3,4・・
・メモリアドレスレジスタ、5,6 ・マルチプレクサ
、7・・・アドレスインクリメンタ、8,9・・・パイ
プラインレジスタファイル、lO・・・パイプライン制
御回路、12・・・命令レジスタおよび命令デコーダ、
11・・・マルチプレクサ、13・・・命令実行シーケ
ンス制御回路、14・・・演算および演算制御回路、1
5・・・分岐条件レジスタ、16・・・分岐判定回路、
17・・・パイプラインレジスタ選択回路。
FIG. 1 is a block diagram for explaining a branch instruction control method in an embodiment of the present invention, and FIG. 2 is a sequence chart of the method of the present invention. 1...Memory, 2...Multiplexer, 3, 4...
・Memory address register, 5, 6 ・Multiplexer, 7...Address incrementer, 8, 9...Pipeline register file, 1O...Pipeline control circuit, 12...Instruction register and instruction decoder,
11... Multiplexer, 13... Instruction execution sequence control circuit, 14... Arithmetic and arithmetic control circuit, 1
5... Branch condition register, 16... Branch judgment circuit,
17...Pipeline register selection circuit.

Claims (1)

【特許請求の範囲】[Claims] 命令の読み出し実行をパイプライン化し、分岐命令をこ
れ以降に実行される演算結果の分岐条件に対し作用させ
、分岐命令直後の演算命令の実行と分岐先アドレスの読
み出しとを並行して行うことを特徴とする分岐命令制御
方法。
The execution of read instructions is pipelined, the branch instruction acts on the branch condition of the operation result executed after this, and the execution of the operation instruction immediately after the branch instruction and the read of the branch destination address are performed in parallel. Characteristic branch instruction control method.
JP20830986A 1986-09-04 1986-09-04 Branching instruction control method Pending JPS6364130A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20830986A JPS6364130A (en) 1986-09-04 1986-09-04 Branching instruction control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20830986A JPS6364130A (en) 1986-09-04 1986-09-04 Branching instruction control method

Publications (1)

Publication Number Publication Date
JPS6364130A true JPS6364130A (en) 1988-03-22

Family

ID=16554120

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20830986A Pending JPS6364130A (en) 1986-09-04 1986-09-04 Branching instruction control method

Country Status (1)

Country Link
JP (1) JPS6364130A (en)

Similar Documents

Publication Publication Date Title
US8677102B2 (en) Instruction fusion calculation device and method for instruction fusion calculation
JPS633337B2 (en)
JPS6351287B2 (en)
US7774582B2 (en) Result bypassing to override a data hazard within a superscalar processor
JPH0348536B2 (en)
JPH05150979A (en) Immediate operand expansion system
JPH03286332A (en) Digital data processor
JPS6364130A (en) Branching instruction control method
JP2812610B2 (en) Pipeline control method
JPH07110769A (en) Vliw type computer
JPS5995646A (en) Arithmetic control system
JP2915131B2 (en) Data processing device
JP2000305782A (en) Arithmetic unit
JPS59223846A (en) Arithmetic processor
JPH01147723A (en) Pipe line processing system for information processor
JPH05204638A (en) Pipeline processor
JPH07113891B2 (en) Pipeline processing equipment
JPH02184922A (en) Program counter
JPH01271842A (en) Information processor
JPS6155731A (en) Processor provided with condition code discriminating function
JPS59160239A (en) Information processing device
JPS62103736A (en) Branch control system
JPH05334265A (en) Information processor and processing method
JPH02100137A (en) Instruction execution control system
JPH0769800B2 (en) Data processing device