JPH05341995A - Instruction control method in processor and processor - Google Patents

Instruction control method in processor and processor

Info

Publication number
JPH05341995A
JPH05341995A JP14537592A JP14537592A JPH05341995A JP H05341995 A JPH05341995 A JP H05341995A JP 14537592 A JP14537592 A JP 14537592A JP 14537592 A JP14537592 A JP 14537592A JP H05341995 A JPH05341995 A JP H05341995A
Authority
JP
Japan
Prior art keywords
instruction
stage
machine cycle
execution system
instruction execution
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.)
Withdrawn
Application number
JP14537592A
Other languages
Japanese (ja)
Inventor
Akihiro Yoshitake
昭博 吉竹
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP14537592A priority Critical patent/JPH05341995A/en
Publication of JPH05341995A publication Critical patent/JPH05341995A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the processing time of instruction sequence by executing a preceding plural machine cycle instruction and succeeding one machine cycle instruction simultaneously without completing the succeeding one machine cycle instruction prior to the preceding plural machine cycle instruction in an instruction control method for a processor which executes an instruction by applying pipeline processing. CONSTITUTION:When the instruction 3 (preceding four machine cycle instruction) and the instruction 4 (succeeding one machine cycle instruction) are executed simultaneously, the arithmetic operation of the instruction 4 is executed at an OE stage, then, the output latch of the OE stage is set in a negate state, and an OW stage for the instruction 4 is set in a waiting state by holding a computed result at the OE stage, and when a machine cycle where the instruction 4 can be completed matching to the completion of the instruction 3 arrives, a held computed result is written.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、いわゆるパイプライン
処理によって命令を実行するプロセッサにおける命令制
御方法、及び、パイプライン処理によって命令を実行す
るプロセッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an instruction control method in a processor that executes instructions by so-called pipeline processing, and a processor that executes instructions by pipeline processing.

【0002】[0002]

【従来の技術】近年、図11に命令実行の流れを示すよ
うに、パイプライン処理により2個の命令を同時に実行
して性能の向上を図るようにした、いわゆるスーパスカ
ラ方式を採用するプロセッサが実用化されるに至ってい
る。
2. Description of the Related Art In recent years, as shown in the flow of instruction execution in FIG. 11, a processor employing a so-called superscalar system has been put into practical use in which two instructions are simultaneously executed by pipeline processing to improve performance. It has been converted to.

【0003】図中、DC、AC、Mi、OE、OWはそ
れぞれパイプライン・ステージを表示しており、DCは
命令のデコードを行うステージ、ACはアドレスの計算
を行うステージ、Miはマイクロプログラムを読出すと
同時にオペランドのフェッチを行うステージ、OEは演
算を行うステージ、OWは演算結果の書込みを行うステ
ージであり、この例では、命令1と命令2、命令3と命
令4、命令5と命令6とがそれぞれ同時に実行されてい
る。
In the figure, DC, AC, Mi, OE, and OW represent pipeline stages, DC is a stage for decoding instructions, AC is a stage for calculating addresses, and Mi is a microprogram. In this example, instruction 1 and instruction 2, instruction 3 and instruction 4, instruction 5 and instruction 5 6 and 6 are being executed simultaneously.

【0004】[0004]

【発明が解決しようとする課題】かかるスーパスカラ方
式を採用する従来のプロセッサは、基本的には、各命令
が1マシンサイクルで実行されることを想定しており、
例えば、図12に示すように、1マシンサイクル命令で
ある命令1、2、4、5、6の中に、乗算命令や除算命
令等、複数マシンサイクル命令、例えば、4マシンサイ
クル命令である命令3が含まれているような場合には、
1マシンサイクル命令である命令1と命令2とは同時に
実行されるが、4マシンサイクル命令である命令3と1
マシンサイクル命令である命令4とは同時に実行され
ず、命令3は単独で実行され、1マシンサイクル命令で
ある命令4と命令5とが同時に実行されることになる。
A conventional processor adopting such a superscalar system basically assumes that each instruction is executed in one machine cycle.
For example, as shown in FIG. 12, in one machine cycle instruction 1, 2, 4, 5, 6, a multiple machine cycle instruction such as a multiplication instruction or a division instruction, for example, an instruction that is a four machine cycle instruction. If 3 is included,
Instructions 1 and 2 which are 1 machine cycle instructions are executed simultaneously, but instructions 3 and 1 which are 4 machine cycle instructions
The instruction 3 which is a machine cycle instruction is not executed at the same time, the instruction 3 is executed independently, and the instructions 4 and 5 which are one machine cycle instruction are executed at the same time.

【0005】なお、図12において、Mi1、Mi2、M
3、Mi4は、それぞれ、1回目、2回目、3回目、4
回目のMiステージ、OE1、OE2、OE3、OE4は、
それぞれ、1回目、2回目、3回目、4回目のOEステ
ージ、OW1、OW2、OW3、OW4は、それぞれ、1回
目、2回目、3回目、4回目のOWステージを意味して
いる。
Incidentally, in FIG. 12, Mi 1 , Mi 2 and M
i 3 and Mi 4 are the first, second, third , and fourth , respectively.
The second Mi stage, OE 1 , OE 2 , OE 3 , OE 4 ,
The 1st, 2nd, 3rd and 4th OE stages, OW 1 , OW 2 , OW 3 and OW 4 respectively mean the 1st, 2nd, 3rd and 4th OW stages. There is.

【0006】また、DCcはDCステージでのデコード
結果がキャンセルされたことを意味しており、ACcは
ACステージでのアドレス計算結果がキャンセルされた
ことを意味している。
DCc means that the decoding result at the DC stage has been canceled, and ACc means that the address calculation result at the AC stage has been canceled.

【0007】このように、スーパスカラ方式を採用する
従来のプロセッサにおいては、1マシンサイクル命令
は、2個同時に実行することができるが、先行する複数
のマシンサイクルで実行される複数マシンサイクル命令
と後続する1マシンサイクル命令とを同時に実行するこ
とはできず、その分、性能の向上が図られていないとい
う問題点があった。
As described above, in the conventional processor which employs the superscalar system, two machine cycle instructions can be executed simultaneously, but a plurality of machine cycle instructions executed in a plurality of preceding machine cycles and a succeeding machine cycle instruction. However, there is a problem in that the performance cannot be improved by that much because it cannot be executed simultaneously with the one machine cycle instruction.

【0008】なお、ここに、先行する複数マシンサイク
ル命令と後続する1マシンサイクル命令とを同時に実行
する場合、先行する複数マシンサイクル命令よりも後続
する1マシンサイクル命令が先に完了することは避けな
ければならない。
When the preceding plural machine cycle instructions and the succeeding one machine cycle instruction are executed simultaneously, it is avoided that the succeeding one machine cycle instruction precedes the preceding plural machine cycle instruction. There must be.

【0009】本発明は、かかる点に鑑み、先行する複数
マシンサイクル命令よりも後続する1マシンサイクル命
令を先に完了させることなく、先行する複数マシンサイ
クル命令と後続する1マシンサイクル命令とを同時に実
行し、命令列の処理時間の短縮化を図ることができるよ
うにした命令制御方法及びプロセッサを提供することを
目的とする。
In view of the above points, the present invention allows a preceding multiple machine cycle instruction and a succeeding one machine cycle instruction to be executed at the same time without completing the preceding one machine cycle instruction earlier than the preceding multiple machine cycle instruction. An object of the present invention is to provide an instruction control method and a processor that can be executed and shorten the processing time of an instruction sequence.

【0010】[0010]

【課題を解決するための手段】本発明による命令制御方
法は、先行する複数マシンサイクル命令と後続する1マ
シンサイクル命令とをそれぞれ第1の命令実行系と第2
の命令実行系とで同時に実行する場合、第2の命令実行
系の演算ステージで後続する1マシンサイクル命令につ
いての演算が実行された後、第2の命令実行系のOEス
テージの出力ラッチをネゲート状態にし、後続する1マ
シンサイクル命令についての演算結果を保持させて第2
の命令実行系のOWステージをウエイト(待機)状態と
し、その後、先行する複数マシンサイクル命令の完了に
合わせて後続する1マシンサイクル命令を完了させるこ
とができるマシンサイクルとなった時点で、第2の命令
実行系のOWステージのウエイト状態を解除し、保持さ
せている演算結果の書込みを行わせるように、命令の実
行を制御するというものである。
According to the instruction control method of the present invention, a preceding plural machine cycle instruction and a succeeding one machine cycle instruction are respectively included in a first instruction execution system and a second instruction execution system.
When the instruction execution system of the second instruction execution system is simultaneously executed, the output latch of the OE stage of the second instruction execution system is negated after the operation of the subsequent one machine cycle instruction is executed in the operation stage of the second instruction execution system. State and hold the operation result for the subsequent one machine cycle instruction
When the machine cycle in which the OW stage of the instruction execution system is placed in a wait state (waiting state) and then the succeeding one machine cycle instruction can be completed in synchronization with the completion of the preceding plurality of machine cycle instructions, The execution of instructions is controlled so that the wait state of the OW stage of the instruction execution system is released and the held operation result is written.

【0011】本発明によるプロセッサは、本発明による
命令制御方法を実行できるようにしたプロセッサであっ
て、少なくとも、第1の命令実行系と第2の命令実行系
とを設けると共に、先行する複数マシンサイクル命令と
後続する1マシンサイクル命令とをそれぞれ第1の命令
実行系と第2の命令実行系とで同時に実行する場合、第
2の命令実行系のOEステージで後続する1マシンサイ
クル命令についての演算が実行された後、第2の命令実
行系のOEステージの出力ラッチをネゲート状態にし、
後続する1マシンサイクル命令についての演算結果を保
持させて第2の命令実行系のOWステージをウエイト状
態とし、その後、先行する複数マシンサイクル命令の完
了に合わせて前記後続する1マシンサイクル命令を完了
させることができるマシンサイクルとなった時点で、第
2の命令実行系のOWステージのウエイト状態を解除
し、保持させている演算結果の書込みを行わせるよう
に、命令の実行を制御する命令制御手段を設けて構成さ
れる。
A processor according to the present invention is a processor capable of executing the instruction control method according to the present invention, wherein at least a first instruction execution system and a second instruction execution system are provided and a plurality of preceding machines are provided. When the cycle instruction and the subsequent 1-machine cycle instruction are simultaneously executed in the first instruction execution system and the second instruction execution system, respectively, the 1-machine cycle instruction subsequent to the OE stage of the second instruction execution system After the operation is executed, the output latch of the OE stage of the second instruction execution system is negated,
The operation result of the succeeding one machine cycle instruction is held and the OW stage of the second instruction execution system is set to the wait state, and then the succeeding one machine cycle instruction is completed at the completion of the preceding plural machine cycle instructions. Instruction control for controlling the execution of an instruction so that the wait state of the OW stage of the second instruction execution system is released and the held operation result is written when the machine cycle becomes possible. It is configured by providing means.

【0012】[0012]

【作用】本発明による命令制御方法においては、先行す
る複数マシンサイクル命令と同時に実行すべき後続する
1マシンサイクル命令を実行する第2の命令実行系のO
Wステージにウエイト状態を設定することにより、先行
する複数のマシンサイクル命令よりも後続する1マシン
サイクル命令が先に完了することなく、先行する複数マ
シンサイクル命令と後続する1マシンサイクル命令とを
同時に実行できるようにしており、また、本発明による
命令制御方法においては、前述の命令制御手段を設ける
ことにより、本発明による命令制御方法を実施すること
ができるようにしている。
In the instruction control method according to the present invention, the O of the second instruction execution system for executing the succeeding one machine cycle instruction to be executed simultaneously with the preceding plural machine cycle instructions.
By setting the wait state in the W stage, the preceding one machine cycle instruction and the following one machine cycle instruction can be executed simultaneously without the following one machine cycle instruction being completed before the preceding plurality of machine cycle instructions. The instruction control method according to the present invention can be executed by providing the above-mentioned instruction control means.

【0013】[0013]

【実施例】以下、図1〜図10を参照して、本発明によ
るプロセッサの一実施例につき、本発明による命令制御
方法の一実施例の内容を含め、2命令を同時に実行する
ようにした場合を例にして説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Referring to FIGS. 1 to 10, two instructions are executed simultaneously in one embodiment of a processor according to the present invention, including the contents of one embodiment of an instruction control method according to the present invention. A case will be described as an example.

【0014】図1は本発明によるプロセッサの一実施例
の要部を示すブロック図であり、1はプロセッサ本体、
2は命令実行の制御を行う命令制御部、3は命令の実行
を行う命令実行部、4はメモリへのアクセス等を制御す
るメモリ制御部、5は外部との間の情報の送受等を制御
するバス制御部である。
FIG. 1 is a block diagram showing a main part of an embodiment of a processor according to the present invention.
Reference numeral 2 is an instruction control unit that controls instruction execution, 3 is an instruction execution unit that executes instructions, 4 is a memory control unit that controls access to memory, etc., 5 is control of transmission and reception of information to and from the outside It is a bus control unit.

【0015】ここに、命令制御部2において、6はメモ
リから取出した命令を格納するための命令キュー(命令
バッファ)、7、8は命令キュー6に格納されている命
令をデコードする命令デコーダである。
In the instruction control unit 2, 6 is an instruction queue (instruction buffer) for storing the instructions fetched from the memory, and 7 and 8 are instruction decoders for decoding the instructions stored in the instruction queue 6. is there.

【0016】また、9、10はデコードされた命令を分
解して実行するためのマイクロプログラムを格納するマ
イクロプログラムユニット、11はパイプライン処理の
ための制御を行うパイプライン制御部である。
Reference numerals 9 and 10 denote microprogram units for storing microprograms for decomposing and executing the decoded instructions, and 11 denotes a pipeline control unit for controlling pipeline processing.

【0017】また、命令実行部3において、12は命令
のアドレス部の内容に基づいてオペランドアドレスを計
算するアドレス計算部、13はマイクロプログラムユニ
ット9、10から出力されるマイクロプログラムに従っ
て必要な演算を行う演算部、14はアドレス計算部12
及び演算部13に汎用レジスタとして使用されるレジス
タファイルである。
In the instruction execution section 3, 12 is an address calculation section for calculating an operand address based on the contents of the address section of the instruction, and 13 is a necessary operation according to the microprogram output from the microprogram units 9 and 10. The calculation unit 14 performs the address calculation unit 12
And a register file used as a general-purpose register in the arithmetic unit 13.

【0018】また、メモリ制御部4において、15はメ
モリに格納されている命令に対するアクセスを制御する
命令アクセス制御部、16は命令の実行に必要なデータ
を格納するオペランドへのアクセスを制御するオペラン
ドアクセス制御部である。
In the memory control unit 4, 15 is an instruction access control unit for controlling access to an instruction stored in the memory, and 16 is an operand for controlling access to an operand storing data necessary for executing the instruction. It is an access control unit.

【0019】また、バス制御部5において、17はアド
レスバスへのアドレスの出力を制御するアドレス制御
部、18はバスを監視し、その使用を制御するバス監視
制御部、19はデータの送受を行うデータ送受部であ
る。
In the bus control unit 5, 17 is an address control unit for controlling the output of an address to the address bus, 18 is a bus monitoring control unit for monitoring the bus and controlling its use, and 19 is for sending and receiving data. This is a data transmission / reception unit.

【0020】また、図2は命令制御部2及び命令実行部
3をより詳しく示す図であり、命令制御部2において、
20、21は汎用レジスタに対する命令のリード先、ラ
イト先をパイプラインのステージにわたって保持してい
るタグ格納部である。
FIG. 2 is a diagram showing the instruction control unit 2 and the instruction execution unit 3 in more detail. In the instruction control unit 2,
Reference numerals 20 and 21 denote tag storage units that hold instruction read and write destinations for general-purpose registers over pipeline stages.

【0021】また、9A、10Aはマイクロプログラム
を格納するマイクロプログラム格納部、9B、10Bは
ネクストアドレスを保持しているネクストアドレス格納
部である。
Further, 9A and 10A are microprogram storage units for storing microprograms, and 9B and 10B are next address storage units for holding next addresses.

【0022】また、24は同時に実行する命令のうち、
先行する命令を実行する命令実行系についてパイプライ
ン制御を行う第1パイプライン制御部であり、命令デコ
ーダ7や、マイクロプログラムユニット9等は、先行す
る命令を実行する命令実行系に含まれる。
Further, among the instructions to be simultaneously executed, 24 is
This is a first pipeline control unit that performs pipeline control on an instruction execution system that executes a preceding instruction, and the instruction decoder 7, the micro program unit 9, and the like are included in the instruction execution system that executes a preceding instruction.

【0023】また、25は同時に実行する命令のうち、
後続する命令を実行する命令実行系についてパイプライ
ン制御を行う第2パイプライン制御部であり、命令デコ
ーダ8や、マイクロプログラムユニット10等は、後続
する命令を実行する命令実行系に含まれる。
Further, 25 is an instruction to be executed simultaneously.
This is a second pipeline control unit that performs pipeline control on an instruction execution system that executes a subsequent instruction, and the instruction decoder 8, the microprogram unit 10, and the like are included in the instruction execution system that executes the subsequent instruction.

【0024】また、命令実行部3において、26、27
は命令のアドレス部に指定されている定数(ディスプレ
ースメント)を切り出して発生する定数発生部、28、
29はオペランドアドレスの計算に使用されるアドレス
加算器(AU)である。
In the instruction executing section 3, 26, 27
Is a constant generation part generated by cutting out a constant (displacement) specified in the address part of the instruction, 28,
Reference numeral 29 is an address adder (AU) used for calculating an operand address.

【0025】また、30、31は命令におけるアドレス
方式がイミディエートアドレス方式の場合にイミディエ
ート(即値)を切り出して発生するイミディエート発生
部、32、33は命令の実行に必要な演算を行うALU
(算術論理演算ユニット)、34、35はSFT(シフ
タ)である。
Further, reference numerals 30 and 31 are immediate generation sections which are generated by cutting out immediates (immediate values) when the address system in the instruction is the immediate address system, and 32 and 33 are ALUs which perform operations necessary for executing the instruction.
(Arithmetic logical operation unit), 34 and 35 are SFT (shifter).

【0026】また、図3は本実施例で使用される命令の
形式を示しており、図中、OPは命令コード部、Sはオ
ペランドサイズ指定部、Rはレジスタ指定部、#1は即
値、dispはディスプレースメント部、nは0を含む
正の整数であり、16×nは拡張部が16ビット単位で
可変であることを示している。
FIG. 3 shows the format of the instruction used in this embodiment. In the figure, OP is an instruction code part, S is an operand size specification part, R is a register specification part, # 1 is an immediate value, disp is a displacement part, n is a positive integer including 0, and 16 × n indicates that the expansion part is variable in 16-bit units.

【0027】そこで、本実施例においては、命令デコー
ダ7は、図4に示すように構成されており、命令デコー
ダ8についても同様である。図中、36、37は命令レ
ジスタ、38〜47はラッチである。
Therefore, in this embodiment, the instruction decoder 7 is constructed as shown in FIG. 4, and the instruction decoder 8 is also the same. In the figure, 36 and 37 are instruction registers, and 38 to 47 are latches.

【0028】また、48は命令の先頭の命令コードをデ
コードする第1命令デコーダ、49は命令が2オペラン
ド命令や拡張オペランド命令等(図3参照)のように2
個の命令コードを含んでいる場合に、2番目の命令コー
ドをデコードする第2命令デコーダである。
Reference numeral 48 is a first instruction decoder which decodes the instruction code at the beginning of the instruction, and 49 is an instruction decoder such as a two-operand instruction or an extended operand instruction (see FIG. 3).
This is a second instruction decoder that decodes the second instruction code when it includes this instruction code.

【0029】また、50はセレクタであり、このセレク
タ50からはマイクロアドレス、タグ、マルチサイクル
指示信号が出力される。なお、マイクロアドレスはマイ
クロプログラムユニット9に供給され、タグはタグ格納
部20に格納され、マルチサイクル指示信号は第1パイ
プライン制御部24に供給される。
Reference numeral 50 is a selector, and the selector 50 outputs a micro address, a tag, and a multi-cycle instruction signal. The micro address is supplied to the micro program unit 9, the tag is stored in the tag storage unit 20, and the multi-cycle instruction signal is supplied to the first pipeline control unit 24.

【0030】また、51は命令に含まれているアドレッ
シング情報をデコードするアドレッシングデコーダ、5
2は一命令を個々のデコード可能な長さに判定し、次々
とデコードしていく次ステージ遷移要求デコーダ、53
は付加モードをデコードする付加モードデコーダであ
る。
Further, 51 is an addressing decoder for decoding addressing information contained in the instruction, 5
Reference numeral 2 designates a next stage transition request decoder which judges one instruction into individual decodable lengths and successively decodes it.
Is an additional mode decoder for decoding the additional mode.

【0031】また、54はアドレッシングデコーダ51
及び付加モードデコーダ53の出力に基づいてラッチ3
8〜47、セレクタ50、次ステージ遷移要求デコーダ
52、付加モードデコーダ53等を制御するデコードシ
ーケンサである。
Further, 54 is an addressing decoder 51.
And the latch 3 based on the output of the additional mode decoder 53.
8 to 47, a selector 50, a next stage transition request decoder 52, an additional mode decoder 53, and the like.

【0032】また、図5は第2パイプライン制御部25
を示す図であり、図中、55はDCステージ制御部、5
6はACステージ制御部、57はMiステージ制御部、
58はOEステージ制御部、59はOWステージ制御
部、60〜69はOR回路、70〜75はAND回路で
ある。
Further, FIG. 5 shows the second pipeline controller 25.
55 is a diagram showing a DC stage control unit 5
6 is an AC stage control unit, 57 is a Mi stage control unit,
Reference numeral 58 is an OE stage control unit, 59 is an OW stage control unit, 60 to 69 are OR circuits, and 70 to 75 are AND circuits.

【0033】また、DCW要因、ACW要因、MiW要
因、OEW要因は、それぞれ、DCステージについての
ウエイト要因、ACステージについてのウエイト要因、
Miステージについてのウエイト要因、OEステージに
ついてのウエイト要因を意味している。
The DCW factor, ACW factor, MiW factor, and OEW factor are the weight factor for the DC stage, the weight factor for the AC stage, and the weight factor for the AC stage, respectively.
It means the weight factor for the Mi stage and the weight factor for the OE stage.

【0034】また、DCR要因、ACR要因、MiR要
因、OER要因は、それぞれ、DCステージについての
リトライ(再実行)要因、ACステージについてのリト
ライ要因、Miステージについてのリトライ要因、OE
ステージについてのリトライ要因の意味している。
The DCR factor, ACR factor, MiR factor, and OER factor are the retry (re-execution) factor for the DC stage, the retry factor for the AC stage, the retry factor for the Mi stage, and the OE factor, respectively.
It means the retry factor for the stage.

【0035】また、DCLE、ACLE、MiLE、O
ELEは、それぞれ、DCステージの出力ラッチを制御
する信号、ACステージの出力ラッチを制御する信号、
Miステージの出力ラッチを制御する信号、OEステー
ジの出力ラッチを制御する信号である。
In addition, DCLE, ACLE, MiLE, O
ELE is a signal for controlling the output latch of the DC stage, a signal for controlling the output latch of the AC stage,
A signal that controls the output latch of the Mi stage and a signal that controls the output latch of the OE stage.

【0036】また、DCRO、ACRO、MiRO、O
EROは、それぞれ、DCステージがリトライサイクル
であるか否かを示す信号、ACステージがリトライサイ
クルであるか否かを示す信号、Miステージがリトライ
サイクルであるか否かを示す信号、OEステージがリト
ライサイクルであるか否かを示す信号である。
In addition, DCRO, ACRO, MiRO, O
ERO is a signal indicating whether the DC stage is a retry cycle, a signal indicating whether the AC stage is a retry cycle, a signal indicating whether the Mi stage is a retry cycle, and an OE stage, respectively. This is a signal indicating whether or not it is a retry cycle.

【0037】なお、76は第1パイプライン制御部24
内に設けている書込みステージ待機信号(以下、OWW
AIT信号という)生成回路を示しており、第1パイプ
ライン制御部24は、OWWAIT信号生成回路76を
設けている点及び後述するOWステージ制御部内に設け
られるOWステージ実行指示信号(以下、OWGO信号
という)生成回路の構成を異にする点を除き、第2パイ
プライン制御部25と同様に構成されている。
Reference numeral 76 is the first pipeline controller 24.
A write stage standby signal (hereinafter referred to as OWW
A first generation pipeline control unit 24 is provided with an OWWAIT signal generation circuit 76 and an OW stage execution instruction signal (hereinafter referred to as OWGO signal) provided in an OW stage control unit described later. The second pipeline control unit 25 has the same configuration except that the configuration of the generation circuit is different.

【0038】ここに、DCステージ制御部55、ACス
テージ制御部56、Miステージ制御部57、OEステ
ージ制御部58、OWステージ制御部59は、例えば、
図6に示すように構成される。
Here, the DC stage control unit 55, the AC stage control unit 56, the Mi stage control unit 57, the OE stage control unit 58, and the OW stage control unit 59 are, for example,
It is configured as shown in FIG.

【0039】図中、77〜82はラッチ、83〜85は
OR回路、86、87はAND回路、88はL能動入力
端子を有するAND回路、89はインバータであり、ま
た、φ0、φ1、φ2は4相クロックのうちの3個のクロ
ック、Vi、VOはステージが有効であるか否かを示す
バリッド信号である。
In the figure, 77 to 82 are latches, 83 to 85 are OR circuits, 86 and 87 are AND circuits, 88 is an AND circuit having an L active input terminal, 89 is an inverter, and φ 0 and φ 1 are also provided. , Φ 2 are three of the four-phase clocks, and Vi and VO are valid signals indicating whether the stage is valid or not.

【0040】また、第1パイプライン制御部24内に設
けられるOWWAIT信号生成回路76は、図7に示す
ように構成される。図中、90〜94はDフリップフロ
ップ、95、96はAND回路、97はOR回路、98
はインバータである。
The OWWAIT signal generating circuit 76 provided in the first pipeline controller 24 is constructed as shown in FIG. In the figure, 90 to 94 are D flip-flops, 95 and 96 are AND circuits, 97 is an OR circuit, and 98.
Is an inverter.

【0041】また、第2パイプライン制御部25のOE
ステージ制御部58内には、例えば、図8に示すような
OWGO信号生成回路が設けられる。図中、99、10
0はラッチ、101はAND回路、102、103はL
能動入力端子を有するAND回路、104はOR回路で
ある。
The OE of the second pipeline controller 25
In the stage control unit 58, for example, an OWGO signal generation circuit as shown in FIG. 8 is provided. In the figure, 99, 10
0 is a latch, 101 is an AND circuit, 102 and 103 are L
An AND circuit 104 having an active input terminal is an OR circuit.

【0042】図9は本実施例の動作を説明するための図
であり、1マシンサイクル命令である命令1、2、4、
5、6と4マシンサイクル命令である命令3とが本実施
例により処理される流れを示している。
FIG. 9 is a diagram for explaining the operation of this embodiment. Instructions 1, 2, 4, which are one machine cycle instruction.
5 and 6 and the instruction 3 which is a four machine cycle instruction are shown in the flow processed by this embodiment.

【0043】なお、本実施例では、命令1、3、5は、
第1パイプライン制御部24により制御される命令実行
系、即ち、同時に実行すべき命令のうち、先行する命令
を実行する命令実行系により実行され、命令2、4、6
は、第2パイプライン制御部25により制御される命令
実行系、即ち、同時に実行すべき命令のうち、後続する
命令を実行する命令実行系により実行される。
In this embodiment, the instructions 1, 3, 5 are
Instructions 2, 4, 6, which are executed by an instruction execution system controlled by the first pipeline control unit 24, that is, an instruction execution system that executes a preceding instruction among instructions to be executed simultaneously
Is executed by the instruction execution system controlled by the second pipeline control unit 25, that is, the instruction execution system that executes the subsequent instruction among the instructions to be executed simultaneously.

【0044】ここに、命令1及び命令2は、図9に示す
ように、従来の場合と同様にして、DC→AC→Mi→
OE→OWの順に各ステージを実行することにより同時
に処理される(図12参照)。
Here, as shown in FIG. 9, the instruction 1 and the instruction 2 are DC → AC → Mi → in the same manner as in the conventional case.
Processing is performed simultaneously by executing each stage in the order of OE → OW (see FIG. 12).

【0045】また、命令3も、図9に示すように、従来
の場合と同様にして、DC→AC→Mi1→Mi2、OE
1→Mi3、OE2、OW1→Mi4、OE3、OW2→O
4、OW3→OW4の順に各ステージが実行され、処理
される(図12参照)。
As shown in FIG. 9, the instruction 3 is DC → AC → Mi 1 → Mi 2 , OE, as in the conventional case.
1 → Mi 3 , OE 2 , OW 1 → Mi 4 , OE 3 , OW 2 → O
The stages are executed and processed in the order of E 4 , OW 3 → OW 4 (see FIG. 12).

【0046】ここに、図10は、命令3と命令4につい
て、パイプライン処理の流れをより詳しく示す図であ
り、命令3については、DCout(デコーダ7からの出
力)、Miアドレス信号(マイクロプログラムユニット
9にアクセスするアドレス)、Miout(マイクロプロ
グラムユニット9からの出力)、第1OW支持信号(O
1ステージを指示する信号)、Mi終了指示信号(M
iステージの終了を指示する信号)、マルチサイクル指
示信号、OWWAIT信号を示している。
FIG. 10 is a diagram showing in more detail the flow of pipeline processing for instructions 3 and 4, for instruction 3 DCout (output from decoder 7), Mi address signal (microprogram). Address for accessing unit 9), Miout (output from microprogram unit 9), first OW support signal (O
W 1 stage instruction signal), Mi end instruction signal (M
signal indicating the end of the i stage), a multi-cycle instruction signal, and an OWWAIT signal.

