JPH04245334A - Instruction prereading control system for information processor - Google Patents

Instruction prereading control system for information processor

Info

Publication number
JPH04245334A
JPH04245334A JP1055791A JP1055791A JPH04245334A JP H04245334 A JPH04245334 A JP H04245334A JP 1055791 A JP1055791 A JP 1055791A JP 1055791 A JP1055791 A JP 1055791A JP H04245334 A JPH04245334 A JP H04245334A
Authority
JP
Japan
Prior art keywords
address
instruction
branch destination
register
branch
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.)
Withdrawn
Application number
JP1055791A
Other languages
Japanese (ja)
Inventor
Akihiro Fushida
伏田 晃弘
Kenji Matsubara
健二 松原
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.)
Hitachi Microcomputer System Ltd
Hitachi Ltd
Renesas Technology America Inc
Original Assignee
Hitachi Microcomputer System Ltd
Hitachi Ltd
Hitachi Micro Systems Inc
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 Hitachi Microcomputer System Ltd, Hitachi Ltd, Hitachi Micro Systems Inc filed Critical Hitachi Microcomputer System Ltd
Priority to JP1055791A priority Critical patent/JPH04245334A/en
Publication of JPH04245334A publication Critical patent/JPH04245334A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To prevent the instruction in an erroneous branching destination address from being read owing to the switching of an addressing mode when an instruction is read by a predicted branching destination address. CONSTITUTION:The information processor is equipped with an associative memory for a branching instruction and prereads instructions, and the system consists of the associative memory (branching destination associative memory) 10 for storing branching destination information on the branching instruction, an instruction unit 20 which prereads and decodes the instruction, an arithmetic unit 40 which executes the instruction, and a main memory 50 housing the instruction and data. In this case, an address mode register 16 and a predictive address mode register 17 are added to the associative memory 10 of conventional constituion and address modes are stored in a pair with the instruction address and branching destination address of the branching instruction.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、分岐先連想メモリ(以
下、単に連想メモリという)を備えた情報処置装置の命
令先読み制御方式に関し、特にアドレスモードの切換を
行う分岐命令において、アドレスモードの誤った切換に
よる分岐先命令の読み出し防止が可能とされる情報処置
装置の命令先読み制御方式に適用して有効な技術に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an instruction prefetch control method for an information processing device equipped with a branch destination associative memory (hereinafter simply referred to as an associative memory), and in particular, in a branch instruction that switches address modes, The present invention relates to a technique that is effective when applied to an instruction prefetch control method for an information processing device that can prevent reading of branch destination instructions due to erroneous switching.

【0002】0002

【従来の技術】従来、連想メモリを備えた情報処理装置
としては、たとえば特開昭59−177653号公報な
どに記載されるように、分岐命令のアドレスと、この分
岐命令の分岐先アドレスとを対にして連想メモリに記憶
し、命令先読みアドレスとこの連想メモリに登録された
分岐命令アドレスとが一致することにより、連想メモリ
に登録された分岐先アドレスに分岐するものとして制御
されるものがある。
2. Description of the Related Art Conventionally, as described in Japanese Patent Laid-Open No. 59-177653, an information processing device equipped with an associative memory has been known to store the address of a branch instruction and the branch destination address of this branch instruction. There are some items that are stored as a pair in an associative memory, and are controlled to branch to a branch destination address registered in the associative memory when the instruction prefetch address and the branch instruction address registered in the associative memory match. .

【0003】たとえば、連想メモリが図4に示すように
、命令先読みアドレスまたは分岐命令アドレスを格納す
る命令アドレスレジスタ1と、分岐先アドレスを格納す
る分岐先アドレスレジスタ2と、命令アドレスおよび分
岐先アドレスをそれぞれKEY部とDATA部に保持し
、予測分岐命令アドレスおよび予測分岐先アドレスを送
出する連想記憶装置3と、命令アドレスと予測分岐命令
アドレスとを比較する命令アドレス比較器4と、命令ア
ドレスの一致が報告された時に予測分岐先アドレスを格
納する予測分岐先アドレスレジスタ5とから構成され、
予測分岐先アドレスレジスタ5のアドレスを用いて分岐
先命令の先読みを実行するようになっている。
For example, as shown in FIG. 4, an associative memory has an instruction address register 1 that stores an instruction prefetch address or a branch instruction address, a branch destination address register 2 that stores a branch destination address, and an instruction address and a branch destination address. an associative memory device 3 which stores the predicted branch instruction address and the predicted branch destination address in the KEY section and the DATA section respectively; an instruction address comparator 4 which compares the instruction address and the predicted branch instruction address; a predicted branch destination address register 5 that stores a predicted branch destination address when a match is reported;
The address of the predicted branch destination address register 5 is used to prefetch the branch destination instruction.

【0004】0004

【発明が解決しようとする課題】ところが、前記のよう
な従来技術においては、連想メモリにアドレスモードが
記憶されていないため、アドレスモードが切り換えられ
た場合に分岐先アドレスを誤ってしまい、このために正
しいアドレスによる命令の先読みをやり直さなければな
らないという問題がある。
However, in the prior art as described above, the address mode is not stored in the associative memory, so when the address mode is switched, the branch destination address is incorrect. There is a problem in that the instruction must be read ahead again using the correct address.

