JPH0991138A - Operation processing method - Google Patents

Operation processing method

Info

Publication number
JPH0991138A
JPH0991138A JP25059695A JP25059695A JPH0991138A JP H0991138 A JPH0991138 A JP H0991138A JP 25059695 A JP25059695 A JP 25059695A JP 25059695 A JP25059695 A JP 25059695A JP H0991138 A JPH0991138 A JP H0991138A
Authority
JP
Japan
Prior art keywords
instruction
operand
data
register
instructions
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
JP25059695A
Other languages
Japanese (ja)
Inventor
Yoshihide Yabuki
喜秀 矢吹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Hitachi Computer Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Computer Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Computer Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP25059695A priority Critical patent/JPH0991138A/en
Publication of JPH0991138A publication Critical patent/JPH0991138A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten instruction processing time by detecting a pair of instructions to be simultaneously executed by a single computing element and simultaneously executing this instruction pair by the single computing element. SOLUTION: A detection circuit 1 detects the instruction pair, which has data dependency relation and can be simultaneously executed by the single computing element, or the instruction pair which has no data dependency relation and can be simultaneously executed by the single computing element. When the detection circuit 1 provided inside an arithmetic unit detects the instruction pair which can be simultaneously executed by the single computing element, this detected result is reported to a control circuit 2 for controlling a computing element 13. The control circuit 2 controls operand data corresponding to the instruction pair to be simultaneously executed so as to be supplied to the computing element 13 and generates a control signal for controlling the operation of the computing element 13 as well. The computing element 13 simultaneously executes the plural instructions based on the supplied operand data and control signal.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、複数の命令を同時
に実行することができる演算パイプライン方式のデータ
処理装置に好適な演算処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic processing method suitable for an arithmetic pipeline type data processing apparatus capable of simultaneously executing a plurality of instructions.

【0002】[0002]

【従来の技術】複数の命令を並列に実行できる演算パイ
プライン処理方式のデータ処理装置において、演算パイ
プラインのスムースな流れを乱す要因の1つとして、
「データ依存性ハザード」がよく知られている。これ
は、第1命令の演算結果を第2命令がオペランドとして
必要とした場合に生じるパイプライン・ハザードのこと
である。
2. Description of the Related Art In a data processing apparatus of an arithmetic pipeline processing system capable of executing a plurality of instructions in parallel, one of the factors disturbing the smooth flow of the arithmetic pipeline is
The "data dependency hazard" is well known. This is a pipeline hazard that occurs when the second instruction requires the operation result of the first instruction as an operand.

【0003】この「データ依存性ハザード」が頻繁に発
生すると、複数の命令を並列に実行することができる演
算パイプライン処理装置のハードウエア資源が有効に使
用されないことになる。このため、従来から「データ依
存性ハザード」を解消するための種々の手法が提案され
てきた。
If this "data dependence hazard" frequently occurs, the hardware resources of the arithmetic pipeline processing device capable of executing a plurality of instructions in parallel will not be effectively used. For this reason, various methods have conventionally been proposed to eliminate the “data dependency hazard”.

【0004】例えば、ある命令対間の「データ依存性ハ
ザード」を解消するために、該命令対を「複合命令化」
して単一実行サイクルで処理する複数スカラ命令の並列
実行支援装置がある(特開平5−73309号を参
照)。
For example, in order to eliminate a "data dependency hazard" between a pair of instructions, the pair of instructions is "combined".
There is a parallel execution support device for a plurality of scalar instructions that is processed in a single execution cycle (see Japanese Patent Laid-Open No. 5-73309).

【0005】[0005]

【発明が解決しようとする課題】上記した従来技術は、
データ依存関係にある命令対を「複合命令化」するとと
もに、「データ依存解消ALU」を設け、ここで該命令
対を実行することにより「データ依存性ハザード」を解
消している。しかし、この方法では、ハードウエア量が
大幅に増加するという問題があり、しかも全ての命令組
合せについてデータ依存関係が解消されるというもので
もない。
DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention
The instruction pair having the data dependency relationship is "combined into an instruction" and a "data dependency elimination ALU" is provided to execute the instruction pair to eliminate the "data dependency hazard". However, this method has a problem that the amount of hardware is significantly increased, and the data dependency is not eliminated for all instruction combinations.

【0006】本発明の目的は、大量のハードウエアを必
要とすることなく、単一の演算器で同時に実行可能な命
令対を検出し、この命令対を同時に実行させることによ
り命令処理時間を短縮した演算処理方法を提供すること
にある。
An object of the present invention is to detect an instruction pair that can be simultaneously executed by a single arithmetic unit without requiring a large amount of hardware and to execute the instruction pair at the same time, thereby shortening the instruction processing time. It is to provide the above-mentioned arithmetic processing method.

【0007】[0007]

