JP2001014160A - Information processor - Google Patents

Information processor

Info

Publication number
JP2001014160A
JP2001014160A JP11188372A JP18837299A JP2001014160A JP 2001014160 A JP2001014160 A JP 2001014160A JP 11188372 A JP11188372 A JP 11188372A JP 18837299 A JP18837299 A JP 18837299A JP 2001014160 A JP2001014160 A JP 2001014160A
Authority
JP
Japan
Prior art keywords
instruction
register
instructions
decoder
read
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
Application number
JP11188372A
Other languages
Japanese (ja)
Other versions
JP3668643B2 (en
Inventor
Toru Hiraoka
徹 平岡
Tomonaga Itoi
朋永 糸井
Masashi Hakamata
正史 袴田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Hitachi Solutions Technology Ltd
Original Assignee
Hitachi Ltd
Hitachi ULSI Systems 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 Hitachi Ltd, Hitachi ULSI Systems Co Ltd filed Critical Hitachi Ltd
Priority to JP18837299A priority Critical patent/JP3668643B2/en
Publication of JP2001014160A publication Critical patent/JP2001014160A/en
Application granted granted Critical
Publication of JP3668643B2 publication Critical patent/JP3668643B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PROBLEM TO BE SOLVED: To advance a pipeline processing by reducing delay due to a branch- destination instruction read by requesting a memory to read the branch- destination instruction of a branch instruction to an instruction buffer when the branch instruction is decoded. SOLUTION: At an IF stage, instructions set in BIRP 400 and BIRS 500 are decoded by a 1st instruction decoder 900. When a branch instruction is decoded by the 1st instruction decoder 900, an instruction read request for a branch-desntination instruction is issued to an instruction cache 100. The instructions set in the BIRP 400 and BIRS 500 are stored in IFR 100, and the instruction set in the BIRP 400 is transferred to a selecting circuit 1010. Thus, two instructions are decoded in every machine cycle at the IF stage as a 1st instruction decoding stage and transferred to a D stage as a 2nd instruction decoding stage. At the 2nd instruction decoding stage, the instructions set in IRP 1200 and IRS 1300 are decoded by a 2nd instruction decoder 1700.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、パイプライン方式
の情報処理装置に係り、特に、分岐命令を効率的に実行
することを可能にした情報処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pipeline type information processing apparatus, and more particularly to an information processing apparatus capable of efficiently executing a branch instruction.

【0002】[0002]

【従来の技術】図4は従来技術によるパイプライン方式
の情報処理装置の命令レジスタおよび命令デコーダ部分
の構成例を示すブロック図、図5は命令レジスタ、命令
デコーダを含む情報処理装置の構成例を示すブロック
図、図6は分岐命令を含む命令群の流れの一例を示す
図、図7は図6に示す命令列における動作を説明するタ
イミングチャートである。以下図4〜図7を参照して従
来技術による情報処理装置について説明する。
2. Description of the Related Art FIG. 4 is a block diagram showing an example of a configuration of an instruction register and an instruction decoder of a pipeline type information processing apparatus according to the prior art, and FIG. FIG. 6 is a diagram showing an example of the flow of an instruction group including a branch instruction, and FIG. 7 is a timing chart for explaining the operation in the instruction sequence shown in FIG. Hereinafter, an information processing apparatus according to the related art will be described with reference to FIGS.

【0003】図4において、100はメモリの写しを持
つ命令キャッシュ、200は命令キャッシュから読み出
した複数の命令を保持する命令バッファ(IBR)、1
200は次に実行する命令を保持する第1命令レジスタ
(IRP)、1300はIRP1200に続く命令を保
持する第2命令レジスタ(IRS)、1500はIRP
1200に保持されている命令が有効であることを示す
識別子(IRPV)、1600はIRS1300に保持
されている命令が有効であることを示す識別子(IRS
V)、300はIBR200、IRP1200、IRS
1300、IRPV1500およびIRSV1600の
制御を行うIBR制御回路、1700はIRP1200
およびIRS1300に保持された命令を解読する命令
デコーダである。
In FIG. 4, reference numeral 100 denotes an instruction cache having a copy of a memory; 200, an instruction buffer (IBR) for holding a plurality of instructions read from the instruction cache;
200 is a first instruction register (IRP) holding an instruction to be executed next, 1300 is a second instruction register (IRS) holding an instruction following the IRP 1200, and 1500 is an IRP
An identifier (IRPV) 1600 indicating that the instruction held in 1200 is valid is an identifier (IRS) 1600 indicating that the instruction held in IRS 1300 is valid.
V), 300 are IBR200, IRP1200, IRS
An IBR control circuit for controlling the IRP 1200 and the IRPV 1500 and the IRSV 1600.
And an instruction decoder for decoding the instruction held in the IRS 1300.

【0004】命令キャッシュ100から読み出された複
数の命令はIBR200に保持される。次に実行される
命令がIBR200から切り出されIRP1200にセ
ットされる。また、IRP1200にセットされた命令
の次の命令も同時にIBR200から切り出されIRS
1300にセットされる。
A plurality of instructions read from the instruction cache 100 are held in the IBR 200. The next instruction to be executed is cut out from IBR 200 and set in IRP 1200. The instruction next to the instruction set in the IRP 1200 is also cut out from the IBR 200 at the same time, and the IRS
It is set to 1300.

【0005】一般に高性能な情報処理装置では複数の命
令を同時に処理するスーパスカラ方式を採用している。
IBR制御回路300ではIRP1200とIRS13
00にセットされた命令の組み合わせがスーパスカラ処
理可能な命令組み合わせか否かを判断する。IRP12
00とIRS1300にセットされた命令の組み合わせ
がスーパスカラ処理可能な命令組み合わせの場合,両方
の命令が有効であることを示すために、IBR制御回路
300はIRPV1500およびIRSV1600に'
1'をセットする。IRP1200とIRS1300に
セットされた命令の組み合わせがスーパスカラ不可な命
令組み合わせの場合、またはIRP1200にセットさ
れた命令の次の命令がまだIBR200に格納されてい
ない場合、IBR制御回路300はIRPV1500に
のみ'1'をセットする。
In general, a high-performance information processing apparatus employs a superscalar system for simultaneously processing a plurality of instructions.
In the IBR control circuit 300, the IRP 1200 and the IRS 13
It is determined whether the combination of instructions set to 00 is an instruction combination that allows superscalar processing. IRP12
If the combination of the instructions set in 00 and IRS1300 is an instruction combination that can perform superscalar processing, the IBR control circuit 300 sends an instruction to the IRPV 1500 and IRSV 1600 to indicate that both instructions are valid.
Set 1 '. If the combination of the instructions set in the IRP 1200 and the IRS 1300 is an instruction combination that cannot be superscalar, or if the instruction following the instruction set in the IRP 1200 has not yet been stored in the IBR 200, the IBR control circuit 300 sets the '1 Set '.

【0006】IRP1200にセットされる命令がまだ
IBR200に格納されていない場合、IBR制御回路
300はIRPV1500およびIRSV1600に'
0'をセットする。また、IBR制御回路300は次に
実行する命令の切り出しをIBR200に対して要求す
る。このとき、IRPV1500とIRSV1600の
両方が'1'の場合はIRS1300にセットされた命令
の次命令からの切り出しを要求し、IRPV1500の
み'1'の場合はIRP1200にセットされた命令の次
命令からの切り出しを要求する。また、IBR200に
空きが生じた場合、IBR制御回路300は命令キャッ
シュ100に対して命令の読み出しを要求する。
If the instruction set in IRP 1200 has not been stored in IBR 200 yet, IBR control circuit 300 sends a signal to IRP 1500 and IRSV 1600.
Set 0 '. Further, the IBR control circuit 300 requests the IBR 200 to cut out an instruction to be executed next. At this time, if both the IRPV 1500 and the IRSV 1600 are “1”, a request is made to cut out the instruction set in the IRS 1300 from the instruction following the instruction set in the IRP 1200 if only the IRP 1500 is “1”. Request clipping. When an empty space is generated in the IBR 200, the IBR control circuit 300 requests the instruction cache 100 to read the instruction.

【0007】命令デコーダ1700はIRP1200,
IRS1300に格納されている命令を解読する。IR
P1200またはIRS1300に分岐命令が解読され
た場合、命令デコーダ1700は命令キャッシュ100
に対して分岐先命令の命令読み出しを要求する。
The instruction decoder 1700 has an IRP 1200,
The instructions stored in the IRS 1300 are decoded. IR
When a branch instruction is decoded in the P1200 or the IRS 1300, the instruction decoder 1700 sets the instruction cache 100
Is requested to read the branch destination instruction.

【0008】次に図5で従来技術による情報処理装置の
各パイプラインにおける処理について説明する。図5に
おいて、100は命令キャッシュ、200はIBR、1
200はIRP、1300はIRS、1700は命令デ
コーダ、2000は例えば16本のレジスタ群で構成さ
れる汎用レジスタ、2100は命令デコーダ1700で
の解読結果によりオペランドアドレス計算のために指定
された汎用レジスタ2000の内容と命令により指定さ
れた変位値から命令の演算実行に必要なメモリオペラン
ドのアドレスを計算するオペランド用アドレス加算器、
2200はメモリの写しを持つオペランドキャッシュ、
2300はオペランドキャッシュ2200から読み出し
たデータのうち演算に使用する部分を先頭に並び替える
アライナ、2400はアライナ2300で並び替えを実
施した後のメモリオペランドと、命令デコーダ1700
での解読結果により演算のために指定された汎用レジス
タ2000の内容で演算を行う演算器である。
Next, the processing in each pipeline of the information processing apparatus according to the prior art will be described with reference to FIG. In FIG. 5, 100 is an instruction cache, 200 is an IBR, 1
200 is an IRP, 1300 is an IRS, 1700 is an instruction decoder, 2000 is a general-purpose register composed of, for example, 16 register groups, and 2100 is a general-purpose register 2000 designated for operand address calculation based on the decoding result of the instruction decoder 1700. An operand address adder for calculating an address of a memory operand required for executing an instruction operation from the contents of the instruction and a displacement value specified by the instruction;
2200 is an operand cache with a copy of memory,
Reference numeral 2300 denotes an aligner for rearranging the data read from the operand cache 2200 with the portion used for the operation first, 2400 a memory operand after rearrangement by the aligner 2300, and an instruction decoder 1700.
Is an arithmetic unit that performs an arithmetic operation based on the contents of the general-purpose register 2000 designated for the arithmetic operation based on the result of decryption performed by the general-purpose register 2000.

【0009】DステージではIRP1200およびIR
S1300にセットされた命令を命令デコーダ1700
で同じステージ内で解読する。命令の解読結果により汎
用レジスタ2000の指定された番号のレジスタを読み
出し、オペランド用アドレス加算器2100に転送す
る。また、別の解読結果である変位値もオペランド用ア
ドレス加算器2100に転送する。
In the D stage, IRP1200 and IR
The instruction set in S1300 is transferred to the instruction decoder 1700.
To decrypt in the same stage. The register of the designated number in the general-purpose register 2000 is read based on the result of decoding the instruction, and transferred to the operand address adder 2100. Also, a displacement value as another decoding result is transferred to the operand address adder 2100.

【0010】Aステージでは指定された汎用レジスタの
内容と変位値よりオペランド用アドレス加算器2100
でアドレス計算を行い、命令の演算実行に必要なメモリ
オペランド格納先のオペランドアドレスを計算する。オ
ペランド用アドレス加算器2100により求めたオペラ
ンドアドレスはオペランドキャッシュ2200に転送さ
れる。
In the A stage, an operand address adder 2100 is used based on the contents of the designated general-purpose register and the displacement value.
And calculate the operand address of the memory operand storage destination required for executing the operation of the instruction. The operand address obtained by the operand address adder 2100 is transferred to the operand cache 2200.

【0011】Tステージではオペランドキャッシュの参
照を実施する。オペランドキャッシュの読み出しデータ
はアライナ2300に転送される。
In the T stage, the operand cache is referenced. Read data from the operand cache is transferred to the aligner 2300.

【0012】Bステージではオペランドキャッシュ22
00からの読み出しデータの並べ替えを行い、オペラン
ドデータが順序通りに配列されるようになされる。
In the B stage, the operand cache 22
The read data from 00 is rearranged so that the operand data is arranged in order.

【0013】Lステージで演算器に転送する。Eステー
ジではアライナ2200からのメモリオペランドと汎用
レジスタ2000からのレジスタオペランドを使用して
演算を行う。演算結果は汎用レジスタ2000に書き込
まれる。このように、命令はD,A,T,B,L,Eの
6つのパイプラインステージに分解して実行される。
The data is transferred to the arithmetic unit in the L stage. In the E stage, an operation is performed using the memory operand from the aligner 2200 and the register operand from the general-purpose register 2000. The operation result is written to the general-purpose register 2000. As described above, the instruction is decomposed into six pipeline stages of D, A, T, B, L, and E and executed.

【0014】次に分岐命令を含む命令列についての一連
の処理について説明する。図6に示す命令列においてL
はロード命令、Aは加算命令、STはストア命令、Cは
比較命令、BCは条件分岐命令を示す。また,GR1〜
GR4は命令の演算に使用する汎用レジスタの番号を示
し、test1〜test6およびpr1は各々メモリ
上の領域を示すラベルである。
Next, a series of processes for an instruction sequence including a branch instruction will be described. In the instruction sequence shown in FIG.
Denotes a load instruction, A denotes an addition instruction, ST denotes a store instruction, C denotes a comparison instruction, and BC denotes a conditional branch instruction. Also, GR1
GR4 indicates the number of a general-purpose register used for the operation of the instruction, and test1 to test6 and pr1 are labels indicating areas on the memory, respectively.

【0015】図6に示す一連の命令列を実行するときの
タイミングチャートを図7に示す。図7において横軸は
時間を表わし,一目盛が1マシンサイクルを示してい
る。横軸に示す1〜21の数字は説明に使うために便宜
上付けたサイクル数である。以下、図6に示す命令列の
処理を図5および図7で説明する。
FIG. 7 is a timing chart when the series of instructions shown in FIG. 6 is executed. In FIG. 7, the horizontal axis represents time, and one scale indicates one machine cycle. The numbers 1 to 21 shown on the horizontal axis are the number of cycles added for convenience for explanation. Hereinafter, processing of the instruction sequence shown in FIG. 6 will be described with reference to FIGS.

【0016】サイクル2でL命令がIRP1200にセ
ットされる。このときIRS1300にはL命令の次の
A命令がセットされるが、L命令もA命令もメモリオペ
ランド参照が必要であるため、オペランド用アドレス加
算器2100/オペランドキャッシュ2200の競合に
よりスーパスカラ処理は実施できない。従って、サイク
ル2ではL命令のみが解読され、以降、サイクル3でア
ドレス計算、サイクル4でオペランドキャッシュ参照、
サイクル5で読み出しデータのアライン、サイクル6で
演算器2400に転送、サイクル7で演算を実行する。
以下、A命令、ST命令、L命令、A命令、ST命令、
L命令と同様に処理される。
In cycle 2, the L instruction is set in IRP 1200. At this time, the A instruction next to the L instruction is set in the IRS 1300. However, since both the L instruction and the A instruction require memory operand reference, superscalar processing is performed due to competition between the operand address adder 2100 and the operand cache 2200. Can not. Therefore, only the L instruction is decoded in cycle 2, and thereafter, the address calculation is performed in cycle 3, the operand cache is referenced in cycle 4,
The read data is aligned in cycle 5, transferred to the arithmetic unit 2400 in cycle 6, and the operation is executed in cycle 7.
Hereinafter, A instruction, ST instruction, L instruction, A instruction, ST instruction,
Processed in the same way as the L instruction.

【0017】次にサイクル9でC命令がIRP1200
にセットされる。このとき同時にIRS1300にはB
C命令がセットされる。BC命令はオペランド用アドレ
ス加算器2100/オペランドキャッシュ2200を使
用しないためC命令とのスーパスカラ処理が可能であ
る。従って、BC命令はサイクル9で命令の解読が行わ
れ、命令キャッシュ100に対して分岐先命令の読み出
し要求を行う。サイクル10からサイクル12で命令キ
ャッシュ100の読み出しおよびIBR200への命令
の格納が行われ、サイクル13に分岐先命令であるL命
令がIRP1200にセットされる。以下、A命令、S
T命令と順次処理され、ST命令の実行はサイクル20
で完了する。
Next, in cycle 9, the C instruction is IRP1200
Is set to At this time, B
The C instruction is set. Since the BC instruction does not use the operand address adder 2100 / operand cache 2200, superscalar processing with the C instruction is possible. Accordingly, the BC instruction is decoded in cycle 9, and issues a request to the instruction cache 100 to read the branch destination instruction. From cycle 10 to cycle 12, reading of the instruction cache 100 and storage of the instruction in the IBR 200 are performed, and in cycle 13, the L instruction which is a branch destination instruction is set in the IRP 1200. Hereinafter, the A instruction, S
Processing is sequentially performed with the T instruction, and execution of the ST instruction is performed in cycle 20.
Complete with

【0018】前述した従来技術による情報処理装置は,
分岐命令の解読を待ってから分岐先命令の命令読み出し
を始めるため、分岐先の命令の解読を開始するまでの間
に3サイクルの空きが生じる。即ち、一般に分岐命令が
発生すると、分岐先命令読み出しが完了するまで分岐先
命令の解読を開始することができず、このため分岐命令
以降の命令の演算実行が遅れることになるという問題が
発生する。
The information processing apparatus according to the prior art described above is
Since the instruction reading of the branch destination instruction is started after the branch instruction is decoded, there is an empty space of three cycles before the decoding of the branch destination instruction is started. That is, generally, when a branch instruction is generated, the decoding of the branch target instruction cannot be started until the reading of the branch target instruction is completed, which causes a problem that the execution of the instructions following the branch instruction is delayed. .

