JPH01258031A - Data processor - Google Patents

Data processor

Info

Publication number
JPH01258031A
JPH01258031A JP8611188A JP8611188A JPH01258031A JP H01258031 A JPH01258031 A JP H01258031A JP 8611188 A JP8611188 A JP 8611188A JP 8611188 A JP8611188 A JP 8611188A JP H01258031 A JPH01258031 A JP H01258031A
Authority
JP
Japan
Prior art keywords
instruction
branch
address
prediction
register
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
JP8611188A
Other languages
Japanese (ja)
Inventor
Satoru Sueda
末田 覚
Tatsuya Ueda
達也 上田
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 JP8611188A priority Critical patent/JPH01258031A/en
Publication of JPH01258031A publication Critical patent/JPH01258031A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To improve the reliability of branch instruction predicting by connecting a comparator for outputting an operation control signal to a branch instruction predicting part so that the branch instruction predicting part is not driven in an optional address space. CONSTITUTION:An instruction decoding part 2 sends an instruction address signal S2 to be decoded next to current decoding to the branch instruction predicting part 4 and a mask register 7. The register 7 masks the sent signal S2 and sends the masked instruction address to a comparator 9 and an optional address stored in an address register 8 is also sent to the comparator 9. The comparator 9 compares the value sent from the register 7 with the value sent from the register 8 and sends a control signal S4 to the predicting part 4 in accordance with the compared result so as not to drive the predicting part 4.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、データ処理装置に関し、さらに詳しくは、
命令のパイプライン処理機能を備え、かつ条件分岐命令
の分岐予測機能を有するデータ処理装置の改良に係るも
のである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a data processing device, and more specifically,
The present invention relates to an improvement of a data processing device having an instruction pipeline processing function and a branch prediction function for conditional branch instructions.

〔従来の技術〕[Conventional technology]

従来例によるこの種の命令のパイプライン処理機能を備
えたデータ処理装置の概要構成を第2図のブロック図に
示し、同上データ処理装置の分岐予測部で使用される予
測テーブルを第3図の説明図に示しである。
The general configuration of a conventional data processing device equipped with this kind of instruction pipeline processing function is shown in the block diagram of FIG. 2, and the prediction table used in the branch prediction section of the data processing device is shown in FIG. It is shown in the explanatory diagram.

1ず、第2図に示す従来例装置の構成おいて、符号lは
データバス6を介して、命令をプリフェッチ(先取り制
御)することで待ち行列をつくる命令ブリフェッチキュ
ーを示し、2はこの命令ブリフェッチキューlから命令
を取り込んでデコード(解読)する命令デコード部、3
はこの命令デコード部2においてデコードされた結果を
実際に実行する命令実行部であり、また、4はのちに詳
述する分岐予測テーブルに従って分岐命令の予測を行な
う分岐命令p 1jl11部、5は前記命令デコード部
2のデコート結果により分岐先ア1くレスを生成させる
分岐先アドレス生成回路であり、さらに、Slは分岐予
測信号、Slは次にデコードされる命令のアドレス信号
、S3は現在実行中の命令アドレス信号である。
1. In the configuration of the conventional device shown in FIG. 2, the reference numeral 1 indicates an instruction prefetch queue that creates a queue by prefetching (prefetching control) instructions via the data bus 6, and 2 indicates this instruction prefetch queue. an instruction decode unit that fetches and decodes instructions from the instruction brief fetch queue l; 3;
is an instruction execution unit that actually executes the result decoded by the instruction decoding unit 2; 4 is a branch instruction p1jl11 unit that predicts a branch instruction according to a branch prediction table that will be detailed later; and 5 is the This is a branch destination address generation circuit that generates a branch destination address based on the decoding result of the instruction decoding unit 2. Furthermore, Sl is a branch prediction signal, Sl is an address signal of the next instruction to be decoded, and S3 is currently being executed. This is the instruction address signal.

しかして、この従来例による装置構成の場合には、命令
実行部3で命令が実行されている間に、命令デコート部
2では、次に実行すべき命令がデコードされており、先
の命令実行部3での実行が終!すると、直ちに、この命
令デコード部2で既にデコードされている次の命令が実
行に移されるのである。
However, in the case of the device configuration according to this conventional example, while the instruction execution unit 3 is executing the instruction, the instruction decoding unit 2 is decoding the next instruction to be executed, and the previous instruction is being executed. Part 3 execution is over! Immediately, the next instruction that has already been decoded by the instruction decoding section 2 is executed.

また、この場合、命令プリフェッチキュー!では、図示
しない主記憶がアクセスされていない時間を利用して、
予め命令を取り込んでおき、命令デコード部2が、この
命令ブリフェッチキューlから次にデコードすべき命令
のデータをフェッチ(取り込む)することにより、こ1
では、いわゆる、命令フェッチにかさる時間を短縮させ
ることができる。
Also, in this case, the instruction prefetch queue! Now, using the time when the main memory (not shown) is not being accessed,
By fetching an instruction in advance, the instruction decoding unit 2 fetches (captures) the data of the next instruction to be decoded from this instruction brief fetch queue l.
In this way, the time required for so-called instruction fetching can be reduced.

つまり、パイプライン処理機能を備えたデータ処理装置
においては、前記各部1ないし3を並列に動作させるこ
とによって、その実効的な処理速度を上げるようにして
いるのである。
In other words, in a data processing device equipped with a pipeline processing function, the effective processing speed is increased by operating each of the sections 1 to 3 in parallel.

しかし、一方、前記処理に際して、命令の流れが乱れた
時には、命令デコード部2のデコード結果、および命令
ブリフェッチキューlに取り込まれている命令データが
キャンセルされると共に、命令ブリフェッチキューlで
は、分岐命令によって指定された分岐先アドレスがら、
新たなキューイングを行なうことになる。換言すると、
分岐命令による分岐実行後、始めて実行される命令は、
主記憶から直接、取り込まねばならず、かつその命令が
フェッチされてデコードされるまでの間。
However, on the other hand, when the flow of instructions is disrupted during the above processing, the decoding result of the instruction decoding unit 2 and the instruction data fetched into the instruction briefetch queue l are canceled, and the instruction briefetch queue l is From the branch destination address specified by the branch instruction,
New queuing will be performed. In other words,
The first instruction to be executed after a branch is executed by a branch instruction is
It must be fetched directly from main memory, and before the instruction is fetched and decoded.

命令実行部3での命令の実行を一時、中断しなければな
らない。
The execution of instructions in the instruction execution unit 3 must be temporarily interrupted.

従って、前記した従来例装置の構成では、この点を改善
するために、分岐命令の予測を行なう分岐命令予測部4
を設け、この分岐命令予測部4に対して、第3図に示さ
れている分岐命令アドレスと、その分岐命令が過去に実
行された時の履歴をもとにして、これが次回に実行する
時に分岐されるか否かを予測した分岐予測ビットとのそ
れぞれを組にして記憶させておき、この記憶された分岐
予測テーブルを利用することによって、その分岐や測を
行なわせるようにしており、この予測テーブルの作成手
段の如何によっては、かなり高い確率でプログラムの流
れを予測し得ることが判っている。
Therefore, in the configuration of the conventional device described above, in order to improve this point, the branch instruction prediction unit 4 that predicts branch instructions
The branch instruction prediction unit 4 uses the branch instruction address shown in FIG. Each branch prediction bit that predicts whether or not a branch will be taken is stored in pairs, and the stored branch prediction table is used to perform the branch or measurement. It has been found that depending on the method used to create the prediction table, it is possible to predict the flow of a program with a fairly high probability.

次に、この従来例装置の場合での動作をより一層、詳細
に述べる。
Next, the operation of this conventional device will be described in more detail.

11η記分岐命令チ測部4においては、次に命令デコー
ド部2でデコードされる命令のアドレス信号S2に基す
いて、この命令デコード部2に分岐予測信号51を送る
。こ)で、分岐予測信号Slは、前記第3図に示した分
岐予測ビットの値であって、その命令が最近実行された
分岐命令で、かつ過去の履歴によって、次回実行する時
に分岐されるか否かを予測したものである。
The branch instruction detection section 4 sends a branch prediction signal 51 to the instruction decoding section 2 based on the address signal S2 of the next instruction to be decoded by the instruction decoding section 2. In this case, the branch prediction signal Sl is the value of the branch prediction bit shown in FIG. This is a prediction of whether or not it will happen.