【課題を解決するための手段】前記目的を達成するため
に、本発明では、命令およびデータを格納した記憶ユニ
ットと、該記憶ユニットから複数の命令を取り出し、該
複数の命令を並列に解読する命令ユニットと、命令コー
ド、オペランドを受け取り、演算を実行する演算ユニッ
トとを備えたデータ処理装置において、複数の命令を並
列に実行する演算パイプライン方式の演算処理方法であ
って、前記複数の命令の内、データ依存関係があり、か
つ単一の演算器で同時に実行可能な命令対を検出したと
き、該命令対を単一の演算器で同時に実行させることを
特徴としている。
In order to achieve the above-mentioned object, in the present invention, a storage unit storing instructions and data, a plurality of instructions are fetched from the storage unit, and the plurality of instructions are decoded in parallel. A data processing device comprising an instruction unit and an operation unit that receives an instruction code and an operand and executes an operation. An operation processing method of an operation pipeline system for executing a plurality of instructions in parallel, the method comprising: Among them, when an instruction pair having a data dependency relationship and capable of being simultaneously executed by a single arithmetic unit is detected, the instruction pair is simultaneously executed by a single arithmetic unit.

【0008】また、前記複数の命令の内、データ依存関
係がなく、かつ単一の演算器で同時に実行可能な命令対
を検出したとき、該命令対を単一の演算器で同時に実行
させることを特徴としている。
When a pair of instructions among the plurality of instructions that has no data dependency and can be simultaneously executed by a single arithmetic unit is detected, the instruction pair is simultaneously executed by a single arithmetic unit. Is characterized by.

【0009】これにより、演算ユニット内に設けられた
検出手段が、単一の演算器で同時に実行可能な命令対を
検出すると、この検出結果を、演算器を制御する制御手
段に通知する。制御手段は、同時に実行される命令対に
対応したオペランドデータが演算器に供給されるように
制御するとともに、演算器の動作を制御する制御信号も
生成する。演算器は、供給されたオペランドデータと制
御信号を基に各種演算を実行する。
Thus, when the detecting means provided in the arithmetic unit detects an instruction pair that can be simultaneously executed by a single arithmetic unit, the detection result is notified to the control means for controlling the arithmetic unit. The control means controls the operand data corresponding to the pair of instructions to be simultaneously executed to be supplied to the arithmetic unit, and also generates a control signal for controlling the operation of the arithmetic unit. The arithmetic unit executes various operations based on the supplied operand data and control signals.

【0010】[0010]

【発明の実施の形態】以下、本発明の一実施例を図面を
用いて具体的に説明する。図2に、複数の命令を並列に
実行することができる演算パイプライン方式のデータ処
理装置の構成を示す。図において、21は、複数の命令
を並列に解読する命令ユニット、22は、命令およびデ
ータを格納する記憶ユニット、23は、演算(浮動小数
点演算)を実行する演算ユニットである。命令ユニット
22は、記憶ユニット22から読み出された命令を格納
する命令バッファ24と、命令バッファ24から切り出
された先行命令を格納する第1の命令レジスタ25と、
命令バッファ24から切り出された後続命令を格納する
第2の命令レジスタ26と、第1、第2の命令レジスタ
の命令を同時に解読する第1、第2のデコーダ27、2
8などから構成されている。そして、演算ユニット23
は、命令ユニット21および記憶ユニット22から、並
列に実行される命令コード、メモリオペランドなどを受
け取り、演算を実行する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be specifically described below with reference to the drawings. FIG. 2 shows the configuration of an arithmetic pipeline type data processing device capable of executing a plurality of instructions in parallel. In the figure, 21 is an instruction unit that decodes a plurality of instructions in parallel, 22 is a storage unit that stores instructions and data, and 23 is an operation unit that executes an operation (floating point operation). The instruction unit 22 includes an instruction buffer 24 that stores the instruction read from the storage unit 22, and a first instruction register 25 that stores the preceding instruction cut out from the instruction buffer 24.
A second instruction register 26 for storing subsequent instructions cut out from the instruction buffer 24 and first and second decoders 27, 2 for simultaneously decoding the instructions of the first and second instruction registers.
It is composed of 8 and the like. And the arithmetic unit 23
Receives instruction codes, memory operands, etc. to be executed in parallel from the instruction unit 21 and the storage unit 22, and executes an operation.

【0011】図1は、本発明の実施例に係る浮動小数点
演算ユニットの構成を示す。1は、命令ユニット21の
デコーダ27、28に接続された検出回路である。この
検出回路1は、データ依存関係があり、かつ単一の演算
器で同時に実行可能な命令対または、データ依存関係が
なく、かつ単一の演算器で同時に実行可能な命令対のい
ずれかを検出する。2は、検出回路1からの検出結果に
応じて演算器全体を制御する制御回路、3、4、5、
6、7はセレクタ、8、9は、ワークレジスタ、10
は、中間結果を格納するレジスタ、11はストアデータ
を格納するレジスタ、12は、演算結果を格納するレジ
スタ、13は単一の演算器である。
FIG. 1 shows the configuration of a floating point arithmetic unit according to an embodiment of the present invention. Reference numeral 1 is a detection circuit connected to the decoders 27 and 28 of the instruction unit 21. The detection circuit 1 has either a data dependency and an instruction pair that can be simultaneously executed by a single arithmetic unit, or an instruction pair that has no data dependency and can be simultaneously executed by a single arithmetic unit. To detect. Reference numeral 2 denotes a control circuit for controlling the entire arithmetic unit according to the detection result from the detection circuit 1, 3, 4, 5,
6, 7 are selectors, 8 and 9 are work registers, 10
Is a register for storing an intermediate result, 11 is a register for storing store data, 12 is a register for storing an operation result, and 13 is a single arithmetic unit.

【0012】レジスタ群14は一般には、汎用レジスタ
群と、浮動小数点レジスタ群との2つを有していて、浮
動小数点演算を行うとき浮動小数点レジスタ群を用い、
それ以外の演算を行うとき汎用レジスタ群を用いるが、
図1では、簡単のため1つのレジスタ群を示す。また、
101、102、103、104はオペランド・バス、
105はデータ・バスである。
The register group 14 generally has a general-purpose register group and a floating-point register group, and the floating-point register group is used when performing a floating-point operation.
The general-purpose register group is used to perform other operations,
In FIG. 1, one register group is shown for simplicity. Also,
101, 102, 103, 104 are operand buses,
Reference numeral 105 is a data bus.

【0013】ここで、本実施例の演算器13は、同時に
複数の命令を実行するための特別の構成を備えたもので
はない。すなわち、僅かのハードウエアの付加によって
単一の演算器で複数の命令(本実施例では、2命令)を
同時に実行させる点が本発明の特徴であり、従来技術と
相違する点である。
Here, the arithmetic unit 13 of this embodiment does not have a special configuration for executing a plurality of instructions at the same time. That is, a feature of the present invention is that a plurality of instructions (two instructions in this embodiment) are simultaneously executed by a single arithmetic unit by adding a small amount of hardware, which is a point different from the prior art.

【0014】ただし、図1に示す演算器構成を採る場
合、以下の理由から同時に実行できる命令の組合せは、
ある程度、特定される。 (1) ワークレジスタ(図1の8、9)を1組しか持
たない。 (2) 同一演算を実行できる演算器(図1の13)を
1個しか持たない。
However, when the arithmetic unit configuration shown in FIG. 1 is adopted, the combination of instructions that can be simultaneously executed is as follows for the following reason.
To some extent specified. (1) It has only one set of work registers (8 and 9 in FIG. 1). (2) It has only one computing unit (13 in FIG. 1) that can execute the same computation.

【0015】従って、上記(1)によって、並列に解読
された2命令が、都合4オペランドを必要とする場合
は、同時実行が不可能であり、同様に都合3オペランド
を必要とする場合は、データ依存関係にあるときに限り
同時実行が可能となる。また、上記(2)によって、同
一演算命令の同時実行ができないなどの制約がある。し
かし、これらの制約は、同一演算を実行できる演算器を
複数個設けるなど、ハードウエア量を増加させることに
よって、ほぼ解消することができる。
Therefore, according to the above (1), if two instructions decoded in parallel require four operands for convenience, simultaneous execution is impossible, and similarly, if three operands for convenience are required, Concurrent execution is possible only when there is a data dependency. Further, due to the above (2), there is a restriction that the same operation instruction cannot be executed simultaneously. However, these restrictions can be almost eliminated by increasing the amount of hardware such as providing a plurality of arithmetic units capable of executing the same arithmetic operation.

【0016】さて、本発明は、前述したように単一の演
算器で複数命令を同時に実行する点に特徴があるが、本
発明が対象とする浮動小数点命令の分類を図3に示す。
命令は、RR形式とRX形式に分けられ、各形式の命令
は、それぞれ4グループに分類される。例えば、LER
グループのロード命令<LER>は、単精度のロード命
令であり、<LDR>は倍精度のロード命令である。な
お、上記した各命令の詳細は、例えばIBM 「Ent
erprise System Architectu
re /370 Principles of Ope
ation」に記載されている。
As described above, the present invention is characterized in that a plurality of instructions are simultaneously executed by a single arithmetic unit, and the classification of floating point instructions to which the present invention is applied is shown in FIG.
Instructions are divided into RR format and RX format, and each format instruction is classified into four groups. For example, LER
The group load instruction <LER> is a single-precision load instruction, and <LDR> is a double-precision load instruction. The details of each of the above-mentioned commands are described in, for example, the IBM “Ent
erprise System Architectu
re / 370 Principles of Op
ation ”.

【0017】上記した分類は、演算器の通過ルート、命
令形式、実行サイクル数が各命令によって異なるため、
同時に実行できる命令対であるか否かの判定にとって重
要な要素になる。なお、以降の説明では、同時に実行す
る命令対のうち、先行する命令をX系、後続の命令をY
系と呼ぶ。
In the above classification, the passage route of the arithmetic unit, the instruction format, and the number of execution cycles are different for each instruction.
It becomes an important factor for determining whether or not the instruction pairs can be executed simultaneously. In the following description, of the instruction pairs to be executed at the same time, the preceding instruction is the X type and the subsequent instruction is the Y type.
Called the system.

【0018】図4は、図3の命令の分類と、図1の演算
器構成とに基づいて、各命令対が単一の演算器で同時に
実行可能か否かの判定結果を示す。図において、X系と
Y系がクロスした箇所が丸印のとき、先行するX系の命
令と後続するY系の命令は、データ依存関係に係らず、
同時実行が可能な命令対であることを示す。また、三角
印は、データ依存関係がある場合にのみ同時実行が可能
な命令対であることを示し、×印は同時実行が不可能な
命令対を示す。そして、検出回路1内には、図4の判定
結果がテーブルとして格納されている。
FIG. 4 shows the result of judgment as to whether or not each instruction pair can be executed simultaneously by a single arithmetic unit, based on the instruction classification of FIG. 3 and the arithmetic unit configuration of FIG. In the figure, when the crossing point between the X system and the Y system is a circle, the preceding X system instruction and the following Y system instruction are
Indicates an instruction pair that can be executed simultaneously. Further, a triangle mark indicates an instruction pair that can be simultaneously executed only when there is a data dependency relationship, and a x mark indicates an instruction pair that cannot be simultaneously executed. The determination result of FIG. 4 is stored in the detection circuit 1 as a table.

