JPH07262007A - Information processor - Google Patents

Information processor

Info

Publication number
JPH07262007A
JPH07262007A JP6045977A JP4597794A JPH07262007A JP H07262007 A JPH07262007 A JP H07262007A JP 6045977 A JP6045977 A JP 6045977A JP 4597794 A JP4597794 A JP 4597794A JP H07262007 A JPH07262007 A JP H07262007A
Authority
JP
Japan
Prior art keywords
instruction
branch
stored
operand
cycle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6045977A
Other languages
Japanese (ja)
Inventor
Masashi Hakamata
正史 袴田
Toru Hiraoka
徹 平岡
Kazuo Oshima
和郎 尾島
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 Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Microcomputer System Ltd
Hitachi 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 Microcomputer System Ltd, Hitachi Ltd filed Critical Hitachi Microcomputer System Ltd
Priority to JP6045977A priority Critical patent/JPH07262007A/en
Publication of JPH07262007A publication Critical patent/JPH07262007A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To process two instructions at maximum in one cycle by-replacing the combination of two instructions decided in advance with one compound instruction equivalent to these two instructions. CONSTITUTION:A CLI instruction is extracted from an IBR 10 by a first instruction extraction shifter 20 and stored in an IRP 30. On the other hand, a BC instruction is stored in an IRS by a second instruction extraction shifter 40. A replace instruction generating circuit 90 generates the CLI-BC compound instruction by detecting that the combination of those CLI and BC instructions has been stored in the IRP 30 and the IRS 50. That CLI-BC compound instruction is processed on the respective stages of a pipeline as one instruction. Thus, the insertion of an instruction following two instructions to the pipeline can be made faster by one cycle, and the processing speed can be accelerated.

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 device,
In particular, the present invention relates to a pipeline type information processing device capable of improving an instruction processing speed.

【0002】[0002]

【従来の技術】図6は従来技術によるパイプライン方式
の情報処理装置の構成例を示すブロック図、図7は使用
される命令の例を説明する図、図8〜図11は命令のパ
イプライン処理を説明するタイムチャートであり、以
下、これらの図面を参照して従来技術による情報処理装
置について説明する。図6において、10は命令バッフ
ァレジスタ(以下、IBRという)、20は命令取り出
しシフタ、30は命令レジスタ(以下、IRという)、
32は命令長コード(以下、ILCという)デコーダ、
60はポインタ(以下、IBROPという)、70は加
算器、100は分岐命令検出回路、110は命令デコー
ダ、130は制御記憶、140はオペランド用アドレス
加算器、150はオペランド用TLB、160はオペラ
ンド用バッファ記憶装置、170は演算実行部、180
は汎用レジスタ、200は命令用アドレス加算器、21
0は命令用TLB、220は命令用バッファ記憶装置で
ある。
2. Description of the Related Art FIG. 6 is a block diagram showing a configuration example of a pipeline type information processing apparatus according to the prior art, FIG. 7 is a diagram for explaining an example of instructions used, and FIGS. 8 to 11 are instruction pipelines. It is a time chart for explaining the processing, and hereinafter, an information processing apparatus according to the related art will be described with reference to these drawings. In FIG. 6, 10 is an instruction buffer register (hereinafter referred to as IBR), 20 is an instruction fetch shifter, 30 is an instruction register (hereinafter referred to as IR),
32 is an instruction length code (hereinafter referred to as ILC) decoder,
60 is a pointer (hereinafter, referred to as IBROP), 70 is an adder, 100 is a branch instruction detection circuit, 110 is an instruction decoder, 130 is a control memory, 140 is an address adder for operand, 150 is TLB for operand, 160 is for operand A buffer storage device, 170 is an operation execution unit, 180
Is a general-purpose register, 200 is an address adder for instruction, 21
Reference numeral 0 is an instruction TLB, and 220 is an instruction buffer storage device.

【0003】図6に示す従来技術による情報処理装置
は、図示のような機能ブロックを備えて構成されてお
り、各機能ブロックは、次に説明する機能を備えるよう
に構成されている。
The information processing apparatus according to the prior art shown in FIG. 6 is configured to include the functional blocks shown in the figure, and each functional block is configured to have the functions described below.

【0004】IBR10は、命令の高速アクセスを可能
とするために命令を保持しているレジスタであり、命令
取り出しシフタ20は、次に処理を開始すべき命令をI
BR10から取り出すための機能を備える。IR30
は、命令取り出しシフタ20から供給される命令が格納
されるレジスタであり、ILCデコーダ32は、IR3
0に格納された命令の命令長を示すILC32をデコー
ドして、IR30に格納された命令の命令長を求める。
加算器70は、IR30に取り出された命令のIBR1
0内における先頭位置を保持するIBROP60の内容
とILCデコーダ32の出力とを加算し、IBROP6
0の内容を更新する機能を備える。
The IBR 10 is a register that holds an instruction to enable high-speed access of the instruction, and the instruction fetch shifter 20 selects the instruction to start the processing next.
It has a function to take out from BR10. IR30
Is a register in which the instruction supplied from the instruction fetch shifter 20 is stored.
The ILC 32 indicating the instruction length of the instruction stored in 0 is decoded to obtain the instruction length of the instruction stored in the IR 30.
The adder 70 uses the IBR1 of the instruction fetched by the IR 30.
The contents of the IBROP 60 holding the start position in 0 and the output of the ILC decoder 32 are added, and IBROP6
It has a function to update the contents of 0.

【0005】分岐命令検出回路100は、IR30に分
岐命令が格納されたことを検出し、命令デコーダ110
は、IR30に格納された命令の解読を行う機能を備
え、また、制御記憶130は、演算実行部170で行わ
れる演算を制御するための情報をマイクロプログラムと
して記憶する。オペランド用アドレス加算器140は、
オペランドの論理アドレスの計算を行い、オペランド用
TLB150は、論理アドレスを物理アドレスに変換す
る機能を備える。
The branch instruction detection circuit 100 detects that a branch instruction is stored in the IR 30, and the instruction decoder 110
Has a function of decoding an instruction stored in the IR 30, and the control memory 130 stores information for controlling the arithmetic operation performed by the arithmetic execution unit 170 as a microprogram. The operand address adder 140 is
The logical address of the operand is calculated, and the TLB for operand 150 has a function of converting the logical address into a physical address.

【0006】オペランド用バッファ記憶装置160は、
オペランド用TLB150からの物理アドレスにより指
定されるデータを演算実行部170に供給し、演算実行
部170は、オペランド用バッファ記憶装置160、例
えば16本のレジスタ群で構成される汎用レジスタ18
0から供給されるオペランドデータを用いて、制御記憶
130からの出力に制御されて演算を実行する。命令用
アドレス加算器200は、命令の論理アドレスを計算
し、命令用TLB210は、命令用アドレス加算器20
0からの論理アドレスを物理アドレスに変換する。命令
用バッファ記憶装置220は、命令用TLB210から
の物理アドレスにより指定される命令をIBR10に供
給する。
The operand buffer storage device 160 is
The data specified by the physical address from the TLB for operand 150 is supplied to the operation executing unit 170, and the operation executing unit 170 stores the operand buffer storage device 160, for example, the general-purpose register 18 including a group of 16 registers.
Operand data supplied from 0 is used to perform operations under the control of the output from the control memory 130. The instruction address adder 200 calculates the logical address of the instruction, and the instruction TLB 210 determines the instruction address adder 20.
Convert a logical address from 0 to a physical address. The instruction buffer storage device 220 supplies the instruction specified by the physical address from the instruction TLB 210 to the IBR 10.

【0007】次に、前述のような構成を備える情報処理
装置で使用される命令の例を図7に示すフォーマットを
参照して説明する。
Next, an example of instructions used in the information processing apparatus having the above-mentioned configuration will be described with reference to the format shown in FIG.

【0008】CLI命令は、2つのオペランドデータの
大小を比較し、その結果を条件コードに反映させるとい
う命令である。OPはこの命令がCLI命令であること
を示すオペレーションコード、I2は演算に使用される
第2オペランドデータを示すフィールド、B1は基底ア
ドレスレジスタを指定するフィールド、D1は変位アド
レスを示すフィールドである。この命令において、主記
憶装置上に格納されている第1オペランドの論理アドレ
スは、B1フィールドの示す基底アドレスレジスタの内
容とD1フィールドの内容とを加算することにより得る
ことができる。
The CLI instruction is an instruction for comparing the size of two operand data and reflecting the result in the condition code. OP is an operation code indicating that this instruction is a CLI instruction, I2 is a field indicating the second operand data used for the operation, B1 is a field designating the base address register, and D1 is a field indicating the displacement address. In this instruction, the logical address of the first operand stored in the main memory can be obtained by adding the contents of the base address register indicated by the B1 field and the contents of the D1 field.

【0009】BC命令は、条件コードがマスクフィール
ドにより指定されている状態にセットされているとき
に、第2オペランドにより指定される分岐先アドレスに
分岐するという条件付分岐命令である。OPはこの命令
がBC命令であることを示すオペレーションコード、M
1はマスクフィールド、X2は指標アドレスレジスタを
指定するフィールド、B2は基底アドレスレジスタを指
定するフィールド、D2は変位アドレスを示すフィール
ドである。この命令において、主記憶装置上に格納され
ている分岐先命令の論理アドレスは、X2フィールドに
示される指標アドレスレジスタの内容とB2フィールド
に示される基底アドレスレジスタの内容とD2フィール
ドの内容とを加算することにより得ることができる。
The BC instruction is a conditional branch instruction that branches to the branch destination address designated by the second operand when the condition code is set in the state designated by the mask field. OP is an operation code indicating that this instruction is a BC instruction, M
1 is a mask field, X2 is a field for designating an index address register, B2 is a field for designating a base address register, and D2 is a field for indicating a displacement address. In this instruction, the logical address of the branch destination instruction stored in the main memory device is obtained by adding the contents of the index address register shown in the X2 field, the contents of the base address register shown in the B2 field, and the contents of the D2 field. It can be obtained by

【0010】BCT命令は、R1フィールドによって指
定される汎用レジスタの値から“1”を減算し、減算後
のレジスタの内容が“0”でない場合に、第2オペラン
ドにより指定される分岐先アドレスに分岐するという命
令である。OPはこの命令がBCT命令であることを示
すオペレーションコード、R1は汎用レジスタの値を示
す前述のR1フィールド、X2は指標アドレスレジスタ
を指定するフィールド、B2は基底アドレスレジスタを
指定するフィールド、D2は変位アドレスを示すフィー
ルドである。この命令において、主記憶装置上に格納さ
れている分岐先命令の論理アドレスは、X2フィールド
に示される指標アドレスレジスタの内容とB2フィール
ドに示される基底アドレスレジスタの内容とD2フィー
ルドの内容とを加算することにより得ることができる。
The BCT instruction subtracts "1" from the value of the general-purpose register specified by the R1 field, and when the content of the register after the subtraction is not "0", the branch destination address specified by the second operand is used. The instruction is to branch. OP is an operation code indicating that this instruction is a BCT instruction, R1 is the above-mentioned R1 field indicating the value of a general-purpose register, X2 is a field designating an index address register, B2 is a field designating a base address register, and D2 is This is a field indicating a displacement address. In this instruction, the logical address of the branch destination instruction stored in the main memory device is obtained by adding the contents of the index address register shown in the X2 field, the contents of the base address register shown in the B2 field, and the contents of the D2 field. It can be obtained by