【0005】その一例として、アドレスモードにより2
4ビットのアドレス空間と、31ビットのアドレス空間
とを切り換える場合について図5により説明する。この
場合に、アドレスモードの値が“0”を示すときは、2
4ビットのアドレス空間(“00000000”番地〜
“00FFFFFF”番地の空間幅)、アドレスモード
の値が“1”を示すときは、31ビットのアドレス空間
(“00000000”番地〜“7FFFFFFF”番
地の空間幅)に切り換えられるものとする。
As an example, depending on the address mode, 2
The case of switching between a 4-bit address space and a 31-bit address space will be explained with reference to FIG. In this case, when the address mode value indicates “0”, 2
4-bit address space (address “00000000” ~
When the value of the address mode indicates "1", the address space is switched to a 31-bit address space (the space width of addresses "00000000" to "7FFFFFFFF").

【0006】たとえば、アドレスモード=“0”のとき
は、“00FFFFFF”番地の次番地である“000
00000”番地にラップアラウンドされ、アドレスモ
ード=“1”のときは、“00FFFFFF”番地の次
番地は“01000000”番地となり、“7FFFF
FFF”番地の次番地である“00000000”番地
にラップアラウンドされる。
For example, when the address mode is "0", the address "000" which is the next address after "00FFFFFF" is
When the address mode is “1”, the next address after “00FFFFFF” is “01000000” and “7FFFF” is wrapped around to address “00000”.
The data is wrapped around to address "00000000" which is the next address after address "FFF".

【0007】この時、連想メモリの予測による分岐先ア
ドレスが“00FFFFFF”番地であったとすると、
従来技術ではアドレスモードについての考慮がされてい
ないため、“00FFFFFF”番地の命令bの次に先
読みされる命令が“01000000”番地の命令cか
、または“00000000”番地の命令aかの判定が
できない。
At this time, if the branch destination address predicted by the associative memory is "00FFFFFF", then
In the conventional technology, the address mode is not considered, so it is difficult to determine whether the next instruction to be prefetched after instruction b at address "00FFFFFF" is instruction c at address "01000000" or instruction a at address "00000000." Can not.

【0008】仮に、先読みを行う時点のアドレスモード
の値(“0”とする)を用い、命令bの次に“0000
0000”番地の命令aが読み出されたとすると、先読
みの時点から先読みアドレスを予測された分岐命令が処
理されるまでの間に、アドレスモードが“1”に切り換
えられていたならば、予測による先読みのアドレスは誤
っていたことになり、正しいアドレスの“010000
00”番地により命令cの読み出しをやり直さなければ
ならない。
[0008] Suppose that using the address mode value at the time of prefetching (assumed to be "0"), "0000" is written next to instruction b.
If instruction a at address 0000 is read out, if the address mode has been switched to 1 between the time of read-ahead and the processing of the branch instruction for which the read-ahead address has been predicted, the predicted The read-ahead address was incorrect, and the correct address “010000”
It is necessary to read out the instruction c again using address 00''.

【0009】従って、従来の命令先読み方式においては
、アドレスモードが切り換えられた場合に、再読み出し
により処理性能が低下するという問題がある。
Therefore, in the conventional instruction prefetching method, there is a problem in that processing performance deteriorates due to rereading when the address mode is switched.

【0010】そこで、本発明の目的は、予測による分岐
先アドレスにより命令読み出しを行う際、アドレスモー
ドの切換による誤った分岐先アドレスの命令読み出しを
なくすことができる情報処理装置の命令先読み制御方式
を提供することにある。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide an instruction prefetch control method for an information processing device that can eliminate the instruction readout at an erroneous branch destination address due to address mode switching when reading an instruction using a predicted branch destination address. It is about providing.

【0011】本発明の前記ならびにその他の目的と新規
な特徴は、本明細書の記述および添付図面から明らかに
なるであろう。
The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

【0012】0012

【課題を解決するための手段】本願において開示される
発明のうち、代表的なものの概要を簡単に説明すれば、
下記のとおりである。
[Means for Solving the Problems] Among the inventions disclosed in this application, a brief overview of typical inventions will be as follows.
It is as follows.

【0013】すなわち、本発明の情報処理装置の命令先
読み制御方式は、分岐命令のアドレスおよび該分岐命令
の分岐先アドレスとを記憶する分岐先連想メモリと、ア
ドレス空間幅であるアドレスモードの切換を行うアドレ
スモード切換手段とを備えた情報処理装置の命令先読み
制御方式であって、前記分岐先連想メモリに前記分岐先
アドレスとこの分岐先アドレスに対応するアドレスモー
ドとを対にして記憶し、命令先読みを行う場合に、前記
分岐先連想メモリから前記分岐先アドレスおよび前記ア
ドレスモードを読み出し、前記アドレスモードに対応し
た前記分岐先アドレスにより分岐先命令の読み出しを行
うものである。
That is, the instruction prefetch control method of the information processing apparatus of the present invention includes a branch destination associative memory that stores the address of a branch instruction and the branch destination address of the branch instruction, and an address mode that is the address space width. An instruction look-ahead control method for an information processing apparatus, comprising an address mode switching means for executing an instruction, wherein the branch destination address and an address mode corresponding to the branch destination address are stored as a pair in the branch destination associative memory; When prefetching is performed, the branch destination address and the address mode are read from the branch destination associative memory, and the branch destination instruction is read using the branch destination address corresponding to the address mode.

【0014】[0014]

【作用】前記した情報処理装置の命令先読み制御方式に
よれば、命令先読みを行う場合に、分岐先連想メモリか
ら分岐先アドレスと、この分岐先アドレスに対応するア
ドレスモードとを読み出して分岐先命令の読み出しを行
うことにより、分岐命令の実行前にアドレス空間幅の切
換が行われた場合でも、予測分岐先アドレスで命令の先
読みを行う際に、その分岐先アドレス生成時のアドレス
モードを参照することができる。
[Operation] According to the instruction prefetch control method of the information processing device described above, when performing instruction prefetch, the branch destination address and the address mode corresponding to this branch destination address are read from the branch destination associative memory, and the branch destination instruction is read out from the branch destination associative memory. By reading , even if the address space width is switched before the execution of a branch instruction, the address mode at the time the branch destination address was generated is referenced when prefetching an instruction using the predicted branch destination address. be able to.

【0015】これにより、アドレスモードの切換による
誤ったアドレス空間での命令の先読みをなくすことがで
き、予測分岐先命令の読み出し誤りによる処理性能の低
下を防止することができる。
[0015] Thereby, it is possible to eliminate prefetching of instructions in an incorrect address space due to address mode switching, and it is possible to prevent deterioration in processing performance due to errors in reading predicted branch destination instructions.

【0016】[0016]

【実施例】図1は本発明の情報処理装置の命令先読み制
御方式の一実施例である情報処理装置を示す全体構成図
、図2は本実施例の情報処理装置における連想メモリを
示す構成図、図3は本実施例の情報処理装置における命
令ユニットを示す構成図である。
[Embodiment] FIG. 1 is an overall configuration diagram showing an information processing device which is an embodiment of the instruction prefetch control method of the information processing device of the present invention, and FIG. 2 is a configuration diagram showing an associative memory in the information processing device of the present embodiment. , FIG. 3 is a configuration diagram showing an instruction unit in the information processing apparatus of this embodiment.

【0017】まず、図1により本実施例の情報処理装置
の構成を説明する。
First, the configuration of the information processing apparatus of this embodiment will be explained with reference to FIG.

【0018】本実施例の情報処理装置は、たとえば分岐
命令に対する連想メモリを備え、命令の先読みを行う情
報処置装置とされ、分岐命令の分岐先情報を記憶する連
想メモリ(分岐先連想メモリ)10と、命令の先読み・
解読を行う命令ユニット20と、命令を実行する演算ユ
ニット40と、命令およびデータを格納する主メモリ5
0とから構成され、主に信号線101〜106によって
信号の転送が行われる。
The information processing device of this embodiment is an information processing device that includes an associative memory for branch instructions and performs prefetching of instructions, and includes an associative memory (branch destination associative memory) 10 that stores branch destination information of branch instructions. and prefetching of instructions.
An instruction unit 20 for decoding, an arithmetic unit 40 for executing instructions, and a main memory 5 for storing instructions and data.
0, and signals are mainly transferred through signal lines 101 to 106.

【0019】連想メモリ10は、たとえば図2に示すよ
うに、命令アドレスレジスタ11、分岐先アドレスレジ
スタ12、連想記憶装置13、命令アドレス比較器14
および予測分岐先アドレスレジスタ15の従来の構成に
加えて、さらに本発明の特徴であるアドレスモードレジ
スタ16および予測アドレスモードレジスタ17が追加
され、従来の分岐命令の命令アドレスおよび分岐先アド
レスに、アドレスモードを追加した情報を記憶するもの
である。そして、命令アドレスは連想記憶装置13のK
EY部に記憶され、分岐先アドレスおよびアドレスモー
ドはDATA部に記憶される。
As shown in FIG. 2, the associative memory 10 includes an instruction address register 11, a branch destination address register 12, an associative memory device 13, and an instruction address comparator 14.
In addition to the conventional configuration of the predicted branch destination address register 15, an address mode register 16 and a predicted address mode register 17, which are features of the present invention, are added, and the instruction address and branch destination address of the conventional branch instruction are It stores information with added modes. Then, the instruction address is K of the content addressable memory 13.
The branch destination address and address mode are stored in the DATA section.

【0020】命令アドレスレジスタ11は、命令ユニッ
ト20よりIC(Instruction Count
)の信号線101を介して命令先読みアドレス、または
書き込み時の分岐命令アドレスを受け、信号線201,
202を介してそのアドレスを連想記憶装置13に送出
する。
The instruction address register 11 receives an IC (Instruction Count) from the instruction unit 20.
) receives an instruction prefetch address or a branch instruction address at the time of writing via the signal line 101 of the signal line 201,
The address is sent to the associative memory device 13 via 202.