【0019】以下、具体的な命令対を例にして、本発明
の動作を説明する。(例1)の命令対が、図2に示す命
令ユニット21から演算ユニット22に対し発行された
とする。すなわち、先行命令(LDR 0,2)が命令
レジスタ25に格納され、後続命令(ADR 0,4)
が命令レジスタ26に格納され、次のステージでそれぞ
れ同時にデコーダ27、28で解読され、演算ユニット
22の検出回路1に送られる。
The operation of the present invention will be described below by taking a specific instruction pair as an example. It is assumed that the instruction pair of (Example 1) is issued from the instruction unit 21 shown in FIG. 2 to the arithmetic unit 22. That is, the preceding instruction (LDR 0,2) is stored in the instruction register 25, and the subsequent instruction (ADR 0,4).
Are stored in the instruction register 26, are simultaneously decoded by the decoders 27 and 28 in the next stage, and are sent to the detection circuit 1 of the arithmetic unit 22.

【0020】ここで、LDR命令は、第2オペランドで
指定されるレジスタの内容を、第1オペランドで指定さ
れるレジスタにロードする命令であり、ADR命令は、
第2オペランドで指定されるレジスタの内容と第1オペ
ランドで指定されるレジスタの内容を加算して、第1オ
ペランドで指定されるレジスタに格納する命令である。
Here, the LDR instruction is an instruction for loading the contents of the register designated by the second operand into the register designated by the first operand, and the ADR instruction is
This is an instruction for adding the contents of the register specified by the second operand and the contents of the register specified by the first operand and storing them in the register specified by the first operand.

【0021】 検出回路1は、発行された命令の命令コード、オペラン
ド・アドレスを基に、図4の判定結果(テーブル)を参
照する。この例1では、先行命令(X系)がLDR、後
続命令(Y系)がADRであり、先行命令の第1オペラ
ンドで指定されるレジスタと後続命令の第1オペランド
で指定されるレジスタが一致し、データ依存関係がある
ので、例1の命令対は単一の演算器で同時に実行可能と
判定され、その判定結果が制御回路2に通知される。制
御回路2は、以下のように演算器13を制御する。
[0021] The detection circuit 1 refers to the determination result (table) of FIG. 4 based on the instruction code of the issued instruction and the operand address. In this example 1, the preceding instruction (X type) is LDR and the subsequent instruction (Y type) is ADR, and the register specified by the first operand of the preceding instruction and the register specified by the first operand of the subsequent instruction are equal to each other. However, since there is a data dependency, it is determined that the instruction pair of Example 1 can be simultaneously executed by a single arithmetic unit, and the determination result is notified to the control circuit 2. The control circuit 2 controls the arithmetic unit 13 as follows.

【0022】まず、X系命令の第2オペランド・データ
(2番目のレジスタの内容)をセレクタ6で選択し、同
時にY系命令の第2オペランド・データ(4番目のレジ
スタの内容)をセレクタ7で選択する。選択された各オ
ペランド・データは、それぞれオペランド・バス10
2、104を介してセレクタ4、3に送られる。次い
で、セレクタ3を介してオペランド・バス104のオペ
ランド・データ(つまり、ADRの第2オペランド・デ
ータ)をワーク・レジスタ8に格納し、セレクタ4を介
してペランド・バス102のオペランド・データ(つま
り、LDRの第2オペランド・データ)をワ−ク・レジ
スタ9に格納する。
First, the selector 6 selects the second operand data of the X-type instruction (contents of the second register), and at the same time selects the second operand data of the Y-type instruction (contents of the fourth register). Select with. The selected operand data are respectively transferred to the operand bus 10
It is sent to selectors 4 and 3 via 2 and 104. Then, the operand data of the operand bus 104 (that is, the second operand data of the ADR) is stored in the work register 8 through the selector 3, and the operand data of the Peland bus 102 (that is, the second operand data of the ADR) (that is, the second operand data of the ADR) is stored through the selector 4. , LDR second operand data) are stored in the work register 9.

【0023】続いて、演算器13は、 (ワーク・レジスタ8の内容)+(ワーク・レジスタ9
の内容) を演算し、レジスタ10、レジスタ12に順次、演算結
果を格納し、データ・バス105を介して、ADRの第
1オペランドで指定される、レジスタ群14内の0番目
のレジスタに演算結果を格納し、上記した命令対の処理
を終了する。
Subsequently, the computing unit 13 calculates (contents of the work register 8) + (work register 9
Content) is stored in the register 10 and the register 12 in order, and the result is stored in the 0th register in the register group 14 designated by the first operand of ADR via the data bus 105. The result is stored, and the processing of the above-described instruction pair ends.

【0024】このように、X系命令(LDR)は、第2
オペランド・データをY系命令に引渡しただけで実行さ
れず(つまり、第2オペランド・データが第1オペラン
ドのレジスタに転送されない)、一方、Y系命令(AD
R)は、X系命令の第2オペランド・データと自命令の
第2オペランド・データとを加算するように制御され
る。この結果、単一の演算器で同時に2つの命令が実行
されたことになり、従来の処理に比べて命令処理時間が
短縮される。なお、上記したように命令列が同時実行可
能でないときは、まず先行命令が演算ユニットで処理さ
れ、次いで後続命令が演算ユニットで処理される。
As described above, the X-type instruction (LDR) is the second instruction.
It is not executed just by passing the operand data to the Y instruction (that is, the second operand data is not transferred to the register of the first operand), while the Y instruction (AD
R) is controlled so as to add the second operand data of the X-type instruction and the second operand data of its own instruction. As a result, two instructions are simultaneously executed by a single arithmetic unit, and the instruction processing time is shortened as compared with the conventional processing. When the instruction sequences are not simultaneously executable as described above, the preceding instruction is first processed by the arithmetic unit, and the subsequent instruction is then processed by the arithmetic unit.

【0025】(例2−1)の命令対が、図2に示す命令
ユニット21から演算ユニット22に対し発行されたと
する。ここで、STD命令は、第1オペランドで指定さ
れるレジスタの内容を、第2オペランドで指定される主
記憶アドレス(このアドレスは、X2フィールドにより
指定される指標アドレスレジスタの内容とB2フィール
ドにより指定される基底アドレスレジスタの内容とD2
フィールドの内容とを加算することにより得る)にスト
アする命令である。
It is assumed that the instruction pair of (Example 2-1) is issued from the instruction unit 21 shown in FIG. 2 to the arithmetic unit 22. Here, the STD instruction sets the contents of the register specified by the first operand to the main memory address specified by the second operand (this address is specified by the contents of the index address register specified by the X2 field and the B2 field. Contents of the base address register to be set and D2
(Obtained by adding the contents of the field).

【0026】 検出回路1は、(例1)と同様に、発行された命令の命
令コード、オペランド・アドレスを基に、図4の判定結
果(テーブル)を参照する。この例2−1では、先行命
令(X系)がLDR、後続命令(Y系)がSTDである
ので、データ依存関係に係らず、例2−1の命令対は単
一の演算器で同時に実行可能と判定され、その判定結果
が制御回路2に通知される。制御回路2は、以下のよう
に演算器13を制御する。
[0026] Similar to (Example 1), the detection circuit 1 refers to the determination result (table) of FIG. 4 based on the instruction code and operand address of the issued instruction. In this Example 2-1, since the preceding instruction (X type) is LDR and the subsequent instruction (Y type) is STD, the instruction pair of Example 2-1 is simultaneously executed by a single arithmetic unit regardless of the data dependency. It is determined to be executable, and the determination result is notified to the control circuit 2. The control circuit 2 controls the arithmetic unit 13 as follows.

【0027】まず、X系命令(LDR)の第2オペラン
ド・データをセレクタ6で選択し、同時にY系命令(S
TD)の第1オペランド・データをセレクタ7で選択す
る。選択された各オペランド・データは、各々オペラン
ド・バス102ないし103を介して、セレクタ3ない
し4に送られる。次に、セレクタ3を介してオペランド
・バス102のオペランド・データ(LDRの第2オペ
ランド・データ)をワーク・レジスタ8に格納し、セレ
クタ4を介してオペランド・バス103のオペランド・
データ(STDの第1オペランド・データ)をワーク・
レジスタ9に格納する。
First, the second operand data of the X-type instruction (LDR) is selected by the selector 6, and at the same time, the Y-type instruction (S
The selector 7 selects the first operand data of TD). The selected operand data are sent to the selectors 3 to 4 via the operand buses 102 to 103, respectively. Next, the operand data of the operand bus 102 (second operand data of LDR) is stored in the work register 8 via the selector 3, and the operand data of the operand bus 103 is stored via the selector 4.
Work with data (first operand data of STD)
Store in register 9.

【0028】次に、X系命令(LDR)は、演算器13
において、 (ワーク・レジスタ8の内容)+0 を演算し(つまり、演算器を通す)、レジスタ10、レ
ジスタ12に順次、演算結果を格納し、データ・バス1
05を介して、レジスタ群14内の第1オペランドで指
定されるレジスタに演算結果を格納する。
Next, the X system instruction (LDR) is issued to the arithmetic unit 13
At (contents of work register 8) +0 is calculated (that is, passed through a calculator), the calculation results are sequentially stored in registers 10 and 12, and data bus 1
The calculation result is stored in the register designated by the first operand in the register group 14 via 05.

【0029】Y系命令(STD)は、ワーク・レジスタ
9の内容をセレクタ5を介してレジスタ11に格納す
る。このとき、制御回路2は、ワーク・レジスタ9の内
容をストアデータとして選択するよう動作する。次い
で、レジスタ11の内容は、図示しないバスを介して、
図2に示す記憶ユニット22に送られ、第2オペランド
で指定される主記憶アドレスにレジスタ11の内容がス
トアされ、これにより該命令対の処理が終了する。
The Y-system instruction (STD) stores the contents of the work register 9 in the register 11 via the selector 5. At this time, the control circuit 2 operates to select the content of the work register 9 as the store data. Next, the contents of the register 11 are transferred via a bus (not shown) to
The contents of the register 11 are sent to the storage unit 22 shown in FIG. 2 and stored in the main storage address designated by the second operand, whereby the processing of the instruction pair ends.

【0030】同様に、(例2−2)の命令対が、図2に
示す命令ユニット21から演算ユニット23に対して発
行されたとする。
Similarly, it is assumed that the instruction pair of (Example 2-2) is issued from the instruction unit 21 shown in FIG. 2 to the arithmetic unit 23.

【0031】 (例2−1)との相違は、セレクタ7でY系命令の第1
オペランド・データを選択しないように制御し、また、
セレクタ4で選択されるオペランド・バスを、103か
ら102にするように制御する。従って、セレクタ6で
選択されたX命令系の第2オペランド・データは、オペ
ランド・バス102、セレクタ4を介してワーク・レジ
スタ9に格納される。以降の処理は(例2−1)と全く
同様であるので、その説明を省略する。
[0031] The difference from (Example 2-1) is that the selector 7 selects the first Y-type instruction.
Operand data is controlled not to be selected, and
The operand bus selected by the selector 4 is controlled to change from 103 to 102. Therefore, the second operand data of the X instruction system selected by the selector 6 is stored in the work register 9 via the operand bus 102 and the selector 4. Subsequent processing is exactly the same as in (Example 2-1), so description thereof will be omitted.

【0032】(例3)の命令の組合せが、図2に示す命
令ユニット21から演算ユニット23に対し発行された
とする。
It is assumed that the instruction combination of (Example 3) is issued from the instruction unit 21 shown in FIG. 2 to the arithmetic unit 23.

【0033】 検出回路1は、上記した例と同様に、発行された命令の
命令コード、オペランド・アドレスを調べ、この例では
データ依存関係があるので、単一の演算器で同時に実行
可能と判定し、制御回路2に通知する。制御回路2は次
のように演算器を制御する。
[0033] The detection circuit 1 checks the instruction code and the operand address of the issued instruction as in the above example. Since there is a data dependency in this example, the detection circuit 1 determines that they can be executed simultaneously by a single arithmetic unit, and controls Notify circuit 2. The control circuit 2 controls the arithmetic unit as follows.

【0034】まず、X系命令の第1オペランド・データ
をセレクタ6で選択し、同時にY系命令の第2オペラン
ド・データをセレクタ7で選択する。選択された各オペ
ランド・データは、それぞれオペランド・バス101な
いし104を介して、セレクタ4ないし3に送られる。
次に、セレクタ3を介してオペランド・バス104のオ
ペランド・データをワーク・レジスタ8(ADRの第2
オペランド)に格納し、セレクタ4を介してオペランド
・バス101のオペランド・データをワ−ク・レジスタ
9(STDの第1オペランド)に格納する。
First, the first operand data of the X-type instruction is selected by the selector 6, and at the same time, the second operand data of the Y-type instruction is selected by the selector 7. The selected operand data are sent to the selectors 4 to 3 via the operand buses 101 to 104, respectively.
Next, the operand data on the operand bus 104 is transferred via the selector 3 to the work register 8 (second register of ADR).
The operand data of the operand bus 101 is stored in the work register 9 (first operand of STD) via the selector 4.

【0035】次に、X系命令は、ワーク・レジスタ9の
内容をセレクタ5を介してレジスタ11にストアデータ
としてに格納する。次いで、レジスタ11の内容は、図
示しないバスを介して、図2に示す記憶ユニットに送ら
れる。
Next, the X-type instruction stores the contents of the work register 9 in the register 11 as store data via the selector 5. Next, the contents of the register 11 are sent to the storage unit shown in FIG. 2 via a bus (not shown).

【0036】Y系命令は、演算器13において、 (ワーク・レジスタ8の内容)+(ワーク・レジスタ9
の内容) を演算し、レジスタ10、レジスタ12に順次、演算結
果を格納し、データ・バス105を介して、レジスタ群
14内の第1オペランドで指定されるレジスタに演算結
果を格納し、これにより該命令対の処理が終了する。
The Y-system instruction is executed in the arithmetic unit 13 by (contents of work register 8) + (work register 9
Content) is stored in the register 10 and the register 12 sequentially, and the calculation result is stored in the register designated by the first operand in the register group 14 via the data bus 105. This completes the processing of the instruction pair.

【0037】同様に、(例4)の命令の組合せが、命令
ユニットから演算ユニットに対して発行されたとする。
Similarly, it is assumed that the instruction combination of (Example 4) is issued from the instruction unit to the arithmetic unit.

【0038】 検出回路1は、上記した例と同様に、発行された命令の
命令コード、オペランド・アドレスを調べ、この例は例
3と同様にデータ依存関係があるので、単一の演算器で
同時に実行可能と判定して、制御回路2に通知する。制
御回路2は、次のように演算器を制御する。
[0038] The detection circuit 1 checks the instruction code and operand address of the issued instruction as in the above example. Since this example has a data dependency relationship as in Example 3, it can be executed simultaneously by a single arithmetic unit. Then, the control circuit 2 is notified. The control circuit 2 controls the arithmetic unit as follows.

【0039】まず、X系命令の第1、第2オペランド・
データをセレクタ6で選択する。このとき、Y系命令の
オペランド・データは、セレクタ7で選択されない。セ
レクタ6で選択されたX系命令のオペランド・データ
は、それぞれオペランド・バス101ないし102を介
してセレクタ4ないし3に送られる。次に、セレクタ3
を介してオペランド・バス102のオペランド・データ
をワーク・レジスタ8(ADRの第2オペランド)に格
納し、セレクタ4を介してオペランド・バス101のオ
ペランド・データをワーク・レジスタ9(ADRの第1
オペランド)に格納する。
First, the first and second operands of the X-type instruction
The data is selected by the selector 6. At this time, the operand data of the Y-type instruction is not selected by the selector 7. The operand data of the X-system instruction selected by the selector 6 is sent to the selectors 4 to 3 via the operand buses 101 to 102, respectively. Next, selector 3
The operand data of the operand bus 102 is stored in the work register 8 (second operand of ADR) via the selector register 4, and the operand data of the operand bus 101 is stored in the work register 9 (first register of ADR) via the selector 4.
Operand).

【0040】次に、演算器13において、 (ワーク・レジスタ8の内容)+(ワーク・レジスタ9
の内容) を演算し、レジスタ10、レジスタ12に順次、演算結
果を格納し、データ・バス105を介してレジスタ群1
4内の第1オペランドで指定されたレジスタに演算結果
を格納する。
Next, in the arithmetic unit 13, (contents of the work register 8) + (work register 9
The contents of 1) are calculated, the calculation results are sequentially stored in the register 10 and the register 12, and the register group 1 is stored via the data bus 105.
The operation result is stored in the register designated by the first operand in 4.

【0041】ここで、注意しなければならないことは、
(例4)におけるY系命令の処理である。すなわち、前
述した例3のストア命令と異なり、この例4のY系命令
の処理でストアするデータは、ワーク・レジスタ9に格
納されたオペランド・データではなく、X系命令の演算
結果のデータである。このため、前述した例3のストア
命令より、1マシンサイクル遅れて、レジスタ11に記
憶ユニットに送出すべきストアデータが格納されること
になる。
Here, it should be noted that
This is processing of Y-type instructions in (Example 4). That is, unlike the store instruction of Example 3 described above, the data to be stored in the processing of the Y-type instruction of Example 4 is not the operand data stored in the work register 9 but the data of the operation result of the X-type instruction. is there. Therefore, the store data to be sent to the storage unit is stored in the register 11 one machine cycle later than the store instruction of the above-described example 3.

【0042】Y系命令の処理は次のようになる。X系命
令によって演算器13で演算され、レジスタ10に格納
された演算結果がセレクタ5に送られる。セレクタ5
は、制御回路2によりX系命令の演算結果をY系命令の
ストアデータとして選択するよう制御される。次いで、
レジスタ11に格納されたストアデータは、図示しない
バスを介して、図2に示す記憶ユニットに送られ、処理
が終了する。
The processing of Y-related instructions is as follows. An operation result is stored in the register 10 after being calculated by the calculator 13 according to the X-system instruction, and sent to the selector 5. Selector 5
Is controlled by the control circuit 2 to select the operation result of the X-type instruction as the store data of the Y-type instruction. Then
The store data stored in the register 11 is sent to the storage unit shown in FIG. 2 via a bus (not shown), and the process ends.

【0043】以上、幾つかの命令対を例にして、本発明
の一実施例を説明したが、図4に示す他の同時実行可能
な命令対についても、全く同様にその動作が説明される
ことは容易に理解されるであろう。上記説明した処理に
よって、単一の演算器でハードウエア量を増加させるこ
となく、複数の命令を同時に実行することが可能にな
り、命令処理時間を短縮することができる。
Although one embodiment of the present invention has been described above by taking several instruction pairs as an example, the operation of other simultaneously executable instruction pairs shown in FIG. 4 will be described in exactly the same manner. It will be easily understood. By the processing described above, it is possible to execute a plurality of instructions simultaneously without increasing the amount of hardware with a single arithmetic unit, and it is possible to shorten the instruction processing time.

【0044】なお、本発明は、演算器が単一の場合でも
処理性能を向上させる上に有効であるが、演算器を複数
個備えたデータ処理装置に適用した場合、さらに顕著な
効果が得られることは、明らかであろう。
Although the present invention is effective in improving the processing performance even when there is a single arithmetic unit, when it is applied to a data processing apparatus having a plurality of arithmetic units, a more remarkable effect can be obtained. It will be obvious.

【0045】[0045]

【発明の効果】以上、説明したように、本発明によれ
ば、データ依存関係があり、かつ単一の演算器で同時に
実行可能な命令対、または、データ依存関係がなく、か
つ単一の演算器で同時に実行可能な命令対のいずれかを
検出し、検出された命令対を単一の演算器で同時に実行
させているので、ハードウェア量を増大させることな
く、命令処理時間を短縮することができる。
As described above, according to the present invention, there is a data dependency and a pair of instructions that can be simultaneously executed by a single arithmetic unit, or there is no data dependency and a single instruction pair. Since any one of the instruction pairs that can be executed simultaneously by the arithmetic unit is detected and the detected instruction pair is executed by the single arithmetic unit at the same time, the instruction processing time can be shortened without increasing the hardware amount. be able to.

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

【図1】本発明の実施例に係る浮動小数点演算ユニット
の構成を示す。
FIG. 1 shows a configuration of a floating point arithmetic unit according to an embodiment of the present invention.