【0011】L命令は、第2オペランドにより指定され
る主記憶装置上のデータを、第1オペランドにより指定
される汎用レジスタに転送するという命令である。OP
はこの命令がL命令であることを示すオペレーションコ
ード、R1は前述の第1オペランドを示すフィールド、
X2は指標アドレスレジスタを指定するフィールド、B
2は基底アドレスレジスタを指定するフィールド、D2
は変位アドレスを示すフィールドである。この命令にお
いて、主記憶装置上に格納されている第2オペランドデ
ータのアドレスは、X2フィールドに示される指標アド
レスレジスタの内容とB2フィールドに示される基底ア
ドレスレジスタの内容とD2フィールドの内容とを加算
することにより得ることができる。
The L instruction is an instruction to transfer the data in the main storage device designated by the second operand to the general-purpose register designated by the first operand. OP
Is an operation code indicating that this instruction is an L instruction, R1 is a field indicating the above-mentioned first operand,
X2 is a field for specifying the index address register, B
2 is a field for specifying the base address register, D2
Is a field indicating a displacement address. In this instruction, the address of the second operand data stored in the main memory adds the contents of the index address register shown in the X2 field, the contents of the base address register shown in the B2 field, and the contents of the D2 field. It can be obtained by

【0012】LTR命令は、第2オペランドにより指定
される汎用レジスタの内容を第1オペランドにより指定
される汎用レジスタに転送すると共に、第2オペランド
の符号を検査しその結果を条件コードに反映させるとい
う命令である。OPはこの命令がLTR命令であること
を示すオペレーションコード、R1、R2は前述の第
1、第2オペランドを示すフィールドである。
The LTR instruction transfers the contents of the general-purpose register specified by the second operand to the general-purpose register specified by the first operand, checks the sign of the second operand, and reflects the result in the condition code. It is an instruction. OP is an operation code indicating that this instruction is an LTR instruction, and R1 and R2 are fields indicating the above-mentioned first and second operands.

【0013】次に、図8〜図11を参照して、前述のよ
うに構成される従来技術において、前述したような命令
を持つある命令列を処理する場合の処理動作を説明す
る。これらの図において、上部の横軸は、パイプライン
の実行サイクルを示しており、参照の都合上番号付けし
て示している。また、図中のD、A、T、B、L、Eは
パイプラインステージを表わし、それぞれ、次のような
処理を行う。
Next, with reference to FIGS. 8 to 11, the processing operation in the case of processing a certain instruction sequence having the above-mentioned instruction in the conventional technique configured as described above will be described. In these figures, the horizontal axis at the top indicates the execution cycle of the pipeline and is numbered for convenience of reference. Further, D, A, T, B, L, and E in the figure represent pipeline stages, and perform the following processes, respectively.

【0014】Dステージは、IR30に格納された命令
を解読して、Aステージで行う論理アドレス生成のため
に汎用レジスタ180を参照する処理を行う。このと
き、加算器70は、IBROP60の内容とILCデコ
ーダ32により求まる命令長とを加算することによりI
BROP60の内容をIR30に格納された命令の次の
命令を指すように更新する。また、この加算結果は、後
続命令の取り出しのために命令取り出しシフタ20にも
供給される。従って、次のサイクルには、IR30に格
納されている命令の後続の命令をIR30に格納するこ
とが可能となる。また、IR30に格納された命令は、
命令デコーダ110に送られその解読が行われる。
The D stage decodes the instruction stored in the IR 30 and refers to the general register 180 for the logical address generation performed in the A stage. At this time, the adder 70 adds the contents of the IBROP 60 and the instruction length obtained by the ILC decoder 32 to obtain I
The content of BROP 60 is updated to point to the instruction next to the instruction stored in IR 30. The addition result is also supplied to the instruction fetch shifter 20 for fetching the subsequent instruction. Therefore, in the next cycle, the instruction following the instruction stored in the IR 30 can be stored in the IR 30. The command stored in IR30 is
It is sent to the instruction decoder 110 and its decoding is performed.

【0015】Aステージは、Dステージで参照した汎用
レジスタ180の内容、IR30の内容の一部を用い
て、オペランド用アドレス加算器140により、オペラ
ンドの論理アドレスを求める処理を行う。また、分岐命
令の場合、このステージで命令用アドレス加算器200
により分岐先命令の論理アドレスを求める処理を行う。
The A stage uses the contents of the general register 180 and a part of the contents of the IR 30 referred to in the D stage to perform a process for obtaining the logical address of the operand by the operand address adder 140. In the case of a branch instruction, the instruction address adder 200 is also used at this stage.
The process for obtaining the logical address of the branch destination instruction is performed by.

【0016】Tステージは、Aステージにおいて、オペ
ランド用アドレス加算器140で求めたオペランドの論
理アドレスを、オペランド用TLB150によって物理
アドレスに変換する処理を行う。また、分岐命令の場
合、命令用アドレス加算器200により求められた分岐
先命令の論理アドレスを、命令用TLBによって物理ア
ドレスに変換する処理を行う。
In the T stage, the logical address of the operand obtained by the operand address adder 140 in the A stage is converted into a physical address by the TLB for operand 150. Further, in the case of a branch instruction, the logical address of the branch destination instruction obtained by the instruction address adder 200 is converted to a physical address by the instruction TLB.

【0017】Bステージは、Tステージにおいて、オペ
ランド用TLB150で求められたオペランドの物理ア
ドレスにより、オペランド用バッファ記憶装置160を
参照して、オペランドデータを得る処理を行う。また、
分岐命令の場合、Tステージにおいて、命令用TLB2
10で求められた分岐先命令の物理アドレスにより、命
令用バッファ記憶装置220を参照して、分岐先の命令
列を得る処理を行う。さらに、命令デコーダ110から
の命令解読情報により制御記憶130を参照して、命令
実行のために演算実行部180が必要とする制御情報を
得る処理を行う。
The B stage refers to the operand buffer storage device 160 in accordance with the physical address of the operand determined by the operand TLB 150 in the T stage and performs a process of obtaining operand data. Also,
In the case of a branch instruction, the TLB2 for the instruction in the T stage
Based on the physical address of the branch destination instruction obtained in step 10, the instruction buffer storage device 220 is referenced to perform processing for obtaining the branch destination instruction sequence. Further, by referring to the control memory 130 based on the instruction decoding information from the instruction decoder 110, processing for obtaining the control information required by the operation executing unit 180 for executing the instruction is performed.

【0018】Lステージは、Bステージにおいて、オペ
ランド用バッファ記憶装置160で得たオペランドデー
タを演算実行部170に転送し、汎用レジスタ180に
格納されたデータをオペランドデータとして使用する命
令のために汎用レジスタ180を参照し、その内容を演
算実行部170に転送する処理を行う。また、分岐命令
の場合、Bステージにおいて、命令用バッファ記憶装置
160から得た分岐先命令列をIBR10に転送する処
理を行う。そして、分岐命令の分岐が成立している場
合、分岐先命令をIR30に格納する。すなわち、分岐
命令の分岐が成立している場合、分岐先命令がパイプラ
インに投入されるのは、この分岐命令のLステージの次
サイクルとなる。一方、Bステージで制御記憶130か
ら得られた制御情報は演算実行部170に転送される。
In the L stage, in the B stage, the operand data obtained in the operand buffer storage device 160 is transferred to the operation execution unit 170, and the data stored in the general register 180 is used as an operand data for general purpose. A process of referring to the register 180 and transferring the content thereof to the operation executing unit 170 is performed. Further, in the case of a branch instruction, in the B stage, processing for transferring the branch destination instruction sequence obtained from the instruction buffer storage device 160 to the IBR 10 is performed. If the branch of the branch instruction is taken, the branch destination instruction is stored in the IR 30. That is, when the branch of the branch instruction is taken, the branch destination instruction is input to the pipeline in the cycle next to the L stage of this branch instruction. On the other hand, the control information obtained from the control storage 130 at the B stage is transferred to the arithmetic execution unit 170.

【0019】Eステージは、演算実行部170により、
先に求めたオペランドデータを使用し、制御情報に基づ
いた演算を実行する処理を行う。その演算結果は、汎用
レジスタ180に書き込まれ、あるいは、条件コードに
反映されて条件分岐命令の分岐判定のために用いられ
る。
The E stage is operated by the arithmetic execution unit 170.
Using the operand data obtained previously, processing for executing an operation based on the control information is performed. The operation result is written in the general-purpose register 180 or is reflected in the condition code and used for the branch determination of the conditional branch instruction.

【0020】前述した処理の各ステージは、使用される
論理の競合なく行うことができるもので、これを利用し
て各ステージをオーバラップさせて処理を実行すること
ができる。前述した従来技術は、これにより、図8〜図
11に示すようなパイプライン処理を実行している。
Each stage of the above-mentioned processing can be performed without conflict of the logic used, and by utilizing this, the processing can be executed by overlapping each stage. The above-mentioned conventional technique thereby executes the pipeline processing as shown in FIGS.

【0021】図8に示すタイムチャートは、CLI命
令、BC命令を連続して実行させた場合に、BC命令の
分岐が不成立の場合のパイプラインフローを示してい
る。
The time chart shown in FIG. 8 shows the pipeline flow when the branch of the BC instruction is not taken when the CLI instruction and the BC instruction are continuously executed.

【0022】図8において、命令0〜命令4が順に実行
されるものとし、命令1がCLI命令、命令2がBC命
令であるとする。通常、BC命令の分岐が成立するか否
かは、その命令のDステージで予測することができる。
このため、図8に示すようなBC命令の分岐が不成立の
場合、BC命令のDステージの次のサイクルで命令4を
パイプライン投入して処理を続けることができる。
In FIG. 8, it is assumed that instructions 0 to 4 are executed in order, instruction 1 is a CLI instruction, and instruction 2 is a BC instruction. Usually, whether or not a branch of a BC instruction is taken can be predicted at the D stage of the instruction.
Therefore, when the branch of the BC instruction as shown in FIG. 8 is not taken, the instruction 4 can be pipelined and processed in the cycle next to the D stage of the BC instruction.

【0023】すなわち、この例の場合、命令を毎サイク
ルに1つずつパイプラインに投入することができ、演算
結果も毎サイクル毎に得ることができ、命令処理速度を
1サイクル当り1命令とする理想的な処理を行うことが
できる。
That is, in the case of this example, one instruction can be input to the pipeline every cycle, the operation result can be obtained every cycle, and the instruction processing speed is one instruction per cycle. Ideal processing can be performed.

【0024】しかし、実際には様々な要因により1サイ
クル当り1命令の処理速度を得ることができない。この
要因の1つとして分岐先命令読み出しのオーバヘッドが
ある。
However, in reality, the processing speed of one instruction per cycle cannot be obtained due to various factors. One of the factors is the overhead of reading the branch destination instruction.

【0025】図9に示すタイムチャートは、このような
場合の例を示すもので、CLI命令、BC命令を連続し
て実行させた場合に、BC命令の分岐が成立した場合の
パイプラインフローを示している。
The time chart shown in FIG. 9 shows an example of such a case, and shows the pipeline flow when the branch of the BC instruction is taken when the CLI instruction and the BC instruction are continuously executed. Shows.

【0026】図9において、命令0〜命令2は図8の場
合と同一であり、命令5はBC命令の分岐が成立した結
果得られた分岐先命令であり、命令6はその命令5に続
く命令である。この例の場合、BC命令のDステージで
分岐の成立を予測することができるが、分岐先命令であ
る命令5がパイプラインに投入されるのは、既に説明し
たようにBC命令のLステージの後となる。このため、
図9の例では、分岐命令が第3サイクルにパイプライン
に投入されているのに対して、その分岐先命令である命
令5がパイプラインに投入されるのが第8サイクルとな
り、4マシンサイクルの空きが生じている。
In FIG. 9, instructions 0 to 2 are the same as those in FIG. 8, instruction 5 is a branch destination instruction obtained as a result of the branching of the BC instruction, and instruction 6 follows the instruction 5. It is an instruction. In the case of this example, it is possible to predict that the branch will be taken at the D stage of the BC instruction, but the instruction 5 that is the branch destination instruction is input to the pipeline because, as already described, the L stage of the BC instruction. It will be later. For this reason,
In the example of FIG. 9, the branch instruction is input to the pipeline in the third cycle, whereas the branch destination instruction, instruction 5, is input to the pipeline in the eighth cycle, which is four machine cycles. There is a vacancy.

【0027】図10に示すタイムチャートは、BCT命
令の分岐が成立した場合のパイプラインフローを示して
いる。
The time chart shown in FIG. 10 shows the pipeline flow when the branch of the BCT instruction is taken.

【0028】図10において、命令0、1は命令2のB
CT命令に先行する命令であり、命令5、6はBCT命
令の分岐が成立した結果得られた分岐先命令とそれに続
く命令である。この例の場合も、図9の同様にBCT命
令のDステージで分岐の成立を予測することができる
が、分岐先命令である命令5がパイプラインに投入され
るのは第8サイクルとなり、4マシンサイクルの空きを
生じることになる。
In FIG. 10, instructions 0 and 1 are B of instruction 2.
Instructions preceding the CT instruction, and instructions 5 and 6 are a branch destination instruction obtained as a result of the branch of the BCT instruction being taken and an instruction following it. In the case of this example as well, it is possible to predict that the branch will be taken at the D stage of the BCT instruction as in FIG. 9, but the instruction 5 which is the branch destination instruction is injected into the pipeline in the eighth cycle. This will result in empty machine cycles.

【0029】図11に示すタイムチャートは、L命令、
LTR命令のパイプラインフローを示している。
The time chart shown in FIG. 11 shows the L instruction,
4 shows a pipeline flow of an LTR instruction.

【0030】図11において、命令1、2がそれぞれL
命令、LTR命令である以外、図8の場合と同一であ
る。この例の場合、図8に示した場合と同様に、命令を
毎サイクルに1つずつパイプラインに投入することがで
き、演算結果も毎サイクル毎に得ることができる。
In FIG. 11, instructions 1 and 2 are L respectively.
The instruction is the same as the case of FIG. 8 except that it is an LTR instruction. In the case of this example, as in the case shown in FIG. 8, one instruction can be input to the pipeline every cycle, and the operation result can be obtained every cycle.

【0031】なお、前述したようなパイプライン処理方
式の情報処理装置に関する従来技術として、例えば、特
開昭63−195736号公報に記載された技術が知ら
れている。
As a conventional technique relating to the information processing apparatus of the above-mentioned pipeline processing system, for example, the technique described in Japanese Patent Laid-Open No. 63-195736 is known.

【0032】[0032]

【発明が解決しようとする課題】前述した従来技術にに
よるパイプライン処理機構を持った情報処理装置は、処
理速度が最大でも1サイクル当り1命令に制限されると
いう問題点を有しており、また、分岐先命令の読み出し
のためのオーバヘッド等の様々なオーバヘッドにより、
実際には1命令の処理に平均して数サイクルを必要とす
るという問題点を有している。
The information processing apparatus having the pipeline processing mechanism according to the above-mentioned prior art has a problem that the processing speed is limited to one instruction per cycle at the maximum. Also, due to various overheads such as the overhead for reading the branch destination instruction,
Actually, there is a problem that it takes several cycles on average to process one instruction.

【0033】本発明の目的は、前記従来技術の問題点を
解決し、予め決められた2命令の組み合せをこの2命令
に等価な複合命令の1命令に置き換えることにより、1
サイクルに最大2命令の処理を可能とした情報処理装置
を提供することにある。
The object of the present invention is to solve the above-mentioned problems of the prior art, and to replace a predetermined combination of two instructions with one instruction of a composite instruction equivalent to the two instructions.
An object is to provide an information processing device capable of processing a maximum of two instructions in a cycle.

【0034】また、本発明の他の目的は、分岐命令の処
理の少なくとも一部を、その分岐命令に先行する命令の
パイプライン処理と並行して処理することを可能とし、
これにより、分岐先命令の読み出しオーバヘッドを低減
することのできる情報処理装置を提供することにある。
Another object of the present invention is to enable at least a part of processing of a branch instruction to be processed in parallel with pipeline processing of an instruction preceding the branch instruction,
Accordingly, it is an object of the present invention to provide an information processing apparatus capable of reducing the read overhead of a branch destination instruction.

【0035】[0035]

【課題を解決するための手段】本発明によれば前記目的
は、命令の複合化を行い、この復号化命令を1つの命令
として実行可能とし、また、分岐先命令の読み出しを早
めるようにすることにより達成される。
SUMMARY OF THE INVENTION According to the present invention, the above object is to combine instructions so that the decoded instruction can be executed as one instruction and the branch destination instruction can be read faster. It is achieved by

【0036】すなわち、前記目的は、通常のパイプライ
ン処理のための第1の命令取り出し手段に加えて、第1
の命令取り出し手段が取り出す命令の後続命令を取り出
す第2の命令取り出し手段と、第1の命令取り出し手段
が取り出す命令を格納するための第1の命令格納手段に
加えて、第2の命令取り出し手段が取り出す命令を格納
するための第2の命令格納手段と、第1の命令格納手段
と第2の命令格納手段とに格納された命令が予定の命令
組み合せであるか否かを検査し、予定の命令組み合わせ
であるならばそれらの2命令を等価な複合命令に置き換
える置換命令発生手段と、置換命令発生手段が置換命令
を発生したとき、第1の命令格納手段に、第2の命令格
納手段に格納されている命令の直後の命令を格納するよ
うに第1の命令取り出し手段を制御する手段と、第2の
命令格納手段に格納された命令が分岐命令であるか否か
を検査し、分岐命令であるならば分岐先命令の読み出し
を開始させる第2の分岐命令検出回路と、第1の命令格
納手段に格納された命令が分岐命令であり、その分岐命
令の分岐先命令の読み出しが第2の分岐命令検出回路に
よって開始されている場合、第1の命令格納手段にその
分岐命令が格納されたことによる分岐先命令の読み出し
を抑止する第1の分岐命令検出回路と備えることにより
達成される。
That is, in addition to the first instruction fetch means for normal pipeline processing,
Second instruction fetching means for fetching a subsequent instruction of the instruction fetched by the instruction fetching means, and first instruction storing means for storing the instruction fetched by the first instruction fetching means, and second instruction fetching means The second instruction storage means for storing the instruction to be retrieved by the first instruction storage means and the instructions stored in the first instruction storage means and the second instruction storage means are checked to see if they are a predetermined instruction combination, Replacement instruction generating means for replacing the two instructions with an equivalent compound instruction, and when the replacement instruction generating means generates a replacement instruction, the first instruction storing means stores the second instruction storing means. Means for controlling the first instruction fetching means so as to store the instruction immediately after the instruction stored in, and whether or not the instruction stored in the second instruction storing means is a branch instruction, Branching life And the instruction stored in the first instruction storage means is a branch instruction, and the reading of the branch destination instruction of the branch instruction is the second. When it is started by the branch instruction detecting circuit, the first branch instruction detecting circuit is provided to suppress the reading of the branch destination instruction due to the storage of the branch instruction in the first instruction storing means. .

【0037】[0037]

【作用】置換命令発生回路は、前記第1の命令格納手段
と第2の命令格納手段とに格納された2命令が予定の命
令の組み合せであることを検出すると、それらの2命令
を1つの命令に複合化した複合命令で置き換える。そし
て、次サイクルにおいて、それらの2命令に後続する命
令が第1の命令格納手段に格納される。置き換えられた
複合命令は、1つの命令としてパイプラインの各ステー
ジで処理される。
When the replacement instruction generation circuit detects that the two instructions stored in the first instruction storage means and the second instruction storage means are a combination of predetermined instructions, the two instructions are combined into one. Replace with a compound command that is compounded into a command. Then, in the next cycle, the instructions following these two instructions are stored in the first instruction storage means. The replaced compound instruction is processed as one instruction at each stage of the pipeline.

【0038】この結果、本発明は、前述の2命令に後続
する命令のパイプライン投入を1サイクル早めることが
でき、処理速度を向上させることができる。
As a result, according to the present invention, the pipeline injection of the instruction subsequent to the above-mentioned two instructions can be advanced by one cycle, and the processing speed can be improved.

【0039】また、第2の命令取り出し手段が取り出し
た命令が分岐命令であるとき、分岐命令検出回路は、分
岐先命令の読み出しを直ちに開始させる。従って、第1
の命令取り出し手段が取り出した分岐命令に先行する命
令のパイプラインの各ステージにおける処理に並行し
て、分岐先命令の読み出しがパイプラインの各ステージ
で処理されることとなり、分岐先命令の読み出しのオー
バヘッドを低減することができる。
When the instruction fetched by the second instruction fetch means is a branch instruction, the branch instruction detection circuit immediately starts reading the branch target instruction. Therefore, the first
In parallel with the processing in each stage of the pipeline of the instruction preceding the branch instruction fetched by the instruction fetching means, the reading of the branch destination instruction is processed in each stage of the pipeline, and the reading of the branch destination instruction Overhead can be reduced.

【0040】[0040]

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

【0041】図1は本発明の一実施例によるパイプライ
ン処理方式による情報処理装置の構成を示すブロック
図、図2はBC命令の分岐が不成立の場合のパイプライ
ンフローを示すタイムチャート、図3はBC命令の分岐
が成立した場合のパイプラインフローを示すタイムチャ
ート、図4はBCT命令の分岐が成立した場合のパイプ
ラインフローを示すタイムチャート、図5はL命令、L
TR命令を復号化して実行するパイプラインフローを示
すタイムチャートである。図1において、40は第2の
命令取り出しシフタ、50は第2の命令レジスタ、52
は第2のILCデコーダ、80はセレクタ、90は置換
命令発生回路、105は第2の分岐命令検出回路であ
り、他の符号は図6の場合と同一である。但し、本発明
の一実施例で「第2の」として従来技術に加えて同一機
能ブロックが加えられたものについて、従来から備えら
れているものについては、「第1の」を付与して説明す
る。
FIG. 1 is a block diagram showing a configuration of an information processing apparatus by a pipeline processing system according to an embodiment of the present invention, FIG. 2 is a time chart showing a pipeline flow when a branch of a BC instruction is not taken, and FIG. Is a time chart showing the pipeline flow when the branch of the BC instruction is taken, FIG. 4 is a time chart showing the pipeline flow when the branch of the BCT instruction is taken, and FIG.
It is a time chart which shows the pipeline flow which decodes and executes a TR instruction. In FIG. 1, 40 is a second instruction fetch shifter, 50 is a second instruction register, and 52.
Is a second ILC decoder, 80 is a selector, 90 is a replacement instruction generation circuit, 105 is a second branch instruction detection circuit, and other reference numerals are the same as those in FIG. However, in the embodiment of the present invention, the description will be given by adding the "first" to the one provided with the same functional block as the "second" in addition to the prior art and the one provided conventionally. To do.

【0042】図1に示す本発明の一実施例は、図6によ
り説明した従来技術に、第2の命令取り出しシフタ4
0、第2の命令レジスタ50、第2のILCデコーダ5
2、セレクタ80、置換命令発生回路90、第2の分岐
命令検出回路105を加えて構成されるものであり、ま
ず、これらの機能ブロックについて説明する。なお、従
来技術の同一のブロックは、既に従来技術として説明し
たと同一の機能を有しているので、その説明を省略す
る。
The embodiment of the present invention shown in FIG. 1 is the same as the prior art described with reference to FIG.
0, second instruction register 50, second ILC decoder 5
2, a selector 80, a replacement instruction generation circuit 90, and a second branch instruction detection circuit 105 are added. First, these functional blocks will be described. Note that the same block in the conventional technique has the same function as that described as the conventional technique, and thus the description thereof will be omitted.

【0043】第2の命令取り出しシフタ40は、第1の
命令取り出しシフタ20により取り出された命令列の先
頭の命令の命令長を示す命令長コードILC21に基づ
いて、第1の命令取り出しシフタ20により取り出され
た命令列の先頭より、ILC21が示すだけ後の位置か
ら命令を取り出すことにより、IRP30に格納された
命令の直後の命令を取り出す機能を有する。第2の命令
レジスタIRS50は、第2の命令取り出しシフタ40
によって取り出された命令を格納する。
The second instruction fetch shifter 40 uses the first instruction fetch shifter 20 based on the instruction length code ILC21 indicating the instruction length of the first instruction of the instruction sequence fetched by the first instruction fetch shifter 20. It has a function of fetching the instruction immediately after the instruction stored in the IRP 30 by fetching the instruction from the position which is indicated by the ILC 21 from the head of the fetched instruction sequence. The second instruction register IRS50 is used by the second instruction fetch shifter 40.
Stores the instruction fetched by.

【0044】第2のILCデコーダ52は、IRS50
に格納された命令の命令長を示す第2のILC51から
IRS50に格納された命令の命令長を求める機能を有
する。加算器70は、IBROP60の内容と第1のI
LCデコーダ32の内容とセレクタ80により供給され
る値とを加算し、IBROP60の内容を更新する機能
を有する。セレクタ80は、“0”または第2のILC
デコーダ52の出力のいずれかを選択し加算器70に供
給する。
The second ILC decoder 52 has an IRS 50.
It has a function of obtaining the instruction length of the instruction stored in the IRS 50 from the second ILC 51 indicating the instruction length of the instruction stored in the. The adder 70 receives the contents of the IBROP 60 and the first I
It has a function of adding the contents of the LC decoder 32 and the value supplied by the selector 80 to update the contents of the IBROP 60. The selector 80 is “0” or the second ILC.
One of the outputs of the decoder 52 is selected and supplied to the adder 70.

【0045】置換命令発生回路90は、IRP30及び
IRS50に予め決められた組み合せの命令が格納され
た場合、それらを複合化された1つの命令に置き換え、
それ以外の場合、IRP30の内容をそのまま出力する
機能を備える。第2の分岐命令検出回路105は、IR
S50に分岐命令が格納されたことを検出する。
When the IRP 30 and the IRS 50 store a predetermined combination of instructions, the replacement instruction generation circuit 90 replaces them with one composite instruction,
Otherwise, it has a function of directly outputting the contents of the IRP 30. The second branch instruction detection circuit 105 uses the IR
It is detected that the branch instruction is stored in S50.

【0046】次に、前述のように構成される本発明の一
実施例の動作を説明する。なお、本発明の一実施例にお
ける情報処理装置においても、前述した従来技術による
場合と同様に、図7により説明した命令が使用されるも
のとする。
Next, the operation of the embodiment of the present invention configured as described above will be described. Note that the information processing apparatus according to the embodiment of the present invention also uses the instructions described with reference to FIG. 7, as in the case of the above-described conventional technique.

【0047】まず、CLI命令及びBC命令がこの順で
連続し、これらの命令がCLI−BC複合命令に置換さ
れる場合を例に挙げ、図2、図3を参照して説明する。
First, the case where the CLI instruction and the BC instruction are consecutive in this order and these instructions are replaced by the CLI-BC compound instruction will be described as an example with reference to FIGS.

【0048】図2はBC命令の分岐が不成立の場合のパ
イプラインフローを示す図であり、以下、このパイプラ
インフローを説明する。
FIG. 2 is a diagram showing a pipeline flow in the case where the branch of the BC instruction is not taken. This pipeline flow will be described below.

【0049】図2において、命令0はCLI命令に先行
する命令、命令3はBC命令に後続する命令、命令4は
命令3に後続する命令であり、それぞれ説明の便宜上加
えられたものである。
In FIG. 2, the instruction 0 is an instruction preceding the CLI instruction, the instruction 3 is an instruction subsequent to the BC instruction, and the instruction 4 is an instruction subsequent to the instruction 3, which are added for convenience of description.

【0050】図1に示す本発明の一実施例において、ま
ず、命令0が第1の命令取り出しシフタ20によりIB
R10から取り出されてIRP30に格納される。そし
て、第1サイクルに命令0のDステージが開始される。
これと同時に、命令0の後続命令であるCLI命令は、
第2の命令取り出しシフタ40によってIRS50に取
り出される。
In the embodiment of the present invention shown in FIG. 1, first, the instruction 0 is transferred to the IB by the first instruction fetch shifter 20.
It is taken out from R10 and stored in IRP30. Then, the D stage of the instruction 0 is started in the first cycle.
At the same time, the CLI instruction, which is the instruction following the instruction 0,
The second instruction fetch shifter 40 fetches to the IRS 50.

【0051】命令0のDステージにおいて、置換命令発
生回路90は、IRP30及びIRS50の内容を検査
する。置換命令発生回路90は、予め複合化可能な命令
の組み合わせを保持しており、この場合の命令の組み合
わせが命令複合化の対象ではないことを検出する。この
結果により、セレクタ80は、置換命令発生回路90に
より“0”を選択するよう制御され、“0”を加算器7
0に供給する。
In the D stage of instruction 0, replacement instruction generation circuit 90 inspects the contents of IRP 30 and IRS 50. The replacement instruction generation circuit 90 holds a combination of instructions that can be composited in advance, and detects that the combination of instructions in this case is not the target of instruction composition. Based on this result, the selector 80 is controlled by the replacement instruction generation circuit 90 to select "0", and "0" is added to the adder 7
Supply to 0.

【0052】従って、IBROP60の内容は、その旧
値と、IRP30内の命令すなわち命令0の長さとの和
に更新される。そして、この値が第1の命令取り出しシ
フタ20に供給される。
Therefore, the contents of IBROP 60 are updated to the sum of the old value and the length of the instruction in IRP 30, that is, instruction 0. Then, this value is supplied to the first instruction fetch shifter 20.

【0053】この結果、第2サイクルにおいて、IRP
30には、第1の命令取り出しシフタ20によりCLI
命令が格納され、IRS50には、第2の命命令取り出
しシフタ40によりBC命令が格納される。置換命令発
生回路90は、命令複合化の対象であるCLI命令とB
C命令との組合せがIRP30及びIRS50に格納さ
れたことを検出し、CLI−BC複合命令を発生する。
As a result, in the second cycle, the IRP
30 to the CLI by the first instruction fetch shifter 20.
The instruction is stored, and the BC instruction is stored in the IRS 50 by the second life instruction fetch shifter 40. The replacement instruction generation circuit 90 uses the CLI instruction and the B
It detects that the combination with the C instruction is stored in the IRP 30 and IRS 50, and generates the CLI-BC compound instruction.

【0054】一方、第2の分岐命令検出回路105はI
RS50に分岐命令が格納されたことを検出し、分岐先
命令の読み出しを開始させる。
On the other hand, the second branch instruction detection circuit 105
It is detected that the branch instruction is stored in the RS 50, and the reading of the branch destination instruction is started.

【0055】これにより、第2サイクルにおいて、CL
I−BC命令のDステージと分岐先命令読み出しのDス
テージとが並行して処理される。このDステージにおい
て、BC命令の分岐成立か否かを予測することができ、
図2に示す例の場合、分岐不成立と予測される。これに
より、置換命令発生回路90は、CLI−BC命令に割
り当てた擬似オペレーションコードを命令デコーダ11
0に供給すると共に、第2のILCデコーダ52の出力
を選択するようセレクタ80を制御する。
As a result, in the second cycle, CL
The D stage of the I-BC instruction and the D stage of reading the branch destination instruction are processed in parallel. In this D stage, it is possible to predict whether or not the branch of the BC instruction is taken,
In the case of the example shown in FIG. 2, branch failure is predicted. As a result, the replacement instruction generation circuit 90 outputs the pseudo operation code assigned to the CLI-BC instruction to the instruction decoder 11
In addition to supplying 0, the selector 80 is controlled to select the output of the second ILC decoder 52.

【0056】この結果、加算器70は、セレクタ80か
らBC命令の命令長が供給され、このBC命令の命令長
とIBROP60の旧値とCLI命令の命令長とを加算
して得られた和をIBROP60に格納する。すなわ
ち、IBROP60の内容は、BC命令の後続命令であ
る命令3を指すように更新される。加算器70の出力
は、第1の命令取り出しシフタ20にも供給されるの
で、第3サイクルには第1の命令取り出しシフタ20に
より命令3がIRP30に取り出される。
As a result, the adder 70 is supplied with the instruction length of the BC instruction from the selector 80, and adds the instruction length of this BC instruction, the old value of IBROP 60, and the instruction length of the CLI instruction to obtain the sum. Store in IBROP60. That is, the contents of the IBROP 60 are updated to point to the instruction 3 which is the subsequent instruction of the BC instruction. Since the output of the adder 70 is also supplied to the first instruction fetch shifter 20, the instruction 3 is fetched to the IRP 30 by the first instruction fetch shifter 20 in the third cycle.

【0057】第2サイクルにおいて、命令デコーダ11
0は、置換命令発生回路90より供給されるCLI−B
C命令に割り当てた擬似オペレーションコードの解読情
報を生成する。また、IRP30に格納されたCLI命
令のB1フィールドにより汎用レジスタ180が参照さ
れ、その内容と、CLI命令のD1フィールドの内容と
がオペランド用アドレス加算器140に供給される。さ
らに、IRS50に格納されたBC命令のX2、B2フ
ィールドにより汎用レジスタ180が参照され、その内
容と、BC命令のD2フィールドの内容とが命令用アド
レス加算器200に供給される。
In the second cycle, the instruction decoder 11
0 is the CLI-B supplied from the replacement instruction generation circuit 90.
The decoding information of the pseudo operation code assigned to the C instruction is generated. Further, the general-purpose register 180 is referenced by the B1 field of the CLI instruction stored in the IRP 30, and the content and the content of the D1 field of the CLI instruction are supplied to the operand address adder 140. Further, the general-purpose register 180 is referenced by the X2 and B2 fields of the BC instruction stored in the IRS 50, and the contents and the contents of the D2 field of the BC instruction are supplied to the instruction address adder 200.

