JP2953451B2 - Interrupt handling method - Google Patents

Interrupt handling method

Info

Publication number
JP2953451B2
JP2953451B2 JP35771297A JP35771297A JP2953451B2 JP 2953451 B2 JP2953451 B2 JP 2953451B2 JP 35771297 A JP35771297 A JP 35771297A JP 35771297 A JP35771297 A JP 35771297A JP 2953451 B2 JP2953451 B2 JP 2953451B2
Authority
JP
Japan
Prior art keywords
instruction
exception
entry
entry number
occurrence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP35771297A
Other languages
Japanese (ja)
Other versions
JPH11184696A (en
Inventor
明寛 澤村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP35771297A priority Critical patent/JP2953451B2/en
Publication of JPH11184696A publication Critical patent/JPH11184696A/en
Application granted granted Critical
Publication of JP2953451B2 publication Critical patent/JP2953451B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、リオーダバッファ
等を使用して命令追い越し制御が行われる情報処理装置
パイプライン処理における割り込み処理方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus in which instruction overtaking control is performed using a reorder buffer or the like.
The present invention relates to an interrupt processing method in pipeline processing of the above.

【0002】[0002]

【従来の技術】プロセッサの実行性能の向上を妨げる要
因の一つにデータ制約がある。データ制約とは、ある命
令の演算結果を参照する後続の命令は、先行する命令の
実行が終了するまで実行を開始できないことをいう。こ
のデータ制約のために、命令の実行を開始できず、プロ
セッサ内の演算パイプラインが停止し、実行性能の低下
が引き起こされる。
2. Description of the Related Art One of the factors hindering an improvement in the execution performance of a processor is a data constraint. The data constraint means that the execution of a subsequent instruction referring to the operation result of a certain instruction cannot be started until the execution of the preceding instruction is completed. Due to this data constraint, the execution of the instruction cannot be started, the operation pipeline in the processor is stopped, and the execution performance is reduced.

【0003】昨今のマイクロプロセッサでは、このデー
タ制約によるプロセッサの実行性能の低下を最小限に抑
えるため、リオーダバッファ等を使用して命令のアウト
オブオーダー(out of order)実行(非順序実行)を
サポートするものが多い。リオーダバッファとは、命令
をフェッチ、デコードした後、それらの命令の実行条件
が整うまで退避しておくバッファである。リオーダバッ
ファからの実際の命令実行開始は、元のプログラム順で
はなく、実行条件が整ったものから順次実行開始され
る。これにより、前述したデータ制約によるプロセッサ
の実行性能の低下を抑えることができる。
In recent microprocessors, out-of-order execution (out-of-order execution) of instructions is performed using a reorder buffer or the like in order to minimize the deterioration of the execution performance of the processor due to the data constraint. There are many things to support. The reorder buffer is a buffer that fetches and decodes instructions and saves them until the execution conditions of those instructions are satisfied. Actual instruction execution from the reorder buffer is not executed in the original program order, but is sequentially started from the one where execution conditions are satisfied. Thus, it is possible to suppress a decrease in the execution performance of the processor due to the above-described data constraint.

【0004】ただし、リオーダバッファからの命令の実
行開始は、アウトオブオーダーであっても、リオーダバ
ッファからの命令の削除はインオーダー(in order)
で行われる(順番に削除される)。そのため、同一のレ
ジスタに実行結果を書き込む命令が複数あり、かつそれ
らの命令の実行順序がプログラムによる実行順序と入れ
替わっていた場合、命令の実行終了と同時に演算結果を
レジスタに書き込んでしまうと、そのレジスタの値を参
照する命令が誤ったデータを参照することになる。した
がって、すべての命令の実行結果は、リオーダバッファ
中の各命令に対応して、一旦レジスタとは別の領域に退
避しておき、該退避領域からインオーダー実行でレジス
タに実行結果を書き込むようにする必要がある。このよ
うに、退避領域からインオーダー実行でレジスタに実行
結果を書き込む処理をリタイアと呼ぶ。上述した命令実
行結果のレジスタへの書き込みと同様のことが、命令実
行に伴う例外の処理にも当てはまる。
[0004] However, even if the execution of an instruction from the reorder buffer is out of order, the deletion of the instruction from the reorder buffer is in order.
(Deleted in order). Therefore, if there are a plurality of instructions that write the execution result to the same register, and the execution order of those instructions is replaced with the execution order by the program, if the operation result is written to the register at the same time as the execution of the instruction is completed, An instruction that refers to a register value refers to incorrect data. Therefore, the execution results of all instructions are temporarily saved in an area different from the register corresponding to each instruction in the reorder buffer, and the execution results are written to the register from the save area by in-order execution. There is a need to. The process of writing the execution result from the save area to the register in the in-order execution is called retirement. The same as the above-described writing of the instruction execution result to the register also applies to the processing of the exception accompanying the instruction execution.

【0005】例外処理は、命令がアウトオブオーダー実
行で行われていたとしても、正確な割り込みを実装する
場合は、例外を発生した命令以前の先行命令がすべて実
行を完了し、かつ実行結果がレジスタに書き込まれてい
る状態で開始されなければならない。すなわち、命令の
実行に伴い例外が発生しても、直ちに例外処理を開始す
ることはできない。したがって、例外が発生した場合、
該当する命令のリオーダバッファ中のエントリに対応し
て例外が発生したことを示すフラグ、および例外の要因
を示すフィールドが必要になる。
In the exception handling, even if an instruction is executed out-of-order, if a precise interrupt is implemented, all instructions preceding the instruction that caused the exception have completed execution, and the execution result is It must start with the registers being written. That is, even if an exception occurs with execution of an instruction, exception processing cannot be started immediately. Therefore, if an exception occurs,
A flag indicating that an exception has occurred corresponding to the entry in the reorder buffer of the corresponding instruction, and a field indicating the cause of the exception are required.

【0006】例外要因は、通常、複数がプロセッサのア
ーキテクチャに定義され、またそれらの要因は互いに排
他であるとは限らない。このため、リオーダバッファを
使用してアウトオブオーダー実行をするプロセッサで正
確な割り込みをサポートする場合、そもそもの目的であ
るデータ制約による実行性能低下の軽減に必要なハード
ウェアだけでなく、例外要因を命令のリオーダバッファ
からの削除タイミングまで保持する機構が、リオーダバ
ッファのエントリ数に応じて必要となる。
[0006] Usually, a plurality of exception factors are defined in the architecture of the processor, and these factors are not always mutually exclusive. For this reason, when a processor that performs out-of-order execution using a reorder buffer supports accurate interrupts, not only the hardware required to reduce the execution performance degradation due to data constraints, but also exception factors A mechanism for holding the instruction until the timing of deletion from the reorder buffer is required according to the number of entries in the reorder buffer.

【0007】従来の情報処理装置の命令パイプラインを
構成するリオーダバッファ制御情報部の一例を図6に示
し、以下に、その動作を説明する。なお、情報処理装置
の命令パイプラインの概略構成については、後述の実施
例の項目で詳しく説明することとし、ここではリオーダ
バッファ制御情報の動作についてのみ説明する。
FIG. 6 shows an example of a reorder buffer control information section constituting an instruction pipeline of a conventional information processing apparatus, and its operation will be described below. Note that the schematic configuration of the instruction pipeline of the information processing apparatus will be described in detail in an example of an embodiment to be described later. Here, only the operation of the reorder buffer control information will be described.

【0008】図6において、リオーダバッファ中の各エ
ントリにはオペコード、実行結果の書き込み先を示すデ
ィスティネーションフィールド、各命令実行の入力デー
タを示すRyソースおよびRzソース、対応する命令の
命令アドレス、発行済みであるか否かを示すフラグ、実
行が完了しリタイア待ちであることを示すDONEフラ
グの他に、各エントリの命令の実行で発生した例外要因
を保持するフィールドが設けられている。
In FIG. 6, each entry in the reorder buffer has an operation code, a destination field indicating a writing destination of an execution result, Ry source and Rz source indicating input data of each instruction execution, an instruction address of a corresponding instruction, and issuance. In addition to a flag indicating whether or not execution has been completed and a DONE flag indicating that execution has been completed and waiting for retirement, there is provided a field for holding an exception factor generated by execution of an instruction of each entry.

【0009】従来のリオーダバッファ制御情報部では、
リオーダバッファ中の命令のリタイア時に、そのリタイ
アした命令に関する命令エントリの例外要因に何らかの
例外の発生が登録されていた場合は、該命令の後続命令
の情報をリオーダバッファ中からパージ(除去)した
後、該命令の例外要因に応じた例外処理シーケンスが起
動される。
In the conventional reorder buffer control information section,
At the time of retirement of an instruction in the reorder buffer, if the occurrence of any exception is registered as an exception cause in the instruction entry relating to the retired instruction, after purging (removing) information of the instruction following the instruction from the reorder buffer. , An exception handling sequence corresponding to the exception cause of the instruction is started.

【0010】[0010]

【発明が解決しようとする課題】上述した従来技術にお
いては、例えば複数の命令で例外が発生していても、最
古の命令に対してのみ例外処理が起動されるため、それ
以降の命令に対する例外要因の保持は無駄なものになっ
てしまう。そのため、実際は、例外処理を起動するのに
必要な例外要因としては、リオーダバッファ中の最古の
命令に対するものだけで良いことになる。また、アーキ
テクチャによっては、命令仕様上いかなる例外をも発生
し得ない命令が存在する場合もある。このようなことか
ら、従来技術においては、リオーダバッファ中の全エン
トリに対し、使用しないかもしれない例外要因を保持す
るフィールドを付加していることになり、ハードウェア
量の投資に対する性能面で不利なものとなっていた。
In the above-described prior art, even if an exception occurs in a plurality of instructions, for example, exception processing is activated only for the oldest instruction. Storing exception factors is useless. Therefore, in fact, only the oldest instruction in the reorder buffer needs to be used as an exception factor necessary to activate the exception processing. Further, depending on the architecture, there may be an instruction that cannot generate any exception due to the instruction specification. For this reason, in the prior art, a field for holding an exception factor that may not be used is added to all entries in the reorder buffer, which is disadvantageous in terms of performance in terms of hardware amount investment. Had become something.

【0011】本発明の目的は、従来、リオーダバッファ
のエントリ数に応じて必要とされていた、命令の実行に
伴い発生した例外要因を保持するハードウェアを削減す
ることができる割り込み処理方法を提供することにあ
る。
An object of the present invention is to provide an interrupt processing method which can reduce the number of hardware for holding an exceptional factor caused by the execution of an instruction, which is conventionally required according to the number of entries in the reorder buffer. Is to do.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するた
め、本発明の割り込み処理方法は、複数のエントリを有
するリオーダバッファに一連の実行命令を登録し、該登
録命令のうちから発行条件の整った順に命令を発行して
処理を行うパイプライン処理における割り込み処理方法
において、発行した命令の前記リオーダバッファ中にお
けるエントリ番号を保持し、該命令について例外処理が
発生すると、その保持しているエントリ番号を例外発生
命令エントリ番号として獲得し、該例外発生命令エント
リ番号とともにその例外要因を保持する第1のステップ
と、新たに発行した命令に例外処理が発生すると、該新
たな例外処理発生により獲得した例外発生命令エントリ
番号と前回の例外処理発生により獲得した例外発生命令
エントリ番号とを比較していずれが前記リオーダバッフ
ァ内で古い命令のものであるかを判定する第2のステッ
プと、前記判定結果が、新たな例外処理発生により獲得
した例外発生エントリ番号の方が古い命令のものである
場合には、前回保持した例外発生エントリ番号および例
外要因に代えて該新たな例外処理発生により獲得した例
外発生命令エントリ番号とその例外要因を保持する第3
のステップと、前記第3のステップにて最終的に保持さ
れる例外発生命令エントリ番および例外要因に基づいて
例外処理命令を実行する第4のステップとを含み、前記
第1のステップは、前記発行命令としてリオーダバッフ
ァから発行されるメモリアクセス系命令と演算系命令の
それぞれについて、例外発生命令エントリ番号を獲得
し、該例外発生命令エントリ番号とともにその例外要因
を保持する処理を含み、前記第2のステップは、前記リ
オーダバッファに新たに登録される命令のエントリ番号
を示すリオーダバッファ先頭エントリポインタと、前記
第1のステップにて獲得された、前記演算系命令に関す
る例外発生命令エントリ番号である演算系エントリ番号
および前記メモリアクセス系命令に関する例外発生命令
エントリ番号であるメモリ系エン トリ番号との関係が、
メモリ系エントリ番号<演算系エントリ番号<先頭エン
トリポインタまたは、先頭エントリポインタ<メモリ系
エントリ番号<演算系エントリ番号または、演算系エン
トリ番号<先頭エントリポインタ<メモリ系エントリ番
号の何れかの条件を満たすときに、メモリ系エントリ番
号が演算系エントリ番号より古い命令のものであると判
定し、演算系エントリ番号<メモリ系エントリ番号<先
頭エントリポインタまたは、先頭エントリポインタ<演
算系エントリ番号<メモリ系エントリ番号または、メモ
リ系エントリ番号<先頭エントリポインタ<演算系エン
トリ番号の何れかの条件を満たすときに、演算系エント
リ番号がメモリ系エントリ番号より古い命令のものであ
ると判定する処理を含むことを特徴とする。
In order to achieve the above object, an interrupt processing method according to the present invention has a plurality of entries.
Register a series of execution instructions in the reorder buffer
From the recording instructions, issue the instructions in the order in which the issuing conditions are met.
Interrupt processing method in pipeline processing
In the reorder buffer of the issued instruction
And the exception handling for the instruction
When an error occurs, an exception occurs for the entry number held
Acquired as the instruction entry number, and
First step of retaining the exception cause along with the re-number
When exception processing occurs for a newly issued instruction,
Exception occurrence instruction entry acquired by the occurrence of a new exception
Number and exception occurrence instruction acquired by the previous exception processing
Compare with the entry number,
Second step to determine if the instruction is old in the
And the judgment result is obtained by the occurrence of new exception processing.
Exception occurrence entry number is for older instruction
In this case, the exception occurrence entry number held previously and an example
Example obtained by occurrence of the new exception processing in place of external factors
Third holding the externally generated instruction entry number and its exception cause
And finally held in the third step.
The exception occurrence instruction entry number and exception cause
And a fourth step of executing an exception handling instruction.
The first step is to execute a reorder buffer as the issued instruction.
Of memory access instructions and arithmetic instructions issued from the
Acquire exception occurrence instruction entry number for each
The exception cause instruction entry number and the exception cause
And the second step includes:
Entry number of instruction newly registered in order buffer
A reorder buffer head entry pointer indicating
Relating to the arithmetic instruction acquired in the first step.
Arithmetic entry number, which is the exception occurrence instruction entry number
And an exception generating instruction related to the memory access instruction
Relationship between the memory system entry number which is the entry number,
Memory entry number <Arithmetic entry number <First entry
Bird pointer or first entry pointer <memory
Entry number <Arithmetic entry number or Arithmetic entry
Tree number <first entry pointer <memory entry number
If any of the conditions of the
Signal is for an instruction older than the arithmetic entry number.
Calculation entry number <memory entry number <destination
Start entry pointer or Start entry pointer <
Arithmetic entry number <memory entry number or memo
Re-entry entry number <first entry pointer <arithmetic entry
If any of the conditions of the
The instruction number is older than the memory entry number.
It is characterized by including a process of determining that

【0013】[0013]

【0014】<作用>例外要因の保持のために必要とな
るハードウェアは、本来処理性能向上に特別寄与するも
のではなく、ハードウェア量の投資に対する性能向上割
合の観点からも、できるだけ少量のハードウェアで実現
することが望まれる部分である。また、例外処理は最古
の命令に対してのみ起動されることから、例外要因で実
際に例外処理開始時点で必要なのは、リオーダバッファ
中で最古の命令に対するものだけで良いことになり、複
数の命令で例外が発生していたとしても、後続命令に対
する例外要因を保持する必要はない。このようなことか
ら、本発明においては、リオーダバッファ中で最古の命
令に対する例外要因が保持されるようになっている。こ
のように構成したことにより、例外要因の保持に必要な
ハードウェアは例えば1エントリ分で済むことになる。
<Operation> The hardware required for holding the exceptional factors does not originally contribute to the improvement of the processing performance, but also from the viewpoint of the performance improvement ratio with respect to the investment of the hardware amount, the hardware as small as possible. This is the part that is desired to be realized by hardware. Also, since exception processing is started only for the oldest instruction, only the oldest instruction in the reorder buffer needs to be actually executed at the start of exception processing due to exception factors. Even if an exception has occurred in the instruction, there is no need to retain the exception cause for the subsequent instruction. For this reason, in the present invention, an exception factor for the oldest instruction in the reorder buffer is held. With this configuration, the hardware required to hold the exception factor is, for example, one entry.

【0015】[0015]

【発明の実施の形態】次に、本発明の実施形態について
図面を参照して説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

【0016】図1に、本発明の割り込み処理方法が適用
された情報処理装置の命令パイプラインを構成するリオ
ーダバッファ制御情報部の一実施形態を示す。このリオ
ーダバッファ制御情報部は、前述の図6に示したリオー
ダバッファ制御情報部の各命令エントリから、例外要因
フィールドを取り除き、かわりに例外発生命令エントリ
保持部、例外発生命令エントリ番号制御部が追加された
構成になっている。このリオーダバッファ制御情報部を
備えた情報処理装置の一実施形態を図2に示す。
FIG. 1 shows an application of the interrupt processing method of the present invention.
Illustrates one embodiment of a reorder buffer control information portion constituting the instruction pipeline is an information processing apparatus. This reorder buffer control information section removes an exception cause field from each instruction entry of the reorder buffer control information section shown in FIG. 6 described above, and instead, an exception occurrence instruction entry holding section and an exception occurrence instruction entry number control section are added. It has been configured. FIG. 2 shows an embodiment of an information processing apparatus provided with the reorder buffer control information section.

【0017】以下、図1および図2を参照して、本情報
処理装置の構成および動作について説明を行なう。
Hereinafter, the configuration and operation of the information processing apparatus will be described with reference to FIG. 1 and FIG.

【0018】リオーダバッファ制御情報部2は、命令バ
ッファ1から読み出された命令を登録するnエントリの
リオーダバッファを有し、リオーダバッファに一連の実
行命令を登録して、該登録命令のうちから発行条件の整
った順に命令を発行する他、発行した命令に例外処理が
発生した場合には、その命令に関する例外要因などの保
持処理を行う。リオーダバッファ演算結果データ3は、
各命令の実行結果を一時的に保持するnエントリのバッ
ファで、リオーダバッファ制御情報部2のエントリと1
対1に対応する。すなわち、リオーダバッファ制御情報
部2のエントリmに登録された命令の実行結果は、リオ
ーダバッファ演算結果データ3のエントリmに登録され
る。
The reorder buffer control information section 2 has an n-entry reorder buffer for registering an instruction read from the instruction buffer 1, and registers a series of execution instructions in the reorder buffer. In addition to issuing instructions in the order in which the issuance conditions are satisfied, if exception processing occurs in the issued instruction, processing for holding an exception factor related to the instruction is performed. The reorder buffer operation result data 3 is
An n-entry buffer that temporarily holds the execution result of each instruction.
Corresponds to one. That is, the execution result of the instruction registered in the entry m of the reorder buffer control information section 2 is registered in the entry m of the reorder buffer operation result data 3.

【0019】例外処理制御部5は、リオーダバッファ制
御情報部2からの指示により例外処理シーケンスを起動
し、例外処理シーケンスが終了すると例外処理終了通知
をリオーダバッファ制御情報部2に送出する。リオーダ
バッファ制御情報部2は例外処理終了通知を受信する
と、通常状態に戻り、命令バッファ1からの命令取り込
みや発行命令の選択制御等を行なう。
The exception processing control unit 5 starts an exception processing sequence in response to an instruction from the reorder buffer control information unit 2 and sends an exception processing end notification to the reorder buffer control information unit 2 when the exception processing sequence ends. Upon receiving the exception processing end notification, the reorder buffer control information unit 2 returns to the normal state, and performs control of fetching an instruction from the instruction buffer 1 and selecting an issued instruction.

【0020】命令実行処理部11は、リオーダバッファ
制御情報部2から発行された命令に基づいて処理を実行
する部で、発行命令を実行中に例外処理が発生した場合
は、例外要因とともに例外報告をリオーダバッファ制御
情報部2に対して通知する。その構成は、キャッシュメ
モリ8、主記憶装置9、発行されたメモリ系命令に基づ
いてアクセスするアドレスを計算するアドレスアダー
6、発行された演算系命令に基づいて演算をする演算器
7からなる。演算器7は、演算処理中に例外処理が発生
すると、例外要因とともに例外報告をリオーダバッファ
制御情報部2に対して通知する(演算系命令例外報
告)。キャッシュメモリ8は、アクセス処理中に、例外
処理が発生すると、例外要因とともに例外報告をリオー
ダバッファ制御情報部2に対して通知する(メモリアク
セス系命令例外報告)。
The instruction execution processing section 11 executes processing based on an instruction issued from the reorder buffer control information section 2. If an exception processing occurs during execution of the issued instruction, an exception report is issued together with the cause of the exception. To the reorder buffer control information section 2. The configuration includes a cache memory 8, a main storage device 9, an address adder 6 for calculating an address to be accessed based on the issued memory system instruction, and an arithmetic unit 7 for performing an operation based on the issued arithmetic system instruction. When the exception processing occurs during the arithmetic processing, the arithmetic unit 7 notifies the reorder buffer control information unit 2 of the exception report together with the exception cause (arithmetic instruction exception report). When an exception process occurs during the access process, the cache memory 8 notifies the reorder buffer control information unit 2 of an exception report together with the cause of the exception (memory access instruction exception report).

【0021】リネーム処理部10は、命令バッファ1か
ら読み出された命令のソースオペランドをリネームす
る。ここでリネームとは、命令バッファ1から読み出し
た命令Aのソースオペランドが、既にリオーダバッファ
制御情報部2に登録されている命令Bの演算結果を参照
する場合に、リオーーダバッファ制御情報部2中の命令
Bの登録されているエントリ番号を命令Aのソースオペ
ランドに対応するリネーム番号として付与することであ
る。
The rename processing unit 10 renames the source operand of the instruction read from the instruction buffer 1. Here, the renaming means that when the source operand of the instruction A read from the instruction buffer 1 refers to the operation result of the instruction B already registered in the reorder buffer control information unit 2, the reorder buffer control information unit 2 That is, the registered entry number of the instruction B in the instruction A is given as a rename number corresponding to the source operand of the instruction A.

【0022】リネームについて以下に詳細に説明する。The renaming will be described in detail below.

【0023】ここで命令コードは、図4に示すようなフ
ォーマットである。OPフィールドは、命令種別を示
す。Rxフィールドは、命令の演算結果を格納するレジ
スタファイル4内のエントリ番号を示す。RyおよびR
zフィールドは、演算のソースオペランドである。
The instruction code has a format as shown in FIG. The OP field indicates an instruction type. The Rx field indicates an entry number in the register file 4 for storing the operation result of the instruction. Ry and R
The z field is the source operand for the operation.

【0024】図5(a)に示すような命令列において、
命令は命令の演算結果であるレジスタファイルのエ
ントリ0(以下、S0と称す。)と命令の結果である
レジスタファイルのエントリ4を参照する。このとき、
図5(b)に示すように、命令がリオーダバッファの
エントリ1に、命令がリオーダバッファのエントリn
−4に登録されているとすると、命令のオペランドリ
ネームでは、ソースオペランドRyに対して「1」が付
与され、ソースオペランドRzに対して「n−4」が付
与される。
In an instruction sequence as shown in FIG.
The instruction refers to the register file entry 0 (hereinafter referred to as S0) which is the operation result of the instruction and the register file entry 4 which is the result of the instruction. At this time,
As shown in FIG. 5B, the instruction is in the entry 1 of the reorder buffer, and the instruction is in the entry n of the reorder buffer.
If the instruction is registered as "-4", "1" is assigned to the source operand Ry and "n-4" is assigned to the source operand Rz in the operand rename of the instruction.

【0025】このようにソースオペランドをリネームす
ることで、図5(a)の命令のようにSOを上書きす
る命令が存在し、かつ命令が命令を追い越して実行
された場合でも、命令は正しく命令の演算結果を参
照することができる。
By renaming the source operand in this way, even if there is an instruction that overwrites SO as in the instruction of FIG. 5A and the instruction is executed ahead of the instruction, the instruction is correctly executed. Can be referred to.

【0026】命令バッファ1から読み出された命令は、
リオーダバッファ制御情報部2に登録される。リオーダ
バッファ制御情報部2は、複数のエントリから構成され
ており、各エントリの命令の登録および抹消の順序は
「インオーダー」実行で行われる。すなわち、リオーダ
バッファ制御情報部2がn個のエントリで構成される場
合、エントリ0に最初の命令が登録され、その後エント
リ1,エントリ2,…,エントリn−1の順に登録され
る。エントリn−1の次は、エントリ0に登録エントリ
が移る。ただし、この場合は、エントリ0に登録されて
いた先行命令が、既にリタイアし、エントリ0が空き状
態でなければならない。この新規に命令を登録するエン
トリは、先頭エントリポインタ22により管理される。
新規に命令をフェッチ/デコード/リオーダバッファ登
録を行なうたびに、先頭エントリポインタ22は命令を
リオーダバッファに登録した数だけ歩進する。
The instruction read from the instruction buffer 1 is
It is registered in the reorder buffer control information section 2. The reorder buffer control information section 2 is composed of a plurality of entries, and the order of registering and deleting instructions of each entry is performed by "in-order" execution. That is, when the reorder buffer control information section 2 is composed of n entries, the first instruction is registered in the entry 0, and then the entries are registered in the order of entry 1, entry 2, ..., entry n-1. After the entry n-1, the registered entry moves to the entry 0. However, in this case, the preceding instruction registered in entry 0 must have retired and entry 0 must be empty. The entry for newly registering the instruction is managed by the head entry pointer 22.
Each time a new instruction is fetched / decoded / registered in the reorder buffer, the leading entry pointer 22 advances by the number of instructions registered in the reorder buffer.

【0027】また、リオーダバッファ制御情報部2から
の命令の削除も同様に「インオーダー」で行われる。リ
オーダバッファ中の未発行の命令から発行すべき命令が
選択され、実行が終了すると該命令に対応するエントリ
のDONEフラグが点灯する。該命令のエントリの抹消
は、該命令のDONEフラグが点灯し、かつ、該命令の
先行命令がすべて抹消されているとき(すなわち、該命
令がリオーダバッファ中の最古の命令であるとき)にリ
タイア制御部24からのリタイア指示信号に基づいて行
われる。ここで、リオーダバッファ制御情報部2から命
令が抹消されるとき、同時にリオーダバッファ演算結果
データ3内の対応するデータがレジスタファイル4の、
命令により指定されたエントリに書き移される。この動
作をリタイアというが、リタイアの対象となる、リオー
ダバッファ中で最古のエントリは、リタイアエントリポ
インタ30により指し示されるようになっている。この
リタイアエントリポインタ30は、リタイア制御部24
からのリタイア指示信号により歩進する。
The deletion of the instruction from the reorder buffer control information section 2 is also performed in an "in order". The instruction to be issued is selected from the unissued instructions in the reorder buffer, and when the execution is completed, the DONE flag of the entry corresponding to the instruction is turned on. The entry of the instruction is deleted when the DONE flag of the instruction is turned on and all the instructions preceding the instruction have been deleted (that is, when the instruction is the oldest instruction in the reorder buffer). This is performed based on a retire instruction signal from the retire control unit 24. Here, when the instruction is deleted from the reorder buffer control information section 2, at the same time, the corresponding data in the reorder buffer operation result data 3 is stored in the register file 4,
It is moved to the entry specified by the instruction. This operation is called retirement. The oldest entry in the reorder buffer to be retired is indicated by the retirement entry pointer 30. This retirement entry pointer 30 is
Step by the retirement instruction signal from.

【0028】リオーダバッファ中の命令の発行は「アウ
トオブオーダー」実行で行われる。すなわち、リオーダ
バッファ中の命令の登録順序と関わりなく、発行条件の
整った命令のうちから発行命令が選択される。
The issuance of instructions in the reorder buffer is performed by "out-of-order" execution. That is, regardless of the order of registering the instructions in the reorder buffer, the issued instruction is selected from the instructions satisfying the issuance conditions.

【0029】リオーダバッファから発行選択された命令
が演算命令であった場合は、演算器7への入力データが
リオーダバッファ演算結果データ3あるいはレジスタフ
ァイル4から読み出され、演算器7に投入される。演算
結果はリオーダバッファ演算結果データ3の該命令に対
応するエントリに書き込まれる。命令実行時に演算例外
が発生した場合は、演算器7によって、例外要因ととも
に例外報告がリオーダバッファ制御情報部2に対し通知
される(演算系命令例外報告)。
When the instruction issued and selected from the reorder buffer is an arithmetic instruction, the input data to the arithmetic unit 7 is read from the reorder buffer arithmetic result data 3 or the register file 4 and input to the arithmetic unit 7. . The operation result is written to the entry of the reorder buffer operation result data 3 corresponding to the instruction. When an operation exception occurs during the execution of an instruction, the arithmetic unit 7 notifies the reorder buffer control information unit 2 of the exception report together with the cause of the exception (operation instruction exception report).

【0030】リオーダバッファから発行選択された命令
がメモリアクセス系の命令であった場合は、アドレスオ
ペランドデータがリオーダバッファ演算結果データ3あ
るいはレジスタファイル4から読み出され、アドレスア
ダー6に投入されてアクセスするメモリアドレスが計算
される。ここで、命令がストア系命令の場合は、ストア
データが同様にリオーダバッファ演算結果データ3ある
いはレジスタファイル4から読み出されてキャッシュメ
モリ8に通知される。ロード系命令のロードデータは、
リオーダバッファ演算結果データ3の該命令に対応する
エントリに書き込まれる。また、命令実行時に例外が発
生した場合は、キャッシュメモリ8によって、例外要因
とともに例外報告がリオーダバッファ制御情報部2に対
して通知される(メモリアクセス系命令例外報告)。
When the instruction issued and selected from the reorder buffer is a memory access instruction, the address operand data is read from the reorder buffer operation result data 3 or the register file 4 and input to the address adder 6 for access. Is calculated. If the instruction is a store instruction, the stored data is similarly read from the reorder buffer operation result data 3 or the register file 4 and notified to the cache memory 8. The load data of the load instruction is
The data is written to the entry of the reorder buffer operation result data 3 corresponding to the instruction. If an exception occurs during the execution of an instruction, the cache memory 8 notifies the reorder buffer control information unit 2 of an exception report together with the cause of the exception (memory access instruction exception report).

【0031】次に、リオーダバッファ制御情報部2につ
いて詳細に説明する。
Next, the reorder buffer control information section 2 will be described in detail.

【0032】リオーダバッファ制御情報部2は、図1に
示すように、命令エントリ211〜21n、先頭エントリ
ポインタ22、発行命令選択回路23、リタイア制御回
路24、エントリ番号持ち回り部25、例外エントリ番
号制御回路26、例外要因保持部27、例外処理要求生
成部28からなる。
As shown in FIG. 1, the reorder buffer control information section 2 includes instruction entries 21 1 to 21 n , a head entry pointer 22, an issued instruction selection circuit 23, a retirement control circuit 24, an entry number rotating section 25, an exception entry It comprises a number control circuit 26, an exception cause holding unit 27, and an exception processing request generation unit 28.

【0033】命令エントリ211〜21nはそれぞれ、オ
ペコード371〜37n、ディスティネーションフィール
ド301〜30n、Ryソース311〜31n、Rzソース
32 1〜32n、Ryリネーム番号331〜33n、Rzリ
ネーム番号341〜34n、命令アドレスフィールド35
1〜35n、発行済みフラグ361〜36n、DONEフラ
グ381〜38nを備える。ディスティネーションフィー
ルド301〜30nには、各命令によって指定される、実
行結果のレジスタファイル中の書き込みエントリの番号
が登録される。これはすなわち、図4の命令フィールド
に示すRxフィールドである。Ryソース311〜31n
とRzソース321〜32nは、命令によって指定され
る、各命令の演算入力データが格納されているレジスタ
ファイル中のエントリ番号が登録される。これはすなわ
ち、図4の命令フィールドに示すRyおよびRzフィー
ルドである。命令アドレスフィールド351〜35n
は、各命令のアドレスが登録される。発行済みフラグ3
1〜36nは、エントリの命令が発行されたことを示
す。発行済みフラグ361〜36nは、命令が発行される
ときにセットされ、該命令がリオーダバッファから削除
されるときにリセットされる。DONEフラグ381
38nは、エントリの命令の実行が終了しリタイア待ち
状態であることを示す。
Instruction entry 211~ 21nAre each
Percord 371~ 37n, Destination feel
C301~ 30n, Ry source 311~ 31n, Rz source
32 1~ 32n, Ry rename number 331~ 33n, Rz
Name number 341~ 34n, Instruction address field 35
1~ 35n, Issued flag 361~ 36n, DONE Hula
G381~ 38nIs provided. Destination fee
Ludo 301~ 30nContains the actual
Number of the write entry in the register file for the row result
Is registered. This is the instruction field of FIG.
Rx field shown in FIG. Ry source 311~ 31n
And Rz source 321~ 32nIs specified by the instruction
Register that stores the operation input data of each instruction
The entry number in the file is registered. This is the sun
The Ry and Rz fields shown in the instruction field of FIG.
It is Ludo. Instruction address field 351~ 35nTo
Is registered with the address of each instruction. Issued flag 3
61~ 36nIndicates that the entry's instruction has been issued
You. Issued flag 361~ 36nThe instruction is issued
Set when the instruction is deleted from the reorder buffer
Reset when it is done. DONE flag 381~
38nIndicates that the instruction of the entry has finished executing and is waiting for retirement.
Indicates a state.

【0034】発行命令選択回路23は、命令エントリ2
1〜21nに登録されている命令のうち発行条件の整っ
た命令を選択し発行する。このとき、発行した命令のリ
オーダバッファ中のエントリ番号がエントリ番号持ち回
り部25に送出される。エントリ番号持ち回り部25
は、発行した命令の例外報告タイミングまでこのエント
リ番号を持ちまわったのち、例外エントリ番号制御回路
26に送出する。
The issued instruction selecting circuit 23 stores the instruction entry 2
From the instructions registered in 1 1 to 21 n , an instruction satisfying the issue condition is selected and issued. At this time, the entry number of the issued instruction in the reorder buffer is sent to the entry number rotating unit 25. Entry number revolving part 25
Is transferred to the exception entry number control circuit 26 after the entry number has been taken over until the exception report timing of the issued instruction.

【0035】また、発行命令選択回路23は、命令の発
行と同時に、発行した命令のリオーダバッファ中のエン
トリの発行済みフラグをセットする。複数の命令を同時
に発行した場合は、それらの命令のリオーダバッファ中
のエントリの発行済みフラグをセットする。そして、発
行した命令の実行が終了すると同時に、該命令のリオー
ダバッファ中のエントリのDONEフラグをセットす
る。
The issued instruction selection circuit 23 sets the issued flag of the entry in the reorder buffer of the issued instruction at the same time when the instruction is issued. When a plurality of instructions are issued at the same time, the issued flag of the entry in the reorder buffer of those instructions is set. When the execution of the issued instruction is completed, the DONE flag of the entry in the reorder buffer of the instruction is set.

【0036】本実施例においては、同時に発行される命
令は演算系命令で1個、メモリアクセス系命令で1個の
合計2個までとするが、これに限定されるものではな
い。例えば、演算系命令の同時発行個数が2以上であっ
ても、またメモリアクセス系命令の同時発行個数が2以
上であっても良い。この場合の同時発行個数の変更は容
易であり、また本発明の趣旨とは直接関係はない。
In the present embodiment, the number of instructions issued at the same time is one for operation-related instructions and one for memory access-related instructions, up to a total of two instructions, but is not limited to this. For example, the number of simultaneously issued operation instructions may be two or more, or the number of simultaneously issued memory access instructions may be two or more. In this case, it is easy to change the number of simultaneous issuances, and it is not directly related to the gist of the present invention.

【0037】保持部27は、演算器7およびキャッシュ
メモリ8から通知された例外発生命令エントリ番号およ
び例外要因を保持するための手段で、その構成は、演算
器7からの演算系命令例外報告の有無を示すフラグであ
る演算系例外報告Vとキャッシュメモリ8からのメモリ
アクセス系命令例外報告の有無を示すフラグであるメモ
リ系例外報告Vとから構成される例外発生命令エントリ
番号V27aと、例外発生命令エントリ番号を保持する
ための例外発生命令エントリ番号保持部27bと、例外
要因を保持するための例外要因保持部27cと、からな
る。
The holding unit 27 is a means for holding the exception occurrence instruction entry number and the exception cause notified from the arithmetic unit 7 and the cache memory 8, and is configured to store the arithmetic instruction exception report from the arithmetic unit 7. An exception occurrence instruction entry number V27a composed of an arithmetic exception report V which is a flag indicating presence / absence and a memory exception report V which is a flag indicating presence / absence of a memory access instruction exception report from the cache memory 8; An exception occurrence instruction entry number holding unit 27b for holding an instruction entry number and an exception cause holding unit 27c for holding an exception cause are provided.

【0038】例外エントリ番号制御回路26は、例外の
発生した命令のうちリオーダバッファ内で最も古い命令
のものの例外要因および例外発生命令エントリ番号を保
持部27に保持する制御手段である。この例外エントリ
番号制御回路26は、エントリ番号持ち回り部25から
送出される例外発生命令エントリ番号と例外発生命令エ
ントリ番号保持部27bに保持されている例外発生命令
エントリ番号とを比較していずれがリオーダバッファ内
で古い命令のものであるかを判定する比較・判定手段を
有し、該比較・判定手段により、エントリ番号持ち回り
部25から送出される例外発生命令エントリ番号の方が
古いと判定されると、該命令の例外要因および例外発生
命令エントリ番号を例外要因保持部27cおよび例外発
生命令エントリ番号保持部27bに保持させるようにな
っている。
The exception entry number control circuit 26 is a control means for holding in the holding unit 27 the exception cause and the exception occurrence instruction entry number of the oldest instruction in the reorder buffer among the instructions in which the exception has occurred. The exception entry number control circuit 26 compares the exception occurrence instruction entry number sent from the entry number rotation section 25 with the exception occurrence instruction entry number held in the exception occurrence instruction entry number holding section 27b, and determines which one is the reordering instruction. A comparison / judgment unit for judging whether the instruction is an old instruction in the buffer, and the comparison / judgment unit judges that the exception occurrence instruction entry number sent from the entry number rotating unit 25 is older; The exception cause and the exception occurrence instruction entry number of the instruction are held in the exception cause holding unit 27c and the exception occurrence instruction entry number holding unit 27b.

【0039】以下、上記の例外エントリ番号制御回路2
6について図3を参照して詳細に説明する。以下の説明
では、エントリ番号持ち回り部25が、発行したメモリ
アクセス系命令のリオーダバッファ中におけるエントリ
番号を保持し、該メモリアクセス系命令についてキャッ
シュメモリ8から例外報告を受けると、保持しているエ
ントリ番号を例外発生命令エントリ番号として送出する
第1のエントリ番号持ち回り手段と、発行した演算系命
令のリオーダバッファ中におけるエントリ番号を保持
し、該演算系命令について演算器7から例外報告を受け
ると、保持しているエントリ番号を例外発生命令エント
リ番号として送出する第2のエントリ番号持ち回り手段
を備えているものとする。
Hereinafter, the above-mentioned exception entry number control circuit 2
6 will be described in detail with reference to FIG. In the following description, the entry number revolving unit 25 holds the entry number of the issued memory access instruction in the reorder buffer and, when receiving an exception report from the cache memory 8 for the memory access instruction, holds the entry A first entry number rotating means for sending the number as an exception occurrence instruction entry number, and holding an entry number in the reorder buffer of the issued operation instruction and receiving an exception report from the operation unit 7 for the operation instruction. It is assumed that there is provided a second entry number rotating means for transmitting the held entry number as an exception occurrence instruction entry number.

【0040】図3において、論理回路26aは、リオー
ダバッファ先頭エントリポインタ22、演算系例外報告
V(図2の演算系命令例外報告の有無を示すフラグ)、
エントリ番号持ち回り部25から演算器例外報告タイミ
ングに同期して送出される演算系エントリ番号、メモリ
系例外報告V(図2のメモリアクセス系命令例外報告の
有無を示すフラグ)、およびメモリ系エントリ番号に基
づいて、同時に報告された演算系エントリ番号とメモリ
系エントリ番号のうち何れがリオーダバッファ中で古い
エントリであるかを判定する。同時に例外報告をする、
演算系命令およびメモリアクセス系命令のうち、リオー
ダバッファ中で古い命令の例外報告を、例外発生命令エ
ントリ番号保持部27bおよび例外要因保持部27cに
登録させる。以下の、の場合には、論理回路26a
は、メモリ系命令のエントリ番号が古いと判定し、
「1」を出力する。
In FIG. 3, the logic circuit 26a includes a reorder buffer head entry pointer 22, an arithmetic exception report V (a flag indicating the presence or absence of an arithmetic instruction exception report in FIG. 2),
The operation system entry number, the memory system exception report V (flag indicating the presence or absence of the memory access system instruction exception report in FIG. 2), and the memory system entry number transmitted from the entry number rotating unit 25 in synchronization with the operation unit exception report timing , It is determined which of the simultaneously reported arithmetic entry number and memory entry number is the older entry in the reorder buffer. Report an exception at the same time,
Of the arithmetic instructions and the memory access instructions, the exception report of the old instruction in the reorder buffer is registered in the exception occurrence instruction entry number holding unit 27b and the exception cause holding unit 27c. In the following case, the logic circuit 26a
Determines that the entry number of the memory instruction is old,
"1" is output.

【0041】演算系例外報告Vとメモリ系例外報告V
が両方とも点灯しているときで、 メモリ系エントリ番号<演算系エントリ番号<先頭エン
トリポインタ または、 先頭エントリポインタ<メモリ系エントリ番号<演算系
エントリ番号 または、 演算系エントリ番号<先頭エントリポインタ<メモリ系
エントリ番号 の何れかの条件を満たすとき メモリ系例外報告Vのみ点灯しているとき 上述のようにして論理回路26aによりメモリ系命令の
方が古いと判定されたときは、セレクタ27dはメモリ
系エントリ番号を選択し、セレクタ27eはメモリ系例
外要因を選択する。
Arithmetic exception report V and memory exception report V
When both are lit, Memory entry number <Arithmetic entry number <First entry pointer OR First entry pointer <Memory entry number <Arithmetic entry number or Arithmetic entry number <First entry pointer <Memory When any of the conditions of the system entry number is satisfied When only the memory system exception report V is lit When the logic circuit 26a determines that the memory system instruction is older as described above, the selector 27d selects the memory system exception report V The entry number is selected, and the selector 27e selects a memory exception factor.

【0042】なお、演算系例外報告Vとメモリ系例外報
告Vが両方とも点灯しているときで、 演算系エントリ番号<メモリ系エントリ番号<先頭エン
トリポインタ または、 先頭エントリポインタ<演算系エントリ番号<メモリ系
エントリ番号 または、 メモリ系エントリ番号<先頭エントリポインタ<演算系
エントリ番号 の何れかの条件を満たすときには、論理回路26aは、
演算系エントリ番号がメモリ系エントリ番号より古い命
令のものであると判定する。
When both the operation system exception report V and the memory system exception report V are lit, the operation system entry number <the memory system entry number <the first entry pointer or the first entry pointer <the operation system entry number < When any of the following conditions is satisfied: memory system entry number or memory system entry number <head entry pointer <operation system entry number
It is determined that the operation system entry number is older than the memory system entry number.

【0043】論理回路26bは、リオーダバッファ先頭
エントリポインタ22、例外発生命令エントリ番号V2
7a、例外発生命令エントリ番号保持部27b、メモリ
系例外報告V、メモリ系エントリ番号に基づいて、例外
発生エントリ番号とメモリ系エントリ番号のうち何れが
リオーダバッファ中で古いエントリであるかを判定す
る。例外発生エントリ番号に対応する命令よりもメモリ
系エントリ番号に対応する命令が古い命令であった場合
には、例外発生エントリ番号保持部27bおよび例外要
因保持部27cを更新する必要がある。以下の、の
場合には、論理回路26bは、メモリ系命令のエントリ
番号が古いと判定し、「1」を出力する。
The logic circuit 26b includes a reorder buffer head entry pointer 22, an exception occurrence instruction entry number V2
7a, the exception occurrence instruction entry number holding unit 27b, the memory system exception report V, and the memory system entry number are used to determine which of the exception occurrence entry number and the memory system entry number is the older entry in the reorder buffer. . If the instruction corresponding to the memory system entry number is older than the instruction corresponding to the exception occurrence entry number, it is necessary to update the exception occurrence entry number holding unit 27b and the exception cause holding unit 27c. In the following cases, the logic circuit 26b determines that the entry number of the memory instruction is old, and outputs “1”.

【0044】例外発生エントリ番号V27aとメモリ
系例外報告Vが両方とも点灯しているときで、 メモリ系エントリ番号<例外発生エントリ番号<先頭エ
ントリポインタ または、 先頭エントリポインタ<メモリ系エントリ番号<例外発
生エントリ番号 または、 例外発生エントリ番号<先頭エントリポインタ<メモリ
系エントリ番号 の何れかの条件を満たすとき。
When both the exception occurrence entry number V27a and the memory system exception report V are lit, the memory system entry number <exception occurrence entry number <head entry pointer or the head entry pointer <memory system entry number <exception occurrence When one of the following conditions is satisfied: entry number or exception occurrence entry number <first entry pointer <memory entry number.

【0045】メモリ系例外報告Vのみ点灯していると
き 論理回路26cは、リオーダバッファ先頭エントリポイ
ンタ22、例外発生エントリ番号V27a、例外発生エ
ントリ番号保持部27b、演算器例外報告V、エントリ
番号持ち回り部25から演算器例外報告タイミングに同
期して送出される演算系エントリ番号に基づいて、例外
発生エントリ番号と演算系エントリ番号のうち何れがリ
オーダバッファ中で古いエントリであるかを判定する。
例外発生エントリ番号に対応する命令よりも演算系エン
トリ番号に対応する命令が古い命令であった場合には、
例外発生エントリ番号保持部27bおよび例外要因保持
部27cを更新する必要がある。以下の、の場合に
は、論理回路26cは、演算系エントリ番号が古いと判
定し、「1」を出力する。
When only the memory system exception report V is lit, the logic circuit 26c includes the reorder buffer head entry pointer 22, the exception occurrence entry number V27a, the exception occurrence entry number holding unit 27b, the arithmetic unit exception report V, and the entry number rotation unit. 25, it is determined which of the exception occurrence entry number and the operation system entry number is the older entry in the reorder buffer, based on the operation system entry number transmitted in synchronization with the operation unit exception report timing.
If the instruction corresponding to the operation system entry number is older than the instruction corresponding to the exception occurrence entry number,
It is necessary to update the exception occurrence entry number holding unit 27b and the exception cause holding unit 27c. In the following cases, the logic circuit 26c determines that the operation system entry number is old, and outputs “1”.

【0046】例外発生エントリ番号V27aと演算器
例外報告Vが両方とも点灯しているときで、 演算系エントリ番号<例外発生エントリ番号<先頭エン
トリポインタ または、 先頭エントリポインタ<演算系エントリ番号<例外発生
エントリ番号 または、 例外発生エントリ番号<先頭エントリポインタ<演算系
エントリ番号 の何れかの条件を満たすとき。
When both the exception occurrence entry number V27a and the operation unit exception report V are lit, the operation system entry number <exception occurrence entry number <head entry pointer or the head entry pointer <operation system entry number <exception occurrence When one of the following conditions is satisfied: entry number or exception occurrence entry number <first entry pointer <arithmetic entry number.

【0047】演算系例外報告Vのみ点灯しているとき 上述の例外エントリ番号制御回路26では、論理回路2
6b,26cの出力を入力とするOR回路26dよりな
るストローブ手段が、論理回路26b,26cの比較結
果に基づいて、例外発生命令エントリ番号保持部27b
および例外要因保持部27cにおける保持内容を更新す
る。具体的には、論理回路26bによりメモリ系例外エ
ントリ番号が例外発生エントリ番号保持部27bより古
い命令であると判断されたとき、または論理回路26c
により演算系例外エントリ番号が例外発生エントリ番号
保持部27bより古い命令であると判断されたとき、O
Rゲート26dの出力が1となり、例外発生エントリ番
号V27a、例外発生エントリ番号保持部27b、例外
要因保持部27cが更新される。
When Only Arithmetic Exception Report V is Lighted In the exception entry number control circuit 26 described above, the logic circuit 2
A strobe means comprising an OR circuit 26d to which the outputs of the logic circuits 26b and 26c are input is used to store the exception occurrence instruction entry number holding unit 27b based on the comparison result of the logic circuits 26b and 26c.
Then, the content held in the exception factor holding unit 27c is updated. Specifically, when the logic circuit 26b determines that the memory system exception entry number is an instruction older than the exception occurrence entry number holding unit 27b, or when the logic circuit 26c
When it is determined that the operation system exception entry number is an instruction older than the exception occurrence entry number holding unit 27b,
The output of the R gate 26d becomes 1, and the exception occurrence entry number V27a, the exception occurrence entry number holding unit 27b, and the exception cause holding unit 27c are updated.

【0048】以上の動作により、初めてメモリ系例外や
演算系例外が発生したとき、またはすでに例外発生エン
トリ番号保持部27bに例外発生エントリ番号が登録さ
れていて新たな例外が発生したときに、その例外に対応
する命令のリオーダバッファ中のエントリ番号および該
命令の例外要因がそれぞれ例外発生エントリ番号保持部
27bおよび例外要因保持部27cに正しく登録され
る。
According to the above operation, when a memory-related exception or an arithmetic-related exception occurs for the first time, or when a new exception occurs when an exception occurrence entry number is already registered in the exception occurrence entry number holding unit 27b, the exception occurs. The entry number in the reorder buffer of the instruction corresponding to the exception and the exception cause of the instruction are correctly registered in the exception occurrence entry number holding unit 27b and the exception cause holding unit 27c, respectively.

【0049】例外処理制御部5に対する例外処理要求
は、例外処理要求生成部28によって以下のようにして
生成される。
The exception handling request to the exception handling controller 5 is generated by the exception handling request generator 28 as follows.

【0050】リタイアエントリポインタ30と例外発生
エントリ番号保持部27bの内容がコンパレータ281
により比較される。さらに、コンパレータ28aの出力
と例外発生エントリ番号V27a、リタイア制御部24
からのリタイア指示信号がANDゲート28bに入力さ
れ、その出力が例外処理要求として例外処理部5に送出
される。
The contents of the retirement entry pointer 30 and the exception occurrence entry number holding section 27b are stored in the comparator 281.
Are compared by Further, the output of the comparator 28a, the exception occurrence entry number V27a, the retirement control unit 24
Is input to the AND gate 28b, and the output is sent to the exception processing unit 5 as an exception processing request.

【0051】例外が発生した命令の命令アドレスは、以
下のようにして求められる。
The instruction address of the instruction in which the exception has occurred is obtained as follows.

【0052】リオーダバッファ制御情報部2内の各エン
トリ211〜21nの命令アドレスフィールドがセレタタ
に入力され、例外発生エントリ番号保持部27bにより
選択される。該選択結果が、例外の発生した命令の命令
アドレスである。この例外発生命令アドレスは、例外処
理要求が立っていないときは無効とされる。
The instruction address field of each of the entries 21 1 to 21 n in the reorder buffer control information section 2 is input to the selector, and is selected by the exception occurrence entry number holding section 27b. The result of the selection is the instruction address of the instruction in which the exception has occurred. This exception occurrence instruction address is invalid when no exception processing request is made.

【0053】[0053]

【発明の効果】以上説明したように構成される本発明に
よれば、命令追い越しバッファの各エントリの命令に対
応して例外要因を保持する必要がないので、例外要因の
保持に必要なハードウェアは例えば1エントリ分で済む
ことになり、ハードウェア量を大幅に削減することがで
きるという効果がある。
According to the present invention configured as described above, it is not necessary to hold the exception cause in correspondence with the instruction of each entry of the instruction passing buffer, so that the hardware necessary for holding the exception cause is not necessary. For example, only one entry is required, and the amount of hardware can be greatly reduced.

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

【図1】本発明の割り込み処理方法が適用された情報処
理装置の一実施形態を示すブロック図である。
FIG. 1 is a block diagram illustrating an embodiment of an information processing apparatus to which an interrupt processing method according to the present invention is applied .

【図2】図1に示すリオーダバッファ制御情報部を備え
た情報処理装置の一実施形態を示すブロック図である。
FIG. 2 is a block diagram showing an embodiment of an information processing apparatus including the reorder buffer control information section shown in FIG.

【図3】図1に示す例外エントリ番号制御回路26の一
構成例を示すブロック図である。
FIG. 3 is a block diagram showing a configuration example of an exception entry number control circuit 26 shown in FIG.

【図4】リネーム処理における命令コードの一フォーマ
ット例を示す図である。
FIG. 4 is a diagram showing an example of a format of an instruction code in a rename process.

【図5】オペランドリメーミングにおける命令実行手順
の一例を示す図である。
FIG. 5 is a diagram showing an example of an instruction execution procedure in operand re-memming.

【図6】従来の情報処理装置の命令パイプラインを構成
するリオーダバッファ制御情報部の一構成例を示すブロ
ック図である。
FIG. 6 is a block diagram illustrating a configuration example of a reorder buffer control information section included in an instruction pipeline of a conventional information processing apparatus.

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

1 命令バッファ 2 リオーダバッファ制御情報部 3 リオーダバッファ演算結果データ部 4 レジスタファイル部 5 例外処理制御部 6 アドレスアダー 7 演算器 8 キャッシュメモリ 9 主記憶装置 10 リネーム処理部 11 命令実行処理部 22 先頭エントリポインタ 23 発行命令選択回路 24 リタイア制御部 25 エントリ番号持ち回り部 26 例外発生命令エントリ番号制御回路 27 保持部 28 例外処理要求生成部 REFERENCE SIGNS LIST 1 instruction buffer 2 reorder buffer control information section 3 reorder buffer calculation result data section 4 register file section 5 exception processing control section 6 address adder 7 computing unit 8 cache memory 9 main storage device 10 rename processing section 11 instruction execution processing section 22 first entry Pointer 23 Issued instruction selection circuit 24 Retirement control unit 25 Entry number rotating unit 26 Exception occurrence instruction entry number control circuit 27 Holding unit 28 Exception processing request generation unit

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のエントリを有するリオーダバッフ
ァに一連の実行命令を登録し、該登録命令のうちから発
行条件の整った順に命令を発行して処理を行うパイプラ
イン処理における割り込み処理方法において、 発行した命令の前記リオーダバッファ中におけるエント
リ番号を保持し、該命令について例外処理が発生する
と、その保持しているエントリ番号を例外発生命令エン
トリ番号として獲得し、該例外発生命令エントリ番号と
ともにその例外要因を保持する第1のステップと、 新たに発行した命令に例外処理が発生すると、該新たな
例外処理発生により獲得した例外発生命令エントリ番号
と前回の例外処理発生により獲得した例外発生命令エン
トリ番号とを比較していずれが前記リオーダバッファ内
で古い命令のものであるかを判定する第2のステップ
と、 前記判定結果が、新たな例外処理発生により獲得した例
外発生エントリ番号の方が古い命令のものである場合に
は、前回保持した例外発生エントリ番号および例外要因
に代えて該新たな例外処理発生により獲得した例外発生
命令エントリ番号とその例外要因を保持する第3のステ
ップと、 前記第3のステップにて最終的に保持される例外発生命
令エントリ番および例外要因に基づいて例外処理命令を
実行する第4のステップとを含み、 前記第1のステップは、 前記発行命令としてリオーダバッファから発行されるメ
モリアクセス系命令と演算系命令のそれぞれについて、
例外発生命令エントリ番号を獲得し、該例外発生命令エ
ントリ番号とともにその例外要因を保持する処理を含
み、 前記第2のステップは、 前記リオーダバッファに新たに登録される命令のエント
リ番号を示すリオーダバッファ先頭エントリポインタ
と、前記第1のステップにて獲得された、前記演算系命
令に関する例外発生命令エントリ番号である演算系エン
トリ番号および前記メモリアクセス系命令に関する例外
発生命令エントリ番号であるメモリ系エントリ番号との
関係が、 メモリ系エントリ番号<演算系エントリ番号<先頭エン
トリポインタ または、 先頭エントリポインタ<メモリ系エントリ番号<演算系
エントリ番号または、 演算系エントリ番号<先頭エントリポインタ<メモリ系
エントリ番号の何れかの条件を満たすときに、メモリ系
エントリ番号が演算系エントリ番号より古い命令のもの
であると判定し、 演算系エントリ番号<メモリ系エントリ番号<先頭エン
トリポインタまたは、 先頭エントリポインタ<演算系エントリ番号<メモリ系
エントリ番号または、 メモリ系エントリ番号<先頭エントリポインタ<演算系
エントリ番号 の何れかの条件を満たすときに、演算系エントリ番号が
メモリ系エントリ番号より古い命令のものであると判定
する処理を含む ことを特徴とする割り込み処理方法。
1. A reorder buffer having a plurality of entries.
Register a series of execution instructions in the
A pipeline that issues instructions and processes them in the order in which the line conditions are met
In the interrupt processing method in the in-process , an entry of an issued instruction in the reorder buffer is performed.
Retains the renumber, and exception processing occurs for the instruction
And the entry number held by the
The exception occurrence instruction entry number and
The first step is to hold the exception cause, and when exception processing occurs in the newly issued instruction , the new step
Exception occurrence instruction entry number acquired by exception processing occurrence
And the exception occurrence instruction acquired by the previous exception processing
Which is in the reorder buffer
Second step to determine if the instruction is old
And the determination result is obtained by occurrence of new exception processing
If the out-of-order entry number is for an older instruction
Indicates the exception occurrence entry number and exception cause held previously
Exception occurrence acquired by the new exception handling occurrence in place of
A third step that holds the instruction entry number and its exception cause
And the exception generation instruction finally retained in the third step.
Exception handling instruction based on the instruction entry number and exception cause
And executing the fourth step. The first step includes a step of issuing a message issued from the reorder buffer as the issued instruction.
For each of the memory access instruction and the arithmetic instruction,
Acquires the exception occurrence instruction entry number, and
Including the process of retaining the exception cause together with the entry number.
In the second step, the entry of an instruction newly registered in the reorder buffer is performed.
Reorder buffer top entry pointer indicating the renumber
And the operation system command acquired in the first step.
Arithmetic system entry that is the
Exceptions related to tree numbers and memory access instructions
Memory entry number, which is the generated instruction entry number
The relationship is as follows : memory entry number <operation entry number <head entry
Bird pointer or first entry pointer <memory entry number <arithmetic
Entry number or arithmetic entry number <head entry pointer <memory
When any of the conditions of the entry number is satisfied,
Instruction whose entry number is older than the arithmetic entry number
Is determined, and the arithmetic entry number <the memory entry number <the first entry
Bird pointer or head entry pointer <operation entry number <memory
Entry number or memory system entry number <first entry pointer <arithmetic system
When either condition is satisfied entry number, operation system entry number
Judge that the instruction is older than the memory entry number
An interrupt processing method , comprising :
【請求項2】 請求項1に記載の割り込み処理方法にお
いて、 前記第2のステップは、 前記リオーダバッファ先頭エントリポインと、前記メモ
リ系エントリ番号と、前回の例外処理発生により獲得し
た例外発生命令エントリ番号との関係が、 メモリ系エントリ番号<例外発生エントリ番号<先頭エ
ントリポインタまたは、 先頭エントリポインタ<メモリ系エントリ番号<例外発
生エントリ番号または、 例外発生エントリ番号<先頭エントリポインタ<メモリ
系エントリ番号 の何れかの条件を満たすときに、メモリ系エントリ番号
が前回の例外処理発生により獲得した例外発生命令エン
トリ番号より古い命令のものであると判定する処理をさ
らに含む ことを特徴とする割り込み処理方法。
2. The interrupt processing method according to claim 1,
There are, the second step includes: the reorder buffer start entry point, the notes
Re-related entry number and acquired by previous exception processing
The relation with the exception occurrence instruction entry number is as follows: memory entry number <exception occurrence entry number <top error
Entry pointer or top entry pointer <memory entry number <exception
Raw entry number or exception occurrence entry number <first entry pointer <memory
When any of the system entry number conditions are met, the memory entry number
Is the exception occurrence instruction acquired by the previous exception processing.
Processing to judge that the instruction is older than the tree number
The interrupt processing method which comprises the al.
【請求項3】 請求項1または請求項2に記載の割り込
み処理方法において、 前記第2のステップは、 前記リオーダバッファ先頭エントリポインと、前記演算
系エントリ番号と、前回の例外処理発生により獲得した
例外発生命令エントリ番号との関係が、 演算系エントリ番号<例外発生エントリ番号<先頭エン
トリポインタまたは、 先頭エントリポインタ<演算系エントリ番号<例外発生
エントリ番号または、 例外発生エントリ番号<先頭エントリポインタ<演算系
エントリ番号 の何れかの条件を満たすときに、演算系エントリ番号が
前回の例外処理発生により獲得した例外発生命令エント
リ番号より古い命令のものであると判定する処理をさら
に含む ことを特徴とする割り込み処理方法。
3. An interrupt according to claim 1 or claim 2.
In seen processing method, the second step includes: the reorder buffer start entry point, the operation
Acquired by system entry number and previous exception processing
The relation with the exception occurrence instruction entry number is as follows: Arithmetic entry number <Exception occurrence entry number <First entry
Bird pointer or first entry pointer <arithmetic entry number <exception
Entry number or exception occurrence entry number <first entry pointer <arithmetic
When either condition is satisfied entry number, operation system entry number
Exception occurrence instruction entry acquired by the previous exception processing occurrence
Further processing to determine that the instruction is older than the
An interrupt processing method characterized by including the following .
JP35771297A 1997-12-25 1997-12-25 Interrupt handling method Expired - Lifetime JP2953451B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35771297A JP2953451B2 (en) 1997-12-25 1997-12-25 Interrupt handling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35771297A JP2953451B2 (en) 1997-12-25 1997-12-25 Interrupt handling method

Publications (2)

Publication Number Publication Date
JPH11184696A JPH11184696A (en) 1999-07-09
JP2953451B2 true JP2953451B2 (en) 1999-09-27

Family

ID=18455532

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35771297A Expired - Lifetime JP2953451B2 (en) 1997-12-25 1997-12-25 Interrupt handling method

Country Status (1)

Country Link
JP (1) JP2953451B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1264087C (en) * 1999-09-08 2006-07-12 关一 Register renaming system

Also Published As

Publication number Publication date
JPH11184696A (en) 1999-07-09

Similar Documents

Publication Publication Date Title
JP3772900B2 (en) Computer system
US7624253B2 (en) Determining register availability for register renaming
JP2009527866A (en) Transactional memory in out-of-order processors
JP2003029986A (en) Inter-processor register succeeding method and device therefor
JPH06259253A (en) Data processor and its operating method
EP0747809A1 (en) A method and system for processing multiple branch instructions that write to count and/or link registers
CN114341804A (en) Minimizing traversal of processor reorder buffer (ROB) for register Renaming Map (RMT) state recovery for interrupt instruction recovery in a processor
JP2953451B2 (en) Interrupt handling method
JP3497087B2 (en) Instruction control apparatus and method
JP2894438B2 (en) Pipeline processing equipment
JP2552738B2 (en) Data processing device
JP2901573B2 (en) Super scalar information processing device
JPH10283178A (en) Method and system for issuing instruction
JPS6149695B2 (en)
JPH07219771A (en) Instruction processor
JP2002149438A (en) Method for controlling buffer storage for recovery control
JPH0756760A (en) Recovery device
JP2003015956A (en) Cache system having fault recovery function and cache control method for the system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 8

Free format text: PAYMENT UNTIL: 20070716

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080716

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20090716

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20100716