【0019】こうしたパイプライン処理における分岐命
令の出現における処理の乱れ、(遅れ)については種々
の改善案が提案されてきている。例えば、特開平7−2
39781号公報がある。しかしながら、これは、いず
れも実行の為の命令のデコード処理に応答した高速化の
工夫がなされている。
Various improvements have been proposed for the processing disturbance (delay) caused by the appearance of a branch instruction in such pipeline processing. For example, JP-A-7-2
No. 39781. However, any of these techniques is devised to increase the speed in response to the decoding process of the instruction for execution.

【0020】[0020]

【発明が解決しようとする課題】以上のような従来の技
術においては、パイプライン処理における分岐命令の出
現に対し、処理の遅れが避けられない、分岐先命令のア
ドレスを記憶するためのバッファメモリなどの大きな物
量が必要などの課題が残っている。
In the above prior art, a buffer memory for storing the address of a branch destination instruction is inevitably delayed in response to the appearance of a branch instruction in pipeline processing. There are still issues such as the need for large quantities.

【0021】本発明の目的は,前述した従来技術の問題
を解決し,分岐命令が発生した場合においても、分岐先
命令読み出しのための遅れを極力減じてパイプライン処
理、即ち、命令の解読および演算実行などを進めること
のできる情報処理装置を提供することにある。
An object of the present invention is to solve the above-mentioned problem of the prior art, and to minimize the delay for reading a branch destination instruction even when a branch instruction is generated, to perform pipeline processing, that is, to decode and execute instructions. An object of the present invention is to provide an information processing apparatus capable of performing arithmetic execution and the like.

【0022】[0022]

【課題を解決するための手段】本発明の命令先取り方式
は、命令の解読を2つのステージに分け、第1の命令解
読ステージでは第1の命令デコーダにより、命令バッフ
ァから読み出した命令を1マシンサイクルあたりに複数
の命令の解読を行い、また、第1の命令解読ステージで
は、分岐命令を解読した場合メモリに対して命令バッフ
ァへの当該分岐命令の分岐先命令読み出し要求を行い、
そして前記命令を第2の命令解読ステージにおいて第2
の命令デコーダにより順次実行のため解読するものであ
る。
According to the instruction prefetching method of the present invention, the decoding of an instruction is divided into two stages. In a first instruction decoding stage, an instruction read from an instruction buffer by a first instruction decoder is processed by one machine. A plurality of instructions are decoded per cycle, and in a first instruction decoding stage, when a branch instruction is decoded, a request for reading a branch destination instruction of the branch instruction to an instruction buffer is issued to a memory when a branch instruction is decoded.
And in the second instruction decoding stage,
, Which are sequentially decoded by the instruction decoder.

【0023】[0023]

【発明の実施の形態】本実施形態ではパイプラインを実
質的に2本持つスーパースカラ処理装置を対象にしてい
る。但し、従来の技術で述べたように、オペランドキャ
ッシュを2命令分同時にアクセスすることは出来ないの
で、そうではない条件が成立したときにのみ2つの命令
が併行して実行される。説明する実施形態はスーパース
カラ処理装置であるが、本発明はスカラ処理装置にも同
様に適用することが出来る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present embodiment is directed to a superscalar processing apparatus having substantially two pipelines. However, as described in the related art, since the operand cache cannot be accessed at the same time for two instructions, the two instructions are executed in parallel only when a condition other than the above is satisfied. Although the embodiment to be described is a super scalar processing apparatus, the present invention can be similarly applied to a scalar processing apparatus.

【0024】また、本実施形態は分岐成立を前提とした
時のパイプライン処理を例にしたものであり、これに分
岐予測などの技術を組み合わせてもよい。さらに、本実
施形態では、命令キャッシュとオペランドキャッシュと
(それぞれメインメモリの写しを格納するメモリであ
る)を別に構成している。命令キャッシュ、オペランド
キャッシュは命令、オペランドを含むキャッシュメモリ
に置き換え得る。
Further, the present embodiment exemplifies pipeline processing on the premise that a branch is taken, and may combine this with a technique such as branch prediction. Further, in the present embodiment, the instruction cache and the operand cache (each of which is a memory for storing a copy of the main memory) are configured separately. The instruction cache and operand cache can be replaced with a cache memory containing instructions and operands.

【0025】以下、本発明による情報処理装置の一実施
形態を図面により詳細に説明する。
An embodiment of the information processing apparatus according to the present invention will be described below in detail with reference to the drawings.

【0026】図1は本発明の一実施形態によるパイプラ
イン方式の情報処理装置の命令レジスタおよび命令デコ
ーダ部分の構成例を示すブロック図、図2は命令レジス
タ、命令デコーダを含む情報処理装置の構成例を示すブ
ロック図、図3は図6に示す命令列における動作を説明
するタイミングチャートである。以下、図1〜図3を参
照して本発明による情報処理装置について説明する。
FIG. 1 is a block diagram showing a configuration example of an instruction register and an instruction decoder part of a pipeline type information processing apparatus according to an embodiment of the present invention. FIG. 2 is a configuration of an information processing apparatus including an instruction register and an instruction decoder. FIG. 3 is a block diagram showing an example, and FIG. 3 is a timing chart for explaining the operation in the instruction sequence shown in FIG. Hereinafter, an information processing apparatus according to the present invention will be described with reference to FIGS.

【0027】図1において100はメモリの写しを持つ
命令キャッシュ、200は命令キャッシュから読み出し
た複数の命令を保持する命令バッファ(IBR)、40
0は第1の命令解読ステージで次に解読する命令を保持
する第1分岐命令レジスタ(BIRP)、500はBI
RP400に続く命令を保持する第2分岐命令レジスタ
(BIRS)、600はBIRP400およびBIRS
500に命令をセットするセット信号ラッチ(SETB
IRD)、700はBIRP400に保持されている命
令が有効であることを示す識別子(BIRPV)、80
0はBIRS500に保持されている命令が有効である
ことを示す識別子(BIRSV)、300はIBR20
0、BIRP400、BIRS500、SETBIRD
600、BIRPV700およびBIRSV800を制
御するIBR制御回路、900はBIRP400および
BIRS500に保持された命令を解読する第1命令デ
コーダ、1000はBIRP400およびBIRS50
0にセットされた命令を逐次格納する命令フローレジス
タ(IFR)であり、例えば8命令分保持することので
きるレジスタ群である。
In FIG. 1, reference numeral 100 denotes an instruction cache having a copy of a memory; 200, an instruction buffer (IBR) holding a plurality of instructions read from the instruction cache;
0 is a first branch instruction register (BIRP) holding an instruction to be decoded next in a first instruction decoding stage, 500 is a BIRP
A second branch instruction register (BIRS) holding the instruction following RP400, 600 is BIRP400 and BIRS
Set signal latch (SETB
IRD), 700 is an identifier (BIRPV), 80 indicating that the instruction held in BIRP 400 is valid.
0 is an identifier (BIRSV) indicating that the instruction held in the BIRS 500 is valid, and 300 is an IBR20.
0, BIRP400, BIRS500, SETBIRD
600, an IBR control circuit for controlling the BIRPV 700 and the BIRSV 800; 900, a first instruction decoder for decoding instructions held in the BIRP 400 and the BIRS 500; 1000, a BIRP 400 and a BIRS 50
An instruction flow register (IFR) that sequentially stores instructions set to 0, and is a group of registers that can hold, for example, eight instructions.

【0028】1010はBIRP400の出力とIFR
1000の出力を選択する選択回路、1200は第2の
命令解読ステージで次に解読する命令を保持する第1命
令レジスタ(IRP)、1300はIRP1200に続
く命令を保持する第2命令レジスタ(IRS)、150
0はIRP1200に保持されている命令が有効である
ことを示す識別子(IRPV)、1600はIRS13
00に保持されている命令が有効であることを示す識別
子(IRSV)、1100はIFR1000、選択回路
1010、IRP1200、IRS1300、IRPV
1500およびIRSV1600を制御するIFR制御
回路、1700はIRP1200およびIRS1300
に保持された命令を解読する第2命令デコーダである。
Reference numeral 1010 denotes the output of the BIRP 400 and the IFR.
A selection circuit for selecting the output of 1000, 1200 is a first instruction register (IRP) holding an instruction to be decoded next in a second instruction decoding stage, and 1300 is a second instruction register (IRS) holding an instruction following IRP 1200. , 150
0 is an identifier (IRPV) indicating that the instruction held in the IRP 1200 is valid, and 1600 is an IRS 13
Identifier (IRSV) 1100 indicating that the instruction held in 00 is valid, IFR1000, selection circuit 1010, IRP1200, IRS1300, IRPV
An IFR control circuit for controlling the IRS 1200 and the IRSV 1600.
Is a second instruction decoder for decoding the instruction stored in the second instruction decoder.