【0058】第3サイクルにおいて、CLI−BC複合
命令のAステージと分岐先命令読み出しのAステージが
並行して処理される。オペランド用アドレス加算器14
0は、汎用レジスタ180とIRP30とから供給され
るデータを加算することにより、CLI−BC複合命令
の第1オペランドの論理アドレスを求める。また、命令
用アドレス加算器200は、汎用レジスタ180とIR
S50とから供給されるデータを加算することにより、
分岐先命令の論理アドレスを求める。
In the third cycle, the A stage of the CLI-BC compound instruction and the A stage of reading the branch destination instruction are processed in parallel. Operand address adder 14
0 adds the data supplied from the general-purpose register 180 and the IRP 30 to obtain the logical address of the first operand of the CLI-BC compound instruction. Further, the instruction address adder 200 includes a general-purpose register 180 and an IR.
By adding the data supplied from S50,
Obtain the logical address of the branch destination instruction.

【0059】第4サイクルにおいて、CLI−BC複合
命令のTステージと分岐先命令読み出しのTステージが
並行して処理される。オペランド用TLB150は、オ
ペランド用アドレス加算器140で求められたCLI−
BC複合命令の第1オペランドの論理アドレスを物理ア
ドレスに変換する。また、命令用TLB210は、命令
用アドレス加算器200で求められた分岐先命令の論理
アドレスを物理アドレスに変換する。
In the fourth cycle, the T stage of the CLI-BC compound instruction and the T stage of reading the branch destination instruction are processed in parallel. The operand TLB 150 has a CLI-value obtained by the operand address adder 140.
The logical address of the first operand of the BC compound instruction is converted into a physical address. Further, the instruction TLB 210 converts the logical address of the branch destination instruction obtained by the instruction address adder 200 into a physical address.

【0060】第5サイクルにおいて、CLI−BC複合
命令のBステージと分岐先命令読み出しのBステージが
並行して処理される。制御記憶130は、命令デコーダ
110から取り出された命令解読情報により参照され、
CLI−BC複合命令の実行に必要な制御情報が演算実
行部170に供給可能となる。オペランド用バッファ記
憶装置160は、オペランド用TLB150で求められ
たCLI−BC複合命令の第1オペランドの物理アドレ
スにより参照され、演算の実行に必要となる第1オペラ
ンドデータが演算実行部170に供給可能となる。ま
た、命令用バッファ記憶装置220は、命令用TLB2
10で求められた分岐先命令の物理アドレスにより参照
され、分岐先命令がIBR10に供給可能となる。
In the fifth cycle, the B stage of the CLI-BC compound instruction and the B stage of reading the branch destination instruction are processed in parallel. The control memory 130 is referred to by the instruction decoding information fetched from the instruction decoder 110,
The control information necessary for executing the CLI-BC compound instruction can be supplied to the arithmetic execution unit 170. The operand buffer storage device 160 is referred to by the physical address of the first operand of the CLI-BC compound instruction obtained by the operand TLB 150, and the first operand data necessary for executing the operation can be supplied to the operation executing unit 170. Becomes In addition, the instruction buffer storage device 220 uses the instruction TLB 2
The branch destination instruction can be supplied to the IBR 10 by being referred to by the physical address of the branch destination instruction obtained in 10.

【0061】第6サイクルにおいて、CLI−BC複合
命令のLステージと分岐先命令読み出しのLステージが
並行して処理される。制御記憶130から取り出された
CLI−BC複合命令の制御情報は、演算実行部170
に転送され、オペランド用バッファ記憶装置160から
取り出されたCLI−BC複合命令の第1オペランドデ
ータとCLI命令中のI2フィールドの内容である第2
オペランドデータも演算実行部に転送される。また、命
令用バッファ記憶装置220から取り出された分岐先命
令は、IBR10に供給される。但し、分岐が不成立の
場合、この分岐先命令は使用されない。従って、図2に
示す例の場合、この分岐先命令は使用されない。
In the sixth cycle, the L stage of the CLI-BC compound instruction and the L stage of reading the branch destination instruction are processed in parallel. The control information of the CLI-BC compound instruction extracted from the control storage 130 is the operation execution unit 170.
Second operand, which is the content of the I2 field in the CLI instruction and the first operand data of the CLI-BC compound instruction transferred to the operand buffer storage device 160.
Operand data is also transferred to the operation execution unit. The branch destination instruction fetched from the instruction buffer storage device 220 is supplied to the IBR 10. However, if the branch is not taken, this branch destination instruction is not used. Therefore, in the case of the example shown in FIG. 2, this branch destination instruction is not used.

【0062】第7サイクルにおいて、演算実行部170
は、CLI−BC複合命令の演算を実行する。すなわ
ち、演算実行部170は、オペランド用バッファ記憶装
置160から読み出される第1オペランドデータと、C
LI命令中のI2フィールドの内容である第2オペラン
ドデータとを比較し、その比較結果により条件コードを
設定する処理を行う。
In the seventh cycle, the operation executing section 170
Executes the operation of the CLI-BC compound instruction. That is, the operation executing unit 170 uses the first operand data read from the operand buffer storage device 160 and C
The second operand data, which is the content of the I2 field in the LI instruction, is compared, and the condition code is set according to the comparison result.

【0063】一方、前述したように、第2サイクルにお
いて、第1の命令取り出しシフタ20は、命令3の位置
から命令列を取り出すように制御されるので、第3サイ
クルににおいて、命令3がIRP30にセットされる。
また、続く第4サイクルにおいて、命令4が順次パイプ
ラインに投入される。
On the other hand, as described above, in the second cycle, the first instruction fetch shifter 20 is controlled so as to fetch the instruction string from the position of the instruction 3, so that the instruction 3 receives the IRP 30 in the third cycle. Is set to.
Further, in the subsequent fourth cycle, the instruction 4 is sequentially input to the pipeline.

【0064】前述したように、本発明の実施例は、CL
I命令とBC命令とが連続する場合に、これらの命令を
複合化して、BC命令の処理をCLI命令のパイプライ
ン処理と並行して実行することが可能となり、かつ、B
C命令の分岐が不成立の場合、BC命令の後続命令であ
る命令3、命令4のパイプラインへの投入を第3サイク
ルから行うことができる。この結果、本発明の実施例
は、同一の条件における従来技術の場合の動作を説明す
る図8に示すフローと比較して命令3、命令4のパイプ
ラインへの投入を1サイクル早めることができ、情報処
理装置の処理速度を向上させることができる。
As described above, according to the embodiment of the present invention, the CL
When the I instruction and the BC instruction are consecutive, these instructions can be compounded to execute the BC instruction processing in parallel with the CLI instruction pipeline processing, and B
When the branch of the C instruction is not taken, the instruction 3 and the instruction 4 which are the subsequent instructions of the BC instruction can be input to the pipeline from the third cycle. As a result, the embodiment of the present invention can advance the injection of the instruction 3 and the instruction 4 into the pipeline by one cycle as compared with the flow shown in FIG. 8 for explaining the operation in the case of the conventional technique under the same condition. The processing speed of the information processing device can be improved.

【0065】図3はBC命令の分岐が成立した場合のパ
イプラインフローを示す図であり、以下、このパイプラ
インフローを説明する。
FIG. 3 is a diagram showing the pipeline flow when the branch of the BC instruction is taken, and this pipeline flow will be described below.

【0066】図3において、命令0はCLI命令に先行
する命令、命令5はBC命令の分岐先命令、命令6は命
令5に後続する命令でありそれぞれ説明の便宜上加えら
れたものである。
In FIG. 3, the instruction 0 is an instruction preceding the CLI instruction, the instruction 5 is a branch destination instruction of the BC instruction, and the instruction 6 is an instruction following the instruction 5, which are added for convenience of description.

【0067】図3において、第1サイクルで命令0のD
ステージが実行され、第2サイクルでCLI−BC複合
命令のDステージと、分岐先命令読み出しのDステージ
とが並行して処理されるのは前述した図2の分岐不成立
の場合と同一である。そして、この例の場合、第2サイ
クルのDステージの処理で、分岐成立を予測することが
できるので、命令3の読み出し処理を開始することな
く、CLI−BC複合命令及び分岐先命令読み出しのA
ステージ、Tステージ、Bステージ、Lステージがそれ
ぞれ、並行して順次処理される。この処理も、前述した
図2の分岐不成立の場合と同一である。
In FIG. 3, D of instruction 0 in the first cycle
The stage is executed, and the D stage of the CLI-BC compound instruction and the D stage of reading the branch destination instruction are processed in parallel in the second cycle, which is the same as the case where the branch is not taken in FIG. 2 described above. In the case of this example, since the branch taken can be predicted in the processing of the D stage of the second cycle, the CLI-BC compound instruction and the branch destination instruction read A can be executed without starting the read processing of the instruction 3.
The stage, T stage, B stage, and L stage are processed in parallel and sequentially. This processing is also the same as the case where the branch is not taken in FIG. 2 described above.

【0068】第7サイクルにおいて、前述したように演
算実行部170は、CLI−BC複合命令の演算を実行
し、条件コードの設定が行われる。
In the seventh cycle, as described above, the operation executing section 170 executes the operation of the CLI-BC compound instruction and sets the condition code.

【0069】一方、第6サイクルにおけるLステージ
で、命令用バッファ記憶装置220からIBR10に転
送された分岐先命令である命令5は、続く第7サイクル
においてIRP30にセットされ、パイプラインによる
処理が開始される。また、続く第8サイクルには命令6
が順次パイプラインに投入される。
On the other hand, in the L stage in the sixth cycle, the instruction 5 which is the branch destination instruction transferred from the instruction buffer storage device 220 to the IBR10 is set in the IRP30 in the subsequent seventh cycle, and the processing by the pipeline is started. To be done. In the following 8th cycle, instruction 6
Are sequentially put into the pipeline.

【0070】前述したように、本発明の実施例は、CL
I命令とBC命令とを複合化して、BC命令の処理をC
LI命令のパイプライン処理と並行して実行し、BC命
令の分岐が不成立の場合、分岐先命令である命令5、そ
の後続命令6のパイプラインへの投入を第7サイクルか
ら行うことができる。この結果、本発明の実施例は、同
一の条件における従来技術の場合の動作を説明する図9
に示すフローと比較して命令5、命令6のパイプライン
への投入を1サイクル早めることができ、情報処理装置
の処理速度を向上させることができる。
As described above, the embodiment of the present invention uses CL
By compounding the I instruction and the BC instruction, the processing of the BC instruction is performed by the C instruction.
When executed in parallel with the pipeline processing of the LI instruction and the branch of the BC instruction is not taken, the instruction 5 which is the branch destination instruction and the subsequent instruction 6 can be input to the pipeline from the seventh cycle. As a result, the embodiment of the present invention will be described with reference to FIG.
Compared with the flow shown in (1), the instruction 5 and the instruction 6 can be input into the pipeline one cycle earlier, and the processing speed of the information processing apparatus can be improved.

【0071】次に、分岐先命令の読み出しによるオーバ
ヘッドを低減させることができる動作例として、BCT
命令の処理について説明する。BCT命令は、R1で示
された汎用レジスタの演算が必要なため、演算器に競合
が生じ、全ての処理を先行する命令と並行して実行する
ことができない。従って、複合命令化することはせずに
分岐先命令の読み出し処理のみを並行して実行する。
Next, as an operation example capable of reducing the overhead due to the reading of the branch destination instruction, BCT
The processing of the instruction will be described. Since the BCT instruction requires the operation of the general-purpose register indicated by R1, contention occurs in the arithmetic units, and all the processing cannot be executed in parallel with the preceding instruction. Therefore, only the read processing of the branch destination instruction is executed in parallel without being converted into a composite instruction.

【0072】図4はBCT命令を含む命令列を、図1に
示す情報処理装置で実行した場合のパイプラインフロー
を示す図であり、以下、これについて説明する。
FIG. 4 is a diagram showing a pipeline flow when an instruction string including a BCT instruction is executed by the information processing apparatus shown in FIG. 1, which will be described below.

【0073】図4に示すフローは、BCT命令の分岐が
成立する場合の例であり、命令0、命令1は、BCT命
令に先行する命令、命令5はBCT命令の分岐先命令、
命令6は命令5に後続する命令でありそれぞれ説明の便
宜上加えられたものである。
The flow shown in FIG. 4 is an example in the case where the branch of the BCT instruction is taken. Instruction 0 and instruction 1 are instructions preceding the BCT instruction, instruction 5 is the branch destination instruction of the BCT instruction,
The instruction 6 is an instruction following the instruction 5, and is added for convenience of description.

【0074】第1サイクルににおいて、命令0がパイプ
ラインに投入されるのに続き、第2サイクルにおいて、
命令1がパイプラインに投入される。このとき、第1の
命令取り出しシフタ20は、取り出した命令1をIRP
30に格納するが、これと同時に、第2の命令取り出し
シフタ40は、命令1の後続命令であるBCT命令をI
RS50に格納する。第2の分岐命令検出回路105
は、IRS50に分岐命令であるBCT命令がセットさ
れたことを検出し、分岐先命令読み出しを開始させる。
In the first cycle, after instruction 0 is input to the pipeline, in the second cycle,
Instruction 1 is put into the pipeline. At this time, the first instruction fetch shifter 20 sends the fetched instruction 1 to the IRP.
At the same time, the second instruction fetch shifter 40 stores the BCT instruction, which is a subsequent instruction of the instruction 1, in the I.
Store in RS50. Second branch instruction detection circuit 105
Detects that the BCT instruction, which is a branch instruction, has been set in the IRS 50, and starts reading the branch destination instruction.

【0075】これにより、第2サイクルにおいて、命令
1のDステージと分岐先命令読み出しのDステージとが
並行して処理される。なお、この第2サイクルのDステ
ージにおいて、BCT命令の分岐成立が予測される。ま
た、前述したように命令1とBCT命令とは命令複合化
の対象ではないので、置換命令発生回路90は、命令1
のオペレーションコードをそのまま命令デコーダ110
に供給すると共に、セレクタ80を、“0”を選択する
ように制御する。加算器70は、セレクタ80から供給
される“0”と、IBROP60の旧値と、第1のIL
Cデコーダ32の出力との和を演算してIBROP60
の値を更新する。この結果、IBROP60は、命令1
の後続命令であるBCT命令を指すように更新される。
As a result, in the second cycle, the D stage of the instruction 1 and the D stage of reading the branch destination instruction are processed in parallel. In the D stage of the second cycle, it is predicted that the branch of the BCT instruction will be taken. Further, as described above, since the instruction 1 and the BCT instruction are not the target of instruction combination, the replacement instruction generation circuit 90
Operation code of the instruction decoder 110 as it is
And the selector 80 is controlled to select "0". The adder 70 receives “0” supplied from the selector 80, the old value of the IBROP 60, and the first IL.
IBROP60 is performed by calculating the sum with the output of the C decoder 32.
Update the value of. As a result, IBROP 60
Is updated to point to a BCT instruction that is a subsequent instruction of.

【0076】加算器70の出力は、第1の命令取り出し
シフタ20にも供給されるので、続く第3サイクルにお
いて、BCT命令が第1の命令取り出しシフタ20によ
り取り出されてIRP30に格納される。また、命令1
がメモリオペランドを必要とする命令であるとすれば、
オペランドの論理アドレスを求めるのに必要となる汎用
レジスタ180の参照が行われる。
Since the output of the adder 70 is also supplied to the first instruction fetch shifter 20, the BCT instruction is fetched by the first instruction fetch shifter 20 and stored in the IRP 30 in the subsequent third cycle. Also, instruction 1
Is an instruction that requires a memory operand,
Reference is made to the general-purpose register 180 that is needed to obtain the logical address of the operand.

【0077】一方、BCT命令の分岐先命令の論理アド
レスを求めるために、IRS50にセットされたBCT
命令のX2、B2フィールドにより汎用レジスタ180
が参照され、その内容と、BCT命令のD2フィールド
の内容とが命令用アドレス加算器200に供給される。
また、第2の分岐命令検出回路105の検出結果と、置
換命令発生回路90の結果とが第1の分岐命令検出回路
100に送られ、第3サイクルにおける分岐先命令読み
出し処理が抑止される。
On the other hand, the BCT set in the IRS 50 to obtain the logical address of the branch destination instruction of the BCT instruction.
General-purpose register 180 according to the X2 and B2 fields of the instruction
Is referred to, and the content and the content of the D2 field of the BCT instruction are supplied to the instruction address adder 200.
Further, the detection result of the second branch instruction detection circuit 105 and the result of the replacement instruction generation circuit 90 are sent to the first branch instruction detection circuit 100, and the branch destination instruction read processing in the third cycle is suppressed.

【0078】第3サイクルにおいて、命令1のAステー
ジと分岐先命令読み出しのAステージとが並行して処理
される。命令デコーダ110は、置換命令発生回路90
から供給される命令1のオペレーションコードを解読
し、その解読情報を生成する。また、オペランド用アド
レス加算器140は、汎用レジスタ180とIRP30
とから供給されるデータを加算することにより、命令1
のオペランドの論理アドレスを求める。命令用アドレス
加算器200は、汎用レジスタ180とIRS50とか
ら供給されるデータを加算することにより、分岐先命令
の論理アドレスを求める。
In the third cycle, the A stage of the instruction 1 and the A stage of reading the branch destination instruction are processed in parallel. The instruction decoder 110 includes a replacement instruction generation circuit 90.
Decode the operation code of the instruction 1 supplied from the device and generate the decryption information. Further, the operand address adder 140 includes a general-purpose register 180 and an IRP 30.
Instruction 1 is added by adding the data supplied from
The logical address of the operand of. The instruction address adder 200 calculates the logical address of the branch destination instruction by adding the data supplied from the general-purpose register 180 and the IRS 50.

【0079】第4サイクルにおいて、命令1のTステー
ジと分岐先命令読み出しのTステージとが並行して処理
される。オペランド用TLB150は、オペランド用ア
ドレス加算器140で求められた命令1のオペランドの
論理アドレスを物理アドレスに変換する。命令用TLB
210は、命令用アドレス加算器200で求められた分
岐先命令の論理アドレスを物理アドレスに変換する。
In the fourth cycle, the T stage of the instruction 1 and the T stage of reading the branch destination instruction are processed in parallel. The operand TLB 150 converts the logical address of the operand of the instruction 1 obtained by the operand address adder 140 into a physical address. TLB for instruction
210 converts the logical address of the branch destination instruction obtained by the instruction address adder 200 into a physical address.

【0080】第5サイクルにおいて、命令1のBステー
ジと分岐先命令読み出しのBステージとが並行して処理
される。制御記憶130は、命令デコーダ110より供
給される命令解読情報により参照され、命令1の実行に
必要な制御情報を用意する。オペランド用バッファ記憶
装置160は、オペランド用TLB150で求められた
命令1のオペランドの物理アドレスにより参照され、命
令1の演算実行に必要となるオペランドデータを用意す
る。命令用バッファ記憶装置220は、命令用TLB2
10で求められた分岐先命令の物理アドレスにより参照
され、分岐先命令を用意する。
In the fifth cycle, the B stage of instruction 1 and the B stage of reading the branch destination instruction are processed in parallel. The control memory 130 is referred to by the instruction decoding information supplied from the instruction decoder 110, and prepares the control information necessary for executing the instruction 1. The operand buffer storage device 160 is referred to by the physical address of the operand of the instruction 1 obtained by the TLB 150 for the operand, and prepares the operand data necessary for executing the operation of the instruction 1. The instruction buffer storage device 220 uses the instruction TLB 2
The branch destination instruction is prepared by referring to the physical address of the branch destination instruction obtained in step 10.

【0081】第6サイクルにおいて、命令1のLステー
ジと分岐先命令読み出しのLステージとが並行して処理
される。制御記憶130で用意された命令1の制御情報
は、演算実行部170に転送され、オペランド用バッフ
ァ記憶装置160で用意された命令1のオペランドデー
タも演算実行部170に転送される。命令用バッファ記
憶装置220で用意された分岐先命令はIBR10に供
給される。
In the sixth cycle, the L stage of the instruction 1 and the L stage of reading the branch destination instruction are processed in parallel. The control information of the instruction 1 prepared in the control memory 130 is transferred to the operation executing unit 170, and the operand data of the instruction 1 prepared in the operand buffer storage device 160 is also transferred to the operation executing unit 170. The branch destination instruction prepared in the instruction buffer storage device 220 is supplied to the IBR 10.

【0082】第7サイクルにおいて、演算実行部170
は、命令1の演算を実行する。また、BCT命令の分岐
先命令である命令5が第1の命令取り出しシフタ20を
経由してIRP30に格納される。一方、BCT命令
は、前述したように第3サイクルにおいて、IRP30
に格納された後、分岐先命令の読み出し以外の処理が実
行され、第8サイクルにおいて、その演算が実行され
る。
In the seventh cycle, the operation executing section 170
Executes the operation of instruction 1. Further, the instruction 5 which is the branch destination instruction of the BCT instruction is stored in the IRP 30 via the first instruction fetch shifter 20. On the other hand, the BCT instruction causes the IRP30 in the third cycle as described above.
Then, the processing other than the reading of the branch destination instruction is executed, and the operation is executed in the eighth cycle.

【0083】前述したように、本発明の一実施例は、復
号化を行うことができないBCT命令の処理を行う場
合、BCT命令の分岐先命令の読み出しを分岐命令に先
行する通常の命令と並行して行うことができる。この結
果、本発明の実施例は、同一の条件における従来技術の
場合の動作を説明する図10に示すフローと比較して命
令5、命令6のパイプラインへの投入を1サイクル早め
ることができ、情報処理装置の処理速度を向上させるこ
とができる。
As described above, according to the embodiment of the present invention, when a BCT instruction that cannot be decoded is processed, the reading of the branch destination instruction of the BCT instruction is performed in parallel with the normal instruction preceding the branch instruction. You can do it. As a result, the embodiment of the present invention can accelerate the injection of the instructions 5 and 6 into the pipeline by one cycle as compared with the flow shown in FIG. 10 for explaining the operation in the case of the conventional technique under the same condition. The processing speed of the information processing device can be improved.

【0084】前述までに説明した動作例は、分岐命令を
含む命令列を処理する例であったが、次に、分岐命令を
含まない命令列の複合化を行って処理を行う例を説明す
る。
The operation example described above is an example of processing an instruction sequence including a branch instruction. Next, an example of performing processing by compounding an instruction sequence not including a branch instruction will be described. .

【0085】図5はL命令及びLTR命令がこの順で連
続し、これらの命令がL−LTR複合命令に置換されて
処理される場合のパイプラインフローを示す図である。
FIG. 5 is a diagram showing a pipeline flow in the case where the L instruction and the LTR instruction are consecutive in this order, and these instructions are replaced with the L-LTR compound instruction for processing.

【0086】L命令とLTR命令とが複合化される条件
は、図7のL命令のR1フィールド、LTR命令のR1
フィールド、R2フィールドの全てが同一の値を有する
場合である。このような条件でL命令及びLTR命令が
使用されるのは、主記憶装置から汎用レジスタに取り出
したデータの符号を検査し、その結果を条件コードに反
映したい場合である。すなわち、L命令は、主記憶装置
から汎用レジスタへデータを転送するものであるが、転
送結果を条件コードに反映しないため、通常、L命令の
後にLTR命令を置き条件コードに反映させるようにし
ている。
The condition for compounding the L instruction and the LTR instruction is that the R1 field of the L instruction and the R1 of the LTR instruction of FIG.
This is the case where the field and the R2 field all have the same value. The L instruction and the LTR instruction are used under such a condition when the sign of the data fetched from the main memory device to the general-purpose register is inspected and the result is reflected in the condition code. That is, although the L instruction transfers data from the main storage device to the general-purpose register, since the transfer result is not reflected in the condition code, the LTR instruction is usually placed after the L instruction and reflected in the condition code. There is.

【0087】本発明の一実施例は、このような場合に、
L命令とLTR命令とを複合化して、あたかも転送結果
を条件コードに反映するL命令を実行したと同様な動作
を行うことができるものである。すなわち、本発明の一
実施例は、主記憶装置上のデータを汎用レジスタに転送
すると共にその符号を検査し、その結果を条件コードに
反映することができる。
An embodiment of the present invention is such that
By combining the L instruction and the LTR instruction, it is possible to perform the same operation as if the L instruction reflecting the transfer result in the condition code is executed. That is, according to one embodiment of the present invention, the data in the main memory can be transferred to the general-purpose register, the code thereof can be checked, and the result can be reflected in the condition code.

【0088】L−LTR複合命令の動作は、まず、元の
L命令が必要とする主記憶装置上のオペランドデータを
読み出し、このオペランドデータを演算実行部170を
経由して汎用レジスタ180に転送する処理を実行し、
その際演算実行部170がオペランドデータの符号の検
査を行い、その結果を条件コードに反映させる処理を行
うことにより実行される。
In the operation of the L-LTR compound instruction, first, the operand data in the main memory required by the original L instruction is read, and this operand data is transferred to the general register 180 via the operation executing section 170. Perform processing,
At this time, the operation executing unit 170 checks the sign of the operand data, and executes the processing of reflecting the result in the condition code.

【0089】以下、図5を参照してL−LTR複合命令
のパイプラインフローを説明する。図5において、命令
0はL命令に先行する命令、命令3はLTR命令に後続
する命令、命令4は命令3に後続する命令である。
The pipeline flow of the L-LTR compound instruction will be described below with reference to FIG. In FIG. 5, instruction 0 is an instruction preceding the L instruction, instruction 3 is an instruction following the LTR instruction, and instruction 4 is an instruction following the instruction 3.

【0090】第1サイクルにおいて、第1の命令取り出
しシフタ20は、IBR10から命令0を取り出してI
RP30に格納し、同時に、第2の命令取り出しシフタ
40は、命令0の後続命令であるL命令を取り出してI
RS50に格納する。置換命令発生回路90は、IRP
30及びIRS50の内容を検査し、命令0とL命令の
組み合わせが命令複合化の対象ではないことを検出す
る。このため、セレクタ80は、置換命令発生回路90
により“0”を選択するよう制御され、“0”を加算器
70に供給する。従って、IBROP60の内容は、加
算器70を介して、その旧値と、IRP30内の命令す
なわち命令0の長さとの和に更新される。また、この加
算器70からの値は、第1の命令取り出しシフタ20に
も供給される。
In the first cycle, the first instruction fetch shifter 20 fetches the instruction 0 from the IBR 10 and I
The second instruction fetch shifter 40 stores it in the RP 30, and at the same time, the second instruction fetch shifter 40 fetches an L instruction, which is a subsequent instruction of the instruction 0, and I
Store in RS50. The replacement instruction generation circuit 90 uses the IRP
The contents of 30 and IRS 50 are inspected, and it is detected that the combination of instruction 0 and L instruction is not the target of instruction compounding. Therefore, the selector 80 has the replacement instruction generation circuit 90.
Is controlled so as to select "0", and "0" is supplied to the adder 70. Therefore, the contents of the IBROP 60 are updated to the sum of the old value and the length of the instruction in the IRP 30, that is, the instruction 0, via the adder 70. The value from the adder 70 is also supplied to the first instruction fetch shifter 20.

【0091】その結果、第2サイクルにおいて、第1の
命令取り出しシフタ20は、IRP30にL命令を格納
し、第2の命令取り出しシフタ40は、IRS50にL
TR命令を格納する。このとき、置換命令発生回路90
は、IRP30及びIRS50の内容を検査し、L命令
とLTR命令との組み合せが複合化命令の対象であるこ
とを検出し、L−LTR複合命令を発生する。これによ
り、第2サイクルは、L−LTR複合命令のDステージ
となる。
As a result, in the second cycle, the first instruction fetch shifter 20 stores the L instruction in the IRP 30, and the second instruction fetch shifter 40 stores the L instruction in the IRS 50.
Store the TR command. At this time, the replacement instruction generation circuit 90
Examines the contents of IRP30 and IRS50, detects that the combination of the L instruction and the LTR instruction is the subject of the compounding instruction, and generates the L-LTR compound instruction. As a result, the second cycle becomes the D stage of the L-LTR compound instruction.

【0092】さらに、第2サイクルにおいて、置換命令
発生回路90は、L−LTR複合命令に割り当てた擬似
オペレーションコードを命令デコーダ110に供給する
と共に、第2のILCデコーダ52の出力を選択するよ
うにセレクタ80を制御する。加算器70は、セレクタ
80からのLTR命令の命令長が供給されるので、IB
ROP60は、その旧値とL命令の命令長とLTR命令
の命令長との和、すなわち、LTR命令の後続命令であ
る命令3を指すように加算器70により更新される。ま
た、加算器70の値は、第1の命令取り出しシフタ20
にも供給されるので第3サイクルには命令3がIRP3
0に格納される。命令デコーダ110は、置換命令発生
回路90から供給される擬似オペレーションコードを解
読し、その解読情報を生成する。さらに、IRP30に
格納されたL命令のX2、B2フィールドにより汎用レ
ジスタ180が参照され、その汎用レジスタの内容と、
L命令のD2フィールドの内容とが合わせてオペランド
用アドレス加算器140に供給される。
Further, in the second cycle, the replacement instruction generating circuit 90 supplies the pseudo operation code assigned to the L-LTR composite instruction to the instruction decoder 110 and selects the output of the second ILC decoder 52. The selector 80 is controlled. Since the adder 70 is supplied with the instruction length of the LTR instruction from the selector 80, the IB
The ROP 60 is updated by the adder 70 so as to indicate the sum of the old value thereof, the instruction length of the L instruction and the instruction length of the LTR instruction, that is, the instruction 3 which is a subsequent instruction of the LTR instruction. Further, the value of the adder 70 is the same as that of the first instruction fetch shifter 20.
Is also supplied to IRP3 in the third cycle.
Stored in 0. The instruction decoder 110 decodes the pseudo operation code supplied from the replacement instruction generating circuit 90 and generates the decoded information. Furthermore, the general-purpose register 180 is referred to by the X2 and B2 fields of the L instruction stored in the IRP 30, and the contents of the general-purpose register are
The contents of the D2 field of the L instruction are supplied together to the operand address adder 140.

【0093】第3サイクルにおいて、L−LTR複合命
令のAステージが実行される。オペランド用アドレス加
算器140は、汎用レジスタ180とIRP30とから
供給されるデータを加算することにより、元のL命令の
第2オペランドの論理アドレスを求める。
In the third cycle, the A stage of the L-LTR compound instruction is executed. The operand address adder 140 calculates the logical address of the second operand of the original L instruction by adding the data supplied from the general-purpose register 180 and the IRP 30.

【0094】第4サイクルにおいて、L−LTR複合命
令のTステージが実行される。オペランド用TLB15
0は、オペランド用アドレス加算器140で求められた
元のL命令の第2オペランドの論理アドレスを物理アド
レスに変換する。
In the fourth cycle, the T stage of the L-LTR compound instruction is executed. TLB15 for operand
0 converts the logical address of the second operand of the original L instruction obtained by the operand address adder 140 into a physical address.

【0095】第5サイクルにおいて、L−LTR複合命
令のBステージが実行される。オペランド用バッファ記
憶装置160は、オペランド用TLB150で求められ
た元のL命令の第2オペランドの物理アドレスにより参
照され、演算実行部180で用いられる元のL命令の第
2オペランドデータを用意する。また、制御記憶130
は、命令デコーダ110から取り出された命令解読情報
により参照され、L−LTR複合命令の実行に必要な制
御情報を用意する。
In the fifth cycle, the B stage of the L-LTR compound instruction is executed. The operand buffer storage device 160 is referred to by the physical address of the second operand of the original L instruction obtained by the operand TLB 150, and prepares the second operand data of the original L instruction used by the operation execution unit 180. In addition, the control memory 130
Is referred to by the instruction decoding information fetched from the instruction decoder 110 and prepares the control information necessary for executing the L-LTR compound instruction.

【0096】第6サイクルにおいて、L−LTR複合命
令のLステージが実行される。制御記憶130で用意さ
れたL−LTR複合命令の制御情報は、演算実行部17
0に転送され、同時に、オペランド用バッファ記憶装置
160で用意された元のL命令の第2オペランドデータ
も演算実行部170に転送される。
In the sixth cycle, the L stage of the L-LTR compound instruction is executed. The control information of the L-LTR compound instruction prepared in the control memory 130 is stored in the operation execution unit 17
0, and at the same time, the second operand data of the original L instruction prepared in the operand buffer storage device 160 is also transferred to the operation executing section 170.

【0097】第7サイクルにおいて、L−LTR複合命
令のEステージが実行され、L−LTR複合命令の演算
が行われる。元のL命令の第2オペランドデータは、元
のL命令の第1オペランド、すなわち、元のLTR命令
の第1オペランドが示す汎用レジスタに転送されると共
にその符号が検査され、その結果が条件コードに反映さ
れる。
In the seventh cycle, the E stage of the L-LTR compound instruction is executed and the operation of the L-LTR compound instruction is performed. The second operand data of the original L instruction is transferred to the first operand of the original L instruction, that is, the general register indicated by the first operand of the original LTR instruction, its sign is checked, and the result is a condition code. Reflected in.

【0098】一方、前述したように、第3サイクルには
命令3がパイプラインに投入され、次の第4サイクルに
は次の命令4がパイプラインに投入される。
On the other hand, as described above, the instruction 3 is input to the pipeline in the third cycle, and the next instruction 4 is input to the pipeline in the next fourth cycle.

【0099】前述したように、本発明の実施例は、L命
令とLTR命令とを複合化して実行することができ、こ
れにより、同一の条件における従来技術の場合の動作を
説明する図11に示すフローと比較して、命令3、命令
4のパイプラインへの投入を1サイクル早めることがで
き、情報処理装置の処理速度の向上を図ることができ
る。
As described above, according to the embodiment of the present invention, the L instruction and the LTR instruction can be combined and executed. As a result, the operation of the prior art under the same condition will be described with reference to FIG. Compared with the flow shown, the instruction 3 and the instruction 4 can be input into the pipeline one cycle earlier, and the processing speed of the information processing apparatus can be improved.

【0100】[0100]

【発明の効果】以上説明したように本発明によれば、予
め決められた組合せの2命令を複合化して1命令として
処理することができ、また、分岐先命令読み出しの少な
くとも一部を分岐命令に先行する命令に並行して行い、
分岐先命令読み出しのオーバヘッドを低減することがで
き、これらにより、情報処理装置の処理速度の向上を図
ることができる。
As described above, according to the present invention, it is possible to combine two instructions having a predetermined combination and process them as one instruction, and at least a part of the read of the branch destination instruction is executed as the branch instruction. In parallel with the instruction preceding
The overhead of reading the branch destination instruction can be reduced, and thus the processing speed of the information processing device can be improved.

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

【図1】本発明の一実施例による情報処理装置の構成を
示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an information processing apparatus according to an embodiment of the present invention.

【図2】本発明の一実施例によるCLI−BC複合化命
令の分岐不成立の場合のパイプラインフローを説明する
図である。
FIG. 2 is a diagram illustrating a pipeline flow in the case where a branch of a CLI-BC compounding instruction is not taken according to an embodiment of the present invention.

【図3】本発明の一実施例によるCLI−BC複合化命
令の分岐成立の場合のパイプラインフローを説明する図
である。
FIG. 3 is a diagram illustrating a pipeline flow in the case where a branch of a CLI-BC compounding instruction is taken according to an embodiment of the present invention.

【図4】本発明の一実施例によるBCT命令の分岐成立
の場合のパイプラインフローを説明する図である。
FIG. 4 is a diagram illustrating a pipeline flow when a branch of a BCT instruction is taken according to an embodiment of the present invention.

【図5】本発明一実施例によるL−LTR複合命令のパ
イプラインフローを説明する図である。
FIG. 5 is a diagram illustrating a pipeline flow of an L-LTR compound instruction according to an embodiment of the present invention.

【図6】従来技術による情報処理装置の構成例を示すブ
ロック図である。
FIG. 6 is a block diagram showing a configuration example of an information processing device according to a conventional technique.

【図7】使用される命令の例を説明する図である。FIG. 7 is a diagram illustrating an example of instructions used.

【図8】従来技術におけるCLI命令、BC命令の分岐
不成立の場合のパイプラインフローを説明する図であ
る。
FIG. 8 is a diagram illustrating a pipeline flow in the case where a CLI instruction and a BC instruction are not branched in the related art.

【図9】従来技術におけるCLI命令、BC命令の分岐
成立の場合のパイプラインフローを説明する図である。
FIG. 9 is a diagram for explaining a pipeline flow in the case where a CLI instruction and a BC instruction are taken in a branch according to a conventional technique.

【図10】従来技術におけるBCT命令の分岐成立の場
合のパイプラインフローを説明する図である。
FIG. 10 is a diagram illustrating a pipeline flow in the case where a branch of a BCT instruction is taken in the prior art.

【図11】従来技術におけるL命令、LTR命令のパイ
プラインフローを説明する図である。
FIG. 11 is a diagram illustrating a pipeline flow of an L instruction and an LTR instruction in a conventional technique.

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

10 命令バッファレジスタ(IBR) 20 第1の命令取り出しシフタ 30 第1の命令レジスタ(IRP) 32 第1のILCデコーダ 40 第2の命令取り出しシフタ 50 第2の命令レジスタ(IRS) 52 第2のILCデコーダ 60 ポインタ(IBROP) 70 加算器 80 セレクタ 90 置換命令発生回路 100 第1の分岐命令検出回路 105 第2の分岐命令検出回路 110 命令デコーダ 130 制御記憶 140 オペランド用アドレス加算器 150 オペランド用TLB 160 オペランド用バッファ記憶装置 170 演算実行部 180 汎用レジスタ 200 命令用アドレス加算器 210 命令用TLB 220 命令用バッファ記憶装置 10 instruction buffer register (IBR) 20 first instruction fetch shifter 30 first instruction register (IRP) 32 first ILC decoder 40 second instruction fetch shifter 50 second instruction register (IRS) 52 second ILC Decoder 60 Pointer (IBROP) 70 Adder 80 Selector 90 Replacement instruction generation circuit 100 First branch instruction detection circuit 105 Second branch instruction detection circuit 110 Instruction decoder 130 Control memory 140 Operand address adder 150 Operand TLB 160 operand Buffer storage device 170 operation execution unit 180 general-purpose register 200 instruction address adder 210 instruction TLB 220 instruction buffer storage device

───────────────────────────────────────────────────── フロントページの続き (72)発明者 尾島 和郎 神奈川県秦野市堀山下1番地 株式会社日 立製作所汎用コンピュータ事業部内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Kazuro Ojima 1 Horiyamashita, Hadano-shi, Kanagawa Pref., General Computer Division, Hiritsu Manufacturing Co., Ltd.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 パイプライン方式の情報処理装置におい
て、メモリから逐次読み出される命令列を一時的に保持
する命令バッファ手段と、前記命令バッファ手段から命
令を逐次取り出してパイプライン処理を起動する第1の
命令取り出し手段と、前記第1の命令取り出し手段によ
り取り出される命令の次の命令を前記命令バッファ手段
から逐次取り出す第2の命令取り出し手段と、前記第1
の命令取り出し手段により取り出される命令を格納する
第1の命令格納手段と、前記第2の命令取り出し手段に
より取り出される命令を格納する第2の命令格納手段
と、前記第1の命令格納手段に格納された命令と前記第
2の命令格納手段に格納された命令との組み合わせが予
め定められた命令の組み合せと一致する場合に、前記命
令の組み合せをそれらの命令と等価な複合命令に置換す
る置換命令発生手段と、前記第2の命令格納手段に格納
された命令が分岐命令であることを検出する分岐命令検
出手段とを備えたことを特徴とする情報処理装置。
1. In a pipeline type information processing apparatus, an instruction buffer means for temporarily holding an instruction sequence sequentially read from a memory, and a first instruction for sequentially fetching instructions from the instruction buffer means to start pipeline processing. Instruction fetching means, second instruction fetching means that sequentially fetches an instruction next to the instruction fetched by the first instruction fetching means from the instruction buffer means, and the first instruction fetching means.
First instruction storing means for storing the instruction fetched by the instruction fetching means, second instruction storing means for storing the instruction fetched by the second instruction fetching means, and the first instruction storing means When the combination of the executed instruction and the instruction stored in the second instruction storage unit matches a predetermined combination of instructions, the replacement for replacing the combination of instructions with a compound instruction equivalent to those instructions An information processing apparatus comprising: an instruction generating means; and a branch instruction detecting means for detecting that the instruction stored in the second instruction storing means is a branch instruction.
【請求項2】 前記置換命令発生手段が置換命令を発生
したとき、前記第1の命令取り出し手段は、前記第1の
命令格納手段に前記第2の命令格納手段に格納されてい
る命令の直後の命令を格納することを特徴とする請求項
1記載の情報処理装置。
2. When the replacement instruction generation means generates a replacement instruction, the first instruction fetch means immediately after the instruction stored in the first instruction storage means in the second instruction storage means. The information processing apparatus according to claim 1, wherein the information processing apparatus stores the instruction.
【請求項3】 前記置換命令発生手段が置換命令を発生
したとき、前記第2の命令格納手段に格納された命令の
処理が、前記第1の命令格納手段に格納された命令のパ
イプライン処理と並行して実行されることを特徴とする
請求項1または2記載の情報処理装置。
3. When the replacement instruction generation means generates a replacement instruction, the processing of the instruction stored in the second instruction storage means is pipeline processing of the instruction stored in the first instruction storage means. The information processing apparatus according to claim 1, wherein the information processing apparatus is executed in parallel with.
【請求項4】 前記分岐命令検出手段が分岐命令を検出
したとき、前記第2の命令格納手段に格納される分岐命
令の処理の少なくとも一部の処理が、前記第1の命令格
納手段に格納される命令のパイプライン処理と並行して
実行されることを特徴とする請求項1、2または3記載
の情報処理装置。
4. When the branch instruction detecting means detects a branch instruction, at least part of the processing of the branch instruction stored in the second instruction storing means is stored in the first instruction storing means. 4. The information processing apparatus according to claim 1, wherein the information processing apparatus is executed in parallel with pipeline processing of the executed instruction.
JP6045977A 1994-03-16 1994-03-16 Information processor Pending JPH07262007A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6045977A JPH07262007A (en) 1994-03-16 1994-03-16 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6045977A JPH07262007A (en) 1994-03-16 1994-03-16 Information processor

Publications (1)

Publication Number Publication Date
JPH07262007A true JPH07262007A (en) 1995-10-13

Family

ID=12734270

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6045977A Pending JPH07262007A (en) 1994-03-16 1994-03-16 Information processor

Country Status (1)

Country Link
JP (1) JPH07262007A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100265332B1 (en) * 1997-05-23 2000-09-15 김영환 Branch prediction method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100265332B1 (en) * 1997-05-23 2000-09-15 김영환 Branch prediction method

Similar Documents

Publication Publication Date Title
EP0996057B1 (en) Data processor with an instruction unit having a cache and a ROM
US6615333B1 (en) Data processing device, method of executing a program and method of compiling
EP1157329B1 (en) Methods and apparatus for branch prediction using hybrid history with index sharing
JPH0429093B2 (en)
KR100254008B1 (en) Data processor simultaneously executable two instruction
US7200738B2 (en) Reducing data hazards in pipelined processors to provide high processor utilization
EP1241567A2 (en) Method and apparatus for executing coprocessor instructions
US5542060A (en) Data processor including a decoding unit for decomposing a multifunctional data transfer instruction into a plurality of control codes
EP0094535B1 (en) Pipe-line data processing system
EP0742517B1 (en) A program translating apparatus and a processor which achieve high-speed execution of subroutine branch instructions
JPH03286332A (en) Digital data processor
JPH06266556A (en) Data processor
JP3708022B2 (en) Processor
JPH07262007A (en) Information processor
US6789185B1 (en) Instruction control apparatus and method using micro program
JP2000181707A (en) Instruction controller and its method
JP2591325B2 (en) Branch control device
JPH0679273B2 (en) Data processing device
JPH06131180A (en) Instruction processing system and instruction processor
JP3493110B2 (en) High-speed branch processing unit
JP2843844B2 (en) Parallel processing unit
JPS6411973B2 (en)
JPH0774992B2 (en) Data processing device
JPH0991139A (en) Information processor
JP3851235B2 (en) Branch prediction apparatus and branch prediction method

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19990615