[go: up one dir, main page]

JPS6295636A - Pre-fetch control processor - Google Patents

Pre-fetch control processor

Info

Publication number
JPS6295636A
JPS6295636A JP23454685A JP23454685A JPS6295636A JP S6295636 A JPS6295636 A JP S6295636A JP 23454685 A JP23454685 A JP 23454685A JP 23454685 A JP23454685 A JP 23454685A JP S6295636 A JPS6295636 A JP S6295636A
Authority
JP
Japan
Prior art keywords
instruction
storage
branch
processing
branch instruction
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
JP23454685A
Other languages
Japanese (ja)
Inventor
Yoshinari Nakasaki
中崎 良成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP23454685A priority Critical patent/JPS6295636A/en
Publication of JPS6295636A publication Critical patent/JPS6295636A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To decrease the quantity of information transferred between a main storage part and a processor by providing a storing part for the pre-fetch information on the destination branched by a branch instruction at each stage of a pre-fetching process in order to reproduce the branch instruction executed previously at a high speed and also performing the transfer of data between a storing part serving as an internal memory part and a register. CONSTITUTION:A storing part which stores the information on the branch processing is provided together with an associative memory part 19 which registers a storage for branch processing information with the address of a registered branch instruction used as a key ann then delivers it when the registered branch instruction is delivered, and an executing part 13 which judges a registered or non-registered branch instruction and controls it. If the branch instruction is registered in the first branch processing mode, it is transferred to the storing part from a temporary storing part. Then the branch instruction is transferred to the temporary storing part from the storing part thereafter by the output information on the part 19.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、先取り処理を行い得る計算機に置いて分岐処
理を行うときに先取りを効率よく行うことのできる先取
り制御処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Field of Application] The present invention relates to a preemption control processing device that can efficiently perform prefetching when branch processing is performed in a computer that can perform prefetching processing.

〔従来技術とその問題点〕[Prior art and its problems]

先取り方式の計算機は、成る命令の処理中に必要とされ
る他の命令あるいはデータを操作に先立ち予め記憶装置
から処理装置に取込むもので、これにより処理の効率化
を図ることができる。先取りの手順は、一般に命令実行
までの時間経過に沿って複数のステージに分けることが
でき、例えば命令列のバッファリングステージ、命令の
デコードステージ等に分かれる。このような先取り処理
では、実行対象となる命令あるいはデータを予想できる
ことが効率向上のため重要である。先取り処理に関する
従来技術としては、例えばC,V。
A prefetch type computer is one in which other instructions or data required during processing of an instruction are fetched from a storage device into a processing device in advance of the operation, thereby making it possible to improve processing efficiency. The prefetch procedure can generally be divided into a plurality of stages along the lapse of time until instruction execution, such as an instruction string buffering stage, an instruction decoding stage, and the like. In such prefetch processing, it is important to be able to predict the instruction or data to be executed in order to improve efficiency. Examples of prior art related to prefetch processing include C and V.

ラマムーシー著「パイプラインアーキテクチャ」ニー・
シー・エム コンピューティングサーベイズ9巻−1、
1977年3月(C,V、 Ramamoorthy”
Pipel+ne Architecture  A 
CM  Computingsurveys、 Vol
 9 、 No、 l、 March 1977)の6
1頁から102頁に記載されている。
“Pipeline Architecture” by Ramamoorthy
CM Computing Surveys Volume 9-1,
March 1977 (C, V, Ramamoorthy”
Pipel+ne Architecture A
CM Computing surveys, Vol.
9, No. 1, March 1977)
It is described on pages 1 to 102.

しかし、無条件分岐又は条件分岐を含む分岐処理につい
ては、アドレス順による順次先取りを予想して先取り処
理を行うことができない。分岐先が判明しない限り先取
りを行えないからである。
However, for branch processing that includes an unconditional branch or a conditional branch, it is not possible to perform prefetch processing while anticipating sequential prefetching in the order of addresses. This is because prefetching cannot be performed unless the branch destination is known.

この結果、分岐先が決定した後に分岐先の命令に関し先
取りの先頭ステージから順次に先取り処理を行うことに
なり、このため分岐処理においては先取りを行わない場
合に比較してその性能は同等以下になるという問題を有
していた。
As a result, after the branch destination is determined, the instructions at the branch destination are prefetched sequentially from the first stage of prefetching, and as a result, the performance of branch processing is equivalent to or lower than when no prefetching is performed. I had a problem with that.

ここで第2図(a)を参照して先取りと分岐命令の間に
生じる先取りの問題点を説明する。第2図(a)におい
て横軸は時間を表わし、右方へ向って処理が順次に進む
状態を示す。第2図(a)において、命令の処理は、命
令バッファに命令列を格納する第1ステージと、命令デ
コード処理である第2ステージと、命令の実行ステージ
である第3ステージとに分けられる。先取りの過程を説
明する。最初に第1番目の命令(I1 )を命令バッフ
ァに読出す。次に命令(11)をデコード(Dl)する
と共に第2番目の命令(I2)を命令バッファに読出す
。続いて命令(I1 )の実行(El)と同時に命令(
I2)のデコード(D2)、第3番目の分岐命令(Ia
)の命令バッファへの読出しを行う。分岐命令(I8)
が読出し対象になったときには、分岐命令(IB)のデ
コード(D、)時において次の命令は読出されない。
Here, the problem of prefetching that occurs between prefetching and a branch instruction will be explained with reference to FIG. 2(a). In FIG. 2(a), the horizontal axis represents time, and shows a state in which processing progresses sequentially toward the right. In FIG. 2(a), instruction processing is divided into a first stage in which an instruction sequence is stored in an instruction buffer, a second stage in which an instruction is decoded, and a third stage in which an instruction is executed. Explain the process of preemption. First, the first instruction (I1) is read into the instruction buffer. Next, the instruction (11) is decoded (Dl) and the second instruction (I2) is read into the instruction buffer. Then, at the same time as the instruction (I1) is executed (El), the instruction (I1) is executed (El).
I2) decoding (D2), third branch instruction (Ia
) is read to the instruction buffer. Branch instruction (I8)
becomes a read target, the next instruction will not be read at the time of decoding (D,) of the branch instruction (IB).

