JPS62103736A - Branch control system - Google Patents

Branch control system

Info

Publication number
JPS62103736A
JPS62103736A JP24265685A JP24265685A JPS62103736A JP S62103736 A JPS62103736 A JP S62103736A JP 24265685 A JP24265685 A JP 24265685A JP 24265685 A JP24265685 A JP 24265685A JP S62103736 A JPS62103736 A JP S62103736A
Authority
JP
Japan
Prior art keywords
instruction
branch
condition code
register
cycle
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
JP24265685A
Other languages
Japanese (ja)
Inventor
Katsumi Onishi
克己 大西
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 JP24265685A priority Critical patent/JPS62103736A/en
Publication of JPS62103736A publication Critical patent/JPS62103736A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To execute a conditioned branch instruction at high speed by making a branch decision simultaneously with a condition code when there is the specific kind of instruction belonging to an instruction which varies a condition code right before the conditioned branch instruction. CONSTITUTION:When an E instruction code 23 is decoded and it is the specific kind of condition code conversion instruction, it is judged with operand word register is selected. A condition code is generated based on the contents of the selected operant word register and the E instruction code and the generated condition code is compared with the contents of a mask register 19 to judge whether branching is performed or not. A branch decision is already made when the cycle W of the 2nd flow starts, so the execution of a branch destina tion instruction in started one cycle earlier then usual.

Description

【発明の詳細な説明】 〔概要〕 パイプライン制御方式のデータ処理装置において、条件
付きブランチ命令の直前にコンディション・コードを変
更する命令に属する所定種類の命令があった場合に、コ
ンディション・コードと同時にブランチ決定を行い、条
件付きブランチ命令を高速化するブランチ制御方式であ
る。
[Detailed Description of the Invention] [Summary] In a pipeline control type data processing device, when there is a predetermined type of instruction that belongs to an instruction that changes a condition code immediately before a conditional branch instruction, This is a branch control method that simultaneously makes branch decisions and speeds up conditional branch instructions.

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

本発明は、パイプライン制御方式のデータ処理装置にお
けるブランチ制御方式に関するものである。
The present invention relates to a branch control method in a pipeline control data processing device.

〔従来技術と問題点〕[Prior art and problems]

第3図はパイプライン制御方式の命令制御部の概要を示
す図である。第3図において、1は命令語レジスタ、2
はセレクタ、3はベース・レジスタ、4はインデックス
・レジスタ、5はディスプレイスメント・レジスタ、6
はアドレス加算器、7はアドレス・レジスタ、8は記憶
制御部、9ないし11はオペランド・ワード・レジスタ
、12は演算制御部、13は結果レジスタ、14は中間
レジスタ、15は汎用レジスタ、16は浮動小数点レジ
スタ、17はPSWコントロール・レジスタをそれぞれ
示している。また、Dサイクルは命令のデコード・サイ
クル、Aサイクルはアドレス生成サイクル、Tサイクル
はアドレス変換サイクル、Bサイクルはバッファ読出サ
イクル、Eサイクルは演算実行サイクル、Wサイクルは
書込みサイクルをそれぞれ示している。
FIG. 3 is a diagram showing an outline of the instruction control section of the pipeline control method. In FIG. 3, 1 is the instruction word register, 2
is the selector, 3 is the base register, 4 is the index register, 5 is the displacement register, 6
is an address adder, 7 is an address register, 8 is a storage control unit, 9 to 11 are operand word registers, 12 is an arithmetic control unit, 13 is a result register, 14 is an intermediate register, 15 is a general-purpose register, and 16 is a Floating point registers 17 and 17 respectively indicate PSW control registers. Further, the D cycle is an instruction decode cycle, the A cycle is an address generation cycle, the T cycle is an address conversion cycle, the B cycle is a buffer read cycle, the E cycle is an operation execution cycle, and the W cycle is a write cycle.

第4図はパイプライン制御方式のデータ処理装置におけ
る従来のブランチ制御方式を説明する図である。第4図
において、EUCCは演算ユニットで生成されたコンデ
ィション・コード、AWはAサイクルの待ちサイクルを
示している。第4図における第1番目のフローはコンデ
ィション・コード変更命令の実行フローであり、第2番
目のフローは条件付きブランチ命令の実行フローである
FIG. 4 is a diagram illustrating a conventional branch control method in a data processing device using a pipeline control method. In FIG. 4, EUCC indicates a condition code generated by the arithmetic unit, and AW indicates a wait cycle of A cycle. The first flow in FIG. 4 is an execution flow of a condition code change instruction, and the second flow is an execution flow of a conditional branch instruction.

第1番目のフローのWサイクルの初めにコンディション
・コードが分岐決定回路に入力され、第2番目のフロー
のBサイクルでコンディション・コード及びマスク情報
を参照してブランチすべきか否かが決定される。
At the beginning of the W cycle of the first flow, the condition code is input to the branch decision circuit, and in the B cycle of the second flow, it is determined whether or not to branch by referring to the condition code and mask information. .

第5図はブランチ決定処理の詳細を説明するための図で
ある。第5図において、18はコンディション・コード
・レジスタ、19はマスク・レジスタ、20は分岐決定
回路、21と22は命令バッファをそれぞれ示している
。コンディション・コード・レジスタ18には演算ユニ
ットで生成されたコンディション・コードがセットされ
、マスク・レジスタには条件付きブランチ命令のマスク
情報がセットされる0分岐決定回路20は、コンディシ
ョン・コード及びマスク情報を参照してブランチすべき
か否かを決定する。命令バッファ21には命令がシーケ
ンシャルに進むときの命令が先取りされて格納されてお
り、命令バッファ22にはブランチ先の命令が格納され
ている。ブランチが成功すると、命令バッファ22の命
令が取出され、命令パイプラインに投入される。
FIG. 5 is a diagram for explaining details of the branch determination process. In FIG. 5, 18 is a condition code register, 19 is a mask register, 20 is a branch decision circuit, and 21 and 22 are instruction buffers, respectively. A condition code generated by the arithmetic unit is set in the condition code register 18, and mask information of a conditional branch instruction is set in the mask register. to decide whether to branch or not. The instruction buffer 21 prefetches and stores instructions when the instructions proceed sequentially, and the instruction buffer 22 stores instructions at the branch destination. If the branch is successful, the instructions in the instruction buffer 22 are fetched and placed into the instruction pipeline.

パイプライン制御を用いたデータ処理装置において、ブ
ランチ命令を高速化することが必要である。ブランチ命
令にもいろいろあるが、その内で条件付きブランチ命令
は高速化し難い。何故ならかなりの確率でブランチ命令
の直前の命令でコンディション・コードを変更する場合
が多いからである。コンディション・コードを変更する
命令の中でも、複雑な演算の結果に従ってコンディショ
ン・コードを生成する命令と、簡単な演算(例えば、演
算の入力データが0か否かによってコンディション・コ
ードを決定する命令、入力データとマスクによってコン
ディション・コードを決定する命令、人力データと即値
によって論理演算の結果コンディション・コードを決定
する命令)によってコンディション・コードを決定する
命令がある。後者の命令としては、L T (Load
 And Te5t)R命令やLT命令、NI命令、O
I命令、XI命令、TM(Test Under Ma
sk)命令などがある。
In a data processing device using pipeline control, it is necessary to speed up branch instructions. There are various branch instructions, but conditional branch instructions are difficult to speed up. This is because there is a high probability that the condition code will be changed by the instruction immediately before the branch instruction. Among the instructions that change the condition code, there are instructions that generate a condition code according to the result of a complex operation, and instructions that determine the condition code depending on whether the input data of the operation is 0 or not. There are instructions for determining a condition code using data and a mask, and instructions for determining a condition code as a result of a logical operation using manual data and an immediate value. The latter command is L T (Load
And Te5t) R instruction, LT instruction, NI instruction, O
I instruction, XI instruction, TM (Test Under Ma
sk) commands, etc.

また、LSIの大集積化により、演算回路で生成された
コンディション・コードをブランチの決定回路に送り、
それからブランチを決定していたのでは、ブランチ先の
命令の実行が遅れてしまう。
Also, due to the large integration of LSI, the condition code generated by the arithmetic circuit is sent to the branch decision circuit,
If the branch is decided after that, execution of the branch destination instruction will be delayed.

〔発明の目的〕[Purpose of the invention]

本発明は、上記の考察に基づくものであって、簡単な演
算回路をブランチ決定回路内に設けることにより、コン
ディション・コードを生成すると同時に条件付きブラン
チ命令のマスクをかけて、ブランチ決定を高速化させる
方式を提供することを目的としている。
The present invention is based on the above consideration, and by providing a simple arithmetic circuit in the branch decision circuit, a condition code is generated and a conditional branch instruction is simultaneously masked, thereby speeding up branch decision. The purpose is to provide a method to do this.

(目的を達成するための手段〕 そしてそのため本発明のブランチ制御方式は、主記憶又
はレジスタから読出されたオペランド・データを格納す
るオペランド・ワード・レジスタと、演算回路を持つ分
岐決定回路と、条件付きブランチ命令のマスク情報がセ
ントされるマスク・レジスタと、演算ユツトで実行され
る命令のコードを保持する命令コード保持部とを具備す
るパイプライン制御方式のデータ処理装置において、条
件付きブランチ命令の直前の命令がコンディション・コ
ード変更命令に属し且つ簡単な演算でコンディション・
コードを生成できるものである場合には、当該条件付き
ブランチ命令を待ちサイクルを設けることなく実行する
と共に、条件付きブランチ命令の実行フローのバッファ
読出サイクルにおいて、上記分岐決定回路に、上記命令
コード保持部の内容を解読する処理と、直前の命令がコ
ンディション・コード変更命令に属し且つ簡単な演算で
コンディション・コードを生成できるものである場合に
は解読結果に基づいて対応するオペランド・ワード・レ
ジスタの内容を入力し当該入力データを演算してコンデ
ィション・コードを生成する処理と、生成したコンディ
ション・コードと上記マスク・レジスタの内容とを比較
してブランチすべきか否かを決定する処理とを行わせる
ことを特徴とするものである。
(Means for Achieving the Object) Therefore, the branch control system of the present invention includes an operand word register that stores operand data read from main memory or a register, a branch decision circuit having an arithmetic circuit, and a In a data processing device using a pipeline control system, which is equipped with a mask register in which mask information of a conditional branch instruction is sent, and an instruction code holding unit that holds the code of an instruction to be executed by an arithmetic unit, If the immediately preceding instruction belongs to a condition code change instruction and a simple operation
If the code can be generated, the conditional branch instruction is executed without a wait cycle, and the instruction code is held in the branch decision circuit in the buffer read cycle of the execution flow of the conditional branch instruction. If the immediately preceding instruction belongs to a condition code change instruction and a condition code can be generated by a simple operation, the corresponding operand word register is decoded based on the decoding result. The process of inputting the contents and calculating the input data to generate a condition code, and the process of comparing the generated condition code with the contents of the mask register to determine whether or not to branch are performed. It is characterized by this.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明を図面を参照しつつ説明する。第1図は本
発明のブランチ制御方式を説明するための図である。第
1図において、第1番目のフローはコンディション・コ
ード変更命令の実行フローを示し、第2番目のフローは
条件付きブランチ命。
Hereinafter, the present invention will be explained with reference to the drawings. FIG. 1 is a diagram for explaining the branch control system of the present invention. In FIG. 1, the first flow shows the execution flow of a condition code change instruction, and the second flow shows a conditional branch instruction.

令の実行フローを示している。第1図のコンディション
・コード変更命令は、簡単な演算によってコンディショ
ン・コードを決定する命令である。
It shows the execution flow of the command. The condition code change instruction shown in FIG. 1 is an instruction that determines a condition code by a simple calculation.

直前の命令がコンディション・コード変更命令であり且
つ簡単な演算によりコンディション・コードを生成でき
るものである場合には、第2番目の条件付きブランチ命
令の実行フローには、第4図に示すようなAWサイクル
は存在しない。第1番目のフローのEサイクルの始めに
オペランド・ワード・レジスタの内容が本発明の分岐決
定回路に送られ、第2番目のフローのBサイクルでブラ
ンチ決定がなされる。
If the immediately preceding instruction is a condition code change instruction and the condition code can be generated by a simple operation, the execution flow of the second conditional branch instruction is as shown in Figure 4. There is no AW cycle. At the beginning of the E cycle of the first flow, the contents of the operand word register are sent to the branch decision circuit of the present invention, and the branch decision is made at the B cycle of the second flow.

第2図は本発明によるブランチ制御方式の詳細を示す図
である。第2図において、23はE命令コード、24は
分岐決定回路をそれぞれ示している。分岐決定回路24
には、オペランド・ワード・レジスタの内容、マスク・
レジスタ19の内容及びE命令コード23が入力される
。なお、オペランド・ワード・レジスタは9しか示され
ていないが、実際には10.11の内容も入力される。
FIG. 2 is a diagram showing details of the branch control method according to the present invention. In FIG. 2, 23 indicates an E instruction code, and 24 indicates a branch decision circuit. Branch decision circuit 24
contains the contents of the operand word register, the mask
The contents of register 19 and E instruction code 23 are input. Although only 9 is shown in the operand word register, the contents of 10 and 11 are actually input.

E命令コード23は演算ユニットで実行される命令の種
類を示すものである。分岐決定回路24は簡単な演算回
路を有している。そして、E命令コード23を解読して
、所定種類のコンディション・コード変更命令であった
場合には、何れのオペランド・ワード・レジスタを選択
すべきかを判断し、選択したオペランド・ワード・レジ
スタの内容とE命令コードに基づいてコンディション・
コードを生成し、生成したコンディション・コードとマ
スク・レジスタ19の内容とを比較してブランチずべき
か否かの判定を行う。分岐(ブランチ)決定は第2フロ
ーのWサイクルが始まる時に既に完了しているので、ブ
ランチ先命令の実行を従来方式に比して1サイクル早く
開始させることができる。
The E instruction code 23 indicates the type of instruction executed by the arithmetic unit. The branch decision circuit 24 has a simple arithmetic circuit. Then, the E instruction code 23 is decoded, and if it is a predetermined type of condition code change instruction, it is determined which operand word register should be selected, and the contents of the selected operand word register are determined. and the condition based on the E instruction code.
A code is generated, and the generated condition code is compared with the contents of the mask register 19 to determine whether a branch should be taken. Since the branch decision has already been completed when the W cycle of the second flow starts, execution of the branch destination instruction can be started one cycle earlier than in the conventional method.

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

以上の説明から明らかなように、本発明によれば、パイ
プライン制御方式のデータ処理装置におけるブランチ決
定を高速化することが出来る。
As is clear from the above description, according to the present invention, it is possible to speed up branch determination in a pipeline control type data processing device.

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

第1図は本発明のブランチ制御方式を説明する図、第2
図は本発明によるブランチ制御方式の詳細を示す図、第
3図はパイプライン制御方式の命令制御部の概要を示す
図、第4図はパイプライン制御方式のデータ処理装置に
おける従来のブランチ制御方式を説明する図、第5図は
ブランチ決定処理の詳細を説明するための図である。 1・・・命令語レジスタ、2・・・セレクタ、3・・・
ベース・レジスタ、4・・・インデックス・レジスタ、
5・・・ディスプレイスメント・レジスタ、6・・・ア
ドレス加算器、7・・・アドレス・レジスタ、8・・・
記憶制御部、9ないし11・・・オペランド・ワード・
レジスタ、12・・・演算制御部、13・・・結果レジ
スタ、14・・・中間レジスタ、15・・・汎用レジス
タ、16・・・浮動小数点レジスタ、17・・・PSW
コントロール・レジスタ、18・・・コンディション・
コード・レジスタ、19・・・マスク・レジスタ、20
・・・分岐決定回路、21と22・・・命令バッファ、
23・・・E命令コード、24・・・分岐決定回路。
FIG. 1 is a diagram explaining the branch control method of the present invention, and FIG.
The figure shows the details of the branch control method according to the present invention, FIG. 3 shows the outline of the instruction control unit of the pipeline control method, and FIG. 4 shows the conventional branch control method in a data processing device using the pipeline control method. FIG. 5 is a diagram for explaining details of the branch determination process. 1... Instruction word register, 2... Selector, 3...
Base register, 4... Index register,
5... Displacement register, 6... Address adder, 7... Address register, 8...
Memory control unit, 9 to 11...operand word
Register, 12... Arithmetic control unit, 13... Result register, 14... Intermediate register, 15... General purpose register, 16... Floating point register, 17... PSW
Control register, 18...condition
Code register, 19...Mask register, 20
...branch decision circuit, 21 and 22...instruction buffer,
23...E instruction code, 24... Branch decision circuit.

Claims (1)

【特許請求の範囲】[Claims] 主記憶又はレジスタから読出されたオペランド・データ
を格納するオペランド・ワード・レジスタと、演算回路
を持つ分岐決定回路と、条件付きブランチ命令のマスク
情報がセットされるマスク・レジスタと、演算ユットで
実行される命令のコードを保持する命令コード保持部と
を具備するパイプライン制御方式のデータ処理装置にお
いて、条件付きブランチ命令の直前の命令がコンディシ
ョン・コード変更命令に属し且つ簡単な演算でコンディ
ション・コードを生成できるものである場合には、当該
条件付きブランチ命令を待ちサイクルを設けることなく
実行すると共に、条件付きブランチ命令の実行フローの
バッファ読出サイクルにおいて、上記分岐決定回路に、
上記命令コード保持部の内容を解読する処理と、直前の
命令がコンディション・コード変更命令に属し且つ簡単
な演算でコンディション・コードを生成できるものであ
る場合には解読結果に基づいて対応するオペランド・ワ
ード・レジスタの内容を入力し当該入力データを演算し
てコンディション・コードを生成する処理と、生成した
コンディション・コードと上記マスク・レジスタの内容
とを比較してブランチすべきか否かを決定する処理とを
行わせることを特徴とするブランチ制御方式。
An operand word register that stores operand data read from main memory or registers, a branch decision circuit with an arithmetic circuit, a mask register in which mask information for conditional branch instructions is set, and an arithmetic unit that executes In a data processing device using a pipeline control method, the instruction immediately before a conditional branch instruction belongs to a condition code change instruction, and the condition code can be changed by a simple operation. If the conditional branch instruction can be generated, the conditional branch instruction is executed without providing a wait cycle, and in the buffer read cycle of the execution flow of the conditional branch instruction, the branch decision circuit is
The process of decoding the contents of the instruction code holding section and, if the immediately preceding instruction belongs to a condition code change instruction and the condition code can be generated by a simple operation, the corresponding operand is decoded based on the decoding result. A process of inputting the contents of a word register and calculating the input data to generate a condition code, and a process of comparing the generated condition code with the contents of the mask register to determine whether or not to branch. A branch control method characterized by performing the following steps.
JP24265685A 1985-10-31 1985-10-31 Branch control system Pending JPS62103736A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24265685A JPS62103736A (en) 1985-10-31 1985-10-31 Branch control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24265685A JPS62103736A (en) 1985-10-31 1985-10-31 Branch control system

Publications (1)

Publication Number Publication Date
JPS62103736A true JPS62103736A (en) 1987-05-14

Family

ID=17092285

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24265685A Pending JPS62103736A (en) 1985-10-31 1985-10-31 Branch control system

Country Status (1)

Country Link
JP (1) JPS62103736A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5441641A (en) * 1977-09-09 1979-04-03 Hitachi Ltd Data processing system having data producing unit
JPS57755A (en) * 1980-06-02 1982-01-05 Hitachi Ltd Information processor
JPS5860355A (en) * 1981-10-07 1983-04-09 Nec Corp Information processing device
JPS5896345A (en) * 1981-12-02 1983-06-08 Hitachi Ltd Hierarchical arithmetic system
JPS58158745A (en) * 1982-03-12 1983-09-21 Nec Corp Pipeline control type information processing device
JPS6015745A (en) * 1983-07-06 1985-01-26 Nec Corp Information processor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5441641A (en) * 1977-09-09 1979-04-03 Hitachi Ltd Data processing system having data producing unit
JPS57755A (en) * 1980-06-02 1982-01-05 Hitachi Ltd Information processor
JPS5860355A (en) * 1981-10-07 1983-04-09 Nec Corp Information processing device
JPS5896345A (en) * 1981-12-02 1983-06-08 Hitachi Ltd Hierarchical arithmetic system
JPS58158745A (en) * 1982-03-12 1983-09-21 Nec Corp Pipeline control type information processing device
JPS6015745A (en) * 1983-07-06 1985-01-26 Nec Corp Information processor

Similar Documents

Publication Publication Date Title
JPH04367936A (en) Superscalar processor
JPS633337B2 (en)
JPS6341932A (en) Branching instruction processing device
JPH0460720A (en) Control system for condition branching instruction
JPH0743648B2 (en) Information processing equipment
JPS62103736A (en) Branch control system
JPH06168263A (en) Vector processor
JPH0950376A (en) Data processor
JP2812610B2 (en) Pipeline control method
JP2503223B2 (en) Prior control method
JP2924735B2 (en) Pipeline operation device and decoder device
JPH0991139A (en) Information processor
JPH0769800B2 (en) Data processing device
JPS5829051A (en) Operation processing device
JPH01271842A (en) Information processor
JPH02254541A (en) Control system for conditional branch instruction
JP2000305782A (en) Arithmetic unit
JPH09274566A (en) Information processor
JPS61273637A (en) Information processor
JPH08297583A (en) Processor and method for interruption processing
JPH06314196A (en) Method and device for processing information
JPS6364130A (en) Branching instruction control method
JPS61273638A (en) Information processor
JPH02208723A (en) Information processor
JPH04357526A (en) Operation processor