【0047】また、命令4については、OELE信号
(OEステージの出力ラッチを制御する信号)、OEV
O信号(OEステージが有効であるか否かを示す信
号)、OWVi信号(OWステージを動作させるか否か
を指示する信号)、OWVO信号(OWステージが有効
であるか否かを示す信号)、OWGO信号を示してい
る。なお、105は汎用レジスタである。
As for the instruction 4, the OELE signal (signal for controlling the output latch of the OE stage), OEV
O signal (signal indicating whether the OE stage is valid), OWVi signal (signal indicating whether to operate the OW stage), OWVO signal (signal indicating whether the OW stage is valid) , OWGO signals. Note that 105 is a general-purpose register.

【0048】ここに、本実施例においては、命令3につ
いて、DCステージでデコードが行われると、命令3は
4マシンサイクル命令であることから、マルチサイクル
指示信号がアサートされ、これが第1パイプライン制御
部24のOWWAIT信号生成回路76に供給される。
Here, in this embodiment, when the instruction 3 is decoded in the DC stage, the instruction 3 is a four-machine cycle instruction, so the multi-cycle instruction signal is asserted, and this is the first pipeline. The signal is supplied to the OWWAIT signal generation circuit 76 of the control unit 24.

【0049】また、命令3について、Mi1ステージが
終了すると、その出力に基づいて、OW1ステージ時、
第1OW指示信号が出力され、これがOWWAIT信号
生成回路76に供給される。
For the instruction 3, when the Mi 1 stage is completed, based on the output thereof, at the OW 1 stage,
The first OW instruction signal is output and supplied to the OWWAIT signal generation circuit 76.

【0050】この結果、OWWAIT信号生成回路76
からOWWAIT信号が出力され、これが命令4のパイ
プライン処理を制御する第2パイプライン制御部25の
OEステージ制御部58及びOWステージ制御部59に
供給される。
As a result, the OWWAIT signal generating circuit 76
Outputs an OWWAIT signal, which is supplied to the OE stage controller 58 and the OW stage controller 59 of the second pipeline controller 25 that controls the pipeline processing of the instruction 4.

【0051】ここに、命令4は、命令3と同時にDCス
テージを実行し、OEステージまでは連続して各ステー
ジが実行されるが、前述のように、OWWAIT信号が
第2パイプライン制御部25のOEステージ制御部58
及びOWステージ制御部59に供給されることから、第
2パイプライン制御部25のOEステージ制御部58
は、OELE信号をLレベルにし、命令4の演算を実行
したOEステージの出力ラッチをネゲートにし、ALU
33による演算結果を保持させて命令4についてのOW
ステージをウエイト状態とさせる。
Here, the instruction 4 executes the DC stage at the same time as the instruction 3, and the respective stages are continuously executed up to the OE stage. As described above, the OWWAIT signal indicates that the second pipeline controller 25 OE stage controller 58
And the OW stage control unit 59, the OE stage control unit 58 of the second pipeline control unit 25.
Sets the OELE signal to the L level, negates the output latch of the OE stage that executed the operation of instruction 4, and
OW about instruction 4 by holding the operation result by 33
Put the stage in a wait state.

【0052】その後、命令3について、Miステージが
Mi4ステージになると、Mi終了指示信号が出力さ
れ、これに対応して、Mi4ステージの終了に合わせて
マルチサイクル指示信号のアサートが取り止められると
共に、その1マシンサイクル後に、OWWAIT信号の
アサートも取り止められる。
After that, for the instruction 3, when the Mi stage becomes the Mi 4 stage, the Mi end instruction signal is output, and in response to this, the assertion of the multi-cycle instruction signal is canceled at the end of the Mi 4 stage. , One machine cycle later, the assertion of the OWWAIT signal is also canceled.

【0053】これに対応して、第2パイプライン制御部
25のOEステージ制御部58は、OELE信号をHレ
ベルにし、命令4について演算を実行したOEステージ
の出力ラッチのネゲート状態を解除する。
In response to this, the OE stage control unit 58 of the second pipeline control unit 25 raises the OELE signal to the H level and releases the negated state of the output latch of the OE stage which has executed the operation for the instruction 4.

【0054】また、OWステージ制御部59内のOWG
O生成回路は、OWGO信号を生成し、命令4について
のOWステージのウエイト状態を解除し、保持されてい
た命令4についての演算結果を汎用レジスタ105に書
き込ませる。
Further, the OWG in the OW stage controller 59
The O generation circuit generates an OWGO signal, releases the wait state of the OW stage for the instruction 4, and causes the held operation result of the instruction 4 to be written in the general-purpose register 105.

【0055】このように、本実施例では、先行する4マ
シンサイクル命令である命令3と、後続する1マシンサ
イクル命令である命令4とを同時に実行する場合、命令
4を実行する命令実行系のOEステージで命令4につい
ての演算が実行された後、このOEステージの出力ラッ
チをネゲート状態にし、命令4についての演算結果を保
持させて命令4についてのOWステージをウエイト状態
にし、命令3の完了に合わせて命令4を完了させること
ができるマシンサイクルとなった時点で、命令4につい
てのOWステージのウエイト状態を解除し、保持させて
いる演算結果を書き込ませるようにして、先行する命令
3よりも後続する命令4を先に完了させることなく、命
令3と命令4とを同時に実行できるようにしている。
As described above, in this embodiment, when the preceding four machine cycle instruction, the instruction 3 and the subsequent one machine cycle instruction, the instruction 4, are executed simultaneously, the instruction execution system for executing the instruction 4 is executed. After the operation of the instruction 4 is executed in the OE stage, the output latch of the OE stage is negated, the operation result of the instruction 4 is held and the OW stage of the instruction 4 is put in the wait state, and the completion of the instruction 3 At the time when the machine cycle in which the instruction 4 can be completed in accordance with the above, the wait state of the OW stage for the instruction 4 is released and the operation result held therein is written, Also, the instruction 3 and the instruction 4 can be simultaneously executed without completing the succeeding instruction 4 first.

【0056】なお、命令5、6は、命令3について出力
されたMi終了指示信号に対応してDCステージが開始
され、DC→AC→Mi→OE→OWの順に各ステージ
が同時に実行され、処理される。
In the instructions 5 and 6, the DC stage is started in response to the Mi end instruction signal output for the instruction 3, and the stages are simultaneously executed in the order of DC → AC → Mi → OE → OW, and processing is performed. To be done.

【0057】[0057]

【発明の効果】以上のように、本発明による命令制御方
法及びプロセッサによれば、先行する複数マシンサイク
ル命令よりも後続する1マシンサイクル命令を先に完了
させることなく、先行する複数マシンサイクル命令と後
続する1マシンサイクル命令とを同時に実行することが
でき、命令列の処理時間の短縮化を図ることができる。
As described above, according to the instruction control method and the processor of the present invention, the preceding multiple machine cycle instruction can be completed without completing the succeeding one machine cycle instruction earlier than the preceding multiple machine cycle instruction. And the subsequent one machine cycle instruction can be executed at the same time, and the processing time of the instruction sequence can be shortened.

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

【図1】本発明の一実施例の要部を示す図である。FIG. 1 is a diagram showing a main part of an embodiment of the present invention.

【図2】本発明の一実施例を構成する命令制御部及び命
令実行部をより詳しく示す図である。
FIG. 2 is a diagram showing in more detail an instruction control unit and an instruction execution unit that form an embodiment of the present invention.

【図3】本発明の一実施例で使用される命令の形式を示
す図である。
FIG. 3 is a diagram showing a format of an instruction used in an embodiment of the present invention.

【図4】本発明の一実施例を構成する命令デコーダを示
す図である。
FIG. 4 is a diagram showing an instruction decoder which constitutes an embodiment of the present invention.

【図5】本発明の一実施例を構成する第2パイプライン
制御部を示す図である。
FIG. 5 is a diagram showing a second pipeline control unit that constitutes an embodiment of the present invention.

【図6】第2パイプライン制御部を構成するパイプライ
ン・ステージ制御部を示す図である。
FIG. 6 is a diagram showing a pipeline stage control unit that constitutes a second pipeline control unit.

【図7】第1パイプライン制御部が設けるOWWAIT
信号生成回路を示す図である。
FIG. 7 is an OWWAIT provided by the first pipeline control unit.
It is a figure which shows a signal generation circuit.

【図8】第2パイプライン制御部のOWステージ制御部
に設けられるOWGO信号生成回路を示す図である。
FIG. 8 is a diagram showing an OWGO signal generation circuit provided in an OW stage control unit of a second pipeline control unit.

【図9】本発明の一実施例の動作を説明するための図で
ある。
FIG. 9 is a diagram for explaining the operation of the embodiment of the present invention.

【図10】本発明の一実施例の動作を説明するための図
である。
FIG. 10 is a diagram for explaining the operation of the embodiment of the present invention.

【図11】パイプライン処理により2個の命令を同時に
実行する場合の流れを示す図である。
FIG. 11 is a diagram showing a flow when two instructions are simultaneously executed by pipeline processing.

【図12】スーパスカラ方式を採用する従来のプロセッ
サが有する問題点を説明するための図である。
FIG. 12 is a diagram for explaining a problem that a conventional processor adopting a superscalar system has.

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