【0021】分岐先アドレスレジスタ12は、連想記憶
装置13に書き込み時の分岐先アドレスを受けるレジス
タであり、命令ユニット20よりADDR(Addre
ss)の信号線105を介して分岐先アドレスを受け、
信号線204を介して分岐先アドレスを連想記憶装置1
3に送出する。
The branch destination address register 12 is a register that receives a branch destination address when writing to the associative memory device 13, and receives ADDR (Address) from the instruction unit 20.
ss) receives the branch destination address via the signal line 105,
The branch destination address is stored in the content addressable memory device 1 via the signal line 204.
Send to 3.

【0022】連想記憶装置13は、命令アドレスレジス
タ11より信号線202を介して送出される命令アドレ
スの一部を索引アドレスとして、命令アドレスレジスタ
11より信号線201を介して送出される命令アドレス
、分岐先アドレスレジスタ12より信号線204を介し
て送出される分岐先アドレス、およびアドレスモードレ
ジスタ16より信号線203を介して送出されるアドレ
スモード情報をそれぞれKEY部とDATA部に保持し
、信号線205を介して予測分岐命令アドレスを命令ア
ドレス比較器14に、信号線207を介して予測分岐先
アドレスを予測分岐先アドレスレジスタ15に、および
信号線206を介して予測アドレスモード情報を予測ア
ドレスモードレジスタ17に送出する。
The associative memory device 13 uses a part of the instruction address sent from the instruction address register 11 via the signal line 202 as an index address, and stores an instruction address sent from the instruction address register 11 via the signal line 201; The branch destination address sent from the branch destination address register 12 via the signal line 204 and the address mode information sent from the address mode register 16 via the signal line 203 are held in the KEY section and the DATA section, respectively. 205 to the instruction address comparator 14, a signal line 207 to the predicted branch destination address register 15, and a signal line 206 to the predicted address mode information to the predicted address mode. Send to register 17.

【0023】命令アドレス比較器14は、命令アドレス
レジスタ11より信号線201を介して送出される命令
アドレスと、連想記憶装置13より信号線205を介し
て読み出された予測分岐命令アドレスとを比較し、その
結果を信号線208を介して予測分岐先アドレスレジス
タ15および予測アドレスモードレジスタ17に送出す
る。
The instruction address comparator 14 compares the instruction address sent from the instruction address register 11 via the signal line 201 with the predicted branch instruction address read from the associative memory device 13 via the signal line 205. Then, the result is sent to the predicted branch destination address register 15 and the predicted address mode register 17 via the signal line 208.

【0024】予測分岐先アドレスレジスタ15は、信号
線208を介して命令アドレス比較器14による命令ア
ドレスの一致が報告されると、連想記憶装置13より読
み出された予測分岐先アドレスを受け、PTA(Pre
dict Target Address)の信号線1
03を介して命令ユニット20に送出する。
When the instruction address comparator 14 reports a match of instruction addresses via the signal line 208, the predicted branch destination address register 15 receives the predicted branch destination address read from the associative memory device 13, and registers the PTA. (Pre
dict Target Address) signal line 1
03 to the instruction unit 20.

【0025】アドレスモードレジスタ16は、連想記憶
装置13に書き込み時のアドレスモード情報を受けるレ
ジスタであり、命令ユニット20よりAM(Addre
ss Mode)の信号線104を介してアドレスモー
ド情報を受け、信号線203を介してアドレスモード情
報を連想記憶装置13に送出する。
The address mode register 16 is a register that receives address mode information when writing to the associative memory device 13, and receives AM (Address) information from the instruction unit 20.
ss Mode) via the signal line 104, and sends the address mode information to the content addressable memory device 13 via the signal line 203.

【0026】予測アドレスモードレジスタ17は、信号
線208を介して命令アドレス比較器14による命令ア
ドレスの一致が報告されると、連想記憶装置13より読
み出された予測アドレスモード情報を受け、PAM(P
redict Address Mode)の信号線1
02を介して命令ユニット20に送出する。
When the instruction address comparator 14 reports a match of instruction addresses via the signal line 208, the predicted address mode register 17 receives the predicted address mode information read from the content addressable memory device 13, and registers the PAM ( P
redirect Address Mode) signal line 1
02 to the instruction unit 20.

【0027】命令ユニット20は、たとえば図3に示す
ように、先読みした命令列を一時格納する命令バッファ
レジスタ21,22、命令語を切り出すアライナ23、
命令語の命令アドレスを記憶する命令カウンタ24、命
令語を記憶する命令レジスタ25、命令アドレスに4を
加える加算器26、命令語を解読する解読器27、アド
レスを計算するアドレス計算器28、アドレスをアドレ
スモード情報によりアドレッシングするアドレッシング
回路29、アドレスモードとアドレスをそれぞれ対にし
て比較する比較器30、予測分岐先アドレスを予測アド
レスモード情報によりアドレッシングするアドレッシン
グ回路31、および2つのアドレスから一方をセレクト
するアドレスセレクト回路32に加えて、本発明の特徴
であるアドレス空間の大きさを決定するアドレスモード
設定レジスタ(アドレスモード切換手段)33が追加さ
れた構成となっている。
The instruction unit 20 includes, for example, as shown in FIG. 3, instruction buffer registers 21 and 22 for temporarily storing a prefetched instruction sequence, an aligner 23 for cutting out instruction words,
An instruction counter 24 that stores the instruction address of the instruction word, an instruction register 25 that stores the instruction word, an adder 26 that adds 4 to the instruction address, a decoder 27 that decodes the instruction word, an address calculator 28 that calculates the address, and an address. an addressing circuit 29 that addresses a predicted branch destination address based on address mode information, a comparator 30 that compares the address mode and address in pairs, an addressing circuit 31 that addresses a predicted branch destination address based on predicted address mode information, and selects one of the two addresses. In addition to the address select circuit 32, which is a feature of the present invention, an address mode setting register (address mode switching means) 33 is added to determine the size of the address space.

【0028】そして、命令バッファレジスタ21,22
には、主メモリ50からのIDATA(Instruc
tion Data)の信号線106が入力されており
、主メモリ50から命令列が転送されてくるとその命令
列を格納する。この場合に、命令バッファレジスタ21
,22の2つがあるが、通常は片方のたとえば命令バッ
ファレジスタ21が使用されており、分岐命令が出現す
るとその分岐先の命令列が他方の命令バッファレジスタ
22に格納され、それ以降の命令列は次の分岐命令が出
現するまで命令バッファレジスタ22に格納される。
[0028] Then, the instruction buffer registers 21 and 22
IDATA (Instruct) from main memory 50
A signal line 106 of the main memory 50 is input, and when an instruction string is transferred from the main memory 50, the instruction string is stored. In this case, the instruction buffer register 21
. is stored in the instruction buffer register 22 until the next branch instruction appears.

【0029】さらに、命令レジスタ25の命令が解読さ
れると、次の命令が命令バッファレジスタ21,22よ
りアライナ23を介して取り出され、新たに命令レジス
タ25にセットされる。
Furthermore, when the instruction in the instruction register 25 is decoded, the next instruction is taken out from the instruction buffer registers 21 and 22 via the aligner 23 and newly set in the instruction register 25.

【0030】また、命令カウンタ24には、現在命令レ
ジスタ25にある命令語の命令アドレスが記憶されてい
るので、その値に4(1命令語のバイト長に相当する)
を加えた値が次の命令語の命令アドレスとなる。そして
、アライナ23は、命令カウンタ24の値が出力される
信号線305を用いて次の命令語を取り出す。この場合
に、命令カウンタ24から出力されたアドレスは加算器
26で+4づつ増加されて、命令レジスタ25に次の命
令語が記憶されるときに命令カウンタ24に記憶され、
同時にICの信号線101を介して連想メモリ10に出
力される。
Furthermore, since the instruction counter 24 stores the instruction address of the instruction word currently in the instruction register 25, its value is 4 (corresponding to the byte length of one instruction word).
The value added becomes the instruction address of the next instruction word. The aligner 23 then takes out the next command word using the signal line 305 to which the value of the command counter 24 is output. In this case, the address output from the instruction counter 24 is incremented by +4 by the adder 26, and is stored in the instruction counter 24 when the next instruction word is stored in the instruction register 25.
At the same time, it is output to the associative memory 10 via the signal line 101 of the IC.

【0031】さらに、命令レジスタ5中の命令語の参照
するアドレスはアドレス計算器28で生成され、信号線
304を用いてアドレッシング回路29に送られ、アド
レッシングされる。その後、アドレスセレクト回路32
に送られ、ADDRの信号線105を介して連想メモリ
10および主メモリ50に出力される。
Further, the address referred to by the instruction word in the instruction register 5 is generated by the address calculator 28, and is sent to the addressing circuit 29 using the signal line 304 for addressing. After that, the address select circuit 32
and is output to the associative memory 10 and main memory 50 via the ADDR signal line 105.

【0032】一方、アドレスモード設定レジスタ33に
は、実行中の命令列の存在するアドレス空間幅を示す情
報が常に格納されている。そして、このアドレスモード
設定レジスタ33の内容が書き換えられると、アドレス
空間の大きさの切換が起こり、AMの信号線104を介
して連想メモリ10に出力される。
On the other hand, the address mode setting register 33 always stores information indicating the address space width in which the instruction sequence being executed exists. When the contents of the address mode setting register 33 are rewritten, the size of the address space is switched, and the address space is outputted to the content addressable memory 10 via the AM signal line 104.

【0033】演算ユニット40は、従来と同様に構成と
され、命令ユニット20および主メモリ50に接続され
、主メモリ50に格納されているデータを命令ユニット
20の指示により読み出して命令を実行するものである
The arithmetic unit 40 has the same configuration as the conventional one, is connected to the instruction unit 20 and the main memory 50, reads out data stored in the main memory 50 according to instructions from the instruction unit 20, and executes instructions. It is.

【0034】主メモリ50は、従来と同様の構成とされ
、命令ユニット20および演算ユニット40に接続され
、命令およびデータを格納するものである。
The main memory 50 has the same configuration as the conventional one, is connected to the instruction unit 20 and the arithmetic unit 40, and stores instructions and data.

【0035】次に、本実施例の作用について説明する。Next, the operation of this embodiment will be explained.

【0036】本実施例の命令先読み制御方式は、大きく
分けて前動作である予測読み出し動作と、本動作である
本読み出しおよび予測アドレス照合動作との2つの動作
によって実行される。
The instruction prefetch control system of this embodiment is executed by two operations: a predictive read operation, which is a pre-operation, and a main read and predicted address verification operation, which are main operations.

【0037】始めに、前動作の予測読み出し動作につい
て説明する。
First, the predictive read operation of the previous operation will be explained.

【0038】まず、命令ユニット20における命令の解
読に先立って、連想記憶装置13を命令アドレスで探索
する。この場合に、それを含む語が存在するときには、
その語の中の分岐先アドレスとアドレスモード情報とを
それぞれPAM、PTAの信号線102,103を介し
て命令ユニット20に送る。
First, before the instruction unit 20 decodes the instruction, the content addressable memory 13 is searched for the instruction address. In this case, if a word containing it exists,
The branch destination address and address mode information in the word are sent to the instruction unit 20 via PAM and PTA signal lines 102 and 103, respectively.

【0039】さらに、命令ユニット20では、その送ら
れた分岐先アドレスをアドレスモード情報によりアドレ
ッシングを行い、ADDRの信号線105を介して主メ
モリ50に送り、分岐先命令列の主メモリ50からの読
み出しを行う。この場合に、分岐先命令列は、主メモリ
50からIDATAの信号線106を介して命令ユニッ
ト20に入力される。
Furthermore, the instruction unit 20 addresses the sent branch destination address using the address mode information, sends it to the main memory 50 via the ADDR signal line 105, and reads the branch destination instruction string from the main memory 50. Perform reading. In this case, the branch destination instruction sequence is input from the main memory 50 to the instruction unit 20 via the IDATA signal line 106.

【0040】続いて、本動作である先読み出しおよび予
測アドレス照合動作について説明する。
Next, the pre-read and predicted address verification operations, which are the main operations, will be explained.

【0041】まず、命令ユニット20において分岐先命
令が解読されると、その分岐先の命令語のアドレスを求
め、アドレスモードによるアドレッシングを行いADD
Rの信号線105を介して主メモリ50へ送る。そして
、分岐先命令列を主メモリ50からIDATAの信号線
106を介して読み出す。
First, when a branch destination instruction is decoded in the instruction unit 20, the address of the branch destination instruction word is obtained, and addressing is performed using the address mode.
It is sent to the main memory 50 via the R signal line 105. Then, the branch destination instruction string is read from the main memory 50 via the IDATA signal line 106.

【0042】この場合に、本動作での分岐先命令列の読
み出しは、本動作での分岐先命令アドレスおよびアドレ
スモード情報と、前動作での予測分岐先アドレスおよび
予測アドレスモード情報とを比較し、比較が一致したと
きには行われない。また、比較が不一致のときには、本
動作での分岐先命令列の読み出しが行われるとともに連
想メモリ10の書換えを行う。
In this case, reading the branch destination instruction string in this operation compares the branch destination instruction address and address mode information in this operation with the predicted branch destination address and predicted address mode information in the previous operation. , is not done when the comparison matches. Further, if the comparison does not match, the branch destination instruction string in this operation is read out and the associative memory 10 is rewritten.