【0029】選択回路1010はIFR1000に命令
が存在しないときに、IFR1000をバイパスしてB
IRP400の命令をIRP1200に格納するための
ものであるが、ある場合には空きサイクルが出ても良い
とする設計思想のもとに常にIFR1000を経由する
方式とすれば持たなくとも構わない。また、本実施形態
ではステージの時間的制約上BIRS500からIRS
1300へ至る経路に選択回路を持たせなかったが、設
計態様によってはここにも選択回路を持たせることも有
り得る。また、第1分岐命令レジスタ(BIRP)40
0、第2分岐命令レジスタ(BIRS)500と物理的
に分離した2つのレジスタとして例示してあるが、要は
1サイクルに複数の命令の読み出しとデコードが可能で
あれば良いのであって、必要な書き込み、読み出しが出
来るものであれば一体のレジスタであっても良く、これ
を機能的に第1、第2の分岐命令レジスタと呼んでも良
い。
When there is no instruction in the IFR 1000, the selection circuit 1010 bypasses the IFR 1000 to
The instruction of the IRP 400 is stored in the IRP 1200. However, the instruction may always be passed through the IFR 1000 based on the design idea that an empty cycle may be generated in some cases. Also, in this embodiment, due to the time constraint of the stage, the BIRS 500
Although no selection circuit is provided on the path to 1300, a selection circuit may be provided here depending on the design. The first branch instruction register (BIRP) 40
0, the second branch instruction register (BIRS) 500 is illustrated as two registers physically separated from each other, but it is only necessary to be able to read and decode a plurality of instructions in one cycle. An integrated register may be used as long as it can write and read data, and it may be functionally referred to as first and second branch instruction registers.

【0030】命令キャッシュ100から読み出された複
数の命令はIBR200に保持される。次に解読される
命令がIBR200から切り出され、BIRP400に
セットされる。また,BIRP400にセットされた命
令の次の命令も同時にIBR200から切り出されBI
RS500にセットされる。IBR制御回路300では
BIRP400とBIRS500にセットされた命令が
有効か否かを判断する。有効とはレジスタ内に命令全体
が格納されていることを示す。BIRP400とBIR
S500にセットされた命令が両方とも有効な命令であ
る場合、両方の命令が有効であることを示すために、I
BR制御回路300はBIRPV700およびBIRS
V800に'1'をセットする。
A plurality of instructions read from the instruction cache 100 are held in the IBR 200. The next instruction to be decoded is cut out from the IBR 200 and set in the BIRP 400. The instruction following the instruction set in BIRP400 is also cut out from IBR200 at the same time and
Set to RS500. The IBR control circuit 300 determines whether the instructions set in the BIRP 400 and the BIRS 500 are valid. Valid indicates that the entire instruction is stored in the register. BIRP400 and BIR
If the instructions set in S500 are both valid instructions, then to indicate that both instructions are valid, I
The BR control circuit 300 includes a BIRPV 700 and a BIRS
"1" is set to V800.

【0031】BIRP400にセットされた命令の次の
命令がまだIBR200に格納されていない場合、IB
R制御回路300はBIRPV700にのみ'1'をセッ
トする。BIRP400にセットされる命令がまだIB
R200に格納されていない場合、IBR制御回路30
0はBIRPV700およびBIRSV800に'0'を
セットする。また、IBR制御回路300は次に実行す
る命令の切り出しをIBR200に対して要求する。こ
のとき、BIRPV700とBIRSV800の両方
が'1'の場合はBIRS500にセットされた命令の次
命令からの切り出しを要求し、BIRPV700のみ'
1'の場合はBIRP400にセットされた命令の次命
令からの切り出しを要求する。また、IBR200に空
きが生じた場合、IBR制御回路300は命令キャッシ
ュ100に対して命令の読み出しを要求する。
If the instruction following the instruction set in BIRP 400 has not yet been stored in IBR 200, IB
The R control circuit 300 sets '1' only in the BIRPV 700. Instruction set in BIRP400 is still IB
If not stored in the R200, the IBR control circuit 30
0 sets '0' to BIRPV700 and BIRSV800. Further, the IBR control circuit 300 requests the IBR 200 to cut out an instruction to be executed next. At this time, if both BIRPV700 and BIRSV800 are “1”, a request is made to cut out the instruction set in BIRS500 from the next instruction, and only BIRPV700 is used.
In the case of 1 ', a cut-out from the instruction following the instruction set in BIRP 400 is requested. When an empty space is generated in the IBR 200, the IBR control circuit 300 requests the instruction cache 100 to read the instruction.

【0032】第1命令デコーダ900はBIRP40
0、BIRS500に格納されているBIRPV70
0、BIRSV800で有効とされた命令を解読する。
BIRP400またはBIRS500に分岐命令が解読
された場合、第1命令デコーダ900は命令キャッシュ
100に対して分岐先命令の命令読み出しを要求する。
BIRP400およびBIRS500にセットされた命
令はIFR1000に逐次格納される。このとき、IF
R1000に対する命令の格納はIFR制御回路110
0の制御により、SETBIRD600が'1'(即ち、
IFR1000に空きがある)かつBIRPV700
が'1'かつBIRSV800が'1(即ち、それぞれの
命令が有効に揃っている)ならば、BIRP400にセ
ットされた命令とBIRS500にセットされた命令の
両方をIFR1000に格納する。また,SETBIR
D600が'1'かつBIRPV700が'1'かつBIR
SV800が'0'ならば、BIRP400にセットされ
た命令のみをIFR1000に格納する。また、SET
BIRD600が'1'かつBIRPV700が'0'かつ
BIRSV800が'0'またはSETBIRD600
が'0(即ち、IFR1000に空きがない)ならば、
IFR1000に対して命令の格納は行われない。
The first instruction decoder 900 has a BIRP 40
0, BIRPV70 stored in BIRS500
0, the instruction validated by BIRSV800 is decoded.
When the branch instruction is decoded by the BIRP 400 or the BIRS 500, the first instruction decoder 900 requests the instruction cache 100 to read the instruction of the branch destination instruction.
The instructions set in BIRP 400 and BIRS 500 are sequentially stored in IFR 1000. At this time,
The storage of the instruction for R1000 is performed by the IFR control circuit 110.
By the control of 0, SETBIRD 600 becomes “1” (that is,
IFR1000 is empty) and BIRPV700
Is "1" and BIRSV 800 is "1" (that is, the respective instructions are effectively aligned), both the instruction set in BIRP 400 and the instruction set in BIRS 500 are stored in IFR 1000. Also, SETBIR
D600 is '1' and BIRPV700 is '1' and BIR
If SV 800 is “0”, only the instruction set in BIRP 400 is stored in IFR 1000. Also, SET
BIRD600 is '1', BIRPV700 is '0' and BIRSV800 is '0' or SETBIRD600
Is' 0 (ie there is no room in IFR1000),
No instruction is stored in the IFR1000.

【0033】選択回路1010はIFR制御回路110
0からの指示に従い、IFR1000に命令が存在しな
い場合はBIRP400の出力を選択し、IFR100
0に命令が存在する場合はIFR1000の第1出力を
選択する(選択回路については先に述べた通りであ
る)。IFR1000の第1出力にはIFR1000に
格納されている命令の内、最も最初に格納された命令、
即ち、次に解読される命令が出力される。また、IFR
1000の第2出力には第1出力に出力される命令の次
の命令が出力される。選択回路1010の出力,即ち次
に解読される命令がIRP1200にセットされる。ま
た、IRP1200にセットされた命令の次の命令も同
時にIFR1000から切り出され、IFR1000の
第2出力を経由しIRS1300にセットされる。
The selection circuit 1010 is an IFR control circuit 110
In accordance with the instruction from 0, if there is no instruction in the IFR 1000, the output of the BIRP 400 is selected.
If an instruction exists at 0, the first output of the IFR 1000 is selected (the selection circuit is as described above). The first output of the IFR1000 is the first stored instruction among the instructions stored in the IFR1000.
That is, the instruction to be decoded next is output. Also, IFR
An instruction next to the instruction output to the first output is output to the second output of 1000. The output of the selection circuit 1010, that is, the instruction to be decoded next, is set in the IRP 1200. The instruction following the instruction set in the IRP 1200 is also cut out from the IFR 1000 at the same time, and set in the IRS 1300 via the second output of the IFR 1000.

【0034】IFR制御回路1100ではIRP120
0とIRS1300にセットされた命令の組み合わせが
スーパスカラ処理可能な命令組み合わせか否かを判断す
る。この判断はオペランドキャッシュというメモリから
の読み出しに競合が生じるかどうかで行なわれる。IR
P1200とIRS1300にセットされた命令の組み
合わせがスーパスカラ処理可能な命令組み合わせの場
合、IFR制御回路1100はIRPV1500および
IRSV1600に'1'をセットする。
In the IFR control circuit 1100, the IRP 120
It is determined whether the combination of 0 and the instruction set in the IRS 1300 is an instruction combination capable of superscalar processing. This determination is made based on whether or not a conflict occurs in reading from the memory called the operand cache. IR
If the combination of instructions set in P1200 and IRS1300 is an instruction combination that allows superscalar processing, IFR control circuit 1100 sets '1' to IRPV1500 and IRSV1600.

【0035】IRP1200とIRS1300にセット
された命令の組み合わせがスーパスカラ処理不可な命令
組み合わせの場合、またはIRP1200にセットされ
た命令の次の命令がまだIFR1000に格納されてい
ない場合、IFR制御回路1100はIRPV1500
にのみ'1'をセットする。IRP1200にセットされ
る命令がまだIBR200に格納されていない場合、I
FR制御回路1100はIRPV1500およびIRS
V1600に'0'をセットする。また、IFR制御回路
1100は次に実行する命令の切り出しをIFR100
0に対して要求する。このとき、IRPV1500とI
RSV1600の両方が'1'の場合はIRS1300に
セットされた命令の次命令からの切り出しを要求し、I
RPV1500のみ'1'の場合はIRP1200にセッ
トされた命令の次命令からの切り出しを要求する。
If the combination of instructions set in IRP 1200 and IRS 1300 is an instruction combination that cannot perform superscalar processing, or if the instruction following the instruction set in IRP 1200 has not yet been stored in IFR 1000, IFR control circuit 1100 causes IRP 1500 to
Set '1' only for. If the instruction set in IRP 1200 has not yet been stored in IBR 200,
FR control circuit 1100 includes IRPV 1500 and IRS
"0" is set to V1600. Also, the IFR control circuit 1100 extracts the instruction to be executed next from the IFR 100
Request for 0. At this time, IRPV 1500 and I
When both of the RSVs 1600 are “1”, a cut-out from the next instruction of the instruction set in the IRS 1300 is requested, and
When only the RPV 1500 is “1”, a cut-out from the next instruction of the instruction set in the IRP 1200 is requested.

【0036】また、IFR制御回路1100はIFR1
000の8命令分のレジスタが全て使用中であることを
検出すると、IBR制御回路300に対してBIRP4
00およびBIRS500への命令のセットを抑止する
要求を発行する。BIRP400およびBIRS500
への命令のセットが抑止されるとSETBIRD600
が'0'となり、IFR1000に対して命令の格納が行
われないため、IFR1000に解読されていない命令
が残っている状態で、上書きされることはない。そし
て、第2命令デコーダ1700はIRP1200、IR
S1300に格納されている命令を解読する。
Also, the IFR control circuit 1100
When it is detected that all the registers of eight instructions of 000 are in use, BIRP4
00 and a request to inhibit the instruction set to BIRS 500. BIRP400 and BIRS500
SETBIRD600 when the instruction set to
Becomes '0', and the instruction is not stored in the IFR 1000, so that the undecoded instruction remains in the IFR 1000 without being overwritten. Then, the second instruction decoder 1700 outputs the IRP 1200, IR
The instruction stored in S1300 is decrypted.

【0037】次に図2で本発明による情報処理装置の各
パイプラインにおける処理について説明する。図2にお
いて、100は命令キャッシュ、200はIBR、40
0はBIRP、500はBIRS、900は第1命令デ
コーダ、1000はIFR、1010は選択回路、12
00はIRP、1300はIRS、1700は第2命令
デコーダ、2000は汎用レジスタ、2100は第2命
令デコーダ1700での解読結果によりオペランドアド
レス計算のために指定された汎用レジスタ2000の内
容と命令により指定された変位値から命令の演算実行に
必要なメモリオペランドのアドレスを計算するオペラン
ド用アドレス加算器、2200はメモリの写しを持つオ
ペランドキャッシュ、2300はオペランドキャッシュ
2200から読み出したデータのうち演算に使用する部
分を先頭に並び替えるアライナ、2400はアライナ2
300で並び替えを実施した後のメモリオペランドと、
命令デコーダ1700での解読結果により演算のために
指定された汎用レジスタ2000の内容で演算を行う演
算器である。
Next, the processing in each pipeline of the information processing apparatus according to the present invention will be described with reference to FIG. 2, 100 is an instruction cache, 200 is an IBR, 40
0 is BIRP, 500 is BIRS, 900 is the first instruction decoder, 1000 is IFR, 1010 is a selection circuit, 12
00 is an IRP, 1300 is an IRS, 1700 is a second instruction decoder, 2000 is a general-purpose register, 2100 is specified by the contents and instructions of a general-purpose register 2000 specified for operand address calculation based on the result of decoding by the second instruction decoder 1700. An operand address adder for calculating an address of a memory operand required for execution of an instruction operation from the obtained displacement value, an operand cache 2200 having a copy of a memory, and a reference numeral 2300 used for an operation of data read from the operand cache 2200 Aligner to sort parts first, 2400 is Aligner 2
Memory operands after performing the sorting at 300;
This is an arithmetic unit that performs an operation based on the contents of the general-purpose register 2000 designated for the operation based on the decoding result of the instruction decoder 1700.

【0038】IFステージではBIRP400およびB
IRS500にセットされた命令を第1命令デコーダ9
00で解読する。第1命令デコーダ900で分岐命令が
解読されると命令キャッシュ100に対して分岐先命令
の命令読み出し要求が発行される。BIRP400およ
びBIRS500にセットされた命令はIFR1000
に格納される。また、BIRP400にセットされた命
令は選択回路1010にも転送される。このように、第
1の命令解読ステージであるIFステージでは1マシン
サイクルあたり2命令ずつ解読し、第2の命令解読ステ
ージであるDステージに命令を転送する。ここで、IF
ステージを遂行する回路を命令フェッチ回路と呼ぶこと
とする。
In the IF stage, BIRP400 and B
The instruction set in the IRS 500 is transmitted to the first instruction decoder 9
Decode at 00. When the first instruction decoder 900 decodes a branch instruction, an instruction read request of a branch destination instruction is issued to the instruction cache 100. The instructions set in BIRP400 and BIRS500 are IFR1000
Is stored in The instruction set in BIRP 400 is also transferred to selection circuit 1010. As described above, in the IF stage which is the first instruction decoding stage, two instructions are decoded every machine cycle, and the instruction is transferred to the D stage which is the second instruction decoding stage. Where IF
A circuit that performs a stage is called an instruction fetch circuit.

【0039】第2の命令解読ステージであるDステージ
ではIRP1200およびIRS1300にセットされ
た命令を第2命令デコーダ1700で解読する。このと
き、第2命令デコーダで同時に2命令解読できる組み合
わせは、両方の命令がメモリオペランド参照を必要とす
るとき以外である。即ち、2つの命令の内、少なくとも
片方の命令はメモリオペランド参照を必要としないレジ
スタ−レジスタ間演算命令もしくは分岐命令のときに、
2命令同時に解読することが可能である。一般にはメモ
リオペランド参照を必要とする命令の出現頻度が高いた
め、第2の命令解読ステージであるDステージでは平均
的にみると1マシンサイクルあたり2命令ずつの解読は
できない。また,Dステージでは命令の解読結果により
汎用レジスタ2000の指定された番号の汎用レジスタ
を読み出し、オペランド用アドレス加算器2100に転
送する。また、別の解読結果である変位値もオペランド
用アドレス加算器2100に転送する。ここで、Dステ
ージを遂行する回路をデコード回路と呼ぶ事とする。
In the D stage, which is the second instruction decoding stage, the instructions set in the IRP 1200 and IRS 1300 are decoded by the second instruction decoder 1700. At this time, the combination in which two instructions can be decoded simultaneously by the second instruction decoder is other than when both instructions require memory operand reference. That is, at least one of the two instructions is a register-register operation instruction or a branch instruction that does not require a memory operand reference.
It is possible to decode two instructions simultaneously. Generally, the frequency of occurrence of instructions that require memory operand reference is high, so that, on average, two instructions cannot be decoded per machine cycle in the second instruction decoding stage, the D stage. In the D stage, the general-purpose register having the designated number is read from the general-purpose register 2000 based on the result of decoding the instruction, and is transferred to the operand address adder 2100. Also, a displacement value as another decoding result is transferred to the operand address adder 2100. Here, the circuit that performs the D stage is called a decode circuit.

【0040】Aステージでは指定された汎用レジスタの
内容と変位値よりオペランド用アドレス加算器2100
でアドレス計算を行い、命令の演算実行に必要なメモリ
オペランド格納先のオペランドアドレスを計算する。オ
ペランド用アドレス加算器2100により求めたオペラ
ンドアドレスはオペランドキャッシュ2200に転送さ
れる。
In the A stage, an operand address adder 2100 is used based on the contents of the designated general-purpose register and the displacement value.
And calculate the operand address of the memory operand storage destination required for executing the operation of the instruction. The operand address obtained by the operand address adder 2100 is transferred to the operand cache 2200.

【0041】Tステージではオペランドキャッシュの参
照を実施する。オペランドキャッシュの読み出しデータ
はアライナ2300に転送される。
In the T stage, the operand cache is referenced. Read data from the operand cache is transferred to the aligner 2300.

【0042】Bステージではオペランドキャッシュ22
00からの読み出しデータの並べ替えを行い、Lステー
ジで演算器に転送する。
In the B stage, the operand cache 22
The read data starting from 00 is rearranged and transferred to the arithmetic unit in the L stage.

【0043】Eステージではアライナ2200からのメ
モリオペランドと汎用レジスタ2000からのレジスタ
オペランドより演算を行う。演算結果は汎用レジスタ2
000に書き込まれる。このように、命令はIF,D,
A,T,B,L,Eの7つのパイプラインステージに分
解して実行される。
In the E stage, an operation is performed based on the memory operand from the aligner 2200 and the register operand from the general-purpose register 2000. The calculation result is general-purpose register 2.
000. Thus, the instructions are IF, D,
A, T, B, L and E are decomposed into seven pipeline stages and executed.

【0044】次に分岐命令を含む命令列についての一連
の処理について説明する。図6に示す一連の命令列を実
行するときのタイミングチャートを図3に示す。図3に
おいて横軸は時間を表わし、一目盛が1マシンサイクル
を示している。横軸に示す1〜21の数字は説明に使う
ために便宜上付けたサイクル数である。
Next, a series of processes for an instruction sequence including a branch instruction will be described. FIG. 3 shows a timing chart when the series of instructions shown in FIG. 6 is executed. In FIG. 3, the horizontal axis represents time, and one scale indicates one machine cycle. The numbers 1 to 21 shown on the horizontal axis are the number of cycles added for convenience for explanation.

【0045】以下、図6に示す命令列の処理を図2およ
び図3で説明する。サイクル1にL命令がBIRP40
0に,A命令がBIRS500にセットされる。サイク
ル1にBIRP400およびBIRS500にセットさ
れた命令は第1命令デコーダ900で解読されるととも
にIFR1000に転送される。また、サイクル1では
IFR1000に命令が格納されていないため、選択回
路1010ではBIRP400の出力が選択される。
Hereinafter, the processing of the instruction sequence shown in FIG. 6 will be described with reference to FIGS. L instruction is BIRP40 in cycle 1
At 0, the A instruction is set in BIRS500. The instructions set in BIRP 400 and BIRS 500 in cycle 1 are decoded by first instruction decoder 900 and transferred to IFR 1000. In cycle 1, since no instruction is stored in IFR 1000, output of BIRP 400 is selected in selection circuit 1010.

【0046】サイクル2ではST命令およびL命令が各
々BIRP400、BIRS500にセットされ、第1
命令デコーダ900で解読されるとともにIFR100
0に転送される。以降、サイクル3でA命令とST命令
が、サイクル4でL命令とC命令がBIRP400およ
びBIRS500にセットされ,第1命令デコーダ90
0で解読されるとともにIFR1000に転送される。
In cycle 2, the ST instruction and the L instruction are set in BIRP400 and BIRS500, respectively,
Decoded by the instruction decoder 900 and the IFR 100
0 is transferred. Thereafter, the A instruction and the ST instruction are set in BIRP400 and BIRS500 in cycle 4 and the L and C instructions are set in cycle 4, and the first instruction decoder 90
It is decrypted at 0 and transferred to IFR1000.

【0047】次にサイクル5でBC命令がBIRP40
0にセットされ、IFR1000に転送される。第1命
令デコーダ900はBIRP400にセットされたBC
命令が分岐命令であることを解読すると、命令キャッシ
ュ100に対して分岐先命令の読み出し要求を行う。サ
イクル6からサイクル8で命令キャッシュ100の読み
出しおよびIBR200への命令の格納が行われる。
(即ち、ここでは命令キャッシュ100からIBR20
0への命令の格納に3マシンサイクル掛かるとしてい
る。)従って、BC命令の分岐先命令であるL命令およ
びA命令はサイクル9でBIRP400およびBIRS
500にセットされる。これは第1命令デコーダ900
で解読されるとともにIFR1000と選択回路101
0にもに転送される。そして、サイクル10ではST命
令がBIRP400にセットされ、第1命令デコーダ9
00で解読されるとともにIFR1000に転送され
る。
Next, in cycle 5, the BC instruction is BIRP40
Set to 0 and transferred to IFR1000. The first instruction decoder 900 has the BC set in BIRP400.
When it is determined that the instruction is a branch instruction, the instruction cache 100 is requested to read a branch destination instruction. From cycle 6 to cycle 8, reading of the instruction cache 100 and storage of the instruction in the IBR 200 are performed.
(That is, here, the instruction cache 100 to the IBR 20
It takes three machine cycles to store the instruction at 0. Therefore, the L instruction and the A instruction which are the branch destination instructions of the BC instruction are BIRP400 and BIRS in cycle 9.
Set to 500. This is the first instruction decoder 900
And the IFR1000 and the selection circuit 101
It is also transferred to 0. Then, in cycle 10, the ST instruction is set in BIRP 400, and the first instruction decoder 9
Decoded at 00 and transferred to IFR 1000.

【0048】このように、IFステージでは毎サイクル
2命令ずつ解読し、逐次IFR1000に命令を転送す
る。一方、サイクル2ではL命令が選択回路1010で
選択されIRP1200にセットされる。このときIR
S1300にはL命令の次のA命令はまだIFRに転送
中のためセットされない。従って,サイクル2ではL命
令のみが解読される。以降、サイクル3でアドレス計
算、サイクル4でオペランドキャッシュ参照、サイクル
5で読み出しデータのアライン、サイクル6で演算器2
400に転送、サイクル7で演算を実行する。以下、A
命令、ST命令、L命令、A命令、ST命令、L命令と
同様に処理される。
As described above, in the IF stage, two instructions are decoded every cycle, and the instructions are sequentially transferred to the IFR 1000. On the other hand, in cycle 2, the L instruction is selected by the selection circuit 1010 and set in the IRP 1200. At this time IR
In S1300, the A instruction following the L instruction is not set because it is still being transferred to the IFR. Therefore, in cycle 2, only the L instruction is decoded. Thereafter, address calculation is performed in cycle 3, operand cache reference is performed in cycle 4, read data is aligned in cycle 5, and arithmetic unit 2 is performed in cycle 6.
Transfer to 400, and execute operation in cycle 7. Hereinafter, A
The instruction, ST instruction, L instruction, A instruction, ST instruction, and L instruction are processed in the same manner.

【0049】次にサイクル9でC命令がIRP1200
にセットされる。このとき同時にIRS1300にはB
C命令がセットされる。BC命令はオペランド用アドレ
ス加算器2100、オペランドキャッシュ2200を使
用しないためC命令とのスーパスカラ処理が可能であ
る。従って、BC命令はサイクル9で第2命令デコーダ
1700での解読が行われる。サイクル10でBC命令
の分岐先命令であるL命令がIRP1200にセットさ
れる。この時はIFR1000からのIRP1200の
セットに1マシンサイクル余分にかかってしまうので選
択回路1010を通してIRP1200にセットされて
いる。即ち、空きサイクルなしに分岐先命令のデコード
のステージに入ることが出来ている。
Next, in cycle 9, the C instruction is IRP1200
Is set to At this time, B
The C instruction is set. Since the BC instruction does not use the operand address adder 2100 and the operand cache 2200, superscalar processing with the C instruction is possible. Therefore, the BC instruction is decoded by the second instruction decoder 1700 in cycle 9. In cycle 10, the L instruction, which is a branch instruction of the BC instruction, is set in the IRP 1200. At this time, the setting of the IRP 1200 from the IFR 1000 requires one extra machine cycle, so the setting of the IRP 1200 is performed through the selection circuit 1010. That is, it is possible to enter the decoding stage of the branch destination instruction without an empty cycle.

【0050】BIRP400,BIRS500へのIF
とデコードステージDとの間にもう1つのマシンサイク
ルの差があればIFR1000からの命令をIRP12
00にセットすることが出来る。一般にはIFR120
0からの命令のセットが多い。これはどういう命令列に
なっているのかということに依存するもので、図6に説
明のため例示した命令列の場合に上述したようになった
ということである。以下、A命令、ST命令と順次処理
され、ST命令の実行はサイクル17で完了する。
IF to BIRP400, BIRS500
If there is another machine cycle difference between the IFR1000 and the decode stage D, the instruction from IFR1000 is
00 can be set. Generally IFR120
There are many instruction sets starting from 0. This depends on what kind of instruction sequence is used, and it is as described above in the case of the instruction sequence illustrated for explanation in FIG. Hereinafter, the A instruction and the ST instruction are sequentially processed, and the execution of the ST instruction is completed in cycle 17.

【0051】このように本実施形態では分岐先命令の先
行読み出しが容易に出来、空きサイクルなしに分岐先命
令のデコードが実施出来る。
As described above, in this embodiment, it is possible to easily read the branch destination instruction in advance and to decode the branch destination instruction without an idle cycle.

【0052】以上の実施形態では第1の命令デコーダで
2命令ずつデコードし、第2の命令デコーダでは前述し
たようにスーパースカラでも命令の実行は必ずしも2命
令ずつ行なわれないから平均すれば2命令より小さな数
の命令ずつ実行のためデコードされることになってい
る。また、スカラ計算機の場合は平均は1命令デコード
/サイクルを超えない。このように、分岐先命令の先取
りのため、第1のデコーダの1サイクルでの先行命令デ
コード数は、1サイクルでの命令実行デコード数より大
きいという関係を保っている。これによって、分岐先命
令の先取りを可能にしている。
In the above embodiment, the first instruction decoder decodes two instructions at a time, and the second instruction decoder does not always execute two instructions even in a superscalar as described above. A smaller number of instructions are to be decoded for execution. In the case of a scalar computer, the average does not exceed one instruction decode / cycle. In this way, the predecessor of the branch destination instruction keeps the relationship that the number of decodes of the preceding instruction in one cycle of the first decoder is larger than the number of decodes of the instruction execution in one cycle. This enables prefetching of branch destination instructions.

【0053】以上,本発明を実施形態に基づいて説明し
たが,本発明は前述した実施形態に限定されるものでは
なく,その要旨を逸脱しない範囲において種々変更可能
であることは言うまでもない。
As described above, the present invention has been described based on the embodiments. However, it is needless to say that the present invention is not limited to the above-described embodiments, and can be variously modified without departing from the gist thereof.

【0054】[0054]

【発明の効果】以上、説明したように本発明によれば、
分岐命令が発生した場合においても、分岐命令以降の命
令の解読および演算の実行が遅れることを改善して,命
令列の効率的な処理を行うことができる。
As described above, according to the present invention,
Even in the case where a branch instruction is generated, it is possible to improve the delay in decoding of instructions following the branch instruction and execution of operations, and to efficiently process an instruction sequence.

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

【図1】本発明の一実施形態によるパイプライン方式の
情報処理装置の命令レジスタおよび命令デコーダ部分の
構成例を示すブロック図。
FIG. 1 is a block diagram showing a configuration example of an instruction register and an instruction decoder part of a pipeline type information processing apparatus according to an embodiment of the present invention.

【図2】本発明の一実施形態による命令レジスタおよび
命令デコーダ部分を含む情報処理装置の構成例を示すブ
ロック図。
FIG. 2 is a block diagram showing a configuration example of an information processing apparatus including an instruction register and an instruction decoder according to an embodiment of the present invention.

【図3】図6に示す命令列における本発明の一実施形態
の動作を説明するタイミングチャート。
FIG. 3 is a timing chart for explaining the operation of the embodiment of the present invention in the instruction sequence shown in FIG. 6;

【図4】従来技術によるパイプライン方式の情報処理装
置の命令レジスタおよび命令デコーダ部分の構成例を示
すブロック図。
FIG. 4 is a block diagram showing a configuration example of an instruction register and an instruction decoder part of a conventional pipeline type information processing apparatus.

【図5】従来技術による命令レジスタおよび命令デコー
ダ部分を含む情報処理装置の構成例を示すブロック図。
FIG. 5 is a block diagram showing a configuration example of an information processing apparatus including an instruction register and an instruction decoder according to a conventional technique.

【図6】分岐命令を含む命令群の流れの一例を示す図。FIG. 6 is a diagram showing an example of the flow of an instruction group including a branch instruction.

【図7】図6に示す命令列における従来技術の動作を説
明するタイミングチャート。
FIG. 7 is a timing chart for explaining the operation of the related art in the instruction sequence shown in FIG. 6;

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

100:命令キャッシュ 200:命令バッファ(IBR) 300:IBR制御回路 400:第1分岐命令レジスタ(BIRP) 500:第2分岐命令レジスタ(BIRS) 600:分岐命令レジスタセット信号ラッチ(SETB
IRD) 700:BIRP有効識別子(BIRPV) 800:BIRS有効識別子(BIRSV) 900:第1命令デコーダ 1000:命令フローレジスタ(IFR) 1010:選択回路 1100:IFR制御回路 1200:第1命令レジスタ(IRP) 1300:第2命令レジスタ(IRS) 1500:IRP有効識別子(IRPV) 1600:IRS有効識別子(IRSV) 1700:第2命令デコーダ
100: instruction cache 200: instruction buffer (IBR) 300: IBR control circuit 400: first branch instruction register (BIRP) 500: second branch instruction register (BIRS) 600: branch instruction register set signal latch (SETB)
IRD) 700: BIRP valid identifier (BIRPV) 800: BIRS valid identifier (BIRSV) 900: First instruction decoder 1000: Instruction flow register (IFR) 1010: Select circuit 1100: IFR control circuit 1200: First instruction register (IRP) 1300: Second instruction register (IRS) 1500: IRP valid identifier (IRPV) 1600: IRS valid identifier (IRSV) 1700: Second instruction decoder

───────────────────────────────────────────────────── フロントページの続き (72)発明者 糸井 朋永 神奈川県秦野市堀山下1番地 株式会社日 立製作所エンタープライズサーバ事業部内 (72)発明者 袴田 正史 神奈川県秦野市堀山下1番地 株式会社日 立製作所エンタープライズサーバ事業部内 Fターム(参考) 5B013 AA00 AA01 AA05 BB11 5B033 AA02 AA07 AA13 BA01  ──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Tomonaga Itoi 1 Horiyamashita, Hadano City, Kanagawa Prefecture Inside the Hitachi Server Enterprise Server Division (72) Inventor Masashi Hakamada 1 Horiyamashita, Hadano City, Kanagawa Japan F-term in the Enterprise Server Division of Ritsumi Works (reference) 5B013 AA00 AA01 AA05 BB11 5B033 AA02 AA07 AA13 BA01

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 メモリから先読みした命令を格納する命
令バッファと、前記命令バッファから読み出される複数
の命令を格納する第1の命令レジスタと、前記第1の命
令レジスタの複数の命令を解読する第1の命令デコーダ
と、前記第1の命令レジスタに格納された命令を逐次格
納する命令フローレジスタと、前記第1の命令レジス
タ、または前記命令フローレジスタの出力する命令を格
納する第2の命令レジスタと、前記第2の命令レジスタ
に格納された命令を解読する第2の命令デコーダを備
え、前記第1の命令デコーダの解析結果に基づき前記メ
モリに対して命令読み出し要求をすることを特徴とする
情報処理装置。
An instruction buffer for storing instructions prefetched from a memory; a first instruction register for storing a plurality of instructions read from the instruction buffer; and a second instruction register for decoding a plurality of instructions in the first instruction register. 1 instruction decoder, an instruction flow register for sequentially storing instructions stored in the first instruction register, and a second instruction register for storing instructions output from the first instruction register or the instruction flow register. And a second instruction decoder that decodes the instruction stored in the second instruction register, and issues an instruction read request to the memory based on the analysis result of the first instruction decoder. Information processing device.
【請求項2】 前記第1の命令デコーダは分岐命令を解
読すると、前記メモリに対し、当該分岐命令の分岐先命
令の読み出し要求をすることを特徴とする請求項1記載
の情報処理装置。
2. The information processing apparatus according to claim 1, wherein when the first instruction decoder decodes the branch instruction, the first instruction decoder requests the memory to read a branch destination instruction of the branch instruction.
【請求項3】 前記第1の命令レジスタは複数の命令レ
ジスタからなることを特徴とする請求項1記載の情報処
理装置。
3. The information processing apparatus according to claim 1, wherein said first instruction register comprises a plurality of instruction registers.
【請求項4】 更に、前記第1の命令レジスタの出力
と、前記命令フローレジスタの出力のいずれかを選択的
に前記第2の命令レジスタへ格納せしめる選択回路を備
えたことを特徴とする請求項1記載の情報処理装置。
4. The apparatus according to claim 1, further comprising a selection circuit for selectively storing one of the output of the first instruction register and the output of the instruction flow register in the second instruction register. Item 10. The information processing apparatus according to Item 1.
【請求項5】 更に、第1のレジスタの命令が有効のと
き第1の値を取る第1のレジスタ有効識別子と、前記命
令フローレジスタに空きがあるとき第1の値を取るセッ
ト信号ラッチと、前記第1のレジスタ有効識別子が第1
の値であり、前記セット信号ラッチが第1の値であると
き、前記第1のレジスタに格納されている命令を前記命
令フローレジスタに格納せしめる制御回路とを有するこ
とを特徴とする請求項1記載の情報処理装置。
5. A first register valid identifier that takes a first value when an instruction of a first register is valid, and a set signal latch that takes a first value when the instruction flow register has a vacancy. , The first register valid identifier is a first
And a control circuit for causing the instruction flow register to store an instruction stored in the first register when the set signal latch is the first value. An information processing apparatus according to claim 1.
【請求項6】 前記制御回路は前記命令フローレジスタ
がすべて使用中であることを検出すると前記セット信号
ラッチが第1の値を取ることを抑止することを特徴とす
る請求項5記載の情報処理装置。
6. The information processing apparatus according to claim 5, wherein when the control circuit detects that all of the instruction flow registers are in use, the control circuit inhibits the set signal latch from taking a first value. apparatus.
【請求項7】 メモリから先読みした命令を格納する命
令バッファと、前記命令バッファから読み出される複数
の命令を格納する第1の命令レジスタと、前記第1の命
令レジスタの複数の命令を解読する第1の命令デコーダ
と、前記第1の命令レジスタに格納された命令を逐次格
納する命令フローレジスタと、前記命令フローレジスタ
の出力する命令を格納する第2の命令レジスタと、前記
第2の命令レジスタに格納された命令を解読する第2の
命令デコーダを備え、前記第1の命令デコーダの解析結
果に基づき前記メモリに対して命令読み出し要求をする
ことを特徴とする情報処理装置。
7. An instruction buffer for storing instructions prefetched from a memory, a first instruction register for storing a plurality of instructions read from the instruction buffer, and a second instruction register for decoding a plurality of instructions in the first instruction register. An instruction decoder, an instruction flow register for sequentially storing instructions stored in the first instruction register, a second instruction register for storing instructions output from the instruction flow register, and the second instruction register. An information processing apparatus, comprising: a second instruction decoder for decoding an instruction stored in the first instruction decoder, and making an instruction read request to the memory based on an analysis result of the first instruction decoder.
【請求項8】 命令のパイプライン処理装置を持った情
報処理装置であって、命令キャッシュと、前記キャッシ
ュから先読みした命令を格納する命令バッファと、前記
命令バッファから前記パイプライン処理装置の1マシン
サイクルで複数の命令を読み出すレジスタと、読み出さ
れた複数の命令を解読し、分岐命令が解読されたとき前
記命令キャッシュに分岐先命令の先取りを要求する第1
の命令デコーダと、前記命令バッファから読み出された
命令を命令実行のためデコードする第2の命令デコーダ
とを有し、かつ前記命令バッファから1マシンサイクル
で読み出す命令数が前記第2の命令デコーダで1マシン
サイクル当たりデコードする平均命令数より大きいこと
を特徴とする情報処理装置。
8. An information processing apparatus having an instruction pipeline processing device, comprising: an instruction cache; an instruction buffer for storing instructions prefetched from the cache; and a machine from the instruction buffer to the pipeline processing device. A register for reading a plurality of instructions in a cycle, and a first for decoding the read instructions and requesting the instruction cache to prefetch a branch destination instruction when the branch instruction is decoded.
And a second instruction decoder for decoding an instruction read from the instruction buffer for executing an instruction, and wherein the number of instructions read from the instruction buffer in one machine cycle is the second instruction decoder. An information processing apparatus characterized in that the number of instructions is larger than the average number of instructions to be decoded per machine cycle.
【請求項9】 命令のパイプライン処理装置を持ったも
ので、第1、第2の命令デコーダ、先読みした命令を格
納する命令バッファ、命令バッファから読み出された命
令を一次格納する命令フローレジスタを持った情報処理
装置であり、複数の命令を前記パイプライン処理装置の
1マシンサイクルで読み出し、前記第1の命令デコーダ
で前記読み出した命令を解読し、解読の結果分岐命令が
あれば、分岐先命令を前記命令バッファに先取りさせ、
前記読み出した命令を前記命令フローレジスタへ転送す
る命令フェッチ回路と、前記命令フェッチステージに引
き続いて設けられ、前記命令フローレジスタの命令を前
記第2の命令デコーダで解読するデコード回路とを有す
ることを特徴とする情報処理装置。
9. An instruction flow register having an instruction pipeline processing device, comprising first and second instruction decoders, an instruction buffer for storing prefetched instructions, and an instruction flow register for temporarily storing instructions read from the instruction buffer. A plurality of instructions are read in one machine cycle of the pipeline processing device, the first instruction decoder decodes the read instruction, and if there is a branch instruction as a result of the decoding, branching is performed. Prefetching the first instruction into the instruction buffer;
An instruction fetch circuit that transfers the read instruction to the instruction flow register; and a decode circuit that is provided subsequent to the instruction fetch stage and decodes the instruction in the instruction flow register with the second instruction decoder. Characteristic information processing device.
【請求項10】 前記命令フェッチステージで1マシン
サイクルで読み出される命令数は前記デコードステージ
で解読される平均命令数より大きいことを特徴とする請
求項9記載の情報処理装置。
10. The information processing apparatus according to claim 9, wherein the number of instructions read in one machine cycle in said instruction fetch stage is larger than the average number of instructions decoded in said decode stage.
【請求項11】 命令バッファへの命令の先取りが行な
われるパイプライン方式の処理装置であって、命令を実
行するための第2の命令デコーダと、第2の命令デコー
ダでデコードされる命令に引き続く命令を第2の命令デ
コーダによるデコードより早くデコードする第1のデコ
ーダを有し、第1のデコーダで分岐命令が検出されたこ
とに応答して、分岐先命令を前記命令バッファへ先取り
することを特徴とする情報処理装置。
11. A pipeline-type processing device for prefetching an instruction into an instruction buffer, the second instruction decoder for executing an instruction, and the instruction following the instruction decoded by the second instruction decoder. A first decoder for decoding the instruction earlier than the second instruction decoder, and responsive to the first decoder detecting a branch instruction, for prefetching a branch target instruction to the instruction buffer. Characteristic information processing device.
JP18837299A 1999-07-02 1999-07-02 Information processing device Expired - Fee Related JP3668643B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18837299A JP3668643B2 (en) 1999-07-02 1999-07-02 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18837299A JP3668643B2 (en) 1999-07-02 1999-07-02 Information processing device

Publications (2)

Publication Number Publication Date
JP2001014160A true JP2001014160A (en) 2001-01-19
JP3668643B2 JP3668643B2 (en) 2005-07-06

Family

ID=16222473

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18837299A Expired - Fee Related JP3668643B2 (en) 1999-07-02 1999-07-02 Information processing device

Country Status (1)

Country Link
JP (1) JP3668643B2 (en)

Also Published As

Publication number Publication date
JP3668643B2 (en) 2005-07-06

Similar Documents

Publication Publication Date Title
US7793079B2 (en) Method and system for expanding a conditional instruction into a unconditional instruction and a select instruction
US5404552A (en) Pipeline risc processing unit with improved efficiency when handling data dependency
EP0437044B1 (en) Data processing system with instruction tag apparatus
US8006072B2 (en) Reducing data hazards in pipelined processors to provide high processor utilization
JP2818249B2 (en) Electronic computer
US6732276B1 (en) Guarded computer instruction execution
US8171266B2 (en) Look-ahead load pre-fetch in a processor
US5881307A (en) Deferred store data read with simple anti-dependency pipeline inter-lock control in superscalar processor
US6260189B1 (en) Compiler-controlled dynamic instruction dispatch in pipelined processors
US6301654B1 (en) System and method for permitting out-of-order execution of load and store instructions
US20240036876A1 (en) Pipeline protection for cpus with save and restore of intermediate results
US6851033B2 (en) Memory access prediction in a data processing apparatus
US20050102659A1 (en) Methods and apparatus for setting up hardware loops in a deeply pipelined processor
US6055628A (en) Microprocessor with a nestable delayed branch instruction without branch related pipeline interlocks
JP2004529405A (en) Superscalar processor implementing content addressable memory for determining dependencies
US6519683B2 (en) System and method for instruction cache re-ordering
JPH0748187B2 (en) General memory access method using register indirect mode and computer system
US7134000B2 (en) Methods and apparatus for instruction alignment including current instruction pointer logic responsive to instruction length information
US7996655B2 (en) Multiport execution target delay queue FIFO array
JP2001014160A (en) Information processor
JP2001051845A (en) Out-of-order execution system
JP2668987B2 (en) Data processing device
US6735686B1 (en) Data processing device including two instruction decoders for decoding branch instructions
JP2591325B2 (en) Branch control device
JP2806690B2 (en) Microprocessor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050104

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050307

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050405

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050411

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090415

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090415

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100415

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110415

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120415

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees