JPS60164842A - Instruction prefetching device - Google Patents

Instruction prefetching device

Info

Publication number
JPS60164842A
JPS60164842A JP2111484A JP2111484A JPS60164842A JP S60164842 A JPS60164842 A JP S60164842A JP 2111484 A JP2111484 A JP 2111484A JP 2111484 A JP2111484 A JP 2111484A JP S60164842 A JPS60164842 A JP S60164842A
Authority
JP
Japan
Prior art keywords
instruction
branch
address
circuit
prediction
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
JP2111484A
Other languages
Japanese (ja)
Other versions
JPH046983B2 (en
Inventor
Toshiteru Shibuya
渋谷 俊輝
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
Nippon Electric 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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP2111484A priority Critical patent/JPS60164842A/en
Priority to US06/699,328 priority patent/US4764861A/en
Priority to DE3587811T priority patent/DE3587811D1/en
Priority to EP85101351A priority patent/EP0157125B1/en
Publication of JPS60164842A publication Critical patent/JPS60164842A/en
Publication of JPH046983B2 publication Critical patent/JPH046983B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To obtain an instruction prefetching device which prefetches instruction words, by indexing a branch history table, where branch information including branch instructions and branch destination addresses are stored, at an instruction prefetch time and prefetching the next instruction in accordance with a branch destination address. CONSTITUTION:Plural pairs of information designating addresses of branch instructions and branch information including branch destination addresses of branch instructions are stored in a branch history table BHT410. In case of the instruction prefetch operation, a check register 411 checks whether information designated by the address of a branch instruction to be prefetched is registered in the branch history table 410 or not. In response to discrimination of registration as the check result, an instruction prefetch control circuit 424 reads out corresponding branch information from the branch history table to continue the instruction prefetch operation. An instruction decoding circuit 403 discriminates whether the branch instruction is a counting branch instruction or not, and a register 423 controls update of contents of the branch history table 410.

Description

【発明の詳細な説明】 発明の属する技術分野 本発明はデータ処理システムの命令シーケンスのステッ
プに含まれる分岐条件判定ステップ実行処理に先立って
判定結果を予測しつつ次の命令の先取りを行なう命令先
取装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Technical Field The present invention relates to an instruction prefetch method that prefetches the next instruction while predicting a decision result prior to executing a branch condition decision step included in a step of an instruction sequence of a data processing system. Regarding equipment.

従来技術 少なくとも1個の分岐命令を含む命令群が記憶装置に命
令シーケンスの形で格納され℃いるデータ処理システム
においては、このような命令シーケンスの実行は、次の
よ5に行なわれる。
BACKGROUND OF THE INVENTION In a data processing system in which a group of instructions including at least one branch instruction is stored in a storage device in the form of an instruction sequence, such an instruction sequence is executed as follows.

まず、前記記憶装置の分岐元アドレスに分岐命令が格納
される。次に、この分岐命令に引き続いて実行される命
令が先取りされもこのあと、分岐命令が実行され、この
実行結果により次に実行される命令が明らかになる。こ
のようガシステムは米国特許4,200,927号に提
案されている。しかし、このシステムでは1分岐命令先
取り制御において実行結果の判別時まで命令先取り制御
を停止させると、処理の迅速化が妨げられる。
First, a branch instruction is stored at a branch source address in the storage device. Next, the instruction to be executed following this branch instruction is prefetched, and then the branch instruction is executed, and the execution result reveals the next instruction to be executed. Such a gas system is proposed in US Pat. No. 4,200,927. However, in this system, if the instruction prefetch control is stopped until the execution result is determined in the one-branch instruction prefetch control, speeding up of processing will be hindered.

この欠点の除去のため、分岐命令の実行結果を予め予測
しこの予測に従って命令先取りを行なう方式が提案され
ている。この予測が正しく行なわれたときには、データ
処理システムは処理時間の少々い遅れで稼働する。例え
ば、そのような従来の予測方式としては次の3つの方式
がある。第1の予測方式では、全ての分岐命令の分岐先
方向が成功側または不成功側のいずれか一方のみに予測
され【いる。
In order to eliminate this drawback, a method has been proposed in which the execution result of a branch instruction is predicted in advance and instructions are prefetched in accordance with this prediction. When this prediction is made correctly, the data processing system operates with a slight delay in processing time. For example, there are the following three methods as such conventional prediction methods. In the first prediction method, the branch destination direction of all branch instructions is predicted to be either the successful side or the unsuccessful side.

他の1つの予測方式では、過去の事実に基づいて分岐先
方向を予測する。すなわち、同じ分岐命令の過去の実行
結果において分岐先がすでに明らかにされているという
事実を用いてこの結果に基づいて予測を行なうことによ
り予測的中率を高めている。このような予測方式はAp
r目1978 IEEECOMPUTERjCompo
nent Progress; Its Effect
on High−8peed Computer Ar
chitecture andMachine Org
anizatlon、l K考え方が示されており、具
体的な構成を示したものとしては、特開昭57−766
38号公報が存在する。
Another prediction method predicts the branch destination direction based on past facts. That is, by using the fact that the branch destination has already been revealed in the past execution results of the same branch instruction and making predictions based on these results, the prediction accuracy rate is increased. Such a prediction method is Ap
rth 1978 IEEE COMPUTERj Compo
nent Progress; Its Effect
on High-8peed Computer Ar
chitecture and Machine Org
Anizatlon, lK concept is shown, and the concrete structure is shown in Japanese Patent Application Laid-Open No. 57-766.
No. 38 exists.

さらにもう1つの予測方式では1分岐命令に対応して分
岐の方向を予測する分岐指示フラグを多数用量し分岐命
令の発生に応答しこれら分岐指示フラグを参照すること
により分岐先を予測している。この例の詳細は特開昭5
3−74857号公報を参照できる。しかし、上述の3
つのいずれの予測方式においても分岐命令の読出し、解
読が必要不可欠であり、予測的中にもかかわらずこれら
の読出しおよび解読動作分だけ処理が遅れるという欠点
がある。
Yet another prediction method uses a large number of branch instruction flags that predict the direction of the branch in response to one branch instruction, and predicts the branch destination by referring to these branch instruction flags in response to the occurrence of a branch instruction. . Details of this example can be found in Japanese Unexamined Patent Publication No. 5
3-74857 can be referred to. However, the above 3
In any of these prediction methods, reading and decoding of branch instructions are essential, and there is a drawback that processing is delayed by the amount of these read and decoding operations even if the prediction is correct.

この欠点を除去する予測方式が特開昭57−59253
号公報に示されている。この方式では、主記憶装置の命
令部の写しである命令キャッジ具メモリのプロ、りに対
応して該プロ、り中に含まれる分岐命令のゑ枝先アドレ
スを、核ブロックの次にフエ、チされるべきブロックの
アドレスとして記憶手段に保持している。命令先取り動
作におい【、命令キヤ、シ、メモリペのアクセスと同時
に前記記憶手段をアクセスして前記分岐先アドレスを読
出し、読み出された分岐先アドレスにより先取りすべき
命令のアドレスを決定している点において、この方式は
上述の従来の3つの予測方式と異なり処理の迅速化に有
効である。しかし、この方式では、命令キャッシュメモ
リのブロック対応で予測するため、該ブロックに分岐命
令が複数個存在するときにはそのそれぞれの分岐命令に
対応して予測を行なうことができない。この結果、精度
の粗い予測的中率しか得られないという欠点がある。
A prediction method that eliminates this drawback is disclosed in Japanese Patent Application Laid-Open No. 57-59253.
It is shown in the publication No. In this method, the branch destination address of the branch instruction contained in the instruction cache memory, which is a copy of the instruction section of the main memory, is stored in the instruction cache memory, which is a copy of the instruction section of the main memory. It is held in the storage means as the address of the block to be checked. In the instruction prefetch operation, the storage means is accessed at the same time as the instruction cache is accessed to read the branch destination address, and the address of the instruction to be prefetched is determined based on the read branch destination address. This method is different from the above-mentioned three conventional prediction methods and is effective in speeding up the processing. However, in this method, prediction is performed in correspondence with blocks of the instruction cache memory, so when a plurality of branch instructions exist in the block, prediction cannot be made in correspondence with each branch instruction. As a result, there is a drawback that only a prediction hit rate with low accuracy can be obtained.

発明の目的 本発明の目的は上述の欠点を除去するようにした命令先
取り装置を提供することにある。
OBJECTS OF THE INVENTION It is an object of the invention to provide an instruction prefetching device which obviates the above-mentioned drawbacks.

発明の構成 本発明の装置は、分岐命令のアドレスを指定する情報と
該分岐命令の分岐先アドレスを含む分岐情報とを対にし
て複数対記憶する分岐ヒストリテ−ブル手段と、 命令先取り動作を行う際に該命令先取り動作において先
増すされる分岐命令のそのアドレスを指定する情報が前
記分岐ヒストリテーブル手段に発鈴されているか否かを
調べる点検手段と、該点検手段により前記分岐ヒストリ
テーブル手段に登碌される分岐゛命令が存在する場合に
該分岐ヒス)9テ一ブル手段から対応する分岐情報を読
出し該分岐情報に従って命令先取り動作を継続せしめる
ように制御する命令先取り制御手段と、該分岐命令が計
数分岐命令であるか否かを判別する手段と、 該判別手段の判別結果に応じて前記ヒストリテーブル手
段の内容の更新を制御する手段とlを備えている。
Structure of the Invention The device of the present invention comprises: branch history table means for storing a plurality of pairs of information specifying the address of a branch instruction and branch information including the branch destination address of the branch instruction; and a branch history table means for performing an instruction prefetch operation. checking means for checking whether information specifying the address of the branch instruction to be incremented in the instruction prefetching operation has been sent to the branch history table means; an instruction prefetch control means for reading out corresponding branch information from a table table means and controlling to continue an instruction prefetch operation according to the branch information; The apparatus comprises means for determining whether an instruction is a counting branch instruction or not, and means for controlling updating of the contents of the history table means in accordance with the determination result of the determining means.

発明の原理と作用 本発明の特徴は分岐命令の実行における分岐方向に加え
て分岐先アドレスがその同じ分岐命令の過去の結果の把
握により比較的高い的中率で予測可能であるという事実
と、ループ回敷を管理するために同じn)数力岐命令(
以降BCT命令と呼ぶ)を多数回絆返すようなループを
構成慢“るプログラムにおいてループから脱出する際の
BCT命4は途中のBCT命令とは分岐方向が異なると
いう事実と、脱出したループに再び入った時のBCT命
令は、ループを脱出する時のBCT命令とは、分岐方向
が異なるという事実に基いて装着が動作することにある
Principle and Operation of the Invention The present invention is characterized by the fact that in addition to the branch direction in the execution of a branch instruction, the branch destination address can be predicted with a relatively high accuracy rate by understanding the past results of the same branch instruction; The same n) number branch instruction (
In a program that has a loop that returns many times (hereinafter referred to as a BCT instruction), the fact that BCT instruction 4 when escaping from a loop has a different branch direction from the BCT instruction in the middle, and The attachment operates based on the fact that the BCT instruction when entering the loop has a different branch direction than the BCT instruction when exiting the loop.

発明の実施例 次に本発明の一実施例を図面を参照して詳細に説明する
。第1図を参照すると本発明の一実施例は、命令アドレ
ス生成回路401.命令アドレス変換回路402.命令
解読回路403.オペランドアドレス生成回路404.
オペランドアドレス変換回路405.オペランド記憶回
路を有するオペランド読出し回路406.命令実行回1
407゜命令記憶回路408.命令バッファ4091分
岐ヒストリテーブル(BHT)410.命令アドレスレ
ジスタ411.命令アドレス加算回路4129分岐情報
バッファ413.命令整列回路4149分岐情報切換回
路4151分岐情報レジスタ416゜417.418.
および419.予測確認回路420.アドレス生成回路
4211選択回路422.レジスタ423.命令先取り
制御回路424およびフリップフロップ425から構成
されている。
Embodiment of the Invention Next, an embodiment of the present invention will be described in detail with reference to the drawings. Referring to FIG. 1, one embodiment of the present invention includes an instruction address generation circuit 401. Instruction address conversion circuit 402. Instruction decoding circuit 403. Operand address generation circuit 404.
Operand address conversion circuit 405. Operand read circuit 406 with operand storage circuit. Instruction execution time 1
407° instruction storage circuit 408. Instruction buffer 4091 Branch history table (BHT) 410. Instruction address register 411. Instruction address addition circuit 4129 Branch information buffer 413. Instruction alignment circuit 4149 Branch information switching circuit 4151 Branch information register 416°417.418.
and 419. Prediction confirmation circuit 420. Address generation circuit 4211 selection circuit 422. Register 423. It is composed of an instruction prefetch control circuit 424 and a flip-flop 425.

命令記憶回路408およびオペランド読出し回路406
内のオペランド記憶回路はともに主記憶装置そのもので
あってもよく、さらに命令記憶回路408が主記憶装置
の命令部の一部の写しである命令キャッシュメモリ、前
記オペランド記憶回路が主記憶装置のオペランド部の一
部の写しであるオペランドキャッシュメモリとして構成
されうる。前記命令キャッシュメモリおよびオペランド
キャッジ、メモリの詳細は、特開昭56−87282号
公報を参照できる。
Instruction storage circuit 408 and operand read circuit 406
Both of the operand storage circuits in the main memory may be the main memory itself, and the instruction storage circuit 408 may be an instruction cache memory that is a copy of a part of the instruction section of the main memory, and the operand storage circuit may be a main memory operand storage circuit. The operand cache memory may be configured as a copy of a portion of the operand cache memory. For details of the instruction cache memory, operand cache, and memory, refer to Japanese Patent Laid-Open No. 56-87282.

本発明は前述の命令の処理単位に対応した装置構成を必
ずしも有する必要はなく、例えば、命令アドレス生成回
路401とオペランドアドレス生成回路404.命令ア
ドレス変抄回路402とオペランドアドレス変捗回銘4
05.命令記憶回路408とオペランド読出し回路40
6内の記憶回路が共用すれたコンピュータシステムにお
いても適用され得る。
The present invention does not necessarily need to have a device configuration corresponding to the above-mentioned instruction processing unit, and for example, the instruction address generation circuit 401, operand address generation circuit 404, . Instruction address modification circuit 402 and operand address modification circuit 4
05. Instruction storage circuit 408 and operand reading circuit 40
The present invention can also be applied to a computer system in which memory circuits in 6 are shared.

第1図においズ前P分岐ヒストリテーブル(BHT)4
10は分岐命令のアドレスを指定する情報と該分岐命令
の実行の予測としての分岐成否フラグと分岐先アドレス
とを第3図に示すように対にして記憶している。前記命
令記憶回路408に対する前記命令アドレスレジスタ(
、IAR)411は、命令読出しのリクエストアドレス
を保持して命令の読出し動作を実行する。
Figure 1 P branch history table (BHT) 4
Reference numeral 10 stores information specifying the address of a branch instruction, a branch success/failure flag as a prediction of execution of the branch instruction, and a branch destination address in pairs as shown in FIG. The instruction address register (
, IAR) 411 holds an instruction read request address and executes an instruction read operation.

さらに前記命令アドレスレジスタ411(IAR)は分
岐ヒストリテーブル410 (BH’r)および命令ア
ドレス加算回路412に信号線101を介して接続され
ている。前記レジスタ411の内容は該分岐ヒストリテ
ーブル410(BAT)を索引し読出されるべき命令の
アドレスがそれに登録されているか否かを示す信号を信
号′IfiA106に出力する。
Further, the instruction address register 411 (IAR) is connected to a branch history table 410 (BH'r) and an instruction address addition circuit 412 via a signal line 101. The contents of the register 411 are used as an index in the branch history table 410 (BAT), and a signal indicating whether the address of the instruction to be read is registered therein is outputted to the signal 'IfiA106.

登録されていれば対応する分岐先アドレスが信号線10
5に読出される。登録されていなければ前記命令アドレ
ス加算回路412により稜続の命令語の命令先取りのた
めのアドレスが生成される。
If registered, the corresponding branch destination address is signal line 10.
5. If it is not registered, the instruction address addition circuit 412 generates an address for instruction prefetching of the consecutive instruction words.

ときにI IAR,)−8”を出力107に生成する 
回路である。前記命令バッファ409は、命令記憶回路
408から読出された8Byteの先取り命令語を蓄積
し命令処理部への命令の供給における待行列(Queu
e)を形成する。前記命令整列回路414は、命令バッ
ファ409が空のとき信号線102を介して命令記憶回
路408から読出される/8Byteの命令語に応答し
て前記命令バッファ409が空でないとき信号線103
を介して前記命令バッファに貯えられる8Byteの命
令語に応答して命令を抽出して信号線104を介して命
令解読回路403に命令を供給する回路である。
When I IAR,)-8” is produced at output 107
It is a circuit. The instruction buffer 409 stores 8-byte prefetched instruction words read from the instruction storage circuit 408 and serves as a queue for supplying instructions to the instruction processing section.
form e). The instruction alignment circuit 414 responds to an 8-byte instruction word read from the instruction storage circuit 408 via the signal line 102 when the instruction buffer 409 is empty, and the signal line 103 when the instruction buffer 409 is not empty.
This circuit extracts an instruction in response to the 8-byte instruction word stored in the instruction buffer via the signal line 104 and supplies the instruction to the instruction decoding circuit 403 via the signal line 104.

命令解読回路403は、信号線104を介して命令語が
与えられると、その命令語長と、その命令語がBCT命
令であるか否かを信号線126により分岐情報レジスタ
に報告する機能を有する。
The instruction decoding circuit 403 has a function of reporting the instruction word length and whether or not the instruction word is a BCT instruction to the branch information register via the signal line 126 when an instruction word is given via the signal line 104. .

前記分岐情報バッファ413H,前記命令バッファ40
9に格納される命令語に対して用意されておりその命令
語中に分岐成功と予測された分岐命令が存在すれば、第
7図に示す該分岐命令の分岐情報を格納する回路であり
、分岐命令のアドレスは信号線101を介してまた分岐
情報と□しての分岐先アドレスおよびVビットは分岐ヒ
ストリテーブル410(BHT)から信号線105を介
してそれぞれセットされ、分岐成功と予測された分岐命
令が存在しなければ、Vビットは0に1分岐命令のアド
レスは信号線101を介してそれぞれセ、トされる。前
記分岐情報切替回路415は、命令バッファ409が空
のとき信号線101および105を介して与えられる前
記分岐情報をそうでないときに前記分岐情報バッファ4
13を介して与えられる前記分岐情報をそれぞれ出力す
る。前記レジスタ416,417および418はそれぞ
れ分岐命令の命令解読、命令アドレス生成、アドレス変
換の各処理ステージに対応しその分岐情報を保持する。
The branch information buffer 413H, the instruction buffer 40
9 is prepared for the instruction word stored in the instruction word, and if there is a branch instruction predicted to be a successful branch in the instruction word, the circuit stores branch information of the branch instruction shown in FIG. The address of the branch instruction is set via the signal line 101, and the branch destination address and V bit as branch information are set from the branch history table 410 (BHT) via the signal line 105, and a successful branch is predicted. If there is no branch instruction, the V bit is set to 0 and the address of the branch instruction is set to 1 via the signal line 101, respectively. The branch information switching circuit 415 switches the branch information provided via the signal lines 101 and 105 when the instruction buffer 409 is empty to the branch information buffer 4 when the instruction buffer 409 is empty.
13, respectively. The registers 416, 417, and 418 correspond to each processing stage of instruction decoding, instruction address generation, and address translation of a branch instruction, and hold branch information thereof.

前記分岐情報レジスタ419はその分岐先アドレス部を
該分岐命令の実行によって生成される実際の分岐アドレ
スに置き換えて保持するレジスタである。レジスタ41
7,418および419は第8図に示す分岐情報を保持
する。前記子側W認回路420は分岐命令の実行によっ
て生成される実際の分岐先アドレス、および分岐成否結
果と、前記分岐情報レジスタ418に保持される該分岐
命令の予測情報との一致をとる回路である。前記アドレ
ス生成回路421は前記分岐情報レジスタ419に保持
される分岐命令のアドレスと餘分岐命令自身の命令語長
とを加算し分岐N0GO側の命令の命令アドレスを生成
する。前記選択回路422ti分岐命令の成否信号線1
10の状態に応答して該信号線の状態が分岐GOを示す
とき線115を介して与えられる前記分岐情報レジスタ
419に保持される分岐先アドレス部の出力を選択し、
前記信号線の状態が分岐N0GOを示すとき信号線11
6を介して与えられる前記アドレス生成回路421の出
力を選択し、信号線113を介して該選択回路422の
出力をレジスタ423と命令アドレスレジスタ(IAR
)411とに供給する。前記レジスタ423は分岐命令
の予測が失敗したとき分岐ヒストリテーブル410(B
HT)を更新−1るためのものであり、さらに信号線1
17を介して廊令アドレスレジスタ411(IAR)に
命令先取りのための新たなアドレスを供給する。前記扁
令先取り制御回路424は綜106を介して分岐ヒスト
リテーブル410(BHT)から与えられる分岐予測信
号および予測確認回路から13112を介して与えられ
る予測成否信号に基づいて命令アドレスレジスタ411
(IAR)の入力を制御する回路である。
The branch information register 419 is a register that replaces the branch destination address field with an actual branch address generated by executing the branch instruction. register 41
7, 418 and 419 hold branch information shown in FIG. The child side W recognition circuit 420 is a circuit that matches the actual branch destination address and branch success/failure result generated by execution of a branch instruction with the prediction information of the branch instruction held in the branch information register 418. be. The address generation circuit 421 adds the address of the branch instruction held in the branch information register 419 and the instruction word length of the branch instruction itself to generate the instruction address of the instruction on the branch N0GO side. The selection circuit 422ti branch instruction success/failure signal line 1
10, selects the output of the branch destination address field held in the branch information register 419, which is given via the line 115 when the state of the signal line indicates branch GO;
When the state of the signal line indicates branch N0GO, the signal line 11
6, and the output of the selection circuit 422 is sent to the register 423 and the instruction address register (IAR) via the signal line 113.
) 411. The register 423 is stored in the branch history table 410 (B) when prediction of a branch instruction fails.
This is for updating the signal line 1 (HT), and the signal line 1
A new address for prefetching the instruction is supplied to the instruction address register 411 (IAR) via the input terminal 17. The prefetch control circuit 424 controls the instruction address register 411 based on a branch prediction signal provided from the branch history table 410 (BHT) via the helix 106 and a prediction success/failure signal provided from the prediction confirmation circuit 13112.
This is a circuit that controls the input of (IAR).

次に前記分岐ヒストリテーブル410(BIT)、前記
予測確認回路420および前記命令先取り制御回路42
4の詳細なブロック図とタイムチャートを参照しながら
本実施例の動作を詳細に説明する。
Next, the branch history table 410 (BIT), the prediction confirmation circuit 420 and the instruction prefetch control circuit 42
The operation of this embodiment will be explained in detail with reference to the detailed block diagram and time chart of No. 4.

第2図を参照すると、前記分岐ヒストリテープル410
(BHT)け、ディレクトリ記憶部501゜データ記憶
部502.テスト回路503,504,505゜および
506.プ2イオリティ回路507.レベル選択回路5
08.およびオア回路509を備えている。前記記憶部
501および502は、1回のリクエストに対して命令
記憶回路408から読出される命令語の単位なプルツク
の単位とし、セット数m、レベル数nの記憶部である。
Referring to FIG. 2, the branch history table 410
(BHT) directory storage section 501, data storage section 502. Test circuits 503, 504, 505° and 506. P2 priority circuit 507. Level selection circuit 5
08. and an OR circuit 509. The storage units 501 and 502 are storage units for a pull unit of an instruction word read from the instruction storage circuit 408 in response to one request, and have m sets and n levels.

第3図を参照すると、記憶部501には分岐命令の命令
アドレスの一部とその内容が有効か否かを示すVビット
が格納され記憶部502には分岐先アドレスの冥アドレ
スが格納されている。前記Vビットは対応する分岐ヒス
トリテーブル(BIT)410のワードの有効性を示す
と同時に該分岐命命の実行の予測としての分岐成否フラ
グの機能を有する。
Referring to FIG. 3, a storage unit 501 stores a part of the instruction address of a branch instruction and a V bit indicating whether the contents are valid or not, and a storage unit 502 stores a subaddress of the branch destination address. There is. The V bit indicates the validity of the word in the corresponding branch history table (BIT) 410 and also functions as a branch success/failure flag as a prediction of execution of the branch instruction.

この分岐ヒストリテーブル(BIT)410への索引は
以下のよう逐セ□ットアソシアティプ法により【行われ
る。
Indexing into the branch history table (BIT) 410 is performed by the sequential set associative method as follows.

第2図に示される前記テスト回路503,504゜50
.5 、および506はテーブル410の各レベルに対
応して命令アドレスレジスタ411(IAR)に保持さ
れるリクエストアドレスが各レベルのBHT−AAi(
iはレベルに対応するサフィクスを示す)に登録されて
いるか否かを示す信号を信号線130,13L132,
133に出力する。第4図を参照すると、前記テスト回
路503,504,505および506のそれぞれは、
一致回路701および大小比較回路702から構成され
ている。
The test circuits 503, 504° 50 shown in FIG.
.. 5 and 506, the request address held in the instruction address register 411 (IAR) corresponding to each level of the table 410 is BHT-AAi (
(i indicates a suffix corresponding to the level) is sent to the signal lines 130, 13L132,
133. Referring to FIG. 4, each of the test circuits 503, 504, 505 and 506 is
It consists of a match circuit 701 and a magnitude comparison circuit 702.

前記一致回路701では、命令アドレスレジスタ(IA
R)411に保持されるリクエストアドレスの一部IA
’a(:18−28)をセットアドレスとして読出され
た記憶部501の各レベルの内容と前記レジスタ411
の内容IAn、(:4−t7)とが比較され、等しいア
ドレスが存在するか否かを検出する。該一致回路701
の出力により命令アドレスレジスタ(IAR)4 t 
1に保持されるリクエストアドレスて読出されるべき命
令語の8Byteブロツク中にすでに分岐ヒストリテー
ブル(BHT)410に登録された分岐命令が存在する
か否かが、判明する。しかしリクエストアドレスとそれ
が読出すべき分岐命令との対応をとるには上記一致検出
のみでは不十分である・。第5図を参照す石と、1回の
リクエストで読出される8By t eの命令語のブロ
ック中に2Byte命令BCo、A。
In the matching circuit 701, an instruction address register (IA
R) Part of the request address held in 411 IA
The contents of each level of the storage unit 501 and the register 411 read out using 'a(:18-28) as the set address
The contents IAn, (:4-t7) are compared to detect whether an equal address exists. The matching circuit 701
The output of instruction address register (IAR) 4t
It is determined whether a branch instruction already registered in the branch history table (BHT) 410 exists in the 8-byte block of the instruction word to be read with the request address held as 1. However, the above-mentioned match detection alone is insufficient to establish a correspondence between the request address and the branch instruction from which it should be read. Referring to FIG. 5, there is a 2-byte instruction BCo, A in a block of 8-byte instruction words read in one request.

Be、 、 BC,、の4個の命令が存在する。命令B
C,。
There are four instructions: Be, , BC, . Command B
C.

Be、、Be2がともに分岐成功と予測された分岐命令
であるときKは、各々の分岐命令ねともにそのアドレス
の一部が記憶部(BTT’l”4A) 501に登録さ
れる。このとき他の分岐命令から命令Aに分岐し【命令
人のアドレス<A>が前記命令語のプロ、りを耽出すた
めのリクエストアドレスとして命令アドレスレジスタ(
IAR)411に押持されるときには9分岐ヒストリテ
ーブル(口1(’]’) 410から読出されるべき分
岐命令の情報は命令の実行の経路から分岐命令BC,の
情郭で寿ければなら寿い。
When Be, Be2 are both branch instructions that are predicted to be branch successes, a part of the address of each branch instruction is registered in the storage unit (BTT'l''4A) 501.At this time, other When branching to instruction A from the branch instruction of [instructor address <A> is the instruction address register (
IAR) 411, the branch instruction information to be read from the 9 branch history table (mouth 1 (']') 410 must be based on the context of the branch instruction BC from the execution path of the instruction. Long life.

従って前記レジスタ(IAR)411に保持されるリク
エストアドレスと前Ie記憶部(BHT−AAl)50
1に保持される分岐命令のアドレスとの関係が上記の一
致条件とぶもに次の関係が成立するとき、対応するレベ
ルのBHT−HITi信号が生成される。この信号社線
130−=133を介してオア回路509に与えられ、
峡BHT−HITi信号のオア信号が線106を介して
出力され分岐子側信号(BHT−HIT信号となる。
Therefore, the request address held in the register (IAR) 411 and the previous Ie storage unit (BHT-AAl) 50
When the relationship with the address of the branch instruction held at 1 satisfies the above matching condition, the BHT-HITi signal of the corresponding level is generated. It is given to the OR circuit 509 via this signal line 130-=133,
The OR signal of the BHT-HITi signal is output via the line 106 and becomes a branch side signal (BHT-HIT signal).

BHT−HITl−(IAR(:4−17)=BH’l
’−AAi(:4−17)) n (IAR(:29 、30) ≦BH’r−AA 
i(:2L30) ) /I BH’l’−AAl(V) 再び第4図を参照すると、前記大小比較回路は、この条
件を実現する回路である。
BHT-HITl-(IAR(:4-17)=BH'l
'-AAi (:4-17)) n (IAR (:29, 30) ≦BH'r-AA
i(:2L30) ) /I BH'l'-AAl(V) Referring again to FIG. 4, the magnitude comparison circuit is a circuit that realizes this condition.

さらに前記信号BHT−HIT1の条件が2ヶ以上のレ
ベルにお−て成立したとき記憶部501の対応するレベ
ル(BIT−AAl)K保持される分岐命れる必要があ
る。再び第5図を参照すると、命令BC3およびBC,
の分岐命令濶係情報が格納される分岐ヒストリーテーブ
ル4100レベルで前記信号nHT−HIT1条件が共
に成立する。このとき命令の実行の経路牟ら命令BC,
に対するレベ〃が選択される必要がある。
Further, when the condition of the signal BHT-HIT1 is satisfied at two or more levels, the corresponding level (BIT-AAl) K of the storage section 501 needs to be held. Referring again to FIG. 5, instructions BC3 and BC,
The signal nHT-HIT1 conditions are both satisfied at the branch history table 4100 level where branch instruction management information is stored. At this time, the instruction execution path is instruction BC,
level must be selected.

前記プライオリティ回路507は、前記信号BHT−H
IT1の2ヶ以上の成立に対するものであり、この出力
により記憶部BHT−DA502のセットアドレスIA
R(:18−28)で示されるエントリの分岐先アドレ
スがレベル選択回路50Bを介し曵読出される。
The priority circuit 507 receives the signal BHT-H.
This is for the establishment of two or more IT1, and this output sets the set address IA of the storage unit BHT-DA502.
The branch destination address of the entry indicated by R (:18-28) is read out via the level selection circuit 50B.

第6図を参照すると、前記プライオリティ回路507は
アンド回路群601−604およびオア回路群605−
608から構成されている。前記アンド回路!#601
−604はn+1個並列に配置されている。前記第2図
におけるレベル泗択回路508のnヶのレベルの選択信
号は第6図における信号Ve −Vo mVs mVs
により以下のように与えられる。
Referring to FIG. 6, the priority circuit 507 includes a group of AND circuits 601-604 and a group of OR circuits 605-
608. Said AND circuit! #601
-604 are arranged in parallel in n+1 pieces. The n level selection signals of the level selection circuit 508 in FIG. 2 are the signals Ve −VomVs mVs in FIG.
is given as follows.

V、のとt’ We Lo−Vo Lt*・” t V
o Lnvo・■、ノドき Vt l4els Lo 
*・・’*Vt LBVo ・Vt ・Vo Vt L
o*V* Iq e・・・mVs LHV、−V、−V
、−V、 oトき V3T、。、v、Ll、・・・、V
、Ln以上のようにして第2図におけるレベル選択回路
508から読出された分岐情報は第1図の命令記憶回路
408から読出される命令と対応づけることが可能であ
る。
V, notot' We Lo-Vo Lt*・”t V
o Lnvo・■, Throat Vt l4els Lo
*・・'*Vt LBVo ・Vt ・Vo Vt L
o*V* Iq e...mVs LHV, -V, -V
, -V, otoki V3T,. ,v,Ll,...,V
, Ln or more, the branch information read from the level selection circuit 508 in FIG. 2 can be associated with the instruction read from the instruction storage circuit 408 in FIG.

第io図には、命令記憶回路408における命令と分岐
ヒストリテーブル(BHT)410における分岐情報の
上記対応関係が示されている。命令の実行順序が命令A
09分岐命令BC@ *Bl 、Be、、B、 sB□
BC,、CI、 C,・・・と予測された場合である。
FIG. io shows the correspondence between instructions in the instruction storage circuit 408 and branch information in the branch history table (BHT) 410. Instruction execution order is instruction A
09 Branch instruction BC@ *Bl , Be, , B, sB□
This is the case where BC,, CI, C, . . . are predicted.

なお、<A>は人命令のアドレスを、BCj は分岐命
令をそれぞれ示す。
Note that <A> indicates the address of the human instruction, and BCj indicates the branch instruction.

1filt図を1照すると、前記昆10図に示した分岐
ヒストリテーブルBHT410 による命令先取り動作
は次のようにされる。リクエストアドレスの癲令アト/
スレジスタ4110セットに応答して命令記憶回路40
8から命令語が読出され、これと同時にテーブルBHT
410が索引される。信号線106を介してBHT−H
IT伯号が出力されると記憶部BHT−DA502の分
岐先アドレス〈B、〉 がアドレスレジスタ411にセ
ットされ、次の命令先取りが行われる。前記信号線10
6を介してBHT−HIT信号が出力されないときには
命令アドレス加算回路412に命令Aの8バイト境界弁
アドレス<A>が与えられ、「8」加算されたアドレス
が出力され、次の命令先取りが避次行われる。
Referring to Figure 1filt, the instruction prefetching operation by the branch history table BHT410 shown in Figure 10 is performed as follows. Request address address/
The instruction storage circuit 40 responds to the setting of the
The instruction word is read from table BHT at the same time.
410 is indexed. BHT-H via signal line 106
When the IT code is output, the branch destination address <B,> of the storage unit BHT-DA 502 is set in the address register 411, and the next instruction is prefetched. The signal line 10
When the BHT-HIT signal is not output through 6, the 8-byte boundary valve address <A> of instruction A is given to the instruction address adder circuit 412, and the address to which "8" has been added is output, avoiding prefetching of the next instruction. Will be done next.

以上の命令の先取りに従えば命令記憶回路408から読
出される命令語は、 テーブルBHT410の内容によ
る予測に従つて順次読出され、命令バッファ409には
予測された命令の実行順に格納することが可能である。
According to the above instruction prefetch, the instruction words read from the instruction storage circuit 408 are read out sequentially according to the prediction based on the contents of the table BHT 410, and can be stored in the instruction buffer 409 in the predicted execution order of the instructions. It is.

このときたとえ信号BIT−HIT が出力されても分
岐予測方向と反対側の命令先取り動作を一部行わせしめ
た後に分岐予測方向の命令先取り動作を行ってもよい。
At this time, even if the signal BIT-HIT is output, the instruction prefetching operation in the branch prediction direction may be performed after partially performing the instruction prefetching operation in the direction opposite to the branch prediction direction.

以上のようにして命令先取りされた命令が分岐命令で第
1図の命令整列回路414により命令解読回路403に
導かれたとき同時に骸分岐命令に対応する分岐情報が最
初の分岐情報レジスタ416(QB、、)にセットされ
る。
When the instruction prefetched as described above is a branch instruction and guided to the instruction decoding circuit 403 by the instruction alignment circuit 414 in FIG. ,,) is set.

以降前記分岐命令の進行に伴い前記命令解読、アドレス
変換に対応して前記分岐情報が第2および第3の分岐情
報レジスタ417 (QRl)および418(QB2)
K転送される。そして前記分岐命令の実行によって生成
される実際の分岐命令の生成結果と前記分岐情報レジス
タ418(QRl)に保持される骸分岐命令の予測情報
との一致が予測確認回路420によりチェックされる。
Thereafter, as the branch instruction progresses, the branch information is stored in the second and third branch information registers 417 (QRl) and 418 (QB2) in response to the instruction decoding and address conversion.
K is transferred. Then, the prediction confirmation circuit 420 checks whether the actual branch instruction generation result generated by the execution of the branch instruction matches the prediction information of the skeleton branch instruction held in the branch information register 418 (QRl).

第9図を参照すると、前記予測確認回路420は比較回
路801.7リツプフayプ802および803、真偽
回路804−807、アンド回路808−813.およ
びオア回路814から構成されている。前記比較回路8
01には分岐命令の実行により生成された分岐先アドレ
スの実アドレスが命令アドレス変換回路402から信号
線109を介して与えられるとともに、分岐情報レジス
タ418 (QB2)から予測された分岐先が信号II
s、108を介して与えられる。前記比較回路801で
は両者の一致、不一致が判嚢され、判定結果は前記フリ
ップフロップ802にセットされる。前記レジスタ41
Bから線108を介して与えられるVビットは前記アリ
ツブフロップ803にセットされる。
Referring to FIG. 9, the prediction confirmation circuit 420 includes comparison circuits 801.7, lip amplifiers 802 and 803, truth/false circuits 804-807, AND circuits 808-813. and an OR circuit 814. The comparison circuit 8
01 is given the real address of the branch destination address generated by the execution of the branch instruction from the instruction address conversion circuit 402 via the signal line 109, and the branch destination predicted from the branch information register 418 (QB2) is given to signal II.
s, 108. The comparison circuit 801 determines whether the two match or do not match, and the determination result is set in the flip-flop 802. The register 41
The V bit provided from B via line 108 is set in the Aritz flop 803.

命令実行回路407から信号線110を介して与えられ
る分岐の成否信号、レジスタ419から信号線130を
介して与えられるBCTビット、および前記フリップフ
ロップ802および803から真偽回路804−807
.アンド回路808−813を通して、■ビットが0.
すなわち1分岐N0GO予側であって実際の分岐成否結
果がGOであった場合の予測N0GO失敗信号と、Vビ
ットが1.すなわち、分岐GO予測であって分岐先アド
レスも一致していたにもかかわらす実際の分岐成否結果
がN0GOであった場合の予測G。
A branch success/failure signal is provided from the instruction execution circuit 407 via the signal line 110, a BCT bit is provided from the register 419 via the signal line 130, and the truth/false circuits 804-807 are sent from the flip-flops 802 and 803.
.. Through the AND circuits 808-813, the ■ bit becomes 0.
That is, the predicted N0GO failure signal when the actual branch success/failure result is GO on the 1 branch N0GO prediction side, and the V bit is 1. That is, prediction G is a prediction G when the actual branch success/failure result is NOGO even though the branch destination address also matches in the branch GO prediction.

失敗信号と1分岐GO予測でありて分岐先アドレスが一
致し曵いなかった場合の予測アドレス失敗信号とが、B
CT命令については−それぞれアンド回路808,80
9および810で生成される。
The failure signal and the predicted address failure signal when the branch destination address matches and does not fall during 1 branch GO prediction are B.
For CT instructions - AND circuits 808, 80 respectively
9 and 810.

BCT命令以゛外の分岐命令について性、それぞれアン
ド回路811,812および813で生”成される。さ
らに、アンド回路808,810,811,812およ
び813の生成する予測失敗信号は、オア回路814で
論理和がとられ、分岐予測失敗信号として信号線112
に出力される。アンド回路809の生成する予測失敗信
号は、BCT GO予枳l失敗信号として信号線131
に出力される。従って、IICT命令において分岐Go
予測であって、分岐先アドレスが一致していたにもかか
わらず、子側Go失敗であった蓼、合には信−@線13
1にBCTGO予測失敗信号が出力され、それ以外の予
測失敗の場合には信号線112に分岐失敗信号が出力さ
れる。
Branch instructions other than the BCT instruction are generated by AND circuits 811, 812, and 813, respectively. Furthermore, prediction failure signals generated by AND circuits 808, 810, 811, 812, and 813 are generated by OR circuit 814. The logical sum is taken on the signal line 112 as a branch prediction failure signal.
is output to. The prediction failure signal generated by the AND circuit 809 is sent to the signal line 131 as a BCT GO prediction failure signal.
is output to. Therefore, in the IICT instruction, the branch Go
Although it was a prediction and the branch destination address matched, the child side Go failed.
A BCTGO prediction failure signal is output to the signal line 112, and a branch failure signal is output to the signal line 112 in the case of other prediction failures.

第1図および第12図を参照すると1分岐情報レジスタ
419 (Qll、 )の分岐先アドレス部icは前記
命令アドレス変換回路402から幼゛たに生成される分
岐先アドレスがセットされる。また前記分岐情報レジス
タ419 (Ql(s)の分岐命令BC1のアドレス部
の内容と該分岐命令BC1自身の命令語長部の内容とが
アドレス生成回路421により加算され分岐N0GO側
の命令の命令アドレスが生成される。
Referring to FIGS. 1 and 12, the branch destination address section ic of the 1-branch information register 419 (Qll, ) is set to the branch destination address that is generated from the instruction address conversion circuit 402. Further, the contents of the address part of the branch instruction BC1 of the branch information register 419 (Ql(s) and the contents of the instruction word length part of the branch instruction BC1 itself are added by the address generation circuit 421, and the instruction address of the instruction on the branch N0GO side is added. is generated.

そして分岐命令BC0の実際の実行により分岐GOなら
ば前記分岐情報レジスタ4 i 9 (QRs)から線
115を介して与えられる分岐先アドレス部の出力〈D
、〉が1分岐N0GOならげ線116を介して与えられ
る前記アドレス生成1u路421の出力〈B2〉が選択
回路422により選択される。
If the branch is GO due to the actual execution of the branch instruction BC0, the output of the branch destination address field <D
, > are applied via the one-branch N0GO parallel line 116, and the output <B2> of the address generation 1u path 421 is selected by the selection circuit 422.

前記分岐命令BC,の分岐予6111失敗偏@ 112
が予測確認回路420から発生したとき核迭択回路42
2の出力〈DI〉が線113を介し℃レジスタ423(
WR)Kセットされる。
Branch prediction 6111 failure bias of the branch instruction BC, @ 112
occurs from the prediction confirmation circuit 420, the kernel selection circuit 42
The output <DI> of 2 is passed through the line 113 to the °C register 423 (
WR) K is set.

一方1分岐情報レジスタ419(Qf%)の分岐命令の
アドレス<net>は信号1114を介して命令アドレ
スレジスタ411 (IAI(、)にセットされる。こ
のアドレス#′iu分岐命令に対応する分岐ヒストリテ
ーブル410(Bl(T)の更新のため線101を介し
1該テーブル410にライトアドレスとし父供給される
。前記力岐予釧失敗侶号112の出力が7リツプ20ツ
ブ425に与えられ、この出力が指示パルスとして縁1
19を介し文テーブル401に与えられる。この出力に
応答して分岐命令の次の命令先取り時のための分岐予測
情報の更新か行なわれる。この更新は本夾施例では予測
N0GO失敗のとき前記レジスタ423(WR)に保持
される新たな分岐先アドレスで行なわれ、予II G 
O失敗のときはVビットをリセットをリセットするよう
に行われるが分岐予測情報の更新におけるアルゴリズム
を用いて他の方法により行なっても差しつかえない。
On the other hand, the address <net> of the branch instruction in the 1 branch information register 419 (Qf%) is set to the instruction address register 411 (IAI(,) via the signal 1114. The branch history corresponding to this address #'iu branch instruction In order to update the table 410 (Bl(T)), it is supplied as a write address to the table 410 via the line 101. Output is edge 1 as instruction pulse
19 to the sentence table 401. In response to this output, branch prediction information for prefetching the next instruction of the branch instruction is updated. In this embodiment, this update is performed with a new branch destination address held in the register 423 (WR) when predicted N0GO fails, and
In the event of an O failure, the V bit is reset, but other methods using an algorithm for updating branch prediction information may be used.

予測失敗したとき予測側に稜続する命令の動作はすべて
キャンセルされ、前記レジスタ423(WR)に保持さ
れる新た碌リクエストアドレスが分岐ヒストリテーブル
410(BHT)の更新後に命令アドレスレジスタ41
1(IA几)に供給され改めて命令の取出しが開始され
る。
When prediction fails, all operations of instructions following the prediction side are canceled, and the new successful request address held in the register 423 (WR) is updated to the instruction address register 41 after updating the branch history table 410 (BHT).
1 (IA), and command retrieval is started again.

第13図を参照すると、M12図における分岐命令BC
,と同様にBC’I’命令、BCT、の実際の分岐先ア
ドレスが命令アドレス変換回路402で生成され1分岐
、情報レジスタ419にセットされる。
Referring to FIG. 13, branch instruction BC in diagram M12
, the actual branch destination address of the BC'I' instruction, BCT, is generated by the instruction address conversion circuit 402 and set in the 1-branch information register 419.

さらに、前記レジスタ4]9の保持するBCT、自身の
アドレスと、命令語長がアドレス生成回路421で加算
され分岐N0GOIIIJのBCT、の次の命令のアド
レス〈B3〉が生成される。
Further, the address of the BCT held in the register 4]9, its own address, and the instruction word length are added in the address generation circuit 421 to generate the address <B3> of the next instruction in the BCT of the branch N0GOIIIJ.

BCT命令13CT、の次際の実行により、命令実行回
路407より信号1i1i!110に出力される分岐成
否信号に応じて前記レジスタ419の保持するGO側分
岐先アドレス〈B2〉、または前記アドレス生成回路4
21の出力するN0GO側分岐先アドレスくB3〉が選
択回路422により選択される。
Due to the next execution of the BCT instruction 13CT, the instruction execution circuit 407 outputs the signal 1i1i! 110, the GO side branch destination address <B2> held in the register 419, or the address generation circuit 4.
21 is selected by the selection circuit 422.

前記予測確認回路420より、信号線131のBCT 
GO予測失敗信号が出力されると、前記選択回路422
の出力は、信号線113を介してレジスタ423と、命
令アドレスレジスタ(2A11.)411に同時にセッ
トされる。しかし、分岐ヒストリテープ)L/410へ
の指示パルスは信号線119に出力されないので、前記
テーブル410の子側情報の更新は行なわれず、すぐ、
失敗した命令の取り出しが実行される。
From the prediction confirmation circuit 420, the BCT of the signal line 131
When the GO prediction failure signal is output, the selection circuit 422
The output of is set simultaneously to the register 423 and the instruction address register (2A11.) 411 via the signal line 113. However, since the instruction pulse to the branch history tape L/410 is not output to the signal line 119, the child information in the table 410 is not updated, and immediately
Fetching of the failing instruction is performed.

第14図を参照すると、前記葡令先堆り制御(ロ)路4
24はフリップフロップ1201*真偽回路1202−
1205およびアンド回路1206から構成されている
。前記フリップフロップ1201は前記分岐予測失敗信
号11′2を1マシンサイクル保持するための7リツプ
フロツプである。この回路424の出力はアドレスレジ
スタ411の前段にある七しクタの選択指示信号となる
。この選択指示信号は、前記命令アドレス加算回路41
2の出力、前記レジスタ423の出力、前記テーブル4
10の出力1分岐情報レジスタ419の出力および選択
回路422の出力のうちのどれを選択するかを指示する
ための信号である。
Referring to FIG. 14, the control (b) path 4
24 is a flip-flop 1201*truth circuit 1202-
1205 and an AND circuit 1206. The flip-flop 1201 is a seven flip-flop for holding the branch prediction failure signal 11'2 for one machine cycle. The output of this circuit 424 becomes a selection instruction signal for the seven vectors in the preceding stage of the address register 411. This selection instruction signal is transmitted to the instruction address addition circuit 41.
2 output, the output of the register 423, the table 4
This is a signal for instructing which of the ten outputs of the output 1 branch information register 419 and the output of the selection circuit 422 is to be selected.

なお、この命令先取り制御回路424の制御により分岐
予測が的中したときには後述する第18図わ きには後述する第19図の命令処理が行なYれる。
Note that when the branch prediction is correct under the control of the instruction prefetch control circuit 424, the instruction processing shown in FIG. 19, which will be described later, is performed in conjunction with FIG. 18, which will be described later.

前記命令アドレス加算回路412は分岐N0GO側の命
令の先取りを行うためのアドレス生成を行う。このとき
アドレスは実アドレスで加算が行われるために、例えば
、ページングを行うコンピュータシステムにおいて前記
アドレス加算がページ境界を越えた場合アドレス変換を
改めてやり諭す必要が生じる。
The instruction address addition circuit 412 generates an address for prefetching an instruction on the branch N0GO side. At this time, since the address is added as a real address, for example, in a computer system that performs paging, if the address addition exceeds a page boundary, it is necessary to re-address the address conversion.

このために前記命令アドレス加算回路412にページ境
界越え検出回路を設は該検出回路によりページ境界越え
が生じた場合信号線118により命令アドレス生成回路
1を起動し命令先取り動作を改めて命令アドレス生成回
路(IA)401及び命令アドレス変換回路(IT)4
02から行うように制御すればよい。
For this purpose, a page boundary crossing detection circuit is provided in the instruction address addition circuit 412. When the detection circuit detects that a page boundary crossing occurs, the instruction address generation circuit 1 is activated by the signal line 118, and the instruction address generation circuit 1 starts the instruction prefetching operation again. (IA) 401 and instruction address translation circuit (IT) 4
It is sufficient to control the process to be performed from 02 onwards.

ここで問題となるのはあらたに分岐ヒストリテーブルB
HT410に前記命令アドレス情報を登録するとき既存
のどの部分に格納された命令アドレス情報を追い出すか
である。
The problem here is to create a new branch history table B.
When registering the instruction address information in the HT 410, the question is which part of the existing instruction address information is to be deleted.

この方法としては使われた順序、すなわち最も古く使わ
れたものからNAK追い出す法LRU(LeastRa
cetuly Used) 、情報が入った順序、すナ
ワチ最も古く入ったものから順に追い出す方法PIFO
(First In First 0ut)等があるが
どちらを用いてもよい。
This method is based on the order of use, that is, the method of expelling NAKs from the oldest
cetuly Used), the order in which information was entered, and the method of expelling information in order from the oldest one PIFO
(First In First 0ut) etc., but either one may be used.

発明の効果 次に本発明の効果を第15図から第21図を参照しなが
ら詳細に説明する。
Effects of the Invention Next, the effects of the invention will be explained in detail with reference to FIGS. 15 to 21.

第15図を参照すると、命令の処理は一般的に次の8つ
の処理単位に分けられる。
Referring to FIG. 15, instruction processing is generally divided into the following eight processing units.

(1)IAステージ:実行すべき命令の命令アドレス(
論理アドレス)が生成される。
(1) IA stage: Instruction address of the instruction to be executed (
logical address) is generated.

(2)ITステージ:生成された命令アドレスのアドレ
ス変換が行われる。
(2) IT stage: Address translation of the generated instruction address is performed.

(3)ICステージ:変換された命令の実アドレスで記
憶装置から命令が読出される。
(3) IC stage: The instruction is read from the storage device at the translated real address of the instruction.

(411Dステージ:読出された命令が解読される。(411D stage: The read instruction is decoded.

(15)OAステージ:解読された命令のオペランドア
ドレス(論理アドレス)が生成される。
(15) OA stage: The operand address (logical address) of the decoded instruction is generated.

(6)OTステージ:生成されたオペランドアドレスの
アドレス変換が行なわれる。
(6) OT stage: Address translation of the generated operand address is performed.

(7)QCステージ:変換されたオペランドの実アドレ
スで記憶装置からオペランドが読出される。
(7) QC stage: The operand is read from the storage device at the real address of the translated operand.

(8)EXステージ:命令が実行される。(8) EX stage: The instruction is executed.

上述のITステージおよびOTステージのアドレス変換
におい曵アドレス変換バッファを設は必要な変換テーブ
ルが骸アドレス変換バッファに存在すれば上記アドレス
変換処理は高速に実行し得る。また、上述のICステー
ジおよびOCステージの命令およびオペランドの読出し
動作において主記憶装置のデータの一部の写しを保持す
るキヤ、シュメモリを設は必要な命令およびオペランド
が該キャッジ、メモリに存在すればICステージおよび
OCステージの処理は高速に行いうる。情報処理システ
ムは上述の各処理単位に対応したリソースを必ずしも有
する必要はない。しかし、説明の簡単のためにここでは
各処理単位にその機能を果す回路があるものとする。上
述のIT、OTおよびIC,QCの各ステージの高速処
理が可能なとき複数の命令の処理の流れを無駄なく実行
する8段のパイプライン制御が可能である。
In the above-mentioned IT stage and OT stage address translation, an address translation buffer is provided, but if a necessary translation table exists in the address translation buffer, the address translation process can be executed at high speed. In addition, in the above-mentioned IC stage and OC stage instruction and operand read operations, a cache memory that holds a copy of a part of the data in the main memory is provided if the necessary instructions and operands exist in the cache memory. Processing of the IC stage and OC stage can be performed at high speed. The information processing system does not necessarily need to have resources corresponding to each of the above-mentioned processing units. However, for ease of explanation, it is assumed here that each processing unit has a circuit that performs its function. When high-speed processing of each of the above-mentioned IT, OT, IC, and QC stages is possible, eight-stage pipeline control is possible to efficiently execute the processing flow of a plurality of instructions.

このときの分岐命令を含む命令の処理の流れを第16図
および第17図を参照しながら説明する。
The flow of processing instructions including branch instructions at this time will be explained with reference to FIGS. 16 and 17.

第16図は分岐命令の命令先取りにおいて前述のすべて
の分岐けIIQQIであると予測した場合の命令り処理
の流れを示す。すなわち、命令A。
FIG. 16 shows the flow of instruction processing when all of the aforementioned branch IIQQIs are predicted in instruction prefetching of a branch instruction. That is, instruction A.

は分岐命令BCの分岐条件を決定する命令で紋分岐条件
は命令A0の実行結果すkわち、時刻t7において決定
される。分岐命令BCは時刻t4において解読されると
命令アドレスの生成回路を用いて分岐命令B、のアドレ
スを生成し以稜B、命令を先取りするように動作まる。
is an instruction that determines the branch condition of the branch instruction BC, and the branch condition is determined as a result of the execution of the instruction A0, that is, at time t7. When the branch instruction BC is decoded at time t4, an instruction address generation circuit is used to generate the address of the branch instruction B, and the branch instruction B is operated to prefetch the instruction.

時刻t2.t3゜およびt4には分岐N0GO側の後読
命令AI、A2゜およびA3の命令先取りのためのアド
レス生成が開始される。時刻t6およびt7には予測動
作としての分岐GO側の後続命令B2およびB3の命令
先取り動作が開始される。時刻t7において分岐条件の
判定結果により、時刻t8以降は正しい命令の処理の流
れに従って処理が継続される。
Time t2. At t3° and t4, address generation for prefetching the lookbehind instructions AI, A2°, and A3 on the branch N0GO side is started. At times t6 and t7, instruction prefetch operations for subsequent instructions B2 and B3 on the branch GO side are started as predictive operations. Based on the branch condition determination result at time t7, processing continues from time t8 onwards according to the correct instruction processing flow.

この場合1分岐命令の出現によるバイブラインのロスサ
イクルは 予測的中(分岐GO) のとき 3サイクル予測失敗(
分岐N0GO)のとき 3サイクルである。
In this case, the loss cycle of the vibe line due to the appearance of a branch instruction is 3 cycles when the prediction is correct (branch GO) and 3 cycles when the prediction is incorrect (branch GO).
When branching (NOGO), it takes 3 cycles.

分岐GO率γ、予測的中率aとしたときこの場合γ=α
であり予測的中率は5分5分である。従ってr;σ=0
.5 であり1分岐命令当り平均的なロスサイクルは axr+3x(t−r)−3サイクル である。
When branch GO rate γ and prediction accuracy rate a, in this case γ=α
The prediction accuracy rate is 5 minutes and 5 minutes. Therefore r; σ=0
.. 5, and the average loss cycle per branch instruction is axr+3x(tr)-3 cycles.

一方、第17図は分岐命令の命令先取りにおいて前述の
同じ分岐命令の過去の結果に基づいて予測を行った場合
の命令の処理の流れを示す。すガわち、分岐命令BCは
、時刻t4において解読されるとともに分岐命令のアト
Vステーブルを探索しその有無によるかもしくは分岐指
示フックの指示の予測により、分岐Go@の命令Blを
先取りするか分岐N0GO側の命令A1を先取りするか
を決定する。前回と同様に時刻t2.t3およびt4に
は分岐N0GO416の後続命令Al、A2およびA3
の命令先取りのためのアドレス生成が開始される。時刻
t6およびt7には予測による命令先取りの後続命令B
1およびB2もしくはA4およびA5の命令のアドレス
生成が開始される。
On the other hand, FIG. 17 shows the flow of instruction processing when prediction is performed based on the past results of the same branch instruction described above in instruction prefetching of a branch instruction. That is, the branch instruction BC is decoded at time t4, and the branch instruction AtV stable is searched for, and the instruction Bl of the branch Go@ is preempted depending on its presence or absence or by predicting the instruction of the branch instruction hook. It is determined whether to prefetch instruction A1 on the branch N0GO side. Same as last time, time t2. At t3 and t4, subsequent instructions Al, A2 and A3 of branch N0GO 416
Address generation for instruction prefetching is started. At times t6 and t7, subsequent instruction B is prefetched by prediction.
Address generation for instructions 1 and B2 or A4 and A5 is started.

時刻t7において分岐条件の判定結果により時刻t8以
降は正しい命令の処理の流れに従って処理が継続される
Based on the branch condition determination result at time t7, processing continues from time t8 onwards according to the correct instruction processing flow.

この場合分岐命令の出現によるパイプラインのロスサイ
クルは 分岐GOと予測して的中したとき 3サイクル 分岐N0GOと予測して的中したとき 0サイクル 分岐GOと予測して失敗したとき 3サイクル 分岐N0GOと予測して失敗したとき 6サイクル である。従って1分岐GO率γ−=0.5 、予測的中
率6−0゜8と仮定したとき1分岐命令当りの平均的な
ロスサイクルは 3sr*geO*(i−r)a+3r(l−a)+6(
1−r)(x−a)=2.xサイクル を得る。
In this case, the pipeline loss cycle due to the appearance of a branch instruction is 3 cycles when the branch GO is predicted and the prediction is correct, and the 3 cycle branch is N0GO when the prediction is correct. When the prediction fails, it takes 6 cycles. Therefore, assuming that the 1-branch GO rate γ-=0.5 and the prediction accuracy rate of 6-0°8, the average loss cycle per branch instruction is 3sr*geO*(i-r)a+3r(l-a )+6(
1-r)(x-a)=2. Get x cycles.

従っ【この従来の発明は同じ分岐命令の過去の結果に基
づいて予測を行った場合高い予測的中率を得るという原
狸を用いることにより常に分岐GOと予測するtlc1
6図に示す処理に比べ幾分の改良がみられる。しかしこ
の改良された発明においてもたとえ予測的9時分岐GO
の場合は依然として3サイクルのロスサイクルを要する
ことになりこれ以上短縮できかい。従って分岐命令が生
じた場合たとえ予測が的中してもロスサイクルを生じる
ことになる。
Therefore, [this conventional invention uses tlc1 which always predicts a branch GO by using the original raccoon dog that obtains a high prediction accuracy rate when predictions are made based on past results of the same branch instruction.
There is some improvement compared to the process shown in Figure 6. However, in this improved invention, even if the predictive 9 o'clock branch GO
In this case, it still requires 3 loss cycles, so it is not possible to shorten it further. Therefore, if a branch instruction occurs, a loss cycle will occur even if the prediction is correct.

第18図、第19図、および第20図は本発明による命
令の処理の流ねを示している。
18, 19, and 20 show the flow of instruction processing according to the present invention.

本発明における命令の処理争位ICステージは命令を記
憶装置から読出す機能の他に、分岐ヒストリテーブルを
索引し読出される命令のアドレスが該分岐ヒストリテー
ブルに登録さねているか否かを検出し1、登録されてい
れば対応する分岐情報を読出し、登録されていなければ
後続命令の命令先取りのためのアドレスを生成する後前
を有する。
In addition to the function of reading instructions from a storage device, the instruction processing stage IC stage of the present invention indexes a branch history table and detects whether the address of the instruction to be read has not been registered in the branch history table. 1, if it is registered, the corresponding branch information is read out, and if it is not registered, an address for prefetching the subsequent instruction is generated.

第18図および第19図を参照すると、分岐命令BCの
時刻t1における動作は次のようにして行なわれる。ま
ず、骸分岐命令BCが命令キャッシュメモリから読出さ
れると同時に分岐ヒストリテーブルが索引される。該分
岐命令Beの命令アドレスが登録されていれば対応する
分岐情報が読出される。該分岐情報を分析した結果、分
岐GO側の予測として該分岐情報中に含まれる分岐先ア
ドレスにより分岐先都令B1の命令先取りを開始するか
もしくは分岐N0GO側の予測として分岐N0GOII
IJの命令A1の命令アドレスを生成して命令A1の先
取りを開始するかが決定される。以降時刻t5までは前
記分岐命令BCの予測期間であり子側側の後続命令が先
取りされ時刻t5において分岐条件が決定される。予測
的中時には第16図に示すようにパイプラインの流れは
乱れを生することなく処理が継続される。子側失敗時に
は第19図に示すように時刻t6で前記分岐ヒス)l)
テーブルの更新を行った後に正しい命令の流れから命令
の取出しを行うように制御される。この場合分岐命令の
出現によるパイプラインのロスサイクルは 予測が的中したとき Oサイクル 予測が失敗したとき 5サイクル である。予測的中率aはこの場合分岐方向だけで力く分
岐先アドレスをも予測することから分岐方向だけの予測
に比べ若干低くなるがその割合は徽々たるものである。
Referring to FIGS. 18 and 19, the operation of branch instruction BC at time t1 is performed as follows. First, the branch history table is indexed at the same time as the skeleton branch instruction BC is read from the instruction cache memory. If the instruction address of the branch instruction Be is registered, the corresponding branch information is read. As a result of analyzing the branch information, as a prediction on the branch GO side, instruction prefetching of the branch destination command B1 is started based on the branch destination address included in the branch information, or as a prediction on the branch N0GO side, branch N0GOII is started.
It is determined whether to generate an instruction address for instruction A1 of IJ and start prefetching instruction A1. The period thereafter until time t5 is the prediction period of the branch instruction BC, and the subsequent instruction on the child side is preempted, and the branch condition is determined at time t5. When the prediction is correct, the processing continues without any disturbance in the flow of the pipeline, as shown in FIG. When the child side fails, the branch hysteresis occurs at time t6 as shown in FIG. 19)
Control is performed to take out instructions from the correct instruction flow after updating the table. In this case, the loss cycles of the pipeline due to the appearance of a branch instruction are 5 cycles when the prediction is correct and 0 cycles when the prediction fails. In this case, since the branch destination address is also strongly predicted based on only the branch direction, the prediction accuracy rate a is slightly lower than when predicting only the branch direction, but the rate is still impressive.

従って、予測的中率α=0.8として1分岐命令当りの
平均的なロスサイクルは0−g+5−(1−a)=xプ
サイル となり従来技術に比べて格段に改良される。
Therefore, assuming the prediction accuracy rate α=0.8, the average loss cycle per branch instruction is 0-g+5-(1-a)=x psi, which is much improved compared to the prior art.

第20図を参照すると、BC’I’命令の分岐G6予側
が失敗した場合の実行のようすを示しており、第19図
における分岐命令BCと同じように実行されるが、時刻
t6において命令BCTは分岐ヒストリテーブルを更新
しないため、正しい命令の取出しは時刻t ′6より開
始される。即ち、分岐予測GO失敗時において、BCT
命令は、BCT命令以外の分岐命令よりもlサイクル・
早く実行される。
Referring to FIG. 20, it shows the execution when the branch G6 prediction side of the BC'I' instruction fails, and is executed in the same way as the branch instruction BC in FIG. 19, but at time t6, the instruction BCT does not update the branch history table, so correct instruction fetching starts at time t'6. That is, when branch prediction GO fails, BCT
The instruction takes one cycle less than a branch instruction other than the BCT instruction.
executed quickly.

第21図を参照すると、BCT命令をループ回数を管理
するために使用したループを構成するプログラムの命令
の流れが示しである。第21図において命令BCTは、
このループの中を実行している間は、分岐ヒストリテー
ブルの保持するGO側の分岐情報に従って、分岐予測成
功でロスサイクルなしに実行される。ループを脱出する
際の命令BCTはBCT GO予測失敗で、分岐ヒスト
リテーブルの更新は行なわずに、すぐ失敗した命令の取
出しが実行される。プログラムの流れによってこのルー
プに再び入るとき、命令BCTの分岐情報はGO側の予
測を示しているため、ロスサイクルなしにループを実行
できる。
Referring to FIG. 21, there is shown a flow of instructions of a program forming a loop using the BCT instruction to manage the number of loops. In FIG. 21, the command BCT is
While this loop is being executed, the branch prediction is successful and execution is performed without loss cycles according to the GO side branch information held in the branch history table. The instruction BCT when exiting the loop is a BCT GO prediction failure, and the failed instruction is immediately fetched without updating the branch history table. When this loop is re-entered by the flow of the program, the branch information of the instruction BCT indicates the prediction on the GO side, so the loop can be executed without loss cycles.

本発明を適用しない場合、ループ脱出の際に分岐ヒスト
リテーブルの命令BCTの分岐情報を分岐N0GO側に
更新するために1サイクルを失い、さらに再びループに
入り、最初にBCTを実行する際にも5サイクルを余分
に費す。
If the present invention is not applied, one cycle is lost to update the branch information of the instruction BCT in the branch history table to the branch N0GO side when exiting the loop, and when the loop is re-entered and BCT is executed for the first time, one cycle is lost. Spend 5 extra cycles.

この発明では、分岐命令のアドレスと該分岐命令の分岐
先アドレスを含む分岐情報とを対にして記憶する分岐ヒ
ストリテーブルを命令先取り時に索引する。このあとで
前記分岐先アドレスで次の命令先取りを行わせしめるこ
とにより命令の解読を行うことなく前記分岐ヒストリテ
ーブルの記述に従って命令語を先取りすることができる
In this invention, a branch history table that stores the address of a branch instruction and branch information including the branch destination address of the branch instruction as a pair is indexed when an instruction is prefetched. Thereafter, by prefetching the next instruction at the branch destination address, the instruction word can be prefetched according to the description in the branch history table without decoding the instruction.

さらに、分岐ヒストリテーブルを、BCT命令の性質に
基づいて、その分岐情報を更新することにより命令バッ
ファには命令の実行の経路に従った命令の待行列を形成
せしめ、情報処理システムのパイプライン制御における
BCT命令の実行を極めて少ないロスサイクルで行なう
ことができるという効果がある。
Furthermore, by updating the branch information in the branch history table based on the characteristics of the BCT instruction, a queue of instructions is formed in the instruction buffer according to the instruction execution path, thereby controlling the pipeline of the information processing system. This has the advantage that the BCT instruction can be executed with extremely few loss cycles.

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

第1図は本発明の一実施例を示す図、第2図は第1図に
おける分岐ヒストリテーブル410の詳細な構成を示す
図、第3図はM2図の記憶部501および502の記憶
形成を示す図、第4図は第2図のテスト回路503−5
06の詳細な構成を示す図、第5図は第1図の命令記憶
回路408における命令語の配列を示す図、第6図は第
2図のプライオリティ回路507の詳細な構成を示す図
、第7図は第1図の分岐情報バッフ 7413およびレ
ジスタ416の格納形式を示す図、第8図は第1図のレ
ジスタ417−419の格納形式を示す図、第9図は第
1図の予測確認回路420の詳細な構成を示す図、第1
θ図は第1図の命令記憶回路408における命令と分岐
ヒストリテーブル410における分岐情報との対応関係
を説明するための図、第11図は第10図のテーブル4
10による命令先取り動作を説明するための図、第12
図は予測失敗時における命令先取り動作開始までの動作
を説明するための図、第13図はBC’I’命令の予測
GO失敗時における命令先取り動作開始までの動作を説
明するための図、第14図は第1図の命令先取り制御回
路424の詳細な構成を示す図、第15図は命令の処理
の流れの概要を示す図、第16図および第17図は従来
の予測方式を用いた命令の処理の流れを示す図、第18
図は分岐命令の予測が的中したときの命令の処理の流れ
を示す図、第19図は分岐命令の予測が失敗したときの
命令の処理の流れを示す図、第20図は本発明において
BCT命令の分岐GO予測が失敗したときの命令の処理
の流れを示す図、および第21図は、BCT命令によっ
てループを構成するプログラムの命令の流れを示す図で
ある。 第1図から第21図において、401・・・・・・命令
アドレス生成回路、402・・・・・・命令アドレス変
換回路、403・・・・・・命令解読回路、404・・
・・・・オペランドアドレス生成回路、405・・・・
・・オペランドアドレス変換回路、406・・・・・・
オペランド読出し回路、407・・・・・・命令実行回
路、408・・・・・・命令記憶回路、409・・・・
・・命令バッファ、41O・・・・・・分岐ヒストリテ
ーブル(BHT)、411・・・・・・命令アドレスレ
ジスタ(IAR)、412・・・・・・命令アドレス加
算回路、413・・・・・・分岐情報バッファ、414
・・・・・・命令整列回路、415・・・・・・分岐情
報切換回路、416・・・・・・分岐情報レジスタ(Q
Ro)、417・・・・・・分岐情報レジスタ(QRI
)、 41 s・・・・・・分岐情報レジスタ(Qへ)
、419・・・・・・ 分岐情報レジスタ(QRI)、
420・・・・・・予測確認回路、421・・・・・・
アドレス生成回路、422・・・・・・ 選択回路、4
23・・・・・・レジスタ(WR)、424・・・・・
・命令先取り制偶1回路、425・・・・・・フリップ
フロップ、501゜502・・・・・・記憶部、503
,504,505,506・・・・・・テスト回路、5
07・・・・・・プライオリティ回路、508・・・・
・・選択回路、509・・・・・・オア回路、601−
604・・・・・・アンド回路、605−608・・・
・・・オア回路。 701・・・・・・一致回路、702・・・・・・大小
比較回路、703・・・・・・アンド回路、801・・
・・・・一致回路。 802−803・・・・・・フリップフロップ、 80
4−807・・・・・・真偽回路、808−813・・
・・・・アンド回路、814・・・・・・オア回路、1
201・・・・・・フリップフロップ、1202−12
05・・・・・・真偽回路、1206 ・・・・・・ア
ンド回路。 第1圀 −e S 、”’) ≧ 3 \ \ 〜 \ \ 〉 ) ≧ l to Ity+ tz+ t31 t4+ ts+
 t4’ t71 tθ1第1第? θ閏 把?/図
FIG. 1 is a diagram showing an embodiment of the present invention, FIG. 2 is a diagram showing a detailed configuration of the branch history table 410 in FIG. The diagram shown in FIG. 4 is the test circuit 503-5 of FIG.
5 is a diagram showing the arrangement of instruction words in the instruction storage circuit 408 of FIG. 1, FIG. 6 is a diagram showing the detailed configuration of the priority circuit 507 of FIG. 7 is a diagram showing the storage format of the branch information buffer 7413 and register 416 in FIG. 1, FIG. 8 is a diagram showing the storage format of registers 417-419 in FIG. A first diagram showing the detailed configuration of the circuit 420.
θ diagram is a diagram for explaining the correspondence between instructions in the instruction storage circuit 408 in FIG. 1 and branch information in the branch history table 410, and FIG. 11 is a diagram for explaining the correspondence relationship between instructions in the instruction storage circuit 408 in FIG.
FIG. 12 is a diagram for explaining the instruction prefetch operation according to No.
13 is a diagram for explaining the operation up to the start of the instruction prefetching operation when prediction fails for the BC'I' instruction. FIG. FIG. 14 is a diagram showing the detailed configuration of the instruction prefetch control circuit 424 in FIG. 1, FIG. 15 is a diagram showing an overview of the instruction processing flow, and FIGS. Diagram showing the flow of instruction processing, No. 18
The figure shows the flow of instruction processing when the prediction of a branch instruction is correct, Figure 19 shows the flow of instruction processing when the prediction of a branch instruction fails, and Figure 20 shows the flow of instruction processing when the prediction of a branch instruction fails. FIG. 21 is a diagram showing the flow of instruction processing when the branch GO prediction of the BCT instruction fails, and FIG. 21 is a diagram showing the flow of instructions of a program forming a loop using the BCT instruction. 1 to 21, 401...instruction address generation circuit, 402...instruction address conversion circuit, 403...instruction decoding circuit, 404...
...Operand address generation circuit, 405...
...Operand address conversion circuit, 406...
Operand reading circuit, 407...Instruction execution circuit, 408...Instruction storage circuit, 409...
...Instruction buffer, 41O...Branch history table (BHT), 411...Instruction address register (IAR), 412...Instruction address addition circuit, 413... ...Branch information buffer, 414
...Instruction alignment circuit, 415...Branch information switching circuit, 416...Branch information register (Q
Ro), 417...Branch information register (QRI)
), 41 s...Branch information register (to Q)
, 419...Branch information register (QRI),
420... Prediction confirmation circuit, 421...
Address generation circuit, 422... Selection circuit, 4
23...Register (WR), 424...
・Instruction preemption control 1 circuit, 425...Flip-flop, 501°502...Storage unit, 503
, 504, 505, 506...Test circuit, 5
07...Priority circuit, 508...
...Selection circuit, 509...OR circuit, 601-
604...AND circuit, 605-608...
...OR circuit. 701... Match circuit, 702... Size comparison circuit, 703... AND circuit, 801...
...matching circuit. 802-803...Flip-flop, 80
4-807...Truth circuit, 808-813...
...AND circuit, 814...OR circuit, 1
201...Flip-flop, 1202-12
05...Truth circuit, 1206...And circuit. 1st area-e S ,”') ≧ 3 \ \ ~ \ \ 〉 ) ≧ l to Ity+ tz+ t31 t4+ ts+
t4' t71 tθ1 1st? θ jump? /figure

Claims (1)

【特許請求の範囲】 指定された汎用レジスタの保持する計数値を計数し該計
数結果により分岐の有無を決定して計数分岐命令を実行
する情報処理システムにおける命令先取り装置において
。 分岐命令のアドレスを指定する情報と該分岐台命令先取
り動作を行う際に骸命令先取り動作において先取りされ
る分岐命令のアドレスを指定する情報が前記分岐ヒス)
 IJテーブル手段に登録されているか否かを調べる点
検手段と。 該点検手段による登録の判明に応答して前記分岐ヒスト
リテーブル手段か、ら対応する分岐情報を読出し該分岐
情報に従って命令先取り動作を継続せしめるよう制御す
る命令先取り制御手段と、骸分岐命令が計数分岐命令で
あるか否かを判別する手段と、 該判別手段の判別結果に応じて前記分岐ヒストリテーブ
ル手段の内容の更新を制御する手段とを備えたことを特
徴とする命令先取り装置。
[Scope of Claim] An instruction prefetching device for an information processing system that counts a count value held in a designated general-purpose register, determines whether or not to branch based on the count result, and executes a count branch instruction. The information specifying the address of the branch instruction and the information specifying the address of the branch instruction prefetched in the blank instruction prefetch operation when performing the branch instruction prefetch operation are the branch hisses)
Inspection means for checking whether or not it is registered in the IJ table means. instruction prefetch control means for reading corresponding branch information from the branch history table means in response to confirmation of registration by the checking means and controlling the instruction prefetch operation to continue in accordance with the branch information; An instruction prefetching device comprising: means for determining whether or not the instruction is an instruction; and means for controlling updating of the contents of the branch history table means in accordance with the determination result of the determining means.
JP2111484A 1984-02-08 1984-02-08 Instruction prefetching device Granted JPS60164842A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2111484A JPS60164842A (en) 1984-02-08 1984-02-08 Instruction prefetching device
US06/699,328 US4764861A (en) 1984-02-08 1985-02-07 Instruction fpefetching device with prediction of a branch destination for each branch count instruction
DE3587811T DE3587811D1 (en) 1984-02-08 1985-02-08 Instruction prefetcher with prediction of branch determination for each branch count instruction.
EP85101351A EP0157125B1 (en) 1984-02-08 1985-02-08 Instruction prefetching device with prediction of a branch destination for each branch count instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2111484A JPS60164842A (en) 1984-02-08 1984-02-08 Instruction prefetching device

Publications (2)

Publication Number Publication Date
JPS60164842A true JPS60164842A (en) 1985-08-27
JPH046983B2 JPH046983B2 (en) 1992-02-07

Family

ID=12045852

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2111484A Granted JPS60164842A (en) 1984-02-08 1984-02-08 Instruction prefetching device

Country Status (1)

Country Link
JP (1) JPS60164842A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62293434A (en) * 1986-06-12 1987-12-21 Nec Corp Branch destination forecasting controlling system
JPS63303432A (en) * 1987-01-22 1988-12-12 Nec Corp System for controlling writing in branching history table
JPH01296341A (en) * 1988-05-25 1989-11-29 Nec Corp Data processor
JPH04287125A (en) * 1991-03-15 1992-10-12 Koufu Nippon Denki Kk Information processor

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5759253A (en) * 1980-09-29 1982-04-09 Nec Corp Branch instruction prefetch system
JPS5815809A (en) * 1981-07-22 1983-01-29 松下電工株式会社 Hair dryer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5759253A (en) * 1980-09-29 1982-04-09 Nec Corp Branch instruction prefetch system
JPS5815809A (en) * 1981-07-22 1983-01-29 松下電工株式会社 Hair dryer

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62293434A (en) * 1986-06-12 1987-12-21 Nec Corp Branch destination forecasting controlling system
JPS63303432A (en) * 1987-01-22 1988-12-12 Nec Corp System for controlling writing in branching history table
JPH01296341A (en) * 1988-05-25 1989-11-29 Nec Corp Data processor
JPH04287125A (en) * 1991-03-15 1992-10-12 Koufu Nippon Denki Kk Information processor

Also Published As

Publication number Publication date
JPH046983B2 (en) 1992-02-07

Similar Documents

Publication Publication Date Title
US4881170A (en) Instruction prefetch control apparatus
US4476525A (en) Pipeline-controlled data processing system capable of performing a plurality of instructions simultaneously
US5341482A (en) Method for synchronization of arithmetic exceptions in central processing units having pipelined execution units simultaneously executing instructions
JP2746549B2 (en) Computer system and operation method thereof
US4409654A (en) Data processor adapted for interruption to an instruction stream
EP0157125A2 (en) Instruction prefetching device with prediction of a branch destination for each branch count instruction
US4912635A (en) System for reexecuting branch instruction without fetching by storing target instruction control information
JPH0283735A (en) Instruction prefetching device
US7376820B2 (en) Information processing unit, and exception processing method for specific application-purpose operation instruction
US5125097A (en) Data flow type information processors where data packets pass through plurality of merging and branching portions of the internal path
EP0093430A2 (en) Pipeline data processing system
US6496924B2 (en) Data processing apparatus including a plurality of pipeline processing mechanisms in which memory access instructions are carried out in a memory access pipeline
EP0223150B1 (en) Information processing apparatus
JPS60164842A (en) Instruction prefetching device
JPS5991551A (en) Instruction prefetching device forecasting address to be branched
JP3146077B2 (en) Processor
US6535943B1 (en) Information processing device enabling floating interrupt to be pending and a method executing an interrupt condition change instruction
EP0307448A1 (en) Apparatus and method for synchronization of arithmetic exceptions in parallel pipelined execution units.
JPS5991549A (en) Method for storing instruction word to instruction buffer
JP3035108B2 (en) Parallel processing unit
JPS60175148A (en) Instruction prefetching device
JPS6310451B2 (en)
JPS5991554A (en) Instruction prefetch device forecasting branch direction
JPS62159230A (en) Instruction prefetching device
JPH0248733A (en) Information processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees