JPS63124135A - Data processor - Google Patents

Data processor

Info

Publication number
JPS63124135A
JPS63124135A JP27069786A JP27069786A JPS63124135A JP S63124135 A JPS63124135 A JP S63124135A JP 27069786 A JP27069786 A JP 27069786A JP 27069786 A JP27069786 A JP 27069786A JP S63124135 A JPS63124135 A JP S63124135A
Authority
JP
Japan
Prior art keywords
instruction
branch
address
destination address
executed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP27069786A
Other languages
Japanese (ja)
Inventor
Masahito Matsuo
雅仁 松尾
Toyohiko Yoshida
豊彦 吉田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP27069786A priority Critical patent/JPS63124135A/en
Publication of JPS63124135A publication Critical patent/JPS63124135A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To effectively increase the processing speed of a data processor by obtaining a jumping destination address with the address of an instruction train carried out before an instruction train under analysis as an index and fetching an instruction train starting at said jumping destination address. CONSTITUTION:A branch instruction undergone branch estimation is carried out by an instruction executing part 3 and a jumping destination address is fixed. Then a comparator 5 compares an estimated jumping destination address 9 with an actual jumping destination address 10. An estimation error signal 11 is outputted when no coincidence is obtained from said comparison and the part 3 performs the branch processing to a correct jumping destination address. In case a branch instruction which is not registered into a branch target buffer 4 is carried out and a branching phenomenon occurs, an address 8 of the instruction that carried out immediately before the branch instruction stored in a latch 6 and under execution is used to register an instruction address 12 carried out right before the branch instruction, a branch estimation bit 13 and a jumping destination address 14 of a branch instruction executing device into the buffer 4. As a result, the buffer 4 can be retrieved before the address of the branch instruction is fixed. Thus the instruction data on the jumping destination address can be early fetched and therefore the processing speed is increased with a data processor.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、パイプライン処理機能と分岐命令の飛び先
予測機構を備えたデータ処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data processing device equipped with a pipeline processing function and a branch instruction jump destination prediction mechanism.

〔従来の技術〕[Conventional technology]

第3図はパイプライン処理機能と分岐命令の飛び先予測
機構を備えた従来のデータ処理装置のブロック図である
。この図において、1ば命令先取り装置としての命令ブ
リフェッチキュー、2は命令解析装置としての命令デコ
ード部、3は命令実行装置としての命令実行部、5は分
岐予測が正17かったかどうかを判定する比較回路、9
は予測される飛び先番地、10は実際の飛び先番地、1
1は予測が外れたことを示ず予i5[り信号、15は分
岐命令等の飛び光子測を行うブランチ・ターゲット・バ
ッファ、16はデコード中の命令の番地、17は現在実
行中の分岐命令の番地である。
FIG. 3 is a block diagram of a conventional data processing device equipped with a pipeline processing function and a branch instruction jump destination prediction mechanism. In this figure, 1 is an instruction briefetch queue as an instruction pre-fetching device, 2 is an instruction decoding unit as an instruction analysis device, 3 is an instruction execution unit as an instruction execution device, and 5 is a judgment whether the branch prediction was correct 17 or not. comparison circuit, 9
is the predicted destination address, 10 is the actual destination address, 1
1 is the prediction i5[return signal indicating that the prediction is wrong, 15 is the branch target buffer that measures the jump photons of branch instructions, etc., 16 is the address of the instruction being decoded, and 17 is the branch instruction currently being executed. This is the address.

また、第4図は、第3図に示したブランチ・ターゲット
・バッファ15の内容を示す図であり、この図において
、13は過去の履歴を基にその分岐命令が再度実行され
た時分岐が起こるかどうかを予測した分岐予測ビット、
14はその分岐命令の飛び先番地、18は分岐命令番地
である。
FIG. 4 is a diagram showing the contents of the branch target buffer 15 shown in FIG. a branch prediction bit that predicted whether it would happen or not;
14 is the jump address of the branch instruction, and 18 is the branch instruction address.

次にデータ処理装置の動作について説明する。Next, the operation of the data processing device will be explained.

命令実行部3がある命令を実行している時、命令デコー
ド部2では次に実行すべき命令をデコードしており、ま
た、命令ブリフェッチキュー1では複数の命令を一定規
則に従う番地で順序付けされた複数の領域に格納する主
記憶装置(以下主記憶という)がアクセスされていない
時間を利用して次にフェッチすべき命令をあらかしめ取
り込んでいる。このようにデータ処理装置では各部が並
列に動作するパイプライン処理を行うことにより実効的
な速度を上げることができる。しかし、命令の流れが乱
れた場合、例えば分岐命令が実行された時には、命令デ
コード部2でのデコード結果および命令ブリフェッチキ
5−1に取や込まれている命令データはキャンセルされ
、命令ブリフェッチキュー1は飛び先番地から新たにキ
ューイングを行う。すなわち、分岐命令実行後、初めて
実行される命令は主記憶から直接取り込まなければなら
ず、その命令がフェッチされデコードされるまで命令実
行部3は命令の実行を中断しなければならない。第3図
に示したデータ処理装置では、この点を改善するために
ブランチ・ターゲラI・・バッファ15と呼ばれるもの
が用いられている。これは、過去に実行された分岐命令
番地18を索引として、その分岐命令の飛び先番地14
および過去の履歴を基にその分岐命令が再度実行された
時に分岐を起こすかどうかを予測した分岐予測ビット1
3を組にして記憶してお(もので、分岐命令を実際に実
行する前に飛び先番地を予測する飛び光子N機構である
。予測の方法によってはかなり高い確率でプログラムの
流れを予測できることがわかっている。
When the instruction execution unit 3 is executing a certain instruction, the instruction decoding unit 2 is decoding the next instruction to be executed, and the instruction prefetch queue 1 is ordering multiple instructions by address according to a certain rule. The main memory (hereinafter referred to as main memory), which stores data in a plurality of areas, utilizes the time when it is not being accessed to anticipate and fetch the next instruction to be fetched. In this way, in a data processing device, effective speed can be increased by performing pipeline processing in which each section operates in parallel. However, when the flow of instructions is disrupted, for example when a branch instruction is executed, the decoding result in the instruction decoding unit 2 and the instruction data fetched into the instruction briefetch key 5-1 are canceled and the instruction briefetch queue 1 performs new queuing from the jump destination address. That is, the first instruction to be executed after execution of a branch instruction must be directly fetched from main memory, and the instruction execution unit 3 must suspend instruction execution until the instruction is fetched and decoded. In the data processing apparatus shown in FIG. 3, something called a branch targeter I buffer 15 is used to improve this point. This uses the previously executed branch instruction address 18 as an index and the jump destination address 14 of that branch instruction.
and branch prediction bit 1, which predicts whether or not a branch will occur when the branch instruction is executed again based on the past history.
It is a jump photon N mechanism that predicts the destination address before actually executing a branch instruction. Depending on the prediction method, it is possible to predict the program flow with a fairly high probability. I know.

次にその動作について説明する。Next, its operation will be explained.

命令ブリフェッチキュー1より命令デコード部2に命令
データが取り込まれると、命令デコード部2は命令デコ
ードを開始するとともに、デコード中の命令の番地16
でブランチ・ターゲット・バッファ15の検索を行う。
When the instruction data is fetched from the instruction briefetch queue 1 to the instruction decoding unit 2, the instruction decoding unit 2 starts decoding the instruction, and at the same time, the instruction data is read from the address 16 of the instruction being decoded.
The branch target buffer 15 is searched.

ブランチ・ターゲット・バッファ15にその命令の番地
が登録されていなかったり、登録されていても分岐予測
ビット13が分岐が起こらないと予測していると命令デ
コード部2は命令ブリフェッチキ:、−1より次の命令
を取り込み、処理を続行する。しかし、ブランチ・ター
ゲット・バッファ15にその命令の番地が登録されてお
り分岐予測ビット13が分岐が起こると予測していると
、分岐が起こると仮定して命令ブリフェッチキュー1は
取り込んでいる命令データをクリアして、ブランチ・タ
ーゲット・バッファ15に予測された飛び先番地14よ
り命令データのキューイングを行い、取り込んだ命令デ
ータを命令デコード部2に渡す。予測が的中した時には
命令実行部3で分岐を起こしな時よ咋も9期に次に実行
すべき命令を主記憶より取り込めるため、次の命令を実
行するまでの待ち時間を短縮することができる。
If the address of the instruction is not registered in the branch target buffer 15, or even if it is registered, the branch prediction bit 13 predicts that the branch will not occur, the instruction decoder 2 fetches the instruction from the instruction briefetch key:, -1. Fetch the next instruction and continue processing. However, if the address of the instruction is registered in the branch target buffer 15 and the branch prediction bit 13 predicts that a branch will occur, the instruction briefetch queue 1 will store the instruction that is fetched assuming that a branch will occur. The data is cleared, instruction data is queued in the branch target buffer 15 from the predicted jump destination address 14, and the fetched instruction data is passed to the instruction decoder 2. When the prediction is correct, the instruction execution unit 3 should not take a branch.Since the next instruction to be executed can be retrieved from the main memory in the 9th period, the waiting time until the next instruction is executed can be shortened. can.

分岐予測が行われた分岐命令が命令実行部3で実行され
飛び先番地が確定すると、比較器ll55において、予
測した飛び先番地9と実際の飛び先番地10の比較を行
い、その結果両者が一致しなかった場合には、予測が外
れたことを示す予測誤り信号11が出力され命令実行部
3は分岐が起こらなかった場合も含めて正しい飛び先番
地への分岐処理を行う。また、ブランチ・ターゲット・
バッファ15に登録されていなかった分岐命令が実行さ
れたり、分岐予測が外れた場合には、現在実行中の分岐
命令の番地17でブランチ・ターゲット・バッファ15
の登録および内容変更の処理を行う。
When the branch instruction for which branch prediction has been performed is executed by the instruction execution unit 3 and the jump destination address is determined, the predicted jump destination address 9 and the actual jump destination address 10 are compared in the comparator ll55, and as a result, both of them are If they do not match, a prediction error signal 11 indicating that the prediction is incorrect is output, and the instruction execution unit 3 performs branch processing to the correct destination address, even if the branch does not occur. Also, branch target
When a branch instruction that has not been registered in the buffer 15 is executed or the branch prediction is incorrect, the branch target buffer 15 is stored at address 17 of the branch instruction currently being executed.
Processes registration and content changes.

このようにブランチ・ターゲット・バッファ15を付加
することにより分岐命令実行後のパイプライン処理の乱
れを抑えられ、計算機の実効的な計算速度を上げること
ができる。
By adding the branch target buffer 15 in this manner, disturbances in pipeline processing after execution of a branch instruction can be suppressed, and the effective calculation speed of the computer can be increased.

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

上記のような従来のパイプライン処理機能を備えたデー
タ処理装置は、以上のように、ブランチ・ターゲット。
As described above, a data processing device equipped with the conventional pipeline processing function is a branch target.

バッファ15を備えることにより飛び先番地の予測を行
ってパイプライン処理の乱れを抑えているが、命令デコ
ードを開始した時の命令の番地は直前にデコードされた
命令の番地にそのデコード結果により確定される命令長
を加えることにより得られるので、命令デコードを開始
すると同時に命令デコードを開始した時の命令の番地を
得ることは困難であるという問題点があった。
By providing a buffer 15, the jump destination address is predicted and disturbances in pipeline processing are suppressed, but when instruction decoding is started, the instruction address is determined to be the address of the instruction decoded immediately before, based on the decoding result. Therefore, there is a problem in that it is difficult to obtain the address of the instruction at the time when instruction decoding is started at the same time as instruction decoding is started.

特に、可変長命令の命令セラ1−を持つデータ処理装置
では命令長の確定に時間がかかるため、命令デコードを
開始した時の命令の番地を得ることはより一層困難であ
るという問題点があった。
In particular, in a data processing device that has an instruction cell 1- for variable-length instructions, it takes time to determine the instruction length, so there is a problem that it is even more difficult to obtain the address of the instruction when instruction decoding is started. Ta.

この発明は、かかる問題点を解決するためになされたも
ので、早い時期に分岐命令の飛び光子測を行えるデータ
処理装置を得ることを目的とするう〔問題点を解決する
ための手段〕 この発明に係るデータ処理装置は、複数の命令を一定規
則に従う番地で順序付けされtコ複数の領域に格納する
主記憶装置に格納された第1の命令列を実行する命令実
行装置と、第1の命令列が命令実行装置で実行されてい
る間に第1の命令列に引き続いた順序の第2の命令列を
解析する命令解析装置と、第2の命令列が命令解析装置
で解析されている間に次に命令解析装置で解析される第
3の命令列を主記憶装置から取り込む命令先取り装置と
、第2の命令列の命令解析時に前回命令解析した第1の
命令列またはそれ以前の命令列の番地を索引として第2
の命令列が分岐命令かどうかを判定し、分岐命令である
ことが判定された時にあらかじめ記憶しておいた飛び先
番地を命令先取り装置に送出してその番地から始まる命
令列を主記憶装置から取り込ませる飛び光子測装置と、
第2の命令列の実行時に確定する飛び先番地と、飛び光
子測装置によって得られた飛び先番地とを比較する比較
回路と、現在実行中の命令列の直前に実行していた命令
列の番地を保持する保持回路とから構成されるデータ処
理装置を、比較回路による比較結果が不一致の場合に命
令列の取込みが再実行されるとともに、飛び光子測装置
内の内容が保持回路に保持されている番地を用いて修正
される構成としたものである。
The present invention has been made to solve these problems, and an object of the present invention is to obtain a data processing device that can perform jump photon measurement of branch instructions at an early stage. A data processing device according to the invention includes: an instruction execution device that executes a first instruction sequence stored in a main memory device that stores a plurality of instructions in a plurality of areas in an order based on addresses according to a certain rule; an instruction analysis device that analyzes a second instruction sequence following the first instruction sequence while the instruction sequence is being executed by the instruction execution device; and the second instruction sequence is analyzed by the instruction analysis device. An instruction pre-fetching device fetches from the main memory a third instruction string to be analyzed next by the instruction analysis device, and an instruction pre-fetching device that fetches the third instruction string to be analyzed next by the instruction analysis device from the main memory, and the first instruction string that was previously analyzed or the previous instruction when analyzing the second instruction string. The second index uses the column address as the index.
It is determined whether the instruction sequence is a branch instruction, and when it is determined that it is a branch instruction, the pre-stored jump destination address is sent to the instruction prefetch device, and the instruction sequence starting from that address is sent from the main memory. A flying photon measurement device that captures
A comparison circuit that compares the jump destination address determined when the second instruction string is executed with the jump destination address obtained by the jump photon measurement device, and If the comparison result by the comparator circuit does not match, the data processing device consisting of a holding circuit that holds addresses is re-fetched, and the contents of the flying photon measurement device are held in the holding circuit. The configuration is such that the address is corrected using the specified address.

〔実施例〕〔Example〕

第1図はこの発明のデータ処理装置の一実施例のブロッ
ク図である。この図において、第3図と同一符号は同一
部分を示し、4は分岐命令等の飛び光子測を行う飛び光
子測装置としてのブランチ・ターゲラ1−・バッファ、
6は前記命令実行部3が現在実行中の命令の直前に実行
していた命令の番地を記憶しておく保持回路としてのラ
ッチ、7はデコード中の命令の直前に実行された命令の
番地、8は現在実行中の分岐命令の直前に実行された命
令の番地である。
FIG. 1 is a block diagram of an embodiment of a data processing apparatus according to the present invention. In this figure, the same reference numerals as in FIG. 3 indicate the same parts, and 4 is a branch targeter 1--buffer as a flying photon measurement device for measuring jumping photons of branch instructions, etc.;
6 is a latch serving as a holding circuit for storing the address of the instruction that was executed immediately before the instruction currently being executed by the instruction execution unit 3; 7 is the address of the instruction that was executed immediately before the instruction that is being decoded; 8 is the address of the instruction executed immediately before the branch instruction currently being executed.

また、第2図は、第1図に示したブランチ・ターゲット
・バッファ4の内容を示ず図であり、この図において、
第4図と同一符号は同一部分を示し、12は分岐命令の
直前に実行された命令の番地である。
Further, FIG. 2 is a diagram without showing the contents of the branch target buffer 4 shown in FIG. 1, and in this diagram,
The same reference numerals as in FIG. 4 indicate the same parts, and 12 is the address of the instruction executed immediately before the branch instruction.

次に動作について説明する。Next, the operation will be explained.

ブランチ・ターゲット・バッファ4は、過去に実行され
た分岐命令の直前に実行された番地12を索引として、
その分岐命令の飛び先番地14および過去の履歴をもと
にその分岐命令が再度実行された時に分岐を起こすかど
うがを予測した分岐予測ビット13を組にして記憶して
おくもので、命令を実際に実行する前に分岐命令である
かどうかを判定して飛び先番地を予測する。命令プリフ
エッチキュー1より命令デコード部2に命令データが取
り込まれると、命令デコード部2は命令デコードを開始
するとともにデコード中の命令の直前にデコードされた
命令の番地7を索引としてブランチ・ターゲット・バッ
ファ4の検索を行う。
The branch target buffer 4 uses the address 12 executed immediately before the branch instruction executed in the past as an index.
The branch prediction bit 13, which predicts whether or not a branch will occur when the branch instruction is executed again, is stored as a set based on the jump address 14 of the branch instruction and the past history. Before actually executing the instruction, determine whether it is a branch instruction and predict the destination address. When instruction data is fetched from the instruction prefetch queue 1 to the instruction decoding unit 2, the instruction decoding unit 2 starts decoding the instruction and uses the address 7 of the instruction decoded immediately before the instruction being decoded as an index to set the branch target. - Search buffer 4.

ブランチ・ターゲット・バッファ4にその番地が登録さ
れていなかったり、登録されていても分岐予測ビット1
3が分岐が起こらないと予測していると、命令デコード
部2は命令プリフェッチキュー1より次の命令を取り込
み処理を続行する。しかし、ブランチ・ターゲット・バ
ッファ4にその番地が登録されており分岐予測ビット1
3が分岐が起こると予測していると、現在デコード中の
命令が分岐命令であり、かつ今回も分岐が起こる確率が
高いと判断され、命令ブリフェッチキュー1は取り込ん
でいる命令データをクリアして、ブランチ・ターゲット
・バッファ4により予測された飛び先番地14より命令
データのキューイングを行い、取り込まれた命令データ
を命令デコード部2に渡す。すなわち、予測が的中した
時には分岐命令の直前に実行された命令の番地でブラン
チ・ターゲット・バッファ4の検索を行うので分岐命令
の番地で検索を行うよりも早期に分岐予測を行うことが
でき、分岐命令実行後次に実行すべき命令をより堅く主
記憶より取り込むことができるため、次の命令を実行す
るまでの待ち時間を短縮することができる。分岐予測が
行われた分岐命令が命令実行部3で実行され飛び先番地
が確定すると、比較口wFI5において、予測した飛び
先番地9と実際の飛び先番地10の比較が行われ、その
結果両者が一致しなかった場合には、予測が外れたこと
を示す予測誤り信号11が出力され、命令実行部3は分
岐が起こらなかった場合も含めて正しい飛び先番地への
分岐処理を行う。また、ブランチ・ターゲット・バッフ
ァ4に登録されていなかった分岐命令が実行されて分岐
が起こった場合には、ラッチ6に記憶されている現在実
行中の分岐命令の直前に実行された命令の番地8を用い
て、ブランチ・ターゲット・バッファ4に分岐命令の直
前に実行された命令番地12、分岐予測ピッ)・13、
分岐命令実行後の飛び先番地14の登録を行う。
If the address is not registered in the branch target buffer 4, or even if it is registered, the branch prediction bit is 1.
3 predicts that the branch will not occur, the instruction decoder 2 fetches the next instruction from the instruction prefetch queue 1 and continues processing. However, that address is registered in branch target buffer 4, and branch prediction bit 1
If 3 predicts that a branch will occur, it is determined that the instruction currently being decoded is a branch instruction and that there is a high probability that a branch will occur this time as well, and the instruction prefetch queue 1 clears the fetched instruction data. Then, instruction data is queued from the jump destination address 14 predicted by the branch target buffer 4, and the fetched instruction data is passed to the instruction decoder 2. That is, when the prediction is correct, the branch target buffer 4 is searched at the address of the instruction executed immediately before the branch instruction, so branch prediction can be performed earlier than when searching at the address of the branch instruction. After execution of a branch instruction, the next instruction to be executed can be fetched from the main memory more reliably, so the waiting time until the next instruction is executed can be shortened. When the branch instruction for which branch prediction has been performed is executed by the instruction execution unit 3 and the jump destination address is determined, the predicted jump destination address 9 and the actual jump destination address 10 are compared in the comparison port wFI5, and as a result, both If they do not match, a prediction error signal 11 indicating that the prediction is incorrect is output, and the instruction execution unit 3 performs branch processing to the correct destination address even if the branch does not occur. In addition, if a branch instruction that was not registered in the branch target buffer 4 is executed and a branch occurs, the address of the instruction executed immediately before the currently executing branch instruction stored in the latch 6 8, the instruction address 12, branch prediction pin), 13, which was executed immediately before the branch instruction is stored in the branch target buffer 4.
The jump destination address 14 after execution of the branch instruction is registered.

このとき分岐予測ビット13は次回実行された時には分
岐すると予測しておく。さらに、分岐予測が外れた場合
には、ラッチ6に記憶されている現在実行中の分岐命令
の直前に実行された命令の番地8を用いてブランチ・タ
ーゲット・バッファ4の分岐予測ビット13や分岐命令
実行後の飛び先番地14の変更を行う。
At this time, the branch prediction bit 13 predicts that the program will branch the next time it is executed. Furthermore, if the branch prediction is incorrect, the address 8 of the instruction executed immediately before the currently executed branch instruction stored in the latch 6 is used to set the branch prediction bit 13 of the branch target buffer 4 and the branch prediction bit 13 of the branch target buffer 4. The jump destination address 14 is changed after the instruction is executed.

このように、分岐命令の直前に実行された命令の番地8
で次に実行される分岐命令の飛び光子測を行うブランチ
・ターゲット・バッファ4を備えることによ怜、分岐命
令の番地が確定する的にブランチ・ターゲット・バッフ
ァ4の検索が行えるため、早期に飛び先番地の命令デー
タ取り込むことが可能となり、分岐命令実行後のパイプ
ライン処理の乱れを抑えデータ処理装置の実効的な処理
速度を上げることができる。
In this way, address 8 of the instruction executed immediately before the branch instruction
By providing a branch target buffer 4 that performs photon measurement for the branch instruction to be executed next, the branch target buffer 4 can be searched as soon as the address of the branch instruction is determined, so the branch target buffer 4 can be searched at an early stage. It becomes possible to take in instruction data at a jump destination address, suppressing disturbances in pipeline processing after execution of a branch instruction, and increasing the effective processing speed of the data processing device.

なお、上記実施例では分岐命令の直前に実行されていた
命令の番地で分岐予測を行っているが、分岐命令の的に
実行されたものならどの命令の番地で分岐予測を行って
もよい。
In the above embodiment, branch prediction is performed at the address of the instruction that was executed immediately before the branch instruction, but branch prediction may be performed at the address of any instruction that was executed as the target of the branch instruction.

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

この発明は以上説明したとおり、複数の命令を一定規則
に従う番地で順序付けされた複数の領域に格納する主記
憶装置に格納された第1の命令列を実行する命令実行装
置と、第1の命令列が命令実行装置で実行されている間
に第1の命令列に引き続いた順序の第2の命令列を解析
する命令解析装置と、第2の命令列が命令解析装置で解
析されている間に次に命令解析装置で解析される第3の
命令列を主記憶装置から取り込む命令先取り装置と、第
2の命令列の命令解析時に前回命令解析した第1の命令
列またはそれ以前の命令列の番地を索引として第2の命
令列が分岐命令かどうかを判定し、分岐命令であること
が判定された時にあらかじめ記憶しておいた飛び先番地
を命令先取り装置に送出してその番地から始まる命令列
を主記憶装置から取り込ませる飛び光子測装置と、第2
の命令列の実行時に確定する飛び先番地と、飛び光子測
装置によって得られた飛び先番地とを比較する比較回路
と、現在実行中の命令列の直前に実行していた命令列の
番地を保持する保持回路とから構成されるデータ処理装
置を、比較回路による比較結果が不一致の場合に命令列
の取込みが再実行されるとともに、飛び光子測装置内の
内容が保持回路に保持されている番地を用いて修正され
る構成としたので、分岐命令の番地で飛び光子測を行う
よりも早い時期に飛び光子測が行え、予測した飛び先番
地の命令をより早く命令デコード部に取り込むことがで
きるtこめ、データ処理装置の実効的な処理速度を上げ
ることができるという効果がある。
As described above, the present invention includes an instruction execution device that executes a first instruction sequence stored in a main memory that stores a plurality of instructions in a plurality of areas ordered by addresses according to a certain rule; an instruction analysis device for analyzing a second instruction sequence in the order subsequent to the first instruction sequence while the instruction sequence is being executed by the instruction execution device; an instruction pre-fetching device that fetches from the main memory a third instruction string to be analyzed next by the instruction analysis device; and an instruction pre-fetching device that fetches from the main memory a third instruction string that is to be analyzed next by the instruction analysis device; It is determined whether the second instruction string is a branch instruction using the address as an index, and when it is determined that it is a branch instruction, the pre-stored jump destination address is sent to the instruction prefetching device and the instruction starts from that address. a flying photon measurement device that imports an instruction sequence from the main memory;
A comparison circuit that compares the jump destination address determined when executing the instruction string with the jump destination address obtained by the jump photon measurement device, and a comparison circuit that compares the jump destination address determined when the instruction string is executed with the jump destination address obtained by the jump photon measurement device, and a comparison circuit that compares the jump destination address determined when the instruction string is executed. If the comparison result by the comparator circuit does not match, the data processing device consisting of a holding circuit that holds data is re-executed to take in the instruction sequence, and the contents of the flying photon measurement device are held in the holding circuit. Since the configuration is corrected using the address, the jump photon measurement can be performed earlier than when the jump photon measurement is performed at the address of the branch instruction, and the instruction at the predicted jump destination address can be taken into the instruction decoding section more quickly. This has the effect of increasing the effective processing speed of the data processing device by as much as possible.

また、履歴に依存する分岐命令では分岐命令の前に実行
された命令番地で分岐予測を行う乙とは特に有効である
Furthermore, for branch instructions that depend on the history, branch prediction is performed using the instruction address executed before the branch instruction, which is particularly effective.

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

第1図はこの発明のデータ処理装置の一実施例のブロッ
ク図、第2図は第1図に示したブランチ・ターゲット・
バッファの内容を示す図、第3図は従来のデータ処理装
置のブロック図、第4図は第3図に示したブランチ・タ
ーゲット・バッファの内容を示す図である。 図において、1は命令ブリフェッチキュー、2は命令デ
コード部、3は命令実行部、4はブランチ・ターゲット
・バッファ、5は比較回路、6はラッチである。 なお、各図中の同一符号は同一または相当部分を示す。 代理人 大 岩 増 雄   (外2名)第1図 第2図 第3図 第4図 手続補正書(自発) 1.事件の表示   特願昭61〜270697号2、
発明の名称   データ処理装置 3、補正をする者 事件との関係 特許出願人 住 所    東京都千代田区丸の内二丁目2番3号名
 称  (601)三菱電機株式会社代表者志岐守哉 4、代理人 住 所    東京都千代田区丸の内二丁目2番3号5
、補正の対象 明細書の特許請求の範囲の欄2発明の詳細な説明の欄 6、補正の内容 (1)明細書の特許請求の範囲を別紙のように補正する
。 (2)明細書第2頁19〜20行の1命令先取り装置と
しての」を削除する。 (3)同じく第6頁3行の[に予測された1を、1によ
り予測された[と補正する。 (4)同じく第7頁8行の「以上のように、」を削除す
る。 (5)  同じ(第7頁9行の1−ターゲット。バッフ
ァ」を、1ターゲット・バッファ」と補正する。 (6)同じく第8頁5行〜第9頁9行の「複数の・・・
・・・構成としたものである。」を、下記のように補正
する。 1複数の命令を一定規則に従う番地で順序付けされた複
数の領域に格納する主記憶装置に格納された第1の命令
列を実行する命令実行装置と、第1の命令列が命令実行
装置で実行されている間に第1の命令列に引き続いた順
序の第2の命令列を解析する命令解析装置と、分岐命令
の直前またはそれ以前に実行された命令列の番地を索引
として分岐予測および飛び先番地が登録され、第2の命
令列の命令解析時に前回命令解析した第1の命令列また
はそれ以前の命令列の番地を索引として第2の命令列が
分岐命令であり、かつ分岐が起こるかどうかを判定し、
分岐が起こることが判定された時にあらかじめ記憶して
おいな飛び先番地を送出してその番地から始まる命令列
を主記憶装置から取り込ませる飛び光子測装置と、第2
の命令列の実行時に確定する飛び先番地と、飛び光子測
装置によって得られた飛び先番地とを比較する比較回路
と、現在実行中の命令列の直前に実行していた命令列の
番地を保持する保持回路とから構成されるデータ処理装
置であって、比較回路による比較結果が不一致の場合に
命令列の取込みが再実行されるとともに、飛び光子測装
置内の内容が保持回路に保持されている番地を用いて修
正され、飛び光子測装置に記憶されていなかった分岐命
令が実行されて分岐が起こった場合に、保持回路に記憶
されている命令列の番地を用いて飛び光子測装置への内
容の登録が行われる構成としたものである。2」(7)
同じく第9頁14〜15行の1命令先取り装置内に1を
削除する。 (8)同じく第10α4行の1実行1を、1デコード−
1と補正する3、 (9)同じ(第10頁14行の[実行された番地12」
を、1実行された命令の番地12」と補正する。 (10)同じく第10頁19行の1分岐命令である」を
、[その命令が実行された結果分岐が起こる。1と補正
する。 (11)同じく第12頁20行の1命令番地12」を、
「命令の番地12」と補正する。 (12)同じく第13頁14行の1命令データ取り込む
−1を、1命令データを取り込む1と補正する。 (13)同じ(第14頁3行〜第15頁6行の1複数の
・・・・修正されるIを、下記のように補正する。 1複数の命令を一定規則に従う番地で順序付けされた複
数の領域に格納する主記憶装置に格納された第1の命令
列を実行する命令実行装置と、第1の命令列が命令実行
装置で実行されている間に第1の命令列に引き続いた順
序の第2の命令列を解析する命令解析装置と、分岐命令
の直前またはそれ以前に実行された命令列の番地を索引
として分岐予測および飛び先番地が登録され、第2の命
令列の命令解析時に前回命令解析した第1の命令列また
はそれ以前の命令列の番地を索引として第2の命令列が
分岐命令であり、かつ分岐が起こるかどうかを判定し、
分岐が起こることが判定された時にあらかじめ記憶して
おいた飛び先番地を送出してその番地から始まる命令列
を主記憶装置から取り込ませる飛び光子測装置と、第2
の命令列の実行時に確定する飛び先番地と、飛び光子測
装置によって得られた飛び先番地とを比較する比較回路
と、現在実行中の命令列の直前に実行していた命令列の
番地を保持する保持回路とから構成されるデータ処理装
置であって、比較回路による比較結果が不一致の場合に
命令列の取込みが再実行されろとともに、飛び光子7N
装置内の内容が保持回路に保持されている番地を用いて
修正され、飛び光子測装置に記憶されていなかった分岐
命令が実行されて分岐が起こった場合に、保持回路に記
憶されている命令列の番地を用いて飛び光子測装置への
内容の登録が行われる」 以  上 2、特許請求の範囲 複数の命令を一定規則に従う番地で順序付けされた複数
の領域に格納する主記憶装置に格納された第1の命令列
を実行する命令実行装置と、前記第1の命令列が前記命
令実行装置で実行されている間に前記第1の命令列に引
き続いた順序の第2の命令列を解析する命令解析装置と
、分岐命令の前記第2の命令列の命令解析時に前回命令
解析した前記第1の命令列またはそれ以前の命令列の番
地を索引として前記第2の命令列が分岐命令であり、か
つ分岐が起こるかどうかを判定し、前記分岐が起こるこ
とが判定された時にあらかじめ記憶しておいた豊星飛び
先番地皇疋出してその番地から始まる命令列を前記主記
憶装置から取り込ませる飛び光子測装置と、前記第2の
命令列の実行時に確定する飛び先番地と、前記飛び光子
測装置によって得られた飛び先番地とを比較する比較回
路と、現在実行中の命令列の直前に実行していた命令列
の番地を保持する保持回路とから構成されるデータ処理
装置であって、前記比較回路による比較結果が不一致の
場合に命令列の取込みが再実行されるとともに、前記飛
び光子測装置内の内容が前記保持回路に保持されている
番地を用いて修正る構成としたことを特徴とするデータ
処理装置。
FIG. 1 is a block diagram of an embodiment of a data processing device according to the present invention, and FIG.
FIG. 3 is a block diagram of a conventional data processing device, and FIG. 4 is a diagram showing the contents of the branch target buffer shown in FIG. 3. In the figure, 1 is an instruction briftetch queue, 2 is an instruction decode section, 3 is an instruction execution section, 4 is a branch target buffer, 5 is a comparison circuit, and 6 is a latch. Note that the same reference numerals in each figure indicate the same or corresponding parts. Agent Masuo Oiwa (2 others) Figure 1 Figure 2 Figure 3 Figure 4 Procedural amendment (voluntary) 1. Indication of the incident: Patent Application No. 1983-270697 2,
Name of the invention Data processing device 3, relationship to the amended person case Patent applicant address 2-2-3 Marunouchi, Chiyoda-ku, Tokyo Name (601) Mitsubishi Electric Corporation Representative Moriya Shiki 4, Agent Address: 2-2-3-5 Marunouchi, Chiyoda-ku, Tokyo
, Claims column 2 of the specification to be amended, Detailed description of the invention column 6, Contents of the amendment (1) The claims of the specification will be amended as shown in the attached sheet. (2) ``As a 1-instruction prefetch device'' on page 2, lines 19-20 of the specification is deleted. (3) Similarly, on page 6, line 3, 1 predicted by [ is corrected to [ predicted by 1. (4) Similarly, delete "as above," on page 7, line 8. (5) Correct the same (1-target buffer on page 7, line 9) to 1 target buffer. (6) Same as page 8, line 5 to page 9, line 9.
...It is structured as follows. ” is corrected as follows. 1. An instruction execution device that executes a first instruction sequence stored in a main memory that stores a plurality of instructions in a plurality of areas ordered by addresses according to a certain rule, and an instruction execution device that executes the first instruction sequence. an instruction analysis device that analyzes a second instruction sequence following the first instruction sequence while the branch instruction is being executed; The destination address is registered, and when the second instruction string is analyzed, the address of the first instruction string that was previously analyzed or the previous instruction string is used as an index, and the second instruction string is a branch instruction and a branch occurs. Determine whether
a jump photon measurement device that sends out a pre-stored jump destination address when it is determined that a branch will occur and fetches an instruction sequence starting from that address from a main memory;
A comparison circuit that compares the jump destination address determined when executing the instruction string with the jump destination address obtained by the jump photon measurement device, and a comparison circuit that compares the jump destination address determined when the instruction string is executed with the jump destination address obtained by the jump photon measurement device, and a comparison circuit that compares the jump destination address determined when the instruction string is executed. The data processing device is composed of a holding circuit that holds data, and when the comparison result by the comparison circuit does not match, the instruction sequence is re-fetched and the contents of the flying photon measurement device are held in the holding circuit. When a branch instruction that has been corrected using the address of the instruction sequence stored in the holding circuit is executed and a branch occurs, the address of the instruction string stored in the holding circuit is used to correct the branch instruction that was not stored in the photon measurement device. The configuration is such that the contents are registered in the . 2” (7)
Similarly, 1 is deleted from the 1-instruction prefetch device on page 9, lines 14-15. (8) Similarly, 1 execution 1 in the 10th α4 line is decoded 1-
1 and correct 3, (9) Same ([Executed address 12] on page 10, line 14)
is corrected to "address 12 of the executed instruction." (10) This is also a 1-branch instruction on page 10, line 19. Correct it to 1. (11) Similarly, page 12, line 20, 1 instruction address 12'',
Correct it to "instruction address 12". (12) Similarly, -1, which takes in one instruction data, on page 13, line 14, is corrected to 1, which takes in one instruction data. (13) The same (1 or more I's in line 3 on page 14 to line 6 on page 15) should be corrected as follows. an instruction execution device that executes a first instruction sequence stored in a main memory that is stored in a plurality of areas; and an instruction execution device that executes a first instruction sequence that is stored in a plurality of areas; An instruction analysis device that analyzes a second instruction sequence in sequence, and a branch prediction and jump address are registered using the address of an instruction sequence executed immediately before or before the branch instruction as an index, and the instruction of the second instruction sequence is registered. Determining whether the second instruction string is a branch instruction and a branch will occur by using the address of the first instruction string or the previous instruction string as an index during analysis,
a jump photon measurement device that sends out a pre-stored jump destination address when it is determined that a branch will occur and fetches an instruction sequence starting from that address from a main memory;
A comparison circuit that compares the jump destination address determined when executing the instruction string with the jump destination address obtained by the jump photon measurement device, and a comparison circuit that compares the jump destination address determined when the instruction string is executed with the jump destination address obtained by the jump photon measurement device, and a comparison circuit that compares the jump destination address determined when the instruction string is executed. The data processing device is composed of a holding circuit that holds the data, and when the comparison result by the comparison circuit does not match, the fetching of the instruction sequence is re-executed, and the flying photon 7N
When the contents of the device are modified using the address held in the holding circuit and a branch instruction that was not stored in the flying photon measurement device is executed and a branch occurs, the instruction stored in the holding circuit The content is registered in the flying photon measuring device using the column address.'' 2. Claims 2. Storing a plurality of commands in a main memory device in which a plurality of instructions are stored in a plurality of areas ordered by addresses according to a certain rule. an instruction execution device that executes a first instruction sequence that has been executed, and a second instruction sequence that follows the first instruction sequence while the first instruction sequence is being executed by the instruction execution device; An instruction analysis device to analyze and when analyzing the second instruction sequence of the branch instruction, use the address of the first instruction sequence that was analyzed last time or the previous instruction sequence as an index to determine whether the second instruction sequence is a branch instruction. and determines whether or not a branch will occur, and when it is determined that the branch will occur, retrieves the pre-stored Hosei jump destination address and reads the instruction sequence starting from that address from the main memory. a flying photon measuring device to be imported; a comparison circuit for comparing a jump address determined upon execution of the second instruction string with the jump destination address obtained by the flying photon measuring device; and a currently executing instruction string. and a holding circuit that holds an address of an instruction string that was executed immediately before, the data processing device is configured to re-fetch the instruction string if the comparison result by the comparison circuit is a mismatch, and A data processing device characterized in that the content in the flying photon measuring device is modified using an address held in the holding circuit.

Claims (1)

【特許請求の範囲】[Claims] 複数の命令を一定規則に従う番地で順序付けされた複数
の領域に格納する主記憶装置に格納されな第1の命令列
を実行する命令実行装置と、前記第1の命令列が前記命
令実行装置で実行されている間に前記第1の命令列に引
き続いた順序の第2の命令列を解析する命令解析装置と
、前記第2の命令列が前記命令解析装置で解析されてい
る間に次に前記命令解析装置で解析される第3の命令列
を前記主記憶装置から取り込む命令先取り装置と、前記
第2の命令列の命令解析時に前回命令解析した前記第1
の命令列またはそれ以前の命令列の番地を索引として前
記第2の命令列が分岐命令かどうかを判定し、前記分岐
命令であることが判定された時にあらかじめ記憶してお
いた飛び先番地を前記命令先取り装置に送出してその番
地から始まる命令列を前記主記憶装置から取り込ませる
飛び先予測装置と、前記第2の命令列の実行時に確定す
る飛び先番地と、前記飛び先予測装置によって得られた
飛び先番地とを比較する比較回路と、現在実行中の命令
列の直前に実行していた命令列の番地を保持する保持回
路とから構成されるデータ処理装置であって、前記比較
回路による比較結果が不一致の場合に命令列の取込みが
再実行されるとともに、前記飛び先予測装置内の内容が
前記保持回路に保持されている番地を用いて修正される
構成としたことを特徴とするデータ処理装置。
an instruction execution device that stores a plurality of instructions in a plurality of areas ordered by addresses according to a certain rule, and executes a first instruction sequence that is not stored in a main memory; an instruction analysis device that analyzes a second instruction sequence following the first instruction sequence while being executed; an instruction pre-fetching device that fetches a third instruction string to be analyzed by the instruction analysis device from the main storage device;
It is determined whether the second instruction sequence is a branch instruction using the address of the instruction sequence or the previous instruction sequence as an index, and when it is determined that the second instruction sequence is the branch instruction, the pre-stored jump destination address is determined. A jump destination prediction device that sends the instruction sequence to the instruction prefetch device and fetches the instruction sequence starting from that address from the main storage device, a jump destination address that is determined when the second instruction sequence is executed, and the jump destination prediction device A data processing device comprising a comparison circuit that compares the obtained jump destination address and a holding circuit that holds the address of an instruction sequence that was executed immediately before the instruction sequence that is currently being executed, the data processing device comprising: If the comparison result by the circuit does not match, the fetching of the instruction sequence is re-executed, and the contents in the jump destination prediction device are corrected using the address held in the holding circuit. data processing equipment.
JP27069786A 1986-11-13 1986-11-13 Data processor Pending JPS63124135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27069786A JPS63124135A (en) 1986-11-13 1986-11-13 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27069786A JPS63124135A (en) 1986-11-13 1986-11-13 Data processor

Publications (1)

Publication Number Publication Date
JPS63124135A true JPS63124135A (en) 1988-05-27

Family

ID=17489698

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27069786A Pending JPS63124135A (en) 1986-11-13 1986-11-13 Data processor

Country Status (1)

Country Link
JP (1) JPS63124135A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0876999A (en) * 1994-09-02 1996-03-22 Nec Corp Branch prediction device
JP2006235723A (en) * 2005-02-22 2006-09-07 Sony Corp Instruction fetch circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0876999A (en) * 1994-09-02 1996-03-22 Nec Corp Branch prediction device
JP2006235723A (en) * 2005-02-22 2006-09-07 Sony Corp Instruction fetch circuit

Similar Documents

Publication Publication Date Title
JP2603626B2 (en) Data processing device
JPH0557616B2 (en)
KR920006275B1 (en) Data processing apparatus
JPH03147022A (en) Branch instruction processing apparatus and method
JPH06110683A (en) Method and apparatus for extending branch target of microprocessor
JPH0863356A (en) Branch estimation device
JP5209633B2 (en) System and method with working global history register
JPH0334024A (en) Method of branch prediction and instrument for the same
JPS6393038A (en) Computer
JP5815596B2 (en) Method and system for accelerating a procedure return sequence
US20230350683A1 (en) Branch prediction method, branch prediction apparatus, processor, medium, and device
JP2006520964A5 (en)
RU2602335C2 (en) Cache predicting method and device
JP3848161B2 (en) Memory access device and method using address translation history table
US6810472B2 (en) Page handling efficiency in a multithreaded processor
US7234046B2 (en) Branch prediction using precedent instruction address of relative offset determined based on branch type and enabling skipping
JP3683439B2 (en) Information processing apparatus and method for suppressing branch prediction
JPS63124135A (en) Data processor
JPH07306785A (en) Processor with branch instruction executing function and branch instruction control method
JP2508021B2 (en) Data processing device
JP3709933B2 (en) Branch instruction acceleration method by branch prediction, and processor
JP3495447B2 (en) Processor with branch instruction execution function
JP3102846B2 (en) Load address cache device and method
JP3851235B2 (en) Branch prediction apparatus and branch prediction method
JP4049490B2 (en) Information processing device