【0043】次に、予測読み出し動作を詳しく説明する
Next, the predictive read operation will be explained in detail.

【0044】まず、命令の先読みで主メモリ50から命
令列を読み出す。この時、命令アドレスがICの信号線
101を介して連想メモリ10に転送される。そして、
ICの信号線101上の値が命令アドレスレジスタ11
に記憶され、その後命令アドレスレジスタ11に記憶さ
れている命令アドレスの一致を、信号線202を介して
連想記憶装置13へ送出する。
First, an instruction sequence is read from the main memory 50 by prefetching the instructions. At this time, the instruction address is transferred to the associative memory 10 via the signal line 101 of the IC. and,
The value on the signal line 101 of the IC is the instruction address register 11
The match between the instruction addresses stored in the instruction address register 11 is then sent to the content addressable memory device 13 via the signal line 202.

【0045】さらに、このアドレスで連想記憶装置13
を検索し、対応するKEY部に記憶された分岐命令のア
ドレスと、DATA部に記憶された分岐先アドレスおよ
びアドレスモード情報とを読み出す。そして、命令アド
レスレジスタ11より信号線201を介して送出された
命令アドレスと、KEY部より読み出された分岐命令の
アドレスとを命令アドレス比較器14で比較し、一致し
た場合に分岐先の予測が成立する。
Furthermore, at this address, the associative memory device 13
and reads out the address of the branch instruction stored in the corresponding KEY section and the branch destination address and address mode information stored in the DATA section. Then, the instruction address sent from the instruction address register 11 via the signal line 201 and the address of the branch instruction read from the KEY section are compared by the instruction address comparator 14, and if they match, the branch destination is predicted. holds true.

【0046】その後、予測が成立すると、DATA部よ
り読み出された分岐先アドレスとアドレスモード情報と
をそれぞれ予測分岐先アドレスレジスタ15、予測アド
レスモードレジスタ17にセットし、PTAの信号線1
03とPAMの信号線102を介して命令ユニット20
へ送出する。
Thereafter, when the prediction is established, the branch destination address and address mode information read from the DATA section are set in the predicted branch destination address register 15 and the predicted address mode register 17, respectively, and the signal line 1 of the PTA is set.
03 and the instruction unit 20 via the PAM signal line 102.
Send to.

【0047】さらに、命令ユニット20に入力された予
測分岐先アドレスは、アドレッシング回路31で同時入
力された予測アドレスモード情報によりアドレッシング
される。そして、アドレッシングされた予測分岐先アド
レスは、信号線307を介しアドレスセレクト回路32
でセレクトされ、ADDRの信号線105を介して主メ
モリ50に送られる。
Further, the predicted branch destination address inputted to the instruction unit 20 is addressed by the addressing circuit 31 according to the predicted address mode information inputted at the same time. Then, the addressed predicted branch destination address is sent to the address select circuit 32 via the signal line 307.
and is sent to the main memory 50 via the ADDR signal line 105.

【0048】その後、この予測分岐先アドレスを用いて
主メモリ50からIDATAの信号線106を介して分
岐先命令列が読み出され、命令ユニット20に入力され
る。
Thereafter, using this predicted branch destination address, a branch destination instruction string is read out from the main memory 50 via the IDATA signal line 106 and input to the instruction unit 20.

【0049】そして、命令ユニット20において、その
分岐先命令列を空いている方の命令バッファレジスタ2
1または命令バッファレジスタ22に格納する。
Then, in the instruction unit 20, the branch destination instruction string is stored in the free instruction buffer register 2.
1 or stored in the instruction buffer register 22.

【0050】続いて、本読み出しおよび予測アドレス照
合動作を詳しく説明する。
Next, the actual readout and predicted address matching operations will be explained in detail.

【0051】この場合の本動作は、命令語が命令レジス
タ25に記憶されて解読されるときから開始され、始め
に命令レジスタ25中の命令が分岐命令か否かが調べら
れる。そして、分岐命令であるときのみ以下の動作が行
われる。
The main operation in this case starts when the instruction word is stored in the instruction register 25 and decoded, and it is first checked whether the instruction in the instruction register 25 is a branch instruction. The following operation is performed only when the instruction is a branch instruction.

【0052】まず、アドレス計算器28を用いて分岐先
アドレスを求め、その分岐先アドレスを信号線304を
介してアドレッシング回路29に送出し、アドレスモー
ド設定レジスタ33より信号線104を介して送出され
たアドレスモード情報によりアドレッシングを行う。
First, the address calculator 28 is used to find the branch destination address, and the branch destination address is sent to the addressing circuit 29 via the signal line 304, and then sent from the address mode setting register 33 via the signal line 104. Addressing is performed using the address mode information obtained.

【0053】そして、アドレッシングされた分岐先アド
レスは、信号線306を介してアドレスセレクト回路3
2でセレクトされ、ADDRの信号線105を介して主
メモリ50に送られる。その後、分岐先アドレスに対す
る分岐先命令列がIDATAの信号線106を介して命
令ユニット20に転送される。
The addressed branch destination address is sent to the address select circuit 3 via the signal line 306.
2 and sent to the main memory 50 via the ADDR signal line 105. Thereafter, the branch destination instruction string for the branch destination address is transferred to the instruction unit 20 via the IDATA signal line 106.

【0054】この時、同時にアドレス計算器28で生成
された分岐先アドレスと、アドレスモード設定レジスタ
33の値とを対にしてそれぞれ信号線304,104を
介して比較器30に送出し、PTAの信号線103を介
した予測分岐先アドレスと、PAMの信号線102を介
した予測アドレスモード情報との値を対にしたものとの
比較を行う。
At this time, the branch destination address generated by the address calculator 28 and the value of the address mode setting register 33 are sent as a pair to the comparator 30 via the signal lines 304 and 104, respectively, and the PTA is A comparison is made between the predicted branch destination address via the signal line 103 and the predicted address mode information via the PAM signal line 102 as a pair.

