JP3015565B2 - Information processing device with parallel execution function for multiple instructions - Google Patents

Information processing device with parallel execution function for multiple instructions

Info

Publication number
JP3015565B2
JP3015565B2 JP3336739A JP33673991A JP3015565B2 JP 3015565 B2 JP3015565 B2 JP 3015565B2 JP 3336739 A JP3336739 A JP 3336739A JP 33673991 A JP33673991 A JP 33673991A JP 3015565 B2 JP3015565 B2 JP 3015565B2
Authority
JP
Japan
Prior art keywords
instruction
register
instructions
decoder
executed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP3336739A
Other languages
Japanese (ja)
Other versions
JPH05173781A (en
Inventor
初雄 白倉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP3336739A priority Critical patent/JP3015565B2/en
Publication of JPH05173781A publication Critical patent/JPH05173781A/en
Application granted granted Critical
Publication of JP3015565B2 publication Critical patent/JP3015565B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、複数命令の並列実行
機能を持つ情報処理装置に係り、特にレジスタ依存関係
のある複数の命令の並列実行方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus having a function of executing a plurality of instructions in parallel, and more particularly to a method of executing a plurality of instructions having a register dependency.

【0002】[0002]

【従来の技術】既存のソフトウェアを高速に実行する情
報処理装置として、命令の実行ユニットを複数備え、ソ
フトウェア内の命令列のうち複数の命令を同時(並列)
に(同じサイクル内で)実行し、1サイクルに要する時
間を短縮せずに(即ちクロックの周波数を上げずに)済
ませる、スーパースカラ型計算機で代表される情報処理
装置が知られている。
2. Description of the Related Art As an information processing apparatus for executing existing software at high speed, a plurality of instruction execution units are provided, and a plurality of instructions in an instruction sequence in the software are simultaneously (parallel).
(In the same cycle), and an information processing apparatus represented by a super scalar computer is known which does not shorten the time required for one cycle (ie, does not increase the clock frequency).

【0003】上記した複数命令の並列実行機能を持つ情
報処理装置では、1サイクルで実行可能な最大命令数以
上の命令を保持したキューから、同時に実行しても1つ
ずつ逐次実行した場合と結果が変わらない命令を取出
し、実行するようになっていた。
In the information processing apparatus having the function of executing a plurality of instructions in parallel, a case where instructions are simultaneously executed from a queue holding instructions equal to or more than the maximum number of instructions that can be executed in one cycle is executed one by one even if they are executed simultaneously. Fetched and executed the same instruction.

【0004】もし、キューに入った命令のうちデータの
依存関係のあるものは同時に実行できない。例えば、あ
る命令#1の出力データが別の命令#2の入力データと
なる場合、この命令#1,#2は同時に実行できず、無
理に実行した場合には、その結果は命令#1を実行して
から命令#2を実行した場合と食い違ってしまう。
[0004] If the queued instructions have a data dependency, they cannot be executed simultaneously. For example, if the output data of a certain instruction # 1 becomes the input data of another instruction # 2, the instructions # 1 and # 2 cannot be executed at the same time. This is different from the case where the instruction # 2 is executed after the execution.

【0005】また、データの依存関係がなくても、レジ
スタに依存関係があれば、該当する命令は全て同時には
実行できないのが普通である。例えば、命令#3がある
レジスタの保持データを用い、別の命令#4が同じレジ
スタにデータを書込む場合には、命令#3,#4は、両
データに依存関係がないにも拘らず、同時に実行できな
い。これは、命令#3で用いようとするデータのレジス
タに命令#4で値が書込まれるためである。
[0005] Even if there is no data dependency, if the registers have a dependency, all of the corresponding instructions cannot usually be executed simultaneously. For example, when instruction # 3 uses data held in one register and another instruction # 4 writes data to the same register, instructions # 3 and # 4 have no dependency on both data. , Cannot be executed simultaneously. This is because the value is written by the instruction # 4 to the register of the data to be used by the instruction # 3.

【0006】このようなレジスタ依存を無くすには、互
いに異なるレジスタを用いればよい。しかし、既存のソ
フトウェア(プログラム)でレジスタ依存のある命令列
を持つ場合には、そのソフトウェアを書換えなければな
らず、極めて煩雑である。また、新規に作成するソフト
ウェアでも、命令語中のレジスタ指定フィールドのサイ
ズの関係で指定可能なレジスタ数が制限されるため、そ
のレジスタ数より多いデータ数を扱う場合には、互いに
依存しないデータを同じレジスタで用いる可能性が大き
い。つまり、命令語中でアクセス対象として指定可能な
レジスタ数、言い替えればソフトウェアから認識できる
レジスタ数が同じなら、実行ユニットを増やしてもレジ
スタ依存による性能低下を減らすことはできず、ソフト
ウェアから認識できるレジスタの数を増やして対処しよ
うとすると、既存のソフトウェアを書き直さなければな
らない。
In order to eliminate such register dependence, different registers may be used. However, when existing software (program) has an instruction sequence that depends on registers, the software must be rewritten, which is extremely complicated. Also, even with newly created software, the number of registers that can be specified is limited by the size of the register specification field in the instruction word. It is likely to be used in the same register. In other words, if the number of registers that can be specified as an access target in an instruction word, in other words, the number of registers that can be recognized from software, is the same, even if the number of execution units is increased, performance degradation due to register dependence cannot be reduced, and registers that can be recognized from software cannot be reduced. If you try to increase the number, you must rewrite existing software.

【0007】[0007]

【発明が解決しようとする課題】上記したように、複数
命令の並列実行機能を持つ従来の情報処理装置では、互
いにレジスタ依存関係のある命令列は同時に実行できな
いために、1つずつ逐次実行しなければならず、並列実
行機能を最大限に生かすことができないという問題があ
り、これを解決するためには、ソフトウェアを改造して
レジスタ依存のないように命令列を並べる、あるいは並
べ替えなければならず、多くの人手と費用を要するとい
う問題があった。
As described above, in a conventional information processing apparatus having a function of executing a plurality of instructions in parallel, instruction sequences having a register dependence cannot be executed simultaneously, and therefore, the instruction sequences are sequentially executed one by one. The problem is that the parallel execution function cannot be used to the fullest.To solve this problem, the software must be remodeled to arrange the instruction sequence so that it does not depend on registers, or it must be rearranged. In addition, there is a problem that a lot of manpower and cost are required.

【0008】この発明は上記事情に鑑みてなされたもの
でその目的は、レジスタ依存関係のある命令列を含むソ
フトウェアでも、そのソフトウェアを改造することな
く、装置が持つ複数命令の並列実行能力を十分に生かし
て実行できる情報処理装置を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and has as its object the purpose of sufficiently improving the parallel execution capability of a plurality of instructions possessed by a device without modifying the software even for software containing an instruction sequence having a register dependency. It is an object of the present invention to provide an information processing apparatus which can be executed by utilizing the information processing apparatus.

【0009】[0009]

【課題を解決するための手段】この発明は、命令の実行
ユニットを複数備え、複数命令の並列実行が可能な情報
処理装置において、命令語で指定可能な複数の第1のレ
ジスタと、この第1のレジスタの代用として一時的に使
用される少なくとも1つの第2のレジスタと、実行すべ
き命令列の中から、前記第1のレジスタについてレジス
タ依存関係のある命令を検出し、その命令の指定する前
記第1のレジスタを前記第2のレジスタに一時的に置換
える手段とを備え、レジスタ依存関係のある複数の命令
を、前記第2のレジスタの使用により並列に実行するよ
うにしたことを特徴とするものである。
SUMMARY OF THE INVENTION The present invention provides an information processing apparatus having a plurality of instruction execution units and capable of executing a plurality of instructions in parallel. Detecting an instruction having a register dependency with respect to the first register from at least one second register temporarily used as a substitute for the first register and an instruction sequence to be executed, and designating the instruction Means for temporarily replacing the first register with the second register, wherein a plurality of instructions having a register dependency are executed in parallel by using the second register. It is a feature.

【0010】[0010]

【作用】上記の構成においては、同一の第1のレジスタ
指定に起因するレジスタ依存関係のある命令について
は、その命令の指定する第1のレジスタに代えて、命令
語の指定対象外となる第2のレジスタ(一時レジスタ)
が一時的に割当てられる。この第2のレジスタの割当て
により、レジスタ依存関係が解除されるため、命令語で
指定されていた第1のレジスタのみ用いたのでは、レジ
スタ依存関係のせいで並列に複数の命令を実行できない
ようなソフトウェアでも、装置が持つ複数命令の並列実
行能力を十分に生かして実行でき、性能向上を図ること
が可能となる
In the above arrangement, for an instruction having a register dependency resulting from the same first register specification, the instruction which is not specified by the instruction is replaced with the first register specified by the instruction. Register 2 (temporary register)
Are temporarily assigned. Since the allocation of the second register cancels the register dependency, if only the first register specified by the instruction word is used, a plurality of instructions cannot be executed in parallel due to the register dependency. Software can be executed by making full use of the parallel execution capability of multiple instructions of the device, and the performance can be improved.

【0011】。[0011]

【実施例】図1はこの発明の一実施例に係る複数命令の
並列実行機能を持つ情報処理装置の構成を示すブロック
図である。
FIG. 1 is a block diagram showing a configuration of an information processing apparatus having a function of executing a plurality of instructions in parallel according to an embodiment of the present invention.

【0012】図1において、1はプログラム、データ等
が格納されるメモリ、2はメモリ1からフェッチされた
命令をそのフェッチ順の並びで保持するための命令キュ
ーである。この命令キュー2は、後述する並列実行部4
で同時に実行可能な最大命令数以上の命令を保持可能な
構造となっている。命令キュー2内に保持された命令
は、実行されると、同キュー2から除かれる。
In FIG. 1, reference numeral 1 denotes a memory for storing programs, data, and the like, and reference numeral 2 denotes an instruction queue for holding instructions fetched from the memory 1 in a fetch order. The instruction queue 2 includes a parallel execution unit 4 described later.
And can hold more instructions than the maximum number of instructions that can be executed simultaneously. When executed, the instruction held in the instruction queue 2 is removed from the instruction queue 2.

【0013】なお、メモリ1と命令キュー2との間にキ
ャッシュメモリ(あるいは命令キャッシュ)を設け、キ
ャッシュメモリからフェッチされた命令が命令キュー2
に格納されるものであってもよい。
A cache memory (or an instruction cache) is provided between the memory 1 and the instruction queue 2, and instructions fetched from the cache memory are stored in the instruction queue 2.
May be stored.

【0014】3は命令キュー2から命令を順に取出して
デコード処理を行うデコーダである。このデコーダ3
は、複数命令の並列(同時)実行のために、対象命令の
データ依存関係、レジスタ依存関係を調べる周知の機能
の他に、レジスタ依存関係のある命令については、その
命令で指定するレジスタを後述する一時レジスタに置換
える制御を行う。
Reference numeral 3 denotes a decoder for sequentially taking out instructions from the instruction queue 2 and performing a decoding process. This decoder 3
In order to execute a plurality of instructions in parallel (simultaneously), in addition to the well-known function of examining the data dependence and the register dependence of a target instruction, a register designated by the instruction is described later for an instruction having a register dependence. Control to replace with a temporary register.

【0015】4はデコーダ3による複数の命令について
のデコード結果を受けて、複数命令を並列に実行するた
めの並列実行部である。並列実行部4は、デコーダ3か
ら与えられる各命令毎のデコード結果をもとに、対応す
る命令実行をそれぞれ独立に行うための複数の実行ユニ
ット4-1,4-2,4-3…を持つ。
Reference numeral 4 denotes a parallel execution unit for receiving a decoding result of a plurality of instructions by the decoder 3 and executing the plurality of instructions in parallel. The parallel execution unit 4 generates a plurality of execution units 4-1, 4-2, 4-3,... For independently executing the corresponding instructions based on the decoding result for each instruction given from the decoder 3. Have.

【0016】5は並列実行部4(内の実行ユニット4-
1,4-2,4-3…等)により操作されるデータを保持す
るためのレジスタ部である。レジスタ部5は、本装置上
で動くソフトウェアで認識される(即ち命令語のソース
またはデスティネーションレジスタ指定フィールドで指
定可能な)複数の一般レジスタ(レジスタA,B,C,
D…で表現)からなる一般レジスタ群51と、上記ソフ
トウェアから認識されない複数の一時レジスタ(レジス
タα,β…で表現)からなる一時レジスタ群52とによ
り構成される。
Reference numeral 5 denotes a parallel execution unit 4 (the execution unit 4-
1, 4-2, 4-3, etc.). The register unit 5 includes a plurality of general registers (registers A, B, C, and C) that are recognized by software running on the apparatus (that is, can be specified by a source or destination register specification field of an instruction word).
D) and a temporary register group 52 composed of a plurality of temporary registers (represented by registers α, β...) Which are not recognized by the software.

【0017】6は複数のエントリを持つ置換えテーブル
である。この置換えテーブル6の各エントリは、デコー
ダ3による置換えの対象となったレジスタ部5内の一般
レジスタのレジスタ名(レジスタ番号)と、この一般レ
ジスタに代えて用いられたレジスタ部5内の一時レジス
タのレジスタ名(レジスタ番号)と、該当エントリの情
報が有効であるか否かを示す有効フラグ(Vフラグ)の
各設定フィールドからなる。
Reference numeral 6 denotes a replacement table having a plurality of entries. Each entry of the replacement table 6 includes a register name (register number) of a general register in the register unit 5 to be replaced by the decoder 3 and a temporary register in the register unit 5 used in place of the general register. , And setting fields of a valid flag (V flag) indicating whether or not the information of the corresponding entry is valid.

【0018】7はデータ整合保証回路である。データ整
合保証回路7は、レジスタ部5内の一時レジスタの内容
を置換えテーブル6で示される置換えの対象となった一
般レジスタに書き戻すことで、データの整合性を保証す
る。次に、図1の構成の動作を、命令キュー2にフェッ
チされた命令列が図2(a)のようになっている場合を
例に、説明する。
Reference numeral 7 denotes a data matching assurance circuit. The data consistency assurance circuit 7 guarantees data consistency by writing back the contents of the temporary registers in the register unit 5 to the general registers which are the replacement targets shown in the replacement table 6. Next, the operation of the configuration of FIG. 1 will be described by taking as an example a case where the instruction sequence fetched into the instruction queue 2 is as shown in FIG.