1 プロセッサ本体 2 命令制御部 3 命令実行部 4 メモリ制御部 5 バス制御部 1 processor body 2 instruction control unit 3 instruction execution unit 4 memory control unit 5 bus control unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】パイプライン処理によって命令を実行する
プロセッサにおける命令制御方法であって、先行する複
数マシンサイクル命令と後続する1マシンサイクル命令
とをそれぞれ第1の命令実行系と第2の命令実行系とで
同時に実行する場合、前記第2の命令実行系の演算ステ
ージで前記後続する1マシンサイクル命令についての演
算が実行された後、前記第2の命令実行系の演算ステー
ジの出力ラッチをネゲート状態にし、前記後続する1マ
シンサイクル命令についての演算結果を保持させて前記
第2の命令実行系の演算結果書込みステージを待機状態
とし、その後、前記先行する複数マシンサイクル命令の
完了に合わせて前記後続する1マシンサイクル命令を完
了させることができるマシンサイクルとなった時点で、
前記第2の命令実行系の演算結果書込みステージの待機
状態を解除し、前記保持させている演算結果の書込みを
行わせるように、命令の実行を制御することを特徴とす
る命令制御方法。
1. A method of controlling instructions in a processor for executing instructions by pipeline processing, comprising a first instruction execution system and a second instruction execution for a preceding plural machine cycle instruction and a succeeding one machine cycle instruction, respectively. System, the output latch of the second operation stage of the second instruction execution system is negated after the operation of the subsequent one machine cycle instruction is executed in the second operation stage of the second instruction execution system. State, hold the operation result for the subsequent one machine cycle instruction, and set the operation result writing stage of the second instruction execution system in the standby state, and thereafter, in accordance with the completion of the preceding plurality of machine cycle instructions. When it becomes a machine cycle that can complete the following one machine cycle instruction,
An instruction control method, comprising: controlling the execution of an instruction so that the standby state of the operation result writing stage of the second instruction execution system is released and the held operation result is written.
【請求項2】パイプライン処理によって命令を実行する
プロセッサであって、少なくとも、第1の命令実行系と
第2の命令実行系とを有すると共に、先行する複数マシ
ンサイクル命令と後続する1マシンサイクル命令とをそ
れぞれ前記第1の命令実行系と前記第2の命令実行系と
で同時に実行する場合、前記第2の命令実行系の演算ス
テージで前記後続する1マシンサイクル命令についての
演算が実行された後、前記第2の命令実行系の演算ステ
ージの出力ラッチをネゲート状態にし、前記後続する1
マシンサイクルについての演算結果を保持させて前記第
2の命令実行系の演算結果書込みステージを待機状態と
し、その後、前記先行する複数マシンサイクル命令の完
了に合わせて前記後続する1マシンサイクル命令を完了
させることができるマシンサイクルになった時点で、前
記第2の命令実行系の演算結果書込みステージの待機状
態を解除し、前記保持させている演算結果の書込みを行
わせるように、命令の実行を制御する命令制御手段を有
していることを特徴とするプロセッサ。
2. A processor for executing instructions by pipeline processing, which has at least a first instruction execution system and a second instruction execution system, and has a preceding multiple machine cycle instruction and a subsequent one machine cycle. When an instruction and a second instruction execution system are simultaneously executed, respectively, an instruction is executed in the operation stage of the second instruction execution system for the subsequent one machine cycle instruction. After that, the output latch of the operation stage of the second instruction execution system is negated, and the subsequent 1
The operation result write stage of the second instruction execution system is set to a standby state by holding the operation result of the machine cycle, and then the succeeding one machine cycle instruction is completed in synchronization with the completion of the preceding plurality of machine cycle instructions. When it becomes a machine cycle that can be executed, the execution of the instruction is executed so that the waiting state of the operation result writing stage of the second instruction execution system is released and the held operation result is written. A processor having instruction control means for controlling.
【請求項3】前記命令制御手段は、前記第1の命令実行
系から出力される、マルチサイクルを指示するマルチサ
イクル指示信号と、第1演算結果書込みステージを指示
する第1演算結果書込みステージ指示信号と、マイクロ
プログラム読出しステージの終了を指示するマイクロプ
ログラム読出しステージ終了指示信号とから所定の制御
信号を生成し、該所定の制御信号を前記第2の命令実行
系のパイプライン制御部の演算ステージ制御部及び演算
結果書込みステージ制御部に供給することにより、前記
第2の命令実行系の演算ステージで前記後続する1マシ
ンサイクル命令についての演算が実行された後、前記第
2の命令実行系の演算ステージの出力ラッチをネゲート
状態にし、前記後続する1マシンサイクル命令について
の演算結果を保持させて前記第2の命令実行系の演算結
果書込みステージを待機状態とし、その後、前記先行す
る複数マシンサイクル命令の完了に合わせて前記後続す
る1マシンサイクル命令を完了させることができるマシ
ンサイクルとなった時点で、前記第2の命令実行系の演
算結果書込みステージの待機状態を解除し、前記保持さ
せている演算結果の書込みを行わせるように、命令を制
御することを特徴とする請求項2記載のプロセッサ。
3. The instruction control means outputs a multi-cycle instruction signal for instructing multi-cycle output from the first instruction execution system and a first operation result write stage instruction for instructing a first operation result write stage. A predetermined control signal is generated from the signal and a micro program read stage end instruction signal for instructing the end of the micro program read stage, and the predetermined control signal is output to the operation stage of the pipeline control unit of the second instruction execution system. By supplying to the control unit and the operation result writing stage control unit, after the operation for the subsequent one machine cycle instruction is executed in the operation stage of the second instruction execution system, the operation of the second instruction execution system is performed. The output latch of the operation stage is negated, and the operation result for the following one machine cycle instruction is held. Then, the operation result writing stage of the second instruction execution system is placed in a standby state, and then the following one machine cycle instruction can be completed in synchronization with the completion of the preceding plurality of machine cycle instructions. The instruction is controlled so that the standby state of the operation result writing stage of the second instruction execution system is released at this point, and the operation result held therein is written. Processor as described.
JP14537592A 1992-06-05 1992-06-05 Instruction control method in processor and processor Withdrawn JPH05341995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14537592A JPH05341995A (en) 1992-06-05 1992-06-05 Instruction control method in processor and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14537592A JPH05341995A (en) 1992-06-05 1992-06-05 Instruction control method in processor and processor

Publications (1)

Publication Number Publication Date
JPH05341995A true JPH05341995A (en) 1993-12-24

Family

ID=15383780

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14537592A Withdrawn JPH05341995A (en) 1992-06-05 1992-06-05 Instruction control method in processor and processor

Country Status (1)

Country Link
JP (1) JPH05341995A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2008129883A1 (en) * 2007-04-18 2010-07-22 三菱電機株式会社 Encoding device, decoding device, code conversion device, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2008129883A1 (en) * 2007-04-18 2010-07-22 三菱電機株式会社 Encoding device, decoding device, code conversion device, and program
JP4722214B2 (en) * 2007-04-18 2011-07-13 三菱電機株式会社 Encoding device, decoding device, code conversion device, and program

Similar Documents

Publication Publication Date Title
JP3587255B2 (en) Super scalar processor
US5404552A (en) Pipeline risc processing unit with improved efficiency when handling data dependency
US5872987A (en) Massively parallel computer including auxiliary vector processor
EP0241946A2 (en) Information processing system
JP2004171573A (en) Coprocessor extension architecture built by using novel splint-instruction transaction model
KR100983135B1 (en) Processor and method of grouping and executing dependent instructions in a packet
JPH1165839A (en) Instruction control mechanism of processor
JP3510729B2 (en) Instruction execution method and instruction execution device
EP0223150B1 (en) Information processing apparatus
JP2004529405A (en) Superscalar processor implementing content addressable memory for determining dependencies
JPH03233630A (en) Information processor
US7237096B1 (en) Storing results of producer instructions to facilitate consumer instruction dependency tracking
JP3490005B2 (en) Instruction control apparatus and method
US4803615A (en) Microcode control of a parallel architecture microprocessor
JPH05341995A (en) Instruction control method in processor and processor
JPS6161416B2 (en)
JPH07219766A (en) Arithmetic processor
JPH09138748A (en) Method and apparatus for early completion of floating-point instruction
JP2920968B2 (en) Instruction processing order control method
JP2933848B2 (en) Data processing device
JP3524240B2 (en) Parallel instruction processing unit
JP3743155B2 (en) Pipeline controlled computer
JP2003248670A (en) Processor
JPH07191845A (en) Immediate data transfer device
JP2000250869A (en) Method and device for controlling multiprocessor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990831