また、一方、前記命令ブリフェッチキュー■から命令デ
コード部2に命令データが取り込まれると、この命令デ
コード部2では、命令デコードが開始され、そして、こ
の命令デコードの結果、デコードされた命令が、分岐命
令であって、しかも分岐予測部4からの分岐予測信号S
lが、分岐の発生を予測しているときには、命令ブリフ
ェッチキュー1に取り込まれた命令データがクリアされ
、かつ命令デコード部2でのデコード結果に基すいて、
分岐先アドレス生成回路5では、分岐先アドレスが生成
されると共に、この分岐先アドレスが命令ブリフェッチ
キューlに受は渡され、また、同命令プリフェッチキュ
ーlにおいては、その分岐先アドレスに従って命令のキ
ューイングを行ない、取り込まれた命令データを命令デ
コード部2に受は渡す。
On the other hand, when instruction data is taken into the instruction decoding section 2 from the instruction brief fetch queue (2), instruction decoding is started in the instruction decoding section 2, and as a result of this instruction decoding, the decoded instruction is A branch instruction and a branch prediction signal S from the branch prediction unit 4
When l predicts the occurrence of a branch, the instruction data fetched into the instruction briefetch queue 1 is cleared, and based on the decoding result in the instruction decoding unit 2,
In the branch destination address generation circuit 5, a branch destination address is generated, and this branch destination address is passed to the instruction prefetch queue l, and the instruction prefetch queue l also processes instructions according to the branch destination address. Queuing is performed and the fetched instruction data is passed to the instruction decoding section 2.

そして、前記分岐予測が的中した時、命令実行部3にお
いては、次に実行すべき命令が、より早期に主記憶から
取り込まれて、その結果9次の命令実行までの待ち時間
を短縮することができ、また、前記分岐予測が外れた時
には、現在実行中の命令のアドレスS3によって、1前
記第3図に示す分岐予1jjllテーブルでのアドレス
、分岐予測ビットの背SJ(分岐発’Cと、予測しなか
ったにもか)わらず分岐し7た時)、および抹消(分岐
発生と、予測したにもか\わらず分岐しなかった時)の
各操作を行なうもので、このような分岐命令予1111
1部4の付加により、分岐命令実行後の分岐によるバイ
ブライン処理の乱打を抑制し、これによって、データ処
理時での実効的な計算処理速度を向上させるようにして
いるのである。
When the branch prediction is correct, the next instruction to be executed is fetched from the main memory in the instruction execution unit 3 earlier, thereby shortening the waiting time until the ninth instruction is executed. In addition, when the branch prediction is incorrect, the address SJ of the branch prediction bit in the branch prediction 1jjll table shown in FIG. It performs the following operations: (when a branch is taken even though it was not predicted), and erasure (when the branch is taken and the branch is not taken even though it was predicted). branch instruction preliminaries 1111
By adding part 1 and 4, it is possible to suppress random execution of vibe line processing due to branching after execution of a branch instruction, thereby improving the effective calculation processing speed during data processing.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来例での命令のバイブライン処理機能を備えたデータ
処理装置の場合には、前記したように、分岐命令予測部
4を付加させることによって、条件分岐命令における分
岐の発生の予測を行ない、これによってバイブラインの
乱れを抑制させるようにしているのであるが、このよう
な装置構成の場合、また一方で、マルチ・タスク処理な
どを行なうオペレーティング・システム(以下、O5と
略称する)トにおいて、複数のユーザ・プログラムが走
っているときには、このユーザ・プログラムを切り換え
る度毎に、同ユーザ・プログラムで使用されている分岐
命令予測部での分岐−r測テーブルが、OS領域中での
条件分岐命令を予測するときにも使用されることになっ
て、この分岐予測テーブルが書き換えられ、その結果、
O3領域中における条件分岐命令が、ユーザ・プログラ
ムの分岐予1i111を狂わせて了つと云う可能性かあ
るなどの問題点があった。
In the case of a conventional data processing device equipped with an instruction vibe line processing function, the branch instruction prediction unit 4 is added to predict the occurrence of a branch in a conditional branch instruction, as described above. However, in the case of such a device configuration, on the other hand, in an operating system (hereinafter referred to as O5) that performs multi-task processing, multiple When a user program is running, each time this user program is switched, the branch-r measurement table in the branch instruction prediction unit used in the user program changes to the conditional branch instruction in the OS area. This branch prediction table is rewritten, and as a result,
There is a problem that a conditional branch instruction in the O3 area may disturb the branch prediction 1i111 of the user program and complete the program.

この発明は、従来のこのような問題点を解消するために
なされたもので、その目的とするところは、マスク・レ
ジスタ、およびアドレス・レジスタを設けて、これらの
各レジスタの偵を適切に:設定することにより、任意の
アドレス空間については、その分岐命令予測部での動作
がなされないよう、にした、この種のデータ処理装置を
提供することである。
This invention was made to solve these conventional problems, and its purpose is to provide a mask register and an address register, and to properly control each of these registers: It is an object of the present invention to provide a data processing device of this type in which, by setting the branch instruction prediction unit, no operation is performed for an arbitrary address space.

〔課題を解決するための手段〕[Means to solve the problem]

前記l」的を達成するために、この発明に係るデータ処
理装置は、命令のパイプライン処理機能を備える構成に
おいて、分岐命令予測部を動作させる場合、命令デコー
ド部からのアドレスにマスクをかけた値と、アドレス・
レジスタの値とを比較し、これらの外植が一致するとき
には、分岐予測部を動作させない制御信号を出力させる
ようにしたものである。
In order to achieve the above object, the data processing device according to the present invention masks the address from the instruction decoding section when operating the branch instruction prediction section in a configuration including an instruction pipeline processing function. value and address
The register values are compared, and when these explants match, a control signal is output that does not operate the branch prediction unit.

すなわち、この発明は、命令のパイプライン処理機能、
ならびに条件分岐命令の分岐予測機能を有するデータ処
理装置であって、次に実行すべき命令をデコードする命
令デコード部と、この命令デコード部でデコードされた
結果を実行する命令実行部と、前記命令デコード部でデ
コードされる分岐命令の分岐予測信号を、この命令デコ
ード部に与える分岐命令予測部と、前記命令デコード部
からの命令アドレスにマスクをかけるマスク・レジスタ
、および任意のアドレスを設定し得るアドレス・レジス
タと、前記マスク・レジスタでマスクされた前記命令デ
コード部からのアドレス、および前記アドレス・レジス
タの値を比較して、餌記分岐命令予測部に動作制御信号
を出力する比較器とを備えたことを特徴とするデータ処
理装置である。
That is, the present invention provides an instruction pipeline processing function,
and a data processing device having a branch prediction function for conditional branch instructions, comprising an instruction decoding unit that decodes an instruction to be executed next, an instruction execution unit that executes a result decoded by the instruction decoding unit, and the instruction A branch instruction prediction section that supplies a branch prediction signal of a branch instruction decoded by the decoding section to this instruction decoding section, a mask register that masks the instruction address from the instruction decoding section, and an arbitrary address can be set. a comparator that compares the address register, the address from the instruction decoding section masked by the mask register, and the value of the address register, and outputs an operation control signal to the branch instruction prediction section; This is a data processing device characterized by comprising:

〔作   用〕[For production]

従って、この発明の場合、任意のアドレスによる分岐命
令予測部における判断が、O8領域中における条件分岐
命令によっては動作しないようにできて、分岐命令予測
の信頼性をより一層、向上し得るのである。
Therefore, in the case of the present invention, the judgment made by the branch instruction prediction unit based on an arbitrary address can be prevented from occurring depending on the conditional branch instruction in the O8 area, and the reliability of branch instruction prediction can be further improved. .

〔実 施 例〕〔Example〕

以下、この発明に係るデータ処理装置の一実施例につき
、第1図を参照して詳細に説明する。
Hereinafter, one embodiment of a data processing apparatus according to the present invention will be described in detail with reference to FIG.

第1図はこの実施例による命令のパイプライン処理機能
と、条件分岐命令の分岐予11!1機能とを備えたデー
タ処理装置の概要構成を示すブロック図であり、この第
1図実施例構成において、前記第2図従来例構成と同一
符号は同一または相当部分を表わしている。
FIG. 1 is a block diagram showing a general configuration of a data processing device equipped with an instruction pipeline processing function and a conditional branch instruction branch prediction 11!1 function according to this embodiment. 2, the same reference numerals as those in the conventional structure shown in FIG. 2 represent the same or corresponding parts.

すなわち、この第1図実施例構成においても、符号1は
データバス6を介し命令をプリフェッチして待ち行列を
つくる命令プリフェッチキュー、2はこの命令プリフェ
ッチキューlから命令を取り込んでデコードする命令デ
コード部、3はこの命令デコード部2でデコードされた
結果を実際に実行する命令実行部、4は分岐命令アドレ
スと分岐予測ビットとを組にした分岐予測テーブルに従
って分岐命令の予測を行なう分岐命令予測部、5は命令
デコード部2のデコード結果によって分岐先アドレスを
生成させる分岐先アドレス生成回路であり、Stは分岐
予測信号、S2は次にデコードされる命令のアドレス信
号、S3は現在実行中の命令アドレス信号である。
In other words, in the configuration of the embodiment shown in FIG. 1 as well, reference numeral 1 denotes an instruction prefetch queue for prefetching instructions via the data bus 6 to create a queue, and reference numeral 2 denotes an instruction decoding unit for fetching and decoding instructions from the instruction prefetch queue l. , 3 is an instruction execution unit that actually executes the result decoded by the instruction decoding unit 2, and 4 is a branch instruction prediction unit that predicts a branch instruction according to a branch prediction table that sets branch instruction addresses and branch prediction bits. , 5 is a branch destination address generation circuit that generates a branch destination address based on the decoding result of the instruction decoding unit 2, St is a branch prediction signal, S2 is an address signal of the next instruction to be decoded, and S3 is an instruction currently being executed. It is an address signal.

また、7は首記命令デコード部2からの命令のアドレス
信号S2にマスクをかけるマスク・レジスタ、8はある
任意のアドレスを入れておくアドレス・レジスタを示し
、9は前記マスク・レジスタ7の値と、アドレス・レジ
スタ8の値とを比較する比較器であり、S4は首記分岐
予測部4に対する)円陣イ3号である。
Further, 7 is a mask register for masking the address signal S2 of the instruction from the instruction decoding section 2, 8 is an address register in which a certain arbitrary address is stored, and 9 is the value of the mask register 7. This is a comparator that compares the value of the address register 8 with the value of the address register 8, and S4 is circle A 3 for the branch prediction unit 4.

しかして、前記実施例構成においては、命令デコードの
結果、デコードされた命令が、分岐命令であって、しか
も分岐予測部4からの分岐予測13号Slにより、分岐
の発生が予測されると、命令プリフェッチキュー■に取
り込まれている命令データがクリアされ、かつ命令デコ
ード部2でのデコード結果に基ずいて、分岐先アドレス
生成回路5から出力される分岐先アドレスが命令ブリフ
ェッチキューlに受は渡され、同命令プリフェッチキュ
ー1においては、この分岐先アドレスに従って命令のキ
ューイングを行ない、取り込まれた命令データを命令デ
コード部2に受は渡す。
Therefore, in the configuration of the embodiment, if the decoded instruction is a branch instruction as a result of instruction decoding, and branch prediction No. 13 Sl from the branch prediction unit 4 predicts the occurrence of a branch, The instruction data fetched in the instruction prefetch queue 2 is cleared, and the branch destination address output from the branch destination address generation circuit 5 is received in the instruction prefetch queue l based on the decoding result in the instruction decoding section 2. The instruction prefetch queue 1 queues the instructions according to this branch destination address, and passes the fetched instruction data to the instruction decoding section 2.

そして、この場合1分岐命令予測部4での分岐予測が的
中した時には、命令実行部3にあって、次に実行すべき
命令を、主記憶からより早期に取り込み得るために、次
の命令実行までの待ち時間を効果的に短縮することがで
きる。
In this case, when the branch prediction in the 1-branch instruction prediction unit 4 is correct, the instruction execution unit 3 executes the next instruction in order to fetch the next instruction to be executed from the main memory earlier. The waiting time until execution can be effectively shortened.

また1条件分岐命令が命令実行部3で実行された際1例
えば、その命令が始めて実行された時などのように、分
岐命令予測部4に登録(記憶)されていなかったり、分
岐命令予測部4による予測が外れている場合には、命令
実行部3から分岐命令予測部4に現在実行されている命
令アドレス信号S3を送ることで、前記第3図に示した
分岐予測テーブルにおける分岐命令アドレス、分岐予測
ビットのセットもしくはリセットの各操作を行なうので
ある。
Also, when a conditional branch instruction is executed by the instruction execution unit 3, for example, when the instruction is executed for the first time, it may not be registered (stored) in the branch instruction prediction unit 4, or the branch instruction prediction unit 4 is incorrect, the currently executed instruction address signal S3 is sent from the instruction execution unit 3 to the branch instruction prediction unit 4, and the branch instruction address in the branch prediction table shown in FIG. , set or reset branch prediction bits.

つまり、命令デコード部2においては、現在。In other words, in the instruction decoding unit 2, the current

デコード中の命令のアドレス信号S2を、分岐命令子i
i+11部4とマスク・レジスタ7とに送り、このマス
ク・レジスタ7では、送られてきた命令のアドレス信号
S2にマスクをかけて、このマスクをかけた命令アドレ
スを比較器9に送ると共に、アドレス・レジスタ8に入
わらでいる任意のアドレスもまた比較器9に送られ、こ
の比較器9では、これらのマスク・レジスタ7から送ら
れてきた値と、アドレス・レジスタ8から送られてきた
値とを比較して、その比較結果により、制御信号S4を
分岐命令予測部4に送って、これが動作しないようにす
るのである。
The address signal S2 of the instruction being decoded is sent to the branch instruction i
The mask register 7 masks the address signal S2 of the received instruction, sends the masked instruction address to the comparator 9, and sends the address signal S2 to the comparator 9. - Any addresses that remain in register 8 are also sent to comparator 9, which compares these values sent from mask register 7 with the values sent from address register 8. Based on the comparison result, a control signal S4 is sent to the branch instruction prediction unit 4 to prevent it from operating.

こ工で、この場合、メモリ中でのO5領域とユーザ・プ
ログラム領域とは、そのアドレスの最上位ビットによっ
てそれぞれに区別されており、この最上位ビットが“1
”の領域は、O3@域を示し、“0”の領域はユーザ・
プログラム領域を示している。
In this case, the O5 area and the user program area in memory are distinguished from each other by the most significant bit of their address, and this most significant bit is "1".
” area indicates the O3@ area, and the “0” area indicates the user
Shows the program area.

しかして、萌記OS領域中の条件分岐命令が実行される
時に分岐予測を行なわないようにするのには、マスク・
レジスタ7でアドレスの最上位ビット以外をマスクして
おき、また、アドレス・レジスタ8での最上位ビットを
“1”にし、それ以外をすべて“0”にしておく。
Therefore, in order to prevent branch prediction from being performed when a conditional branch instruction in the Moeki OS area is executed, masking and
All but the most significant bit of the address is masked in register 7, and the most significant bit in address register 8 is set to "1" and all other bits are set to "0".

従ってこ1では、O8領域中の命令が命令デコード部2
によりデコードされて、そのアドレスがマスク・レジス
タ7でマスクされた結果の値と、アドレス・レジスタ8
の値とが一致するために、この場合、比較器9からは、
分岐命令予測部4の動作を止める制御信号S4が出力さ
れ、こ)で、この分岐命令予測部4からの分岐予測信号
Slは、常時、「分岐しない」との予測をなし、また、
命令実行部3で分岐が発生した場合にも、分岐予測テ−
プルの占き換えが行なわれることはない。
Therefore, in this case, the instruction in the O8 area is sent to the instruction decode unit 2.
and the resulting value whose address is masked by mask register 7 and address register 8.
In this case, comparator 9 outputs:
A control signal S4 that stops the operation of the branch instruction prediction unit 4 is output, and the branch prediction signal Sl from the branch instruction prediction unit 4 always predicts "no branch", and
Even when a branch occurs in the instruction execution unit 3, the branch prediction table is
There is no pull retelling.

すなわち、このようにして、この実施例による装置構成
では、ある一定の領域にある命令については、分岐予測
を行なわないようにすることができるのである。
That is, in this way, with the device configuration according to this embodiment, it is possible to prevent branch prediction from being performed for instructions in a certain area.

なお、首記実施例においては、O8領域中の命令につい
て分岐命令予測部を動作させないようにしたが、マスク
・レジスタ、およびアドレス・レジスタの値を適当に設
定することにより、任意の領域の命令について、同様に
分岐命令予測部を動作させないようにし得ることは勿論
である。
In the above embodiment, the branch instruction prediction unit is not operated for instructions in the O8 area, but by appropriately setting the values of the mask register and address register, instructions in any area can be executed. Of course, it is possible to similarly disable the branch instruction prediction unit.

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

以に詳述したように、この発明装置によれば、命令のバ
イブライン処理機能、ならびに条件分岐命令の分岐予測
機能を有するデータ処理装置において、命令デコード部
からの命令アドレスにマスクをかけるマスク・レジスタ
、および任意のアドレスを設定し得るアドレス・レジス
タを設けると共に、マスク・レジスタでマスクされた命
令デコード部からのアドレスの値と、アドレス・レジス
タの値とを比較して、分岐命令予測部に動作制御イ計号
を出力する比較器を設け、メモリのある一定領域中にあ
る命令について、分岐命令予測部の動作をzLぬるよう
に構成したから、マルチ・タスク処理などのO8領域上
で複数のユーザ・プログラムが走っている場合にあって
も、O5領域中の条件分岐命令の影響によって、ユーザ
・プログラムの条件分岐や測が狂うような惧わが解消さ
れ、こわによって分岐命令予測の信頼性をより一層、向
上し得るものである。
As described in detail above, according to the device of the present invention, in a data processing device having an instruction vibe line processing function and a conditional branch instruction branch prediction function, a mask masking function is used to mask an instruction address from an instruction decoding section. In addition to providing a register and an address register that can set an arbitrary address, the value of the address masked by the mask register from the instruction decoding unit is compared with the value of the address register, and the address register is set to the branch instruction prediction unit. A comparator that outputs an operation control signal is provided, and the operation of the branch instruction prediction unit is configured to be negligible for instructions in a certain area of memory. Even when a user program is running, the fear that the conditional branch or prediction of the user program will be incorrect due to the influence of the conditional branch instruction in the O5 area is eliminated, and the reliability of branch instruction prediction is reduced due to the fear. can be further improved.

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

第1図はこの発明に係る命令のバイブライン処理機能、
および条件分岐命令の分岐予測機能を備えたデータ処理
装置の一実施例による概要構成を示すブロック図であり
、また、第2図は従来例による同一トデータ処理装置の
概要構成を示すブロック図、第3図は同上分岐予測部で
使用される予測テーブルを示す説明図である。 l・・・・命令ブリフェッチキュー、2・・・・命令デ
コード部、3・・・・命令実行部、4・・・・分岐命令
予測部、5・・・・分岐先アドレス生成回路、6・・・
・データバス、7・・・・マスク・レジスタ、8・・・
・アドレス・レジスタ、9・・・・比較器。 Sl・・・・分岐予測信号、Sl・・・・次にデコード
される命令のアドレス信号、S3・・・・現在実行中の
命令アドレス信号、S4・・・・制御信号。 代理人   大   岩  増  雄 第3図 手続補正書(自発) 1.1G件の表示   特願昭63−86111号j3
.補正をする者 1(件との関係  特許出願人 住 所     東京都千代田区丸の内二丁目2番3号
名 称  (601)三菱電機株式会社代表者志岐守哉 ・1゜代理人 住 所    東京都千代田区丸の内二丁目2番3号三
菱電機株式会社内 氏名 (7375)弁理士大岩増雄( (連絡先03(213)3421特許部)・ −6、補
正の内容 (1)明細書5頁3行〜4行および19行の「分岐され
るか」を「分岐するか」と補正する。 (2)同書13頁7行の「つま9」を「さらに」と補正
する。 (3)同書13頁20行の「この場合」を「本実施例の
場合」と補正する。 (4)図面の第1図〜第3図を別紙のとおり補正する。
FIG. 1 shows a command vibe line processing function according to the present invention.
FIG. 2 is a block diagram showing a general configuration of an embodiment of a data processing device equipped with a branch prediction function for conditional branch instructions; FIG. FIG. 3 is an explanatory diagram showing a prediction table used in the branch prediction unit same as above. l...Instruction briefetch queue, 2...Instruction decoding unit, 3...Instruction execution unit, 4...Branch instruction prediction unit, 5...Branch destination address generation circuit, 6 ...
・Data bus, 7...Mask register, 8...
・Address register, 9... Comparator. Sl: Branch prediction signal, Sl: Address signal of the next instruction to be decoded, S3: Address signal of the instruction currently being executed, S4: Control signal. Agent Masuo Oiwa Diagram 3 procedural amendment (voluntary) 1.1G display Patent application No. 1986-86111 j3
.. Person making the amendment 1 (Relationship to the matter Patent applicant address: 2-2-3 Marunouchi, Chiyoda-ku, Tokyo Name (601) Mitsubishi Electric Corporation Representative Moriya Shiki 1゜Agent address: Chiyoda, Tokyo Mitsubishi Electric Corporation, 2-2-3 Marunouchi, Ward Name (7375) Patent Attorney Masuo Oiwa (Contact information 03 (213) 3421 Patent Department) -6 Contents of amendment (1) Specification page 5, line 3 - "Will it branch?" in lines 4 and 19 will be corrected to "will it branch?" (2) "Tsum 9" in line 7, page 13 of the same book, will be corrected to "further." (3) Page 13 of the same book, line 7. Correct "this case" in the row to "case of this embodiment." (4) Correct the drawings in FIGS. 1 to 3 as shown in the attached sheet.

Claims (1)

【特許請求の範囲】[Claims]  命令のパイプライン処理機能、ならびに条件分岐命令
の分岐予測機能を有するデータ処理装置であつて、次に
実行すべき命令をデコードする命令デコード部と、この
命令デコード部でデコードされた結果を実行する命令実
行部と、前記命令デコード部でデコードされる分岐命令
の分岐予測信号を、この命令デコード部に与える分岐命
令予測部と、前記命令デコード部からの命令アドレスに
マスクをかけるマスク・レジスタ、および任意のアドレ
スを設定し得るアドレス・レジスタと、前記マスク・レ
ジスタでマスクされた前記命令デコード部からのアドレ
ス、および前記アドレス・レジスタの値を比較して、前
記分岐命令予測部に動作制御信号を出力する比較器とを
備えたことを特徴とするデータ処理装置。
A data processing device that has an instruction pipeline processing function and a branch prediction function for conditional branch instructions, and includes an instruction decoding unit that decodes the next instruction to be executed and a result decoded by this instruction decoding unit. an instruction execution section; a branch instruction prediction section that supplies a branch prediction signal of a branch instruction decoded by the instruction decoding section to the instruction decoding section; a mask register that masks an instruction address from the instruction decoding section; Compares an address register in which an arbitrary address can be set with an address from the instruction decode section masked by the mask register and the value of the address register, and sends an operation control signal to the branch instruction prediction section. A data processing device comprising: a comparator for outputting data.
JP8611188A 1988-04-06 1988-04-06 Data processor Pending JPH01258031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8611188A JPH01258031A (en) 1988-04-06 1988-04-06 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8611188A JPH01258031A (en) 1988-04-06 1988-04-06 Data processor

Publications (1)

Publication Number Publication Date
JPH01258031A true JPH01258031A (en) 1989-10-16

Family

ID=13877591

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8611188A Pending JPH01258031A (en) 1988-04-06 1988-04-06 Data processor

Country Status (1)

Country Link
JP (1) JPH01258031A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013502657A (en) * 2009-08-19 2013-01-24 クアルコム,インコーポレイテッド Method and apparatus for predicting non-execution of conditional non-branching instructions
JP2013250593A (en) * 2012-05-30 2013-12-12 Renesas Electronics Corp Semiconductor device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013502657A (en) * 2009-08-19 2013-01-24 クアルコム,インコーポレイテッド Method and apparatus for predicting non-execution of conditional non-branching instructions
JP2015130206A (en) * 2009-08-19 2015-07-16 クアルコム,インコーポレイテッド Methods and apparatus to predict non-execution of conditional non-branching instructions
JP2013250593A (en) * 2012-05-30 2013-12-12 Renesas Electronics Corp Semiconductor device

Similar Documents

Publication Publication Date Title
JP2796797B2 (en) Method of processing an interrupt routine by a digital instruction processor controller
JP2603626B2 (en) Data processing device
US8990543B2 (en) System and method for generating and using predicates within a single instruction packet
EP0423906B1 (en) Method of and apparatus for nullifying an instruction
US5345569A (en) Apparatus and method for resolving dependencies among a plurality of instructions within a storage device
US4775927A (en) Processor including fetch operation for branch instruction with control tag
US6832305B2 (en) Method and apparatus for executing coprocessor instructions
JPH01258031A (en) Data processor
JPH06295243A (en) Data processor
JPH0193825A (en) Prefetch queue control system
JP2536726B2 (en) Microprocessor
JPH0212429A (en) Information processor with function coping with delayed jump
JP2944335B2 (en) Information processing device
JP2597744B2 (en) Branch control method
JP2856784B2 (en) Electronic computer
JPH0877037A (en) Jamming device
JPH04195630A (en) Data processor
JPS60198640A (en) Pipeline type information processor
JP2545594B2 (en) Operand data prefetching method
JPH0462637A (en) Microprocessor
JPH02211533A (en) Computer apparatus for performing selective execution of instruction following branch instruction
JPH03164945A (en) Data processor
JPH06110687A (en) Information processing device and information processing method
JPH04217026A (en) Parallel processor
JPS58137048A (en) Branch instruction control system