JPH0812602B2 - Information processing device - Google Patents
Information processing deviceInfo
- Publication number
- JPH0812602B2 JPH0812602B2 JP31900887A JP31900887A JPH0812602B2 JP H0812602 B2 JPH0812602 B2 JP H0812602B2 JP 31900887 A JP31900887 A JP 31900887A JP 31900887 A JP31900887 A JP 31900887A JP H0812602 B2 JPH0812602 B2 JP H0812602B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- store
- address
- changed
- detection
- 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.)
- Expired - Lifetime
Links
Landscapes
- Advance Control (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、情報処理装置に係り、特に、パイプライン
処理方式をとる情報処理装置に関する。Description: TECHNICAL FIELD The present invention relates to an information processing apparatus, and more particularly to an information processing apparatus that employs a pipeline processing method.
一般に、パイプライン処理方式をとる情報処理装置
は、命令の読出し、命令のデコード、オペランドの読出
し、命令の実行などの命令処理の各ステージが連続する
命令間でオーバラツプして進行するように動作する。こ
のため後続の命令読出しが先行するストア命令の実行よ
り先行する場合が生じる。先行するストア命令がメモリ
のある領域を変更し、後続の命令読出しがその領域から
既に命令を読出し命令バツフアにその命令を取込んでい
る場合、メモリと命令バツフアとの間に矛盾が起きる。In general, an information processing apparatus adopting a pipeline processing system operates so that stages of instruction processing such as instruction reading, instruction decoding, operand reading, and instruction execution overlap and progress between consecutive instructions. . Therefore, the subsequent instruction read may precede the execution of the preceding store instruction. If the preceding store instruction modifies an area of memory and a subsequent instruction read has already read the instruction from that area and fetched the instruction into the instruction buffer, a conflict occurs between the memory and the instruction buffer.
このため従来のこの種情報処理装置は、例えば、命令
バツフアに取込まれた命令がメモリ上で変更されたとき
に命令バツフアを無効化し、命令を読み直している。し
かし、変更された命令の前に分岐命令があり分岐成功す
る場合などは、命令バツフアを無効化し命令読出しをや
り直すことは、その新たな読出命令が利用されないこと
になり、性能低下を引き起す。このような性能低下を防
止するための従来技術として、例えば、特開昭60−7724
1号公報等に記載された技術が知られている。Therefore, the conventional information processing apparatus of this type invalidates the instruction buffer and rereads the instruction when the instruction fetched in the instruction buffer is changed in the memory. However, if there is a branch instruction before the changed instruction and the branch succeeds, invalidating the instruction buffer and re-reading the instruction causes the new read instruction to not be used, resulting in performance degradation. As a conventional technique for preventing such performance deterioration, for example, JP-A-60-7724
The technology described in Japanese Patent Publication No. 1 etc. is known.
この種従来技術は、命令バツフアに取込まれた命令が
メモリ上で変更されたことを検出する(これを第1の検
出と呼ぶ)と、その結果を保持し、後続の命令の読出し
は抑止するが、命令の処理は続行するように動作する。
そして、命令を演算ユニツトで実行しようとするとき、
保持されている検出結果により該命令がメモリ上で変更
されているかどうかを検出し(これを第2の検出と呼
ぶ)、変更されている場合、演算ユニツトの実行を抑止
し、命令バツフアを無効化し、変更された命令以降の命
令読出しをやり直している。In this type of conventional technology, when it is detected that the instruction fetched in the instruction buffer is changed in the memory (this is called the first detection), the result is held and the reading of the subsequent instruction is suppressed. However, the operation of the instruction operates so as to continue.
And when trying to execute an instruction in the arithmetic unit,
The stored detection result detects whether or not the instruction has been modified in memory (this is called the second detection), and if it has, it suppresses the execution of the operation unit and invalidates the instruction buffer. And the instruction reading after the changed instruction is redone.
また、前記従来技術による情報処理装置は、パイプラ
イン処理を行なうユニツト内に、多くの命令の演算を処
理できる演算器と汎用レジスタIGPRを備え、これらを演
算ユニツトの実行とは独立に、命令のデコードに同期し
て動作させることにより、分岐命令の判定や、命令間で
参照するレジスタがコンフリクトするケースの処理など
の高速化が行なわれており、一般にこれを先行演算と呼
ぶ。Further, the information processing apparatus according to the above-mentioned conventional technology is provided with an arithmetic unit capable of processing a large number of instructions and a general-purpose register IGPR in a unit for performing pipeline processing, and these are provided independently of the execution of the arithmetic unit. By operating in synchronism with decoding, the speed of the determination of branch instructions and the processing in the case where the registers referred to between the instructions conflict with each other are speeded up, and this is generally called a preceding operation.
例えば、L(Load)命令とA(Add)命令が連続し、
L命令で書込む前記汎用レジスタとは異なる汎用レジス
タGGPRとA命令がオペランド・アドレス計算のために用
いる汎用レジスタGGPRとの番号が一致している場合、L
命令が演算ユニツトで実行されその実行結果がGGPRに書
込まれてからA命令のオペランド・アドレスを計算して
いたのでは、パイプラインが大きく乱れ、性能が低下し
てしまう。そこで、演算ユニツトの実行とは独立にL命
令のオペランドをIGPRに書込み、IGPRを用いてA命令の
オペランド・アドレスを計算することにより、パイプラ
インの乱れを小さく抑えることができる。For example, L (Load) instruction and A (Add) instruction are consecutive,
If the general register GGPR different from the general register written by the L instruction and the general register GGPR used by the A instruction for operand address calculation have the same number, L
If the operand address of the A instruction was calculated after the instruction was executed in the arithmetic unit and the execution result was written in GGPR, the pipeline would be greatly disturbed and the performance would be degraded. Therefore, by independently writing the operand of the L instruction to the IGPR and calculating the operand address of the A instruction using the IGPR, the disturbance of the pipeline can be suppressed.
この様な先行演算器とIGPRを有する情報処理装置にお
いて、前述したようなメモリと命令バツフアの不一致が
生じた場合、演算ユニツトの実行を抑止するほかに、IG
PRとGGPRとの内容が一致していないと、後続命令の演算
に矛盾が生じるため、IGPRとGGPRの一致保証を行う必要
がある。このため、前述の従来技術では、前記第1の検
出は、例えば、ストア命令が演算ユニツト内で実行され
ストア・リクエストが出される時点で、ストア・アドレ
スと命令バツフア内に取込まれている命令のアドレスと
を比較することにより行なわれている。In the information processing device having such a preceding arithmetic unit and IGPR, when the above-mentioned mismatch between the memory and the instruction buffer occurs, the execution of the arithmetic unit is suppressed and the IG
If the contents of PR and GGPR do not match, the operation of the subsequent instruction will be inconsistent, so it is necessary to guarantee the match of IGPR and GGPR. Therefore, in the above-mentioned conventional technique, the first detection is performed by, for example, executing the store instruction in the arithmetic unit and issuing the store request, the instruction taken in the store address and the instruction buffer. It is done by comparing with the address of.
また、前記第2の検出は、例えば、命令が実行待ちキ
ユーから取出され、演算ユニツトで実行されようとする
ときに同期して該命令の命令アドレスを求め、予め第1
の検出の結果により保持されているメモリ上で変更され
た命令のアドレスと比較することにより行なわれてい
る。In the second detection, for example, when the instruction is fetched from the execution wait queue and is about to be executed by the arithmetic unit, the instruction address of the instruction is obtained in synchronization with the first detection in advance.
It is performed by comparing with the address of the instruction changed on the memory held by the result of the detection.
前記従来技術は、第1、第2の検出が演算ユニツトで
の実行ステージに同期して行なわれるため、これらの検
出結果により汎用レジスタIGPRを用いる先行演算を抑止
することができないという問題点を有する。例えば、ス
トア命令が直後の命令を変更するとき、第1の検出がス
トア命令の実行ステージで行なわれるため、変更される
命令の処理は、先行演算を含めて始められているので、
この先行演算を抑止することができない。The above-mentioned conventional technique has a problem that the first and second detections are performed in synchronization with the execution stage in the operation unit, and therefore the preceding operation using the general-purpose register IGPR cannot be suppressed by these detection results. . For example, when the store instruction modifies the immediately following instruction, since the first detection is performed in the execution stage of the store instruction, the processing of the modified instruction is started including the preceding operation.
This preceding calculation cannot be suppressed.
また、前記従来技術は、第1の検出が充分早く行なわ
れていても、第2の検出も同様に命令の実行ステージで
行なわれるため、第2の検出の結果、該命令がメモリ上
で変更されていることが認識されても、該命令の先行演
算を抑止することができないという問題点を有する。こ
のためメモリ上で変更される命令が汎用レジスタへの書
込みを行なう場合、演算ユニツトは、その実行が抑止さ
れるためGGPRへの書込みを行なわないが、先行演算は抑
止されずIGPRへの書込みが行なわれてしまい、GGPRとIG
PRの内容に矛盾が生じてしまう。そこで、前記従来技術
は、このような場合、第2の検出の結果により命令がメ
モリ上で変更されていることが認識されるとIGPRの内容
を該命令の先行演算実行前の内容に戻すため、GGPRから
IGPRへコピーが行なわれ、このコピーに要する手間が大
きくその性能の向上が困難であるという問題点を有す
る。Further, in the above-mentioned conventional technique, even if the first detection is performed sufficiently early, the second detection is also performed in the instruction execution stage in the same manner. Therefore, as a result of the second detection, the instruction is changed in the memory. However, even if it is recognized that the preceding operation of the instruction cannot be suppressed. Therefore, when the instruction changed in memory writes to a general-purpose register, the operation unit does not write to GGPR because its execution is suppressed, but the preceding operation is not suppressed and writing to IGPR does not occur. It was done, GGPR and IG
Contradiction occurs in the contents of PR. Therefore, in the above-mentioned conventional technique, in such a case, when the result of the second detection recognizes that the instruction is changed in the memory, the content of IGPR is returned to the content before the execution of the preceding operation of the instruction. , From GGPR
Copying is performed on the IGPR, and there is a problem that it is difficult to improve the performance because of a lot of labor required for the copying.
本発明の目的は、前記従来技術の問題点を解決し、命
令バツフアに取込まれた命令が先行するストア命令によ
りメモリ上で変更された場合、該命令の処理において先
行演算を抑止し、IGPRへの書込みを行なわないようにす
ることにより、IGPRとGGPRの内容の一致を保証し、上記
のメモリと命令バツフアの内容が不一致となつたときの
処理のオーバヘツドを小さくし、なおかつ誤検出による
処理のオーバヘツドが発生しないようにした、高性能の
情報処理装置を提供することにある。An object of the present invention is to solve the above-mentioned problems of the prior art, and when an instruction fetched by an instruction buffer is changed in memory by a preceding store instruction, the preceding operation is suppressed in the processing of the instruction, and the IGPR By ensuring that the contents of IGPR and GGPR do not match, the overhead of processing when the contents of the above memory and instruction buffer do not match is reduced, and processing due to false detection is also performed. It is to provide a high-performance information processing device in which the above-mentioned overhead does not occur.
本発明によれば、前記目的は、第1および第2の検出
を先行演算に同期して行なうことにより、達成される。
そして、第1の検出を、後続の命令を変更するストア命
令からみると、検出の対象は、ストア命令がメモリから
読出されてから、演算ユニツトにおいてストア動作が終
了するまでの間に行なわれる命令読出しであるので、本
発明では第1の検出をストア命令が読出されてからデコ
ードされるまでの検出(これを第1−Aの検出と呼ぶ)
とストア命令がデコードされてからストア動作が終了す
るまでの検出(これを第1−Bの検出と呼ぶ)とに分け
て行なう。According to the invention, the object is achieved by performing the first and second detections in synchronism with the preceding operation.
When the first detection is viewed from the store instruction that modifies the subsequent instruction, the detection target is the instruction that is performed after the store instruction is read from the memory and before the store operation is completed in the arithmetic unit. Since this is a read operation, in the present invention, the first detection is the detection from the reading of the store instruction to the decoding (this is called the 1-Ath detection).
And detection from the decoding of the store instruction to the end of the store operation (this is called 1-B detection).
前記第1−Aの検出は、ストア命令がデコードされた
とき、該ストア・アドレスと命令バツフアに取込まれた
命令のアドレスとを比較することにより行なうことがで
きる。The 1-Ath detection can be performed by comparing the store address with the address of the instruction fetched into the instruction buffer when the store instruction is decoded.
第1−Bの検出は、ストア命令がデコードされてから
ストア動作が終了するまでストア・アドレスを保持し、
命令読出し要求が出たときに読出しアドレスと保持され
ているストア・アドレス(複数のストア・アドレスが保
持されていることもある)とを比較することにより行な
うことができる。The 1-Bth detection holds the store address until the store operation is completed after the store instruction is decoded,
This can be done by comparing the read address and the stored store address (there may be a plurality of stored addresses) when an instruction read request is issued.
第1−A、第1−Bの検出結果により、後続の命令を
変更するストア命令のストア・アドレスは、命令バツフ
アに付随してそれぞれ保持される。According to the 1-A-th and 1-B-th detection results, the store address of the store instruction that changes the subsequent instruction is held in association with the instruction buffer.
第2の検出は、命令のデコードに同期して該命令のア
ドレスを求め、前記保持されているストア・アドレスと
比較することにより行なうことができる。The second detection can be performed by obtaining the address of the instruction in synchronization with the decoding of the instruction and comparing it with the stored store address.
第2の検出の結果により、該命令がメモリ上で変更さ
れることが認識でき、先行演算を抑止し、IGPRへの書込
みを防ぐことが可能となる。From the result of the second detection, it can be recognized that the instruction is changed in the memory, the preceding operation can be suppressed, and the writing to the IGPR can be prevented.
また、第2の検出の結果をフラグとして実行待ち命令
キユーに付随して保持し、キユーから命令を取出し演算
ユニツトで実行しようとするときに、このフラグにより
該命令がメモリ上で変更されていることを認識でき、こ
れにより、演算ユニツトの実行を抑止し、命令バツフア
を無効化して変更された命令からの命令読出しのやり直
しを行なうことができる。Further, the result of the second detection is held as a flag in association with the execution-waiting instruction queue, and when the instruction is fetched from the queue and is to be executed in the arithmetic unit, the instruction changes it on the memory. Therefore, it is possible to suppress the execution of the operation unit, invalidate the instruction buffer, and redo the instruction read from the changed instruction.
以下、本発明による情報処理装置の一実施例を図面に
より詳細に説明する。An embodiment of an information processing apparatus according to the present invention will be described below in detail with reference to the drawings.
第1図は本発明の一実施例であり本発明に関する部分
のみを示すブロツク図、第2図は第1図における検出回
路1の詳細を示すブロツク図、第3図は第1図における
検出回路2の詳細を示すブロツク図、第4図は第1図〜
第3図におけるアドレス比較回路の詳細なブロツク図で
ある。第1図〜第4図において、1,2は検出回路、3,4,1
4〜17,24,30,31はアドレス比較回路、5はORゲート、6
はキユー、7〜9,22,27〜29,36はセレクタ、10,11,20,2
1,25,26,34,35はレジスタ、12,13は加算器、18,19,32,3
3,39はANDゲート、23はストア・キユーである。1 is an embodiment of the present invention and is a block diagram showing only the portion related to the present invention, FIG. 2 is a block diagram showing the details of the detection circuit 1 in FIG. 1, and FIG. 3 is a detection circuit in FIG. 2 is a block diagram showing the details of FIG. 2, FIG.
FIG. 4 is a detailed block diagram of the address comparison circuit in FIG. 3. 1 to 4, 1 and 2 are detection circuits and 3,4 and 1
4 to 17, 24, 30, 31 are address comparison circuits, 5 is an OR gate, 6
Is KYU, 7-9,22,27-29,36 is selector, 10,11,20,2
1,25,26,34,35 are registers, 12,13 are adders, 18,19,32,3
3,39 are AND gates, and 23 is store queuing.
本発明による情報処理装置の一実施例は、第1図に示
すように、命令バツフアに取込まれた命令がメモリ上で
変更されたことを検出し、その結果を保持する第1の検
出を行う2つの検出回路1及び2と、命令を演算ユニツ
トで実行しようとするとき、その命令がメモリ上で変更
されているか否かを検出する第2の検出を行う2つのア
ドレス比較回路3,4と、これらの比較回路3,4の結果の論
理和を行うORゲートと、その出力を保持する実行待ち命
令キユーに対応するキユー6と、このキユー6の中から
演算ユニツトで実行されようとする命令に対応する要素
を選択するセレクタ7とにより構成されている。One embodiment of the information processing apparatus according to the present invention detects, as shown in FIG. 1, that the instruction fetched by the instruction buffer is changed in the memory and carries out the first detection for holding the result. Two detection circuits 1 and 2 to be performed, and two address comparison circuits 3 and 4 for performing a second detection for detecting whether or not the instruction is changed in the memory when the instruction is executed in the arithmetic unit. And an OR gate that performs the logical sum of the results of these comparison circuits 3 and 4, a queue 6 that corresponds to the queued execution instruction that holds the output, and an operation unit to be executed from this queue 6. The selector 7 selects an element corresponding to the instruction.
次に、このように構成された第1図に示す実施例の動
作を説明する。Next, the operation of the embodiment shown in FIG. 1 configured as described above will be described.
先行するストア命令がデコードされ、ストア命令の先
頭/終了アドレス(SSA/SEA)が求められると前記第1
−Aの検出を行う回路である検出回路1は、既に命令バ
ツフアに取込まれている後続する命令の先頭/終了アド
レスとストア命令の先頭/終了アドレス(SSA/SEA)と
を比較する。この結果、前記先行するストア命令が後続
の命令を変更することを検出すると、検出回路1は、そ
のストア・アドレスを内部に保持し、アドレス比較回路
3に出力する。When the preceding store instruction is decoded and the start / end address (SSA / SEA) of the store instruction is obtained, the first
The detection circuit 1, which is a circuit for detecting -A, compares the start / end address of the succeeding instruction that has already been taken into the instruction buffer with the start / end address (SSA / SEA) of the store instruction. As a result, when it is detected that the preceding store instruction modifies the succeeding instruction, the detection circuit 1 internally holds the store address and outputs it to the address comparison circuit 3.
後続の命令による命令読出し要求が出され、命令読出
しの先頭/終了アドレス(iSA/iEA)が求められると、
前記第1−Bの検出を行う回路である検出回路2は、実
行中または実行待ちのストア命令のストアする先頭/終
了アドレスと前記命令読出しの先頭/終了アドレス(iS
A/iEA)とを比較する。この結果、読出そうとする命令
が先行するストア命令により変更されることが検出され
ると、該ストア・アドレスは、ストア動作終了後も検出
回路2内に保持される。検出回路2は、実行中または実
行待ちのストア命令のストア・アドレスおよび前記保持
されたアドレスを出力する。When an instruction read request is issued by a subsequent instruction and the start / end address (iSA / iEA) of instruction read is calculated,
The detection circuit 2, which is a circuit for performing the 1-B detection, stores the start / end address of a store instruction being executed or waiting for execution and the start / end address of the instruction read (iS
A / iEA). As a result, when it is detected that the instruction to be read is changed by the preceding store instruction, the store address is held in the detection circuit 2 even after the end of the store operation. The detection circuit 2 outputs the store address of the store instruction being executed or waiting for execution and the held address.
命令がデコードされ、命令の先頭/終了アドレス(DS
A/DEA)が求められると、アドレス比較回路3は、検出
回路1の検出結果により保持されたストア・アドレスと
前記命令の先頭/終了アドレス(DSA/DEA)とを比較す
る。また、アドレス比較回路4は、検出回路2の検出結
果により保持されたストア・アドレスおよび実行中また
は実行待ちのストア命令のストア・アドレスと前記命令
の先頭/終了アドレス(DSA/DEA)とを比較する。アド
レス比較回路3,4の出力は、ORゲート5でORがとられ、
該デコードされた命令が先行するストア命令によりメモ
リ上で変更されているかどうかが検出される。変更され
ている場合には、ORゲート5の出力により、該デコード
された命令の先行演算を抑止し、汎用レジスタIGPRへ書
込みを行なわないようにする。また、ORゲート5の出力
は、実行待ち命令キユーに対応して、キユー6に格納さ
れる。演算ユニツトで命令を実行しようとするときに、
セレクタ7により、前記検出結果が選択され、該命令が
メモリ上で変更されていることが認識されると、演算ユ
ニツトの実行が抑止され、命令バツフアを無効化し、変
更された命令以降の読出しをやり直す。The instruction is decoded and the instruction start / end address (DS
A / DEA), the address comparison circuit 3 compares the store address held by the detection result of the detection circuit 1 with the start / end address (DSA / DEA) of the instruction. The address comparison circuit 4 also compares the store address held by the detection result of the detection circuit 2 and the store address of a store instruction being executed or waiting with the start / end address (DSA / DEA) of the instruction. To do. The outputs of the address comparison circuits 3 and 4 are ORed by the OR gate 5,
It is detected whether the decoded instruction has been modified in memory by the preceding store instruction. If it is changed, the output of the OR gate 5 inhibits the preceding operation of the decoded instruction and prevents the general register IGPR from being written. The output of the OR gate 5 is stored in the queue 6 corresponding to the queued instruction queue. When trying to execute an instruction in the arithmetic unit,
When the selector 7 selects the detection result and recognizes that the instruction is changed in the memory, the execution of the operation unit is suppressed, the instruction buffer is invalidated, and the read operation after the changed instruction is performed. Start over.
第2図に示す検出回路1の詳細図において、セレクタ
8,9は、命令バツフアが起動されるときは命令アドレス
側を、それ以外のときは加算器12,13の出力を選択す
る。レジスタ10,11は、命令バツフアに取込まれている
命令の先頭/終了アドレス(iBSA*/iBEA*,*=0,1)
を格納するレジスタである。命令バツフアは、2組有
り、一方は実行されている命令の後続命令列を格納し、
もう一方は分岐命令の分岐先命令列を格納する。加算器
12,13は、命令が命令バツフアから取出され、デコード
されるごとにレジスタ10,11のうちどちらか対応する方
の先頭アドレスを命令長だけ増加させる。アドレス比較
回路14,16は、ストア命令のストア・アドレスと命令バ
ツフアに取込まれている命令のアドレスとを比較する。
アドレス比較回路15,17は、ストアの先頭アドレスが、
レジスタ20,21に保持されている先頭アドレスより小さ
いかどうか比較する。レジスタ20,21は、それぞれの命
令バツフア中の命令を変更するストア命令のストア・ア
ドレスを保持するレジスタであり、セレクタ22は、現在
デコードされている命令バツフア側を選択する。In the detailed diagram of the detection circuit 1 shown in FIG.
8 and 9 select the instruction address side when the instruction buffer is activated, and select the outputs of the adders 12 and 13 at other times. Registers 10 and 11 are the start / end addresses (iBSA * / iBEA *, * = 0,1) of the instruction fetched in the instruction buffer.
Is a register for storing There are two sets of instruction buffers, one stores the subsequent instruction sequence of the instruction being executed,
The other stores the branch destination instruction sequence of the branch instruction. Adder
12 and 13 increase the start address of the register 10 or 11 corresponding to each instruction by the instruction length each time the instruction is fetched from the instruction buffer and decoded. The address comparison circuits 14 and 16 compare the store address of the store instruction with the address of the instruction fetched by the instruction buffer.
In the address comparison circuits 15 and 17, the start address of the store is
It is compared whether it is smaller than the first address held in the registers 20 and 21. Registers 20 and 21 are registers that hold the store address of a store instruction that changes the instruction in each instruction buffer, and the selector 22 selects the currently decoded instruction buffer side.
以下、第2図に示す検出回路1の動作を説明する。 The operation of the detection circuit 1 shown in FIG. 2 will be described below.
命令読出し要求が出され、その先頭/終了アドレス
(iSA/iEA)が求められると、該命令読出しが命令バツ
フアを新たに起動するものであれば先頭/終了アドレス
(iSA/iEA)の両方が、そうでなければ終了アドレス(i
EA)のみが、命令読出し要求のでた命令バツフアに対応
してレジスタ10あるいは11に保持される。When an instruction read request is issued and the start / end address (iSA / iEA) is requested, if the instruction read newly activates the instruction buffer, both the start / end address (iSA / iEA) are Otherwise, the end address (i
EA) is held in the register 10 or 11 in response to the instruction buffer that issued the instruction read request.
ストア命令がデコードされ、ストアする先頭/終了ア
ドレス(SSA/SEA)が求められると、アドレス比較回路1
4,16は、レジスタ10,11に保持されているアドレスと前
記ストアする先頭/終了アドレス(SSA/SEA)とを比較
し該ストア命令がそれぞれの命令バツフア中の命令を変
更するかどうか検出する。また、アドレス比較回路15,1
7は、ストアの先頭アドレス(SSA)がレジスタ20,21に
保持されている先頭アドレスより小さいかどうか検出す
る。このとき、アドレス比較回路は、レジスタ20,21に
アドレスが保持されていないときは真を出力する。AND
ゲート18,19でこれらの比較結果をANDすることにより、
該ストア命令が、既に保持されているアドレスより小さ
いアドレスで命令バツフア中の命令を変更するときに、
そのストア・アドレスをレジスタ20,21に保持する。When the store instruction is decoded and the start / end address (SSA / SEA) to store is determined, the address comparison circuit 1
Reference numerals 4 and 16 compare the address held in the registers 10 and 11 with the start / end address (SSA / SEA) to be stored to detect whether or not the store instruction modifies the instruction in each instruction buffer. . In addition, the address comparison circuit 15,1
7 detects whether or not the start address (SSA) of the store is smaller than the start address held in the registers 20 and 21. At this time, the address comparison circuit outputs true when the address is not held in the registers 20 and 21. AND
By ANDing these comparison results at gates 18 and 19,
When the store instruction changes the instruction in the instruction buffer with an address smaller than the address already held,
The store address is held in the registers 20 and 21.
一般に、命令は、小さいアドレスより順に実行される
ので、ストアの先頭アドレスがすでにレジスタ20,21に
保持されているアドレスより小さい場合、レジスタ20,2
1内のストア・アドレスに優先して、小さい方のストア
・アドレスをレジスタ20,21に保持させる必要があり、
前述のようなアドレス比較処理が行われる。In general, instructions are executed in order from the smallest address, so if the start address of the store is smaller than the address already held in registers 20,21, register 20,2
It is necessary to store the smaller store address in registers 20 and 21 in preference to the store address in 1.
The address comparison processing as described above is performed.
レジスタ20,21に保持されたストア・アドレスは、セ
レクタ22において、現在デコードされている命令バツフ
ア側が選択され出力される。The store address held in the registers 20 and 21 is selected and output by the selector 22 on the side of the instruction buffer currently being decoded.
第3図に示す検出回路2の詳細図において、ストア・
キユー23は、実行中または実行待ちのストア命令のスト
ア・アドレスをストア動作が終了するまで保持する。ア
ドレス比較回路24は、ストア・キユーに保持されている
ストアの先頭/終了アドレス(SQSA/SQEA)と命令読出
しアドレス(iSA/iEA)とを比較し、レジスタ25,26は、
このアドレス比較回路24の結果を、命令読出しの出され
た命令バツフアに対応して保持する。セレクタ27,28,29
は、ストア動作の終了したストア命令の検出結果または
ストア・アドレスを選択する。アドレス比較回路30,31
は、セレクタ29の出力の先頭アドレスが、レジスタ34,3
5の先頭アドレスより小さいかどうか検出する。レジス
タ34,35は、後続の命令を変更するストア命令のストア
・アドレスを、ストア動作終了後に保持し、セレクタ36
は、レジスタ34,35に保持されているアドレスの内、現
在デコードされている命令バツフアに対応する側を選択
する。In the detailed diagram of the detection circuit 2 shown in FIG.
The queue 23 holds the store address of the store instruction being executed or awaiting execution until the store operation is completed. The address comparison circuit 24 compares the start / end address (SQSA / SQEA) of the store held in the store queue with the instruction read address (iSA / iEA), and the registers 25 and 26:
The result of the address comparison circuit 24 is held in correspondence with the instruction buffer from which the instruction is read. Selector 27,28,29
Selects the detection result or store address of the store instruction for which the store operation has ended. Address comparison circuit 30, 31
Indicates that the start address of the output of the selector 29 is
It is detected whether it is smaller than the start address of 5. Registers 34 and 35 hold the store address of the store instruction that modifies the subsequent instruction after the store operation is completed, and the selector 36
Selects the side corresponding to the currently decoded instruction buffer from the addresses held in the registers 34 and 35.
次に第3図に示す検出回路2の動作を説明する。 Next, the operation of the detection circuit 2 shown in FIG. 3 will be described.
ストア命令がデコードされ、ストアする先頭/終了ア
ドレス(SSA/SEA)が求まると、このストアする先頭/
終了アドレス(SSA/SEA)は、ストア動作が終了するま
でストア・キユー23に保持される。When the store instruction is decoded and the start / end address (SSA / SEA) to store is found, the start / end address to store
The end address (SSA / SEA) is held in the store queue 23 until the store operation is completed.
命令読出し要求が出され、命令読出しの先頭/終了ア
ドレス(iSA/iEA)が求まると、アドレス比較回路24
は、ストア・キユー23に保持されているストア・アドレ
スと前記命令読出しの先頭/終了アドレス(iSA/iEA)
との比較を行う。この結果、読出そうとする命令が、ス
トア・キユー23に保持されている先行するストア命令に
より変更されることが検出される。この検出結果は、ス
トア・キユー23に対応して、レジスタ25,26の内、命令
読出しが出された命令バツフア側に保持される。When an instruction read request is issued and the start / end address (iSA / iEA) of instruction read is found, the address comparison circuit 24
Is the store address held in the store queue 23 and the start / end address of the instruction read (iSA / iEA)
Compare with. As a result, it is detected that the instruction to be read is modified by the preceding store instruction held in the store queue 23. The detection result is held in the register buffer 25, 26 corresponding to the store queue 23 on the side of the instruction buffer where the instruction read is issued.
ストア命令の動作が終了すると、セレクタ27,28,29
は、該ストア命令に対応して前記検出結果及びストア・
アドレスを選択する。アドレス比較回路30,31は、セレ
クタ29の出力の先頭アドレスがレジスタ34,35に保持さ
れている先頭アドレスより小さいかどうか検出する。こ
のとき、アドレス比較回路30,31は、レジスタ34,35にア
ドレスが保持されていないと真を出力する。ANDゲート3
2,33は、レジスタ25,26に保持されているアドレス比較
回路24の比較結果と、アドレス比較回路30,31の比較結
果とのANDをとることにより、前記ストア命令が、レジ
スタ34,35に保持されているアドレスより小さいアドレ
スで、命令バツフア中の命令を変更する場合に、そのス
トア・アドレスをレジスタ34,35に保持させる。レジス
タ34,35に保持されたストア・アドレスは、セレクタ36
により、現在デコードされている命令バツフア側が選択
されて出力される。When the operation of the store instruction is completed, the selector 27,28,29
Corresponds to the detection result and the store
Select an address. The address comparison circuits 30 and 31 detect whether or not the start address of the output of the selector 29 is smaller than the start address held in the registers 34 and 35. At this time, the address comparison circuits 30 and 31 output true if the addresses are not held in the registers 34 and 35. AND gate 3
2, 33 ANDs the comparison result of the address comparison circuit 24 held in the registers 25, 26 with the comparison result of the address comparison circuits 30, 31, so that the store instruction is stored in the registers 34, 35. When changing the instruction in the instruction buffer with an address smaller than the held address, the store address is held in the registers 34 and 35. The store address held in the registers 34 and 35 is the selector 36
As a result, the currently decoded instruction buffer side is selected and output.
前述した第1図〜第3図におけるアドレス比較回路3,
4,14,16,24は、第4図に示すように、2つの大小比較器
37,38とANDゲート39により構成される。The address comparison circuit 3 in FIGS. 1 to 3 described above,
4,14,16,24 are two large and small comparators as shown in FIG.
It is composed of 37, 38 and an AND gate 39.
比較器37は、ストアの終了アドレスが命令の先頭アド
レスより大きいことを検出し、比較器38は、ストアの先
頭アドレスが命令の終了アドレスより小さいことを検出
する。そして、ANDゲート39は、これらの検出結果をAND
することにより、ストア命令が命令アドレスに対してス
トアを行うことを示す検出信号を出力する。The comparator 37 detects that the end address of the store is larger than the start address of the instruction, and the comparator 38 detects that the start address of the store is smaller than the end address of the instruction. Then, the AND gate 39 ANDs these detection results.
By doing so, a detection signal indicating that the store instruction stores to the instruction address is output.
前述したように、本発明の一実施例は、ストア命令が
デコードされたとき、後続の命令の変更を検出(第1−
Aの検出)する第1の手段、命令読出要求がでたとき、
実行中または実行待ちのストア命令により読出す命令の
変更を検出(第1−Bの検出)する第2の手段、後続す
る命令を変更するストア命令のストア・アドレスを保持
するレジスタ20,21,34,35による第1、第2手段内に備
えた第3の手段、命令がデコードされたとき、該命令が
変更されることを検出するアドレス比較回路3,4による
第4の手段、第4の手段の検出結果を保持するキユー6
による第5の手段を備えて構成されており、これによ
り、命令バツフアに取込まれている命令が、先行するス
トア命令により変更される場合に、先行演算を抑止し、
IGPRとGGPRの内容の一致を保証することを可能としてい
る。As described above, according to the embodiment of the present invention, when the store instruction is decoded, the change of the subsequent instruction is detected (first
The first means for detecting A), when an instruction read request is issued,
Second means for detecting a change in an instruction to be read by a store instruction which is being executed or is being executed (detection of 1-B), and registers 20, 21 for holding a store address of a store instruction for changing a subsequent instruction Third means provided in the first and second means by 34 and 35, fourth means and fourth means by address comparison circuits 3 and 4 which detect that the instruction is changed when the instruction is decoded. 6 that holds the detection results of the means
According to the fifth means of the above, by this, when the instruction fetched in the instruction buffer is changed by the preceding store instruction, the preceding operation is suppressed,
It is possible to guarantee that the contents of IGPR and GGPR match.
以上説明したように、本発明によれば、命令バツフア
に取込まれている命令が、先行するストア命令によりメ
モリ上で変更される場合に、変更された命令の先行演算
を抑止し、IGPRへの書込みを行なわないようにすること
ができる。この結果、GGPRをIGPRへコピーする必要がな
くなり、前記の場合の処理を簡潔かつ迅速に行なうこと
が可能となる。As described above, according to the present invention, when the instruction fetched by the instruction buffer is changed on the memory by the preceding store instruction, the preceding operation of the changed instruction is suppressed and the IGPR is executed. Can be prevented from being written. As a result, it is not necessary to copy GGPR to IGPR, and the processing in the above case can be performed simply and quickly.
第1図は本発明の一実施例を示し、本発明に関する部分
のみを示すブロツク図、第2図は第1図における検出回
路1の詳細を示すブロツク図、第3図は第1図における
検出回路2の詳細を示すブロツク図、第4図は第1図〜
第3図におけるアドレス比較回路の詳細なブロツク図で
ある。 1,2……検出回路、3,4,14〜17,24,30,31……アドレス比
較回路、5……ORゲート、6……キユー、7〜9,22,27
〜29,36……セレクタ、10,11,20,21,25,26,34,35……レ
ジスタ、12,13……加算器、18,19,32,33,39……ANDゲー
ト、23……ストア・キユー、37,38……大小比較器。FIG. 1 shows an embodiment of the present invention, a block diagram showing only a portion relating to the present invention, FIG. 2 is a block diagram showing details of the detection circuit 1 in FIG. 1, and FIG. 3 is a detection diagram in FIG. The block diagram showing the details of the circuit 2 is shown in FIG.
FIG. 4 is a detailed block diagram of the address comparison circuit in FIG. 3. 1,2 …… Detection circuit, 3,4,14 to 17,24,30,31 …… Address comparison circuit, 5 …… OR gate, 6 …… Kew, 7 ~ 9,22,27
~ 29,36 …… Selector, 10,11,20,21,25,26,34,35 …… Register, 12,13 …… Adder, 18,19,32,33,39 …… AND gate, 23 …… Store Kyu, 37,38 …… Comparison between large and small.
Claims (1)
て、複数の命令を同時に処理するパイプライン処理方式
の情報処理装置であつて、パイプラインの制御を行うユ
ニツト内に多くの命令の演算を処理できる先行演算器と
汎用レジスタIGPRとを備え、また、全ての命令の演算を
処理できるユニツト内に、前記汎用レジスタとは別個の
汎用レジスタGGPRを備える情報処置装置において、スト
ア命令がデコードされたとき、該ストア命令によりすで
に命令バツフアに取込まれている後続の命令が変更され
るか否かを検出する第1の手段と、命令読出し要求がで
たとき、先行する実行中または実行待ちのストア命令に
より読出す命令が変更されるか否かを検出する第2の手
段と、前記第1及び第2の手段の検出結果により、後続
する命令を変更するストア命令のストア・アドレスを、
命令バツフアに付随して保持する前記第1及び第2の手
段内に備えられる第3の手段と、命令がデコードされた
とき、該命令のアドレスと前記命令バツフアに付随して
保持されているストア・アドレスとを比較することによ
り該命令が先行するストア命令により変更されることを
検出する第4の手段と、前記第4の手段の検出結果を実
行待ち命令キユーに付随する情報として保持する第5の
手段とを備え、前記第4の手段による検出結果によりパ
イプラインの制御を行うユニツトの先行演算を抑止し、
前記汎用レジスタIGPRへの書込みを行わないようにする
とともに、命令がキユーから取出されたとき、前記第5
の手段に保持されている命令キユーに付随する情報によ
り、該命令が変更されていることを認識すると、演算ユ
ニツトの実行を抑止し、命令バツフアを無効化し、変更
された命令以降を読出すようにすることを特徴とする情
報処理装置。1. An information processing apparatus of a pipeline processing system in which instruction processing is divided into several stages and a plurality of instructions are processed simultaneously, and a large number of instructions are operated in a unit for controlling the pipeline. In the information processing device, the store instruction is decoded in the unit capable of processing the above-mentioned general-purpose register and the general-purpose register IGPR, and in the unit capable of processing the operations of all the instructions. Means for detecting whether or not the subsequent instruction already fetched to the instruction buffer is changed by the store instruction, and when the instruction read request is issued, the preceding executing or waiting execution Second means for detecting whether or not the instruction to be read is changed by the store instruction of the above, and a subsequent instruction is changed according to the detection results of the first and second means. The store address of the A instruction,
A third means provided in the first and second means for holding associated with the instruction buffer; an address of the instruction when the instruction is decoded and a store associated with the instruction buffer. Fourth means for detecting that the instruction is changed by the preceding store instruction by comparing the address, and holding the detection result of the fourth means as information associated with the execution wait instruction queue And means for suppressing the preceding operation of the unit for controlling the pipeline according to the detection result by the fourth means,
When not writing to the general-purpose register IGPR, and when the instruction is fetched from the queue,
When it is recognized that the instruction has been changed by the information attached to the instruction queue stored in the means, the execution of the arithmetic unit is suppressed, the instruction buffer is invalidated, and the instruction after the changed instruction is read. An information processing apparatus, characterized in that
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP31900887A JPH0812602B2 (en) | 1987-12-18 | 1987-12-18 | Information processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP31900887A JPH0812602B2 (en) | 1987-12-18 | 1987-12-18 | Information processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH01161533A JPH01161533A (en) | 1989-06-26 |
| JPH0812602B2 true JPH0812602B2 (en) | 1996-02-07 |
Family
ID=18105471
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP31900887A Expired - Lifetime JPH0812602B2 (en) | 1987-12-18 | 1987-12-18 | Information processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0812602B2 (en) |
-
1987
- 1987-12-18 JP JP31900887A patent/JPH0812602B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH01161533A (en) | 1989-06-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5377336A (en) | Improved method to prefetch load instruction data | |
| CN101681259A (en) | A system and method for using a local condition code register for accelerating conditional instruction execution in a pipeline processor | |
| US20010023479A1 (en) | Information processing unit, and exception processing method for specific application-purpose operation instruction | |
| JPH04321130A (en) | Branch estimating device | |
| JPH0812602B2 (en) | Information processing device | |
| JP3497087B2 (en) | Instruction control apparatus and method | |
| KR950000088B1 (en) | Data processing system | |
| JP2904624B2 (en) | Parallel processing unit | |
| JPH08212068A (en) | Information processing device | |
| JPH03119424A (en) | Information processing system and its device | |
| JP2503223B2 (en) | Prior control method | |
| JPH10154072A (en) | Pipeline processor | |
| JPH07219771A (en) | Instruction processor | |
| JP3493110B2 (en) | High-speed branch processing unit | |
| JP4049490B2 (en) | Information processing device | |
| JPH07225681A (en) | Interrupt control device | |
| JPH03100842A (en) | Information processor | |
| JPS6232507B2 (en) | ||
| JPH10254698A (en) | Information processing device | |
| JPH07319693A (en) | Pipeline processing method | |
| JPH06295264A (en) | Pipeline DAT mechanism | |
| JPH0247725A (en) | data processing equipment | |
| JPH02207328A (en) | Pipe line control system | |
| JPH0635699A (en) | Pipe-line control system | |
| JPS59158441A (en) | Pipeline control system |