分岐命令(r、)が実行(EB)されたときに次の実行
対象命令(エイ)が決まる。そこで、命令(L)が決ま
った後に、命令(Iや)の命令バッファへの読出し、命
令(IX)のデコード(D、)へと続く。このため、分
岐命令(I8)の実行(E、)から次の分岐先命令(I
K)の実行(EK)までの間に実行処理を行わない時間
T。
When the branch instruction (r,) is executed (EB), the next instruction to be executed (A) is determined. Therefore, after the instruction (L) is determined, reading of the instruction (I, ) to the instruction buffer and decoding (D, ) of the instruction (IX) continue. Therefore, from execution (E, ) of the branch instruction (I8) to the next branch destination instruction (I
The time T during which no execution processing is performed until the execution (EK) of K).

が発生し、先取りによる処理効率の向上を図ることがで
きないという問題があった。
occurs, and there is a problem in that it is not possible to improve processing efficiency through prefetching.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、上記の問題点を解決することにあり、
分岐処理を含んでいても先取りを高速に実現でき、且つ
主記憶部と処理装置間の情報転送量を少なくして処理能
力を高め、付加された保存記憶部を効率よく使用できる
先取り制御処理装置を提供することにある。
The purpose of the present invention is to solve the above problems,
A prefetch control processing device that can achieve high-speed prefetching even when branch processing is involved, and that can increase processing capacity by reducing the amount of information transferred between the main storage unit and the processing unit, and that can efficiently use the added storage storage unit. Our goal is to provide the following.

〔発明の構成〕[Structure of the invention]

本発明は、命令を実行するまでの過程を複数のステージ
に分け、この複数のステージのそれぞれに必要とされる
一時的記憶部を設け、先取り処理を行い得るように構成
した計算機において、前記一時的記憶部のそれぞれに付
設され、一時的記憶部に格納された分岐処理に係る情報
を記憶し保存する保存記憶部ど、少なくとも登録分岐命
令のアドレスを入力キーとして前記各保存記憶部におけ
る前記分岐処理に係る情報の記憶位置を登録させると共
に前記登録分岐命令が再度生じたとき前記記憶位置を出
力する連想記憶部と、先取りを終えた命令の実行と分岐
命令が登録分岐命令であるか、非登録分岐命令であるか
を判断し登録分岐命令である場合には、前記連想記憶部
への前記記憶位置の登録と前記各保存記憶部への分岐処
理に係る情報の記憶とを制御する実行部とを備え、最初
の分岐処理の時分岐命令が登録分岐命令であれば必要な
分岐処理に係る情報を前記各一時的記憶部から対応する
前記保存記憶部に転送して保存し、それ以後の前記分岐
処理の時前記連想記憶部の出力情報により前記保存記憶
部から前記一時的記憶部に前記分岐処理に係る情報を転
送することを特徴としている。
The present invention provides a computer configured to divide the process up to the execution of an instruction into a plurality of stages, provide a necessary temporary storage section for each of the plurality of stages, and perform prefetch processing. A storage storage section that is attached to each of the temporary storage sections and stores and saves the information related to the branch processing stored in the temporary storage section, etc., and the branch processing in each storage storage section is performed using at least the address of the registered branch instruction as an input key. an associative memory unit that registers the storage location of information related to processing and outputs the storage location when the registered branch instruction occurs again; and an execution unit that determines whether it is a registered branch instruction and, if it is a registered branch instruction, controls registration of the storage location in the associative storage unit and storage of information related to branch processing in each of the storage storage units; If the branch instruction is a registered branch instruction at the time of the first branch processing, information related to the necessary branch processing is transferred from each of the temporary storage units to the corresponding storage storage unit and stored, and thereafter At the time of the branch processing, information related to the branch processing is transferred from the storage storage section to the temporary storage section based on the output information of the associative storage section.

〔作用〕[Effect]

本発明においては、先取り処理を行うための各ステージ
に備わる命令バッファやレジスタの一時的記憶部のそれ
ぞれに対応してその格納内容を記憶(保存)し得る十分
な語長の保存記1.α部を備え、この保存記憶部によっ
て所要の分岐命令が最初に実行された時分岐先の先取り
が行われた上記各ステージの一時的記憶部の内容を記憶
する。このときには、連想記憶部に、分岐命令のアドレ
スと条件分岐の場合には条件の満足・不満足等の分岐先
を一意に決定できる情報とを記憶(登録)すると共に、
同時に各保存記憶部に記憶された先取り情報の保存位置
を記憶(登録)する。そして、再度前記分岐命令が実行
対象となったときには、その命令のアドレスなど分岐先
を一意に決定できる情報を検索用キーとして用いて、連
想記1.!部から先取り情報の保存位置を出力させ、保
存記憶部に格納された分岐処理に係る先取り情報を読出
し、対応する前記一時的記憶部に格納する。この結果、
分岐先の命令をプログラムが格納されている主記憶部か
ら読み出し、順次先取りの各ステージを実行する場合よ
り早く、分岐先を先取りした内部状態を実現することが
できる。
In the present invention, storage memory of sufficient word length to store (save) the stored contents corresponding to each of the instruction buffers and temporary storage units of registers provided in each stage for prefetching processing is provided.1. The storage storage section stores the contents of the temporary storage section of each stage in which the branch destination is prefetched when a required branch instruction is executed for the first time. At this time, the address of the branch instruction and, in the case of a conditional branch, information that can uniquely determine the branch destination, such as satisfaction or dissatisfaction of the condition, are stored (registered) in the associative memory, and
At the same time, the storage location of the prefetch information stored in each storage storage section is stored (registered). Then, when the branch instruction becomes the execution target again, information that can uniquely determine the branch destination, such as the address of the instruction, is used as a search key to search for the associative entry 1. ! The storage location of the prefetch information is outputted from the storage section, and the prefetch information related to the branch processing stored in the storage storage section is read out and stored in the corresponding temporary storage section. As a result,
The internal state of the branch destination can be realized more quickly than when reading the branch destination instruction from the main memory where the program is stored and sequentially executing each stage of the prefetch.

以上の処理は、すべての分岐命令について行わない。本
発明によれば、分岐命令を以上の処理を必要とする登録
分岐命令と以上の処理を必要としない非登録分岐命令と
に分ける。プログラムで記述されている処理の中には、
上述のような登録、保存が不要な場合がある。例えば、
繰り返し実行される頻度が少ない例外処理へ分岐する命
令、あるいは演算のオーバーフロー処理へ分岐する命令
、さらに繰り返し実行される頻度が少ないプログラムの
中で分岐する命令では、再びその分岐命令によって分岐
する可能性は極めて低い。このような分岐命令では、連
想記憶部への登録、保存記憶への先取り情報保存は、将
来使われる可能性が低いので、先取り高速化の効果はほ
とんどない。このような場合における登録、保存を不要
にする非登録分岐命令を、登録、保存を行う登録分岐命
令と共に設ける。これらの命令の違いによって分岐時に
連想記憶部への登録および保存記憶への先取り情報の保
存を制御する。
The above processing is not performed for all branch instructions. According to the present invention, branch instructions are divided into registered branch instructions that require the above processing and unregistered branch instructions that do not require the above processing. Some of the processes described in the program include
There are cases where the above-mentioned registration and storage are not necessary. for example,
For instructions that branch to exception processing that is executed infrequently, or instructions that branch to overflow processing of an operation, and instructions that branch in a program that is executed infrequently, there is a possibility that the branch instruction will branch again. is extremely low. In such a branch instruction, the registration in the associative memory and the storage of the prefetch information in the storage memory are unlikely to be used in the future, so there is little effect on speeding up the prefetch. A non-registration branch instruction that makes registration and storage unnecessary in such a case is provided together with a registration branch instruction that performs registration and storage. The difference between these instructions controls the registration in the associative memory unit and the storage of prefetch information in the storage memory at the time of branching.

〔実施例〕〔Example〕

以下に、図面を用いて本発明の詳細な説明する。 The present invention will be explained in detail below using the drawings.

第1図は本発明の一実施例に係る先取り制御処理装置を
備えた計算機の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a computer equipped with a preemption control processing device according to an embodiment of the present invention.

第1図において、1は機械語命令列およびデータが格納
される主要な記憶部、2は記憶部1から読出した機械語
命令を格納する命令バッファである。この命令バッファ
2は第1ステージを構成する。命令バッファ2には順次
に読出された機械語命令が格納され、命令デコーダ3に
よって各機械語命令は命令コードおよびオペランドシラ
ブルをデコードされ、その各情報は次の先取りのステー
ジに送られる。4は、命令バッファ2の中に格納された
機械語命令に続く次の命令を記憶部1から読出すための
アドレスを保持するバッファアドレスジスクである。こ
のバッファアドレスレジスタ4も先取りの第1ステージ
に属する。
In FIG. 1, numeral 1 is a main storage section in which machine language instruction sequences and data are stored, and numeral 2 is an instruction buffer that stores machine language instructions read from the storage section 1. This instruction buffer 2 constitutes the first stage. Machine language instructions read out sequentially are stored in the instruction buffer 2, and the instruction code and operand syllable of each machine language instruction are decoded by the instruction decoder 3, and each piece of information is sent to the next prefetching stage. A buffer address disk 4 holds an address for reading out the next instruction following the machine language instruction stored in the instruction buffer 2 from the storage unit 1. This buffer address register 4 also belongs to the first stage of prefetching.

上記命令バッファ2およびバッファアドレスレジスタ4
には、それぞれ命令バッファ保存記憶部5およびバッフ
ァアドレス保存記憶部6が付設される。この命令バッフ
ァ保存記憶部5は、後述する一定条件の下で命令バッフ
ァ2に先取りされた分岐先の命令列を保存するめの記憶
部で、複数の命令列を保持することができる。またバッ
ファアドレス保存記憶部6は、前記命令バッファ2から
命令バッファ保存記憶部5に命令列のデータを転送する
時においてその時のバッファアドレスレジスタ4の内容
を保存する記憶部で、複数のバッファアドレス情報を保
持することができる。
The above instruction buffer 2 and buffer address register 4
are respectively provided with an instruction buffer storage section 5 and a buffer address storage section 6. The instruction buffer storage storage unit 5 is a storage unit for storing a branch destination instruction sequence prefetched into the instruction buffer 2 under certain conditions to be described later, and is capable of holding a plurality of instruction sequences. Further, the buffer address storage storage section 6 is a storage section that stores the contents of the buffer address register 4 at the time when data of an instruction string is transferred from the instruction buffer 2 to the instruction buffer storage storage section 5, and stores a plurality of buffer address information. can be retained.

次に先取りの第2ステージを説明する。このデータ処理
装置では、機械語命令として第1および第2のオペラン
ドを有するものであるとする。7は命令デコーダ3から
出力される命令コード情報を保持する命令コードレジス
タ、8は命令デコーダ3から出力される第1オペランド
情報を保持する第1オペランドレジスタ、9は命令デコ
ーダ3から出力される第2オペランド情報を保持する第
2オペランドレジスタである。これらのレジスタが第2
ステージを構成する。命令コードレジスタ7、第1オペ
ランドレジスタ8、第2オペランドレジスタ9には、そ
れぞれ保存記1.@部10.11.12が付設される。
Next, the second stage of preemption will be explained. It is assumed that this data processing device has first and second operands as machine language instructions. 7 is an instruction code register that holds the instruction code information output from the instruction decoder 3; 8 is the first operand register that holds the first operand information that is output from the instruction decoder 3; 9 is the first operand register that is output from the instruction decoder 3; This is a second operand register that holds two-operand information. These registers are the second
Configure the stage. The instruction code register 7, first operand register 8, and second operand register 9 each have storage records 1. @ part 10.11.12 is attached.

命令コード保存記1.α部10は分岐命令が実行された
ときに命令コードレジスタ7の内容が転送されてこれを
保存する。第1オペランド保存記憶部11は同一のタイ
ミングで第1オペランドレジスタ8の内容が転送され、
これを保存する。
Instruction code storage record 1. When a branch instruction is executed, the contents of the instruction code register 7 are transferred to the α section 10 and stored therein. The contents of the first operand register 8 are transferred to the first operand storage storage unit 11 at the same timing,
Save this.

第2オペランド保存記憶部12は同一のタイミングで第
2オペランドレジスタ9の内容が転送され、これを保存
する。これらの保存記憶部10.11.12は各々複数
語格納することができる。
The contents of the second operand register 9 are transferred to the second operand storage storage section 12 at the same timing and are stored therein. Each of these storage units 10, 11, and 12 can store multiple words.

13は、各命令毎に指定されたデータ操作、演算等を行
う実行部であり、登録分岐命令、非登録分岐命令および
その他の各機械語命令をデコードする命令デコーダ14
、命令デコーダ14のデコード結果に基づき、後述する
連想記憶部への登録、非登録などをマイクロプロラムで
制御する制御部15を含む。実行部13は処理の最終ス
テージである第3ステージに属する。命令コードレジス
タ7、第1オペランドレジスタ8、第2オペランドレジ
スタ9の内容は実行部13に与えられて処理される。1
6は一実行部13で実行される命令のアドレスを保持す
る実行命令アドレスレジスタ、17は前記保存記憶部5
 、 6 、10,11.12にデータが格納される同
一のタイミングで実行命令アドレスレジスタ16の内容
が転送され、これを保存する実行命令アドレス保存記憶
部である。
13 is an execution unit that performs data manipulation, calculation, etc. specified for each instruction, and an instruction decoder 14 that decodes registered branch instructions, unregistered branch instructions, and other machine language instructions.
, a control unit 15 that controls registration and non-registration in an associative memory unit, which will be described later, based on the decoding results of the instruction decoder 14 using a microprogram. The execution unit 13 belongs to the third stage, which is the final stage of processing. The contents of the instruction code register 7, first operand register 8, and second operand register 9 are provided to the execution unit 13 and processed. 1
Reference numeral 6 indicates an execution instruction address register that holds the address of an instruction to be executed by one execution unit 13, and 17 indicates the storage storage unit 5.
, 6, 10, 11, and 12. The contents of the execution instruction address register 16 are transferred at the same timing as when data is stored in 12, and is an execution instruction address storage unit that stores the contents.

18は保存記憶アドレスカウンタで、前記の各保存記憶
部5 、6 、10.11.12.17に対してこれら
の保存記憶部が先取り情報を格納する時に各保存記憶部
におけるアドレスを示すもので、保存処理毎に歩進し、
次に保存する情報のためアドレス値を保持する。また保
存記憶アドレスカウンタ18の内容は連想記憶部19に
も与えられる。連想記憶部19は、最初に分岐命令を実
行したときにおいて分岐先の命令列を先取りする時に先
取り情報を保存する各保存記憶部5 、6 、10.1
1.12.17のアドレス(記憶位置)を記憶すると共
に、それ以後に同じ分岐命令を実行するとき分岐命令の
位置を示す実行命令アドレスレジスフ16の内容および
条件分岐命令の場合には条件結果あるいは条件情報20
を検索用の入力キーとして、前記先取り情報を記憶する
各保存記憶部のアドレスを出力する。21は分岐命令ア
ドレスレジスタで、分岐命令のアドレスを分岐命令実行
中に保持するために利用され、連想記憶部19に登録す
るためのキーとなる値を出力する。
Reference numeral 18 denotes a storage address counter, which indicates the address in each storage storage section when these storage storage sections store prefetched information for each of the storage storage sections 5, 6, 10, 11, 12, and 17. , increments for each storage process,
The address value is retained for the information to be saved next. Further, the contents of the saved memory address counter 18 are also given to the associative memory section 19. The associative storage unit 19 includes storage storage units 5, 6, and 10.1 that store prefetch information when prefetching a branch destination instruction sequence when a branch instruction is executed for the first time.
1.12.17 address (memory location), and when executing the same branch instruction thereafter, the contents of the execution instruction address register 16 indicating the location of the branch instruction and the condition result in the case of a conditional branch instruction. Or condition information 20
is used as a search input key, and outputs the address of each storage storage unit that stores the prefetch information. A branch instruction address register 21 is used to hold the address of a branch instruction during execution of the branch instruction, and outputs a key value to be registered in the associative memory unit 19.

次に第1図に示された上記構成を有する計算機において
、分岐命令の先取り処理例を説明する。
Next, an example of prefetching processing of a branch instruction in the computer having the above configuration shown in FIG. 1 will be described.

今、実行対象となっている機械語命令列を下記の如く設
定する。
Now, set the machine language instruction string to be executed as follows.

番地  機械語命令列     処理内容Lo    
rGo  TOLn    Lhの番地へ分岐する。登 録分岐命令 り、    SOB  RO,R1(RO−R1)をR
1レジス タに格納する L、    ADD  RO,R1(RO+R1)をR
1レジス タに格納する Lh、+  LOAD  C,R2Cデ 9をR2レジ
スタに 格納する Ly1+2       。
Address Machine language instruction sequence Processing content Lo
rGo TOLn Branch to address Lh. Register branch instruction, SOB RO, R1 (RO-R1)
L to store in 1 register, ADD RO, R1 (RO+R1) to R
Lh to store in 1 register, + LOAD C, R2C de 9 to store in R2 register Ly1+2.

なお、「rGOTOL、J命令は登録分岐命令に属する
Note that the "rGOTOL, J instruction belongs to registered branch instructions.

上記命令列において現在実行対象になっている命令はり
。番地にあるrrGo  To  LhJであるとする
。従って、このとき実行命令アドレスレジスタ16には
り。番地が格納され、命令コードレジスフ7にはrrG
o  TO’L、、J命令のオペレーションコード部が
格納され、第1オペランドレジスタ8には第1オペラン
ドとしてり、が格納される。また命令バッファ2には[
rGOT○Lh」命令に続く命令としてL11番地rs
UBRO,RIJ命令が格納され、バッファアドレスレ
ジスタ4にはrsUB  RO,RIJに続く命令を読
出せるようにL22番地格納されている。
The instruction currently being executed in the above instruction sequence. Suppose that it is rrGo To LhJ at the address. Therefore, at this time, the execution instruction address register 16 is filled. The address is stored, and the instruction code register 7 is rrG.
o The operation code portion of the TO'L, , J instruction is stored, and the first operand is stored in the first operand register 8. Also, instruction buffer 2 has [
rGOT○Lh" as the command following the L11 address rs
UBRO and RIJ instructions are stored, and the buffer address register 4 stores an address L22 so that the instructions following rsUBRO and RIJ can be read.

命令コードレジスタ7に格納されている登録分岐命令r
rGOTo  L、、Jを、実行部13の命令デコーダ
14で解析し、その解析結果に基づき制御部15で登録
分岐命令rrGo  To  L、、Jの制御を開始す
る。実行命令アドレスレジスタ16に格納されている番
地り。を連想記憶部19ヘキ一人力として与え、番地り
。に対応した各保存記憶部5゜6 、10.11.12
.17におけるアドレスの有無を検査する。この時点に
おいては対応するアドレスはないものとする。
Registered branch instruction r stored in instruction code register 7
The instruction decoder 14 of the execution unit 13 analyzes rGOTo L, .J, and based on the analysis result, the control unit 15 starts controlling the registered branch instructions rrGo To L, . Address stored in the execution instruction address register 16. Associative memory unit 19 is given the address. Each storage storage unit corresponding to 5゜6, 10.11.12
.. The presence or absence of the address in 17 is checked. Assume that there is no corresponding address at this point.

上記の場合、実行部13はrrGOTo  L、、J命
令の分岐処理として次の処理を行う。まず実行命令アド
レスレジスタ16の内容3“Lo  ”を分岐命令アド
レスレジスタ21に格納する。次いで実行命令アドレス
レジスタ16およびバッファアドレスレジスタ4に分岐
先命令のアドレスとしてLhを格納する。このアドレス
情報によってその後記憶部1からしわ番地以降の命令列
を順次に読出した内容を命令バッファ2に格納する。従
ってまず最初にLn番地のrADD  、RO,RIJ
が命令バッファ2に格納される。この命令は命令デコー
ダ3によって解釈され、これによって命令コードrAD
DJが命令コードレジスタ7に、第1オペランドの「R
O」が第1オペランドレジスク8に、第2オペランドの
「R1」が第2オペランドレジスタ9にそれぞれ格納さ
れる。この時命令バッファ2には引続いてり、、。1番
地の命令rLOADC,R2Jが記憶部1から読出され
、且つバッファアドレスレジスタ4には次の命令の番地
であるし。。2が格納される。
In the above case, the execution unit 13 performs the following process as branch processing for the rrGOTo L, , J instructions. First, the content 3 "Lo" of the execution instruction address register 16 is stored in the branch instruction address register 21. Next, Lh is stored in the execution instruction address register 16 and the buffer address register 4 as the address of the branch destination instruction. Based on this address information, the contents of the instruction sequence sequentially read from the storage section 1 starting from the wrinkle address are stored in the instruction buffer 2. Therefore, first of all, rADD, RO, RIJ of Ln address
is stored in the instruction buffer 2. This instruction is interpreted by the instruction decoder 3, which causes the instruction code rAD
The DJ writes the first operand “R” to the instruction code register 7.
O' is stored in the first operand register 8, and the second operand 'R1' is stored in the second operand register 9. At this time, the instruction buffer 2 continues. The instruction rLOADC, R2J at address 1 is read from the storage unit 1, and the buffer address register 4 contains the address of the next instruction. . 2 is stored.

命令の先取りに関する上記の処理を行った後、各保存記
憶部5 、6 、10.11.12.17に、それぞれ
に対応する各レジスタの内容を格納する。格納先のアド
レスは、保存記憶アドレスカウンタ18から各保存記憶
部5 、6 、10.11.12.17に与えられる。
After performing the above-described processing related to instruction prefetching, the contents of the corresponding registers are stored in each of the storage units 5, 6, and 10.11.12.17. The storage address is given from the storage address counter 18 to each storage storage unit 5 , 6 , 10.11.12.17.

この場合のアドレス値は例えば“5”であるとする。上
記各保存記憶部5 、 6 、10.11.12.17
における保存処理と同時に、アドレス値” 5 ”を分
岐命令アドレスレジスタ21の値し。をキーとして連想
記憶部19に登録する。その後、保存記憶アドレスカウ
ンタ18を歩進させる。
Assume that the address value in this case is, for example, "5". Each of the above storage storage units 5, 6, 10.11.12.17
At the same time as the storage process in , the address value "5" is set to the value of the branch instruction address register 21. is registered in the associative memory unit 19 as a key. Thereafter, the storage address counter 18 is incremented.

以上の処理までを分岐命令rrGo  TOL、、」の
処理として実行する。それ以降は、命令コードレジスタ
7に格納されている命令コードrADDJに従って実行
部13は加算処理を続行する。
The above processing is executed as the processing of the branch instruction rrGo TOL, . After that, the execution unit 13 continues the addition process according to the instruction code rADDJ stored in the instruction code register 7.

第2図(b)は前記本発明に係る先取り処理の過程を示
す。第2図(b)に従って前記の動作を説明すると、前
記において登録分岐命令し。の読出しは最初であるため
、通常の先取りの処理ステージに従って命令バッファへ
の分岐命令の読出し23、分岐命令のデコード24、分
岐命令の実行25が行われ、その後に分岐先の命令(I
工)の読出し26に移ることになる。従って実行25か
ら分岐先命令の実行27までの間には従来と同じ非実行
時間T。
FIG. 2(b) shows the process of prefetching processing according to the present invention. The above operation will be explained according to FIG. 2(b). In the above, a registered branch instruction is executed. Since reading is the first step, the reading of the branch instruction to the instruction buffer 23, the decoding of the branch instruction 24, and the execution of the branch instruction 25 are performed according to the normal prefetch processing stages, and then the branch destination instruction (I
The process then moves on to reading 26 of the process. Therefore, the non-execution time T between execution 25 and execution 27 of the branch destination instruction is the same as before.

が存在する。しかしこの場合、この最初の分岐処理にお
いて、この分岐処理はこの後反復的に1吏用されるので
、命令Lhの内容が保存記憶部10,11゜12に格納
され、且つ命令Lh。1の内容が命令バッファ保存記憶
部5に、命令し7.2のアドレスがバッファアドレス保
存記憶部6に、命令し。のアドレスが実行命令アドレス
保存記憶部17に、それぞれ所定のアドレスを指定され
て格納されるのである。その後は分岐先の先取り処理が
引き続いて行われるのである。
exists. However, in this case, in this first branch process, since this branch process will be used repeatedly from now on, the contents of the instruction Lh are stored in the storage storage units 10, 11 and 12, and the contents of the instruction Lh. The content of 1 is an instruction to the instruction buffer storage unit 5, and the address of 7.2 is an instruction to the buffer address storage unit 6. The addresses of the execution command addresses are stored in the execution command address storage unit 17, with predetermined addresses being designated respectively. After that, prefetching of the branch destination continues.

上記処理の後、適当な時期に再びり。番地のrrGo 
 To、L、、j命令が実行対象になったとする。この
場合の状態は、第2図(b)において28で示される。
After the above processing, it will be returned at an appropriate time. Address rrGo
Assume that To, L, , j instructions are to be executed. The state in this case is indicated by 28 in FIG. 2(b).

この時には実行命令アドレスレジスタ16に番地L0が
格納されている。この分岐命令の処理として実行部13
では、実行命令アドレスレジスタ16に格納される番地
り。をキー人力として連想記憶部19に与え、番地り。
At this time, address L0 is stored in the execution instruction address register 16. The execution unit 13 processes this branch instruction.
Here is the address stored in the execution instruction address register 16. is given to the associative memory unit 19 as a key power, and the address is given.

に対応した各保存記憶部へのアドレスの有無を検査する
。この段階では既に番地り。をキー人力として各保存記
憶部へのアドレス゛5”が登録されている。この結果、
連想記憶&1<19の出力として番地り。が既に登録済
みであることおよびアドレス゛5″が出力される。この
アドレス“5゛によって、このアドレスによって指定さ
れる内容を各保存記憶部5゜6 、10.11.12.
17から読出し、対応する命令バッファ2及び各レジス
タ4,7.8,9.16に格納する。すなわち、これに
よれば、命令バッファ2に「LOAD  C,R2Jが
格納され、バッファアドレスレジスタ4に番地L0゜2
が格納され、命令コードレジスタ7に命令コードrAD
Djが格納され、第1オペランドレジスタ8にrROJ
が格納され、第2オペランドレジスタ9に「R1」が格
納され、実行命令アドレスレジスタ16には番地り、、
が格納される。従って、上記命令バッファ2及び各レジ
スタ4,7,8,9.16の先取り内容は、記憶部1か
ら読出されることによって与えられるのではなく、対応
する各保存記憶部より直接的に与えられるため高速に格
納することができる。
The presence or absence of an address to each storage unit corresponding to the storage unit is checked. At this stage, it is already the address. The address "5" for each storage storage section is registered as a key.As a result,
Address as output of associative memory &1<19. has already been registered, and the address "5" is output. This address "5" causes the content specified by this address to be stored in each of the storage units 5, 6, 10, 11, 12, .
17 and stored in the corresponding instruction buffer 2 and each register 4, 7.8, 9.16. That is, according to this, "LOAD C, R2J" is stored in the instruction buffer 2, and the address L0°2 is stored in the buffer address register 4.
is stored, and the instruction code rAD is stored in the instruction code register 7.
Dj is stored and rROJ is stored in the first operand register 8.
is stored, "R1" is stored in the second operand register 9, and the address is stored in the execution instruction address register 16.
is stored. Therefore, the prefetched contents of the instruction buffer 2 and each register 4, 7, 8, 9.16 are not provided by being read from the storage section 1, but are provided directly from each corresponding storage section. Therefore, it can be stored quickly.

上記再度の分岐処理を第2図(b)において説明すれば
、一度分岐処理を行った命令(1B)が再び実行(En
 )の対象になったとき(第2図(b)中の29)、次
のステップでは分岐先の命令(IK)を先取りしてデコ
ード(DK)すると共に命令(IK+、)を命令バッフ
ァ2に読出す時の状態に第1ステージ及び第2ステージ
がセットされることになる。従って破線30によって示
される如く分岐処理において時間の短縮化を図ることが
できるのである。
To explain the above-mentioned re-branch processing with reference to FIG.
) (29 in Fig. 2(b)), the next step is to preempt the branch destination instruction (IK) and decode (DK) it, and also transfer the instruction (IK+, ) to instruction buffer 2. The first stage and the second stage are set to the state at the time of reading. Therefore, as shown by the broken line 30, time can be reduced in branch processing.

上記の分岐命令の処理例は無条件分岐命令における例を
説明したが、条件分岐命令においても同様な処理を行う
ことができる。ただしこの場合、まず連想記憶部19に
対する検索として、実行命令アドレスレジスタ16の値
と条件結果20とを検索用のキー情報とじ−ご用いる。
Although the above processing example for a branch instruction is an example for an unconditional branch instruction, similar processing can be performed for a conditional branch instruction as well. However, in this case, the value of the execution instruction address register 16 and the condition result 20 are first used as key information for the search in the associative memory unit 19.

また連想記憶部19における登録には分岐命令アドレス
レジスタ21の値と条件結果20とをキー情報として用
いる。この結果、条件分岐命令において、条件分岐命令
のアドレスと条件結果をキー人力として連想記憶部19
に与えたとき、連想記憶部19に以前に当該条件分岐命
令が実行対象;こなったことがn g、*されていれば
、連、坦記憶11119内に保持されている各保存記憶
部における格納位置情報に基づいて各保存記憶部から必
要な先取り情報を読み出し、各ステージのレジスタ等に
高速に格納することができる。
Further, the value of the branch instruction address register 21 and the condition result 20 are used as key information for registration in the associative memory unit 19. As a result, in the conditional branch instruction, the associative memory unit 19 uses the address and condition result of the conditional branch instruction as a key input.
When the conditional branch instruction is previously executed in the associative memory 19, if it is specified that the conditional branch instruction was Necessary prefetch information can be read out from each storage storage unit based on the storage location information and stored in the register or the like of each stage at high speed.

以上の動作例では、登録分岐命令の例を記述した。非登
録分岐命令である[rGo  To  L、、Jが登録
分岐命令rrGo  To  L、Jに代えて命令列と
して生成されているとすれば、実行時に命令デコーダ1
4でこの非登録分岐命令を解析した後、制御部15で指
示する処理では、連想記1、α部19の中に登録されて
いるか否かの検査および連想記憶部19への登録、各保
存記憶部への格納処理は行わない。
In the above operation example, an example of a registered branch instruction has been described. If the unregistered branch instructions [rGo To L,,J are generated as an instruction sequence instead of the registered branch instructions rrGo To L,J, then the instruction decoder 1
After analyzing this unregistered branch instruction in step 4, the processing instructed by the control unit 15 includes checking whether it is registered in the associative memory 1 and the α part 19, registering it in the associative memory unit 19, and saving each. No storage processing is performed in the storage unit.

なお本発明は上記実施例に限定されるものではなく、任
意に変更することができる。例えば先取り処理のための
ステージ数は更に増すことも可能で、このような場合に
は増加したステージのレジスタに対応して保存記憶部を
追加する必要がある。
Note that the present invention is not limited to the above embodiments, and can be modified as desired. For example, the number of stages for prefetch processing can be further increased, and in such a case, it is necessary to add a storage section to accommodate the registers of the increased stages.

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

以−」二の説明で明らかなように本発明によれば、分岐
命令によって分岐した先での先取り情報を保存し且つ適
時に出力する保存記憶部を先取り処理の各ステージに設
けたため、以前に実行した分岐命令を再度実行するとき
分岐先での先取り状態を高速に実現することができると
共に、主記憶部から読出すのではなく処理装置内の内部
記憶部である保存記憶部とレジスタ等の間でデータ転送
を行うことによって分岐先での先取り状態を作り出すこ
とができるので、主記憶部と処理装置間の情報転送量を
減少させることができる。
As is clear from the explanation in Part 2, according to the present invention, a storage unit is provided at each stage of the prefetch process to save the prefetch information at the destination branched by the branch instruction and output it in a timely manner. When re-executing an executed branch instruction, a prefetching state at the branch destination can be quickly realized, and instead of reading from the main memory, it is possible to read from the internal memory of the processing device such as the storage memory and registers. By transferring data between them, a prefetch state can be created at the branch destination, so the amount of information transferred between the main memory and the processing device can be reduced.

さらに本発明によれば、実行対象となる分岐命令を2種
類に分けている。即ち、1つの種類は分岐時に先取りに
関する情報を保存記憶部および連想記憶部に格納する分
岐命令であり、他の1種は分岐時に先取りに関する情報
を保存記憶部および連想記憶部に格納しない分岐命令で
ある。これらの2種類の分岐命令を設けることによって
、繰り返し実行対象になる分岐命令に関する分岐情報は
保存記憶部に格納し、稀に実行対象になるだけの分岐命
令に関する分岐情tUは保存記1.α部には格納しない
。この結果、保存記憶部には将来利用される可能性の高
い情報を格納することができ、記憶可能な語数が限られ
た保存記憶部および連想記憶部を効率的に利用すること
ができる先取り制御処理装置を提供することができる。
Furthermore, according to the present invention, branch instructions to be executed are divided into two types. That is, one type is a branch instruction that stores information regarding prefetching in the storage storage section and associative memory section when branching, and the other type is a branch instruction that does not store information regarding prefetching in the storage storage section and associative storage section when branching. It is. By providing these two types of branch instructions, branch information regarding branch instructions that are to be repeatedly executed is stored in the storage storage section, and branch information tU regarding branch instructions that are only rarely to be executed is stored in the storage section 1. It is not stored in the α section. As a result, the preservation memory section can store information that is likely to be used in the future, and the preemption control allows efficient use of the preservation memory section and associative memory section, which have a limited number of memorizable words. A processing device can be provided.

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

第1図は本発明の一実施例に係る先取り制御処理装置を
備えた計算機のブロック図、 第2図は分岐命令を実行したときの先取り処理の時間的
経過を示した図であり、第2図(a)は従来の場合を示
す図、第2図(b)は本発明の場合を示す図である。
FIG. 1 is a block diagram of a computer equipped with a prefetch control processing device according to an embodiment of the present invention, and FIG. 2 is a diagram showing the time course of prefetch processing when a branch instruction is executed. FIG. 2(a) is a diagram showing the conventional case, and FIG. 2(b) is a diagram showing the case of the present invention.

Claims (1)

【特許請求の範囲】[Claims] (1)命令を実行するまでの過程を複数のステージに分
け、この複数のステージのそれぞれに必要とされる一時
的記憶部を設け、先取り処理を行い得るように構成した
計算機において、前記一時的記憶部のそれぞれに付設さ
れ、一時的記憶部に格納された分岐処理に係る情報を記
憶し保存する保存記憶部と、少なくとも登録分岐命令の
アドレスを入力キーとして前記各保存記憶部における前
記分岐処理に係る情報の記憶位置を登録させると共に前
記登録分岐命令が再度生じたとき前記記憶位置を出力す
る連想記憶部と、先取りを終えた命令の実行と分岐命令
が登録分岐命令であるか、非登録分岐命令であるかを判
断し登録分岐命令である場合には、前記連想記憶部への
前記記憶位置の登録と前記各保存記憶部への分岐処理に
係る情報の記憶とを制御する実行部とを備え、最初の分
岐処理の時分岐命令が登録分岐命令であれば必要な分岐
処理に係る情報を前記各一時的記憶部から対応する前記
保存記憶部に転送して保存し、それ以後の前記分岐処理
の時前記連想記憶部の出力情報により前記保存記憶部か
ら前記一時的記憶部に前記分岐処理に係る情報を転送す
ることを特徴とする先取り制御処理装置。
(1) In a computer configured to perform prefetch processing by dividing the process up to the execution of an instruction into a plurality of stages, and providing the necessary temporary storage section for each of the plurality of stages, a storage storage section that is attached to each of the storage sections and stores and saves information related to the branch processing stored in the temporary storage section; and a storage storage section that stores and saves information related to the branch processing stored in the temporary storage section, and the branch processing in each storage storage section using at least the address of the registered branch instruction as an input key. an associative memory unit that registers the storage location of information related to the information and outputs the storage location when the registered branch instruction occurs again; and a content addressable memory unit that registers the storage location of information related to the registered branch instruction and outputs the storage location when the registered branch instruction occurs again; an execution unit that determines whether it is a branch instruction and, if it is a registered branch instruction, controls registration of the storage location in the associative storage unit and storage of information related to branch processing in each storage storage unit; If the branch instruction is a registered branch instruction at the time of the first branch processing, the information related to the necessary branch processing is transferred from each temporary storage section to the corresponding storage storage section and stored; A preemption control processing device characterized in that, at the time of branch processing, information related to the branch processing is transferred from the storage storage section to the temporary storage section based on output information of the associative storage section.
JP23454685A 1985-10-22 1985-10-22 Pre-fetch control processor Pending JPS6295636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23454685A JPS6295636A (en) 1985-10-22 1985-10-22 Pre-fetch control processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23454685A JPS6295636A (en) 1985-10-22 1985-10-22 Pre-fetch control processor

Publications (1)

Publication Number Publication Date
JPS6295636A true JPS6295636A (en) 1987-05-02

Family

ID=16972714

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23454685A Pending JPS6295636A (en) 1985-10-22 1985-10-22 Pre-fetch control processor

Country Status (1)

Country Link
JP (1) JPS6295636A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60168238A (en) * 1984-02-10 1985-08-31 Hitachi Ltd Instruction control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60168238A (en) * 1984-02-10 1985-08-31 Hitachi Ltd Instruction control system

Similar Documents

Publication Publication Date Title
US5774711A (en) Apparatus and method for processing exceptions during execution of string instructions
US7444501B2 (en) Methods and apparatus for recognizing a subroutine call
JPH0334024A (en) Method of branch prediction and instrument for the same
US5146570A (en) System executing branch-with-execute instruction resulting in next successive instruction being execute while specified target instruction is prefetched for following execution
US5784607A (en) Apparatus and method for exception handling during micro code string instructions
US7627740B2 (en) Methods and apparatus for dynamic prediction by software
KR930003124B1 (en) Apparatus for the control of branch instruction in pipeline system
US20050102659A1 (en) Methods and apparatus for setting up hardware loops in a deeply pipelined processor
US20040172518A1 (en) Information processing unit and information processing method
JPH0773104A (en) Cache system
US5421026A (en) Data processor for processing instruction after conditional branch instruction at high speed
JPS6295636A (en) Pre-fetch control processor
US7500088B2 (en) Methods and apparatus for updating of a branch history table
JPH0193825A (en) Prefetch queue control system
JPH0342723A (en) Data processor
US6735686B1 (en) Data processing device including two instruction decoders for decoding branch instructions
JPH02157939A (en) Instruction processing method and instruction processor
JP2503223B2 (en) Prior control method
JPS6247747A (en) Prefetching control processor
JP2591325B2 (en) Branch control device
JPS6249545A (en) Pre-fetch control processor
JPH01263830A (en) Information processor
JPH0462637A (en) Microprocessor
JPH03262040A (en) Circuit for fetching instruction by branch route
JPS6191725A (en) Address match control method