【0055】その結果、等しくないときのみ、主メモリ
50よりIDATAの信号線106を介して読み出した
分岐先命令列を命令ユニット20の命令バッファレジス
タ22に格納する。この時、前動作は無効化され、本動
作の処理が実行される。
As a result, only when they are not equal, the branch destination instruction string read from the main memory 50 via the IDATA signal line 106 is stored in the instruction buffer register 22 of the instruction unit 20. At this time, the previous operation is invalidated and the processing of the main operation is executed.

【0056】その後、命令アドレスレジスタ11、分岐
先アドレスレジスタ12、アドレスモードレジスタ16
の値が、信号線202を介して送出される命令アドレス
の一部を索引アドレスとして、それぞれ信号線201,
203,204を介して連想記憶装置13に書き込まれ
る。
After that, the instruction address register 11, branch destination address register 12, and address mode register 16
The values of the signal lines 201 and 201, respectively, are set using a part of the instruction address sent via the signal line 202 as an index address.
It is written to the associative memory device 13 via 203 and 204.

【0057】一方、比較器30の結果が等しいときは、
本動作の以降の動作は行われず、前動作の処理を続行す
る。
On the other hand, when the results of the comparator 30 are equal,
The operation after this operation is not performed, and the processing of the previous operation is continued.

【0058】従って、本実施例の命令先読み制御方式に
よれば、分岐命令の実行前にアドレス空間幅の切換が行
われた場合でも、予測分岐先アドレスで命令の先読みを
行う際に、その分岐先アドレス生成時のアドレスモード
を参照できるので、アドレスモードの切り換わりにより
誤ったアドレス空間での命令の先読みをなくすことがで
きる。
Therefore, according to the instruction prefetch control system of this embodiment, even if the address space width is switched before execution of a branch instruction, when prefetching an instruction at a predicted branch destination address, the branch Since the address mode at the time of generating the destination address can be referenced, prefetching of an instruction in an incorrect address space can be eliminated by switching the address mode.

【0059】以上、本発明者によってなされた発明を実
施例に基づき具体的に説明したが、本発明は前記実施例
に限定されるものではなく、その要旨を逸脱しない範囲
で種々変更可能であることはいうまでもない。
[0059] Above, the invention made by the present inventor has been specifically explained based on examples, but the present invention is not limited to the above-mentioned examples, and can be modified in various ways without departing from the gist thereof. Needless to say.

【0060】[0060]

【発明の効果】本願において開示される発明のうち、代
表的なものによって得られる効果を簡単に説明すれば、
下記のとおりである。
[Effects of the Invention] Among the inventions disclosed in this application, the effects obtained by the typical inventions are briefly explained as follows.
It is as follows.

【0061】すなわち、分岐先連想メモリに分岐先アド
レスとこの分岐先アドレスに対応するアドレスモードと
を対にして記憶し、命令先読みを行う場合に、分岐先連
想メモリから分岐先アドレスおよびアドレスモードを読
み出し、アドレスモードに対応した分岐先アドレスによ
り分岐先命令の読み出しを行うことにより、分岐命令の
実行前にアドレス空間幅の切換が行われた場合でも、予
測分岐先アドレスで命令の先読みを行う際に、その分岐
先アドレス生成時のアドレスモードを参照することがで
きるので、アドレスモードの切換による誤ったアドレス
空間での命令の先読みをなくすことができる。
That is, when a branch destination address and an address mode corresponding to this branch destination address are stored as a pair in a branch destination associative memory and instructions are prefetched, the branch destination address and address mode are stored from the branch destination associative memory. By reading the branch destination instruction using the branch destination address that corresponds to the read address mode, even if the address space width is switched before the execution of the branch instruction, it is possible to read ahead the instruction using the predicted branch destination address. Furthermore, since the address mode at the time of generation of the branch destination address can be referred to, it is possible to eliminate prefetching of an instruction in an incorrect address space due to address mode switching.

【0062】この結果、予測分岐先命令の読み出し誤り
による処理性能の低下を防止することができる。
As a result, it is possible to prevent a decrease in processing performance due to an error in reading a predicted branch destination instruction.

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

【図1】本発明の情報処理装置の命令先読み制御方式の
一実施例である情報処理装置を示す全体構成図である。
FIG. 1 is an overall configuration diagram showing an information processing device that is an embodiment of an instruction prefetch control method for an information processing device according to the present invention.

【図2】本実施例の情報処理装置における連想メモリを
示す構成図である。
FIG. 2 is a configuration diagram showing an associative memory in the information processing device of the embodiment.

【図3】本実施例の情報処理装置における命令ユニット
を示す構成図である。
FIG. 3 is a configuration diagram showing an instruction unit in the information processing apparatus of the embodiment.

【図4】従来技術の一例である情報処理装置の連想メモ
リを示す構成図である。
FIG. 4 is a configuration diagram showing an associative memory of an information processing device as an example of the conventional technology.

【図5】従来技術の一例である情報処理装置のアドレス
空間を示す説明図である。
FIG. 5 is an explanatory diagram showing an address space of an information processing device that is an example of the conventional technology.

【符号の説明】[Explanation of symbols]

1  命令アドレスレジスタ 2  分岐先アドレスレジスタ 3  連想記憶装置 4  命令アドレス比較器 5  予測分岐先アドレスレジスタ 10  連想メモリ(分岐先連想メモリ)11  命令
アドレスレジスタ 12  分岐先アドレスレジスタ 13  連想記憶装置 14  命令アドレス比較器 15  予測分岐先アドレスレジスタ 16  アドレスモードレジスタ 17  予測アドレスモードレジスタ 20  命令ユニット 21  命令バッファレジスタ 22  命令バッファレジスタ 23  アライナ 24  命令カウンタ 25  命令レジスタ 26  加算器 27  解読器 28  アドレス計算器 29  アドレッシング回路 30  比較器 31  アドレッシング回路 32  アドレスセレクト回路 33  アドレスモード設定レジスタ(アドレスモード
切換手段) 40  演算ユニット 50  主メモリ
1 Instruction address register 2 Branch destination address register 3 Content addressable memory device 4 Instruction address comparator 5 Predicted branch destination address register 10 Content addressable memory (branch destination addressable memory) 11 Instruction address register 12 Branch destination address register 13 Content addressable memory device 14 Instruction address comparison unit 15 predicted branch destination address register 16 address mode register 17 predicted address mode register 20 instruction unit 21 instruction buffer register 22 instruction buffer register 23 aligner 24 instruction counter 25 instruction register 26 adder 27 decoder 28 address calculator 29 addressing circuit 30 comparison device 31 addressing circuit 32 address select circuit 33 address mode setting register (address mode switching means) 40 arithmetic unit 50 main memory

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  分岐命令のアドレスおよび該分岐命令
の分岐先アドレスとを記憶する分岐先連想メモリと、ア
ドレス空間幅であるアドレスモードの切換を行うアドレ
スモード切換手段とを備えた情報処理装置の命令先読み
制御方式であって、前記分岐先連想メモリに前記分岐先
アドレスと該分岐先アドレスに対応するアドレスモード
とを対にして記憶し、命令先読みを行う場合に、前記分
岐先連想メモリから前記分岐先アドレスおよび前記アド
レスモードを読み出し、前記アドレスモードに対応した
前記分岐先アドレスにより分岐先命令の読み出しを行う
ことを特徴とする情報処理装置の命令先読み制御方式。
1. An information processing device comprising: a branch destination associative memory for storing an address of a branch instruction and a branch destination address of the branch instruction; and address mode switching means for switching an address mode, which is an address space width. In the instruction prefetch control method, the branch destination address and the address mode corresponding to the branch destination address are stored as a pair in the branch destination associative memory, and when performing instruction prefetch, the An instruction prefetch control method for an information processing apparatus, characterized in that a branch destination address and the address mode are read out, and a branch destination instruction is read out using the branch destination address corresponding to the address mode.
JP1055791A 1991-01-31 1991-01-31 Instruction prereading control system for information processor Withdrawn JPH04245334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1055791A JPH04245334A (en) 1991-01-31 1991-01-31 Instruction prereading control system for information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1055791A JPH04245334A (en) 1991-01-31 1991-01-31 Instruction prereading control system for information processor

Publications (1)

Publication Number Publication Date
JPH04245334A true JPH04245334A (en) 1992-09-01

Family

ID=11753555

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1055791A Withdrawn JPH04245334A (en) 1991-01-31 1991-01-31 Instruction prereading control system for information processor

Country Status (1)

Country Link
JP (1) JPH04245334A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5841999A (en) * 1996-04-17 1998-11-24 International Business Machines Corporation Information handling system having a register remap structure using a content addressable table
US7036003B1 (en) 1999-09-29 2006-04-25 Fujitsu Limited Instruction processing device and method for controlling branch instruction accompanied by mode change
US7085920B2 (en) 2000-02-02 2006-08-01 Fujitsu Limited Branch prediction method, arithmetic and logic unit, and information processing apparatus for performing brach prediction at the time of occurrence of a branch instruction
JP2009535750A (en) * 2006-05-04 2009-10-01 インターナショナル・ビジネス・マシーンズ・コーポレーション Method and apparatus for implementing a polymorphic branch predictor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5841999A (en) * 1996-04-17 1998-11-24 International Business Machines Corporation Information handling system having a register remap structure using a content addressable table
US7036003B1 (en) 1999-09-29 2006-04-25 Fujitsu Limited Instruction processing device and method for controlling branch instruction accompanied by mode change
US7085920B2 (en) 2000-02-02 2006-08-01 Fujitsu Limited Branch prediction method, arithmetic and logic unit, and information processing apparatus for performing brach prediction at the time of occurrence of a branch instruction
JP2009535750A (en) * 2006-05-04 2009-10-01 インターナショナル・ビジネス・マシーンズ・コーポレーション Method and apparatus for implementing a polymorphic branch predictor

Similar Documents

Publication Publication Date Title
JP2722523B2 (en) Instruction prefetch device
US4827402A (en) Branch advanced control apparatus for advanced control of a branch instruction in a data processing system
US5450605A (en) Boundary markers for indicating the boundary of a variable length instruction to facilitate parallel processing of sequential instructions
JPH0581935B2 (en)
KR100875377B1 (en) Apparatus and Method for Performing Stack Pop and Push Operations in a Processing System
JPH0527143B2 (en)
KR930003124B1 (en) Apparatus for the control of branch instruction in pipeline system
JPH04245334A (en) Instruction prereading control system for information processor
JP2570859B2 (en) Data processing device
KR920002573B1 (en) Data processor
KR950000088B1 (en) Data processing system
JPH0646381B2 (en) Instruction fetching device
JPH01263830A (en) Information processor
JP2656765B2 (en) Data processing device
JPS6150343B2 (en)
US5524221A (en) Next instruction pointer calculation system for a microcomputer
JPS63311438A (en) Control circuit for discrepancy of store instruction
JPS61175733A (en) Control system of branch estimation
JP2878526B2 (en) Prefetch control method
JP2856703B2 (en) Processor
JPS6027418B2 (en) Instruction preemption control device
JPS5940386A (en) Virtual storage control system
JPH07191879A (en) Microprocessor provided with executing function of instruction for debugging and debugging method
JPS61198335A (en) Branch forecasting control system
JPH03177926A (en) Information processor

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980514