JPH05224927A - Processor - Google Patents
ProcessorInfo
- Publication number
- JPH05224927A JPH05224927A JP4305700A JP30570092A JPH05224927A JP H05224927 A JPH05224927 A JP H05224927A JP 4305700 A JP4305700 A JP 4305700A JP 30570092 A JP30570092 A JP 30570092A JP H05224927 A JPH05224927 A JP H05224927A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- branch
- execution
- conditional branch
- sequence
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3802—Instruction prefetching
- G06F9/3804—Instruction prefetching for branches, e.g. hedging, branch folding
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Advance Control (AREA)
Abstract
(57)【要約】
【目的】 本発明は、条件分岐命令に対応する条件が確
定していない間、投機的に命令を処理し、インタ−ロッ
クが少なく、プログラムを高速に実行するプロセッサを
提供することを目的とする。
【構成】 命令解読部7が実行前の命令列に含まれる条
件分岐命令の種類を判別し、判別された命令の種類に応
じて、演算ユニット8〜11に対して、分岐先の命令列
及び/又は後続する命令列の命令を実行ユニットに対し
て投機実行として並列発行する。演算ユニット8〜11
にて陶器実行された結果は、演算ユニット管理テーブル
12に一時的に格納される。命令実行整合性維持回路1
8によって条件分岐命令の分岐の成否が判定されると、
実行順序管理回路17は、命令列の実行結果の有効無効
を識別し、有効な実行結果をレジスタファイル19に格
納する一方、無効な実行結果を実行順序管理バッファ1
3から消去する。
(57) [Summary] [Object] The present invention provides a processor that speculatively processes an instruction while a condition corresponding to a conditional branch instruction is not fixed, has a small interlock, and executes a program at high speed. The purpose is to do. The instruction decoding unit 7 determines the type of conditional branch instruction included in the instruction sequence before execution, and the instruction units of the branch destination and the instruction sequence of the branch destination are given to the arithmetic units 8 to 11 according to the determined type of instruction. / Or the instruction of the subsequent instruction sequence is issued in parallel to the execution unit as speculative execution. Arithmetic units 8-11
The result of performing the pottery is temporarily stored in the arithmetic unit management table 12. Instruction execution consistency maintaining circuit 1
When the success or failure of the conditional branch instruction is judged by 8,
The execution order management circuit 17 identifies whether the execution result of the instruction sequence is valid or invalid, stores the valid execution result in the register file 19, and invalidates the invalid execution result.
Erase from 3.
Description
【0001】[0001]
【産業上の利用分野】本発明は、並列実行可能な複数の
演算処理ユニットを有するプロセッサにおける条件分岐
命令の高速処理に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to high-speed processing of conditional branch instructions in a processor having a plurality of arithmetic processing units capable of parallel execution.
【0002】[0002]
【従来技術】近年、プロセッサにおける高性能化は、Su
perscalarやVLIWと呼ばれる複数の演算ユニットを用意
し、一度に複数命令を並列に実行する方式が採られるよ
うになってきた。これらの方式で商用化されたものに
は、MOTOROLA社のマイクロプロセッサMC88100等が知ら
れている(MOTOROLA社の「MC88100 MICROPROCESSOR U
SER'S MANUAL SECOND EDITION」に示されている)。
これらの方式を用いると、従来シーケンシャルに実行さ
れていた命令列が、複数の命令を一度に実行することが
可能となる。2. Description of the Related Art In recent years, high performance processors
A method of preparing multiple arithmetic units called perscalar or VLIW and executing multiple instructions at once in parallel has come to be adopted. Microcomputers such as the MC88100 manufactured by MOTOROLA are known as those commercialized by these methods (the MC88100 MICROPROCESSOR U manufactured by MOTOROLA).
SER'S MANUAL SECOND EDITION ").
By using these methods, it becomes possible for an instruction sequence that has been conventionally executed sequentially to execute a plurality of instructions at once.
【0003】また、命令の実行順序に関して、命令列の
並ぶ順に実行するのではなく、データの依存関係がない
命令については実行可能なものから実行する、すなわち
out-of-order実行という高速化方法も知られている。こ
れらの高速化技法については信学技報CPSY-90-54('90.
7)「SIMP(単一命令流/多重命令パイプライン)方式
に基づくスーパースカラ・プロセッサの改良方針」
(「An Extended Superscalar Processor Prototype Ba
sed on the SIMP (Sngle Instruction stream/Multipl
e instruction Pipelining) Architecture」)に示さ
れている。Regarding the order of execution of the instructions, the instructions are not executed in the order in which the instruction strings are arranged, but the instructions having no data dependency are executed from the executable one, that is,
A speed-up method called out-of-order execution is also known. For information on these speed-up techniques, see IEICE Technical Report CPSY-90-54 ('90.
7) "Improvement policy of superscalar processor based on SIMP (single instruction stream / multiple instruction pipeline) method"
(`` An Extended Superscalar Processor Prototype Ba
sed on the SIMP (Sngle Instruction stream / Multipl
e instruction Pipelining) Architecture ").
【0004】上記従来技術のプロセッサは、条件分岐命
令の分岐が確定していなくても、どちらに分岐するかを
予測して、先行的に命令を実行(投機的実行と呼ぶ)す
ることにより、高速化を図っていた。予測の方法は、例
えば、以前出現したものと同じ条件分岐命令は前回と同
じ側に分岐すると予測する、などがある。The processor of the prior art described above predicts which branch the conditional branch instruction will branch to, and executes the instruction in advance (called speculative execution) even if the branch of the conditional branch instruction is not fixed. It was trying to speed up. The prediction method includes, for example, predicting that the same conditional branch instruction that has appeared previously will branch to the same side as the previous one.
【0005】[0005]
【発明が解決しようとする課題】しかしながら、上記の
ような従来技術によれば、以下のような問題点を有して
いた。一般に、複数の命令が同時に実行されるようにな
ると、処理サイクルあたりの分岐命令の出現頻度が増え
る。条件分岐命令の場合には、条件が確定(通常はPS
R:Program Status Registerの変更)するまで分岐す
るか否かは決定できない。このため条件分岐命令毎に命
令流がインターロックされてしまい、性能が頭打ちの状
態になる。(これら分岐による依存関係を制御依存と呼
ぶ) また、分岐するかしないかを予測して、先行的に命令を
処理(投機的実行と呼ぶ)する方法では、個々の条件分
岐命令に関しては、予測が当たった場合は高速化が達成
されるが、予測が外れた場合はもう一方の命令列に戻っ
て命令の実行をやり直すことになり、その代償が大き
い。さらに、プログラム全体の実行に関しては、必ずし
も高速化が達成されるとは限らない。However, according to the above conventional technique, there are the following problems. Generally, when a plurality of instructions are executed simultaneously, the frequency of occurrence of branch instructions per processing cycle increases. In the case of a conditional branch instruction, the condition is fixed (usually PS
It cannot be decided whether or not to branch until R: Program Status Register is changed). For this reason, the instruction flow is interlocked for each conditional branch instruction, and the performance reaches a level. (The dependency relationship due to these branches is called control dependence.) In addition, in the method of predicting whether to branch or not and processing the instruction in advance (called speculative execution), the prediction is performed for each conditional branch instruction. When hits, the speedup is achieved, but when the prediction is wrong, the instruction sequence is returned to the other instruction sequence and the instruction is re-executed. Furthermore, speeding up of execution of the entire program is not always achieved.
【0006】本発明の目的は、条件分岐命令に対応する
条件が確定していなくても投機的に命令を処理し、イン
タ−ロックが少なく、プログラムを高速に実行するプロ
セッサを提供することにある。An object of the present invention is to provide a processor which speculatively processes an instruction even if the condition corresponding to the conditional branch instruction is not fixed, has a small interlock, and executes a program at high speed. ..
【0007】[0007]
【課題を解決するための手段】上記の課題を解決するた
め、本発明のプロセッサは、複数の実行ユニットを有
し、メモリにある命令列の命令を並列に処理するプロッ
セサであって、実行前の命令列に含まれ、条件が他の命
令に依存する条件分岐命令の種別を判別する命令種別判
別手段と、分岐の成否が決定されるまでの間、条件分岐
命令の種類に応じて、実行ユニットに対して、分岐先の
命令列及び/又は後続する命令列の命令を実行ユニット
に対して並列発行する命令並列発行手段と、前記条件分
岐が依存する他の命令が実行されたとき、条件分岐命令
の分岐の成否を判定する分岐判定手段と、条件分岐命令
の分岐の成否の判定結果によって、命令列の実行結果の
有効無効を識別する実行結果管理手段とを備えている。In order to solve the above problems, a processor of the present invention is a processor which has a plurality of execution units and which processes instructions of an instruction sequence in a memory in parallel. Of the conditional branch instruction included in the instruction sequence of No. 1, which determines the type of the conditional branch instruction whose condition depends on another instruction, and the execution depending on the type of the conditional branch instruction until the success or failure of the branch is determined. An instruction parallel issue means for issuing a branch destination instruction sequence and / or a subsequent instruction sequence instruction to the execution unit in parallel to the unit, and a condition when another instruction on which the conditional branch depends is executed. A branch determination unit that determines whether or not the branch of the branch instruction is successful, and an execution result management unit that determines whether the execution result of the instruction sequence is valid or invalid based on the result of the success or failure of the branch of the conditional branch instruction.
【0008】前記命令種別判別手段は、分岐する確率が
分岐しない確率と同程度の第1の種類の命令と、 それ
以外の分岐命令とを判別し、前記命令発行並列手段は、
条件分岐命令が第1の種類の命令であった場合、分岐先
の命令列と条件分岐命令に後続する命令列の双方を実行
ユニットに対して並列発行し、条件分岐命令が第1の種
類の命令以外の命令であった場合、どちらか一方を実行
ユニットに対して並列発行し、前記実行結果管理手段
は、条件分岐命令が第1の種類の命令であった場合、分
岐の成否の判定結果によって、一方の命令列の実行結果
を有効にし、他方を無効にする一方、条件分岐命令が第
1の種類の命令以外の場合、分岐の成否の判定結果に応
じて命令列の実行結果の全てを有効又は無効にするよう
な構成であってもよい。The instruction type discriminating means discriminates between a first type instruction whose branch probability is about the same as a non-branch probability and a branch instruction other than that, and the instruction issuing parallel means
When the conditional branch instruction is the first type instruction, both the branch target instruction sequence and the instruction sequence subsequent to the conditional branch instruction are issued in parallel to the execution unit, and the conditional branch instruction is the first type instruction. If the instruction is an instruction other than the instruction, one of them is issued in parallel to the execution unit, and the execution result management means determines whether or not the branch is successful if the conditional branch instruction is the instruction of the first type. According to the decision result of the success or failure of the branch, if the conditional branch instruction is other than the instruction of the first type, all the execution results of the instruction sequence are made valid while the execution result of one instruction sequence is made valid and the other is invalidated. May be enabled or disabled.
【0009】前記命令種別判別手段は、第1の分岐命令
以外の命令を、第1の分岐命令より分岐する確率が高い
第2の種類の命令と、第1の分岐命令より分岐しない確
率が高い第3の種類の命令とに判別し、前記命令並列発
行手段は、第2の種類の命令の場合、分岐先の命令列の
命令を実行ユニットに対して並列発行し、第3の種類の
命令の場合、条件分岐命令に後続する命令列の命令を実
行ユニットに並列発行するようなこうせいであってもよ
い。The instruction type discrimination means has a high probability of branching an instruction other than the first branch instruction from the first branch instruction and a second branch instruction having a higher probability of branching than the first branch instruction. In the case of the second type instruction, the instruction parallel issue means issues the instruction of the branch destination instruction sequence in parallel to the execution unit, and determines the third type instruction. In this case, the instruction of the instruction sequence following the conditional branch instruction may be issued in parallel to the execution unit.
【0010】前記のプロセッサは、さらに条件分岐命令
に後続する命令列の命令を一時的に記憶する第1の命令
フェッチバッファと、条件分岐命令の分岐先の命令列の
命令を一時的に記憶する第2の命令フェッチバッファ
と、メモリに格納された命令を読み出し、第1及び第2
の命令フェッチバッファに格納する命令フェッチ手段と
を備えていてもよい。The processor further temporarily stores a first instruction fetch buffer for temporarily storing an instruction of an instruction sequence subsequent to the conditional branch instruction and an instruction of an instruction sequence of a branch destination of the conditional branch instruction. The second instruction fetch buffer and the instruction stored in the memory are read, and the first and second instructions are fetched.
And an instruction fetch means for storing the instruction in the instruction fetch buffer.
【0011】前記命令フェッチ手段は、メモリに読み出
しアドレスを出力し、その内容をインクリメントするプ
ログラムカウンタと、メモリから読みだされた命令から
条件分岐命令を検出する条件分岐命令検出手段と、条件
分岐命令検出手段で検出された条件分岐命令に基づい
て、分岐先のアドレスを計算する演算手段と、通常、メ
モリから命令が読みだされるごとにプログラムカウンタ
の内容をインクリメントしていき第1の命令フェッチバ
ッファに命令を格納し、条件分岐命令が検出された場
合、後続する命令列の命令を第1の命令フェッチバッフ
ァに格納し、演算手段で求められた分岐先アドレスをプ
ログラムカウンタに書き込み、分岐先の命令列の命令を
第2の命令フェッチバッファに格納するフェッチ制御手
段とを有していてもよい。The instruction fetch means outputs a read address to the memory and increments the contents of the program counter, a conditional branch instruction detecting means for detecting a conditional branch instruction from the instruction read from the memory, and a conditional branch instruction. A first instruction fetch unit that calculates the address of the branch destination based on the conditional branch instruction detected by the detection unit, and normally increments the contents of the program counter each time the instruction is read from the memory. When an instruction is stored in the buffer and a conditional branch instruction is detected, the instruction of the subsequent instruction sequence is stored in the first instruction fetch buffer, the branch destination address obtained by the calculating means is written in the program counter, and the branch destination is written. And a fetch control means for storing the instructions of the instruction sequence in the second instruction fetch buffer. .
【0012】前記命令並列発行手段は、命令を解読して
実行ユニットへの制御信号を生成する複数の解読手段
と、第1又は、第2の命令フェッチバッファから全ての
解読手段に命令を1つずつ転送する転送制御手段と、転
送制御手段により転送されるそれぞれの命令に、その命
令がどの命令列に属するかを示すモ−ドを付加し、分岐
命令に後続する命令列と分岐先の命令列とでモ−ドを変
更するモ−ド付加手段とを有していてもよい。The instruction parallel issuing means decodes the instructions and generates a control signal to the execution unit, and one instruction from the first or second instruction fetch buffer to all the decoding means. Transfer control means for transferring each instruction, and to each instruction transferred by the transfer control means, a mode indicating which instruction sequence the instruction belongs to is added, and an instruction sequence subsequent to the branch instruction and a branch destination instruction. It may have a mode adding means for changing the mode depending on the row.
【0013】前記モ−ド付加手段が付加するモ−ドは、
2ビットの情報であり、条件分岐命令に後続する命令列
のモ−ドは条件分岐命令自身のモ−ドに対して第1の値
を加算した値、分岐先の命令列のモ−ドは第2の値を加
算した値であってもよい。前記条件分岐命令が依存する
他の命令は、PSR(Program Status Register)を変
更する命令であり、前記分岐判定手段は、PSRを変更
する命令が実行されたことを検出し、その実行結果を参
照するような構成であってもよい。The mode added by the mode adding means is:
This is 2-bit information, and the mode of the instruction sequence following the conditional branch instruction is the value obtained by adding the first value to the mode of the conditional branch instruction itself, and the mode of the instruction sequence of the branch destination is It may be a value obtained by adding the second value. The other instruction on which the conditional branch instruction depends is an instruction that changes the PSR (Program Status Register), and the branch determination means detects that the instruction that changes the PSR has been executed and refers to the execution result. It may be configured to do so.
【0014】前記プロセッサは、さらに、解読手段で解
読された複数の解読結果を参照して、解読された複数の
命令間のデ−タ依存関係を判定するデ−タ依存関係判定
手段と、実行ユニットで実行中の命令が使用しているレ
ジスタがどれであるかを管理するスコアボ−ド管理手段
と、実行ユニットの空き状態を検知する空き状態検知手
段と、解読手段で解読された各命令について、デ−タ依
存関係判定手段の判定結果、スコアボ−ド管理手段、空
き状態検知手段の検知結果に基づいて、発行可能な命令
を命令並列発行手段から実行ユニットへの発行を許可
し、また、解読手段で解読された命令が条件分岐命令で
ある場合には、命令並列発行手段から分岐判定手段への
発行を許可する命令発行許可手段とを有していてもよ
い。The processor further refers to a plurality of decryption results decrypted by the decryption means to determine a data dependency relationship between a plurality of decrypted instructions, and a data dependency relationship determining means. Regarding the scoreboard management means for managing which register is used by the instruction being executed in the unit, the empty state detecting means for detecting the empty state of the execution unit, and each instruction decoded by the decoding means , Permitting issuance of an issuable instruction from the instruction parallel issuance means to the execution unit based on the determination result of the data dependency determination means, the scoreboard management means, and the detection result of the empty state detection means, and When the instruction decoded by the decoding means is a conditional branch instruction, it may have an instruction issue permission means for permitting the instruction parallel issue means to issue to the branch determination means.
【0015】前記命令発行許可手段は、複数の解読手段
の解読結果にそれぞれについて、データ依存関係検出手
段の検出結果から前の命令とデ−タ依存関係がなく、ス
コアボ−ド管理手段の情報からその命令のオペランドで
指定されているレジスタが実行ユニットで実行中の命令
に使用されていなく、かつ、空き状態検知手段の検知結
果からその命令を実行しうる実行ユニットが空いている
こと、を満たす命令を発行可能と判定することを特徴と
する請求項9記載のプロセッサ。The instruction issue permitting means has no data dependency relation with the preceding instruction from the detection result of the data dependence detecting means for each of the decoding results of the plurality of decoding means, and the information of the scoreboard managing means is used. It is satisfied that the register specified by the operand of the instruction is not used for the instruction being executed by the execution unit, and the execution unit that can execute the instruction is free from the detection result of the free state detection means. 10. The processor according to claim 9, wherein the processor determines that the instruction can be issued.
【0016】前記プロセッサはさらに、実行ユニット毎
に命令を実行中であるか否かを示す情報を保持し、空き
状態検知手段によって参照される実行ユニット管理テ−
ブルと、実行ユニットで実行中の命令が使用しているレ
ジスタがどれであるかを示す情報を保持し、スコアボ−
ド管理手段によって参照されるスコアボ−ドとを備えて
いてもよい。The processor further holds information indicating whether or not an instruction is being executed for each execution unit, and the execution unit management table referred to by the empty state detecting means.
And the information indicating which register is used by the instruction being executed in the execution unit.
A scoreboard referred to by the card management means may be provided.
【0017】前記実行結果管理手段は、命令並列発行手
段によって発行された条件分岐命令のモ−ドを初期モ−
ドとして保持する初期モ−ド保持手段と、命令並列発行
手段によって発行された条件分岐命令の種類を保持する
投機実行種類保持手段と、命令並列発行手段によって発
行された条件分岐命令の条件判断が未だ確定していない
ことを示すフラグを保持する投機実行状態指示手段とを
有し、前記命令並列発行手段は、条件分岐命令を分岐判
定手段に発行すると同時に、その条件分岐命令のモ−ド
を初期モ−ド保持手段に、その条件分岐命令の種類を投
機実行種類保持手段に出力し、投機実行状態指示手段の
フラグをセットするような構成であってもよい。The execution result managing means initializes the mode of the conditional branch instruction issued by the instruction parallel issuing means.
Initial mode holding means for holding as a mode, speculative execution type holding means for holding the type of conditional branch instruction issued by the instruction parallel issuing means, and condition judgment of the conditional branch instruction issued by the instruction parallel issuing means. The instruction parallel issuing means issues a conditional branch instruction to the branch determining means, and at the same time, the speculative execution state instruction means for holding a flag indicating that the conditional branch instruction is not determined. The initial mode holding means may output the type of the conditional branch instruction to the speculative execution type holding means and set the flag of the speculative execution state instructing means.
【0018】前記は、実行結果管理手段は、実行ユニッ
トでの命令の実行結果と、その命令のモ−ドと、その実
行結果が本来格納されるべき格納先の情報と対応させて
記憶する一時記憶手段を有していてもよい。前記一時記
憶手段は、格納先の情報として、本来の格納先がレジス
タである場合には、レジスタ番号を、本来の格納先がメ
モリである場合には、メモリアドレスを記憶するような
構成であってもよい。As described above, the execution result management means temporarily stores the execution result of the instruction in the execution unit, the mode of the instruction, and the information of the storage destination where the execution result is originally stored. You may have a memory | storage means. The temporary storage means is configured to store, as the storage destination information, a register number when the original storage destination is a register and a memory address when the original storage destination is a memory. May be.
【0019】分岐判定手段は、分岐するか否かを判定す
ると投機実行状態指示手段のフラグをクリアし、実行結
果管理手段は、分岐判定手段の判定結果に基づいて、初
期モ−ド保持手段、投機実行種類保持手段を参照して一
時記憶手段の実行結果の有効無効を識別し、有効な実行
結果を本来の格納先に転送し、無効な実行結果をクリア
するような構成であってもよい。The branch judging means clears the flag of the speculative execution state instructing means when judging whether or not to branch, and the execution result managing means, based on the judgment result of the branch judging means, holds the initial mode holding means, The speculative execution type holding means may be referred to to identify whether the execution result of the temporary storage means is valid or invalid, transfer the valid execution result to the original storage destination, and clear the invalid execution result. ..
【0020】[0020]
【作用】上記の手段により本発明のプロセッサは、命令
種別判別手段が実行前の命令列に含まれる条件分岐命令
の種類を判別する。この判別された命令の種類に応じ
て、命令並列発行手段は、実行ユニットに対して、分岐
先の命令列及び/又は後続する命令列の命令を実行ユニ
ットに対して並列発行する。分岐判定手段によって、条
件分岐命令の分岐の成否が判定されると、実行結果管理
手段は、命令列の実行結果の有効無効を識別する。With the above means, the processor of the present invention determines the type of the conditional branch instruction included in the instruction sequence before execution by the instruction type determining means. Depending on the type of the determined instruction, the instruction parallel issue unit issues the instruction of the branch destination instruction sequence and / or the instruction of the subsequent instruction sequence to the execution unit in parallel to the execution unit. When the branch determination means determines whether or not the branch of the conditional branch instruction is successful, the execution result management means identifies whether the execution result of the instruction sequence is valid or invalid.
【0021】さらに、命令種別管理手段は、分岐する確
率が分岐しない確率と同程度の第1の種類の命令と、そ
れ以外の命令を判別する。それ以外の命令について、第
1の種類の分岐命令より分岐する確率が高い第2の種類
の分岐命令と、第1の種類の分岐命令より分岐しない確
率が高い第3の種類の分岐命令とを判別する。命令フェ
ッチ手段は、通常メモリから第1の命令フェッチ手段に
命令を格納していき、条件分岐命令検出手段によって条
件分岐命令が検出された場合、条件分岐命令に後続する
命令列の命令を第1の命令フェッチバッファに、分岐先
の命令列の命令を第2の命令フェッチバッファに格納す
る。これらの命令フェッチバッファに格納された命令に
ついて、命令並列発行手段は、モ−ド付加手段によりモ
−ドを付加しつつ、転送制御手段によって2つの命令フ
ェッチバッファから複数の解読手段に対して命令を取り
込む。Further, the instruction type managing means discriminates between the first type of instructions whose branching probability is about the same as the probability of not branching and the other instructions. For other instructions, a second type of branch instruction that has a higher probability of branching than the first type of branch instruction and a third type of branch instruction that has a higher probability of not branching than the first type of branch instruction. Determine. The instruction fetch unit stores the instructions from the normal memory into the first instruction fetch unit, and when the conditional branch instruction detection unit detects the conditional branch instruction, the instruction of the instruction sequence subsequent to the conditional branch instruction is the first instruction. The instruction of the branch destination instruction string is stored in the second instruction fetch buffer in the second instruction fetch buffer. With respect to the instructions stored in these instruction fetch buffers, the instruction parallel issuing means adds the mode by the mode adding means, and at the same time, the transfer control means instructs the plurality of decoding means from the two instruction fetch buffers. Take in.
【0022】さらに、命令発行許可手段は、複数の解読
手段で解読された各命令について、デ−タ依存関係判定
手段の判定結果、スコアボ−ド管理手段、空き状態検知
手段の検知結果に基づいて、発行可能な命令を命令並列
発行手段から実行ユニットへの発行を許可し、また、解
読手段で解読された命令が条件分岐命令である場合に
は、命令並列発行手段から分岐判定手段への発行を許可
する。このとき、命令発行許可手段は、条件分岐命令が
第1の種類の命令であった場合、分岐先の命令列と条件
分岐命令に後続する命令列の双方を実行ユニットに対し
て並列発行を許可し、第2の種類の命令の場合、分岐先
の命令列の命令を実行ユニットに対して並列発行し、第
3の種類の命令の場合、条件分岐命令に後続する命令列
の命令を実行ユニットに並列発行を許可する。Further, the command issuance permitting means is based on the judgment result of the data dependency judging means, the scoreboard managing means, and the detection result of the empty state detecting means for each instruction decoded by the plurality of decoding means. Issuance of an issuable instruction from the instruction parallel issuance means to the execution unit, and when the instruction decoded by the decoding means is a conditional branch instruction, the instruction parallel issuance means issues to the branch determination means. Allow At this time, when the conditional branch instruction is the first type of instruction, the instruction issuance enabling means permits both the branch destination instruction string and the instruction string subsequent to the conditional branch instruction to be issued in parallel to the execution unit. In the case of the second type instruction, the instruction of the branch destination instruction string is issued in parallel to the execution unit, and in the case of the third type instruction, the instruction string instruction subsequent to the conditional branch instruction is executed. Allow parallel issuance.
【0023】前記命令並列発行手段は、条件分岐命令を
分岐判定手段に発行すると同時に、その条件分岐命令の
モ−ドを初期モ−ド保持手段に、その条件分岐命令の種
類を投機実行種類保持手段に出力し、投機実行状態指示
手段のフラグをセットする。分岐判定手段により分岐す
る否かが判定されると、実行結果管理手段は、その判定
結果に基づいて、初期モ−ド保持手段、投機実行種類保
持手段を参照して一時記憶手段の実行結果の有効無効を
識別し、有効な実行結果を本来の格納先に転送し、無効
な実行結果をクリアする。The instruction parallel issuing means issues a conditional branch instruction to the branch judging means, and at the same time, the mode of the conditional branch instruction is held in the initial mode holding means, and the kind of the conditional branch instruction is held as the speculative execution kind. And outputs the flag to the speculative execution state instructing means. When the branch determination means determines whether or not to branch, the execution result management means refers to the initial mode holding means and the speculative execution type holding means on the basis of the result of the determination to determine the execution result of the temporary storage means. It identifies valid / invalid, transfers the valid execution result to the original storage destination, and clears the invalid execution result.
【0024】[0024]
【実施例】図1は本発明のプロセッサの構成図である。
図1において、1はメモリであり、プログラムを構成す
る命令列やオペランドデータを記憶する。2は命令フェ
ッチ部であり、メモリ1から命令をプリフェッチし、命
令フェッチバッファA3または命令フェッチバッファB
4に書き込む。この命令フェッチ部2は、フェッチした
命令が条件分岐命令であるかどうかを検出し、検出結果
に応じて書き込み先の命令フェッチバッファを切り替え
る。1 is a block diagram of a processor of the present invention.
In FIG. 1, reference numeral 1 denotes a memory, which stores an instruction string and operand data which form a program. An instruction fetch unit 2 prefetches instructions from the memory 1 and stores them in the instruction fetch buffer A3 or the instruction fetch buffer B.
Write to 4. The instruction fetch unit 2 detects whether the fetched instruction is a conditional branch instruction, and switches the write destination instruction fetch buffer according to the detection result.
【0025】この命令フェッチ部2によって検出される
分岐命令について説明する。例えば、プログラム言語C
の場合、一般的には、分岐するかしないかが不確定なif
-then-else系の場合と、分岐する確率が高いループの場
合と、分岐しない確率が高い場合の分岐動作がある。
switch文の場合には実装方法によるが一般的にif-then-
elseと同様に考えてよい。そこで、本実施例では、あら
かじめ分岐の確率に応じて、分岐の確率が高い場合に高
速に動作するル−プ系の分岐命令と、分岐の確率が不明
な場合に高速に動作するif-then-else系の分岐命令と、
分岐しない確率が高い場合に高速に動作する分岐命令の
三種類を機械語命令の中に設けている。ル−プ系の分岐
命令は、ル−プ向きの分岐命令で分岐する確率が高い命
令(以後、Bcc_lと省略)であり、if-then-else系の分
岐命令は分岐するかしないかが不確定な分岐命令(以
後、Bcc_iと省略)である。このほかに、分岐しない確
率が高い命令(以後、Bcc_nと省略)がある。The branch instruction detected by the instruction fetch unit 2 will be described. For example, programming language C
If, it is generally uncertain whether to branch or not.
-Then-else system, the case of a loop with a high probability of branching, and the case of a high probability of not branching.
In case of switch statement, it depends on the implementation method, but if-then-
Think of it like else. Therefore, in this embodiment, depending on the probability of branching in advance, a loop-type branch instruction that operates at high speed when the probability of branching is high, and if-then that operates at high speed when the probability of branching is unknown. -else branch instructions,
Three types of branch instructions that operate at high speed when the probability of not branching are high are provided in the machine language instruction. A loop-type branch instruction is an instruction with a high probability of branching with a loop-oriented branch instruction (hereinafter abbreviated as Bcc_l), and whether or not the if-then-else type branch instruction branches. It is a definite branch instruction (hereinafter abbreviated as Bcc_i). In addition, there is an instruction that has a high probability of not branching (hereinafter abbreviated as Bcc_n).
【0026】分岐命令が命令フェッチ部2により検出さ
れると、分岐命令に後続する命令列(分岐しないときに
実行される命令列)と分岐先の命令列(分岐したときに
実行される命令列)の両方を読み出し、分岐命令に後続
する命令列をそれまでと同じ命令フェッチバッファに、
分岐先の命令列をもう1つの命令フェッチバッファに格
納する。この読み出し動作は、命令の解読や実行とは非
同期に、命令フェッチバッファA3または命令フェッチ
バッファB4を常に一杯にする。When a branch instruction is detected by the instruction fetch unit 2, an instruction string following the branch instruction (an instruction string executed when the branch is not executed) and a branch destination instruction string (an instruction string executed when the branch is executed) ) Is read, and the instruction sequence following the branch instruction is stored in the same instruction fetch buffer as before.
The branch destination instruction string is stored in another instruction fetch buffer. This read operation always fills the instruction fetch buffer A3 or the instruction fetch buffer B4 asynchronously with the decoding and execution of the instruction.
【0027】命令フェッチバッファA3は、命令フェッ
チ部2により読み出された命令をFIFO(First In F
irst Out)メモリである。命令フェッチバッファB4
は、3と同様、FIFOメモリである。5はセレクタで
あり、2つの命令フェッチバッファから出力される命令
を切り替える。切り替えの指示は命令解読部7によって
行われる。The instruction fetch buffer A3 stores the instructions read by the instruction fetch unit 2 in a FIFO (First In F
irst Out) Memory. Instruction fetch buffer B4
Is a FIFO memory, like 3. Reference numeral 5 is a selector, which switches the instructions output from the two instruction fetch buffers. The switching instruction is given by the instruction decoding unit 7.
【0028】6は命令解読バッファであり、命令解読の
対象となる命令を記憶し、本実施例では、6命令分の記
憶容量を持つ。記憶容量については、少なくとも演算ユ
ニット8〜11と同数以上が望ましい。命令解読部7
は、命令フェッチバッファから命令解読バッファ6への
命令の転送制御、命令解読バッファの命令解読、及び演
算ユニットへの命令発行を行う。Reference numeral 6 denotes an instruction decoding buffer, which stores an instruction to be decoded and has a storage capacity of 6 instructions in this embodiment. It is desirable that the storage capacity is at least equal to or larger than that of the arithmetic units 8 to 11. Instruction decoding unit 7
Controls the transfer of instructions from the instruction fetch buffer to the instruction decoding buffer 6, decodes the instruction in the instruction decoding buffer, and issues the instruction to the arithmetic unit.
【0029】8は演算ユニットAであり、ロード命令と
ストア命令を実行し、このうちロード命令の実行は、説
明の便宜上2サイクルかかるとしている。9は演算ユニ
ットBであり、整数演算を処理する。10は演算ユニッ
トCであり、整数演算を処理する。11は演算ユニット
Dであり、浮動小数点演算を処理する。演算ユニットA
8〜D11は本実施例では説明を簡単化するため1サイ
クル(ロード命令は2サイクル)で命令の実行が完了す
るとしている。また、ユニットのパイプライン段数も本
発明の主旨とは関係無いのでここでは定義しない。Reference numeral 8 denotes an arithmetic unit A, which executes a load instruction and a store instruction, and it is assumed that the execution of the load instruction takes two cycles for convenience of explanation. An arithmetic unit B 9 processes integer arithmetic. An arithmetic unit C 10 processes integer arithmetic. An arithmetic unit D 11 processes a floating point arithmetic. Arithmetic unit A
In this embodiment, 8 to D11 are assumed to complete the instruction execution in one cycle (the load instruction is two cycles) in order to simplify the description. Further, the number of pipeline stages of the unit is not defined here because it is not related to the gist of the present invention.
【0030】12は演算ユニット管理テーブルであり、
演算ユニットごとに、使用中であることを示す情報(ビ
ット)を記憶する。このビットは、各演算ユニットによ
って、演算ユニットの命令実行開始時にセットされ、演
算ユニットの命令実行終了時にクリアされる。13は実
行順序管理バッファであり、投機的に実行された命令の
演算結果と、その結果が本来格納されるべきレジスタの
番号と、その命令のモ−ドと記憶する。実行順序管理バ
ッファ13の記憶形式は、図7に示すようにモ−ド、レ
ジスタ番号、演算結果を記憶する領域を有している。Reference numeral 12 is an arithmetic unit management table,
Information (bit) indicating that it is in use is stored for each arithmetic unit. This bit is set by each arithmetic unit at the start of instruction execution of the arithmetic unit and cleared at the end of instruction execution of the arithmetic unit. An execution order management buffer 13 stores the operation result of speculatively executed instructions, the register number in which the result should be originally stored, and the mode of the instruction. The storage format of the execution order management buffer 13 has an area for storing the mode, the register number, and the operation result, as shown in FIG.
【0031】14は初期モード保持回路であり、命令解
読部が処理した分岐命令に付加されているモードを初期
モ−ドとして保持する。15は投機実行種類保持回路で
あり、現在実行している分岐命令の種類(Bcc-lである
かBcc-iであるか)を保持する。16は投機実行状態指
示回路であり、現在投機実行中の状態か否かを示すフラ
グを保持する。An initial mode holding circuit 14 holds the mode added to the branch instruction processed by the instruction decoding unit as an initial mode. A speculative execution type holding circuit 15 holds the type of branch instruction currently being executed (whether it is Bcc-l or Bcc-i). Reference numeral 16 is a speculative execution state instruction circuit, which holds a flag indicating whether or not the speculative execution state is currently being executed.
【0032】17は実行順序管理回路であり、上記14
〜16から得られる情報に応じて、演算ユニット8〜1
1の演算結果をレジスタファイル19又は実行順序管理
バッファ13に格納する。具体的には、投機実行中でな
いときは、演算結果をレジスタファイルに書き込み、投
機実行中のときは、投機実行中の命令について、モー
ド、演算結果(オペランド)の書き込み先のレジスタ番
号を対応づけて実行順序管理バッファ13に格納する。
また、投機実行が終了したときは、実行順序管理バッフ
ァに格納された演算結果及びレジスタ番号に基づいてレ
ジスタファイルに演算結果を転送する。Reference numeral 17 denotes an execution order management circuit, which is the above-mentioned 14
16 to 16 depending on the information obtained from
The calculation result of 1 is stored in the register file 19 or the execution order management buffer 13. Specifically, when the speculative execution is not in progress, the calculation result is written to the register file. When the speculative execution is in progress, the mode and the register number of the operation result (operand) write destination are associated with the speculative execution instruction. And stores it in the execution order management buffer 13.
When the speculative execution is completed, the operation result is transferred to the register file based on the operation result and the register number stored in the execution order management buffer.
【0033】18は命令実行整合性維持回路であり、P
SRの確定結果から条件分岐命令の条件の成否を判定
し、その結果によって、命令解読部7に命令実行のやり
直しの指示、実行順序管理バッファ13内部の無効化、
実行順序管理回路17の転送指示を行う。より具体的に
は、条件分岐命令の種類によって、次の場合に分けられ
る。Reference numeral 18 denotes an instruction execution consistency maintaining circuit, P
Whether the condition of the conditional branch instruction is satisfied or not is determined from the SR determination result, and the instruction decoding unit 7 is instructed to redo the instruction execution, the execution order management buffer 13 is invalidated,
The execution order management circuit 17 issues a transfer instruction. More specifically, the following cases are classified according to the type of conditional branch instruction.
【0034】(1)Bcc-l命令について投機実行が行わ
れている場合には、分岐先の命令のみ実行されているの
で、確定の結果から分岐しないことが判明したときには
先行して実行した命令の結果を実行順序管理バッファ内
から消去し、再度分岐しない側の命令を実行するように
命令解読部に指示する。 (2)Bcc-i命令について投機実行が行われている場合
には、分岐先の命令と後続する命令が実行されているの
で、分岐方向が確定したときには、それに応じて、後続
命令または分岐先命令の結果を実行順序管理バッファ内
から消去する。(1) When speculative execution is performed for the Bcc-l instruction, only the instruction at the branch destination is executed. Therefore, when it is determined from the definite result that the branch does not occur, the instruction previously executed is executed. The result is deleted from the execution order management buffer, and the instruction decoding unit is instructed to execute the instruction on the side that does not branch again. (2) When speculative execution is performed for the Bcc-i instruction, the branch destination instruction and the subsequent instruction are executed. Therefore, when the branch direction is determined, the subsequent instruction or the branch destination is accordingly The result of the instruction is deleted from the execution order management buffer.
【0035】(3)Bcc-n命令について投機実行が行わ
れている場合には、分岐命令に後続する命令のみ実行さ
れているので、確定の結果から分岐することが判明した
ときには先行して実行した命令の結果を実行順序管理バ
ッファ内から消去し、再度分岐する側の命令を実行する
ように命令解読部に指示する。19はレジスタファイル
であり、32個のレジスタ及びPSRを有し、命令の実
行結果が格納される。(3) When speculative execution is performed for the Bcc-n instruction, only the instruction subsequent to the branch instruction is executed. Therefore, when it is found from the definite result that the branch is made, the branch instruction is executed first. The instruction decoding unit is instructed to erase the result of the executed instruction from the execution order management buffer and execute the branching side instruction again. Reference numeral 19 is a register file, which has 32 registers and PSR, and stores the execution result of the instruction.
【0036】20はスコアボ−ドであり、レジスタファ
イル19の各レジスタごとに2ビットのフラグを有す。
1つは、投機実行でない実行中の命令が、対応するレジ
スタを使用(リ−ド又はライト)していることを示す。
もう1つは、投機実行で実行中の命令が、対応するレジ
スタを使用していることを示す。図2は、図1の命令フ
ェッチ部2の詳細な構成を示すブロック図である。同図
において、21はプログラムカウンタであり、メモリ1
から読み出すべき命令のアドレスを出力し、命令が読み
出されるごとにその内容をインクリメントする。Reference numeral 20 is a score board, which has a 2-bit flag for each register of the register file 19.
One is that an instruction being executed which is not speculative execution uses (reads or writes) the corresponding register.
The other indicates that the instruction being executed by speculative execution uses the corresponding register. FIG. 2 is a block diagram showing a detailed configuration of the instruction fetch unit 2 of FIG. In the figure, 21 is a program counter, which is a memory 1
The address of the instruction to be read from is output, and the content is incremented each time the instruction is read.
【0037】22は分岐命令検出回路であり、メモリ1
から読み出された命令から条件分岐命令を検出する。2
3は演算回路であり、検出された条件分岐命令に基づい
て分岐先アドレスを算出する。24はセレクタであり、
プログラムカウンタ21と演算回路23の出力を選択し
てメモリ1に出力する。Reference numeral 22 denotes a branch instruction detection circuit, which is a memory 1
The conditional branch instruction is detected from the instruction read from. Two
An arithmetic circuit 3 calculates a branch destination address based on the detected conditional branch instruction. 24 is a selector,
The outputs of the program counter 21 and the arithmetic circuit 23 are selected and output to the memory 1.
【0038】25はフェッチ制御部であり、メモリ1か
らの命令読み出し、および、命令フェッチバッファA3
または命令フェッチバッファB4への命令書き込みを制
御する。詳しく言うと、通常は、プログラムカウンタ2
1がインクリメントしながらアドレスを順に出力するよ
うに制御し、一方の命令フェッチバッファに命令を格納
する。分岐命令検出回路22により条件分岐命令が検出
されると、その条件分岐命令が有する分岐先アドレスの
情報を演算回路23に入力して分岐先アドレスを算出さ
せ、分岐先の命令も読み出しうるように制御し、他方の
命令フェッチバッファに命令を格納する。Reference numeral 25 is a fetch control unit, which reads instructions from the memory 1 and the instruction fetch buffer A3.
Alternatively, the instruction writing to the instruction fetch buffer B4 is controlled. In detail, it is usually the program counter 2
Control is performed so that the address is sequentially output while 1 is incremented, and the instruction is stored in one of the instruction fetch buffers. When the branch instruction detection circuit 22 detects a conditional branch instruction, the information of the branch destination address of the conditional branch instruction is input to the arithmetic circuit 23 to calculate the branch destination address so that the branch destination instruction can be read. Control and store the instruction in the other instruction fetch buffer.
【0039】図3は、図1の命令解読部7の詳細な構成
を示すブロック図である。同図において、31は分岐命
令検出回路であり、図1のセレクタ5の出力から分岐命
令(Bcc_l命令及びBcc_i命令を検出する。32は転送制
御回路であり、命令フェッチバッファA3または命令フ
ェッチバッファB4の命令を、セレクタ5を介して命令
解読バッファ6に転送する。この転送は、分岐命令検出
回路31の検出結果によってその動作が異なる。FIG. 3 is a block diagram showing a detailed structure of the instruction decoding unit 7 of FIG. In the figure, 31 is a branch instruction detection circuit, which detects branch instructions (Bcc_l instruction and Bcc_i instruction from the output of the selector 5 in FIG. 1. 32 is a transfer control circuit, which is the instruction fetch buffer A3 or the instruction fetch buffer B4. Is transferred to the instruction decoding buffer 6 via the selector 5. The operation of this transfer differs depending on the detection result of the branch instruction detection circuit 31.
【0040】第1に、分岐命令が検出されていない場
合、転送制御回路32は、命令フェッチバッファA3又
は命令フェッチバッファB4のうちどちらか命令が入っ
ている方の出力ををセレクタ5に選択させて命令解読バ
ッファ6に命令を転送させる。第2に、Bcc_l系命令
(ループ向きの分岐命令で、分岐の確率が高い)が検出
された場合、現在命令を読み出している命令フェッチバ
ッファから、他方の命令フェッチバッファに切り替え
て、命令解読バッファに命令を転送する。命令解読バッ
ファ6には分岐先の命令ばかりが転送されることにな
る。First, when the branch instruction is not detected, the transfer control circuit 32 causes the selector 5 to select the output of the instruction fetch buffer A3 or the instruction fetch buffer B4 which contains the instruction. Then, the instruction is transferred to the instruction decoding buffer 6. Second, when a Bcc_l type instruction (a branch instruction for a loop and a high probability of branching) is detected, the instruction fetch buffer that is currently reading the instruction is switched to the other instruction fetch buffer, and the instruction decoding buffer is switched. Transfer the instruction to. Only the instruction at the branch destination is transferred to the instruction decoding buffer 6.
【0041】第3に、Bcc_i系命令(if-then-else系の
分岐命令で、分岐の確率が不確定)が検出された場合、
命令の読み込みを現在使用している命令フェッチバッフ
ァと他方の命令フェッチバッファから交互に転送する。
命令フェッチバッファには後続する命令(分岐しない時
に実行される命令)と分岐先の命令とが混合して(交互
に)転送されることになる。Thirdly, when a Bcc_i type instruction (if-then-else type branch instruction, the branch probability is uncertain) is detected,
Alternately transfer instruction reads from the currently used instruction fetch buffer and the other instruction fetch buffer.
A subsequent instruction (an instruction executed when a branch is not performed) and a branch destination instruction are mixed (alternately) transferred to the instruction fetch buffer.
【0042】第4に、Bcc_n系命令(分岐しない確率が
高い)が検出された場合、現在命令を読み出している命
令フェッチバッファから、引き続き命令解読バッファに
命令を転送する。命令解読バッファ6には分岐しない側
の命令ばかりが転送されることになる。33はモ−ド付
加回路であり、転送制御回路32による上記の転送に際
して、分岐命令による命令の制御フローが判るように各
命令にモードを付加して、命令解読バッファ6に格納す
る。Fourthly, when a Bcc_n type instruction (which has a high probability of not branching) is detected, the instruction is continuously transferred from the instruction fetch buffer which is currently reading the instruction to the instruction decoding buffer. Only the instruction on the non-branching side is transferred to the instruction decoding buffer 6. A mode addition circuit 33 adds a mode to each instruction and stores it in the instruction decoding buffer 6 so that the control flow of the instruction by the branch instruction can be understood during the above transfer by the transfer control circuit 32.
【0043】このモ−ド設定ル−ルは、 (1)分岐命令に後続する命令列のモ−ドは、現在のモ
−ドに”+01”を加算する。 (2)分岐先の命令列のモ−ドは、現在のモ−ドに”+
10”を加算する。 の2つである。This mode setting rule is as follows: (1) In the mode of the instruction sequence following the branch instruction, "+01" is added to the current mode. (2) The mode of the instruction sequence at the branch destination is "+" in the current mode.
10 "is added.
【0044】モードと命令のフローの一例を示したモー
ド説明図を図4に示す。同図において、実線の矢印
(↓)は命令列を、丸印(○)は条件分岐命令を、破線
の矢印()はル−プの戻り先(Bcc_l命令の分岐先)
を、” ”内の数字はモ−ドを示す。また、丸付き数字
(、、)はル−プの繰り返し回数である(図2で
は3回繰り返す)。FIG. 4 is a mode explanatory diagram showing an example of the flow of modes and instructions. In the figure, a solid arrow (↓) indicates an instruction string, a circle (○) indicates a conditional branch instruction, and a broken arrow () indicates a loop return destination (Bcc_l instruction branch destination).
The numbers in "" indicate the mode. Circled numbers (,,) are the number of times the loop is repeated (repeated three times in FIG. 2).
【0045】例えば、現在の命令列のモードが”00”
とすると、分岐命令に後続する命令列のモードは”+0
1”を加算して”01”、分岐先の命令列のモードは”
+10”を加算して”10”として設定される。また、
ル−プ処理において、ル−プを繰り返すごとにモ−ドが
変化するのは、モ−ドが相対的に設定されているからで
ある。For example, the mode of the current instruction sequence is "00".
Then, the mode of the instruction sequence following the branch instruction is “+0
"1" is added by 1 ", and the mode of the instruction sequence at the branch destination is"
It is set as "10" by adding +10 ".
In the loop processing, the mode changes each time the loop is repeated because the mode is set relatively.
【0046】このモード設定ルールを使用すれば分岐命
令までの命令列と後続する命令列と分岐先の命令列を容
易に判別でき、分岐先命令列に新たな分岐が存在し、木
のように枝別れする場合でも制御フロ−を判別すること
が可能である。34は命令解読回路であり、デコ−ダ3
4a〜34fを備え、図1の命令解読バッファ6から入
力される6つの命令を同時に解読する。DECの数は、
ここでは命令解読バッファ6の段数と同数であり、演算
ユニット8〜11と同数以上が望ましい。If this mode setting rule is used, it is possible to easily discriminate the instruction sequence up to the branch instruction, the subsequent instruction sequence, and the instruction sequence of the branch destination. It is possible to discriminate the control flow even when branching. 34 is an instruction decoding circuit, which is a decoder 3
4a to 34f, and simultaneously decodes 6 instructions input from the instruction decoding buffer 6 of FIG. The number of DEC is
Here, the number is the same as the number of stages of the instruction decoding buffer 6, and it is desirable that the number is equal to or more than that of the arithmetic units 8 to 11.
【0047】35はPSR変更命令検出回路であり、デ
コ−ダ34a〜34fの解読結果が入力され、それぞれ
の命令がPSR(Program Status Register)の内容を
変更するかどうかを検出する。PSR内容が確定すると
条件分岐命令の条件の成否が決定するので、この検出結
果は、命令実行整合性維持回路18に通知される。36
はデータ依存関係検出回路であり、デコ−ダ34a〜3
4fから入力される解読結果に基づいて、1つの命令の
実行結果を他の命令が利用するというデ−タ依存関係あ
るかどうかを検出する。具体的には、データ依存関係検
出回路36は、解読された6つの命令について、解読結
果のレジスタフィ−ルドを比較して、実行アドレスが前
の命令のディスティネ−ション・レジスタが後の命令の
ソ−ス・レジスタになっている場合、デ−タ依存関係が
あると判定する。Reference numeral 35 is a PSR change instruction detection circuit, which receives the decoding results of the decoders 34a to 34f and detects whether or not each instruction changes the contents of the PSR (Program Status Register). When the content of the PSR is determined, the success or failure of the condition of the conditional branch instruction is determined, and the detection result is notified to the instruction execution consistency maintaining circuit 18. 36
Is a data dependency detection circuit, and the decoders 34a to 34a
Based on the decoding result input from 4f, it is detected whether or not there is a data dependency relationship that the execution result of one instruction is used by another instruction. Specifically, the data dependency relationship detection circuit 36 compares the decoded decoded register fields of the six decoded instructions, and the execution register of the previous instruction has the execution address of the previous instruction. , The source register is determined to have a data dependency relationship.
【0048】デ−タ依存関係を調べる範囲については、
命令解読バッファ6の命令と、命令解読バッファ6にま
だ取り込まれていない命令との間のデ−タ依存関係は、
調べる必要がない。というのは、前者と後者の命令は同
時に実行されることがないからである。命令解読バッフ
ァ6内にある命令についてのみデ−タ依存関係を調べれ
ばよい。同時に実行されうるからである。ただし、命令
解読バッファ6内の命令であっても、表1に示すよう
に、分岐先の命令列における命令(B)と、分岐命令に
後続する命令列における命令(c)との間のデ−タ依存
関係は、チェックしない。なぜなら、(B)と(C)は
排他的な関係にあるからである。表1に本発明の実施例
における命令列のデ−タ依存関係のチェックの有無を示
すRegarding the range for checking the data dependency,
The data dependency between the instruction in the instruction decoding buffer 6 and the instruction not yet fetched in the instruction decoding buffer 6 is as follows.
No need to look up. The former and latter instructions are never executed at the same time. Only for the instructions in the instruction decoding buffer 6, the data dependency may be checked. This is because they can be executed simultaneously. However, even if the instruction is in the instruction decoding buffer 6, as shown in Table 1, the instruction between the instruction (B) in the instruction sequence of the branch destination and the instruction (c) in the instruction sequence subsequent to the branch instruction is -Data dependency is not checked. This is because (B) and (C) have an exclusive relationship. Table 1 shows the presence / absence of the check of the data dependency of the instruction sequence in the embodiment of the present invention.
【0049】[0049]
【表1】 [Table 1]
【0050】37はスコアボ−ド管理回路であり、スコ
アボ−ド20を参照して命令の実行で使用されているレ
ジスタの状況を判断し、また、デコ−ダ34a〜34f
の解読結果を見て、レジスタの内容を変更する命令があ
れば、そのレジスタに対応するスコアボ−ド20のフラ
グをセットする。38は空き状態検知回路であり、演算
ユニット管理テーブル12を参照してどの演算ユニット
が空いている(使用中でない)かを判断する。。Reference numeral 37 is a scoreboard management circuit, which refers to the scoreboard 20 to judge the status of the register used in the execution of the instruction, and the decoders 34a to 34f.
If there is an instruction to change the contents of the register by looking at the result of decoding, the flag of the scoreboard 20 corresponding to the register is set. An empty state detection circuit 38 refers to the arithmetic unit management table 12 and determines which arithmetic unit is empty (not in use). .
【0051】39は命令発行回路であり、セレクタ39
a〜39dを有し、命令発行制御回路40の指示に従っ
て、命令解読回路34によって解読された命令のうち発
行可能な命令を選択して演算ユニット8〜11に並列に
発行する。これと同時に、命令発行回路39は、発行す
る命令ごとに、投機実行であるかどうかを示す識別子を
演算ユニットに格納する。この識別子は、本実施例で
は、”0”で投機実行でないことを、”1”で投機実行
中であることを示す。Reference numeral 39 is an instruction issuing circuit, which is a selector 39.
a-39d, according to the instruction of the instruction issue control circuit 40, select an issuable instruction among the instructions decoded by the instruction decoding circuit 34 and issue it in parallel to the arithmetic units 8-11. At the same time, the instruction issuing circuit 39 stores, for each instruction to be issued, an identifier indicating whether it is speculative execution in the arithmetic unit. In this embodiment, this identifier is "0" to indicate that the speculative execution is not in progress, and "1" to indicate that the speculative execution is in progress.
【0052】命令発行制御回路40は、上記36〜38
から得られる情報に基づいて、命令解読回路34によっ
て解読された命令のうち発行可能な命令を判別して、命
令発行回路39に発行の指示を出す。発行可能な命令か
どうかは、命令ごとに、次の条件をチェックして全部満
たすものを発行可能と判別する。 6つの命令間において、前の命令とデ−タ依存関係が
ないこと。(データ依存関係検出回路36の検出結果に
基づいて、チェックする。) その命令のオペランドで指定されているレジスタが演
算ユニットで実行中の命令に使用されていないこと。
(スコアボ−ド管理回路37からの情報に基づいて、チ
ェックする。) その命令を実行しうる演算ユニットが空いているこ
と。(空き状態検知回路38の検知結果に基づいて、チ
ェックする。) また、命令の発行と同時に、命令発行制御回路40は、
命令解読バッファ6から発行した命令を削除し、演算ユ
ニット管理テーブル12の対応するビットをセット(使
用中)する。The instruction issue control circuit 40 uses the above 36 to 38.
Based on the information obtained from the above, the issuable instruction is discriminated among the instructions decoded by the instruction decoding circuit 34, and an instruction to issue is issued to the instruction issuing circuit 39. Whether or not the instruction is an issuable instruction, the following conditions are checked for each instruction, and it is determined that an instruction that satisfies all the conditions can be issued. Between the 6 instructions, there is no data dependency with the previous instruction. (Check based on the detection result of the data dependency detection circuit 36.) The register specified by the operand of the instruction is not used for the instruction being executed in the arithmetic unit.
(Check based on the information from the scoreboard management circuit 37.) The operation unit that can execute the instruction is free. (Check based on the detection result of the empty state detection circuit 38.) Further, at the same time as the instruction issuance, the instruction issuance control circuit 40
The issued instruction is deleted from the instruction decoding buffer 6 and the corresponding bit in the arithmetic unit management table 12 is set (in use).
【0053】発行可能な命令が条件分岐命令である場合
には、演算ユニットには命令発行せず、初期モード保持
回路14に分岐命令のモ−ドを、投機実行種類保持回路
15にBcc-i命令であるかBcc-l命令であるかBcc-nであ
るかを、投機実行状態指示回路16に投機実行中である
ことを示すフラグを、命令実行整合性維持回路18にそ
の命令の条件をセットする。この場合、これ以降は投機
実行状態になる。When the instruction that can be issued is a conditional branch instruction, the instruction is not issued to the arithmetic unit, the mode of the branch instruction is sent to the initial mode holding circuit 14, and the speculation execution type holding circuit 15 is set to Bcc-i. An instruction, a Bcc-l instruction, or a Bcc-n instruction is provided to the speculative execution state instruction circuit 16 with a flag indicating that speculative execution is in progress, and the instruction execution consistency maintaining circuit 18 is provided with a condition of the instruction. set. In this case, the speculative execution state is set thereafter.
【0054】以上のように構成された本発明の実施例に
おける分岐処理装置について、最初にBcc-i命令を含む
場合について、その動作を図5〜図9及び表2を併用し
て説明する。図5は、Bcc-i命令を高速に処理する本実
施例の動作を説明するための命令フローの一例である。
図5において、矢印は命令実行順序を示し、命令N−3
と命令N−2の間の矢印はデータの依存関係があること
を、()内のLDはロ−ド命令、INTは整数演算命
令、FPUは浮動小数点演算命令を示す。命令N−2
は、分岐命令の基になるPSRを変更する命令である。With respect to the branch processing device in the embodiment of the present invention configured as described above, the operation will be described with reference to FIGS. 5 to 9 and Table 2 in the case where the Bcc-i instruction is included first. FIG. 5 is an example of an instruction flow for explaining the operation of this embodiment for processing a Bcc-i instruction at high speed.
In FIG. 5, the arrow indicates the instruction execution order, and the instruction N-3
The arrow between and the instruction N-2 indicates that there is a data dependency, LD in () indicates a load instruction, INT indicates an integer operation instruction, and FPU indicates a floating point operation instruction. Command N-2
Is an instruction that changes the PSR that is the basis of the branch instruction.
【0055】まず、命令フェッチ部2の動作について説
明しておく。命令フェッチ部2は、命令解読以下の処理
とは非同期に動作する。命令フェッチ部2は、プログラ
ムカウンタ21を用いてメモリ1から命令を読み込み、
命令フェッチバッファA3に格納する。メモリ1からの
読み出し時に、分岐命令検出回路22が分岐命令を検出
すると、その分岐命令に後続する命令を命令フェッチバ
ッファA3に格納するとともに、演算回路23が分岐先
アドレスを計算し、分岐先の命令をもう一つの命令フェ
ッチバッファB4に格納する。First, the operation of the instruction fetch unit 2 will be described. The instruction fetch unit 2 operates asynchronously with the processing following the instruction decoding. The instruction fetch unit 2 reads an instruction from the memory 1 using the program counter 21,
Store in the instruction fetch buffer A3. When the branch instruction detection circuit 22 detects a branch instruction at the time of reading from the memory 1, the instruction subsequent to the branch instruction is stored in the instruction fetch buffer A3, and the arithmetic circuit 23 calculates the branch destination address to calculate the branch destination address. The instruction is stored in another instruction fetch buffer B4.
【0056】この命令フェッチ部2の動作は、分岐命令
がない場合にはどちらか一方の命令フェッチバッファが
一杯になるまで、分岐命令がある場合には両方の命令フ
ェッチバッファが一杯になるまで続けられる。命令フェ
ッチバッファA3と命令フェッチバッファB4は同等で
あり、どちらを先に使用してもかまわない。これ以降の
説明では命令フェッチバッファが常に一杯になっている
として説明を進める。The operation of the instruction fetch unit 2 is continued until one of the instruction fetch buffers is full when there is no branch instruction, or until both instruction fetch buffers are full when there is a branch instruction. Be done. The instruction fetch buffer A3 and the instruction fetch buffer B4 are equivalent, and either one may be used first. In the following description, it is assumed that the instruction fetch buffer is always full.
【0057】図5において、命令N−3より以前に実行
された命令については、本発明の説明とは無関係なので
説明を加えない。また、命令フェッチ部2によって、図
3の命令列のうち分岐命令までの命令列と分岐命令に後
続する命令列は順次命令フェッチバッファA3に格納さ
れ、分岐先の命令列は命令フェッチバッファB4に格納
されている。以下、順を追って説明する。In FIG. 5, the instructions executed before the instruction N-3 are irrelevant to the description of the present invention and will not be described. Further, the instruction fetch unit 2 stores the instruction sequence up to the branch instruction and the instruction sequence subsequent to the branch instruction in the instruction sequence of FIG. 3 in the sequential instruction fetch buffer A3, and the branch destination instruction sequence in the instruction fetch buffer B4. It is stored. Hereinafter, description will be made step by step.
【0058】(1)命令解読部7は、命令フェッチバッ
ファA3から命令を読みだし、その命令にモードを付加
して命令解読バッファ6に格納する。命令フェッチバッ
ファA3に格納されている図6のN−3からN+2まで
の命令は、命令解読部7によって読み出されてモード”
00”が付加され、命令解読バッファ6に格納される。
この時点の命令解読バッファ6の保持内容を図6に示
す。(1) The instruction decoding unit 7 reads an instruction from the instruction fetch buffer A3, adds a mode to the instruction, and stores it in the instruction decoding buffer 6. The instructions from N-3 to N + 2 in FIG. 6 stored in the instruction fetch buffer A3 are read by the instruction decoding unit 7 and the mode "
00 "is added and stored in the instruction decoding buffer 6.
The contents held in the instruction decoding buffer 6 at this point are shown in FIG.
【0059】(2)命令解読部7において、データ依存
関係検出回路36は命令間のデータ依存関係をチェック
し、スコアボ−ド管理回路37は使用中のレジスタをチ
ェックし、空き状態検知回路38は演算ユニット管理テ
ーブル12で演算ユニットの空き状況を判断する。これ
らの結果に応じて、命令発行制御回路40は、発行可能
な命令を判別し、命令発行回路39に命令を投機実行で
あるか否か示す識別子を付けて発行させるとともに、当
該命令を命令解読バッファ6から削除する。(2) In the instruction decoding unit 7, the data dependency detecting circuit 36 checks the data dependency between instructions, the scoreboard management circuit 37 checks the register in use, and the empty state detecting circuit 38 The computing unit management table 12 determines the availability of the computing unit. Based on these results, the instruction issuance control circuit 40 determines an issuable instruction, causes the instruction issuance circuit 39 to issue an instruction with an identifier indicating whether it is speculative execution, and decodes the instruction. Delete from buffer 6.
【0060】図6において、命令N−2は、命令N−3
とデータ依存関係があるので最初は発行されない。N−
3、N−1、N、N+1の4つが発行される。投機実行
ではないので各命令の識別子は”0”である。これらの
命令発行後の演算ユニットの状態を表2の1行目に示
す。各演算ユニットは、命令が投入されると、演算ユニ
ット管理テーブル12の対応するビットをセットする。
表2は図5の命令フローを実行したときの演算ユニット
での命令実行の状況を示す。In FIG. 6, instruction N-2 is instruction N-3.
Since it has a data dependency with, it is not issued at first. N-
Four of 3, N-1, N, N + 1 are issued. Since it is not speculative execution, the identifier of each instruction is "0". The state of the arithmetic unit after issuing these instructions is shown in the first line of Table 2. When an instruction is input, each arithmetic unit sets the corresponding bit of the arithmetic unit management table 12.
Table 2 shows the situation of instruction execution in the arithmetic unit when the instruction flow of FIG. 5 is executed.
【0061】[0061]
【表2】 [Table 2]
【0062】(3)演算ユニットは、命令を実行した
後、演算結果を実行順序管理回路17に出力する。投機
実行中の命令ではない(識別子が0である)ので、実行
順序管理回路は、演算結果をレジスタファイル19に直
接書き込む。通常、分岐命令の無い命令列は(1)〜
(3)のように実行される。 (4)命令解読バッファ6は、図6において命令N−2
と命令N+2が残った状態になっている。命令解読部7
の転送制御回路32は、新たな命令を命令フェッチバッ
ファA3から順に読み出し、命令解読バッファ6に格納
する。その際、分岐命令検出回路31が読み出した命令
がBcc_i命令であることを検出すると、転送制御回路3
2は、セレクタ5を交互に切り替えることによって、命
令フェッチバッファA3から分岐命令に後続する命令
(分岐しない場合に続いて実行する命令)と、命令フェ
ッチバッファB4から分岐先命令を交互に読み出し、命
令解読バッファに格納する。これと同時に、モ−ド付加
回路33は、分岐先命令か否かを示すために、現状のモ
ードを”00”とすると、後続する命令には”+01”
を加算して”01”、分岐先の命令には”+10”を加
算して”10”として設定する。すると命令解読バッフ
ァは図7のように命令が格納されることになる。(3) The operation unit outputs the operation result to the execution order management circuit 17 after executing the instruction. Since it is not a speculatively executing instruction (the identifier is 0), the execution order management circuit directly writes the operation result to the register file 19. Usually, the instruction sequence without branch instructions is (1)-
It is executed as in (3). (4) The instruction decoding buffer 6 has the instruction N-2 in FIG.
And the instruction N + 2 remains. Instruction decoding unit 7
The transfer control circuit 32 reads the new instruction from the instruction fetch buffer A3 in sequence and stores it in the instruction decoding buffer 6. At this time, when the branch instruction detection circuit 31 detects that the instruction read is the Bcc_i instruction, the transfer control circuit 3
2 alternately reads the instruction following the branch instruction from the instruction fetch buffer A3 (the instruction to be executed subsequently when no branch occurs) and the branch destination instruction from the instruction fetch buffer B4 alternately by switching the selector 5 Store in decryption buffer. At the same time, the mode addition circuit 33 sets the current mode to "00" to indicate whether the instruction is a branch target instruction, and sets "+01" to the subsequent instruction.
Is added and "01" is added to the branch destination instruction, and "+10" is added to the branch destination instruction to set it as "10". Then, the instruction decoding buffer stores the instruction as shown in FIG.
【0063】(5)命令解読部7は(2)で述べたのと
同様に、発行可能な命令を判別する。前のサイクルで発
行された命令のうち、演算ユニットA8に発行された命
令N−3は2サイクルかかるロード命令のためまだ実行
が完了していない。そのため、この命令とデータ依存関
係をもつ命令N−2は、もう1サイクル命令発行が遅ら
される。この処理サイクルでは、命令N+2、Bcc_i、
命令N+3、命令Mが発行可能であると判別される。命
令発行制御回路40は、命令発行回路39を介して、命
令N+2を演算ユニットD11に、Bcc_i命令を命令実
行整合性維持回路18に、命令N+3を演算ユニットB
9に、命令Mを演算ユニットC10に、識別子を付加し
て発行するとともに、命令解読バッファ6から削除す
る。これらの命令に付加される識別子は、同順に0、
0、1、1である。命令発行後の各演算ユニットの状態
を表2の2行目に示す。発行された各命令は、次の(6
−1)〜(6−4)のように実行される。(5) The instruction decoding unit 7 determines an issuable instruction in the same manner as described in (2). Of the instructions issued in the previous cycle, the instruction N-3 issued to the arithmetic unit A8 is a load instruction that takes two cycles, so its execution has not been completed yet. Therefore, the issue of the instruction N-2, which has a data dependency relationship with this instruction, is delayed by another cycle. In this processing cycle, instructions N + 2, Bcc_i,
It is determined that the instruction N + 3 and the instruction M can be issued. The instruction issue control circuit 40 sends the instruction N + 2 to the arithmetic unit D11, the Bcc_i instruction to the instruction execution consistency maintaining circuit 18, and the instruction N + 3 to the arithmetic unit B via the instruction issue circuit 39.
9, the instruction M is issued to the arithmetic unit C10 with an identifier added, and is deleted from the instruction decoding buffer 6. The identifiers added to these commands are 0,
0, 1, 1. The state of each arithmetic unit after the instruction is issued is shown in the second line of Table 2. Each issued instruction is
-1) to (6-4) are executed.
【0064】(6−1)演算ユニットD11は、命令N
+2が発行されると、演算ユニット管理テーブル12の
対応するビットをセットし、命令を実行する。演算ユニ
ットD11にて命令の実行が終了すると、実行結果が実
行順序管理回路17に出力される。これと同時に、演算
ユニット管理テーブル12の対応するビットがクリアさ
れる。(6-1) The operation unit D11 sends the instruction N
When +2 is issued, the corresponding bit in the arithmetic unit management table 12 is set and the instruction is executed. When the execution of the instruction is completed in the arithmetic unit D11, the execution result is output to the execution order management circuit 17. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared.
【0065】実行順序管理回路17は、命令N+2が投
機実行モード下の実行ではない(識別子が0である)の
で、演算結果を実行順序管理バッファ13へは格納せ
ず、レジスタファイル19へ書き込む。 (6−2)Bcc-i命令は、演算ユニットには発行されず
に、命令発行制御回路40によって、初期モード保持回
路14にこの分岐命令自身のモ−ド”00”が、投機実
行種類保持回路15にBcc-i命令であることが、投機実
行状態指示回路16に投機実行中であることを示すフラ
グが、命令実行整合性維持回路18にその命令の条件が
セットされる。これ以降は投機実行状態に入る。Since the instruction N + 2 is not executed in the speculative execution mode (the identifier is 0), the execution order management circuit 17 does not store the operation result in the execution order management buffer 13 but writes it in the register file 19. (6-2) The Bcc-i instruction is not issued to the arithmetic unit, and the instruction issue control circuit 40 causes the initial mode holding circuit 14 to hold the mode "00" of the branch instruction itself and hold the speculative execution type. The flag indicating that the Bcc-i instruction is the circuit 15 is set in the speculative execution state instruction circuit 16 and the condition of the instruction is set in the instruction execution consistency maintaining circuit 18. After this, the speculative execution state is entered.
【0066】(6−3)演算ユニットB9は、命令N+
3が発行されると、演算ユニット管理テーブル12の対
応するビットをセットし、命令を実行する。演算ユニッ
トB9にて命令の実行が終了すると、実行結果が実行順
序管理回路17に出力される。これと同時に、演算ユニ
ット管理テーブル12の対応するビットがクリアされ
る。(6-3) The operation unit B9 sends the instruction N +
When 3 is issued, the corresponding bit in the arithmetic unit management table 12 is set and the instruction is executed. When the execution of the instruction is completed in the arithmetic unit B9, the execution result is output to the execution order management circuit 17. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared.
【0067】実行順序管理回路17は、この命令が投機
実行下の命令(識別子が1)なので、実行順序管理バッ
ファ13に書き込み先のレジスタ番号とモード”01”
を書き込む。 (6−4)演算ユニットC10は、命令Mが発行される
と、演算ユニット管理テーブル12の対応するビットを
セットし、命令を実行する。演算ユニットB9にて命令
の実行が終了すると、実行結果が実行順序管理回路17
に出力される。これと同時に、演算ユニット管理テーブ
ル12の対応するビットがクリアされる。Since this instruction is a speculatively executed instruction (identifier is 1), the execution order management circuit 17 writes the register number of the write destination to the execution order management buffer 13 and the mode "01".
Write. (6-4) When the instruction M is issued, the arithmetic unit C10 sets the corresponding bit in the arithmetic unit management table 12 and executes the instruction. When the execution of the instruction is completed in the arithmetic unit B9, the execution result is the execution order management circuit 17
Is output to. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared.
【0068】実行順序管理回路17は、この命令が投機
実行下の命令(識別子が1)なので、実行順序管理バッ
ファ13に書き込み先のレジスタ番号とモード”10”
を書き込む。 (7)この時点で実行順序管理バッファ13には図9の
2行目まで積まれることになる。Since this instruction is an instruction under speculative execution (the identifier is 1), the execution order management circuit 17 writes the register number of the write destination to the execution order management buffer 13 and the mode "10".
Write. (7) At this point, the execution order management buffer 13 is stacked up to the second line in FIG.
【0069】(8)また、命令解読バッファは図8のよ
うになる。次のサイクルでは命令N−3が完了している
ので、命令解読部7は一連の処理を行ない命令N−2、
N+4、M+1を発行する。命令発行後の各演算ユニッ
トの状態を表2の3行目に示す。これらの命令実行が終
了した時点で、実行順序管理バッファ13は図9の4行
目まで積まれることになる。(8) The instruction decoding buffer is as shown in FIG. In the next cycle, since the instruction N-3 is completed, the instruction decoding unit 7 performs a series of processes and then the instruction N-2,
Issues N + 4 and M + 1. The state of each arithmetic unit after the instruction is issued is shown in the third line of Table 2. When the execution of these instructions is completed, the execution order management buffer 13 is stacked up to the fourth line in FIG.
【0070】(9)上記のように演算ユニットは投入さ
れた命令を実行し、新たな命令を処理可能になれば演算
ユニット管理テーブル12の対応するビットをクリアす
る。命令解読部7は、新たな命令を処理できるようにな
れば、命令の発行処理を再開する。 (10)PSRを変更する命令N−2は、表2の3行目に
示すように演算ユニットBで実行される。命令N−2が
完了しPSRが確定すると、演算ユニットBは投機実行状
態指示回路16のフラグをクリアする。命令N−2が完
了しても、投機実行は、表2の4行目まで実行され、実
行順序管理バッファ13には図9の6行目まで投機実行
中の命令が登録される。(9) As described above, the arithmetic unit executes the input instruction and clears the corresponding bit of the arithmetic unit management table 12 when a new instruction can be processed. When the instruction decoding unit 7 can process a new instruction, it restarts the instruction issuing process. (10) The instruction N-2 for changing the PSR is executed by the arithmetic unit B as shown in the third line of Table 2. When the instruction N-2 is completed and the PSR is confirmed, the arithmetic unit B clears the flag of the speculative execution state instruction circuit 16. Even if the instruction N-2 is completed, the speculative execution is executed up to the fourth line in Table 2, and the execution-order management buffer 13 registers the speculatively executed command up to the sixth line in FIG.
【0071】(11)命令実行整合性維持回路18は、
投機実行状態指示回路16のフラグがクリアされたこと
から、投機実行種類保持回路15よりBcc_i命令である
ことと、PSRの値に基づいて、分岐するか否かを判断す
る。この例では分岐すると仮定する。命令実行整合性維
持回路18は、Bcc_i命令であることから実行順序管理
バッファ13内部の後続する命令列(分岐しない側の命
令列)の演算結果はもう必要がないので、初期モード保
持回路14の初期モード”00”に”+01”を加算し
て、モードが”01”である命令の演算結果を無効化す
る。図9において命令N+3,N+4,N+5は無効化
(クリア)される。また、命令解読部7に対して分岐す
ることを通知し、以降分岐先の命令のみを命令解読バッ
ファ6に取り込むようにさせる。(11) The instruction execution consistency maintaining circuit 18
Since the flag of the speculative execution state instruction circuit 16 has been cleared, the speculative execution type holding circuit 15 determines whether or not to branch based on the Bcc_i instruction and the value of PSR. In this example it is assumed that there is a branch. Since the instruction execution consistency maintaining circuit 18 is a Bcc_i instruction, the operation result of the subsequent instruction sequence (instruction sequence on the non-branching side) in the execution order management buffer 13 is not necessary anymore, so that the initial mode holding circuit 14 "+01" is added to the initial mode "00" to invalidate the operation result of the instruction whose mode is "01". In FIG. 9, the instructions N + 3, N + 4, N + 5 are invalidated (cleared). Further, the instruction decoding unit 7 is notified of branching, and only the instruction at the branch destination is fetched into the instruction decoding buffer 6 thereafter.
【0072】(12)実行順序管理回路17は、命令実
行整合性維持回路18より、分岐が確定し、投機実行モ
ードが終了したことを通知される。そして、実行順序管
理バッファ13内に存在する分岐先の命令列(モード
が”10”の命令)に対しては、演算結果を対応するレ
ジスタファイル19のレジスタに格納する。 以上のように、条件分岐命令Bcc_iの場合の投機実行で
なされた処理は、分岐することが確定した後の処理と、
連続性を維持している。しかも、およそ半分の投機実行
結果は有効になるから、その分高速に処理されることに
なる。(12) The execution order management circuit 17 is notified by the instruction execution consistency maintaining circuit 18 that the branch has been decided and the speculative execution mode has ended. Then, with respect to the branch destination instruction string (instruction whose mode is “10”) existing in the execution order management buffer 13, the operation result is stored in the register of the corresponding register file 19. As described above, the processing performed by the speculative execution in the case of the conditional branch instruction Bcc_i is the processing after the branch is confirmed,
Maintains continuity. Moreover, about half of the speculative execution result is valid, and therefore the processing is performed at a high speed.
【0073】続いて、Bcc-l命令を含む場合について、
その動作を図10〜図14及び表3を併用して説明す
る。図10はBcc_l命令高速に処理する本実施例の動作
を説明するための命令フローの一例である。命令実行順
序は矢印の通りである。また、命令N+4と命令N+7
とはデータの依存関係があるとする。命令N+7は条件
分岐命令の分岐判定の基になるPSRを変更する命令であ
る。同図において、命令Nまでに実行されている命令が
あるが本発明の説明には関係しないので説明を加えな
い。また、命令フェッチ部2によって、図10の命令列
のうち分岐命令までの命令列と後続する命令列は順次命
令フェッチバッファA3に格納されており、分岐先命令
列は命令フェッチバッファB4に格納されている。以
後、順を追って説明する。Then, in the case of including the Bcc-l instruction,
The operation will be described with reference to FIGS. 10 to 14 and Table 3. FIG. 10 is an example of an instruction flow for explaining the operation of the present embodiment for processing the Bcc_l instruction at high speed. The instruction execution order is as shown by the arrow. Also, instruction N + 4 and instruction N + 7
And have a data dependency. The instruction N + 7 is an instruction for changing the PSR that is the basis of the branch determination of the conditional branch instruction. In the figure, there is an instruction executed up to the instruction N, but since it is not related to the description of the present invention, the description will not be added. Further, the instruction fetch unit 2 stores the instruction sequence up to the branch instruction and the subsequent instruction sequence in the instruction sequence of FIG. 10 sequentially in the instruction fetch buffer A3, and the branch destination instruction sequence in the instruction fetch buffer B4. ing. Hereinafter, the steps will be described in order.
【0074】(1)命令解読部7は命令フェッチバッフ
ァA3より命令を読みだし、その命令にモ−ドを付加し
て命令解読バッファ6に格納する。格納される命令のモ
ードは”01”とする。今、命令解読バッファ6は図1
1の状態になっているとする。 (2)命令解読部7において、データ依存関係検出回路
36は命令間のデータ依存関係をチェックし、スコアボ
−ド管理回路37は使用中のレジスタをチェックし、空
き状態検知回路38は演算ユニット管理テーブル12で
演算ユニットの空き状況を判断する。これらの結果に応
じて、命令発行制御回路40は、発行可能な命令を判別
し、命令発行回路39に命令を投機実行であるか否か示
す識別子を付けて発行させるとともに、当該命令を命令
解読バッファ6から削除する。(1) The instruction decoding unit 7 reads an instruction from the instruction fetch buffer A3, adds a mode to the instruction, and stores it in the instruction decoding buffer 6. The stored instruction mode is “01”. Now, the instruction decoding buffer 6 is shown in FIG.
It is assumed that the state is 1. (2) In the instruction decoding unit 7, the data dependency detection circuit 36 checks the data dependency between instructions, the scoreboard management circuit 37 checks the register in use, and the empty state detection circuit 38 manages the arithmetic unit. The availability of the arithmetic unit is determined from the table 12. Based on these results, the instruction issuance control circuit 40 determines an issuable instruction, causes the instruction issuance circuit 39 to issue an instruction with an identifier indicating whether it is speculative execution, and decodes the instruction. Delete from buffer 6.
【0075】図11において、命令N+7は、命令N+
4とデータ依存関係があるので最初は発行されない。N
+4,N+5,N+6,N+8の4つが発行される。投
機実行ではないので各命令の識別子は”0”である。こ
れらの命令発行後の演算ユニットの状態を表3の1行目
に示す。表3は同実施例における図8の命令フローを実
行したときの演算ユニットでの命令実行の状況を示す。In FIG. 11, the instruction N + 7 is the instruction N +
It is not issued at first because it has a data dependency relationship with 4. N
Four of +4, N + 5, N + 6 and N + 8 are issued. Since it is not speculative execution, the identifier of each instruction is "0". The state of the arithmetic unit after issuing these instructions is shown in the first row of Table 3. Table 3 shows the situation of instruction execution in the arithmetic unit when the instruction flow of FIG. 8 in the embodiment is executed.
【0076】[0076]
【表3】 [Table 3]
【0077】各演算ユニットは、命令が投入されると、
演算ユニット管理テーブル12の対応するビットをセッ
トする。演算ユニットは、命令を実行した後、演算結果
を実行順序管理回路17に出力する。投機実行中の命令
ではない(識別子が0である)ので、実行順序管理回路
17は、演算結果をレジスタファイル19に直接書き込
む。When an instruction is input to each arithmetic unit,
The corresponding bit in the arithmetic unit management table 12 is set. After executing the instruction, the operation unit outputs the operation result to the execution order management circuit 17. Since the instruction is not speculatively executing (the identifier is 0), the execution order management circuit 17 directly writes the calculation result to the register file 19.
【0078】(3)命令解読バッファ6は、図11にお
いて命令N+7と命令Bcc_lが残った状態になってい
る。命令解読部7の転送制御回路32は、新たな命令列
を命令フェッチバッファA3から読みだす。読みだした
命令がBcc_l命令であることを検出すると、セレクタ5
を切り替えて命令フェッチバッファB4から分岐先の命
令のみを読み出し、命令解読バッファ6に格納する。こ
れと同時に、モ−ド付加回路33は、分岐先の命令か否
かを示すために、現状のモードを”01”とすると、分
岐先の命令には”+10”を加算して”11”として設
定する。すると命令解読バッファは図12のように格納
されたことになる。(3) The instruction decoding buffer 6 is in a state where the instruction N + 7 and the instruction Bcc_l remain in FIG. The transfer control circuit 32 of the instruction decoding unit 7 reads a new instruction sequence from the instruction fetch buffer A3. When it detects that the read instruction is a Bcc_l instruction, the selector 5
, And only the branch destination instruction is read from the instruction fetch buffer B4 and stored in the instruction decoding buffer 6. At the same time, the mode addition circuit 33 adds "+10" to the branch destination instruction to add "+10" to the branch destination instruction in order to indicate whether or not the branch destination instruction is "01". Set as. Then, the instruction decoding buffer is stored as shown in FIG.
【0079】(4)命令解読部7は(2)で述べたのと
同様に、発行可能な命令を判別する。前のサイクルで発
行された命令のうち、演算ユニットA8に発行された命
令N+4は2サイクルかかるロード命令であり、まだ実
行が完了しない。そのため、この命令とデ−タ依存関係
を持つ命令N+7は、もう1サイクル命令発行が遅らさ
れる。この処理サイクルでは、Bcc_l、命令N、命令N
+1、命令N+3が発行可能であると判別される。命令
発行制御回路40は、命令発行回路39を介して、Bcc_
l命令を命令実行整合性維持回路18に、命令Nを演算
ユニットB9に、命令N+1を演算ユニットC10に、
命令N+3を演算ユニットD11に、識別子を付加して
発行するとともに、命令解読バッファ6から削除する。
これらの命令に付加される識別子は、同順に0、1、
1、1である。(4) The instruction decoding unit 7 determines an issuable instruction in the same manner as described in (2). Of the instructions issued in the previous cycle, the instruction N + 4 issued to the arithmetic unit A8 is a load instruction that takes two cycles and its execution is not completed yet. Therefore, the issue of the instruction N + 7 having a data dependency relationship with this instruction is delayed by another cycle. In this processing cycle, Bcc_l, instruction N, instruction N
It is determined that +1 and the instruction N + 3 can be issued. The instruction issuance control circuit 40, via the instruction issuance circuit 39, Bcc_
l instruction to instruction execution consistency maintaining circuit 18, instruction N to arithmetic unit B9, instruction N + 1 to arithmetic unit C10,
The instruction N + 3 is issued to the arithmetic unit D11 with an identifier added and issued, and is deleted from the instruction decoding buffer 6.
The identifiers added to these commands are 0, 1, and
It is 1, 1.
【0080】命令発行後の各演算ユニットの状態を表3
の2行目に示す。発行された各命令は、次の(5−1)
〜(5−4)のように実行される。 (5−1)Bcc-l命令は、演算ユニットには発行されず
に、命令発行制御回路40によって、初期モード保持回
路14にこの分岐命令自身のモ−ド”01”が、投機実
行種類保持回路15にBcc-l命令であることが、投機実
行状態指示回路16に投機実行中であることを示すフラ
グが、命令実行整合性維持回路18にその命令の条件が
セットされる。これ以降は投機実行状態に入る。Table 3 shows the state of each arithmetic unit after the instruction is issued.
It is shown in the second line of. Each issued instruction has the following (5-1)
~ (5-4) is executed. (5-1) The Bcc-l instruction is not issued to the arithmetic unit, and the instruction issue control circuit 40 causes the initial mode holding circuit 14 to hold the mode "01" of the branch instruction itself and hold the speculative execution type. The flag indicating that the Bcc-1 instruction is the circuit 15 is set in the speculative execution state instruction circuit 16 and the condition of the instruction is set in the instruction execution consistency maintaining circuit 18 in the circuit 15. After this, the speculative execution state is entered.
【0081】(5−2)演算ユニットB9は、命令Nが
発行されると、演算ユニット管理テーブル12の対応す
るビットをセットし、命令を実行する。演算ユニットB
9にて命令の実行が終了すると、実行結果が実行順序管
理回路17に出力される。これと同時に、演算ユニット
管理テーブル12の対応するビットがクリアされる。実
行順序管理回路17は、この命令が投機実行下の命令
(識別子が1)なので、実行順序管理バッファ13に書
き込み先のレジスタ番号とモード”11”を書き込む。(5-2) When the instruction N is issued, the arithmetic unit B9 sets the corresponding bit in the arithmetic unit management table 12 and executes the instruction. Arithmetic unit B
When the execution of the instruction is completed at 9, the execution result is output to the execution order management circuit 17. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared. Since this instruction is an instruction under speculative execution (the identifier is 1), the execution order management circuit 17 writes the register number of the write destination and the mode “11” in the execution order management buffer 13.
【0082】(5−3)演算ユニットC10は、命令N
+1が発行されると、演算ユニット管理テーブル12の
対応するビットをセットし、命令を実行する。演算ユニ
ットB9にて命令の実行が終了すると、実行結果が実行
順序管理回路17に出力される。これと同時に、演算ユ
ニット管理テーブル12の対応するビットがクリアされ
る。(5-3) The operation unit C10 receives the instruction N
When +1 is issued, the corresponding bit in the arithmetic unit management table 12 is set and the instruction is executed. When the execution of the instruction is completed in the arithmetic unit B9, the execution result is output to the execution order management circuit 17. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared.
【0083】実行順序管理回路17は、この命令が投機
実行下の命令(識別子が1)なので、実行順序管理バッ
ファ13に書き込み先のレジスタ番号とモード”11”
を書き込む。 (5−4)演算ユニットD11は、命令N+3が発行さ
れると、演算ユニット管理テーブル12の対応するビッ
トをセットし、命令を実行する。演算ユニットD11に
て命令の実行が終了すると、実行結果が実行順序管理回
路17に出力される。これと同時に、演算ユニット管理
テーブル12の対応するビットがクリアされる。Since this instruction is an instruction under speculative execution (identifier is 1), the execution order management circuit 17 writes the register number of the write destination to the execution order management buffer 13 and the mode "11".
Write. (5-4) When the instruction N + 3 is issued, the arithmetic unit D11 sets the corresponding bit in the arithmetic unit management table 12 and executes the instruction. When the execution of the instruction is completed in the arithmetic unit D11, the execution result is output to the execution order management circuit 17. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared.
【0084】実行順序管理回路17は、命令N+2が投
機実行下の実行である(識別子が1である)ので、演算
結果をレジスタファイル19には書き込まず、実行順序
管理バッファ13へは格納する。 (6)この時点で、実行順序管理バッファ13には図1
4の3行目まで積まれることになる。Since the instruction N + 2 is an execution under speculative execution (the identifier is 1), the execution order management circuit 17 does not write the operation result in the register file 19 but stores it in the execution order management buffer 13. (6) At this point, the execution order management buffer 13 stores the data in FIG.
It will be stacked up to the 3rd row of 4.
【0085】(7)また、命令解読バッファ6は図13
のようになる。次のサイクルでは命令N+4が完了して
いるので、命令解読部7は一連の処理を行ない命令N+
7,N+2を発行する。命令発行後の演算ユニットの状
態を表3の3行目に示す。これらの命令実行が終了した
時点で、実行順序管理バッファには図14の4行目まで
積まれることになる。(7) Further, the instruction decoding buffer 6 is shown in FIG.
become that way. In the next cycle, since the instruction N + 4 is completed, the instruction decoding unit 7 performs a series of processes to execute the instruction N + 4.
Issue 7, N + 2. The state of the arithmetic unit after the instruction is issued is shown in the third line of Table 3. When the execution of these instructions is completed, the execution order management buffer is stacked up to the fourth line in FIG.
【0086】(8)上記のように演算ユニットは投入さ
れた命令を実行し、新たな命令を処理可能になれば演算
ユニット管理テーブル12の対応するビットをクリアす
る。命令解読部7は、新たな命令を処理できるようにな
れば、命令の発行処理を再開する。 (9)PSRを変更する命令N+7は、表3の3行目に示
すように演算ユニットBで実行される。命令N+7が完
了しPSRが確定すると、演算ユニットBは投機実行状態
指示回路16のフラグをクリアする。命令N+7が完了
しても、投機実行は、表3の4行目まで実行される。(8) As described above, the arithmetic unit executes the input instruction and clears the corresponding bit of the arithmetic unit management table 12 when a new instruction can be processed. When the instruction decoding unit 7 can process a new instruction, it restarts the instruction issuing process. (9) The instruction N + 7 for changing the PSR is executed by the arithmetic unit B as shown in the third line of Table 3. When the instruction N + 7 is completed and PSR is confirmed, the arithmetic unit B clears the flag of the speculative execution state instruction circuit 16. Even if the instruction N + 7 is completed, the speculative execution is executed up to the fourth line in Table 3.
【0087】(10)命令実行整合性維持回路18は、
投機実行状態指示回路16がクリアされたことから、投
機実行種類保持回路15よりBcc_l命令であること、PSR
の値に基づいて、分岐するか否かを判断する。ここでは
分岐すると仮定する。 (11)実行順序管理回路17は、命令実行整合性維持
回路18より、分岐が確定し、投機実行モードが終了し
たことを通知される。そして、実行順序管理バッファ1
3内に存在する分岐先の命令列(モードが”11”の命
令)に対しては、演算結果を対応するレジスタファイル
19のレジスタに格納する。(10) The instruction execution consistency maintaining circuit 18
Since the speculative execution state instruction circuit 16 has been cleared, the speculative execution type holding circuit 15 indicates that it is a Bcc_l instruction, PSR
It is determined whether or not to branch based on the value of. Here, it is assumed that branching occurs. (11) The execution order management circuit 17 is notified by the instruction execution consistency maintaining circuit 18 that the branch has been decided and the speculative execution mode has ended. Then, the execution order management buffer 1
For a branch destination instruction sequence (instruction of mode “11”) existing in 3, the operation result is stored in the corresponding register of the register file 19.
【0088】以上のように、条件分岐命令Bcc_lの投機
実行および分岐確定後の処理が、投機実行しない場合と
同様に整合性を維持して実行できる。また、(10)に
て分岐しないと確定した場合には以下のようになる。 (11)命令実行整合性維持回路は、分岐しないと判断
した後、投機実行種類保持回路15を参照してBcc_l命
令であることから、実行順序管理バッファ13内の分岐
先命令の演算結果をすべて無効化する。図14において
命令N,N+1,N+3,N+2は無効化(クリア)され
る。また、命令解読部7に対して分岐しないことを通知
し、再度命令フェッチバッファAに残されている後続す
る命令を命令解読バッファ6に取り込むよう処理をやり
直しさせる。As described above, the speculative execution of the conditional branch instruction Bcc_l and the processing after the branch determination can be executed with the consistency maintained as in the case where the speculative execution is not executed. Further, when it is determined in (10) that the branch is not made, the following is performed. (11) The instruction execution consistency maintaining circuit refers to the speculative execution type holding circuit 15 after determining that the branch is not to be performed, and therefore the instruction execution consistency maintaining circuit is the Bcc_l instruction. Disable. In FIG. 14, the instructions N, N + 1, N + 3, N + 2 are invalidated (cleared). Further, the instruction decoding unit 7 is notified that the branch is not performed, and the processing is redone to fetch the subsequent instruction remaining in the instruction fetch buffer A into the instruction decoding buffer 6.
【0089】(12)実行順序管理回路17は、命令実
行整合性維持回路18より、分岐しないことが確定し、
投機実行モードが終了したことを通知される。そして、
実行順序管理バッファ内の命令の演算結果はすべて無効
化されているため何もしない。 以上のように、条件分岐命令Bcc_lによる投機実行でな
された処理は、分岐しないことが確定した後の処理に生
かされることはなく、高速化には寄与していない。しか
し、条件分岐命令Bcc_lは分岐しない確率が低いので、
このようなケ−スが起こる確率も低く、1回の投機実行
のみを見るのではなく、プログラム全体の全ての投機実
行を併せて見ると、高速化されることになる。また、こ
のケ−スでも、条件分岐命令より前の処理は、分岐しな
いことが確定した後の処理と連続性を維持している。(12) The execution order management circuit 17 determines from the instruction execution consistency maintaining circuit 18 that no branch occurs,
You are notified that the speculative execution mode has ended. And
Nothing is done because all the operation results of the instructions in the execution order management buffer are invalidated. As described above, the processing performed by the speculative execution by the conditional branch instruction Bcc_l is not used for the processing after it is determined that the branch is not made, and does not contribute to the speedup. However, since the conditional branch instruction Bcc_l has a low probability of not branching,
The probability of occurrence of such a case is low, and not only one speculative execution but one speculative execution of the entire program is speeded up. Also in this case, the processing before the conditional branch instruction maintains continuity with the processing after it is determined that the branch is not taken.
【0090】最後に、Bcc-n命令を含む場合について、
その動作を図15〜図19及び表4を併用して説明す
る。図15はBcc-n命令高速に処理する本実施例の動作
を説明するための命令フローの一例である。先のBcc-l
命令の説明で述べた(1)(2)までは、Bcc_n命令の
場合も同じであるので、ここでは、説明を省略する。Finally, in the case of including the Bcc-n instruction,
The operation will be described with reference to FIGS. 15 to 19 and Table 4. FIG. 15 is an example of an instruction flow for explaining the operation of the present embodiment for processing a Bcc-n instruction at high speed. Bcc-l
The description up to (1) and (2) described in the description of the instruction is the same for the Bcc_n instruction, so the description is omitted here.
【0091】(3)命令解読バッファ6は、図16にお
いて命令N+7と命令Bcc-nが残った状態になってい
る。命令解読部7の転送制御回路32は、新たな命令列
を命令フェッチバッファA3から読みだす。読みだした
命令がBcc-n命令であることを検出すると、引き続き命
令フェッチバッファA3から分岐命令に後続する(分岐
しない側の)命令のみを読み出し、命令解読バッファ6
に格納する。これと同時に、モ−ド付加回路33は、分
岐先の命令か否かを示すために、現状のモードを”0
1”とすると、分岐先の命令には”+01”を加算し
て”10”として設定する。すると命令解読バッファは
図17のように格納されることになる。(3) The instruction decoding buffer 6 is in a state in which the instruction N + 7 and the instruction Bcc-n remain in FIG. The transfer control circuit 32 of the instruction decoding unit 7 reads a new instruction sequence from the instruction fetch buffer A3. When it is detected that the read instruction is the Bcc-n instruction, only the instruction following the branch instruction (on the side not branching) is continuously read from the instruction fetch buffer A3, and the instruction decoding buffer 6 is read.
To store. At the same time, the mode addition circuit 33 sets the current mode to "0" in order to indicate whether or not the instruction is the branch destination.
If it is "1", "+01" is added to the instruction at the branch destination and set as "10." Then, the instruction decoding buffer is stored as shown in FIG.
【0092】(4)命令解読部7は、発行可能な命令を
判別する。前のサイクルで発行された命令のうち、演算
ユニットA8に発行された命令N+4は2サイクルかか
るロード命令であり、まだ実行が完了しない。そのた
め、この命令とデ−タ依存関係を持つ命令N+7は、も
う1サイクル命令発行が遅らされる。この処理サイクル
では、Bcc-n、命令N+9、命令N+10、命令N+1
1が発行可能であると判別される。命令発行制御回路4
0は、命令発行回路39を介して、Bcc-n命令を命令実
行整合性維持回路18に、命令N+9を演算ユニットB
9に、命令N+10を演算ユニットC10に、命令N+
11を演算ユニットD11に、識別子を付加して発行す
るとともに、命令解読バッファ6から削除する。これら
の命令に付加される識別子は、同順に0、1、1、1で
ある。(4) The instruction decoding section 7 determines an issuable instruction. Of the instructions issued in the previous cycle, the instruction N + 4 issued to the arithmetic unit A8 is a load instruction that takes two cycles and its execution is not completed yet. Therefore, the issue of the instruction N + 7 having a data dependency relationship with this instruction is delayed by another cycle. In this processing cycle, Bcc-n, instruction N + 9, instruction N + 10, instruction N + 1
It is determined that 1 can be issued. Instruction issue control circuit 4
0 is the Bcc-n instruction to the instruction execution consistency maintaining circuit 18 and the instruction N + 9 is the arithmetic unit B via the instruction issuing circuit 39.
9, the instruction N + 10 to the arithmetic unit C10, the instruction N +
11 is issued to the arithmetic unit D11 with an identifier added, and is deleted from the instruction decoding buffer 6. The identifiers added to these commands are 0, 1, 1, 1 in the same order.
【0093】命令発行後の各演算ユニットの状態を表4
の2行目に示す。表4は同実施例における図15の命令
フローを実行したときの演算ユニットでの命令実行の状
況である。Table 4 shows the state of each arithmetic unit after the instruction is issued.
It is shown in the second line of. Table 4 shows the situation of instruction execution in the arithmetic unit when the instruction flow of FIG. 15 in the embodiment is executed.
【0094】[0094]
【表4】 [Table 4]
【0095】発行された各命令は、次の(5−1)〜
(5−4)のように実行される。 (5−1)Bcc-n命令は、演算ユニットには発行されず
に、命令発行制御回路40によって、初期モード保持回
路14にこの分岐命令自身のモ−ド”01”が、投機実
行種類保持回路15にBcc-n命令であることが、投機実
行状態指示回路16に投機実行中であることを示すフラ
グが、命令実行整合性維持回路18にその命令の条件が
セットされる。これ以降は投機実行状態に入る。Each issued instruction has the following (5-1)-
It is executed as in (5-4). (5-1) The Bcc-n instruction is not issued to the arithmetic unit, and the instruction issue control circuit 40 causes the initial mode holding circuit 14 to hold the mode "01" of the branch instruction itself and hold the speculative execution type. The flag indicating that the Bcc-n instruction is the circuit 15 is set in the speculative execution state instruction circuit 16 and the condition of the instruction is set in the instruction execution consistency maintaining circuit 18 in the circuit 15. After this, the speculative execution state is entered.
【0096】(5−2)演算ユニットB9は、命令N+
9が発行されると、演算ユニット管理テーブル12の対
応するビットをセットし、命令を実行する。演算ユニッ
トB9にて命令の実行が終了すると、実行結果が実行順
序管理回路17に出力される。これと同時に、演算ユニ
ット管理テーブル12の対応するビットがクリアされ
る。(5-2) The operation unit B9 sends the instruction N +
When 9 is issued, the corresponding bit in the arithmetic unit management table 12 is set and the instruction is executed. When the execution of the instruction is completed in the arithmetic unit B9, the execution result is output to the execution order management circuit 17. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared.
【0097】実行順序管理回路17は、この命令が投機
実行下の命令(識別子が1)なので、実行順序管理バッ
ファ13に書き込み先のレジスタ番号とモード”10”
を書き込む。 (5−3)演算ユニットC10は、命令N+10が発行
されると、演算ユニット管理テーブル12の対応するビ
ットをセットし、命令を実行する。演算ユニットB9に
て命令の実行が終了すると、実行結果が実行順序管理回
路17に出力される。これと同時に、演算ユニット管理
テーブル12の対応するビットがクリアされる。Since this instruction is an instruction under speculative execution (identifier is 1), the execution order management circuit 17 writes the register number of the write destination to the execution order management buffer 13 and the mode "10".
Write. (5-3) When the instruction N + 10 is issued, the arithmetic unit C10 sets the corresponding bit of the arithmetic unit management table 12 and executes the instruction. When the execution of the instruction is completed in the arithmetic unit B9, the execution result is output to the execution order management circuit 17. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared.
【0098】実行順序管理回路17は、この命令が投機
実行下の命令(識別子が1)なので、実行順序管理バッ
ファ13に書き込み先のレジスタ番号とモード”10”
を書き込む。 (5−4)演算ユニットD11は、命令N+11が発行
されると、演算ユニット管理テーブル12の対応するビ
ットをセットし、命令を実行する。演算ユニットD11
にて命令の実行が終了すると、実行結果が実行順序管理
回路17に出力される。これと同時に、演算ユニット管
理テーブル12の対応するビットがクリアされる。Since this instruction is an instruction under speculative execution (the identifier is 1), the execution order management circuit 17 writes the register number of the write destination to the execution order management buffer 13 and the mode "10".
Write. (5-4) When the instruction N + 11 is issued, the arithmetic unit D11 sets the corresponding bit in the arithmetic unit management table 12 and executes the instruction. Arithmetic unit D11
When the execution of the instruction is completed at, the execution result is output to the execution order management circuit 17. At the same time, the corresponding bit in the arithmetic unit management table 12 is cleared.
【0099】実行順序管理回路17は、命令N+2が投
機実行下の実行である(識別子が1である)ので、演算
結果をレジスタファイル19には書き込まず、実行順序
管理バッファ13へ格納する。 (6)この時点で、実行順序管理バッファ13には図1
9の3行目まで積まれることになる。Since the instruction N + 2 is an execution under speculative execution (the identifier is 1), the execution order management circuit 17 stores the operation result in the execution order management buffer 13 without writing it in the register file 19. (6) At this point, the execution order management buffer 13 stores the data in FIG.
It will be stacked up to the 3rd row of 9.
【0100】(7)また、命令解読バッファ6は図18
のようになる。次のサイクルでは命令N+4が完了して
いるので、命令解読部7は一連の処理を行ない命令N+
7、N+12、N+13を発行する。命令発行後の演算
ユニットの状態を表4の3行目に示す。これらの命令実
行が終了した時点で、実行順序管理バッファには図19
の5行目まで積まれることになる。(7) Further, the instruction decoding buffer 6 is shown in FIG.
become that way. In the next cycle, since the instruction N + 4 is completed, the instruction decoding unit 7 performs a series of processes to execute the instruction N + 4.
Issue 7, N + 12 and N + 13. The state of the arithmetic unit after the instruction is issued is shown in the third line of Table 4. When the execution of these instructions is completed, the execution order management buffer stores the data in FIG.
Will be stacked up to the 5th line.
【0101】(8)上記のように演算ユニットは投入さ
れた命令を実行し、新たな命令を処理可能になれば演算
ユニット管理テーブル12の対応するビットをクリアす
る。命令解読部7は、新たな命令を処理できるようにな
れば、命令の発行処理を再開する。 (9)PSRを変更する命令N+7は、表4の3行目に示
すように演算ユニットBで実行される。命令N+7が完
了しPSRが確定すると、演算ユニットBは投機実行状態
指示回路16のフラグをクリアする。命令N+7が完了
しても、投機実行は、表4の4行目まで実行される。(8) As described above, the arithmetic unit executes the input instruction and clears the corresponding bit of the arithmetic unit management table 12 when a new instruction can be processed. When the instruction decoding unit 7 can process a new instruction, it restarts the instruction issuing process. (9) The instruction N + 7 for changing the PSR is executed by the arithmetic unit B as shown in the third line of Table 4. When the instruction N + 7 is completed and PSR is confirmed, the arithmetic unit B clears the flag of the speculative execution state instruction circuit 16. Even if the instruction N + 7 is completed, the speculative execution is executed up to the fourth line in Table 4.
【0102】(10)命令実行整合性維持回路18は、
投機実行状態指示回路16がクリアされたことから、投
機実行種類保持回路15よりBcc-n命令であること、PSR
の値に基づいて、分岐するか否かを判断する。ここでは
分岐しないと仮定する。 (11)実行順序管理回路17は、命令実行整合性維持
回路18より、分岐しないことが確定し、投機実行モー
ドが終了したことを通知される。そして、実行順序管理
バッファ13内に存在する分岐命令に後続する命令列
(モードが”10”の命令)に対しては、演算結果を対
応するレジスタファイル19のレジスタに格納する。(10) The instruction execution consistency maintaining circuit 18
Since the speculative execution state instruction circuit 16 has been cleared, the speculative execution type holding circuit 15 indicates that it is a Bcc-n instruction, and the PSR
It is determined whether or not to branch based on the value of. We assume that we do not branch. (11) The execution order management circuit 17 is notified by the instruction execution consistency maintaining circuit 18 that branching has not been decided and the speculative execution mode has ended. Then, with respect to the instruction sequence (instruction whose mode is “10”) following the branch instruction existing in the execution order management buffer 13, the operation result is stored in the register of the corresponding register file 19.
【0103】以上のように、条件分岐命令Bcc_nによる
投機実行でなされた処理は、分岐しないことが確定した
後の処理と、連続性を維持している。しかも、全ての投
機実行結果は有効であるから、最も効率よく高速に処理
されることになる。また、(10)にて分岐すると確定
した場合には以下のようになる。 (11)命令実行整合性維持回路は、分岐すると判断し
た後、投機実行種類保持回路15を参照してBcc-n命令
であることから、実行順序管理バッファ13内の分岐先
命令の演算結果をすべて無効化する。図19において命
令N+9以降の命令は全て無効化(クリア)される。ま
た、命令解読部7に対して分岐することを通知し、再度
命令フェッチバッファAに分岐先の命令を命令解読バッ
ファ6に取り込むよう処理をやり直しさせる。As described above, the processing performed by the speculative execution by the conditional branch instruction Bcc_n maintains continuity with the processing after it is determined that the branch is not taken. Moreover, since all speculative execution results are valid, they can be processed most efficiently and at high speed. Further, when it is determined that the branch is made in (10), the following is performed. (11) The instruction execution consistency maintaining circuit refers to the speculative execution type holding circuit 15 after determining that the instruction is to be branched, and the instruction execution consistency maintaining circuit determines that it is the Bcc-n instruction. Disable all. In FIG. 19, all the commands after the command N + 9 are invalidated (cleared). Further, the instruction decoding unit 7 is notified of branching, and the instruction fetch buffer A is made to perform the processing again so as to fetch the branch destination instruction into the instruction decoding buffer 6.
【0104】(12)実行順序管理回路17は、命令実
行整合性維持回路18より、分岐しないことが確定し、
投機実行モードが終了したことを通知される。そして、
実行順序管理バッファ内の命令の演算結果はすべて無効
化されているため何もしない。 以上のように、条件分岐命令Bcc_nによる投機実行でな
された処理は、分岐することが確定した後の処理に生か
されることはなく、高速化には寄与していない。しか
し、条件分岐命令Bcc_nは分岐する確率が低いので、こ
のようなケ−スが起こる確率も低く、1回の投機実行の
みを見るのではなく、プログラム全体の全ての投機実行
を併せて見ると、高速化されることになる。また、この
ケ−スでも、条件分岐命令より前の処理は、分岐するこ
とが確定した後の処理と連続性を維持している。(12) The execution order management circuit 17 determines from the instruction execution consistency maintaining circuit 18 that no branch occurs,
You are notified that the speculative execution mode has ended. And
Nothing is done because all the operation results of the instructions in the execution order management buffer are invalidated. As described above, the processing performed by the speculative execution by the conditional branch instruction Bcc_n is not used for the processing after it is decided that the branch is made, and does not contribute to the speedup. However, since the conditional branch instruction Bcc_n has a low probability of branching, the probability of occurrence of such a case is also low, and not only one speculative execution is seen, but all speculative executions of the entire program are combined. , Will be faster. Also in this case, the processing before the conditional branch instruction maintains continuity with the processing after it is decided to branch.
【0105】なお、本実施例では、演算ユニットのパイ
プラインは説明を簡単にするために1段にしている。複
数段にしても演算ユニット管理テーブル12などの変更
だけで済むが、本発明の要旨には関係しない。本実施例
では、命令解読バッファ6に積む順番は交互に積んだ
が、この順番は逆でも、また、命令は1つづつ交互にす
る必要はない。また、命令解読バッファ6自身、必ずし
も備える必要はない。その場合、命令フェッチバッファ
A3、B4からセレクタ5を介して、直接命令解読回路
34の各デコ−ダに対して命令を転送すればよい。In this embodiment, the pipeline of the arithmetic unit has one stage for the sake of simplicity. Even if there are a plurality of stages, only the arithmetic unit management table 12 and the like need be changed, but this is not related to the gist of the present invention. In this embodiment, the instruction decoding buffer 6 is stacked alternately, but the order may be reversed, and it is not necessary to alternate the instructions one by one. Further, the instruction decoding buffer 6 itself does not necessarily have to be provided. In that case, the instruction may be directly transferred from the instruction fetch buffers A3 and B4 to each decoder of the instruction decoding circuit 34 via the selector 5.
【0106】本実施例では、演算ユニットA8〜D11
は説明を簡単にするため、それぞれ機能を限定したがす
べて同等の機能をもつユニットの構成でもよい。本実施
例では、演算結果の格納先がレジスタファイル19であ
るか、実行順序管理バッファ13であるかを区別するた
めに、命令発行の際に命令に識別子を付加することで実
現したが、識別子の代わりにPC値を使用してもよい。
また、命令解読部7は、命令に識別子を付加せずに、実
行順序管理回路17に格納先を指示してもよい。In this embodiment, the arithmetic units A8 to D11 are used.
For simplification of description, the respective functions are limited, but the units may have the same functions. In the present embodiment, in order to distinguish whether the storage destination of the operation result is the register file 19 or the execution order management buffer 13, it is realized by adding an identifier to the instruction when issuing the instruction. You may use PC value instead of.
Further, the instruction decoding unit 7 may instruct the execution order management circuit 17 to store the instruction without adding the identifier to the instruction.
【0107】本実施例では、説明を簡単にするため演算
ユニットの演算結果を最終的にレジスタファイル19の
レジスタに格納する命令(オペランドがレジスタにある
命令)を用いているが、これに限らず、演算結果を最終
的にメモリに格納する命令(オペランドがメモリにある
命令)が用いられていてもよい。その場合例えば、実行
順序管理バッファ13は、演算結果、それが本来格納さ
れるべきメモリのアドレスを指す情報、モ−ドを一時的
に記憶することになり、かつ、実行順序管理回路17
は、演算結果をメモリに書き込む機能を持っていればよ
い。In this embodiment, an instruction (an instruction whose operand is in a register) for finally storing the operation result of the operation unit in the register of the register file 19 is used for simplification of description, but the present invention is not limited to this. An instruction (an instruction whose operand is in the memory) for finally storing the operation result in the memory may be used. In that case, for example, the execution order management buffer 13 will temporarily store the operation result, the information indicating the address of the memory in which it should be stored, and the mode, and the execution order management circuit 17
Need only have a function of writing the calculation result to the memory.
【0108】本実施例では投機実行状態保持回路では状
態を1つしか持てないようにしているため、投機実行し
ている分岐命令は1つに限られているだけで、複数投機
実行してもよい。本実施例では命令解読部で命令が発生
する毎に命令の制御フローが判るように、以下のルール
でモードを付加した。例えば、現在の命令列のモード
が”00”とすると、後続する命令列のモードは”+0
1”を加算して”01”、分岐先の命令のモードは”+
10”を加算して”10”として設定する。このルール
を使用すれば分岐命令までの命令列と後続する命令列と
分岐先の命令列を容易に判断できる。しかし、これは区
別するための一例であり他の方法でも可能である。In this embodiment, since the speculative execution state holding circuit has only one state, only one branch instruction is speculatively executed. Even if plural speculative executions are executed. Good. In this embodiment, a mode is added according to the following rule so that the control flow of the instruction can be understood every time the instruction is generated in the instruction decoding unit. For example, if the current instruction sequence mode is "00", the subsequent instruction sequence mode is "+0".
Add "1" to "01", branch destination instruction mode is "+"
10 "is added and set as" 10 ". By using this rule, it is possible to easily determine the instruction sequence up to the branch instruction, the subsequent instruction sequence, and the branch destination instruction sequence. This is an example, and other methods are possible.
【0109】本実施例では投機実行種類保持回路15で
は状態を1つしか持てないようにしているため、投機実
行の基になる分岐命令は1つに限られている。しかし、
命令列を区別するモードの種類を増加し、初期モード保
持回路14、投機実行種類保持回路15、投機実行状態
指示回路16、命令実行整合性維持回路18を複数備え
ることにより、PSRを変更する命令と分岐命令の対応関
係が明確になるので、複数の分岐命令に対して投機実行
することが可能になる。In this embodiment, since the speculative execution type holding circuit 15 is allowed to have only one state, the speculative execution base branch instruction is limited to one. But,
An instruction for changing the PSR by increasing the types of modes for distinguishing the instruction sequence and providing a plurality of initial mode holding circuits 14, speculative execution type holding circuits 15, speculative execution state instruction circuits 16, and instruction execution consistency maintaining circuits 18 Since the correspondence between the branch instruction and the branch instruction becomes clear, it is possible to speculatively execute a plurality of branch instructions.
【0110】本実施例では、データ依存関係については
解読部は命令発行をout-of-order発行で行なったが、in
-orderでも本発明の主旨には影響しない。以上説明して
きたように本発明の情報処理装置は、Bcc-l、Bcc-i、Bc
c-nの3種類の分岐命令を使い分けることによって、分
岐の確率に合わせて、より高速化が図れる。例えば、プ
ログラミング言語Cで記述されたプログラムにおいて、
コンパイラが、分岐の確率が一般に高いforループに対
してはBcc_l命令を使用し、分岐の確率が不確定なif-th
en-else系の命令に対してはBcc_i命令を使用する。その
上、ループ内の命令列をできるだけ同時実行可能なよう
にスケジューリングすればその効果はより大きくなる。
また、if-then-else系の命令の場合、どちらかに予測し
てもはずれたときの代償が大きいと同時に、分岐をどち
らかに予測して投機実行しても、デ−タ依存関係により
命令を1つずつしか実行できない場合も多くあり、この
ような場合並列実行率が上がらず、結局両方を実行した
場合の方が効果が大きい。In the present embodiment, regarding the data dependency, the decoding unit issues the instruction out-of-order, but in
-order does not affect the gist of the present invention. As described above, the information processing apparatus of the present invention is Bcc-l, Bcc-i, Bc
By properly using the three types of branch instructions of cn, the speed can be further increased according to the branch probability. For example, in a program written in the programming language C,
The compiler uses the Bcc_l instruction for for loops with a high branch probability, and if-th
Use the Bcc_i instruction for en-else instructions. Moreover, the effect becomes even greater if the instruction sequences in the loop are scheduled so that they can be executed simultaneously.
Also, in the case of if-then-else type instructions, even if one is predicted, the cost of misalignment is great, and at the same time, even if the branch is predicted and executed speculatively, it depends on the data dependence. In many cases, only one instruction can be executed. In such a case, the parallel execution rate does not increase, and when both are executed, the effect is greater.
【0111】[0111]
【発明の効果】本発明のプロセッサによれば、条件分岐
命令の条件が確定していなくても、その条件分岐命令の
種類に応じて、投機的に実行する命令列の命令を変える
ことにより、インタ−ロックが少なく、分岐処理を含む
プログラムを高速に実行することができる。特に、複数
命令の同時実行する場合には分岐の条件を変更する命令
と条件分岐命令間の時間差が少なくなり、この効果は大
きい。According to the processor of the present invention, even if the condition of the conditional branch instruction is not fixed, the instruction of the instruction sequence to be speculatively executed is changed according to the type of the conditional branch instruction. A program including branch processing can be executed at high speed with few interlocks. In particular, when a plurality of instructions are executed simultaneously, the time difference between the instruction for changing the branch condition and the conditional branch instruction is reduced, and this effect is great.
【0112】具体的には、つぎの3つ場合を使い分け
る。 第1の種類の条件付き分岐命令の場合には、投機的に
分岐先の命令を複数の演算ユニットに発行し、その演算
結果を一時的に格納しておくとともに、条件が確定し分
岐しないことが判明した場合には、分岐しない側の命令
列を実行することにより、分岐命令の先行処理が可能と
なり、分岐処理が高速化できるという効果がある。この
第1種類の条件付き分岐命令は、分岐する確率が高い場
合に用いられる。Specifically, the following three cases are used properly. In the case of the first type of conditional branch instruction, speculatively issue the branch destination instruction to multiple operation units, temporarily store the operation results, and make sure that the condition is fixed and not branch. If it is found, by executing the instruction sequence on the non-branching side, the preceding processing of the branch instruction becomes possible, and the branch processing can be speeded up. This first type of conditional branch instruction is used when the probability of branching is high.
【0113】第2の種類の条件付き分岐命令の場合に
は、投機的に分岐先の命令と分岐しない側の命令を複数
の演算ユニットに発行し、その演算結果を一時的に格納
しておくとともに、条件が確定した場合には、確定した
側の演算結果のみを有効とすることにより、分岐命令の
先行処理が可能となり、分岐処理が高速化できるという
効果がある。この第2の種類の条件付き分岐命令は、分
岐する確率が不明な場合に用いられる。In the case of the second type of conditional branch instruction, speculatively the branch destination instruction and the non-branch side instruction are issued to a plurality of arithmetic units, and the arithmetic results are temporarily stored. At the same time, when the condition is fixed, only the operation result on the fixed side is validated, so that the branch instruction can be processed in advance, and the branch processing can be speeded up. This second type of conditional branch instruction is used when the probability of branching is unknown.
【0114】第3の種類の条件付き分岐命令の場合に
は、投機的に分岐しない側の命令を複数の演算ユニット
に発行し、その演算結果を一時的に格納しておくととも
に、条件が確定し分岐することが判明した場合には、分
岐する側の命令列を実行することにより、分岐命令の先
行処理が可能となり、分岐処理が高速化できるという効
果がある。この第3の条件付き分岐命令は、分岐しない
確率が高い場合に用いられる。In the case of the third type of conditional branch instruction, the instruction on the side that does not speculatively branch is issued to a plurality of arithmetic units, the arithmetic results are temporarily stored, and the condition is fixed. If it is found that the branching is performed, the branching side instruction sequence is executed to enable the preceding processing of the branching instruction, which has the effect of speeding up the branching processing. The third conditional branch instruction is used when the probability of not branching is high.
【図1】本発明の実施例におけるプロセッサの構成図、FIG. 1 is a configuration diagram of a processor according to an embodiment of the present invention,
【図2】同実施例における命令フェッチ部の詳細な構成
を示すブロック図である。FIG. 2 is a block diagram showing a detailed configuration of an instruction fetch unit in the embodiment.
【図3】命令解読部の詳細な構成を示すブロック図であ
る。FIG. 3 is a block diagram showing a detailed configuration of an instruction decoding unit.
【図4】図4は同実施例における命令のフローに付加さ
れたモードを示したモード説明図である。FIG. 4 is a mode explanatory view showing a mode added to an instruction flow in the embodiment.
【図5】同実施例におけるBcc_i命令を含む命令フロー
図である。FIG. 5 is an instruction flow diagram including a Bcc_i instruction in the embodiment.
【図6】同実施例における図5の命令フローを処理する
ときの命令解読バッファの説明図(その1)である。FIG. 6 is an explanatory diagram (1) of an instruction decoding buffer when processing the instruction flow of FIG. 5 in the embodiment.
【図7】同上(その2)である。FIG. 7 is the same as above (No. 2).
【図8】同上(その3)である。FIG. 8 is the same as above (3).
【図9】同実施例における図5の命令フローを処理する
ときの実行順序管理バッファの説明図、FIG. 9 is an explanatory diagram of an execution order management buffer when processing the instruction flow of FIG. 5 in the same embodiment;
【図10】同実施例におけるBcc_l命令を含む命令フロ
ー図である。FIG. 10 is an instruction flow diagram including a Bcc_l instruction in the embodiment.
【図11】同実施例における図10の命令フローを処理
するときの命令解読バッファ6の説明図(その1)であ
る。FIG. 11 is an explanatory diagram (part 1) of the instruction decoding buffer 6 when processing the instruction flow of FIG. 10 in the embodiment.
【図12】同上(その2)である。FIG. 12 is the same as above (No. 2).
【図13】同上(その3)である。FIG. 13 is the same as above (3).
【図14】同実施例における図10の命令フローを処理
するときの実行順序管理バッファの説明図、FIG. 14 is an explanatory diagram of an execution order management buffer when processing the instruction flow of FIG. 10 in the embodiment.
【図15】同実施例におけるBcc_n命令を含む命令フロ
ー図である。FIG. 15 is an instruction flow diagram including a Bcc_n instruction in the embodiment.
【図16】同実施例における図15の命令フローを処理
するときの命令解読バッファ6の説明図(その1)であ
る。FIG. 16 is an explanatory diagram (1) of the instruction decoding buffer 6 when processing the instruction flow of FIG. 15 in the embodiment.
【図17】同上(その2)である。FIG. 17 is the same as above (No. 2).
【図18】同上(その3)である。FIG. 18 is the same as above (3).
【図19】同実施例における図15の命令フローを処理
するときの実行順序管理バッファの説明図である。FIG. 19 is an explanatory diagram of an execution order management buffer when processing the instruction flow of FIG. 15 in the example.
1 メモリ 2 命令フェッチ部 3 命令フェッチバッファA 4 命令フェッチバッファB 5 セレクタ 6 命令解読バッファ 7 命令解読部 8 演算ユニットA 9 演算ユニットB 10 演算ユニットC 11 演算ユニットD 12 演算ユニット管理テーブル 13 実行順序管理バッファ 14 初期モード保持回路 15 投機実行種類保持回路 16 投機実行状態指示回路 17 実行順序管理回路 18 命令実行整合性維持回路 19 レジスタファイル 20 スコアボ−ド 21 プログラムカウンタ 22 分岐命令検出回路 23 演算回路 31 分岐命令検出回路 32 転送制御回路 33 モ−ド付加回路 34 命令解読回路 34a〜34f デコ−ダ 36 データ依存関係検出回路 37 スコアボ−ド管理回路 38 状態検知回路 39 命令発行回路 39a〜39d セレクタ 40 命令発行制御回路 1 memory 2 instruction fetch unit 3 instruction fetch buffer A 4 instruction fetch buffer B 5 selector 6 instruction decoding buffer 7 instruction decoding unit 8 arithmetic unit A 9 arithmetic unit B 10 arithmetic unit C 11 arithmetic unit D 12 arithmetic unit management table 13 execution order Management buffer 14 Initial mode holding circuit 15 Speculative execution type holding circuit 16 Speculative execution state instruction circuit 17 Execution order management circuit 18 Instruction execution consistency maintaining circuit 19 Register file 20 Scoreboard 21 Program counter 22 Branch instruction detection circuit 23 Arithmetic circuit 31 Branch instruction detection circuit 32 Transfer control circuit 33 Mode addition circuit 34 Instruction decoding circuit 34a to 34f Decoder 36 Data dependency detection circuit 37 Scoreboard management circuit 38 State detection circuit 39 Instruction issuing circuit 39a to 39 d selector 40 instruction issue control circuit
Claims (16)
命令列の命令を並列に処理するプロッセサであって、 実行前の命令列に含まれ、条件が他の命令に依存する条
件分岐命令の種類を判別する命令種別判別手段と、 分岐の成否が決定されるまでの間、条件分岐命令の種類
に応じて、実行ユニットに対して、分岐先の命令列及び
/又は後続する命令列の命令を実行ユニットに対して並
列発行する命令並列発行手段と、 前記条件分岐が依存する他の命令が実行されたとき、条
件分岐命令の分岐の成否を判定する分岐判定手段と、 条件分岐命令の分岐の成否の判定結果によって、命令列
の実行結果の有効無効を識別する実行結果管理手段とを
備えたことを特徴とするプロセッサ。1. A conditional branch instruction having a plurality of execution units and processing instructions of an instruction string in a memory in parallel, the conditional branch instruction being included in an instruction string before execution and having a condition dependent on another instruction. And an instruction type determination means for determining the type of the conditional branch instruction until the success or failure of the branch is determined. An instruction parallel issue means for issuing instructions in parallel to an execution unit; a branch determination means for determining success or failure of a conditional branch instruction when another instruction on which the conditional branch depends is executed; A processor comprising: an execution result management means for identifying whether the execution result of an instruction sequence is valid or invalid according to a result of determination of whether or not a branch is successful.
命令と、 それ以外の分岐命令とを判別し、 前記命令並列発行手段は、条件分岐命令が第1の種類の
命令であった場合、分岐先の命令列と条件分岐命令に後
続する命令列の双方を実行ユニットに対して並列発行
し、条件分岐命令が第1の種類の命令以外の命令であっ
た場合、どちらか一方を実行ユニットに対して並列発行
し、 前記実行結果管理手段は、条件分岐命令が第1の種類の
命令であった場合、分岐の成否の判定結果によって、一
方の命令列の実行結果を有効にし、他方を無効にする一
方、条件分岐命令が第1の種類の命令以外の場合、分岐
の成否の判定結果に応じて命令列の実行結果の全てを有
効又は無効にすることを特徴とする請求項1記載のプロ
セッサ。2. The instruction type discriminating means discriminates a first type instruction whose branch probability is about the same as a non-branch probability and a branch instruction other than that, and the instruction parallel issuing means is a conditional branch. When the instruction is the first type instruction, both the branch destination instruction sequence and the instruction sequence subsequent to the conditional branch instruction are issued in parallel to the execution unit, and the conditional branch instruction is other than the first type instruction. If the conditional branch instruction is the instruction of the first type, the execution result management means determines whether the branch is successful or not, While the execution result of one instruction sequence is valid and the other is invalid, if the conditional branch instruction is other than the first type instruction, all execution results of the instruction sequence are valid according to the result of the branch success / failure judgment. Alternatively, it is invalidated. 1. The processor according to 1.
以外の命令を、第1の分岐命令より分岐する確率が高い
第2の種類の命令と、第1の分岐命令より分岐しない確
率が高い第3の種類の命令とに判別し、 前記命令並列発行手段は、第2の種類の命令の場合、分
岐先の命令列の命令を実行ユニットに対して並列発行
し、第3の種類の命令の場合、条件分岐命令に後続する
命令列の命令を実行ユニットに並列発行することを特徴
とする請求項2記載のプロセッサ。3. The instruction type discriminating means, a second type instruction having a higher probability of branching an instruction other than the first branch instruction from the first branch instruction, and a probability not branching from the first branch instruction. Is determined to be a third type of instruction, the instruction parallel issue means issues a branch destination instruction sequence instruction in parallel to the execution unit in the case of the second type of instruction, 3. The processor according to claim 2, wherein in the case of the instruction, the instruction of the instruction sequence following the conditional branch instruction is issued in parallel to the execution unit.
に後続する命令列の命令を一時的に記憶する第1の命令
フェッチバッファと、 条件分岐命令の分岐先の命令列の命令を一時的に記憶す
る第2の命令フェッチバッファと、 メモリに格納された命令を読み出し、第1及び第2の命
令フェッチバッファに格納する命令フェッチ手段とを備
えたことを特徴とする請求項1記載のプロセッサ。4. The first processor further comprises: a first instruction fetch buffer for temporarily storing instructions of an instruction sequence subsequent to the conditional branch instruction; and an instruction of an instruction sequence of a branch destination of the conditional branch instruction. 2. The processor according to claim 1, further comprising a second instruction fetch buffer for storing the instruction, and an instruction fetch unit for reading the instruction stored in the memory and storing the instruction in the first and second instruction fetch buffers.
リメントするプログラムカウンタと、 メモリから読みだされた命令から条件分岐命令を検出す
る条件分岐命令検出手段と、 条件分岐命令検出手段で検出された条件分岐命令に基づ
いて、分岐先のアドレスを計算する演算手段と、 通常、メモリから命令が読みだされるごとにプログラム
カウンタの内容をインクリメントしていき第1の命令フ
ェッチバッファに命令を格納し、条件分岐命令が検出さ
れた場合、後続する命令列の命令を第1の命令フェッチ
バッファに格納し、演算手段で求められた分岐先アドレ
スをプログラムカウンタに書き込み、分岐先の命令列の
命令を第2の命令フェッチバッファに格納するフェッチ
制御手段とを有することを特徴とする請求項4記載のプ
ロセッサ。5. The instruction fetch means outputs a read address to a memory and increments the content thereof, a program counter, a conditional branch instruction detecting means for detecting a conditional branch instruction from an instruction read from the memory, and a condition. Based on the conditional branch instruction detected by the branch instruction detecting means, arithmetic means for calculating the address of the branch destination, and usually, the content of the program counter is incremented every time the instruction is read from the memory. When an instruction is stored in the instruction fetch buffer and a conditional branch instruction is detected, the instruction of the subsequent instruction sequence is stored in the first instruction fetch buffer, and the branch destination address obtained by the arithmetic means is written in the program counter, And a fetch control means for storing the instruction of the instruction sequence of the branch destination in the second instruction fetch buffer. The processor according to claim 4, characterized in that
数の解読手段と、 第1又は、第2の命令フェッチバッファから全ての解読
手段に命令を1つずつ転送する転送制御手段と、 転送制御手段により転送されるそれぞれの命令に、その
命令がどの命令列に属するかを示すモ−ドを付加し、分
岐命令に後続する命令列と分岐先の命令列とでモ−ドを
変更するモ−ド付加手段とを有することを特徴とする請
求項4記載のプロセッサ。6. The instruction parallel issuing means decodes instructions to generate a control signal to an execution unit, and a plurality of decoding means from the first or second instruction fetch buffer. Transfer control means for transferring one by one, and a mode indicating which instruction sequence the instruction belongs to is added to each instruction transferred by the transfer control means, and an instruction sequence following the branch instruction and a branch destination 5. The processor according to claim 4, further comprising mode adding means for changing the mode depending on the instruction sequence of the above.
2ビットの情報であり、条件分岐命令に後続する命令列
のモ−ドは条件分岐命令自身のモ−ドに対して第1の値
を加算した値、分岐先の命令列のモ−ドは第2の値を加
算した値であることを特徴とする請求項6記載のプロセ
ッサ。7. The mode added by the mode adding means is:
This is 2-bit information, and the mode of the instruction sequence following the conditional branch instruction is the value obtained by adding the first value to the mode of the conditional branch instruction itself, and the mode of the instruction sequence of the branch destination is 7. The processor according to claim 6, which is a value obtained by adding the second value.
PSR(Program Status Register)を変更する命令で
あり、 前記分岐判定手段は、PSRを変更する命令が実行され
たことを検出し、その実行結果を参照することを特徴と
する請求項6記載のプロセッサ。8. The other instruction on which the conditional branch instruction depends is:
7. The processor according to claim 6, which is an instruction to change a PSR (Program Status Register), wherein the branch determination unit detects that an instruction to change the PSR has been executed and refers to an execution result thereof. ..
された複数の命令間のデ−タ依存関係を判定するデ−タ
依存関係判定手段と、 実行ユニットで実行中の命令が使用しているレジスタが
どれであるかを管理するスコアボ−ド管理手段と、 実行ユニットの空き状態を検知する空き状態検知手段
と、 解読手段で解読された各命令について、デ−タ依存関係
判定手段の判定結果、スコアボ−ド管理手段、空き状態
検知手段の検知結果に基づいて、発行可能な命令を命令
並列発行手段から実行ユニットへの発行を許可し、ま
た、解読手段で解読された命令が条件分岐命令である場
合には、命令並列発行手段から分岐判定手段への発行を
許可する命令発行許可手段とを有することを特徴とする
請求項6記載のプロセッサ。9. The processor further comprises a data dependency relationship determining means for determining a data dependency relationship between a plurality of decoded instructions with reference to a plurality of decoding results decoded by the decoding means. , The scoreboard managing means for managing which register is used by the instruction being executed in the execution unit, the empty state detecting means for detecting the empty state of the execution unit, and each of the decrypted by the decrypting means. Regarding the instruction, based on the determination result of the data dependency determining means, the scoreboard managing means, the detection result of the empty state detecting means, the issuable instruction is permitted to be issued from the instruction parallel issuing means to the execution unit, The instruction issue permitting means for permitting issuance from the instruction parallel issuing means to the branch judging means when the instruction decoded by the decoding means is a conditional branch instruction. On-board processor.
依存関係検出手段の検出結果から前の命令とデ−タ依存
関係がなく、スコアボ−ド管理手段の情報からその命令
のオペランドで指定されているレジスタが実行ユニット
で実行中の命令に使用されていなく、かつ、空き状態検
知手段の検知結果からその命令を実行しうる実行ユニッ
トが空いていること、を満たす命令を発行可能と判定す
ることを特徴とする請求項9記載のプロセッサ。10. The instruction issue permitting means has no data dependency relation with the preceding instruction from the detection result of the data dependence detecting means for each of the decoding results of the plurality of decoding means, and the command issuing permitting means of the scoreboard managing means The register specified by the operand of the instruction from the information is not used for the instruction being executed in the execution unit, and the execution unit that can execute the instruction is free from the detection result of the empty state detection means, 10. The processor according to claim 9, wherein it is determined that an instruction satisfying the condition can be issued.
を保持し、空き状態検知手段によって参照される実行ユ
ニット管理テ−ブルと、 実行ユニットで実行中の命令が使用しているレジスタが
どれであるかを示す情報を保持し、スコアボ−ド管理手
段によって参照されるスコアボ−ドとを備えたことを特
徴とする請求項9記載のプロセッサ。11. The processor further holds information indicating whether or not an instruction is being executed for each execution unit, and an execution unit management table referred to by an empty state detection means and an execution unit execution. 10. The processor according to claim 9, further comprising a scoreboard which holds information indicating which register is used by the instruction in the inside and which is referred to by the scoreboard management means.
−ドを初期モ−ドとして保持する初期モ−ド保持手段
と、 命令並列発行手段によって発行された条件分岐命令の種
類を保持する投機実行種類保持手段と、 命令並列発行手段によって発行された条件分岐命令の条
件判断が未だ確定していないことを示すフラグを保持す
る投機実行状態指示手段とを有し、 前記命令並列発行手段は、条件分岐命令を分岐判定手段
に発行すると同時に、その条件分岐命令のモ−ドを初期
モ−ド保持手段に、その条件分岐命令の種類を投機実行
種類保持手段に出力し、投機実行状態指示手段のフラグ
をセットすることを特徴とする請求項9記載のプロセッ
サ。12. The execution result managing means includes an initial mode holding means for holding the mode of the conditional branch instruction issued by the instruction parallel issuing means as an initial mode, and an instruction parallel issuing means. The speculative execution type holding means for holding the type of the conditional branch instruction, and the speculative execution state instruction means for holding the flag indicating that the condition judgment of the conditional branch instruction issued by the instruction parallel issuing means has not been finalized. The instruction parallel issuing means issues a conditional branch instruction to the branch judging means, and at the same time, the mode of the conditional branch instruction is held in the initial mode holding means, and the type of the conditional branch instruction is held as the speculative execution type. 10. The processor according to claim 9, wherein the processor outputs the flag to the speculative execution state instructing means.
と、その実行結果が本来格納されるべき格納先の情報と
対応させて記憶する一時記憶手段を有することを特徴と
する請求項12記載のプロセッサ。13. The execution result management means stores the execution result of an instruction in the execution unit, the mode of the instruction, and the information of the storage destination where the execution result is originally stored. 13. The processor according to claim 12, further comprising a temporary storage unit for executing the operation.
合には、レジスタ番号を、本来の格納先がメモリである
場合には、メモリアドレスを記憶することを特徴とする
請求項13記載のプロセッサ。14. The temporary storage means stores, as the storage destination information, a register number when the original storage destination is a register and a memory address when the original storage destination is a memory. 14. The processor according to claim 13, wherein:
すると投機実行状態指示手段のフラグをクリアし、 実行結果管理手段は、分岐判定手段の判定結果に基づい
て、初期モ−ド保持手段、投機実行種類保持手段を参照
して一時記憶手段の実行結果の有効無効を識別し、有効
な実行結果を本来の格納先に転送し、無効な実行結果を
クリアすることを特徴とする請求項13記載のプロセッ
サ。15. The branch judging means clears the flag of the speculative execution state instructing means when judging whether or not to branch, and the execution result managing means holds the initial mode based on the judgment result of the branch judging means. Means for identifying whether the execution result of the temporary storage means is valid or invalid by referring to the means and the speculative execution type holding means, transferring the valid execution result to the original storage destination, and clearing the invalid execution result. Item 13. The processor according to Item 13.
る第1の命令フェッチバッファと、 条件分岐命令の分岐先の命令を一時的に格納する第2の
命令フェッチバッファと、 メモリに読み出しアドレスを出力し、その内容をインク
リメントするプログラムカウンタと、 メモリから読みだされた命令から条件分岐命令を検出す
る条件分岐命令検出手段と、 条件分岐命令検出手段で検出された条件分岐命令に基づ
いて、分岐先のアドレスを計算する演算手段と、 通常、メモリから命令が読みだされるごとにプログラム
カウンタの内容をインクリメントしていき第1の命令フ
ェッチバッファに命令を格納し、条件分岐命令が検出さ
れた場合、後続する命令列の命令を第1の命令フェッチ
バッファに格納し、演算手段で求められた分岐先アドレ
スをプログラムカウンタに書き込み、分岐先の命令列の
命令を第2の命令フェッチバッファに格納するフェッチ
制御手段とを有し、 命令並列発行手段は、 命令を解読して実行ユニットへの制御信号を生成する複
数の解読手段と、 第1又は、第2の命令フェッチバッファから全ての解読
手段に命令を1つずつ転送する転送制御手段と、 転送制御手段により転送されるそれぞれの命令に、その
命令がどの命令列に属するかを示すモ−ドを付加し、分
岐命令に後続する命令列と分岐先の命令列とでモ−ドを
変更するモ−ド付加手段とを有し、 プロセッサは、 解読手段で解読された複数の解読結果を参照して、解読
された複数の命令間のデ−タ依存関係を判定するデ−タ
依存関係判定手段と、 実行ユニットで実行中の命令が使用しているレジスタが
どれであるかを管理するスコアボ−ド管理手段と、 実行ユニットの空き状態を検知する空き状態検知手段
と、 解読手段で解読された各命令について、デ−タ依存関係
判定手段の判定結果、スコアボ−ド管理手段、空き状態
検知手段の検知結果に基づいて、発行可能な命令を命令
並列発行手段から実行ユニットへの発行を許可し、ま
た、解読手段で解読された命令が条件分岐命令である場
合には、命令並列発行手段から分岐判定手段への発行を
許可する命令発行許可手段とを有し、 実行結果管理手段は、 実行ユニットでの命令の実行結果と、その命令のモ−ド
と、その実行結果が本来格納されるべき格納先の情報と
対応させて記憶する一時記憶手段と、 命令並列発行手段によって発行された条件分岐命令のモ
−ドを初期モ−ドとして保持する初期モ−ド保持手段
と、 命令並列発行手段によって発行された条件分岐命令の種
類を保持する投機実行種類保持手段と、 命令並列発行手段によって発行された条件分岐命令の条
件判断が未だ確定していないことを示すフラグを保持す
る投機実行状態指示手段とを有し、 前記命令並列発行手段は、条件分岐命令を分岐判定手段
に発行すると同時に、その条件分岐命令のモ−ドを初期
モ−ド保持手段に、その条件分岐命令の種類を投機実行
種類保持手段に出力し、投機実行状態指示手段のフラグ
をセットし、 実行結果管理手段は、分岐判定手段の判定結果を受ける
と、 投機実行種類保持手段に第1の種類の命令が保持されて
いる場合で、かつ、分岐すると判定された場合、初期モ
−ドを参照して一時記憶手段から後続する命令列の実行
結果をクリアして分岐先の命令列の実行結果を本来の格
納先へ転送し、逆に、分岐しないと判定された場合、初
期モ−ドを参照して一時記憶手段から分岐先の命令列の
実行結果をクリアして後続する命令列の実行結果を本来
の格納先へ転送し、 投機実行種類保持手段に第2の種類の命令が保持されて
いる場合で、かつ、分岐すると判定された場合、初期モ
−ドを参照して一時記憶手段から分岐先の命令列の実行
結果を本来の格納先へ転送し、逆に、分岐しないと判定
された場合、一時記憶手段から分岐先の命令列の実行結
果をクリアし、 投機実行種類保持手段に第3の種類の命令が保持されて
いる場合で、かつ、分岐すると判定された場合、初期モ
−ドを参照して一時記憶手段から後続する命令列の実行
結果を本来の格納先へ転送し、逆に、分岐しないと判定
された場合、一時記憶手段から後続する命令列の実行結
果をクリアする。ことを特徴とする請求項3記載のプロ
セッサ。16. The instruction fetch means comprises: a first instruction fetch buffer for temporarily storing an instruction of an instruction sequence subsequent to the conditional branch instruction; and a second instruction fetch buffer for temporarily storing an instruction of a branch destination of the conditional branch instruction. Instruction fetch buffer, a program counter that outputs the read address to the memory and increments its contents, a conditional branch instruction detection unit that detects a conditional branch instruction from the instruction read from the memory, and a conditional branch instruction detection unit. An arithmetic means for calculating a branch destination address based on the detected conditional branch instruction, and normally, the content of the program counter is incremented every time the instruction is read from the memory, and the instruction is transferred to the first instruction fetch buffer. And a conditional branch instruction is detected, the instruction of the subsequent instruction sequence is stored in the first instruction fetch buffer, The instruction parallel issue means decodes the instruction by writing the branch destination address obtained by the computing means to the program counter and storing the instruction of the instruction sequence of the branch destination in the second instruction fetch buffer. A plurality of decoding means for generating a control signal to the execution unit, a transfer control means for transferring an instruction from the first or second instruction fetch buffer to all the decoding means one by one, and a transfer control means for transferring the instruction. Mode adding means for adding a mode indicating to which instruction sequence the instruction belongs, and changing the mode between the instruction sequence subsequent to the branch instruction and the instruction sequence at the branch destination. And a processor that references the plurality of decryption results decrypted by the decryption means, determines data dependency between the plurality of decrypted instructions, and executes the execution unit. In fact The scoreboard managing means for managing which register is used by the inside instruction, the empty state detecting means for detecting the empty state of the execution unit, and the data for each instruction decoded by the decoding means Based on the determination result of the data dependency determination means, the scoreboard management means, and the detection result of the empty state detection means, the issuable instruction is permitted to be issued from the instruction parallel issuing means to the execution unit, and the deciphering means is used. When the decoded instruction is a conditional branch instruction, it has an instruction issue permitting means for permitting the instruction parallel issue means to issue to the branch judging means, and the execution result managing means executes the instruction in the execution unit. The result, the mode of the instruction, the temporary storage means for storing the execution result in correspondence with the information of the storage destination where the execution should be originally stored, and the conditional branch instruction issued by the instruction parallel issuing means Is held as an initial mode, an speculative execution type holding means for holding the type of the conditional branch instruction issued by the instruction parallel issuing means, and an instruction parallel issuing means. And a speculative execution state instructing means for holding a flag indicating that the conditional judgment of the conditional branch instruction has not been decided yet, and the instruction parallel issuing means issues the conditional branch instruction to the branch determining means and at the same time, The mode of the conditional branch instruction is output to the initial mode holding means, the type of the conditional branch instruction is output to the speculative execution type holding means, the flag of the speculative execution state instruction means is set, and the execution result management means When the judgment result of the judging means is received, if the speculative execution type holding means holds the first type instruction, and if it is judged to branch, it is temporarily stored by referring to the initial mode. If the execution result of the instruction sequence following the stage is cleared and the execution result of the instruction sequence at the branch destination is transferred to the original storage destination, conversely, if it is determined not to branch, the initial mode is referenced and In the case where the execution result of the instruction sequence at the branch destination is cleared from the storage unit and the execution result of the subsequent instruction sequence is transferred to the original storage destination, and the speculative execution type storage unit holds the second type instruction. If it is determined to branch, the execution result of the instruction sequence of the branch destination is transferred from the temporary storage means to the original storage destination by referring to the initial mode, and conversely, if it is determined not to branch, When the execution result of the instruction sequence at the branch destination is cleared from the temporary storage means, the speculative execution type holding means holds the third type instruction, and when it is determined to branch, the initial mode is set. By referring to the execution result of the subsequent instruction sequence from the temporary storage means Transfer come into storage location, on the contrary, when it is determined not to branch to clear the execution result of the instruction sequence to be followed from the temporary storage means. The processor according to claim 3, wherein:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30570092A JP3146077B2 (en) | 1991-11-15 | 1992-11-16 | Processor |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30012691 | 1991-11-15 | ||
| JP3-300126 | 1991-11-15 | ||
| JP30570092A JP3146077B2 (en) | 1991-11-15 | 1992-11-16 | Processor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH05224927A true JPH05224927A (en) | 1993-09-03 |
| JP3146077B2 JP3146077B2 (en) | 2001-03-12 |
Family
ID=26562217
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP30570092A Expired - Fee Related JP3146077B2 (en) | 1991-11-15 | 1992-11-16 | Processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3146077B2 (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07281893A (en) * | 1994-04-15 | 1995-10-27 | Internatl Business Mach Corp <Ibm> | Processing system and arithmetic method |
| JPH07281894A (en) * | 1994-04-15 | 1995-10-27 | Internatl Business Mach Corp <Ibm> | Processing system and method of operation |
| US5724565A (en) * | 1995-02-03 | 1998-03-03 | International Business Machines Corporation | Method and system for processing first and second sets of instructions by first and second types of processing systems |
| US6931514B2 (en) | 2000-11-29 | 2005-08-16 | Nec Corporation | Data dependency detection using history table of entry number hashed from memory address |
| US6950908B2 (en) | 2001-07-12 | 2005-09-27 | Nec Corporation | Speculative cache memory control method and multi-processor system |
| US6970997B2 (en) | 2001-05-23 | 2005-11-29 | Nec Corporation | Processor, multiprocessor system and method for speculatively executing memory operations using memory target addresses of the memory operations to index into a speculative execution result history storage means to predict the outcome of the memory operation |
| JP2006215799A (en) * | 2005-02-03 | 2006-08-17 | Toshiba Corp | Memory controller |
| US7243215B2 (en) | 2000-01-28 | 2007-07-10 | Hewlett-Packard Development Company, L.P. | System and method for utilizing a scoreboard to indicate information pertaining to pending register writes |
| JP2023529947A (en) * | 2020-08-17 | 2023-07-12 | ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド | Command transmission method, command transmission device, electronic device, storage medium, and computer program |
-
1992
- 1992-11-16 JP JP30570092A patent/JP3146077B2/en not_active Expired - Fee Related
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07281893A (en) * | 1994-04-15 | 1995-10-27 | Internatl Business Mach Corp <Ibm> | Processing system and arithmetic method |
| JPH07281894A (en) * | 1994-04-15 | 1995-10-27 | Internatl Business Mach Corp <Ibm> | Processing system and method of operation |
| US5724565A (en) * | 1995-02-03 | 1998-03-03 | International Business Machines Corporation | Method and system for processing first and second sets of instructions by first and second types of processing systems |
| US7243215B2 (en) | 2000-01-28 | 2007-07-10 | Hewlett-Packard Development Company, L.P. | System and method for utilizing a scoreboard to indicate information pertaining to pending register writes |
| US6931514B2 (en) | 2000-11-29 | 2005-08-16 | Nec Corporation | Data dependency detection using history table of entry number hashed from memory address |
| US7418583B2 (en) | 2000-11-29 | 2008-08-26 | Nec Corporation | Data dependency detection using history table of entry number hashed from memory address |
| US6970997B2 (en) | 2001-05-23 | 2005-11-29 | Nec Corporation | Processor, multiprocessor system and method for speculatively executing memory operations using memory target addresses of the memory operations to index into a speculative execution result history storage means to predict the outcome of the memory operation |
| US6950908B2 (en) | 2001-07-12 | 2005-09-27 | Nec Corporation | Speculative cache memory control method and multi-processor system |
| JP2006215799A (en) * | 2005-02-03 | 2006-08-17 | Toshiba Corp | Memory controller |
| JP2023529947A (en) * | 2020-08-17 | 2023-07-12 | ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド | Command transmission method, command transmission device, electronic device, storage medium, and computer program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3146077B2 (en) | 2001-03-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5511172A (en) | Speculative execution processor | |
| US7047399B2 (en) | Computer system and method for fetching, decoding and executing instructions | |
| US5606676A (en) | Branch prediction and resolution apparatus for a superscalar computer processor | |
| JP3547482B2 (en) | Information processing equipment | |
| JP2875909B2 (en) | Parallel processing unit | |
| US6266765B1 (en) | Computer architecture capable of execution of general purpose multiple instructions | |
| EP1296230B1 (en) | Instruction issuing in the presence of load misses | |
| US6308259B1 (en) | Instruction queue evaluating dependency vector in portions during different clock phases | |
| KR101148495B1 (en) | A system and method for using a local condition code register for accelerating conditional instruction execution in a pipeline processor | |
| US6178498B1 (en) | Storing predicted branch target address in different storage according to importance hint in branch prediction instruction | |
| US6119223A (en) | Map unit having rapid misprediction recovery | |
| US6263427B1 (en) | Branch prediction mechanism | |
| KR100616722B1 (en) | Pipe1ined instruction dispatch unit in a supersca1ar processor | |
| EP0939364A2 (en) | Paired instruction processor branch recovery mechanism | |
| US5537561A (en) | Processor | |
| US6981131B2 (en) | Early condition code evaluation at pipeline stages generating pass signals for controlling coprocessor pipeline executing same conditional instruction | |
| US5930520A (en) | Pipelining device in a parallel processing apparatus and an instruction supplying method therefor | |
| JPH10154073A (en) | Device and method for managing data dependency | |
| EP1099158B1 (en) | Processor configured to selectively free physical registers upon retirement of instructions | |
| JP3146077B2 (en) | Processor | |
| KR100523706B1 (en) | System and method in a pipelined processor for generating a single cycle pipeline stall | |
| JP3725547B2 (en) | Limited run branch prediction | |
| JP3723020B2 (en) | Branch history information writing control apparatus and method | |
| KR100431975B1 (en) | Multi-instruction dispatch system for pipelined microprocessors with no branch interruption | |
| US6754813B1 (en) | Apparatus and method of processing information for suppression of branch prediction |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080105 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090105 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100105 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110105 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120105 Year of fee payment: 11 |
|
| LAPS | Cancellation because of no payment of annual fees |