【図2】複数の命令を並列に実行することができる演算
パイプライン方式のデータ処理装置の構成を示す。
FIG. 2 shows the configuration of an arithmetic pipeline type data processing device capable of executing a plurality of instructions in parallel.

【図3】本発明が対象とする浮動小数点命令の分類を示
す。
FIG. 3 shows a classification of floating-point instructions targeted by the present invention.

【図4】命令対が単一の演算器で同時に実行可能か否か
の判定結果を示す。
FIG. 4 shows a determination result of whether or not an instruction pair can be simultaneously executed by a single arithmetic unit.

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

1 検出回路 2 制御回路 3、4、5、6、7 セレクタ 8、9 ワークレジスタ 10 中間結果レジスタ 11 ストアデータレジスタ 12 演算結果レジスタ 13 演算器 14 レジスタ群 101、102、103、104 オペランド・バス 105 データ・バス 1 Detection Circuit 2 Control Circuit 3, 4, 5, 6, 7 Selector 8, 9 Work Register 10 Intermediate Result Register 11 Store Data Register 12 Operation Result Register 13 Operation Unit 14 Register Group 101, 102, 103, 104 Operand Bus 105 Data bus

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 命令およびデータを格納した記憶ユニッ
トと、該記憶ユニットから複数の命令を取り出し、該複
数の命令を並列に解読する命令ユニットと、命令コー
ド、オペランドを受け取り、演算を実行する演算ユニッ
トとを備えたデータ処理装置において、複数の命令を並
列に実行する演算パイプライン方式の演算処理方法であ
って、前記複数の命令の内、データ依存関係があり、か
つ単一の演算器で同時に実行可能な命令対を検出したと
き、該命令対を単一の演算器で同時に実行させることを
特徴とする演算処理方法。
1. A storage unit for storing instructions and data, an instruction unit for extracting a plurality of instructions from the storage unit and decoding the plurality of instructions in parallel, an operation for receiving an instruction code and an operand, and executing an operation. A data processing device including a unit, which is an operation processing method of an operation pipeline method for executing a plurality of instructions in parallel, wherein the plurality of instructions have a data dependency relationship and a single operation unit An arithmetic processing method characterized in that, when an instruction pair that can be executed simultaneously is detected, the instruction pair is executed simultaneously by a single arithmetic unit.
【請求項2】 前記複数の命令の内、データ依存関係が
なく、かつ単一の演算器で同時に実行可能な命令対を検
出したとき、該命令対を単一の演算器で同時に実行させ
ることを特徴とする請求項1記載の演算処理方法。
2. When a pair of instructions among the plurality of instructions that has no data dependency and can be simultaneously executed by a single arithmetic unit is detected, the instruction pair is simultaneously executed by a single arithmetic unit. The arithmetic processing method according to claim 1, wherein:
JP25059695A 1995-09-28 1995-09-28 Operation processing method Pending JPH0991138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25059695A JPH0991138A (en) 1995-09-28 1995-09-28 Operation processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25059695A JPH0991138A (en) 1995-09-28 1995-09-28 Operation processing method

Publications (1)

Publication Number Publication Date
JPH0991138A true JPH0991138A (en) 1997-04-04

Family

ID=17210241

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25059695A Pending JPH0991138A (en) 1995-09-28 1995-09-28 Operation processing method

Country Status (1)

Country Link
JP (1) JPH0991138A (en)

Similar Documents

Publication Publication Date Title
EP0378830B1 (en) Method and apparatus for handling multiple condition codes as for a parallel pipeline computer
US8521997B2 (en) Conditional execution with multiple destination stores
US5185872A (en) System for executing different cycle instructions by selectively bypassing scoreboard register and canceling the execution of conditionally issued instruction if needed resources are busy
US20020169942A1 (en) VLIW processor
US6269440B1 (en) Accelerating vector processing using plural sequencers to process multiple loop iterations simultaneously
JPS59114641A (en) Interrupt processor
US6145074A (en) Selecting register or previous instruction result bypass as source operand path based on bypass specifier field in succeeding instruction
US4739470A (en) Data processing system
JP2620511B2 (en) Data processor
CN115934168A (en) Processor and memory access method
EP0201833A2 (en) Instruction processor
JPH09152973A (en) Method and device for support of speculative execution of count / link register change instruction
EP1499956B1 (en) Method and apparatus for swapping the contents of address registers
US20100217961A1 (en) Processor system executing pipeline processing and pipeline processing method
US7793072B2 (en) Vector execution unit to process a vector instruction by executing a first operation on a first set of operands and a second operation on a second set of operands
RU2150738C1 (en) Information processing system and method for its operations
JPH0991138A (en) Operation processing method
US6976049B2 (en) Method and apparatus for implementing single/dual packed multi-way addition instructions having accumulation options
US20210042127A1 (en) Group Load Register of a Graph Streaming Processor
JP2869376B2 (en) Pipeline data processing method for executing multiple data processing with data dependency
JP3658879B2 (en) Pipeline calculator
US20030188134A1 (en) Combined addition/subtraction instruction with a flexible and dynamic source selection mechanism
JP2793526B2 (en) Super scalar processor
JPH01271842A (en) Information processor
JPH02206836A (en) Data processor