JP2001306321A - Processor - Google Patents
ProcessorInfo
- Publication number
- JP2001306321A JP2001306321A JP2000117489A JP2000117489A JP2001306321A JP 2001306321 A JP2001306321 A JP 2001306321A JP 2000117489 A JP2000117489 A JP 2000117489A JP 2000117489 A JP2000117489 A JP 2000117489A JP 2001306321 A JP2001306321 A JP 2001306321A
- Authority
- JP
- Japan
- Prior art keywords
- condition
- predication
- instruction
- register
- result
- 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
Links
Landscapes
- Advance Control (AREA)
- Executing Machine-Instructions (AREA)
Abstract
(57)【要約】
【課題】 従来のプレディケーションを行うプロセッサ
は、特に多方向分岐を実現するにあたって実行効率の向
上とプログラム効率の向上との両立ができないという問
題があった。
【解決手段】 本発明のプロセッサは、単一の操作指定
に基づいて少なくとも第1の条件でのプレディケーショ
ンと第2の条件でのプレディケーションとを行うプロセ
ッサであって、第1の条件と第2の条件とが互いに排他
的な関係ではないことを特徴とする。また本発明のプロ
セッサは、単一の操作指定に基づいて少なくとも第1の
条件でのプレディケーションと第2の条件でのプレディ
ケーションと第3の条件でのプレディケーションとを行
うプロセッサであって、第1の条件と第2の条件と第3
の条件とのいずれの2つも同一の条件ではないことを特
徴とする。
(57) [Summary] [PROBLEMS] A conventional processor for performing predication has a problem that it is impossible to achieve both an improvement in execution efficiency and an improvement in program efficiency particularly in implementing multidirectional branching. SOLUTION: The processor of the present invention is a processor that performs predication under at least a first condition and predication under a second condition based on a single operation designation. The two conditions are not mutually exclusive. Further, the processor of the present invention is a processor that performs at least predication under the first condition, predication under the second condition, and predication under the third condition based on a single operation designation, First condition, second condition and third condition
It is characterized in that none of the two conditions are the same.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、プレディケーショ
ンを用いたプロセッサに関すものであり、特にVLIW(Ver
y Long Instruction Word)方式のプロセッサに好適なプ
レディケーションの技術に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor using predication, and in particular, to a VLIW (Ver.
The present invention relates to a technique of predication suitable for a processor of a Long Instruction Word (y) type.
【0002】[0002]
【従来の技術】近年の電子技術の発展により、高性能な
プロセッサが普及し、あらゆる分野で用いられている。
そのようなプロセッサでは命令の並列処理により高い性
能を達成している。VLIWと呼ばれるアーキテクチャも命
令の並列処理の1つの形態であり、VLIWアーキテクチャ
を採るプロセッサ(以下、「VLIWプロセッサ」とい
う。)は、内部に複数の演算器を備え、1つの命令に置
かれたスロットと呼ばれる複数のフィールドに指定され
たオペレーションを同時並列に実行する。このようなVL
IWプロセッサの機械命令プログラムは、高級言語で記述
されたプログラムにおけるオペレーションレベルでの並
列性がコンパイラによって検出されスケジューリングさ
れた後に生成されたものである。機械命令プログラムは
実行コードとも呼ばれる。2. Description of the Related Art With the development of electronic technology in recent years, high-performance processors have become widespread and used in all fields.
Such a processor achieves high performance by parallel processing of instructions. An architecture called VLIW is also one form of instruction parallel processing. A processor employing the VLIW architecture (hereinafter referred to as a “VLIW processor”) includes a plurality of arithmetic units inside and a slot provided for one instruction. Performs the operations specified in multiple fields simultaneously, in parallel. Such a VL
The machine instruction program of the IW processor is generated after parallel processing at the operation level in a program described in a high-level language is detected and scheduled by a compiler. The machine instruction program is also called an execution code.
【0003】プレディケーションと呼ばれる技術は、分
岐命令を条件付き実行命令で置き換えることで機械命令
プログラムから分岐命令を見かけ上なくし、同時並列に
実行されるオペレーションの数を増やす技術であり、VL
IWプロセッサと組み合わせて用いられることが多い。条
件付き実行命令とは、条件が真ならば指定された機能を
実行し、偽ならば実行しない命令であり、その条件はプ
レディケーションレジスタと呼ばれるレジスタに保持さ
れる。[0003] A technique called predication is a technique in which a branch instruction is replaced with a conditional execution instruction so that a branch instruction is not apparent from a machine instruction program and the number of operations executed in parallel is increased.
Often used in combination with an IW processor. A conditional execution instruction is an instruction that executes a specified function if the condition is true and does not execute the function if the condition is false. The condition is held in a register called a predication register.
【0004】プレディケーションを用いた従来技術にお
けるVLIWプロセッサは、例えば、日経BP社刊、日経エレ
クトロニクス1999年11月29日号138頁〜153頁に記された
ものが知られている。A VLIW processor in the prior art using predication is known, for example, as described in Nikkei BP, Nikkei Electronics, November 29, 1999, pp. 138-153.
【0005】図7は、上記した従来のプロセッサの機械
命令プログラムの一例となるリストであり、図7の
(a)、(b)いずれも図3に示すフローチャートを実
現するものである。但し、ここでのプロセッサは、1命
令中のスロット数が常に3であるものとしている。図3
は、変数Yが正か0か負かを判断し、正ならば変数Xから
変数Pを減算して変数Xに代入する処理を行い、0ならば
変数Xを変数Yに代入する処理を行い、負ならば変数Xに
変数Pを加算して変数Xに代入する処理を行うという3方
向分岐の処理例のフローチャートである。ここで、変数
XはレジスタR1に、変数YはレジスタR2に、変数Pはレジ
スタR3に割り付けされているものとし、レジスタR0はゼ
ロレジスタ(内容が常に0であるレジスタ)であるとす
る。なお、図3では3方向分岐と分岐直後の処理だけを
図示しているが、それらの前後にも何らかの処理が先行
および後続するものとする。FIG. 7 is a list as an example of a machine instruction program of the above-mentioned conventional processor, and both (a) and (b) of FIG. 7 realize the flowchart shown in FIG. However, the processor here assumes that the number of slots in one instruction is always three. FIG.
Determines whether the variable Y is positive, 0, or negative. If it is positive, subtracts the variable P from the variable X and assigns it to the variable X. If it is 0, assigns the variable X to the variable Y. It is a flowchart of a processing example of a three-way branch in which a variable P is added to a variable X and substituted for the variable X if negative. Where the variable
It is assumed that X is assigned to the register R1, the variable Y is assigned to the register R2, the variable P is assigned to the register R3, and the register R0 is a zero register (a register whose contents are always 0). Although FIG. 3 shows only the three-way branch and the process immediately after the branch, it is assumed that some process precedes and succeeds before and after the three-way branch.
【0006】図7(a)は、3方向分岐を2段階の比較
で実現するものである。命令1の第3スロットは、レジ
スタR2が0より大きいという条件に対して真ならばプレ
ディケーションレジスタp0を1に、偽ならばプレディケ
ーションレジスタp1を1にする比較オペレーションであ
る。命令2の第1スロットは、プレディケーションレジ
スタp0が1の場合にのみレジスタR1からレジスタR3の減
算結果をレジスタR1に格納する減算オペレーションであ
り、第2スロットは、プレディケーションレジスタp1が
1の場合にのみレジスタR2が0に等しいという条件に対
して真ならばプレディケーションレジスタp2を1に、偽
ならばプレディケーションレジスタp3を1にする比較オ
ペレーションである。命令3の第1スロットは、プレデ
ィケーションレジスタp2が1の場合にのみレジスタR1を
レジスタR2に転送する転送オペレーションであり、第2
スロットは、プレディケーションレジスタp3が1の場合
にのみレジスタR1とレジスタR3の加算結果をレジスタR1
に格納する加算オペレーションである。上記以外のスロ
ットは、図3の処理の前後の処理に基づくオペレーショ
ンであって同一命令内の上記の各オペレーションと並列
に実行し得る何らかのオペレーション(有意なオペレー
ションがない場合はノーオペレーションとなる)であ
り、ここではOPと記す。OPオペレーションではプレディ
ケーションを行わないものとする。従来のプロセッサは
これらの命令列を1サイクルに1命令ずつ実行する。第
1サイクルで1つ目の比較オペレーションを実行し、そ
れが真ならば第2サイクルで減算オペレーションを実行
する。偽ならば第2サイクルで比較オペレーションを実
行し、それが真ならば第3サイクルで転送オペレーショ
ンを実行し、偽ならば第3サイクルで加算オペレーショ
ンを実行する。1つ目の比較オペレーションが真の時は
第3サイクルは何もしない。なお、OPオペレーションの
動作については主眼ではないので説明を省略する。FIG. 7 (a) realizes three-way branching by two-stage comparison. The third slot of instruction 1 is a comparison operation that sets the predication register p0 to 1 if true and the predication register p1 to 1 if false for the condition that register R2 is greater than zero. The first slot of the instruction 2 is a subtraction operation for storing the subtraction result of the register R3 from the register R1 into the register R1 only when the predication register p0 is 1, and the second slot is used when the predication register p1 is 1. Is a comparison operation that sets the predication register p2 to 1 if true for the condition that the register R2 is equal to 0, and sets the predication register p3 to 1 if false. The first slot of the instruction 3 is a transfer operation for transferring the register R1 to the register R2 only when the predication register p2 is 1,
The slot stores the addition result of register R1 and register R3 in register R1 only when predication register p3 is 1.
Is an addition operation to be stored. Slots other than those described above are operations based on the processing before and after the processing in FIG. 3 and which can be executed in parallel with each of the above operations in the same instruction (no operation if there is no significant operation). Yes, here we call it OP. Predication is not performed in the OP operation. Conventional processors execute these instruction sequences one instruction at a time in one cycle. The first comparison operation is performed in the first cycle, and if it is true, the subtraction operation is performed in the second cycle. If false, a compare operation is performed in the second cycle; if it is true, a transfer operation is performed in the third cycle; if false, an add operation is performed in the third cycle. If the first compare operation is true, the third cycle does nothing. Since the operation of the OP operation is not the main focus, the description is omitted.
【0007】図7(b)は、3方向分岐を3つの比較を
同時に行うことで実現するものである。命令1の第1ス
ロットは、レジスタR2が0より大きいという条件に対し
て真ならばプレディケーションレジスタp0を1に、偽な
らばプレディケーションレジスタp1を1にする比較オペ
レーションであり、第2スロットは、レジスタR2が0に
等しいという条件に対して真ならばプレディケーション
レジスタp2を1に、偽ならばプレディケーションレジス
タp3を1にする比較オペレーションであり、第3スロッ
トは、レジスタR2が0より小さいという条件に対して真
ならばプレディケーションレジスタp4を1に、偽ならば
プレディケーションレジスタp5を1にする比較オペレー
ションである。命令2の第1スロットは、プレディケー
ションレジスタp0が1の場合にのみレジスタR1からレジ
スタR3の減算結果をレジスタR1に格納する減算オペレー
ションであり、第2スロットは、プレディケーションレ
ジスタp2が1の場合にのみレジスタR1をレジスタR2に転
送する転送オペレーションであり、第3スロットは、プ
レディケーションレジスタp4が1の場合にのみレジスタ
R1とレジスタR3の加算結果をレジスタR1に格納する加算
オペレーションである。従来のプロセッサは、第1サイ
クルで3つの比較オペレーションを並列に実行し、第2
サイクルで1つ目の比較オペレーションが真ならば減算
オペレーションを、2つ目の比較オペレーションが真な
らば転送オペレーションを、3つ目の比較オペレーショ
ンが真ならば加算オペレーションを実行する。FIG. 7 (b) shows a three-way branch realized by performing three comparisons simultaneously. The first slot of instruction 1 is a comparison operation that sets the predication register p0 to 1 if true and the predication register p1 to 1 if false for the condition that register R2 is greater than 0, and the second slot is Is a comparison operation that sets the predication register p2 to 1 if true for the condition that the register R2 is equal to 0, and sets the predication register p3 to 1 if false, and the third slot is that the register R2 is smaller than 0. Is true, the predication register p4 is set to 1 if true, and the predication register p5 is set to 1 if false. The first slot of the instruction 2 is a subtraction operation for storing the subtraction result of the register R3 from the register R1 into the register R1 only when the predication register p0 is 1, and the second slot is used when the predication register p2 is 1. Is a transfer operation that transfers the register R1 to the register R2 only when the predication register p4 is 1.
This is an addition operation for storing the addition result of R1 and the register R3 in the register R1. Conventional processors perform three comparison operations in parallel in a first cycle and a second
In the cycle, a subtraction operation is performed if the first comparison operation is true, a transfer operation is performed if the second comparison operation is true, and an addition operation is performed if the third comparison operation is true.
【0008】[0008]
【発明が解決しようとする課題】しかしながら、上記の
従来技術では、実行効率の向上とプログラム効率の向上
との両立ができないという問題がある。実行効率とは、
特定の処理をどれだけの実行時間で実現できるかの尺度
を意味し、プログラム効率とは特定の処理をどれだけの
サイズのプログラムで実現できるかの尺度を意味する。However, in the above-mentioned prior art, there is a problem that it is impossible to achieve both an improvement in execution efficiency and an improvement in program efficiency. What is execution efficiency?
The term “program efficiency” refers to a measure of how long a specific process can be realized, and the term “program efficiency” refers to a measure of the size of a program that can realize a specific process.
【0009】図7(a)に示す機械命令プログラムで
は、図3のフローチャートに示す3方向分岐および分岐
直後の処理を5つのスロットで達成できプログラム効率
は高いものの実行に3サイクルを要するため実行効率が
低い。一方、図7(b)に示す機械命令プログラムで
は、同処理を2サイクルで実行でき実行効率は高いもの
の必要な処理に6つのスロットを要するためプログラム
効率が低い。In the machine instruction program shown in FIG. 7A, the three-way branch and the processing immediately after the branch shown in the flowchart of FIG. 3 can be achieved in five slots, and although the program efficiency is high, the execution requires three cycles. Is low. On the other hand, in the machine instruction program shown in FIG. 7B, the same processing can be executed in two cycles and the execution efficiency is high, but the required processing requires six slots, so the program efficiency is low.
【0010】そこで、本発明はかかる点に鑑みてなされ
たものであり、実行効率の向上とプログラム効率の向上
との両立を図るプロセッサを提供することである。なお
上記のスロット数には、3方向分岐および分岐直後の処
理以外の処理に拠るOPオペレーションは比較の主眼では
ないので含めていない。SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a processor which achieves both improvement in execution efficiency and improvement in program efficiency. Note that the above-mentioned number of slots does not include the OP operation based on the processing other than the processing in the three-way branch and the processing immediately after the branch because it is not the main focus of the comparison.
【0011】本発明の前記並びにその他の目的と新規な
特徴は、本明細書の記述及び添付図面から明らかになる
であろう。The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.
【0012】[0012]
【課題を解決するための手段】上記課題を解決するため
に、本発明の第1のプロセッサは、単一の操作指定に基
づいて少なくとも第1の条件でのプレディケーションと
第2の条件でのプレディケーションとを行うプロセッサ
であって、前記第1の条件と前記第2の条件とが互いに
排他的な関係ではないことを特徴とする。In order to solve the above-mentioned problems, a first processor of the present invention comprises a predication under at least a first condition and a predication under a second condition based on a single operation designation. A processor for performing predication, wherein the first condition and the second condition are not mutually exclusive.
【0013】また本発明の第2のプロセッサは、単一の
操作指定に基づいて少なくとも第1の条件でのプレディ
ケーションと第2の条件でのプレディケーションと第3
の条件でのプレディケーションとを行うプロセッサであ
って、前記第1の条件と前記第2の条件と前記第3の条
件とのいずれの2つも同一の条件ではないことを特徴と
する。[0013] The second processor of the present invention may further include a predication under at least the first condition, a predication under the second condition, and a third predicate based on a single operation designation.
A processor that performs predication under the following condition, wherein none of the first condition, the second condition, and the third condition are the same condition.
【0014】また本発明の第3のプロセッサは、単一の
操作指定に基づいて第1の条件でのプレディケーション
と第2の条件でのプレディケーションと第3の条件での
プレディケーションとを行うプロセッサであって、前記
第1の条件と前記第2の条件と前記第3の条件との3つ
の和集合により全集合を形成することを特徴とする。The third processor of the present invention performs predication under the first condition, predication under the second condition, and predication under the third condition based on a single operation designation. A processor, wherein a total set is formed by three unions of the first condition, the second condition, and the third condition.
【0015】第3のプロセッサにおいて、前記操作指定
は第1オペランドと第2オペランドとの比較操作に関す
るものであり、前記第1の条件は第1オペランドが第2
オペランドより大きいという条件であり、前記第2の条
件は第1オペランドと第2オペランドとが等しいという
条件であり、前記第3の条件は第1オペランドが第2オ
ペランドより小さいという条件であるとしてもよい。In the third processor, the operation specification relates to a comparison operation between a first operand and a second operand, and the first condition is that the first operand is the second operand.
Even if the second condition is a condition that the first operand and the second operand are equal, and the third condition is a condition that the first operand is smaller than the second operand, Good.
【0016】また第3のプロセッサにおいて、前記操作
指定は演算操作に関するものであり、前記第1の条件は
演算結果が正という条件であり、前記第2の条件は演算
結果がゼロという条件であり、前記第3の条件は演算結
果が負という条件であるとしてもよい。In the third processor, the operation designation is related to an arithmetic operation, the first condition is a condition that the operation result is positive, and the second condition is a condition that the operation result is zero. The third condition may be a condition that the operation result is negative.
【0017】第1から第3の各プロセッサにおいて、前
記操作指定は演算操作に関するものであり、演算結果が
オーバーフローするという条件をプレディケーションの
条件に含むとしてもよい。In each of the first to third processors, the operation designation relates to an arithmetic operation, and a condition that an arithmetic result overflows may be included in the condition of the predication.
【0018】本発明の第4のプロセッサは、単一の演算
操作指定に基づいて第1の条件でのプレディケーション
と第2の条件でのプレディケーションと第3の条件での
プレディケーションと第4の条件でのプレディケーショ
ンと第5の条件でのプレディケーションとを行うプロセ
ッサであって、前記第1の条件は演算結果が正方向にオ
ーバーフローするという条件であり、前記第2の条件は
演算結果がオーバーフローしない正であるという条件で
あり、前記第3の条件は演算結果がゼロという条件であ
り、前記第4の条件は演算結果がオーバーフローしない
負であるという条件であり、前記第5の条件は演算結果
が負方向にオーバーフローするという条件であることを
特徴とする。A fourth processor according to the present invention, based on a single arithmetic operation specification, performs predication under the first condition, predication under the second condition, predication under the third condition, and the fourth A processor that performs predication under the condition (1) and predication under the condition (5), wherein the first condition is a condition that the operation result overflows in the positive direction, and the second condition is a condition that the operation result overflows. Is a positive condition that does not overflow, the third condition is a condition that the operation result is zero, the fourth condition is a condition that the operation result is negative that does not overflow, and the fifth condition is Is a condition that the operation result overflows in the negative direction.
【0019】第1のプロセッサにおいて、前記第1の条
件と前記第2の条件とがともに命令中に明示的に指定さ
れるとしてもよい。In the first processor, both the first condition and the second condition may be explicitly specified in an instruction.
【0020】ここで、前記第1の条件の指定と前記第2
の条件の指定とを、通常の操作指定のための命令上の領
域を拡張して行うとしてもよい。Here, the designation of the first condition and the second condition
May be performed by extending the area on the instruction for specifying the normal operation.
【0021】本発明の第5のプロセッサは、単一の操作
指定に基づいて少なくとも1つの条件でのプレディケー
ションを行うプロセッサであって、前記操作指定に伴う
オペランド指定のための命令上の領域と前記プレディケ
ーションに伴う条件成否結果の格納先指定のための命令
上の領域とを共有することを特徴とする。A fifth processor according to the present invention is a processor that performs predication under at least one condition based on a single operation specification, and includes a region on an instruction for specifying an operand accompanying the operation specification. It is characterized in that it shares an area on an instruction for designating a storage location of a result of the success or failure of the condition accompanying the prediction.
【0022】第5のプロセッサにおいて、前記操作指定
は第1ソースオペランドと第2ソースオペランドとデス
ティネーションオペランドとの3つのオペランド指定の
ための命令上の領域を伴い、前記第2ソースオペランド
の指定のための命令上の領域と前記プレディケーション
に伴う条件成否結果の格納先指定のための命令上の領域
とを共有するとしてもよい。In the fifth processor, the operation specification includes an instruction area for specifying three operands of a first source operand, a second source operand, and a destination operand. And a region on the instruction for specifying the storage location of the result of the success or failure of the condition accompanying the predication may be shared.
【0023】また第5のプロセッサにおいて、前記操作
指定は第1ソースオペランドと第2ソースオペランドと
デスティネーションオペランドとの3つのオペランド指
定のための命令上の領域を伴い、前記デスティネーショ
ンオペランドの指定のための命令上の領域と前記プレデ
ィケーションに伴う条件成否結果の格納先指定のための
命令上の領域とを共有するとしてもよい。In the fifth processor, the operation specification may include an instruction area for specifying three operands of a first source operand, a second source operand, and a destination operand. And a region on the instruction for specifying the storage location of the result of the success or failure of the condition accompanying the predication may be shared.
【0024】第5のプロセッサおよびその各上記実施態
様のプロセッサにおいて、前記共有に係る命令上の領域
がオペランド指定のための領域であるかプレディケーシ
ョンに伴う条件成否結果の格納先指定のための領域であ
るかを、前記操作指定によって指定される操作が比較操
作であるか否かに基づいて決定するとしてもよい。In the fifth processor and the processor according to each of the above-described embodiments, the area on the shared instruction is an area for specifying an operand or an area for specifying a storage destination of a condition success / failure result accompanying predication. May be determined based on whether or not the operation specified by the operation specification is a comparison operation.
【0025】ここで、前記操作指定によって指定される
操作が比較操作である場合に、前記共有に係る命令上の
領域をプレディケーションに伴う条件成否結果の格納先
指定のための領域とするとしてもよい。Here, when the operation specified by the operation specification is a comparison operation, the area on the instruction related to the sharing may be an area for specifying a storage destination of a condition success / failure result accompanying the predication. Good.
【0026】第1のプロセッサにおいて、前記第1の条
件でのプレディケーションに伴う条件成否結果の格納先
と前記第2の条件でのプレディケーションに伴う条件成
否結果の格納先とがともに命令中に明示的に指定される
としてもよい。In the first processor, the storage destination of the condition success / failure result accompanying the predication under the first condition and the storage destination of the condition success / failure result accompanying the predication under the second condition are both included in the instruction. It may be specified explicitly.
【0027】前記の各プロセッサにおいて、前記プロセ
ッサは、複数の操作を1つの命令中に指定する長語命令
形式のプロセッサであるとしてもよい。In each of the above processors, the processor may be a long instruction processor that specifies a plurality of operations in one instruction.
【0028】[0028]
【発明の実施の形態】以下、本発明の実施の形態につい
て、図面を用いて詳細に説明する。 1.命令の構成 図1は本発明の実施形態におけるプロセッサの命令構成
図である。同図(a)は命令フォーマットであり、1つ
の命令は、それぞれが21ビットの3つのスロットと1
ビットの未使用フィールド(図ではudで示される)の合
計64ビットの命令語長からなる。いずれのスロットも
基本的に均等にオペレーションを指定することができ
る。21ビットの各スロットは、4ビットのオペコード
(opフィールド)と4ビットのデスティネーションオペ
ランド(dstフィールド)と4ビットの第1ソースオペ
ランド(sraフィールド)と4ビットの第2ソースオペ
ランドまたはプレディケーションデスティネーションオ
ペランド(srb/pdフィールド)と1ビットの制御フィー
ルド(cフィールド)と4ビットの評価プレディケーシ
ョンオペランド(qpフィールド)からなり、同図(b)
に示すビット列が割り付けられている。cフィールド
は、srb/pdフィールドが第2ソースオペランドであるか
プレディケーションデスティネーションオペランドであ
るかを切り換えるフィールドであり、プレディケーショ
ンデスティネーションオペランドを指定しない場合は3
オペランド形式のオペレーションが実現できる。プレデ
ィケーションデスティネーションオペランドを指定する
場合はdstフィールドを必要に応じて第2ソースオペラ
ンドとして共用する2オペランド形式となる。Embodiments of the present invention will be described below in detail with reference to the drawings. 1. 1. Instruction Configuration FIG. 1 is an instruction configuration diagram of the processor according to the embodiment of the present invention. FIG. 7A shows an instruction format, in which one instruction is composed of three slots each having 21 bits.
An unused word field (indicated by ud in the figure) consists of a total of 64 bits of instruction word. Each slot can basically specify an operation equally. Each 21-bit slot has a 4-bit opcode (op field), a 4-bit destination operand (dst field), a 4-bit first source operand (sra field), and a 4-bit second source operand or predication destination. It consists of a nation operand (srb / pd field), a 1-bit control field (c field), and a 4-bit evaluation predication operand (qp field).
Are assigned. The c field is a field for switching whether the srb / pd field is the second source operand or the predication destination operand, and is 3 when no predication destination operand is specified.
Operand type operation can be realized. When a predication destination operand is specified, a two-operand format is used in which the dst field is shared as a second source operand as needed.
【0029】各フィールドは次の機能を有する。opフィ
ールドは0000のMOV(転送オペレーション)から1111のN
OP(ノーオペレーション)まで16種類が割り当てられ
ている。なお、CMPL(条件指定比較オペレーション)は
例外的に第1スロットにのみ指定できる。dstフィール
ドおよびsraフィールドはレジスタR0からレジスタR15の
1つを選択する。ここでレジスタR0はゼロレジスタ(内
容が常に0であるレジスタ)である。srb/pdフィールド
は、cフィールドが0の場合は第2ソースオペランドを
指定するものとして機能し、レジスタR0からレジスタR1
5の1つを選択する。cフィールドが1の場合はプレディ
ケーションデスティネーションオペランドを指定するも
のとして機能し、オペレーション後の条件成立の真偽を
格納する先としてプレディケーションレジスタp0からプ
レディケーションレジスタp14の1つを選んで指定する
ものである(cフィールドが1の場合、srb/pdフィール
ドの1111は無効)。qpフィールドは、0000から1110の場
合は、オペレーション前に条件成立の真偽が評価される
プレディケーションレジスタとしてプレディケーション
レジスタp0からプレディケーションレジスタp14の1つ
を選んで指定するものである。qpフィールドが1111の場
合は常に真(条件成立)として扱い、プレディケーショ
ンを行わない。Each field has the following functions. The op field is from 0000 MOV (transfer operation) to 1111 N
Sixteen types are assigned to OP (no operation). Note that the CMPL (conditional comparison operation) can be exceptionally specified only for the first slot. The dst and sra fields select one of registers R0 through R15. Here, the register R0 is a zero register (a register whose content is always 0). The srb / pd field functions as specifying the second source operand when the c field is 0, and registers R1 to R1.
Select one of the five. When the c field is 1, it functions as the designation of the predication destination operand, and selects and designates one of the predication registers p0 to p14 as the destination for storing the truth of the satisfaction of the condition after the operation. (If the c field is 1, 1111 of the srb / pd field is invalid). In the qp field, in the case of 0000 to 1110, one of the predication registers p0 to p14 is selected and designated as a predication register for evaluating whether the condition is satisfied before the operation. If the qp field is 1111, it is always treated as true (condition fulfilled) and no predication is performed.
【0030】次に、プレディケーションレジスタへ反映
される条件とその反映の仕方について述べる。図1
(b)のopフィールドのビット列に併記するように、c
フィールドが1の場合、2つ以上の条件の真偽がプレデ
ィケーションレジスタに反映される。ADD、SUB、MUL、D
IVオペレーションについては、演算結果が正である条件
の真偽をsrb/pdフィールドで指定されるプレディケーシ
ョンレジスタに、演算結果が0である条件の真偽をsrb/
pdフィールドで指定されるプレディケーションレジスタ
の次の番号のプレディケーションレジスタに、演算結果
が負である条件の真偽をsrb/pdフィールドで指定される
プレディケーションレジスタの2つ次の番号のプレディ
ケーションレジスタにそれぞれ格納する。ADDV、SUBVオ
ペレーションについては、演算結果が正方向にオーバー
フローした条件の真偽をsrb/pdフィールドで指定される
プレディケーションレジスタに、演算結果がオーバーフ
ローしない正である条件の真偽をsrb/pdフィールドで指
定されるプレディケーションレジスタの次の番号のプレ
ディケーションレジスタに、演算結果が0である条件の
真偽をsrb/pdフィールドで指定されるプレディケーショ
ンレジスタの2つ次の番号のプレディケーションレジス
タに、演算結果がオーバーフローしない負である条件の
真偽をsrb/pdフィールドで指定されるプレディケーショ
ンレジスタの3つ次の番号のプレディケーションレジス
タに、演算結果が負方向にオーバーフローした条件の真
偽をsrb/pdフィールドで指定されるプレディケーション
レジスタの4つ次の番号のプレディケーションレジスタ
にそれぞれ格納する。AND、OR、XORオペレーションにつ
いては、演算結果が0である条件の真偽をsrb/pdフィー
ルドで指定されるプレディケーションレジスタに、非0
である条件の真偽をsrb/pdフィールドで指定されるプレ
ディケーションレジスタの次の番号のプレディケーショ
ンレジスタに格納する。CMPオペレーションについて
は、dstフィールドで指定されたオペランドよりsraフィ
ールドで指定されたオペランドが大きい条件の真偽をsr
b/pdフィールドで指定されるプレディケーションレジス
タに、dstフィールドで指定されたオペランドとsraフィ
ールドで指定されたオペランドとが等しい条件の真偽を
srb/pdフィールドで指定されるプレディケーションレジ
スタの次の番号のプレディケーションレジスタに、dst
フィールドで指定されたオペランドよりsraフィールド
で指定されたオペランドが小さい条件の真偽をsrb/pdフ
ィールドで指定されるプレディケーションレジスタの2
つ次の番号のプレディケーションレジスタに格納する。Next, conditions reflected in the predication register and how to reflect the conditions will be described. FIG.
As shown in the bit string of the op field in (b), c
If the field is 1, the truth of two or more conditions is reflected in the predication register. ADD, SUB, MUL, D
For the IV operation, the truth of the condition that the operation result is positive is stored in the predication register specified by the srb / pd field, and the truth of the condition that the operation result is 0 is stored in srb / pd.
In the predication register next to the predication register specified by the pd field, the truth of the condition that the operation result is negative is added to the predication register next to the predication register specified by the srb / pd field. Store them in registers. For ADDV and SUBV operations, the true / false condition of the operation result overflowing in the positive direction is stored in the predication register specified by the srb / pd field, and the true / false condition of the positive condition that the operation result does not overflow is stored in the srb / pd field. In the predication register next to the predication register specified by, the truth of the condition that the operation result is 0 is stored in the predication register next to the predication register specified by the srb / pd field. The true / false condition of the condition that the operation result does not overflow is stored in the predication register of the third next number to the predication register specified by the srb / pd field. Fourth next to the predication register specified in the srb / pd field Respectively stored in the predication register number. For AND, OR, and XOR operations, the true / false of the condition that the operation result is 0 is stored in the predication register specified by the srb / pd field.
Is stored in the predication register next to the predication register specified by the srb / pd field. For the CMP operation, sr determines whether the operand specified in the sra field is greater than the operand specified in the dst field.
In the predication register specified by the b / pd field, the truth of the condition that the operand specified by the dst field is equal to the operand specified by the sra field is set.
dst is added to the predication register next to the predication register specified by the srb / pd field.
Determines whether the condition that the operand specified by the sra field is smaller than the operand specified by the field is 2 in the predication register specified by the srb / pd field.
The next number is stored in the predication register.
【0031】CMPLオペレーションは例外的に第1と第2
の2つのスロットを用いて指定するオペレーションであ
って任意の複数の条件を指定することができるが、オペ
コードは第1スロットのみ指定可能である。比較する第
1条件が第2スロットのdst2フィールドに、第2条件が
第2スロットのsra2フィールドに指定され、いずれも図
1(b)に示すように0000がeq(等しい)から1001(符
号なしで小なりイコール)まで10種類指定できる。こ
こでは、数値を符号付きと見るか符号なしと見るかで大
小関係が異なるため、ここでは大小関係の4条件につい
ては符号付きと符号なしの2種類ずつを用意している。
第1条件の真偽を第1スロットのsrb/pd1フィールドで
指定されるプレディケーションレジスタに、第2条件の
真偽を第1スロットのsrb/pd1フィールドで指定される
プレディケーションレジスタの次の番号のプレディケー
ションレジスタに格納する。The CMPL operation is exceptionally the first and second
The operation is specified using the two slots, and an arbitrary plurality of conditions can be specified. However, the operation code can specify only the first slot. The first condition to be compared is specified in the dst2 field of the second slot, and the second condition is specified in the sra2 field of the second slot. As shown in FIG. 1B, 0000 is eq (equal) to 1001 (unsigned). You can specify 10 types up to a small equal. Here, since the magnitude relation differs depending on whether the numerical value is regarded as signed or unsigned, here two types of signed relation and unsigned are prepared for the four conditions of magnitude relation.
The truth of the first condition is stored in the predication register specified by the srb / pd1 field of the first slot, and the truth of the second condition is written next to the predication register specified by the srb / pd1 field of the first slot. In the predication register.
【0032】cフィールドが1のときのその他のオペレ
ーションおよびcフィールドが0のときの全てのオペレ
ーションについては、プレディケーションレジスタへの
反映は行わない。なお、プレディケーションレジスタに
格納する値は、いずれのオペレーションも真の時は1、
偽の時は0とする。プレディケーションレジスタの番号
とはプレディケーションレジスタp0からプレディケーシ
ョンレジスタp14に対応する0から14の番号を指し、
14の次の番号は0にラップラウンドするものとする。The other operations when the c field is 1 and all the operations when the c field is 0 are not reflected in the predication register. Note that the value stored in the predication register is 1 when all operations are true.
If false, set to 0. The numbers of the predication registers refer to numbers from 0 to 14 corresponding to the predication registers p0 to p14, respectively.
The number following 14 is wrapped round to 0.
【0033】NOPオペレーションはopフィールドが1111
であれば他のフィールドは何でもよい。 2.プロセッサの構成 図2は、同実施形態におけるプロセッサの概略構成図で
ある。In the NOP operation, the op field is 1111
The other fields can be anything. 2. Configuration of Processor FIG. 2 is a schematic configuration diagram of a processor according to the embodiment.
【0034】このプロセッサは、命令フェッチステージ
(以下、IFステージ)、解読およびレジスタ読出しステ
ージ(以下、DECステージ)、実行ステージ(以下、EX
ステージ)の3つのステージからなる3段パイプライン
構造を成している。This processor includes an instruction fetch stage (hereinafter, IF stage), a decoding and register reading stage (hereinafter, DEC stage), and an execution stage (hereinafter, EX stage).
(Stage) in a three-stage pipeline structure.
【0035】図2において、1は機械命令プログラムを
格納するROM、2と3と4は機械命令(以下、命令と略
す。)の第1スロットと第2スロットと第3スロットの
内容を格納するそれぞれI1ラッチとI2ラッチとI3
ラッチ、5と6と7はそれぞれI1ラッチ2とI2ラッ
チ3とI3ラッチ4に保持された命令の第1スロットと
第2スロットと第3スロットの内容を解読しプロセッサ
各部を制御する第1命令解読器と第2命令解読器と第3
命令解読器、8はオペランド格納するレジスタファイ
ル、9と10と11はそれぞれI1ラッチ2とI2ラッ
チ3とI3ラッチ4の内容の一部とレジスタファイル8
の出力との2入力から1つを選択するD1セレクタとD
2セレクタとD3セレクタ、12と13と14はそれぞ
れD1セレクタ9とD2セレクタ10とD3セレクタ1
1の出力を格納するD11ラッチとD12ラッチとD1
3ラッチ、15と16と17はレジスタファイル8の出
力を格納するD21ラッチとD22ラッチとD23ラッ
チ、18はD11ラッチ12およびD21ラッチ15の
内容を用いて算術論理演算やロード・ストアなど全ての
操作を行う第1操作ユニット、19はD12ラッチ13
およびD22ラッチ16の内容を用いて算術論理演算や
ロード・ストアなど全ての操作を行う第2操作ユニッ
ト、20はD13ラッチ14およびD23ラッチ17の
内容を用いて算術論理演算やロード・ストアなど全ての
操作を行う第3操作ユニットで、第1操作ユニット18
と第2操作ユニット19と第2操作ユニット20の出力
はともにレジスタファイル8と図示しない外部のメモリ
とに接続される。21と22と23はそれぞれ第1操作
ユニット18と第2操作ユニット19と第3操作ユニッ
ト20における操作結果を受けて図1に示したいくつか
のプレディケーションの条件の成立の真偽の状態を生成
する第1状態生成ユニットと第2状態生成ユニットと第
3状態生成ユニット、24は第1状態生成ユニット21
と第2状態生成ユニット22と第3状態生成ユニット2
3の出力をプレディケーションレジスタに格納するとと
もに、プレディケーションレジスタの内容を評価して第
1スロットから第3スロットの各オペレーションを実行
すべきか否かの判断を行うプレディケーションレジスタ
を内部に有するプレディケーションユニットである。レ
ジスタR0からレジスタR15はレジスタファイル8に内包
され、特にレジスタR0は常に0が読み出される。レジス
タR0に値を書き込もうとしても動作は保証されない。
3.プロセッサの動作例以下に、図4から図6の機械命
令プログラムがROM1に格納された場合における上記構
成をもつプロセッサの動作について説明する。In FIG. 2, 1 is a ROM for storing a machine instruction program, and 2, 3 and 4 store the contents of a first slot, a second slot and a third slot of a machine instruction (hereinafter abbreviated as an instruction). I1 latch, I2 latch and I3 respectively
Latches 5, 5 and 6 are first instructions for decoding the contents of the first, second and third slots of the instructions held in I1 latch 2, I2 latch 3 and I3 latch 4, respectively, and controlling the respective sections of the processor. Decryptor, second command decoder, and third
An instruction decoder, 8 is a register file for storing operands, 9 and 10 and 11 are a part of the contents of I1 latch 2, I2 latch 3 and I3 latch 4, respectively, and a register file 8
And a D1 selector for selecting one from two inputs of the
2 selector and D3 selector, and 12, 13 and 14 are D1 selector 9, D2 selector 10, and D3 selector 1, respectively.
D11 latch, D12 latch and D1
3 latches, 15, 16 and 17 are D21 latches, D22 latches and D23 latches for storing the output of the register file 8, and 18 is an arithmetic logic operation or load / store operation using the contents of the D11 latches 12 and 15. A first operation unit for performing operations, 19 is a D12 latch 13
And a second operation unit 20 for performing all operations such as arithmetic logic operation and load / store using the contents of the D22 latch 16, and a second operation unit 20 including arithmetic logic operation and load / store using the contents of the D13 latch 14 and the D23 latch 17. The first operation unit 18 is a third operation unit that performs the operation of
The outputs of the second operating unit 19 and the second operating unit 20 are both connected to the register file 8 and an external memory (not shown). 21, 22, and 23 receive the operation results of the first operation unit 18, the second operation unit 19, and the third operation unit 20, respectively, and change the true / false state of establishment of some of the predication conditions shown in FIG. 1. The first state generation unit, the second state generation unit, and the third state generation unit to be generated, 24 are the first state generation unit 21
, Second state generating unit 22 and third state generating unit 2
3 is stored in a predication register, and a predication register having a predication register therein for evaluating the contents of the predication register and determining whether to execute each operation from the first slot to the third slot. Unit. The registers R0 to R15 are included in the register file 8, and particularly, 0 is always read from the register R0. The operation is not guaranteed if a value is written to register R0.
3. Example of Operation of Processor Hereinafter, the operation of the processor having the above configuration when the machine instruction programs of FIGS. 4 to 6 are stored in the ROM 1 will be described.
【0036】(1)第1の機械命令プログラム 図4は、機械命令プログラムの第1の例のリストであ
り、図3に示す3方向分岐および分岐直後の処理に関す
るフローチャートを実現するものである。命令1の第1
スロットおよび第2スロットは、図3の処理に先行また
は後続する処理(図示しない)に基づくオペレーション
であって後述の第3スロットのオペレーションと並列に
実行し得る何らかのオペレーション(有意なオペレーシ
ョンがない場合はノーオペレーションとなる)であり、
ここではOPと記す。OPオペレーションではプレディケー
ションを行わないものとする。第3スロットは、レジス
タR2が0より大きいという条件に対して真ならばプレデ
ィケーションレジスタp0を1に、レジスタR2が0と等し
いという条件に対して真ならばプレディケーションレジ
スタp1を1に、レジスタR2が0より小さいという条件に
対して真ならばプレディケーションレジスタp2に1にす
る比較オペレーションである。命令2の第1スロット
は、プレディケーションレジスタp0が1の場合にのみレ
ジスタR1からレジスタR3の減算結果をレジスタR1に格納
する減算オペレーションであり、第2スロットは、プレ
ディケーションレジスタp1が1の場合にのみレジスタR1
をレジスタR2に転送する転送オペレーションであり、第
3スロットは、プレディケーションレジスタp2が1の場
合にのみレジスタR1とレジスタR3の加算結果をレジスタ
R1に格納する加算オペレーションである。図4は機械命
令プログラムをニモニックで表現しているがROM1には
バイナリで格納されている。例えば、命令1の第3スロ
ットは、opフィールドは1010(CMP)、dstフィールドは
0010(R2)、sraフィールドは0000(R0)、srb/pdフィー
ルドは0000(p0)、cフィールドは1、qpフィールドは1
111(常に真)であり、命令2の第1スロットは、opフ
ィールドは0010(SUB)、dstフィールドは0001(R1)、s
raフィールドは0011(R3)、srb/pdフィールドは0001(R
1)、cフィールドは0、qpフィールドは0000(p0)であ
る。(1) First Machine Instruction Program FIG. 4 is a list of a first example of a machine instruction program, which implements the flowchart for the three-way branch and the processing immediately after the branch shown in FIG. Instruction 1 first
The slot and the second slot are operations based on a process (not shown) preceding or succeeding the process of FIG. 3 and can be executed in parallel with an operation of a third slot described later (when there is no significant operation, No operation)
Here, it is described as OP. Predication is not performed in the OP operation. In the third slot, the predication register p0 is set to 1 if the condition that the register R2 is greater than 0 is set, and if the condition is true for the condition that the register R2 is equal to 0, the predication register p1 is set to 1; If the condition that R2 is smaller than 0 is true, this is a comparison operation that sets 1 to the predication register p2. The first slot of the instruction 2 is a subtraction operation for storing the subtraction result of the register R3 from the register R1 into the register R1 only when the predication register p0 is 1, and the second slot is used when the predication register p1 is 1. Register R1 only
Is transferred to the register R2. In the third slot, the addition result of the register R1 and the register R3 is registered only when the predication register p2 is 1.
This is an addition operation to be stored in R1. FIG. 4 shows the machine instruction program as a mnemonic, which is stored in the ROM 1 in binary. For example, in the third slot of the instruction 1, the op field is 1010 (CMP), and the dst field is
0010 (R2), sra field is 0000 (R0), srb / pd field is 0000 (p0), c field is 1, qp field is 1
111 (always true), the first slot of instruction 2 has an op field of 0010 (SUB), a dst field of 0001 (R1), s
The ra field is 0011 (R3), and the srb / pd field is 0001 (R
1), the c field is 0, and the qp field is 0000 (p0).
【0037】次に図4の機械命令プログラムがROM1に
格納された場合におけるプロセッサの動作をマシンサイ
クルと呼ばれるタイミング順に説明する。なお、OPオペ
レーションの動作については主眼ではないので詳細な説
明を省略する。 (タイミング1) ・IFステージ:命令1 命令1がROM1から読出され、命令1の第1スロットか
ら第3スロットがそれぞれI1ラッチ2からI3ラッチ
4に格納される。 (タイミング2) ・DECステージ:命令1 I1ラッチ2に格納された命令1の第1スロットが第1
命令解読器5で解読される。解読された結果として何ら
かの操作(OPオペレーションに相当)であることが判明
する。この解読に基づいてレジスタファイル8から何ら
かのレジスタが必要に応じて読出される。同時に、I2
ラッチ3に格納された命令1の第2スロットが第2命令
解読器6で解読される。解読された結果として同じく何
らかの操作(OPオペレーションに相当)であることが判
明する。この解読に基づいてレジスタファイル8から何
らかのレジスタが必要に応じて読出される。さらに同時
に、I3ラッチ4に格納された命令1の第3スロットが
第3命令解読器7で解読される。解読された結果として
CMP操作であることが判明する。この解読に基づいてレ
ジスタファイル8からレジスタR2とR0とが読出され、読
出された値がそれぞれD13ラッチ14とD23ラッチ
17とに格納される。 ・IFステージ:命令2 命令2がROM1から読出され、命令2の第1スロットか
ら第3スロットがそれぞれI1ラッチ2からI3ラッチ
4に格納される。 (タイミング3) ・EXステージ:命令1 第1命令解読器5で解読された結果に基づき、第1操作
ユニット18および第1状態生成ユニット21が所望の
動作をする。同時に、第2命令解読器6で解読された結
果に基づき、第2操作ユニット19および第2状態生成
ユニット22所望の動作をする。さらに同時に、D13
ラッチ14に格納されたレジスタR2の値とD23ラッチ
17に格納されたレジスタR0の値0とを比較する操作が
第3操作ユニット20にて行われ、第3状態生成ユニッ
ト23では、レジスタR2の値がレジスタR0の値より大き
ければプレディケーションユニット24のプレディケー
ションレジスタp0に1を、そうでなければ0を書き込
み、レジスタR2の値がレジスタR0の値と等しければプレ
ディケーションレジスタp1に1を、そうでなければ0を
書き込み、レジスタR2の値がレジスタR0の値より小さけ
ればプレディケーションレジスタp2に1を、そうでなけ
れば0を書き込む。 ・DECステージ:命令2 I1ラッチ2に格納された命令2の第1スロットが第1
命令解読器5で解読される。解読された結果としてプレ
ディケーションレジスタp0の評価に基づくSUB操作であ
ることが判明する。この解読に基づいてレジスタファイ
ル8からレジスタR1とR3とが読出され、読出された値が
それぞれD11ラッチ12とD21ラッチ15とに格納
される。同時に、I2ラッチ3に格納された命令2の第
2スロットが第2命令解読器6で解読される。解読され
た結果としてプレディケーションレジスタp1の評価に基
づくMOV操作であることが判明する。この解読に基づい
てレジスタファイル8からレジスタR1が読出され、読出
された値がD22ラッチ16に格納される。さらに同時
に、I3ラッチ4に格納された命令2の第3スロットが
第3命令解読器7で解読される。解読された結果として
プレディケーションレジスタp2の評価に基づくADD操作
であることが判明する。この解読に基づいてレジスタフ
ァイル8からレジスタR1とR3とが読出され、読出された
値がそれぞれD13ラッチ14とD23ラッチ17とに
格納される。 (タイミング4) ・EXステージ:命令2 第1命令解読器5で解読された結果がプレディケーショ
ンレジスタp0の評価に基づくSUB操作であることに基づ
き、D11ラッチ12に格納されたレジスタR1の値から
D21ラッチ15に格納されたレジスタR3の値を減じる
減算操作が第1操作ユニット18にて行われ、操作結果
はレジスタファイル8のレジスタR1に格納される。cフ
ィールドが0でpdフィールドが無効であるため、第1状
態生成ユニット21では何も行われない。同時に、第2
命令解読器6で解読された結果がプレディケーションレ
ジスタp1の評価に基づくMOV操作であることに基づき、
D22ラッチ16に格納されたレジスタR1の値の転送操
作が第2操作ユニット19にて行われ、操作結果はレジ
スタファイル8のレジスタR2に格納される。cフィール
ドが0でpdフィールドが無効であるため、第2状態生成
ユニット22では何も行われない。さらに同時に、第3
命令解読器7で解読された結果がプレディケーションレ
ジスタp2の評価に基づくADD操作であることに基づき、
D13ラッチ14に格納されたレジスタR1の値1とD2
3ラッチ17に格納されたレジスタR3の値との間で加算
操作が第3操作ユニット20にて行われ、操作結果はレ
ジスタファイル8のレジスタR4に格納される。cフィー
ルドが0でpdフィールドが無効であるため、第3状態生
成ユニット23では何も行われない。Next, the operation of the processor when the machine instruction program of FIG. 4 is stored in the ROM 1 will be described in the order of timing called a machine cycle. Since the operation of the OP operation is not the main focus, detailed description will be omitted. (Timing 1) IF stage: Instruction 1 Instruction 1 is read from ROM1, and the first to third slots of instruction 1 are stored in I1 latch 2 to I3 latch 4, respectively. (Timing 2) DEC stage: Instruction 1 The first slot of instruction 1 stored in I1 latch 2 is the first
It is decoded by the instruction decoder 5. As a result of the decryption, it is determined that the operation is an operation (corresponding to an OP operation). Some registers are read from the register file 8 as needed based on the decoding. At the same time, I2
The second slot of the instruction 1 stored in the latch 3 is decoded by the second instruction decoder 6. As a result of the decryption, it is also found that the operation is some sort of operation (corresponding to an OP operation). Some registers are read from the register file 8 as needed based on the decoding. At the same time, the third slot of the instruction 1 stored in the I3 latch 4 is decoded by the third instruction decoder 7. As a result of decryption
It turns out to be a CMP operation. Based on this decoding, registers R2 and R0 are read from register file 8, and the read values are stored in D13 latch 14 and D23 latch 17, respectively. IF stage: instruction 2 Instruction 2 is read from ROM1, and the first to third slots of instruction 2 are stored in I1 latch 2 to I3 latch 4, respectively. (Timing 3) EX stage: Instruction 1 Based on the result decoded by the first instruction decoder 5, the first operation unit 18 and the first state generation unit 21 perform desired operations. At the same time, the second operation unit 19 and the second state generation unit 22 perform desired operations based on the result decoded by the second command decoder 6. At the same time, D13
The operation of comparing the value of the register R2 stored in the latch 14 with the value 0 of the register R0 stored in the D23 latch 17 is performed in the third operation unit 20, and the third state generation unit 23 performs the operation of comparing the value of the register R2. If the value is larger than the value of the register R0, 1 is written to the predication register p0 of the predication unit 24, otherwise 0 is written. If the value of the register R2 is equal to the value of the register R0, 1 is written to the predication register p1. Otherwise, write 0, and if the value of the register R2 is smaller than the value of the register R0, write 1 to the predication register p2, otherwise write 0. • DEC stage: instruction 2 The first slot of instruction 2 stored in I1 latch 2 is the first slot
It is decoded by the instruction decoder 5. As a result of the decryption, it is determined that the SUB operation is based on the evaluation of the predication register p0. Based on the decoding, the registers R1 and R3 are read from the register file 8, and the read values are stored in the D11 latch 12 and the D21 latch 15, respectively. At the same time, the second slot of the instruction 2 stored in the I2 latch 3 is decoded by the second instruction decoder 6. As a result of the decryption, it is determined that the operation is the MOV operation based on the evaluation of the predication register p1. Based on the decoding, the register R1 is read from the register file 8, and the read value is stored in the D22 latch 16. At the same time, the third slot of the instruction 2 stored in the I3 latch 4 is decoded by the third instruction decoder 7. As a result of the decryption, it is determined that the ADD operation is based on the evaluation of the predication register p2. Based on the decoding, the registers R1 and R3 are read from the register file 8, and the read values are stored in the D13 latch 14 and the D23 latch 17, respectively. (Timing 4) • EX stage: Instruction 2 Based on the fact that the result decoded by the first instruction decoder 5 is a SUB operation based on the evaluation of the predication register p0, the value of the register R1 stored in the D11 latch 12 is calculated. A subtraction operation for reducing the value of the register R3 stored in the D21 latch 15 is performed in the first operation unit 18, and the operation result is stored in the register R1 of the register file 8. Since the c field is 0 and the pd field is invalid, the first state generation unit 21 does nothing. At the same time, the second
Based on the fact that the result decoded by the instruction decoder 6 is a MOV operation based on the evaluation of the predication register p1,
The transfer operation of the value of the register R1 stored in the D22 latch 16 is performed by the second operation unit 19, and the operation result is stored in the register R2 of the register file 8. Since the c field is 0 and the pd field is invalid, the second state generation unit 22 does nothing. At the same time, the third
Based on the fact that the result decoded by the instruction decoder 7 is an ADD operation based on the evaluation of the predication register p2,
The value 1 of the register R1 stored in the D13 latch 14 and D2
An addition operation is performed by the third operation unit 20 with the value of the register R3 stored in the 3-latch 17, and the operation result is stored in the register R4 of the register file 8. Since the c field is 0 and the pd field is invalid, the third state generation unit 23 does nothing.
【0038】以上のように、従来、5スロット3サイク
ルまたは6スロット2サイクルかかる図3のフローチャ
ートに示す3方向分岐および分岐直後の処理を、本実施
形態のプロセッサでは4スロット2サイクルで実行で
き、実行効率とプログラム効率との両立を達成すること
ができる。なお上記のスロット数には、3方向分岐およ
び分岐直後の処理以外の処理に拠るOPオペレーションは
比較の主眼ではないので含めていない。As described above, the three-way branch and the processing immediately after the branch shown in the flow chart of FIG. 3 which conventionally require three cycles of five slots or two cycles of six slots can be executed in two cycles of four slots in the processor of this embodiment. It is possible to achieve both execution efficiency and program efficiency. Note that the above-mentioned number of slots does not include the OP operation based on the processing other than the processing in the three-way branch and the processing immediately after the branch because it is not the main focus of the comparison.
【0039】(2)第2の機械命令プログラム 図5は、機械命令プログラムの第2の例のリストであ
る。命令1の第3スロットは、レジスタR1とレジスタR2
との加算結果をレジスタR1に格納するとともに、加算結
果が正方向にオーバーフローするという条件に対して真
ならばプレディケーションレジスタp0を1に、加算結果
がオーバーフローしない正であるという条件に対して真
ならばプレディケーションレジスタp1を1に、加算結果
が0であるという条件に対して真ならばプレディケーシ
ョンレジスタp2に1に、加算結果がオーバーフローしな
い負であるという条件に対して真ならばプレディケーシ
ョンレジスタp3を1に、加算結果が負方向にオーバーフ
ローするという条件に対して真ならばプレディケーショ
ンレジスタp4を1にするオーバーフロー検出加算オペレ
ーションである。命令2の第1スロットは、プレディケ
ーションレジスタp0が1の場合にのみレジスタR1からレ
ジスタR3の減算結果をレジスタR1に格納する減算オペレ
ーションであり、第2スロットは、プレディケーション
レジスタp1が1の場合にのみレジスタR1をレジスタR2に
転送する転送オペレーションであり、第3スロットは、
プレディケーションレジスタp2が1の場合にのみレジス
タR1とレジスタR3の加算結果をレジスタR1に格納する加
算オペレーションである。命令3の第1スロットは、プ
レディケーションレジスタp3が1の場合にのみレジスタ
R1をレジスタR3で除した除算結果をレジスタR1に格納す
る除算オペレーションであり、第2スロットは、プレデ
ィケーションレジスタp4が1の場合にのみレジスタR1と
レジスタR3の乗算結果をレジスタR1に格納する乗算オペ
レーションである。命令1の第1スロットおよび第2ス
ロットと命令3の第3スロットは、それぞれ同一命令内
の上記の各オペレーションと並列に実行し得る何らかの
オペレーション(有意なオペレーションがない場合はノ
ーオペレーションとなる)であり、ここではOPと記す。
OPオペレーションではプレディケーションを行わないも
のとする。図5は機械命令プログラムをニモニックで表
現しているがROM1にはバイナリで格納されている。例
えば、命令1の第3スロットは、opフィールドは0101
(ADDV)、dstフィールドは0001(R1)、sraフィールド
は0010(R2)、srb/pdフィールドは0000(p0)、cフィー
ルドは1、qpフィールドは1111(常に真)であり、命令
3の第1スロットは、opフィールドは0100(DIV)、dst
フィールドは0001(R1)、sraフィールドは0011(R3)、s
rb/pdフィールドは0001(R1)、cフィールドは0、qpフ
ィールドは0000(p0)である。(2) Second Machine Instruction Program FIG. 5 is a list of a second example of the machine instruction program. The third slot of instruction 1 consists of registers R1 and R2
Is stored in the register R1. If the addition result is true for the condition that the addition result overflows in the positive direction, the predication register p0 is set to 1 and the true value is set for the condition that the addition result is positive without overflow. If so, set the predication register p1 to 1; if true for the condition that the addition result is 0, set 1 to the predication register p2; if true for the negative condition that the addition result does not overflow, then predication. This is an overflow detection addition operation in which the register p3 is set to 1 and the predication register p4 is set to 1 if true for the condition that the addition result overflows in the negative direction. The first slot of the instruction 2 is a subtraction operation for storing the subtraction result of the register R3 from the register R1 into the register R1 only when the predication register p0 is 1, and the second slot is used when the predication register p1 is 1. Is a transfer operation for transferring the register R1 to the register R2 only in the third slot.
This is an addition operation in which the addition result of the register R1 and the register R3 is stored in the register R1 only when the predication register p2 is 1. The first slot of instruction 3 is a register only when the predication register p3 is 1.
A division operation in which the result of dividing R1 by the register R3 is stored in the register R1, and the second slot is a multiplication in which the result of multiplication of the register R1 and the register R3 is stored in the register R1 only when the predication register p4 is 1. Operation. The first slot and the second slot of the instruction 1 and the third slot of the instruction 3 are each an operation which can be executed in parallel with each of the above operations in the same instruction (the operation becomes no if there is no significant operation). Yes, here we call it OP.
Predication is not performed in the OP operation. FIG. 5 shows the machine instruction program as a mnemonic, which is stored in the ROM 1 in binary. For example, in the third slot of instruction 1, the op field is 0101
(ADDV), dst field is 0001 (R1), sra field is 0010 (R2), srb / pd field is 0000 (p0), c field is 1, qp field is 1111 (always true). For one slot, the op field is 0100 (DIV), dst
The field is 0001 (R1), the sra field is 0011 (R3), s
The rb / pd field is 0001 (R1), the c field is 0, and the qp field is 0000 (p0).
【0040】次に図5の機械命令プログラムがROM1に
格納された場合におけるプロセッサの動作をマシンサイ
クルと呼ばれるタイミング順に説明する。 (タイミング1) ・IFステージ:命令1 命令1がROM1から読出され、命令1の第1スロットか
ら第3スロットがそれぞれI1ラッチ2からI3ラッチ
4に格納される。 (タイミング2) ・DECステージ:命令1 I1ラッチ2に格納された命令1の第1スロットが第1
命令解読器5で解読される。解読された結果として何ら
かの操作(OPオペレーションに相当)であることが判明
する。この解読に基づいてレジスタファイル8から何ら
かのレジスタが必要に応じて読み出される。同時に、I
2ラッチ3に格納された命令1の第2スロットが第2命
令解読器6で解読される。解読された結果として同じく
何らかの操作(OPオペレーションに相当)であることが
判明する。この解読に基づいてレジスタファイル8から
何らかのレジスタが必要に応じて読み出される。さらに
同時に、I3ラッチ4に格納された命令1の第3スロッ
トが第3命令解読器7で解読される。解読された結果と
してADDV操作であることが判明する。この解読に基づい
てレジスタファイル8からレジスタR1とR2とが読出さ
れ、読出された値がそれぞれD13ラッチ14とD23
ラッチ17とに格納される。 ・IFステージ:命令2 命令2がROM1から読出され、命令2の第1スロットか
ら第3スロットがそれぞれI1ラッチ2からI3ラッチ
4に格納される。 (タイミング3) ・EXステージ:命令1 第1命令解読器5で解読された結果に基づき、第1操作
ユニット18および第1状態生成ユニット21が所望の
動作をする。同時に、第2命令解読器6で解読された結
果に基づき、第2操作ユニット19および第2状態生成
ユニット22が所望の動作をする。さらに同時に、D1
3ラッチ14に格納されたレジスタR1の値とD23ラッ
チ17に格納されたレジスタR1の値とを加算する操作が
第3操作ユニット20にて行われ、加算結果がレジスタ
ファイル8のレジスタR1に格納される。第3状態生成ユ
ニット23では、加算結果が正方向にオーバーフローす
ればプレディケーションユニット24のプレディケーシ
ョンレジスタp0に1を、そうでなければ0を書き込み、
加算結果がオーバーフローしない正になればプレディケ
ーションレジスタp1に1を、そうでなければ0を書き込
み、加算結果が0になればプレディケーションレジスタ
p2に1を、そうでなければ0を書き込み、加算結果がオ
ーバーフローしない負になればプレディケーションレジ
スタp3に1を、そうでなければ0を書き込み、加算結果
が負方向にオーバーフローすればプレディケーションレ
ジスタp4に1を、そうでなければ0を書き込む。 ・DECステージ:命令2 I1ラッチ2に格納された命令2の第1スロットが第1
命令解読器5で解読される。解読された結果としてプレ
ディケーションレジスタp0の評価に基づくSUB操作であ
ることが判明する。この解読に基づいてレジスタファイ
ル8からレジスタR1とR3とが読出され、読出された値が
それぞれD11ラッチ12とD21ラッチ15とに格納
される。同時に、I2ラッチ3に格納された命令2の第
2スロットが第2命令解読器6で解読される。解読され
た結果としてプレディケーションレジスタp1の評価に基
づくMOV操作であることが判明する。この解読に基づい
てレジスタファイル8からレジスタR1が読出され、読出
された値がD22ラッチ16に格納される。さらに同時
に、I3ラッチ4に格納された命令2の第3スロットが
第3命令解読器7で解読される。解読された結果として
プレディケーションレジスタp2の評価に基づくADD操作
であることが判明する。この解読に基づいてレジスタフ
ァイル8からレジスタR1とR3とが読出され、読出された
値がそれぞれD13ラッチ14とD23ラッチ17とに
格納される。 ・IFステージ:命令3 命令3がROM1から読出され、命令2の第1スロットか
ら第3スロットがそれぞれI1ラッチ2からI3ラッチ
4に格納される。 (タイミング4) ・EXステージ:命令2 第1命令解読器5で解読された結果がプレディケーショ
ンレジスタp0の評価に基づくSUB操作であることに基づ
き、D11ラッチ12に格納されたレジスタR1の値から
D21ラッチ15に格納されたレジスタR3の値を減じる
減算操作が第1操作ユニット18にて行われ、操作結果
はレジスタファイル8のレジスタR1に格納される。cフ
ィールドが0でpdフィールドが無効であるため、第1状
態生成ユニット21では何も行われない。同時に、第2
命令解読器6で解読された結果がプレディケーションレ
ジスタp1の評価に基づくMOV操作であることに基づき、
D22ラッチ16に格納されたレジスタR1の値の転送操
作が第2操作ユニット19にて行われ、操作結果はレジ
スタファイル8のレジスタR2に格納される。cフィール
ドが0でpdフィールドが無効であるため、第2状態生成
ユニット22では何も行われない。さらに同時に、第3
命令解読器7で解読された結果がプレディケーションレ
ジスタp2の評価に基づくADD操作であることに基づき、
D13ラッチ14に格納されたレジスタR1の値1とD2
3ラッチ17に格納されたレジスタR3の値との間で加算
操作が第3操作ユニット20にて行われ、操作結果はレ
ジスタファイル8のレジスタR4に格納される。cフィー
ルドが0でpdフィールドが無効であるため、第3状態生
成ユニット23では何も行われない。 ・DECステージ:命令3 I1ラッチ2に格納された命令3の第1スロットが第1
命令解読器5で解読される。解読された結果としてプレ
ディケーションレジスタp3の評価に基づくDIV操作であ
ることが判明する。この解読に基づいてレジスタファイ
ル8からレジスタR1とR3とが読出され、読出された値が
それぞれD11ラッチ12とD21ラッチ15とに格納
される。同時に、I2ラッチ3に格納された命令3の第
2スロットが第2命令解読器6で解読される。解読され
た結果としてプレディケーションレジスタp4の評価に基
づくMUL操作であることが判明する。この解読に基づい
てレジスタファイル8からレジスタR1とR3とが読出さ
れ、読出された値がD12ラッチ13とD22ラッチ1
6とに格納される。さらに同時に、I3ラッチ4に格納
された命令3の第3スロットが第3命令解読器7で解読
される。解読された結果として何らかの操作(OPオペレ
ーションに相当)であることが判明する。この解読に基
づいてレジスタファイル8から何らかのレジスタが必要
に応じて読出される。 (タイミング5) ・EXステージ:命令3 第1命令解読器5で解読された結果がプレディケーショ
ンレジスタp3の評価に基づくDIV操作であることに基づ
き、D11ラッチ12に格納されたレジスタR1の値をD
21ラッチ15に格納されたレジスタR3の値ので除する
除算操作が第1操作ユニット18にて行われ、操作結果
はレジスタファイル8のレジスタR1に格納される。cフ
ィールドが0でpdフィールドが無効であるため、第1状
態生成ユニット21では何も行われない。同時に、第2
命令解読器6で解読された結果がプレディケーションレ
ジスタp4の評価に基づくMUL操作であることに基づき、
D12ラッチ13に格納されたレジスタR1の値1とD2
2ラッチ16に格納されたレジスタR3の値との間で乗算
操作が第2操作ユニット19にて行われ、操作結果はレ
ジスタファイル8のレジスタR1に格納される。cフィー
ルドが0でpdフィールドが無効であるため、第2状態生
成ユニット22では何も行われない。さらに同時に、第
3命令解読器7で解読された結果に基づき、第3操作ユ
ニット20および第3状態生成ユニット23が所望の動
作をする。Next, the operation of the processor when the machine instruction program of FIG. 5 is stored in the ROM 1 will be described in the order of timing called a machine cycle. (Timing 1) IF stage: Instruction 1 Instruction 1 is read from ROM1, and the first to third slots of instruction 1 are stored in I1 latch 2 to I3 latch 4, respectively. (Timing 2) DEC stage: Instruction 1 The first slot of instruction 1 stored in I1 latch 2 is the first
It is decoded by the instruction decoder 5. As a result of the decryption, it is determined that the operation is an operation (corresponding to an OP operation). Some registers are read from the register file 8 as necessary based on the decoding. At the same time, I
The second slot of the instruction 1 stored in the second latch 3 is decoded by the second instruction decoder 6. As a result of the decryption, it is also found that the operation is some sort of operation (corresponding to an OP operation). Some registers are read from the register file 8 as necessary based on the decoding. At the same time, the third slot of the instruction 1 stored in the I3 latch 4 is decoded by the third instruction decoder 7. As a result of the decryption, it is determined that the operation is an ADDV operation. Based on this decoding, registers R1 and R2 are read from register file 8, and the read values are stored in D13 latches 14 and D23, respectively.
It is stored in the latch 17. IF stage: instruction 2 Instruction 2 is read from ROM1, and the first to third slots of instruction 2 are stored in I1 latch 2 to I3 latch 4, respectively. (Timing 3) EX stage: Instruction 1 Based on the result decoded by the first instruction decoder 5, the first operation unit 18 and the first state generation unit 21 perform desired operations. At the same time, based on the result decoded by the second command decoder 6, the second operation unit 19 and the second state generation unit 22 perform desired operations. At the same time, D1
The operation of adding the value of the register R1 stored in the third latch 14 and the value of the register R1 stored in the D23 latch 17 is performed in the third operation unit 20, and the addition result is stored in the register R1 of the register file 8. Is done. The third state generation unit 23 writes 1 to the predication register p0 of the predication unit 24 if the addition result overflows in the positive direction, and 0 otherwise.
If the addition result is positive without overflow, write 1 to the predication register p1, otherwise write 0, and if the addition result becomes 0, write the predication register p1.
Write 1 to p2, otherwise write 0. If the addition result does not overflow, write 1 to the predication register p3 if it becomes negative, otherwise write 0, and if the addition result overflows in the negative direction, write the predication register. Write 1 to p4, otherwise write 0. • DEC stage: instruction 2 The first slot of instruction 2 stored in I1 latch 2 is the first slot
It is decoded by the instruction decoder 5. As a result of the decryption, it is determined that the SUB operation is based on the evaluation of the predication register p0. Based on the decoding, the registers R1 and R3 are read from the register file 8, and the read values are stored in the D11 latch 12 and the D21 latch 15, respectively. At the same time, the second slot of the instruction 2 stored in the I2 latch 3 is decoded by the second instruction decoder 6. As a result of the decryption, it is determined that the operation is the MOV operation based on the evaluation of the predication register p1. Based on the decoding, the register R1 is read from the register file 8, and the read value is stored in the D22 latch 16. At the same time, the third slot of the instruction 2 stored in the I3 latch 4 is decoded by the third instruction decoder 7. As a result of the decryption, it is determined that the ADD operation is based on the evaluation of the predication register p2. Based on the decoding, the registers R1 and R3 are read from the register file 8, and the read values are stored in the D13 latch 14 and the D23 latch 17, respectively. IF stage: instruction 3 Instruction 3 is read from ROM1, and the first to third slots of instruction 2 are stored in I1 latch 2 to I3 latch 4, respectively. (Timing 4) • EX stage: Instruction 2 Based on the fact that the result decoded by the first instruction decoder 5 is a SUB operation based on the evaluation of the predication register p0, the value of the register R1 stored in the D11 latch 12 is calculated. A subtraction operation for reducing the value of the register R3 stored in the D21 latch 15 is performed in the first operation unit 18, and the operation result is stored in the register R1 of the register file 8. Since the c field is 0 and the pd field is invalid, the first state generation unit 21 does nothing. At the same time, the second
Based on the fact that the result decoded by the instruction decoder 6 is a MOV operation based on the evaluation of the predication register p1,
The transfer operation of the value of the register R1 stored in the D22 latch 16 is performed by the second operation unit 19, and the operation result is stored in the register R2 of the register file 8. Since the c field is 0 and the pd field is invalid, the second state generation unit 22 does nothing. At the same time, the third
Based on the fact that the result decoded by the instruction decoder 7 is an ADD operation based on the evaluation of the predication register p2,
The value 1 of the register R1 stored in the D13 latch 14 and D2
An addition operation is performed by the third operation unit 20 with the value of the register R3 stored in the 3-latch 17, and the operation result is stored in the register R4 of the register file 8. Since the c field is 0 and the pd field is invalid, the third state generation unit 23 does nothing. DEC stage: Instruction 3 The first slot of instruction 3 stored in I1 latch 2 is the first
It is decoded by the instruction decoder 5. As a result of the decryption, it is determined that the operation is the DIV operation based on the evaluation of the predication register p3. Based on the decoding, the registers R1 and R3 are read from the register file 8, and the read values are stored in the D11 latch 12 and the D21 latch 15, respectively. At the same time, the second slot of the instruction 3 stored in the I2 latch 3 is decoded by the second instruction decoder 6. As a result of the decryption, it is determined that the MUL operation is based on the evaluation of the predication register p4. Based on the decoding, the registers R1 and R3 are read from the register file 8, and the read values are stored in the D12 latch 13 and the D22 latch 1.
6 is stored. At the same time, the third slot of the instruction 3 stored in the I3 latch 4 is decoded by the third instruction decoder 7. As a result of the decryption, it is determined that the operation is an operation (corresponding to an OP operation). Some registers are read from the register file 8 as needed based on the decoding. (Timing 5) EX stage: Instruction 3 Based on the fact that the result decoded by the first instruction decoder 5 is a DIV operation based on the evaluation of the predication register p3, the value of the register R1 stored in the D11 latch 12 is D
The first operation unit 18 performs a division operation of dividing by the value of the register R3 stored in the latch 21 and the operation result is stored in the register R1 of the register file 8. Since the c field is 0 and the pd field is invalid, the first state generation unit 21 does nothing. At the same time, the second
Based on the fact that the result decoded by the instruction decoder 6 is a MUL operation based on the evaluation of the predication register p4,
The value 1 of the register R1 stored in the D12 latch 13 and D2
The multiplication operation is performed by the second operation unit 19 with the value of the register R3 stored in the second latch 16 and the operation result is stored in the register R1 of the register file 8. Since the c field is 0 and the pd field is invalid, the second state generation unit 22 does nothing. At the same time, the third operation unit 20 and the third state generation unit 23 perform desired operations based on the result decoded by the third command decoder 7.
【0041】以上のように、本実施形態のプロセッサで
は5方向分岐および分岐直後の処理についても6スロッ
ト3サイクルで実行でき、実行効率とプログラム効率と
の両立を達成することができる。なお上記のスロット数
には、5方向分岐および分岐直後の処理以外の処理に拠
るOPオペレーションは主眼ではないので含めていない。As described above, the processor of the present embodiment can execute the five-way branch and the processing immediately after the branch in three cycles of six slots, thereby achieving both execution efficiency and program efficiency. Note that the above-mentioned number of slots does not include the OP operation based on the processing other than the processing in the five-way branch and the processing immediately after the branch because it is not the main focus.
【0042】なお、図5の機械命令プログラムではADDV
操作を使用してオーバーフローの有無を含めた5条件の
全てについてプレディケーションを行っているが、5条
件の一部でもよく、またオーバーフローを含めない正負
および0の3条件で足りる場合はADD操作(opフィール
ドが0001)を使用すれば必要なプレディケーションレジ
スタは3つで済むためプレディケーションレジスタの使
用効率がよい。In the machine instruction program shown in FIG.
The operation is used to perform predication for all five conditions including the presence or absence of overflow. However, some of the five conditions may be used, and if the three conditions of positive / negative and zero including no overflow are sufficient, the ADD operation ( If the op field uses 0001), only three predication registers are required, and the usage efficiency of the predication registers is high.
【0043】(3)第3の機械命令プログラム 図6は、機械命令プログラムの第3の例のリストであ
る。命令1の第1スロットと第2スロットとで1つの比
較オペレーションを形成し、1つの指定された条件、即
ちレジスタR2が0より大きいという条件に対して真なら
ばプレディケーションレジスタp0を1にし、他の指定さ
れた条件、即ちレジスタR2が0と等しいという条件に対
して真ならばプレディケーションレジスタp1を1にする
条件指定比較オペレーションである。命令2の第1スロ
ットは、プレディケーションレジスタp0が1の場合にの
みレジスタR1からレジスタR3の減算結果をレジスタR1に
格納する減算オペレーションであり、第2スロットは、
プレディケーションレジスタp1が1の場合にのみレジス
タR1をレジスタR2に転送する転送オペレーションであ
る。命令1の第3スロットと命令2の第3スロットは、
それぞれ同一命令内の上記の各オペレーションと並列に
実行し得る何らかのオペレーション(有意なオペレーシ
ョンがない場合はノーオペレーションとなる)であり、
ここではOPと記す。OPオペレーションではプレディケー
ションを行わないものとする。図5は機械命令プログラ
ムをニモニックで表現しているがROM1にはバイナリで
格納されている。例えば、命令1の第1スロットおよび
第2スロットは、op1フィールドは1011(CMPL)、dst1
フィールドは0010(R2)、sra1フィールドは0000(R0)、
srb/pd1フィールドは0000(p0)、c1フィールドは1、q
p1フィールドは1111(常に真)、dst2フィールドは0010
(gt)、sra2フィールドは0000(eq)であり、op2フィー
ルド、srb/pd2フィールド、c2フィールドおよびqp2フィ
ールドは何でもよい。(3) Third Machine Instruction Program FIG. 6 is a list of a third example of the machine instruction program. The first slot and the second slot of instruction 1 form one compare operation, and set the predication register p0 to 1 if true for one specified condition, that is, the condition that register R2 is greater than zero; This is a condition specifying comparison operation in which the predication register p1 is set to 1 if true for another specified condition, that is, the condition that the register R2 is equal to 0. The first slot of the instruction 2 is a subtraction operation for storing the subtraction result of the register R3 from the register R1 into the register R1 only when the predication register p0 is 1, and the second slot is
This is a transfer operation for transferring the register R1 to the register R2 only when the predication register p1 is 1. The third slot of instruction 1 and the third slot of instruction 2 are
Any operation that can be executed in parallel with each of the above operations in the same instruction (no operation if there is no significant operation)
Here, it is described as OP. Predication is not performed in the OP operation. FIG. 5 shows the machine instruction program as a mnemonic, which is stored in the ROM 1 in binary. For example, in the first slot and the second slot of the instruction 1, the op1 field is 1011 (CMPL), dst1
The field is 0010 (R2), the sra1 field is 0000 (R0),
srb / pd1 field is 0000 (p0), c1 field is 1, q
p1 field is 1111 (always true), dst2 field is 0010
The (gt) and sra2 fields are 0000 (eq), and the op2 field, srb / pd2 field, c2 field, and qp2 field can be anything.
【0044】次に図6の機械命令プログラムがROM1に
格納された場合におけるプロセッサの動作をマシンサイ
クルと呼ばれるタイミング順に説明する。 (タイミング1) ・IFステージ:命令1 命令1がROM1から読出され、命令1の第1スロットか
ら第3スロットがそれぞれI1ラッチ2からI3ラッチ
4に格納される。 (タイミング2) ・DECステージ:命令1 I1ラッチ2に格納された命令1の第1スロットが第1
命令解読器5で解読される。解読された結果としてCMPL
操作であることが判明する。この解読に基づいてレジス
タファイル8からレジスタR2とR0とが読出され、読出さ
れた値がそれぞれD11ラッチ12とD21ラッチ15
とに格納される。またこの解読に基づいて第2命令解読
器6での解読情報(比較する2つの条件指定)は第1命
令解読器5での解読情報に併用され、以降は第2スロッ
トはノーオペレーションと同様に扱い、レジスタファイ
ル8からは特に何も読み出されない。同時に、I3ラッ
チ4に格納された命令1の第3スロットが第3命令解読
器7で解読される。解読された結果として何らかの操作
(OPオペレーションに相当)であることが判明する。こ
の解読に基づいてレジスタファイル8から何らかのレジ
スタが必要に応じて読出される。 ・IFステージ:命令2 命令2がROM1から読出され、命令2の第1スロットか
ら第3スロットがそれぞれI1ラッチ2からI3ラッチ
4に格納される。 (タイミング3) ・EXステージ:命令1 D11ラッチ12に格納されたレジスタR2の値とD21
ラッチ15に格納されたレジスタR0の値0とを比較する
操作が第1操作ユニット18にて行われ、第1状態生成
ユニット21では、第2命令解読器6からの情報に基づ
きレジスタR2の値がレジスタR0の値より大きければプレ
ディケーションユニット24のプレディケーションレジ
スタp0に1を、そうでなければ0を書き込み、同じく第
2命令解読器6からの情報に基づきレジスタR2の値がレ
ジスタR0の値と等しければプレディケーションレジスタ
p1に1を、そうでなければ0を書き込む。同時に、第3
命令解読器7で解読された結果に基づき、第3操作ユニ
ット20および第3状態生成ユニット23が所望の動作
をする。 ・DECステージ:命令2 I1ラッチ2に格納された命令2の第1スロットが第1
命令解読器5で解読される。解読された結果としてプレ
ディケーションレジスタp0の評価に基づくSUB操作であ
ることが判明する。この解読に基づいてレジスタファイ
ル8からレジスタR1とR3とが読出され、読出された値が
それぞれD11ラッチ12とD21ラッチ15とに格納
される。同時に、I2ラッチ3に格納された命令2の第
2スロットが第2命令解読器6で解読される。解読され
た結果としてプレディケーションレジスタp1の評価に基
づくMOV操作であることが判明する。この解読に基づい
てレジスタファイル8からレジスタR1が読出され、読出
された値がD22ラッチ16に格納される。さらに同時
に、I3ラッチ4に格納された命令2の第3スロットが
第3命令解読器7で解読される。解読された結果として
何らかの操作(OPオペレーションに相当)であることが
判明する。この解読に基づいてレジスタファイル8から
何らかのレジスタが必要に応じて読出される。 (タイミング4) ・EXステージ:命令2 第1命令解読器5で解読された結果がプレディケーショ
ンレジスタp0の評価に基づくSUB操作であることに基づ
き、D11ラッチ12に格納されたレジスタR1の値から
D21ラッチ15に格納されたレジスタR3の値を減じる
減算操作が第1操作ユニット18にて行われ、操作結果
はレジスタファイル8のレジスタR1に格納される。cフ
ィールドが0でpdフィールドが無効であるため、第1状
態生成ユニット21では何も行われない。同時に、第2
命令解読器6で解読された結果がプレディケーションレ
ジスタp1の評価に基づくMOV操作であることに基づき、
D22ラッチ16に格納されたレジスタR1の値の転送操
作が第2操作ユニット19にて行われ、操作結果はレジ
スタファイル8のレジスタR2に格納される。cフィール
ドが0でpdフィールドが無効であるため、第2状態生成
ユニット22では何も行われない。さらに同時に、第3
命令解読器7で解読された結果に基づき、第3操作ユニ
ット20および第3状態生成ユニット23が所望の動作
をする。Next, the operation of the processor when the machine instruction program of FIG. 6 is stored in the ROM 1 will be described in the order of timing called a machine cycle. (Timing 1) IF stage: Instruction 1 Instruction 1 is read from ROM1, and the first to third slots of instruction 1 are stored in I1 latch 2 to I3 latch 4, respectively. (Timing 2) DEC stage: Instruction 1 The first slot of instruction 1 stored in I1 latch 2 is the first
It is decoded by the instruction decoder 5. CMPL as decrypted result
It turns out to be an operation. Based on the decoding, registers R2 and R0 are read from register file 8, and the read values are stored in D11 latch 12 and D21 latch 15, respectively.
And stored in Further, based on this decoding, the decoding information (designating two conditions to be compared) in the second instruction decoder 6 is used together with the decoding information in the first instruction decoder 5, and thereafter the second slot is operated in the same manner as the no operation. Nothing is read from the register file 8 in particular. At the same time, the third slot of the instruction 1 stored in the I3 latch 4 is decoded by the third instruction decoder 7. As a result of the decryption, it is determined that the operation is an operation (corresponding to an OP operation). Some registers are read from the register file 8 as needed based on the decoding. IF stage: instruction 2 Instruction 2 is read from ROM1, and the first to third slots of instruction 2 are stored in I1 latch 2 to I3 latch 4, respectively. (Timing 3) • EX stage: Instruction 1 The value of register R2 stored in D11 latch 12 and D21
An operation of comparing the value of the register R0 stored in the latch 15 with the value 0 is performed in the first operation unit 18, and the first state generating unit 21 performs the operation of comparing the value of the register R2 based on the information from the second instruction decoder 6. Is larger than the value of the register R0, 1 is written to the predication register p0 of the predication unit 24; otherwise, 0 is written. Based on the information from the second instruction decoder 6, the value of the register R2 is changed to the value of the register R0. Prediction register if equal
Write 1 to p1, otherwise write 0. At the same time, the third
The third operation unit 20 and the third state generation unit 23 perform a desired operation based on the result decoded by the command decoder 7. • DEC stage: instruction 2 The first slot of instruction 2 stored in I1 latch 2 is the first slot
It is decoded by the instruction decoder 5. As a result of the decryption, it is determined that the SUB operation is based on the evaluation of the predication register p0. Based on the decoding, the registers R1 and R3 are read from the register file 8, and the read values are stored in the D11 latch 12 and the D21 latch 15, respectively. At the same time, the second slot of the instruction 2 stored in the I2 latch 3 is decoded by the second instruction decoder 6. As a result of the decryption, it is determined that the operation is the MOV operation based on the evaluation of the predication register p1. Based on the decoding, the register R1 is read from the register file 8, and the read value is stored in the D22 latch 16. At the same time, the third slot of the instruction 2 stored in the I3 latch 4 is decoded by the third instruction decoder 7. As a result of the decryption, it is determined that the operation is an operation (corresponding to an OP operation). Some registers are read from the register file 8 as needed based on the decoding. (Timing 4) • EX stage: Instruction 2 Based on the fact that the result decoded by the first instruction decoder 5 is a SUB operation based on the evaluation of the predication register p0, the value of the register R1 stored in the D11 latch 12 is calculated. A subtraction operation for reducing the value of the register R3 stored in the D21 latch 15 is performed in the first operation unit 18, and the operation result is stored in the register R1 of the register file 8. Since the c field is 0 and the pd field is invalid, the first state generation unit 21 does nothing. At the same time, the second
Based on the fact that the result decoded by the instruction decoder 6 is a MOV operation based on the evaluation of the predication register p1,
The transfer operation of the value of the register R1 stored in the D22 latch 16 is performed by the second operation unit 19, and the operation result is stored in the register R2 of the register file 8. Since the c field is 0 and the pd field is invalid, the second state generation unit 22 does nothing. At the same time, the third
The third operation unit 20 and the third state generation unit 23 perform a desired operation based on the result decoded by the command decoder 7.
【0045】以上のように、本実施形態のプロセッサで
は任意の2つの条件を指定できるため、排他条件でない
2条件であってもそれら2条件に基づくプレディケーシ
ョンを行う場合に必要なプレディケーションレジスタが
2つで済み、プレディケーションレジスタの使用効率が
よい。As described above, in the processor of the present embodiment, any two conditions can be specified. Therefore, even if the two conditions are not exclusive conditions, the predication register necessary for performing predication based on those two conditions is not necessary. Only two are required, and the usage efficiency of the predication register is good.
【0046】以上、本発明に係るプロセッサについて、
上記の実施形態に基づいて説明したが、本発明はこの実
施形態に限られないことは勿論である。即ち、 (1)上記の実施形態では、CMPL操作を第1スロットに
限定し、2つの比較条件を第2スロットのdstフィール
ドおよびsraフィールドを用いて指定しているが、opフ
ィールドやsrb/pdフィールドなどの他の未使用フィール
ドをも用いて3つ以上の条件を指定するようにしてもよ
いし、2つの比較条件を第3スロットに指定してもよい
し、さらには両方のスロットを用いてより多くの条件を
指定するようにしてもよいし、CMPL操作を第2スロット
に限定して比較条件を第3スロットに指定するようにし
てもよい。 (2)上記の実施形態では、任意にプレディケーション
条件を指定できるオペレーションを比較操作に限定して
いるが、他の算術論理演算操作においても任意にプレデ
ィケーション条件を指定できるように命令セットを拡張
してもよい。 (3)上記の実施形態では、cフィールドを設けてsrb/p
dフィールドを第2ソースオペランドであるかプレディ
ケーションデスティネーションオペランドであるかを切
り換えているが、cフィールドを設けることなくオペコ
ード(opフィールド)の内容に応じて切り換えるように
してもよい。例えば、比較オペレーションは3オペラン
ド形式にする必要がないという特性を利用して、オペコ
ードが比較オペレーションの時はsrb/pdフィールドをプ
レディケーションデスティネーションオペランドとして
用い、その他のオペレーションの時は第2ソースオペラ
ンドとして用いるという好適な実施形態が考えられる。
こうすることによりcフィールドの1ビットを他の機能
に流用できる。例えばopフィールドを1ビット拡張すれ
ば、さらに16通りのオペレーションが指定でき非常に
有用である。 (4)上記の実施形態では、命令フォーマットにおいて
第2ソースオペランドフィールドとプレディケーション
デスティネーションオペランドフィールドとを共有して
いるが、デスティネーションオペランドフィールドとプ
レディケーションデスティネーションオペランドフィー
ルドとを共有するようにしてもよい。特に比較オペレー
ションにはデスティネーションオペランドが伴わないの
で、通常はデスティネーションオペランドとなるフィー
ルドを比較オペレーションに限ってプレディケーション
デスティネーションオペランドフィールドとして使用す
ることは好適な実施形態である。 (5)上記の実施形態では、srb/pdフィールドを用いて
1つのプレディケーションデスティネーションオペラン
ドとなるプレディケーションレジスタを指定し、同時に
用いる2つ目以降のプレディケーションレジスタについ
ては指定されたプレディケーションレジスタを起点に昇
順のレジスタ番号を持つレジスタが順次用いられるよう
にしているが、降順でもよいし、あるいは用いる全ての
プレディケーションレジスタを命令で明示的に指定する
ようにしてもよい。明示的に指定することにより、例え
ば不要なプレディケーションについてはダミーのプレデ
ィケーションレジスタを重複指定するなどの手法により
無駄なプレディケーションレジスタの使用を回避するこ
とができ、プレディケーションレジスタの使用効率が向
上する。 (6)上記の実施形態では、3つの命令解読器と3つの
操作ユニットを設けて3並列実行を達成しているが、こ
れらを2つずつ設けて2並列実行してもよいし、これら
を4つずつ設けて4並列実行してもよいし、あるいはそ
れ以上であってもよい。 (7)上記の実施形態のプロセッサは、VLIWアーキテク
チャを採用しているが、スーパースカラーアーキテクチ
ャを採るプロセッサであってもよい。 (8)上記の実施形態のプロセッサは、命令フェッチ、
解読、実行の3段パイプラインで構成されるとしている
が、パイプラインの段数は何段であってもよいし、パイ
プラインを採らなくともよい。As described above, with respect to the processor according to the present invention,
Although the description has been given based on the above embodiment, it goes without saying that the present invention is not limited to this embodiment. (1) In the above embodiment, the CMPL operation is limited to the first slot, and the two comparison conditions are specified using the dst field and the sra field of the second slot, but the op field and the srb / pd Three or more conditions may be specified using other unused fields such as fields, two comparison conditions may be specified in the third slot, or both slots may be used. Alternatively, more conditions may be designated, or the CMPL operation may be limited to the second slot and the comparison condition may be designated to the third slot. (2) In the above embodiment, the operation in which the predication condition can be arbitrarily specified is limited to the comparison operation. However, the instruction set is extended so that the predication condition can be arbitrarily specified in other arithmetic and logic operations. May be. (3) In the above embodiment, srb / p
Although the d field is switched between the second source operand and the predication destination operand, the d field may be switched according to the contents of the operation code (op field) without providing the c field. For example, taking advantage of the characteristic that the comparison operation does not need to be in the 3-operand format, the srb / pd field is used as a predication destination operand when the operation code is a comparison operation, and the second source operand is used when the operation is other than the above. A preferred embodiment for use as a device is conceivable.
In this way, one bit of the c field can be used for another function. For example, if the op field is extended by one bit, 16 more operations can be specified, which is very useful. (4) In the above embodiment, the instruction format shares the second source operand field and the predication destination operand field. However, the instruction format shares the destination operand field and the predication destination operand field. Is also good. In particular, since the comparison operation does not involve a destination operand, it is a preferred embodiment to use a field that is normally the destination operand as the predication destination operand field only for the comparison operation. (5) In the above embodiment, the srb / pd field is used to specify a predication register to be one predication destination operand, and for the second and subsequent predication registers used simultaneously, the specified predication register is used. Although the registers having the register numbers in ascending order are sequentially used starting from, the descending order may be used, or all the predication registers to be used may be explicitly specified by an instruction. By specifying explicitly, unnecessary use of predication registers can be avoided by, for example, duplicating dummy predication registers for unnecessary predication, and the predication register usage efficiency is improved. I do. (6) In the above embodiment, three instruction decoders and three operation units are provided to achieve three-parallel execution. However, two of these may be provided and two-parallel execution may be performed. Four of them may be provided and executed in parallel, or more may be provided. (7) The processor of the above embodiment employs the VLIW architecture, but may adopt a superscalar architecture. (8) The processor according to the above embodiment includes an instruction fetch,
Although a three-stage pipeline of decryption and execution is described, the number of stages of the pipeline may be any, and the pipeline need not be adopted.
【0047】[0047]
【発明の効果】以上の説明から明らかなように、本発明
に係るプロセッサは、多方向分岐に係るプレディケーシ
ョンを単一の操作に基づいて行うことができるため、実
行効率とプログラム効率との両立を達成することがで
き、特にマルチメディア関連の製品開発において非常に
有用であり、マルチメディア関連産業の進歩発展に多大
な貢献をするものである。As is apparent from the above description, the processor according to the present invention can perform the predication relating to the multi-directional branch based on a single operation, so that both the execution efficiency and the program efficiency are compatible. Is particularly useful in the development of multimedia-related products, and greatly contributes to the advancement and development of the multimedia-related industry.
【図1】実施形態に係るプロセッサの命令構成図FIG. 1 is an instruction configuration diagram of a processor according to an embodiment.
【図2】実施形態に係るプロセッサの概略構成図FIG. 2 is a schematic configuration diagram of a processor according to the embodiment;
【図3】3方向分岐の処理例のフローチャートFIG. 3 is a flowchart of a processing example of a three-way branch;
【図4】実施形態に係るプロセッサの機械命令プログラ
ムの第1の例のリストを示す図FIG. 4 is a diagram showing a list of a first example of a machine instruction program of the processor according to the embodiment;
【図5】実施形態に係るプロセッサの機械命令プログラ
ムの第2の例のリストを示す図FIG. 5 is a view showing a list of a second example of the machine instruction program of the processor according to the embodiment;
【図6】実施形態に係るプロセッサの機械命令プログラ
ムの第3の例のリストを示す図FIG. 6 is a diagram showing a list of a third example of the machine instruction program of the processor according to the embodiment;
【図7】従来技術におけるプロセッサの機械命令プログ
ラムの例のリストを示す図FIG. 7 is a diagram showing a list of examples of a machine instruction program of a processor according to the related art.
1 ROM 2 I1ラッチ 3 I2ラッチ 4 I3ラッチ 5 第1命令解読器 6 第2命令解読器 7 第3命令解読器 8 レジスタファイル 9 D1セレクタ 10 D2セレクタ 11 D3セレクタ 12 D11ラッチ 13 D12ラッチ 14 D13ラッチ 15 D21ラッチ 16 D22ラッチ 17 D23ラッチ 18 第1操作ユニット 19 第2操作ユニット 20 第3操作ユニット 21 第1状態生成ユニット 22 第2状態生成ユニット 23 第3状態生成ユニット 24 プレディケーションユニット 1 ROM 2 I1 latch 3 I2 latch 4 I3 latch 5 First instruction decoder 6 Second instruction decoder 7 Third instruction decoder 8 Register file 9 D1 selector 10 D2 selector 11 D3 selector 12 D11 latch 13 D12 latch 14 D13 latch Reference Signs List 15 D21 latch 16 D22 latch 17 D23 latch 18 First operation unit 19 Second operation unit 20 Third operation unit 21 First state generation unit 22 Second state generation unit 23 Third state generation unit 24 Predication unit
Claims (16)
1の条件でのプレディケーションと第2の条件でのプレ
ディケーションとを行うプロセッサであって、前記第1
の条件と前記第2の条件とが互いに排他的な関係ではな
いことを特徴とするプロセッサ。1. A processor for performing at least predication under a first condition and predication under a second condition based on a single operation designation, wherein
And the second condition is not mutually exclusive.
1の条件でのプレディケーションと第2の条件でのプレ
ディケーションと第3の条件でのプレディケーションと
を行うプロセッサであって、前記第1の条件と前記第2
の条件と前記第3の条件とのいずれの2つも同一の条件
ではないことを特徴とするプロセッサ。2. A processor that performs at least predication under a first condition, predication under a second condition, and predication under a third condition based on a single operation designation, wherein Condition 1 and the second
2. The processor according to claim 1, wherein none of the second condition and the third condition are the same condition.
のプレディケーションと第2の条件でのプレディケーシ
ョンと第3の条件でのプレディケーションとを行うプロ
セッサであって、前記第1の条件と前記第2の条件と前
記第3の条件との3つの和集合により全集合を形成する
ことを特徴とするプロセッサ。3. A processor for performing predication under a first condition, predication under a second condition, and predication under a third condition based on a single operation designation, wherein A total set is formed by three unions of the above condition, the second condition, and the third condition.
ペランドとの比較操作に関するものであり、前記第1の
条件は第1オペランドが第2オペランドより大きいとい
う条件であり、前記第2の条件は第1オペランドと第2
オペランドとが等しいという条件であり、前記第3の条
件は第1オペランドが第2オペランドより小さいという
条件であることを特徴とする請求項3記載のプロセッ
サ。4. The operation specification relates to a comparison operation between a first operand and a second operand, wherein the first condition is a condition that the first operand is larger than the second operand, and the second condition is Is the first operand and the second
4. The processor of claim 3, wherein the condition is that the operands are equal, and the third condition is that the first operand is smaller than the second operand.
あり、前記第1の条件は演算結果が正という条件であ
り、前記第2の条件は演算結果がゼロという条件であ
り、前記第3の条件は演算結果が負という条件であるこ
とを特徴とする請求項3記載のプロセッサ。5. The operation specification is for an operation, the first condition is a condition that the operation result is positive, the second condition is a condition that the operation result is zero, and the third condition is a condition that the operation result is zero. 4. The processor according to claim 3, wherein the condition is that the operation result is negative.
あり、演算結果がオーバーフローするという条件をプレ
ディケーションの条件に含むことを特徴とする請求項1
から3のいずれか1項に記載のプロセッサ。6. The predication condition according to claim 1, wherein the operation designation relates to an arithmetic operation, and includes a condition that an arithmetic result overflows.
The processor according to any one of claims 1 to 3.
件でのプレディケーションと第2の条件でのプレディケ
ーションと第3の条件でのプレディケーションと第4の
条件でのプレディケーションと第5の条件でのプレディ
ケーションとを行うプロセッサであって、前記第1の条
件は演算結果が正方向にオーバーフローするという条件
であり、前記第2の条件は演算結果がオーバーフローし
ない正であるという条件であり、前記第3の条件は演算
結果がゼロという条件であり、前記第4の条件は演算結
果がオーバーフローしない負であるという条件であり、
前記第5の条件は演算結果が負方向にオーバーフローす
るという条件であることを特徴とするプロセッサ。7. A predication under a first condition, a predication under a second condition, a predication under a third condition, and a predication under a fourth condition based on a single operation specification. A processor that performs predication under a fifth condition, wherein the first condition is a condition that the operation result overflows in a positive direction, and the second condition is a condition that the operation result is positive without overflow. The third condition is a condition that the operation result is zero, the fourth condition is a condition that the operation result is negative without overflow, and
The fifth condition is that the operation result overflows in the negative direction.
もに命令中に明示的に指定されることを特徴とする請求
項1記載のプロセッサ。8. The processor according to claim 1, wherein both the first condition and the second condition are explicitly specified in an instruction.
の指定とを、通常の操作指定のための命令上の領域を拡
張して行うことを特徴とする請求項8記載のプロセッ
サ。9. The processor according to claim 8, wherein the designation of the first condition and the designation of the second condition are performed by expanding an area on an instruction for a normal operation designation. .
1つの条件でのプレディケーションを行うプロセッサで
あって、前記操作指定に伴うオペランド指定のための命
令上の領域と前記プレディケーションに伴う条件成否結
果の格納先指定のための命令上の領域とを共有すること
を特徴とするプロセッサ。10. A processor that performs predication under at least one condition based on a single operation specification, wherein an area on an instruction for specifying an operand associated with the operation specification and whether the condition associated with the predication is satisfied A processor which shares an instruction area for designating a result storage destination.
と第2ソースオペランドとデスティネーションオペラン
ドとの3つのオペランド指定のための命令上の領域を伴
い、前記第2ソースオペランドの指定のための命令上の
領域と前記プレディケーションに伴う条件成否結果の格
納先指定のための命令上の領域とを共有することを特徴
とする請求項10記載のプロセッサ。11. The operation specification includes an instruction area for specifying three operands of a first source operand, a second source operand, and a destination operand, and includes an instruction area for specifying the second source operand. 11. The processor according to claim 10, wherein the area of the instruction is shared with an area on an instruction for specifying a storage destination of a result of success or failure of the condition accompanying the predication.
と第2ソースオペランドとデスティネーションオペラン
ドとの3つのオペランド指定のための命令上の領域を伴
い、前記デスティネーションオペランドの指定のための
命令上の領域と前記プレディケーションに伴う条件成否
結果の格納先指定のための命令上の領域とを共有するこ
とを特徴とする請求項10記載のプロセッサ。12. The operation specification includes an instruction area for specifying three operands of a first source operand, a second source operand, and a destination operand, and an instruction area for specifying the destination operand. 11. The processor according to claim 10, wherein an area and an area on an instruction for designating a storage destination of a result of the success or failure of the condition accompanying the predication are shared.
ンド指定のための領域であるかプレディケーションに伴
う条件成否結果の格納先指定のための領域であるかを、
前記操作指定によって指定される操作が比較操作である
か否かに基づいて決定することを特徴とする請求項10
から12のいずれか1項に記載のプロセッサ。13. Whether the area on the instruction related to sharing is an area for specifying an operand or an area for specifying a storage destination of a condition success / failure result accompanying predication is determined.
11. The method according to claim 10, wherein the determination is made based on whether or not the operation specified by the operation specification is a comparison operation.
A processor according to any one of claims 1 to 12.
が比較操作である場合に、前記共有に係る命令上の領域
をプレディケーションに伴う条件成否結果の格納先指定
のための領域とすることを特徴とする請求項13記載の
プロセッサ。14. When the operation specified by the operation specification is a comparison operation, an area on the instruction related to the sharing is set as an area for specifying a storage destination of a condition success / failure result accompanying predication. 14. The processor according to claim 13, wherein:
ンに伴う条件成否結果の格納先と前記第2の条件でのプ
レディケーションに伴う条件成否結果の格納先とがとも
に命令中に明示的に指定されることを特徴とする請求項
1記載のプロセッサ。15. A storage location of the result of the success or failure of the condition accompanying the predication under the first condition and a storage location of the result of the success or failure of the condition accompanying the predication under the second condition are both explicitly specified in an instruction. The processor of claim 1, wherein
の命令中に指定する長語命令形式のプロセッサであるこ
とを特徴とする請求項1から15のいずれか1項に記載
のプロセッサ。16. The processor according to claim 1, wherein the processor is a long-word instruction format processor that specifies a plurality of operations in one instruction.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000117489A JP2001306321A (en) | 2000-04-19 | 2000-04-19 | Processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000117489A JP2001306321A (en) | 2000-04-19 | 2000-04-19 | Processor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2001306321A true JP2001306321A (en) | 2001-11-02 |
Family
ID=18628800
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000117489A Withdrawn JP2001306321A (en) | 2000-04-19 | 2000-04-19 | Processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2001306321A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005250697A (en) * | 2004-03-02 | 2005-09-15 | Matsushita Electric Ind Co Ltd | State control device and state control method |
| JP2007531135A (en) * | 2004-03-31 | 2007-11-01 | イセラ・インコーポレーテッド | Apparatus and method for dual data path processing |
| JP2007531134A (en) * | 2004-03-31 | 2007-11-01 | イセラ・インコーポレーテッド | Apparatus and method for asymmetric dual path processing |
| JP2007531133A (en) * | 2004-03-31 | 2007-11-01 | イセラ・インコーポレーテッド | Apparatus and method for processing control of dual path processor |
| JP2016006632A (en) * | 2014-05-20 | 2016-01-14 | ブル・エス・アー・エス | Processor with conditional instructions |
-
2000
- 2000-04-19 JP JP2000117489A patent/JP2001306321A/en not_active Withdrawn
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005250697A (en) * | 2004-03-02 | 2005-09-15 | Matsushita Electric Ind Co Ltd | State control device and state control method |
| JP2007531135A (en) * | 2004-03-31 | 2007-11-01 | イセラ・インコーポレーテッド | Apparatus and method for dual data path processing |
| JP2007531134A (en) * | 2004-03-31 | 2007-11-01 | イセラ・インコーポレーテッド | Apparatus and method for asymmetric dual path processing |
| JP2007531133A (en) * | 2004-03-31 | 2007-11-01 | イセラ・インコーポレーテッド | Apparatus and method for processing control of dual path processor |
| US7949856B2 (en) | 2004-03-31 | 2011-05-24 | Icera Inc. | Method and apparatus for separate control processing and data path processing in a dual path processor with a shared load/store unit |
| US8484442B2 (en) | 2004-03-31 | 2013-07-09 | Icera Inc. | Apparatus and method for control processing in dual path processor |
| US8484441B2 (en) | 2004-03-31 | 2013-07-09 | Icera Inc. | Apparatus and method for separate asymmetric control processing and data path processing in a configurable dual path processor that supports instructions having different bit widths |
| US9047094B2 (en) | 2004-03-31 | 2015-06-02 | Icera Inc. | Apparatus and method for separate asymmetric control processing and data path processing in a dual path processor |
| US9477475B2 (en) | 2004-03-31 | 2016-10-25 | Nvidia Technology Uk Limited | Apparatus and method for asymmetric dual path processing |
| JP2016006632A (en) * | 2014-05-20 | 2016-01-14 | ブル・エス・アー・エス | Processor with conditional instructions |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100464406B1 (en) | Apparatus and method for dispatching very long instruction word with variable length | |
| US7127593B2 (en) | Conditional execution with multiple destination stores | |
| EP2569694B1 (en) | Conditional compare instruction | |
| KR100690225B1 (en) | Data processor system and command system using grouping | |
| JP3547139B2 (en) | Processor | |
| US5269007A (en) | RISC system capable of simultaneously executing data interlocked shift and arithmetic/logic instructions in one clock cycle by bypassing register | |
| JP2002525752A (en) | How to build a configurable hardware block | |
| US7574583B2 (en) | Processing apparatus including dedicated issue slot for loading immediate value, and processing method therefor | |
| US7447886B2 (en) | System for expanded instruction encoding and method thereof | |
| EP1190311A2 (en) | System and method for reducing write traffic in processors | |
| JPH1165844A (en) | Data processing device having pipeline bypass function | |
| US20030159021A1 (en) | Selected register decode values for pipeline stage register addressing | |
| CN108139911A (en) | Conditional Execution Specifications for Instructions Using Conditional Expansion Slots in the Same Execution Package of a VLIW Processor | |
| KR20070026434A (en) | Apparatus and method for control processing in a dual path processor | |
| JP5326314B2 (en) | Processor and information processing device | |
| US6516407B1 (en) | Information processor | |
| US20170212758A1 (en) | Encoding instructions identifying first and second architectural register numbers | |
| CN106610817A (en) | Method for assigning or extending a constant number of bits with a constant extension slot in the same execution packet in a VLIW processor | |
| JP2001306321A (en) | Processor | |
| JP5786719B2 (en) | Vector processor | |
| JP7495030B2 (en) | Processors, processing methods, and related devices | |
| US6079011A (en) | Apparatus for executing a load instruction or exchange instruction in parallel with other instructions in a dual pipelined processor | |
| JP2006053830A (en) | Branch prediction apparatus and branch prediction method | |
| JP2000207210A (en) | Microprocessor | |
| US7543135B2 (en) | Processor and method for selectively processing instruction to be read using instruction code already in pipeline or already stored in prefetch buffer |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070320 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20070412 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090216 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090303 |
|
| A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20090331 |