【0019】なお、図2において、“add A,B,
A”で示される命令#1は、レジスタAとレジスタBの
両内容の和をレジスタAに格納することを指示する命令
であり、“and A,D,D”で示される命令#2
は、レジスタAとレジスタDの両内容をANDした結果
をレジスタDに格納することを指示する命令である。ま
た、“or C,E,A”で示される命令#3は、レジ
スタCとレジスタEの両内容をORした結果をレジスタ
Aに格納することを指示する命令であり、“sub
A,C,A”で示される命令#4は、レジスタAとレジ
スタCの両内容の差をレジスタAに格納することを指示
する命令である。
In FIG. 2, "add A, B,
The instruction # 1 indicated by "A" is an instruction to store the sum of the contents of both the register A and the register B in the register A, and the instruction # 2 indicated by "and A, D, D"
Is an instruction to store the result of ANDing the contents of both the registers A and D in the register D. The instruction # 3 indicated by “or C, E, A” is an instruction to store the result obtained by ORing the contents of the registers C and E into the register A, and “sub”
The instruction # 4 indicated by A, C, A "is an instruction to store the difference between the contents of the registers A and C in the register A.

【0020】今、図示せぬ命令フェッチ機構によってメ
モリ1から命令キュー2に命令列がフェッチされた結
果、サイクルT0 の開始時において、命令キュー2の内
容が図2(a)に示すようになっているものとする。こ
こで、命令キュー2内の命令列の並び順は、メモリ1か
らのフェッチ順であり、1命令ずつ順に実行されるもの
として作成された命令の順である。
Now, as a result of the instruction sequence being fetched from the memory 1 to the instruction queue 2 by an instruction fetch mechanism (not shown), the contents of the instruction queue 2 at the start of the cycle T0 are as shown in FIG. It is assumed that Here, the order of the instruction sequence in the instruction queue 2 is the order of fetching from the memory 1 and is the order of instructions created to be executed one by one in order.

【0021】さて、図2(a)に示す命令キュー2内の
命令列を従来方式で実行するには、図3(b)に示すよ
うに4サイクルを要し、同時実行は不可能である。その
理由は次の通りである。
Now, to execute the instruction sequence in the instruction queue 2 shown in FIG. 2A by the conventional method, four cycles are required as shown in FIG. 3B, and simultaneous execution is impossible. . The reason is as follows.

【0022】第1に、命令#2で用いる演算データの一
方はレジスタAに入っているが、このレジスタAの値は
命令#1(add命令)が実行されないと定まらないた
めである。即ち命令#1と命令#2との間にデータ依存
関係があるためである。
First, one of the operation data used in the instruction # 2 is stored in the register A, but the value of the register A cannot be determined unless the instruction # 1 (add instruction) is executed. That is, there is a data dependency between the instruction # 1 and the instruction # 2.

【0023】第2に、命令#3(or命令)でOR結果
を書込むレジスタAには、命令#1,#2(and命
令)で用いる演算データが入っているため、命令#1,
#2が実行されてから命令#3を実行しないと、命令#
1,#2で用いるレジスタAのデータが、命令#3で書
換えられてしまう可能性があるためである。即ち、命令
#1,#2と命令#3との間にレジスタ依存関係がある
ためである。
Second, since the register A in which the OR result is written by the instruction # 3 (or instruction) contains the operation data used by the instructions # 1 and # 2 (and instruction),
If the instruction # 3 is not executed after the execution of the instruction # 2, the instruction #
This is because the data of the register A used in the instructions # 1 and # 2 may be rewritten by the instruction # 3. That is, there is a register dependency between the instructions # 1 and # 2 and the instruction # 3.

【0024】第3に、命令#4(sub命令)で用いる
レジスタAの値は、命令#3(or命令)が実行されな
いと定まらないためである。即ち命令#3と命令#4と
の間にデータ依存関係があるためである。
Third, the value of the register A used in the instruction # 4 (sub instruction) cannot be determined unless the instruction # 3 (or instruction) is executed. That is, there is a data dependency between the instruction # 3 and the instruction # 4.

【0025】これに対して本実施例では、図2(a)に
示す命令キュー2内の命令列を、後述するレジスタ置換
えで図2(b)に示すように変更することにより、図3
(a)に示すように2サイクルで実行することができ
る。この動作につき、図4のフローチャートを参照して
詳述する。
On the other hand, in the present embodiment, the instruction sequence in the instruction queue 2 shown in FIG. 2A is changed as shown in FIG.
It can be executed in two cycles as shown in FIG. This operation will be described in detail with reference to the flowchart of FIG.

【0026】サイクルT0 においてデコーダ3は、命令
キュー2内の先頭の命令(#1)と2番目の命令(#
2)を比較してその依存関係を調べ、後の命令(#2)
が先の命令(#1)に対してデータ依存またはレジスタ
依存の関係にあるか否かをチェックする(ステップS
1)。もし、依存関係が存在しない場合には、デコーダ
3は、両命令を次のサイクル(第1サイクル)T1 で同
時に実行することを決定する(ステップS2)。
In the cycle T 0, the decoder 3 sends the first instruction (# 1) and the second instruction (#
2) is compared to check its dependency, and the subsequent instruction (# 2)
Check whether the instruction has a data-dependent or register-dependent relationship with the previous instruction (# 1) (step S1).
1). If there is no dependency, the decoder 3 decides to execute both instructions simultaneously in the next cycle (first cycle) T1 (step S2).

【0027】これに対し、図2(a)の例のように、先
の命令#1と後の命令#2との間に依存関係(ここでは
データ依存関係)のある場合には、デコーダ3は、依存
のあるレジスタ(ここではレジスタA)を後の命令#2
がソース指定しているか否かをチェックする(ステップ
S3)。
On the other hand, when there is a dependency (here, data dependency) between the preceding instruction # 1 and the following instruction # 2 as in the example of FIG. Replaces the dependent register (register A in this case) with the subsequent instruction # 2
It is checked whether or not is designated as a source (step S3).

【0028】図2(a)の例のように、先の命令#1と
の間で依存関係のあるレジスタ(A)を後の命令#2で
ソース指定している場合には、デコーダ3は、先の命令
#1については次の第1サイクルT1 で実行し、後の命
令#2については更に次の第2サイクルT2 で実行する
ことを決定し、その旨を内部記憶する(ステップS
4)。実際には、第1サイクルT1 で実行する命令の命
令キュー2内位置を示す情報を内部記憶、あるいは第1
サイクルT1 で実行する命令の命令キュー2内位置に固
有の例えばフラグビットをオンすればよい。
As shown in the example of FIG. 2A, when the source of the register (A) having a dependency relationship with the previous instruction # 1 is designated by the latter instruction # 2, the decoder 3 It is determined that the preceding instruction # 1 is to be executed in the next first cycle T1, and that the subsequent instruction # 2 is to be executed in the next second cycle T2, and that fact is internally stored (step S1).
4). Actually, information indicating the position of the instruction to be executed in the first cycle T1 in the instruction queue 2 is internally stored, or
For example, a flag bit specific to the position in the instruction queue 2 of the instruction executed in the cycle T1 may be turned on.

【0029】次にデコーダ3は、命令キュー2内の3番
目の命令(#3)と先行命令(#2)とについて、上記
ステップS1を実行し、命令#3が命令#2に対してデ
ータ依存またはレジスタ依存の関係にあるか否かをチェ
ックする。
Next, the decoder 3 executes the above-described step S1 for the third instruction (# 3) and the preceding instruction (# 2) in the instruction queue 2, and the instruction # 3 is Check if there is a dependency or register dependency.

【0030】もし、図2(a)の例のように、命令#2
と命令#3との間に依存関係(ここではレジスタ依存関
係)があり、且つ依存のあるレジスタ(A)を後の命令
#3でソース指定してない場合(ステップS3のNO判
定時)には、デコーダ3は、その命令#3以降の命令キ
ュー2内の命令のレジスタA指定部分を全て(ここでは
命令#3のデスティネーションレジスタA指定部分と、
命令#4のソース並びにデスティネーションレジスタA
指定部分)、一時レジスタ群52内の任意の一時レジス
タ、例えば一時レジスタαの指定に置換える(ステップ
S5)。このときの命令キュー2の内容を、図2(b)
に示す。
If the instruction # 2 is executed as shown in FIG.
When there is a dependency relationship (here, register dependency relationship) between the instruction and the instruction # 3, and the source of the dependent register (A) is not designated by the subsequent instruction # 3 (when NO is determined in step S3) Means that the decoder 3 sets all the register A designated portions of the instructions in the instruction queue 2 after the instruction # 3 (here, the destination register A designated portion of the instruction # 3,
Source and destination register A of instruction # 4
(Designated portion), and is replaced with the designation of an arbitrary temporary register in the temporary register group 52, for example, the temporary register α (step S5). The contents of the instruction queue 2 at this time are shown in FIG.
Shown in

【0031】次にデコーダ3は、命令キュー2内の第1
サイクルT1 での実行が決定された命令#1と(レジス
タAからレジスタαへの置換えが施された)命令#3と
を比較してその依存関係を調べ、命令#3が命令#1に
対してデータ依存またはレジスタ依存の関係にあるか否
かをチェックする(ステップS1)。
Next, the decoder 3 sets the first
The instruction # 1 determined to be executed in the cycle T1 is compared with the instruction # 3 (in which the register A has been replaced with the register α) to check the dependency thereof. It is checked whether there is a data-dependent or register-dependent relationship (step S1).

【0032】図2(b)の例のように、命令#1と命令
#3との間に依存関係が存在しない場合には、デコーダ
3は、命令#3を命令#1と同じ第1サイクルT1 で同
時に実行することを決定し、その旨を内部記憶する(ス
テップS2)。
If there is no dependency between the instruction # 1 and the instruction # 3 as in the example of FIG. 2B, the decoder 3 sets the instruction # 3 to the same first cycle as the instruction # 1. At T1, it is decided to execute them at the same time, and the fact is stored internally (step S2).

【0033】次にデコーダ3は、命令キュー2内の命令
#1と(命令#3の次の命令であって、レジスタAから
レジスタαへの置換えが施された)命令#4とを比較し
てその依存関係を調べ、命令#4が命令#1に対してデ
ータ依存またはレジスタ依存の関係にあるか否かをチェ
ックする(ステップS1)。
Next, the decoder 3 compares the instruction # 1 in the instruction queue 2 with the instruction # 4 (the instruction following the instruction # 3, in which the register A is replaced with the register α). Then, the dependence is checked to determine whether the instruction # 4 has a data dependence or a register dependence with respect to the instruction # 1 (step S1).

【0034】図2(b)の例のように、命令#1と命令
#4との間に依存関係が存在しない場合には、デコーダ
3は、命令#4を命令#1と同じ第1サイクルT1 で同
時に実行することを決定し、その旨を内部記憶する(ス
テップS2)。
When there is no dependency between the instruction # 1 and the instruction # 4 as in the example of FIG. 2B, the decoder 3 sets the instruction # 4 to the same first cycle as the instruction # 1. At T1, it is decided to execute them at the same time, and the fact is stored internally (step S2).

【0035】次にデコーダ3は、命令キュー2内の上記
レジスタ置換え後の命令#3と命令#4とを比較してそ
の依存関係を調べ、命令#4が命令#3に対してデータ
依存またはレジスタ依存の関係にあるか否かをチェック
する(ステップS1)。
Next, the decoder 3 compares the instruction # 3 and the instruction # 4 after the register replacement in the instruction queue 2 and examines the dependency thereof. It is checked whether there is a register-dependent relationship (step S1).

【0036】図2(b)の例のように、命令#3と命令
#4との間に依存関係が存在し、且つ依存のあるレジス
タ(α)を後の命令#4でソース指定している場合(ス
テップS3のYES判定時)には、デコーダ3は、先の
命令#3については第1サイクルT1 で実行し、後の命
令#4については次の第2サイクルT2 で実行すること
を決定し、その旨を内部記憶する(ステップS4)。こ
れにより、命令#4の実行サイクルをT1 とする先の決
定内容が解除される。
As shown in the example of FIG. 2B, there is a dependency between the instruction # 3 and the instruction # 4, and the source of the register (α) having the dependency is specified by the instruction # 4. If there is (YES determination in step S3), the decoder 3 executes the first instruction T3 in the first cycle T1 and executes the subsequent instruction # 4 in the next second cycle T2. The decision is made and that effect is stored internally (step S4). As a result, the content of the determination that the execution cycle of the instruction # 4 is set to T1 is released.

【0037】デコーダ3は、命令キュー2内の最後の命
令#3,#4の比較によりその実行サイクルを決定する
と、第1サイクルT1 で実行すべき命令、即ち命令#
1,#3を命令キュー2から取出してデコードし、命令
#1,#3のデコード結果を並列実行部4内の実行ユニ
ット4-i,4-j(i,jは1,2,3…のうちの互いに
異なる値)に渡して、次の第1サイクルT1 において該
当する命令を実行させる(ステップS6)。またデコー
ダ3は、現サイクル(T0 )の最後に、上記の処理にお
いて置換えの対象となったレジスタAと置換えに用いた
レジスタαのレジスタ名(レジスタ番号)の対を置換え
テーブル6内の空きエントリに登録し、Vフラグをオン
する(ステップS7)。
When the decoder 3 determines the execution cycle by comparing the last instructions # 3 and # 4 in the instruction queue 2, the decoder 3 executes the instruction to be executed in the first cycle T1, ie, the instruction #
1 and # 3 are taken out of the instruction queue 2 and decoded, and the decoding results of the instructions # 1 and # 3 are executed by the execution units 4-i and 4-j (i, j are 1, 2, 3...) In the parallel execution unit 4. ), And the corresponding instruction is executed in the next first cycle T1 (step S6). At the end of the current cycle (T0), the decoder 3 replaces the pair of the register A to be replaced in the above processing with the register name (register number) of the register α used for replacement by an empty entry in the replacement table 6. And turns on the V flag (step S7).

【0038】さてデコーダ3から並列実行部4内の実行
ユニット4-i,4-jに命令#1,#3のデコード結果が
渡されると、第1サイクルT1 において、実行ユニット
4-iでは、命令#1(add命令)の指定するレジスタ
A,Bの両内容を加算し、その加算結果を一般レジスタ
群51内のレジスタAに格納する動作が行われる。ま
た、実行ユニット4-jでは、命令#3(or命令)の指
定するレジスタC,Eの両内容をORし、そのOR結果
を一時レジスタ群52内のレジスタαに格納する動作が
行われる。デコーダ3により命令キュー3から命令#
1,#3が取出されると、後続の命令が命令キュー2に
フェッチされる。
When the decoding results of the instructions # 1 and # 3 are passed from the decoder 3 to the execution units 4-i and 4-j in the parallel execution unit 4, in the first cycle T1, the execution units 4-i An operation is performed in which both contents of the registers A and B specified by the instruction # 1 (add instruction) are added, and the addition result is stored in the register A in the general register group 51. The execution unit 4-j performs an operation of performing an OR operation on the contents of the registers C and E specified by the instruction # 3 (or instruction) and storing the OR result in the register α in the temporary register group 52. Instruction # from instruction queue 3 by decoder 3
When 1 and # 3 are fetched, the subsequent instruction is fetched into the instruction queue 2.

【0039】デコーダ3は、命令#1,#3が同時に実
行されるサイクルT1 において、その際に命令キュー2
に格納されている命令列(ここでは、命令#2,#4を
含む命令列)に対して、図4のフローチャートで示され
る上記(した命令#1〜#4に対するの)と同様の動作
を行う。但し、命令#4より後の命令中にレジスタA指
定部分が存在すれば、置換えテーブルに6に従ってレジ
スタα指定に置換えられる。
In the cycle T1 in which the instructions # 1 and # 3 are simultaneously executed, the decoder 3
4 (in this case, an instruction sequence including instructions # 2 and # 4), the same operation as described above (for the instructions # 1 to # 4) shown in the flowchart of FIG. Do. However, if the register A specified portion exists in the instruction after the instruction # 4, it is replaced with the register α specified according to 6 in the replacement table.

【0040】ここでは、命令#4より後の命令中にレジ
スタA指定部分が存在せず、各命令間にデータまたはレ
ジスタ依存関係が存在しないものとすると、デコーダ3
は、命令#2,#4(を含む命令列)を次のサイクル
(第2サイクルT2 )において同時に実行可能であるも
のと判断する。この場合、デコーダ3は、命令#2,#
4(を含む命令列)を命令キュー2から取出してデコー
ドし、そのデコード結果を並列実行部4内の実行ユニッ
トに渡して、次の第2サイクルT2 において該当する命
令を実行させる。
Here, it is assumed that the register A designation portion does not exist in the instruction after the instruction # 4 and that there is no data or register dependency between the instructions.
Determines that instructions # 2 and # 4 (including an instruction sequence) can be executed simultaneously in the next cycle (second cycle T2). In this case, the decoder 3 outputs instructions # 2 and #
4 (including an instruction sequence) is extracted from the instruction queue 2 and decoded, and the decoded result is passed to the execution unit in the parallel execution unit 4 to execute the corresponding instruction in the next second cycle T2.

【0041】この結果、命令#2,#4のデコード結果
が実行ユニット4-s,4-t(s,tは1,2,3…のう
ちの互いに異なる値)に渡された場合であれば、実行ユ
ニット4-sでは、命令#2(and命令)の指定するレ
ジスタA,Dの両内容をANDし、そのAND結果を一
般レジスタ群51内のレジスタDに格納する動作が行わ
れる。また、実行ユニット4-tでは、命令#4(sub
命令)の指定するレジスタα,Cの両内容の減算を行
い。その減算結果を一時レジスタ群52内のレジスタα
に格納する動作が行われる。
As a result, the decoding results of the instructions # 2 and # 4 are passed to the execution units 4-s and 4-t (s and t are different values among 1, 2, 3...). For example, the execution unit 4-s performs an operation of ANDing both contents of the registers A and D specified by the instruction # 2 (and instruction) and storing the AND result in the register D in the general register group 51. In the execution unit 4-t, the instruction # 4 (sub
Instruction), the contents of both registers α and C are subtracted. The result of the subtraction is stored in the register α in the temporary register group 52.
Is performed.

【0042】データ整合保証回路7は、並列実行部4内
の実行ユニット4-1,4-2,4-3…によるレジスタ部5
に対するアクセスを監視している。データ整合保証回路
7は、置換えテーブル6内でVフラグがオン状態にある
エントリに登録されているレジスタ、即ちレジスタA,
αへのアクセスが実行されないサイクル(例えば第3サ
イクルT3 )を検出すると、一時レジスタαの内容を一
般レジスタAに書き戻す。そしてデータ整合保証回路7
は、置換えテーブル6内のVフラグをオフする。
The data matching assurance circuit 7 includes a register unit 5 comprising execution units 4-1, 4-2, 4-3,... In the parallel execution unit 4.
Monitors access to. The data matching assurance circuit 7 registers the register registered in the entry whose V flag is in the on state in the replacement table 6, that is, the register A,
When a cycle in which access to α is not executed (for example, third cycle T3) is detected, the contents of temporary register α are written back to general register A. And the data matching assurance circuit 7
Turns off the V flag in the replacement table 6.

【0043】このように本実施例によれば、命令間にあ
るレジスタ依存等のために、従来であれば4サイクルを
要していた図2(a)の命令列を、図2(b)のように
レジスタ置換えを行うことにで、2サイクルで実行する
ことができる。即ち本実施例によれば、レジスタ依存関
係のある命令の指定する一般レジスタを一時レジスタに
一時的に置換える(代用する)ことにより、レジスタ依
存関係のために複数の実行ユニット4-iによる命令の同
時実行を妨げることが防止でき、性能向上が図れる。
As described above, according to the present embodiment, the instruction sequence of FIG. 2A, which conventionally required four cycles due to the dependence of registers between instructions, is replaced with the instruction sequence of FIG. By performing the register replacement as described above, the execution can be performed in two cycles. That is, according to the present embodiment, the general register designated by the instruction having the register dependence is temporarily replaced (substituted) by the temporary register, so that the instruction by the plurality of execution units 4-i due to the register dependence is obtained. Can be prevented, and the performance can be improved.

【0044】なお、一時レジスタは必ずしも複数設ける
必要はない。また、本実施例のように複数の一時レジス
タを設けた場合には、各々の一時レジスタを別々の一般
レジスタの代用とすることも可能である。また、同一の
一時レジスタを多重に代用することも可能である。
It is not always necessary to provide a plurality of temporary registers. When a plurality of temporary registers are provided as in the present embodiment, each temporary register can be substituted for a different general register. It is also possible to substitute the same temporary register for multiple uses.

【0045】[0045]

【発明の効果】以上詳述したようにこの発明によれば、
レジスタ依存関係のある命令の指定する一般レジスタ
(第1のレジスタ)を一時レジスタ(第2のレジスタ)
に一時的に置換えることにより、レジスタ依存関係のあ
る命令列を含むソフトウェアでも、そのソフトウェアを
改造することなく、装置が持つ複数命令の並列実行能力
を十分に生かして実行でき、性能向上を図ることができ
る。
As described in detail above, according to the present invention,
A general register (first register) specified by an instruction having a register dependency is a temporary register (second register)
By temporarily replacing the software, even software containing an instruction sequence that has a register dependency can be executed by making full use of the parallel execution capability of a plurality of instructions of the device without modifying the software, thereby improving performance. be able to.

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

【図1】この発明の一実施例に係る複数命令の並列実行
機能を持つ情報処理装置の構成を示すブロック図。
FIG. 1 is a block diagram showing a configuration of an information processing apparatus having a function of executing a plurality of instructions in parallel according to an embodiment of the present invention.

【図2】命令キュー2に格納された命令列を、レジスタ
置換え後の命令列と対比して示す図。
FIG. 2 is a diagram showing an instruction sequence stored in an instruction queue 2 in comparison with an instruction sequence after register replacement.

【図3】図2の命令列の実行順序を、従来方式による場
合と対比して示す図。
FIG. 3 is a diagram showing the execution sequence of the instruction sequence in FIG. 2 in comparison with the case of the conventional method.

【図4】動作を説明するためのフローチャート。FIG. 4 is a flowchart illustrating an operation.

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

2…命令キュー、3…デコーダ(置換え手段)、4…並
列実行部、4-1,4-2,4-3…実行ユニット、5…レジ
スタ部、6…置換えテーブル、7…データ整合保証回
路、51…一般レジスタ群(第1のレジスタの群)、5
2…一時レジスタ群(第2のレジスタの群)。
2 ... instruction queue, 3 ... decoder (replacement means), 4 ... parallel execution unit, 4-1, 4-2, 4-3 ... execution unit, 5 ... register unit, 6 ... replacement table, 7 ... data consistency assurance circuit , 51 ... general register group (first register group), 5
2: Temporary register group (second register group)

フロントページの続き (56)参考文献 特開 昭63−167934(JP,A) 特開 昭63−245529(JP,A) 特開 昭61−48037(JP,A) 特開 昭60−129838(JP,A) Robert.M.Keller著" Look−Ahead Process ors”,Computing Sur veys,Vol.7 No.4,De cember 1975(昭和50年)p. 177−195 (58)調査した分野(Int.Cl.7,DB名) G06F 9/38 Continuation of the front page (56) References JP-A-63-167934 (JP, A) JP-A-63-245529 (JP, A) JP-A-61-48037 (JP, A) JP-A-60-129938 (JP, A) , A) Robert. M. Keller, "Look-Ahead Processors", Computing Surves, Vol. 7 No. 4, December 1975 (1975) p. 177-195 (58) Fields investigated (Int. Cl. 7 , DB name) G06F 9/38

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 数命令の並列実行が可能な情報処理装
置において、 命令語で指定可能な複数の第1のレジスタと、 この第1のレジスタの代用として一時的に使用される、
命令語で指定不可能な少なくとも1つの第2のレジスタ
と、実行すべき命令列を順次デコードするデコーダであっ
て、前記第1のレジスタについてレジスタ依存関係のあ
る命令を検出し、その命令の指定する前記第1のレジス
タのみを前記第2のレジスタに一時的に置換えるデコー
ダと、 前記デコーダのデコード結果に基づいて複数命令を並列
に実行する複数の実行ユニットを有する並列実行部であ
って、前記デコーダによるレジスタ置換えがなされた命
令については、その置換え後の前記第2のレジスタを使
用して当該命令を実行する並列実行部と、 前記デコーダによる置き換えの対象となった第1のレジ
スタを示す情報と置換えに用いられた第2のレジスタを
示す情報の対が登録される置換えテーブルと、 前記置換えテーブルに登録されている情報対で示される
第1及び第2のレジスタへのアクセスが実行されないサ
イクルで、当該第2のレジスタの内容を対応する前記第
1のレジスタに書き戻すデータ整合保証回路とを具備す
ことを特徴とする情報処理装置。
1. A data processing apparatus capable of parallel execution of multiple instructions, a plurality of first registers can be specified with the instruction word, it is temporarily used as a substitute for the first register,
At least one second register that cannot be specified by an instruction word and a decoder that sequentially decodes an instruction sequence to be executed.
Therefore, the first register has a register dependency.
And the first register specified by the instruction.
For temporarily replacing only the data with the second register
And a plurality of instructions in parallel based on the decoding result of the decoder.
Parallel execution unit having a plurality of execution units to execute
Therefore, the instruction for register replacement by the decoder
For the instruction, the second register after the replacement is used.
A parallel execution unit for executing the instruction by using the first register which is replaced by the decoder.
The second register used for replacement with the information indicating the
Represented by a replacement table in which pairs of information shown is registered, the information pairs registered in the replacement table
The first and second registers are not accessed.
The contents of the second register corresponding to the second
And a data consistency assurance circuit for writing back to one register.
The information processing apparatus characterized by that.
JP3336739A 1991-12-19 1991-12-19 Information processing device with parallel execution function for multiple instructions Expired - Fee Related JP3015565B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3336739A JP3015565B2 (en) 1991-12-19 1991-12-19 Information processing device with parallel execution function for multiple instructions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3336739A JP3015565B2 (en) 1991-12-19 1991-12-19 Information processing device with parallel execution function for multiple instructions

Publications (2)

Publication Number Publication Date
JPH05173781A JPH05173781A (en) 1993-07-13
JP3015565B2 true JP3015565B2 (en) 2000-03-06

Family

ID=18302278

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3336739A Expired - Fee Related JP3015565B2 (en) 1991-12-19 1991-12-19 Information processing device with parallel execution function for multiple instructions

Country Status (1)

Country Link
JP (1) JP3015565B2 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Robert.M.Keller著"Look−Ahead Processors",Computing Surveys,Vol.7 No.4,December 1975(昭和50年)p.177−195

Also Published As

Publication number Publication date
JPH05173781A (en) 1993-07-13

Similar Documents

Publication Publication Date Title
JP2938426B2 (en) Method and apparatus for detecting and recovering interference between out-of-order load and store instructions
EP0380850B1 (en) Method and digital computer for preproccessing multiple instructions
JP2937485B2 (en) Method and apparatus for detecting and executing traps in a superscalar processor
JP3547482B2 (en) Information processing equipment
US5142633A (en) Preprocessing implied specifiers in a pipelined processor
JP3020212B2 (en) Digital data processing system and instruction sequence processing method
KR19980069764A (en) Instruction Scheduling Method and Processor Using Single Cycle Microinstruction
JPH0242569A (en) Context switching method and apparatus used for vector processing system
JPS58125148A (en) Apparatus for forecasting conditioned branch instruction
US6338134B1 (en) Method and system in a superscalar data processing system for the efficient processing of an instruction by moving only pointers to data
US6772317B2 (en) Method and apparatus for optimizing load memory accesses
US7546442B1 (en) Fixed length memory to memory arithmetic and architecture for direct memory access using fixed length instructions
JPH0496825A (en) Data processor
JP2889845B2 (en) Information processing device
US5761467A (en) System for committing execution results when branch conditions coincide with predetermined commit conditions specified in the instruction field
JPH09152973A (en) Method and device for support of speculative execution of count / link register change instruction
TWI836108B (en) Data structure relinquishing
JP3170472B2 (en) Information processing system and method having register remap structure
JP3015565B2 (en) Information processing device with parallel execution function for multiple instructions
US20030084272A1 (en) Handling problematic events in a data processing apparatus
US7415599B1 (en) Instruction operation and operand memory location determined based on preceding instruction operation and operand memory location
JP2904624B2 (en) Parallel processing unit
TW201734769A (en) Processing vector instructions
US6289439B1 (en) Method, device and microprocessor for performing an XOR clear without executing an XOR instruction
JP2843844B2 (en) Parallel processing unit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees