JPH07113890B2 - Information processing equipment - Google Patents

Information processing equipment

Info

Publication number
JPH07113890B2
JPH07113890B2 JP63156247A JP15624788A JPH07113890B2 JP H07113890 B2 JPH07113890 B2 JP H07113890B2 JP 63156247 A JP63156247 A JP 63156247A JP 15624788 A JP15624788 A JP 15624788A JP H07113890 B2 JPH07113890 B2 JP H07113890B2
Authority
JP
Japan
Prior art keywords
instruction
register
branch
branch instruction
address
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
JP63156247A
Other languages
Japanese (ja)
Other versions
JPH01321521A (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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP63156247A priority Critical patent/JPH07113890B2/en
Publication of JPH01321521A publication Critical patent/JPH01321521A/en
Publication of JPH07113890B2 publication Critical patent/JPH07113890B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 技術分野 本発明はパイプライン処理中、パイプラインキャンセル
条件の成立に応答してパイプライン処理をキャンセルす
る、例えば分岐命令のような命令のパイプライン処理を
行なう情報処理装置に関する。
Description: TECHNICAL FIELD The present invention relates to an information processing apparatus for canceling pipeline processing during pipeline processing in response to the establishment of a pipeline cancel condition, for example, pipeline processing of an instruction such as a branch instruction. Regarding

従来技術 一般に、分岐命令は、分岐命令の次におこなうべき命令
のアドレスが分岐先アドレスであるか、分岐命令の次の
アドレスであるかを予測しパイプライン処理を連続して
行なっている。分岐命令の次の命令のアドレスの予測が
失敗した場合に、複数のサイクルのうち1つの定められ
たサイクルに絞り、パイプライン処理キャンセル条件成
立によるパイプライン処理キャンセル指示を発行してい
る。この指示の発行により正しい分岐先の命令が取直さ
れる。
2. Description of the Related Art Generally, a branch instruction predicts whether the address of the instruction to be executed next to the branch instruction is the branch destination address or the address next to the branch instruction, and continuously performs pipeline processing. When the prediction of the address of the instruction next to the branch instruction fails, one of the plurality of cycles is limited to a predetermined cycle and a pipeline processing cancel instruction is issued when the pipeline processing cancel condition is satisfied. By issuing this instruction, the correct branch destination instruction is retaken.

また、この種のパイプライン処理において、先行命令で
ある分岐命令の実行が終了しないうちに、後続命令であ
る分岐命令の次に行なうべき命令が入力されてくる。す
なわち、先行する分岐命令が演算制御部におけるオペラ
ンド演算を指示し、そのオペランド演算結果をレジスタ
に書込(更新)指定したのと同一のレジスタに対して、
後続の命令が読出指定する場合、レジスタの競合問題が
発生し、この読出はオペランド演算結果が正しく反映さ
れた後で行なわれなければならない。
In addition, in this type of pipeline processing, an instruction to be executed next to a branch instruction, which is a subsequent instruction, is input before execution of a branch instruction, which is a preceding instruction, is completed. That is, the preceding branch instruction instructs the operand operation in the operation control unit, and the operand operation result is written (updated) in the register
If the subsequent instruction specifies to read, a register conflict problem occurs, and this read must be performed after the operand operation result is correctly reflected.

このため、従来のシステムでは、先行命令による演算制
御部でのオペランド演算結果が求まるのを待ってから後
続命令によるアドレス計算を開始したり、特公昭57−90
88号公報に示すように、演算制御部でオペランド演算結
果を求めるのに先行して専用の演算回路により同等のオ
ペランド演算を行なったり、特開昭61−90237号公報に
示すように、アドレス計算を行なうアドレス生成回路に
オペランド間の演算ができるようにし、そのオペランド
演算結果を後続命令のレジスタ読出に使用していた。
For this reason, in the conventional system, the address calculation by the subsequent instruction is started after waiting for the operand operation result in the operation control section by the preceding instruction to be obtained.
As shown in Japanese Patent Laid-Open No. 88-88, prior to obtaining an operand arithmetic result in the arithmetic control unit, an equivalent arithmetic operation is performed by a dedicated arithmetic circuit, and as shown in Japanese Patent Laid-Open No. 61-90237, address calculation is performed. It has been made possible to perform an arithmetic operation between operands in an address generation circuit for performing the operation, and use the operand arithmetic result for register reading of a subsequent instruction.

また、先行する命令と後続命令とが同一レジスタに対し
書込および読出を指示する競合関係にあるか否かを調べ
るチェック機構を備えたとしても、パイプライン処理を
キャンセルする命令に対して、複数のサイクルでパイプ
ライン処理キャンセル条件を調べ条件の成立したサイク
ルでキャンセル指示を発行した場合、上述の競合関係に
なるレジスタのレジスタ番号とキャンセルをかけた命令
との対応関係は不明となる。このため、キャンセルをか
けたことにより無効化しなくてはならないはずの競合関
係の発生する可能性のあったレジスタのレジスタ番号を
識別することができないという欠点がある。
Further, even if a check mechanism for checking whether the preceding instruction and the succeeding instruction are in a competing relationship for instructing writing and reading to the same register is provided, a plurality of instructions are provided for an instruction for canceling pipeline processing. If the pipeline processing cancel condition is checked in the cycle and a cancel instruction is issued in the cycle in which the condition is satisfied, the correspondence relationship between the register number of the register having the above-mentioned conflict relationship and the canceled instruction becomes unknown. For this reason, there is a drawback in that the register number of a register that may have a conflict relationship that must be invalidated due to cancellation cannot be identified.

発明の目的 本発明の目的は上述の欠点を除去するようにし、キャン
セル条件成立後の命令の取直しを高速化するようにした
情報処理装置を提供することにある。
OBJECT OF THE INVENTION It is an object of the present invention to provide an information processing apparatus which eliminates the above-mentioned drawbacks and speeds up instruction re-execution after a cancel condition is satisfied.

発明の構成 本発明によれば、分岐命令の入力に応答してこの分岐命
令の次に実行すべきアドレスを予測する分岐予測処理を
行いつつパイプライン処理をなす情報処理装置であっ
て、分岐予測の失敗に応答してこの分岐命令以降の命令
の書込み先レジスタが無効であることを示す情報を出力
する無効レジスタ指示手段を含むことを特徴とする情報
処理装置が得られる。
According to the present invention, in response to an input of a branch instruction, an information processing apparatus for performing pipeline processing while performing branch prediction processing for predicting an address to be executed next to this branch instruction, In response to the failure of (1), an information processing apparatus including an invalid register instructing means for outputting information indicating that the write destination register of the instruction after the branch instruction is invalid.

そしてこの無効レジスタ指示手段は、実行中の命令に互
いに異なる番号を付与する分岐命令番号付与手段と、実
行中の命令が書込むべきレジスタ番号をこの命令の直前
の分岐命令に対して前記分岐命令番号付与手段により付
与された分岐命令番号と共に保持するレジスタ番号保持
手段と、分岐予測失敗に応答してこの分岐命令に対して
前記分岐命令番号付与手段により付与された分岐命令番
号を出力する判定手段と、この判定手段により出力され
た前記分岐命令番号と前記レジスタ番号保持手段により
保持された前記分岐命令番号とを比較してこの分岐命令
以降の命令の書込み先レジスタが無効とされるべきであ
ることを示す情報を出力する手段とを有することを特徴
としている。
The invalid register instruction means assigns a branch instruction number assigning means for assigning different numbers to the instruction being executed, and the register number to be written by the instruction being executed, to the branch instruction immediately before the branch instruction. Register number holding means for holding together with the branch instruction number given by the number giving means, and judging means for outputting the branch instruction number given by the branch instruction number giving means to this branch instruction in response to a branch prediction failure And the branch instruction number output by the determining means and the branch instruction number held by the register number holding means are compared to invalidate the write destination register of the instruction after the branch instruction. And means for outputting information indicating that.

実施例 次に本発明について図面を参照して詳細に説明する。EXAMPLES Next, the present invention will be described in detail with reference to the drawings.

第1図を参照すると、本発明の一実施例は、操作(OP)
コードフィールド,ベースフィールドB,インデックスフ
ィールドX,ディスプレースメントフィールドDおよび演
算結果の格納先フィールドRを有する命令レジスタ1、
この命令レジスタ1のOPコードフィールドにおけるOPコ
ードを解読し分岐命令であるか否かを示す選択指示信号
を出力するデコーダ2、このデコーダ2からの選択指示
信号が分岐命令を示すときは“1"を選択し、分岐命令で
ないことを示すときは“0"を選択するセレクタ3、分岐
命令識別値BIC0を格納する分岐命令識別レジスタ4、お
よびこの分岐命令識別レジスタ4からの分岐命令識別値
BIC0およびセレクタ3からの選択結果を加算する加算器
5を命令解読(D)ステージに備えている。
Referring to FIG. 1, one embodiment of the present invention is an operation (OP).
An instruction register 1 having a code field, a base field B, an index field X, a displacement field D, and a storage destination field R for the operation result,
Decoder 2 that decodes the OP code in the OP code field of this instruction register 1 and outputs a selection instruction signal indicating whether or not it is a branch instruction, and "1" when the selection instruction signal from this decoder 2 indicates a branch instruction. To select "0" to indicate that the branch instruction is not a branch instruction, a branch instruction identification register 4 that stores the branch instruction identification value BIC0, and a branch instruction identification value from the branch instruction identification register 4
An adder 5 for adding the selection results from BIC0 and the selector 3 is provided in the instruction decoding (D) stage.

この実施例のパイプライン処理は、この命令解読(D)
ステージの他、アドレス生成(A)ステージ,アドレス
変換(T)ステージ,メモリ読出(O)ステージ,演算
実行(E)ステージおよび演算結果格納(W)ステージ
の6ステージから構成されている。
The pipeline processing of this embodiment decodes this instruction (D).
In addition to the stages, the address generation (A) stage, the address conversion (T) stage, the memory read (O) stage, the operation execution (E) stage and the operation result storage (W) stage are included.

加算器5の加算結果は分岐命令識別値BIC1〜BIC5として
上述のパイプラインの各ステージに設けられたレジスタ
7〜11に格納される。また加算器5の加算結果は、上述
のパイプラインの各ステージとは非同期に動作するレジ
スタ確定待制御部6に与えられる。このレジスタ確定待
制御部6はパイプ構造をしておりAステージからWステ
ージまでのパイプラインのステージ数分、更新されるこ
とになるレジスタの番号を登録するレジスタ群61−65、
加算器5の加算結果を格納するレジスタ群66−70、およ
び前記レジスタ群61−65に有効なデータを保持している
か否かを示す有効性ビットを保持するレジスタ群71−75
を有している。
The addition result of the adder 5 is stored as the branch instruction identification values BIC1 to BIC5 in the registers 7 to 11 provided in each stage of the above pipeline. Further, the addition result of the adder 5 is given to the register fixed wait control unit 6 which operates asynchronously with each stage of the above-mentioned pipeline. The register confirmation waiting control unit 6 has a pipe structure, and register groups 61-65 for registering register numbers to be updated for the number of pipeline stages from the A stage to the W stage.
Register group 66-70 for storing the addition result of the adder 5 and register group 71-75 for holding the validity bit indicating whether or not valid data is held in the register group 61-65.
have.

レジスタ群61−65の内容と命令レジスタ1のベースフィ
ールドBの内容およびインデックツフィールドXの内容
とを比較し、一致すれば先行する命令の処理が終了して
いないことを示す信号を出力し、命令を保持し続けるよ
う命令レジスタ1に指示するレジスタ確定待一致検出回
路15は、本発明の一実施例のDステージに備えられてい
る。
The contents of the register groups 61-65 are compared with the contents of the base field B and the contents of the index field X of the instruction register 1, and if they match, a signal indicating that the processing of the preceding instruction is not completed is output, The register-determined wait coincidence detection circuit 15 for instructing the instruction register 1 to continue holding the instruction is provided in the D stage of the embodiment of the present invention.

この一実施例のAステージには、分岐命令の次に行なう
べき命令のアドレスの予測が成功したか失敗したかを判
定し、失敗したとき予測失敗を示す信号を線104に出力
する分岐予測判定回路12を備えている。また、一実施例
のEステージにも、分岐命令の次に行うべき命令のアド
レスの予測が成功したか失敗したかを判定し、失敗した
とき予測失敗を示す信号を線105に出力する分岐予測判
定回路14を備えている。
In the stage A of this embodiment, it is determined whether or not the prediction of the address of the instruction to be executed next to the branch instruction is successful or unsuccessful, and when the prediction fails, a signal indicating a prediction failure is output to the line 104. The circuit 12 is provided. Also in the E stage of one embodiment, the branch prediction which determines whether the prediction of the address of the instruction to be executed next to the branch instruction succeeds or fails, and outputs a signal indicating the prediction failure to the line 105 when the prediction fails. The determination circuit 14 is provided.

次に分岐予測失敗による確定待登録有効性ビット“0"に
セットするよう指示する指示回路13について、第1図お
よび第2図を参照して詳細に説明する。
Next, the instruction circuit 13 for instructing to set the fixed waiting registration validity bit "0" due to branch prediction failure will be described in detail with reference to FIGS.

第1図および第2図を参照すると、指示回路13はEステ
ージにおける分岐予測判定回路14から線105を介して与
えられる予測失敗信号を受けるゲート131、このゲート1
31の否定出力とAステージにおける分岐予測判定回路12
から線104を介して与えられる予測失敗信号との論理積
をとるアンドゲート132、このアンドゲータ132の出力に
応答してレジスタ7から線103を介して与えられる分岐
命令識別値BIC1を選択し、ゲート131の出力に応答して
レジスタ10から線106を介して与えられる分岐命令識別
値BIC4を選択するセレクタ133、このセレクタ133からの
選択結果とレジスタ66−70からの加算結果とを比較する
比較回路群134−138、およびこれら比較回路134−138か
らの出力の論理和をとるオアゲート群139−142を備え、
比較回路群134−138のいずれかにおいて一致が生じたと
き、一致の生じたステージよりも上のステージは分岐予
測失敗による誤ったストリームの命令による情報である
ことを認識し、一致の生じた値を格納しているレジスタ
のステージから上のステージに対応するレジスタ群の有
効性ビットを無効にし、命令レジスタ1への分岐予測失
敗により読直し命令のセット指示をする旨の信号を線10
2に出力する。
Referring to FIG. 1 and FIG. 2, the instruction circuit 13 receives a prediction failure signal given from the branch prediction judgment circuit 14 in the E stage via the line 105.
Negative output of 31 and branch prediction judgment circuit 12 in the A stage
From the AND gate 132 which takes the logical product with the prediction failure signal given from the line 104 to the branch instruction identification value BIC1 given from the register 7 via the line 103 in response to the output of the AND gate 132. A selector 133 for selecting the branch instruction identification value BIC4 given from the register 10 through the line 106 in response to the output of 131, and a comparison circuit for comparing the selection result from this selector 133 with the addition result from the registers 66-70. A group 134-138, and an OR gate group 139-142 for ORing the outputs from these comparison circuits 134-138,
When a match occurs in any of the comparison circuit groups 134 to 138, it is recognized that the stage above the stage in which the match occurs is the information by the instruction of the wrong stream due to the branch prediction failure, and the value in which the match occurs. From the stage of the register that stores the register to the upper stage, the validity bit of the register group corresponding to the upper stage is invalidated, and a signal for instructing to set the re-reading instruction is given to the instruction register 1 due to a branch prediction failure.
Output to 2.

本発明の一実施例のアドレス計算は特公昭57−9088号公
報にも示されるように、ベースフィールドBの内容によ
りベースアドレスを読出すベースレジスタ(BR)17、こ
のベースレジスタ(BR)17からのベースアドレスを格納
するレジスタ19、インデックスフィールドXの内容によ
りインデックスアドレスを読出す汎用レジスタ(GR)1
8、この汎用レジスタ(GR)18からのインデックスアド
レスを格納するレジスタ20、ディスプレースメントフィ
ールドDのディスプレースメントを格納するレジスタ2
1、これらレジスタ19−21の内容に基づいてアドレス計
算をするアドレス加算器(AA)22、このアドレス加算器
(AA)22の加算結果を論理アドレスとして格納する論理
アドレスレジスタ(LAR)23、この論理アドレスレジス
タ(LAR)23の論理アドレスを物理アドレスに変換する
アドレス変換バッファ(TLB)24、このTLB24によりアド
レス変換された物理アドレスを格納する物理アドレスレ
ジスタ(PAR)25、この物理アドレスレジスタ25の物理
アドレスによりオペランドを読出すオペランドキャッシ
ュメモリ(OCM)26、このオペランドキャッシュメモリ2
6からのオペランドを格納するオペランドレジスタ(O
R)27、このオペランドレジスタ27からのオペランドに
基づき演算する演算器(ALU)28およびこの演算器28か
らの演算結果を保持するレジスタ29を有する。
The address calculation according to one embodiment of the present invention is, as shown in Japanese Patent Publication No. Sho 57-9088, a base register (BR) 17 for reading a base address according to the contents of the base field B, and from this base register (BR) 17. Register 19 for storing the base address of the general purpose register (GR) 1 for reading the index address according to the contents of the index field X
8, register 20 that stores the index address from this general-purpose register (GR) 18, register 2 that stores the displacement of displacement field D
1, an address adder (AA) 22 that calculates an address based on the contents of these registers 19-21, a logical address register (LAR) 23 that stores the addition result of this address adder (AA) 22 as a logical address, An address translation buffer (TLB) 24 that translates the logical address of the logical address register (LAR) 23 into a physical address, a physical address register (PAR) 25 that stores the physical address translated by this TLB 24, and a physical address register 25 Operand cache memory (OCM) 26 that reads the operand by physical address, this operand cache memory 2
Operand register (O
R) 27, an arithmetic unit (ALU) 28 that operates based on the operand from this operand register 27, and a register 29 that holds the arithmetic result from this arithmetic unit 28.

第1図および第3図を参照すると、確定待登録レジスタ
セット指示制御部16は、レジスタ群71−75のいずれかか
ら線101を介して与えられる有効性ビットの論理和をと
るオア回路161およびこのオア回路161の論理和結果とレ
ジスタ29への演算結果の格納を示す演算終了信号305と
の論理和をとるオア回路162を備えている。このオア回
路162の出力はセット指示信号としてレジスタ群61−75
に与えられる。
Referring to FIG. 1 and FIG. 3, the fixed wait registration register set instruction control unit 16 is an OR circuit 161 for ORing the validity bits given from any of the register groups 71-75 through the line 101. The OR circuit 162 is provided with an OR circuit 162 which takes the logical sum of the OR result of the OR circuit 161 and the operation end signal 305 indicating the storage of the operation result in the register 29. The output of the OR circuit 162 is used as a set instruction signal in the register group 61-75.
Given to.

次に、本発明の一実施例の動作を図面を参照して詳細に
説明する。第1図から第4図を参照すると、命令a〜g
のうち、命令b,c,eおよびfは分岐命令であり、○印を
したb,c,eおよびfで示される。命令cの分岐予測失敗
がEステージの回路14においてマシンサイクルT9時点で
判定される。命令d′は分岐予測失敗による再試行を示
している。Ra〜RfおよびRd′は、各命令における更新レ
ジスタ番号を示し、分岐予測失敗の判別に応答して、レ
ジスタ10の内容およびレジスタ群66−70の内容とが比較
回路群134−138で比較され、比較結果のいずれかが一致
したときには、一致を示したステージより上のステージ
の有効性ビットを無効にする信号をオア回路群139−141
で生成し、線102を介してレジスタ群71−74に与え無効
にする。
Next, the operation of one embodiment of the present invention will be described in detail with reference to the drawings. Referring to FIGS. 1 to 4, instructions a-g
Among these, instructions b, c, e and f are branch instructions, and are indicated by circled b, c, e and f. The branch prediction failure of the instruction c is judged in the circuit 14 at the E stage at the time of machine cycle T9. Instruction d'indicates a retry due to a branch prediction failure. R a to R f and R d ′ indicate update register numbers in each instruction, and in response to the determination of branch prediction failure, the contents of the register 10 and the contents of the register groups 66-70 are compared circuit groups 134-138. When any of the comparison results match, the OR circuit group 139-141 sends a signal for invalidating the validity bit of the stage above the stage showing the match.
Generated by the above, and given to the register groups 71-74 via the line 102 to invalidate.

なお、レジスタ4のBIC0値に対して分岐予測失敗のステ
ージの持つBICi値を+1してレジスタ4にセットし直
し、分岐命令識別子を付け直すことにする。
The BIC0 value of the register 4 is incremented by 1 for the BICi value of the stage of the branch prediction failure, and is reset in the register 4 to reassign the branch instruction identifier.

これら命令の動作について以下詳述する。The operation of these instructions will be described in detail below.

タイミングT0で、命令レジスタ1に命令aが格納され、
レジスタ4には“0"がセットされる。
At timing T0, instruction a is stored in instruction register 1,
“0” is set in the register 4.

次に、タイミングT1で命令aのフィールドBおよびXの
内容はBR17およびGR18からアドレスを読出し、レジスタ
19および20にセットされる。また、フィールドBの内容
はレジスタ21にセットされる。これとともにレジスタ1
に分岐命令bがセットされる。なお、タイミングT0でセ
ットされた命令aは分岐命令でないためデコーダ2の解
読結果によりセレクタ3で“0"が選択される。この結
果、加算器5では、“0"+“0"の加算が行なわれ、加算
結果“0"がレジスタ4および7およびレジスタ確定待制
御部6のレジスタ66に格納される。このレジスタ66への
“0"の格納とともにレジスタ61にレジスタ番号Raが格納
される。
Next, at timing T1, the contents of the fields B and X of the instruction a are read from BR17 and GR18, and the register is read.
Set to 19 and 20. The contents of field B are set in the register 21. With this register 1
The branch instruction b is set to. Since the instruction a set at the timing T0 is not a branch instruction, "0" is selected by the selector 3 according to the decoding result of the decoder 2. As a result, the adder 5 performs addition of "0" + "0", and the addition result "0" is stored in the registers 4 and 7 and the register 66 of the register fixed wait control unit 6. At the same time that "0" is stored in the register 66, the register number Ra is stored in the register 61.

さらにタイミングT2で命令aのアドレスはアドレス加算
器22で生成され論理アドレスレジスタLAR23にセットさ
れる。また命令bに関連する加算前のアドレスもレジス
タ19−21の少なくとも1つに格納され、レジスタ1に命
令Cがセットされる。タイミングT1でセットされた命令
bはデコーダ2で分岐命令と解読されるため、セレクタ
3で“1"が選択される。この結果加算器5では“0"+
“1"の加算が行なわれ、加算結果“1"がレジスタ4,7お
よび66にセットされる。なお、レジスタ8には、レジス
タ7からの“0"がセットされレジスタ67にレジスタ66か
らの“0"がセットされる。この時レジスタ66に対応する
レジスタ61にはレジスタ番号“Rb"がまたレジスタ67に
対応するレジスタ62にはレジスタ番号“Rc"がセットさ
れる。
Further, at timing T2, the address of the instruction a is generated by the address adder 22 and set in the logical address register LAR23. The address before addition related to the instruction b is also stored in at least one of the registers 19-21, and the instruction C is set in the register 1. The instruction b set at the timing T1 is decoded as a branch instruction by the decoder 2, so that "1" is selected by the selector 3. As a result, in the adder 5, “0” +
"1" is added, and the addition result "1" is set in registers 4, 7 and 66. The register 8 is set to "0" from the register 7, and the register 67 is set to "0" from the register 66. Register number "R c" is set in the register 62 corresponding to the register number "R b" Kamata register 67 to the register 61 corresponding to the time register 66.

このようにしてタイミングT9まで動作してきたとき、E
ステージの判定回路14から線105を介して予測失敗信号
が与えられる。
In this way, when it operates until timing T9, E
A prediction failure signal is provided via line 105 from the stage decision circuit 14.

第2図および第4図を参照すると、この信号はゲート13
1を介してセレクタ133に与えられレジスタ10の値“2"を
選択し、比較回路群134−138に与えられる。比較回路群
134−138はレジスタ10の値“2"とレジスタ群66−70の値
とを比較し、一致のとれた比較回路135から“1"を出力
する。この出力“1"はオアゲート群139−142に与えら
れ、論理和結果“1"が線102を介してタイミングT10でレ
ジスタ群71−73の有効性ビットを無効にするとともにレ
ジスタ1に対しやり直し命令d′をセットする。
Referring to FIGS. 2 and 4, this signal is gate 13
The value "2" of the register 10 is given to the selector 133 via 1 and given to the comparison circuit groups 134-138. Comparison circuit group
134-138 compare the value "2" of the register 10 with the values of the register groups 66-70, and output "1" from the compared comparison circuit 135. This output "1" is given to the OR gate group 139-142, and the logical sum result "1" invalidates the validity bit of the register group 71-73 at timing T10 via the line 102 and the redo instruction is given to the register 1. Set d '.

第1図および第4図を参照すると、タイミングT9でレジ
スタ10にセットされていた値“2"は+1されてレジスタ
4にセットされる。このようにしてキャンセル条件成立
後の命令取直しおよびその他の状況設定を次のマシンサ
イクル内で行うことができる。
Referring to FIGS. 1 and 4, the value “2” set in the register 10 at timing T9 is incremented by 1 and set in the register 4. In this way, it is possible to perform instruction re-execution and other status setting after the cancellation condition is satisfied within the next machine cycle.

発明の効果 以上説明したように、本発明によれば、先行する命令と
後続の命令が同一レジスタに対して書込と読出を指示す
るような競合関係になる可能性のあるレジスタがパイプ
ライン処理中にキャンセルをかけるとどの命令の後続命
令によるものなのかを識別する回路134−138と、キャン
セルがかかった場合、キャンセルをかけた命令がどの命
令であるのかを、キャンセルの指示と共に認識する回路
139−142と、先行する命令と後続の命令が同一レジスタ
に対して書込と読出を指示する様な競合関係になる可能
性のあるレジスタとして登録したレジスタ番号の中で、
キャンセルにより無効化されるべきレジスタ番号を無効
化する回路102とを有することにより、パイプライン処
理中パイプライン処理キャンセル条件が成立したら、パ
イプライン処理をキャンセルする命令に対しての複数の
サイクルでパイプライン処理キャンセル条件の成立を調
べ、キャンセル条件が成立したならばパイプライン処理
のキャンセルをかける場合、前記競合関係になる可能性
のあるレジスタの中で、キャンセルがかかったことによ
り無効化されなければならないレジスタのレジスタ番号
を無効化できるので、キャンセル条件成立後の命令の取
直しを高速化できるという効果がある。
Effects of the Invention As described above, according to the present invention, a pipeline processing is performed on a register in which a preceding instruction and a subsequent instruction may have a conflicting relationship in which writing and reading are instructed to the same register. Circuits 134-138 that identify which instruction is a subsequent instruction when canceled, and a circuit that recognizes which instruction the canceled instruction is, together with a cancel instruction, when the cancel is applied
139-142 and the register number registered as a register in which the preceding instruction and the following instruction may have a conflicting relationship in which writing and reading are instructed to the same register,
By having a circuit 102 for invalidating a register number that should be invalidated by canceling, if a pipeline processing cancel condition is satisfied during pipeline processing, the pipe is processed in a plurality of cycles for an instruction to cancel the pipeline processing. If the line processing cancel condition is satisfied, and if the cancel condition is satisfied, and the pipeline processing is canceled, it must be invalidated due to the cancellation in the register that may have the conflicting relationship. Since the register number of the register that does not become invalid can be invalidated, there is an effect that the instruction re-execution after the cancellation condition is satisfied can be speeded up.

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

第1図は本発明の一実施例を示す図,第2図は一実施例
のレジスタ確定待制御部6、レジスタ群1,7および10と
指示回路13との関係を示す図、第3図は一実施例のレジ
スタ確定待制御部6と確定待登録レジスタセット指示制
御部16との関係を示す図、第4図は本発明の一実施例の
動作を説明するための図である。 主要部分の符号の説明 1……命令レジスタ 2……デコーダ 3……セレクタ 5……加算器 6……レジスタ確定待制御部 12,14……判定回路 15……レジスタ確定待一致検出回路 16……確定待登録レジスタセット指示制御部 22……アドレス加算器 24……TLB 26……オペランドキャッシュメモリ 28……ALU
FIG. 1 is a diagram showing an embodiment of the present invention, and FIG. 2 is a diagram showing a relationship between a register confirmation waiting control unit 6, register groups 1, 7 and 10 and an instruction circuit 13 of the embodiment, and FIG. FIG. 4 is a diagram showing the relationship between the register fixed wait control unit 6 and the fixed wait registration register set instruction control unit 16 in one embodiment, and FIG. 4 is a diagram for explaining the operation of one embodiment of the present invention. Explanation of symbols of main part 1 …… Instruction register 2 …… Decoder 3 …… Selector 5 …… Adder 6 …… Register fixed wait control unit 12,14 …… Judgment circuit 15 …… Register fixed wait match detection circuit 16 …… … Fixed waiting registration register set instruction control unit 22 …… Address adder 24 …… TLB 26 …… Operand cache memory 28 …… ALU

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】分岐命令の入力に応答してこの分岐命令の
次に実行すべきアドレスを予測する分岐予測処理を行い
つつパイプライン処理を行い、分岐予測の失敗に応答し
てこの分岐命令以降の命令の書込み先レジスタが無効で
あることを示す情報を出力する無効レジスタ指示手段と
を含む情報処理装置であって、 前記無効レジスタ指示手段は、 実行中の命令に互いに異なる番号を付与する分岐命令番
号付与手段と、 実行中の命令が書込むべきレジスタ番号をこの命令の直
前の分岐命令に対して前記分岐命令番号付与手段により
付与された分岐命令番号と共に保持するレジスタ番号保
持手段と、 分岐予測失敗に応答してこの分岐命令に対して前記分岐
命令番号付与手段により付与された分岐命令番号を出力
する判定手段と、 この判定手段により出力された前記分岐命令番号と前記
レジスタ番号保持手段により保持された前記分岐命令番
号とを比較してこの分岐命令以降の命令の書込み先レジ
スタが無効とされるべきであることを示す情報を出力す
る手段と、 を有することを特徴とする情報処理装置。
1. A pipeline process is performed while performing a branch prediction process for predicting an address to be executed next to this branch instruction in response to the input of a branch instruction, and after this branch instruction in response to a branch prediction failure. And an invalid register instructing unit that outputs information indicating that the write destination register of the instruction is invalid, wherein the invalid register instructing unit assigns different numbers to the instruction being executed. An instruction number giving means, a register number holding means for holding the register number to be written by the instruction being executed together with the branch instruction number given by the branch instruction number giving means to the branch instruction immediately before this instruction; A judgment means for outputting the branch instruction number given by the branch instruction number giving means to the branch instruction in response to the prediction failure, and the decision means. The output branch instruction number is compared with the branch instruction number held by the register number holding means, and information indicating that the write destination register of the instruction after this branch instruction should be invalidated is output. An information processing apparatus comprising:
JP63156247A 1988-06-24 1988-06-24 Information processing equipment Expired - Lifetime JPH07113890B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63156247A JPH07113890B2 (en) 1988-06-24 1988-06-24 Information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63156247A JPH07113890B2 (en) 1988-06-24 1988-06-24 Information processing equipment

Publications (2)

Publication Number Publication Date
JPH01321521A JPH01321521A (en) 1989-12-27
JPH07113890B2 true JPH07113890B2 (en) 1995-12-06

Family

ID=15623599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63156247A Expired - Lifetime JPH07113890B2 (en) 1988-06-24 1988-06-24 Information processing equipment

Country Status (1)

Country Link
JP (1) JPH07113890B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07281893A (en) * 1994-04-15 1995-10-27 Internatl Business Mach Corp <Ibm> Processing system and arithmetic method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0769818B2 (en) * 1984-10-31 1995-07-31 株式会社日立製作所 Data processing device
JPS61288230A (en) * 1985-06-17 1986-12-18 Nec Corp Pipeline control system
JPH0695306B2 (en) * 1986-01-07 1994-11-24 日本電気株式会社 Instruction prefetching device

Also Published As

Publication number Publication date
JPH01321521A (en) 1989-12-27

Similar Documents

Publication Publication Date Title
CA1223371A (en) System for by-pass control in pipeline operation of computer
US4827402A (en) Branch advanced control apparatus for advanced control of a branch instruction in a data processing system
US4984154A (en) Instruction prefetching device with prediction of a branch destination address
US5421022A (en) Apparatus and method for speculatively executing instructions in a computer system
JPH0283735A (en) Instruction prefetching device
JPH0769818B2 (en) Data processing device
JPS6215896B2 (en)
US6412067B1 (en) Backing out of a processor architectural state
US4739470A (en) Data processing system
US5930491A (en) Identification of related instructions resulting from external to internal translation by use of common ID field for each group
EP0378415A2 (en) Multiple instruction dispatch mechanism
JPH07281893A (en) Processing system and arithmetic method
US6704861B1 (en) Mechanism for executing computer instructions in parallel
JPS634208B2 (en)
US4924425A (en) Method for immediately writing an operand to a selected word location within a block of a buffer memory
US6484256B1 (en) Apparatus and method of branch prediction utilizing a comparison of a branch history table to an aliasing table
JPH07113890B2 (en) Information processing equipment
JP3534987B2 (en) Information processing equipment
JPS5991551A (en) Instruction prefetching device forecasting address to be branched
JP3082944B2 (en) Pipeline processing equipment
JPH0774993B2 (en) Information processing equipment
JP2626675B2 (en) Apparatus and method for generating data-induced state signal
JP2894438B2 (en) Pipeline processing equipment
JPS60164842A (en) Instruction prefetching device
JPH0695306B2 (en) Instruction prefetching device