JP2006338684A - Processor - Google Patents
Processor Download PDFInfo
- Publication number
- JP2006338684A JP2006338684A JP2006210393A JP2006210393A JP2006338684A JP 2006338684 A JP2006338684 A JP 2006338684A JP 2006210393 A JP2006210393 A JP 2006210393A JP 2006210393 A JP2006210393 A JP 2006210393A JP 2006338684 A JP2006338684 A JP 2006338684A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- data
- explaining
- diagram
- register
- 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
- 238000004364 calculation method Methods 0.000 claims description 36
- 238000000034 method Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 767
- 238000012545 processing Methods 0.000 description 41
- 239000013598 vector Substances 0.000 description 11
- 239000000872 buffer Substances 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000006243 chemical reaction Methods 0.000 description 5
- 238000012935 Averaging Methods 0.000 description 3
- 102100037364 Craniofacial development protein 1 Human genes 0.000 description 3
- 101000880187 Homo sapiens Craniofacial development protein 1 Proteins 0.000 description 3
- 238000006073 displacement reaction Methods 0.000 description 3
- 230000033001 locomotion Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 102100027674 CTD small phosphatase-like protein Human genes 0.000 description 2
- 102100027667 Carboxy-terminal domain RNA polymerase II polypeptide A small phosphatase 2 Human genes 0.000 description 2
- 102100034223 Golgi apparatus protein 1 Human genes 0.000 description 2
- 101000725950 Homo sapiens CTD small phosphatase-like protein Proteins 0.000 description 2
- 101000725947 Homo sapiens Carboxy-terminal domain RNA polymerase II polypeptide A small phosphatase 2 Proteins 0.000 description 2
- 101100449731 Homo sapiens GLG1 gene Proteins 0.000 description 2
- 101100439271 Schizosaccharomyces pombe (strain 972 / ATCC 24843) cfr1 gene Proteins 0.000 description 2
- 101150103933 VMAC gene Proteins 0.000 description 2
- 238000003491 array Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000004154 complement system Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 101100285899 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) SSE2 gene Proteins 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000008140 language development Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3885—Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30007—Arrangements for executing specific machine instructions to perform operations on data operands
- G06F9/30036—Instructions to perform operations on packed data, e.g. vector, tile or matrix operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3885—Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units
- G06F9/3887—Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units controlled by a single instruction for multiple data lanes [SIMD]
Abstract
Description
本発明は、DSPやCPU等のプロセッサに関し、特にSIMD型の命令を実行するプロセッサに関する。 The present invention relates to a processor such as a DSP or a CPU, and more particularly to a processor that executes SIMD type instructions.
従来、SIMD(Single Instruction Multiple Data)型の命令をサポートしているプロセッサとして、米国インテル社のPentium(登録商標)/同III/同4のMMX/SSE/SSE2等がある。 Conventionally, as processors that support SIMD (Single Instruction Multiple Data) type instructions, there are Pentium (registered trademark) / III // 4 MMX / SSE / SSE2 of Intel Corporation.
例えば、MMXであれば、64ビット長のMMXレジスタに格納された最大8個の整数を対象として、1つの命令で同一のオペレーションを実行することができる。 For example, in the case of MMX, the same operation can be executed with one instruction for up to eight integers stored in a 64-bit MMX register.
しかしながら、上記のような従来のプロセッサは、SIMD演算の対象となるオペランドの位置に関する制約が多いという問題がある。 However, the conventional processor as described above has a problem that there are many restrictions on the position of the operand to be subjected to the SIMD operation.
例えば、第1レジスタの上位桁及び下位桁それぞれに数値A及びBが格納され、第2レジスタの上位桁及び下位桁それぞれに数値C及びDが格納された状態で、第1レジスタと第2レジスタをオペランドとするSIMD型の加算命令を従来のプロセッサが実行した場合には、得られる加算値は、A+C、及び、B+Dである。つまり、両レジスタの上位桁に格納されたデータ同士の加算値と両レジスタの下位桁に格納されたデータ同士の加算値が得られることとなり、レジスタでのデータの格納位置によって演算対象が一義的に決定されてしまう。 For example, in a state in which numerical values A and B are stored in the upper and lower digits of the first register and numerical values C and D are stored in the upper and lower digits of the second register, respectively, When a conventional processor executes a SIMD type addition instruction with オ ペ ラ ン ド as an operand, the obtained addition values are A + C and B + D. In other words, an addition value between the data stored in the upper digits of both registers and an addition value between the data stored in the lower digits of both registers are obtained, and the operation target is uniquely determined by the data storage position in the registers. Will be decided.
そのために、例えば、上記のような第1レジスタ及び第2レジスタに対して、A+D、及び、B+Cという加算値を求めたい場合には、一方のレジスタに格納された上位桁のデータと下位桁のデータの格納位置を入れ替えてから、SIMD型の加算命令を実行したり、あるいは、SIMD型の加算命令を用いることなく、通常のSISD(Single Instruction Single Data)型の加算命令を2回実行したりする必要がある。 Therefore, for example, when it is desired to obtain addition values of A + D and B + C for the first register and the second register as described above, the upper digit data and the lower digit data stored in one register are obtained. Execute SIMD type addition instruction after changing data storage location, or execute normal SISD (Single Instruction Single Data) type addition instruction twice without using SIMD type addition instruction There is a need to.
ところで、近年の通信のデジタル化に伴い、フーリエ変換やフィルタ処理等のデジタル信号処理が必要とされる画像処理や音声処理の分野では、複数のデータに対して同一の演算処理を施すことが必要とされるが、その場合に、例えば、データの並びにおける中心位置から左右対称に位置するデータに対して同一の演算を施す等の処理が必要とされるケースが多い。このようなケースでは、演算の対象となる2種類のオペランドは逆順に並べられ、例えば、2つのレジスタにおける一方の上位桁に格納されたデータと他方の下位桁に格納されたデータとを対象として演算をしなければならない。 By the way, with the recent digitalization of communication, in the field of image processing and sound processing that require digital signal processing such as Fourier transform and filter processing, it is necessary to perform the same arithmetic processing on a plurality of data. However, in that case, for example, there are many cases where a process such as performing the same operation on data located symmetrically from the center position in the data arrangement is required. In such a case, the two types of operands to be operated are arranged in reverse order, for example, data stored in one upper digit and data stored in the other lower digit in two registers. You have to do the operation.
ところが、従来のプロセッサによるSIMD演算では、上述のように、演算の対象となるオペランドは同じ順序で並べられている必要があるために、オペランドの並び替え等が必要とされ、デジタル信号処理に多くの時間を要してしまうという問題がある。 However, in the SIMD calculation by the conventional processor, as described above, the operands to be calculated need to be arranged in the same order. Therefore, the operands need to be rearranged, which is often used for digital signal processing. There is a problem that it takes a long time.
そこで、本発明は、このような状況に鑑みてなされたものであり、SIMD演算の対象となるオペランドの位置に関する制約が少ない、柔軟性の高いSIMD演算を実行するプロセッサを提供することを目的とする。より具体的には、例えば、デジタル信号処理を高速に実行するマルチメディア用途に適したプロセッサを提供することを目的とする。 Therefore, the present invention has been made in view of such a situation, and an object of the present invention is to provide a processor that executes a highly flexible SIMD operation with few restrictions on the position of an operand to be subjected to SIMD operation. To do. More specifically, for example, an object of the present invention is to provide a processor suitable for multimedia use that executes digital signal processing at high speed.
上記目的を達成するために、本発明に係るプロセッサは、1つの命令で複数のデータを演算するSIMD型の命令を実行するプロセッサであって、命令を解読する解読手段と、解読手段による解読結果に基づいて、命令を実行する実行手段とを備え、前記実行手段は、演算の種類を指定する命令コードとn(≧2)個のデータの並びからなる第1データ群を指定する第1オペランドとn個のデータの並びからなる第2データ群を指定する第2オペランドとを含むSIMD型の命令が前記解読手段によって解読された場合に、前記第1データ群を構成するn個のデータの並びにおける第i番目のデータと前記第2データ群を構成するn個のデータの並びにおける第j番目のデータとからなるn組それぞれに対して前記命令コードで指定される演算を行い、前記i=1,2,…,n、前記j=一定であることを特徴とする。 In order to achieve the above object, a processor according to the present invention is a processor that executes a SIMD type instruction that calculates a plurality of data with one instruction, and includes a decoding means for decoding the instruction, and a decoding result by the decoding means And an execution means for executing an instruction, wherein the execution means specifies a first data group consisting of an instruction code for specifying the type of operation and a sequence of n (≧ 2) pieces of data. And a second operand designating a second data group consisting of a sequence of n data, when the SIMD type instruction is decoded by the decoding means, the n data constituting the first data group An operation specified by the instruction code for each of n sets of the i-th data in the sequence and the j-th data in the sequence of n data constituting the second data group. Was carried out, the i = 1, 2, ..., n, wherein said a j = constant.
たとえば、前記nは、2であり、前記第1データ群は、第1番目データと第2番目データとからなり、前記第2データ群は、第1番目データと第2番目データとからなり、前記実行手段は、前記第1データ群の第1番目データと第2データ群の第1番目データとの組に対して前記演算を行うとともに、前記第1データ群の第2番目データと第2データ群の第1番目データとの組に対して前記演算を行う。 For example, the n is 2, the first data group is composed of first data and second data, the second data group is composed of first data and second data, The execution means performs the calculation on a set of the first data of the first data group and the first data of the second data group, and the second data and second of the first data group. The calculation is performed on a set of the data group and the first data.
ここで、前記命令コードが指定する演算の種類は、乗算、積和又は積差であり、前記命令は、演算の結果を格納するための第3データを指定する第3オペランドを含み、前記実行手段は、前記2つの組に対して前記演算を行って得られた結果それぞれの下位部分又は上位部分を前記第3データに格納してもよい。 Here, the type of operation specified by the instruction code is multiplication, product-sum or product-difference, and the instruction includes a third operand that specifies third data for storing the result of the operation. The means may store the lower part or the upper part of each result obtained by performing the calculation on the two sets in the third data.
また、たとえば、前記nは、4であり、前記第1データ群は、第1〜第4番目データの並びからなり、前記第2データ群は、第1〜第4番目データの並びからなり、前記実行手段は、前記第1データ群の第1番目データと第2データ群の第1番目データとの組、前記第1データ群の第2番目データと第2データ群の第1番目データとの組、前記第1データ群の第3番目データと第2データ群の第1番目データとの組、及び、前記第1データ群の第4番目データと第2データ群の第1番目データとの組に対して前記演算を行う。 Further, for example, the n is 4, the first data group is composed of a sequence of first to fourth data, and the second data group is composed of a sequence of first to fourth data, The execution means includes a set of the first data of the first data group and the first data of the second data group, the second data of the first data group and the first data of the second data group, A set of the third data of the first data group and the first data of the second data group, and the fourth data of the first data group and the first data of the second data group, The above operation is performed on a set of
ここで、前記命令コードが指定する演算の種類は、乗算、積和又は積差であり、前記命令は、演算の結果を格納するための第3データを指定する第3オペランドを含み、前記実行手段は、前記4つの組に対して前記演算を行って得られた結果それぞれの下位部分又は上位部分を前記第3データに格納してもよい。 Here, the type of operation specified by the instruction code is multiplication, product-sum or product-difference, and the instruction includes a third operand that specifies third data for storing the result of the operation. The means may store the lower part or the upper part of each result obtained by performing the calculation on the four sets in the third data.
なお、本発明は、このような特徴的な命令を実行するプロセッサとして実現することができるだけでなく、複数のデータ等に対する演算処理方法として実現したり、特徴的な命令を含むプログラムとして実現したりすることもできる。そして、そのようなプログラムは、CD−ROM等の記録媒体やインターネット等の伝送媒体を介して流通させることができるのは言うまでもない。 The present invention can be realized not only as a processor that executes such characteristic instructions, but also as an arithmetic processing method for a plurality of data or the like, or as a program including characteristic instructions. You can also Needless to say, such a program can be distributed via a recording medium such as a CD-ROM or a transmission medium such as the Internet.
本発明に係るプロセッサは、1つの命令で複数のデータを演算するSIMD型の命令を実行するプロセッサであって、2つのデータ列に対して、同一順位のデータ同士だけでなく、一方のデータ列の演算対象を共通(位置を固定)にしたデータ組に対して並列に演算を実行する。したがって、複数のデータ要素に対して共通のデータ要素との演算を繰り返すが高速化され、マルチメディア処理等に好適なプロセッサが実現される。 The processor according to the present invention is a processor that executes a SIMD type instruction that calculates a plurality of data with one instruction, and not only two pieces of data in the same order but also one data row with respect to two data rows. The calculation is executed in parallel on the data set having the same calculation target (fixed position). Therefore, the calculation with a common data element is repeated for a plurality of data elements, but the processing speed is increased and a processor suitable for multimedia processing or the like is realized.
ここで、演算の種類が乗算、積和又は積差である場合には、得られた演算結果それぞれの下位部分だけを出力したり、上位部分だけを出力したり、一部の演算結果だけを出力してもよい。これによって、複素数の内積等において、整数データを扱う場合や固定小数点データを扱う場合に必要となるビット切り出し処理が演算とともに実行されるので、複素数等の2次元データを用いる演算、例えば、2次元座標を用いる画像処理や振幅と位相の2次元表現が用いられる音声信号の処理等が高速化される。 Here, when the type of operation is multiplication, sum of products or product difference, only the lower part of each obtained operation result is output, only the upper part is output, or only part of the operation results are output. It may be output. As a result, in the inner product of complex numbers, etc., the bit cut-out processing required when handling integer data or fixed-point data is executed together with the calculation, so that an operation using two-dimensional data such as a complex number, for example, two-dimensional Image processing using coordinates, audio signal processing using a two-dimensional representation of amplitude and phase, and the like are accelerated.
以上のように、本発明に係るプロセッサは、通常のマイコンに比べて並列性が高く、AVメディア系信号処理が高速であり、携帯電話、モバイルAV機器、デジタルTV、DVD等に共通のコアプロセッサとして使用可能であり、高性能・高コストパフォーマンスなマルチメディア機器の出現が望まれる今日における実用的価値は極めて高いと言える。 As described above, the processor according to the present invention has higher parallelism than ordinary microcomputers, high-speed AV media signal processing, and a common core processor for mobile phones, mobile AV devices, digital TVs, DVDs, and the like. It can be said that the practical value is extremely high today when the appearance of high performance and high cost performance multimedia equipment is desired.
本発明に係るプロセッサのアーキテクチャについて説明する。本プロセッサの命令は通常のマイコンに比べて並列性が高く、AVメディア系信号処理技術分野をターゲットとして開発された汎用プロセッサである。携帯電話、モバイルAV機器、デジタルTV、DVD等に共通コアを使用することにより、ソフト再利用性を向上させることができる。また、本プロセッサは、高性能・高コストパフォーマンスで多くのメディア処理を実現することができ、さらに、開発効率向上を目的とした高級言語開発環境を提供する。 The architecture of the processor according to the present invention will be described. The instructions of this processor have higher parallelism than ordinary microcomputers, and are general-purpose processors developed for the AV media signal processing technology field. By using a common core for mobile phones, mobile AV devices, digital TVs, DVDs, etc., software reusability can be improved. In addition, this processor can realize a lot of media processing with high performance and high cost performance, and provides a high-level language development environment for the purpose of improving development efficiency.
図1は、本プロセッサの概略ブロック図である。本プロセッサ1は、命令制御部10、デコード部20、レジスタファイル30、演算部40、I/F部50、命令メモリ部60、データメモリ部70、拡張レジスタ部80及びI/Oインターフェース部90から構成される。演算部40は、SIMD型命令の演算を実行する算術論理・比較演算器41〜43、乗算・積和演算器44、バレルシフタ45、除算器46及び変換器47からなる。乗算・積和演算器44は、ビット精度を落とさないように、最長で65ビットで累算する。また、乗算・積和演算器44は、算術論理・比較演算器41〜43と同様、SIMD型命令の実行が可能である。更に、このプロセッサ1は、算術論理・比較演算命令が最大3並列実行可能である。
FIG. 1 is a schematic block diagram of the processor. The
図2は、算術論理・比較演算器41〜43の概略図を示す。算術論理・比較演算器41〜43それぞれは、ALU部41a、飽和処理部41b及びフラグ部41cから構成される。ALU部41aは、算術演算器、論理演算器、比較器、TST器からなる。対応する演算データのビット幅は、8ビット(演算器を4並列で使用)、16ビット(演算器を2並列で使用)、32ビットである(全演算器で32ビットデータ処理)。更に算術演算結果に対しては、フラグ部41c等により、オーバーフローの検出とコンディションフラグの生成が行われる。各演算器、比較器、TST器の結果は、算術右シフト、飽和処理部41bによる飽和、最大・最小値検出、絶対値生成処理が行われる。
FIG. 2 shows a schematic diagram of the arithmetic logic / comparison arithmetic units 41-43. Each of the arithmetic logic / comparison
図3は、バレルシフタ45の構成を示すブロック図である。バレルシフタ45は、セレクタ45a、45b、上位バレルシフタ45c、下位バレルシフタ45d及び飽和処理部45eから構成され、データの算術シフト(2の補数体系のシフト)または、論理シフト(符号なしシフト)を実行する。通常は、32ビットもしくは、64ビットのデータを入出力としている。レジスタ30a、30bに格納された被シフトデータに対して、別のレジスタまたは即値でシフト量が指定される。データは、左63ビット〜右63ビットの算術または論理シフトが行われ、入力ビット長で出力される。
FIG. 3 is a block diagram showing the configuration of the
また、バレルシフタ45は、SIMD型命令に対して、8、16、32、64ビットのデータをシフトすることができる。例えば、8ビットデータのシフトを4並列で処理することができる。
In addition, the
算術シフトは、2の補数体系のシフトであり、加算や減算時の小数点の位置合わせや、2のべき乗の乗算(2、2の2乗、2の(−1)乗、2の(−2)乗倍など)等のために行われる。 Arithmetic shift is a shift of 2's complement system, and alignment of decimal point at the time of addition or subtraction, multiplication by power of 2 (2, 2 squared, 2 (-1) power, 2 (-2) Etc.) etc.
図4は、変換器47の構成を示すブロック図である。変換器47は、飽和ブロック(SAT)47a、BSEQブロック47b、MSKGENブロック47c、VSUMBブロック47、BCNTブロック47e及びILブロック47fから構成される。
FIG. 4 is a block diagram showing the configuration of the
飽和ブロック(SAT)47aは、入力データに対する飽和処理を行う。32ビットデータを飽和処理するブロックを2つ持つことにより、2並列のSIMD型命令をサポートする。 The saturation block (SAT) 47a performs saturation processing on the input data. By having two blocks that saturate 32-bit data, two parallel SIMD instructions are supported.
BSEQブロック47bは、MSBから連続する0か1をカウントする。
MSKGENブロック47cは、指定されたビット区間を1、それ以外を0として出力する。
The
The MSKGEN block 47c outputs the designated bit interval as 1, and outputs the other as 0.
VSUMBブロック47dは、入力データを指定されたビット幅に区切り、その総和を出力する。
The
BCNTブロック47eは、入力データで1となっているビットの数をカウントする。
ILブロック47fは、入力データを指定されたビット幅に区切り、各データブロックを入れ換えた値を出力する。
The
The
図5は、除算器46の構成を示すブロック図である。除算器46は、被除数を64ビット、除数を32ビットとし、商と剰余を32ビットずつ出力する。商と剰余を求めるまでに34サイクルを必要とする。符号付き、符号なし、両方のデータを扱うことが可能である。ただし、被除数と除数において符号の有無の設定は共通とする。その他、オーバーフローフラグ、0除算フラグを出力する機能を有する。
FIG. 5 is a block diagram showing a configuration of the
図6は、乗算・積和演算器44の構成を示すブロック図である。乗算・積和演算器44は、2つの32ビット乗算器(MUL)44a、44b、3つの64ビット加算器(Adder)44c〜44e、セレクタ44f及び飽和処理部(Saturation)44gから構成され、以下の乗算、積和演算を行う。
FIG. 6 is a block diagram showing a configuration of the multiplication / product-
・32×32ビットのsignedの乗算、積和、積差演算
・32×32ビットのunsignedの乗算
・16×16ビットの2並列のsignedの乗算、積和、積差演算
・32×16ビットの2並列のsignedの乗算、積和、積差演算
32 × 32 bit signed multiplication, product sum,
これらの演算を整数、固定小数点フォーマット(h1、h2、w1、w2)のデータに対して行う。また、これらの演算に対し、丸め、飽和を行う。 These operations are performed on data in integer and fixed-point format (h1, h2, w1, w2). Also, rounding and saturation are performed for these operations.
図7は、命令制御部10の構成を示すブロック図である。命令制御部10は、命令キャッシュ10a、アドレス管理部10b、命令バッファ10c〜10e、ジャンプバッファ10f及びローテーション部(rotation)10gから構成され、通常時及び分岐時の命令供給を行う。128ビットの命令バッファを3つ(命令バッファ10c〜10e)持つことにより、最大並列実行数に対応している。分岐処理に関しては、分岐実行前に、ジャンプバッファ10f等を介して、後述するTARレジスタに予め分岐先アドレスを格納する(settar命令)。TARレジスタに格納された分岐先アドレスを使用して、分岐を行う。
FIG. 7 is a block diagram illustrating a configuration of the
なお、本プロセッサ1はVLIWアーキテクチャを持つプロセッサである。ここで、VLIWアーキテクチャとは、1つの命令語中に複数の命令(ロード、ストア、演算、分岐など)を格納し、それらを全て同時に実行するアーキテクチャである。プログラマは、並列実行可能な命令を1つの発行グループとして記述することによって、その発行グループを並列処理させることができる。本明細書では、発行グループの区切りを“;;”で示す。以下に表記例を示す。
The
(例1)
mov r1, 0x23;;
(Example 1)
mov r1, 0x23 ;;
この命令記述は、命令movのみを実行することを意味する。 This instruction description means that only the instruction mov is executed.
(例2)
mov r1, 0x38
add r0, r1, r2
sub r3, r1, r2;;
(Example 2)
mov r1, 0x38
add r0, r1, r2
sub r3, r1, r2 ;;
これらの命令記述は、命令mov、add、subを3並列で実行することを意味する。 These instruction descriptions mean that instructions mov, add, and sub are executed in parallel.
命令制御部10は、発行グループを識別し、デコード部20に送る。デコード部20では、発行グループの命令を解析し、必要な資源を制御する。
The
次に、本プロセッサ1が備えるレジスタについて説明する。
本プロセッサ1のレジスタセットは、以下の表1に示される通りである。
Next, the registers included in the
The register set of the
また、本プロセッサ1のフラグセット(後述する条件フラグレジスタ等で管理されるフラグ)は、以下の表2に示される通りである。 The flag set of the processor 1 (flags managed by a condition flag register or the like described later) is as shown in Table 2 below.
図8は、汎用レジスタ(R0〜R31)30aの構造を示す図である。汎用レジスタ(R0〜R31)30aは、実行対象となっているタスクのコンテキストの一部を構成し、データまたはアドレスを格納する32ビットのレジスタ群である。なお、汎用レジスタR30およびR31は、それぞれグローバルポインタ、スタックポインタとして、ハードウェアが使用する。 FIG. 8 is a diagram illustrating the structure of the general-purpose registers (R0 to R31) 30a. The general-purpose registers (R0 to R31) 30a constitute a part of the context of the task to be executed and are a 32-bit register group for storing data or addresses. The general-purpose registers R30 and R31 are used by hardware as a global pointer and a stack pointer, respectively.
図9は、リンクレジスタ(LR)30cの構造を示す図である。なお、このリンクレジスタ(LR)30cと関連して、本プロセッサ1は、図示されていない退避レジスタ(SVR)も備える。リンクレジスタ(LR)30cは、関数コール時のリターンアドレスを格納する32ビットのレジスタである。なお、退避レジスタ(SVR)は、関数コール時の条件フラグレジスタのコンディションフラグ(CFR.CF)を退避する16ビットのレジスタである。リンクレジスタ(LR)30cは、後述する分岐レジスタ(TAR)と同様に、ループ高速化にも使用される。下位1ビットは常に0が読み出されるが、書き込み時には0を書き込む必要がある。
FIG. 9 is a diagram illustrating the structure of the link register (LR) 30c. In connection with the link register (LR) 30c, the
例えば、call(brl,jmpl)命令を実行した場合には、本プロセッサ1は、リンクレジスタ(LR)30cに戻りアドレスを退避し、退避レジスタ(SVR)にコンディションフラグ(CFR.CF)を退避する。また、jmp命令を実行した場合には、リンクレジスタ(LR)30cから戻りアドレス(分岐先アドレス)を取り出し、プログラムカウンタ(PC)を復帰させる。さらに、ret(jmpr)命令を実行した場合には、リンクレジスタ(LR)30cから分岐先アドレス(戻りアドレス)を取り出し、プログラムカウンタ(PC)に格納(復帰)する。さらに、退避レジスタ(SVR)からコンディションフラグを取り出し、条件フラグレジスタ(CFR)32のコンディションンフラグ領域CFR.CFに格納(復帰)する。
For example, when the call (brl, jmpl) instruction is executed, the
図10は、分岐レジスタ(TAR)30dの構造を示す図である。分岐レジスタ(TAR)30dは、分岐ターゲットアドレスを格納する32ビットのレジスタである。主に、ループの高速化に用いられる。下位1ビットは常に0が読み出されるが、書き込み時には0を書き込む必要がある。 FIG. 10 is a diagram showing the structure of the branch register (TAR) 30d. The branch register (TAR) 30d is a 32-bit register that stores a branch target address. Mainly used to speed up loops. The lower 1 bit is always read as 0, but 0 must be written when writing.
例えば、jmp,jloop命令を実行した場合には、本プロセッサ1は、分岐レジスタ(TAR)30dから分岐先アドレスを取り出し、プログラムカウンタ(PC)に格納する。分岐レジスタ(TAR)30dに格納されたアドレスの命令が分岐用命令バッファに格納されている場合は、分岐ペナルティが0になる。分岐レジスタ(TAR)30dにループの先頭アドレスを格納しておくことでループを高速化することができる。
For example, when a jmp, jloop instruction is executed, the
図11は、プログラム状態レジスタ(PSR)31の構造を示す図である。プログラム状態レジスタ(PSR)31は、実行対象となっているタスクのコンテキストの一部を構成し、以下に示されるプロセッサ状態情報を格納する32ビットのレジスタである。 FIG. 11 is a diagram showing the structure of the program status register (PSR) 31. The program status register (PSR) 31 is a 32-bit register that constitutes a part of the context of the task to be executed and stores the processor status information shown below.
ビットSWE:VMP(Virtual Multi-Processor)のLP(Logical Processor)切替えイネーブルを示す。「0」はLP切替え不許可を示し、「1」はLP切替え許可を示す。 Bit SWE: indicates an LP (Logical Processor) switching enable of VMP (Virtual Multi-Processor). “0” indicates that LP switching is not permitted, and “1” indicates that LP switching is permitted.
ビットFXP:固定小数点モードを示す。「0」はモード0を示し、「1」はモード1を示す。
Bit FXP: indicates a fixed point mode. “0” indicates
ビットIH:割込み処理フラグであり、マスカブル割込み処理中であることを示す。「1」は割込み処理中であることを示し、「0」は割込み処理中でないことを示す。割込みが発生すると自動的にセットされる。rti命令で割込みから復帰したところが、他の割込み処理中かプログラム処理中であるのかを見分けるために使用される。 Bit IH: This is an interrupt processing flag and indicates that maskable interrupt processing is in progress. “1” indicates that interrupt processing is in progress, and “0” indicates that interrupt processing is not in progress. Set automatically when an interrupt occurs. It is used to determine whether the place where the rti instruction has returned from the interrupt is processing another interrupt or program.
ビットEH:エラーまたはNMIを処理中であることを示すフラグである。「0」はエラー/NMI割込み処理中でないことを示し、「1」はエラー/NMI割込み処理中であることを示す。EH=1のとき、非同期エラーまたはNMIが発生した場合は、マスクされる。また、VMPイネーブル時はVMPのプレート切り替えがマスクされる。 Bit EH: a flag indicating that an error or NMI is being processed. “0” indicates that an error / NMI interrupt is not being processed, and “1” indicates that an error / NMI interrupt is being processed. When EH = 1, if an asynchronous error or NMI occurs, it is masked. When VMP is enabled, VMP plate switching is masked.
ビットPL[1:0]:特権レベルを示す。「00」は特権レベル0、つまり、プロセッサアブストラクションレベルを示し、「01」は特権レベル1(設定できない)を示し、「10」は特権レベル2、つまり、システムプログラムレベルを示し、「11」は特権レベル3、つまり、ユーザプログラムレベルを示す。
Bit PL [1: 0]: indicates a privilege level. “00” indicates
ビットLPIE3:LP固有割込み3イネーブルを示す。「1」は割込み許可を示し、「0」は割込み不許可を示す。 Bit LPIE3: indicates LP specific interrupt 3 enable. “1” indicates interrupt permission, and “0” indicates interrupt disapproval.
ビットLPIE2:LP固有割込み2イネーブルを示す。「1」は割込み許可を示し、「0」は割込み不許可を示す。 Bit LPIE2: indicates LP specific interrupt 2 enable. “1” indicates interrupt permission, and “0” indicates interrupt disapproval.
ビットLPIE1:LP固有割込み1イネーブルを示す。「1」は割込み許可を示し、「0」は割込み不許可を示す。 Bit LPIE1: Indicates LP specific interrupt 1 enable. “1” indicates interrupt permission, and “0” indicates interrupt disapproval.
ビットLPIE0:LP固有割込み0イネーブルを示す。「1」は割込み許可を示し、「0」は割込み不許可を示す。 Bit LPIE0: indicates LP specific interrupt 0 enable. “1” indicates interrupt permission, and “0” indicates interrupt disapproval.
ビットAEE:ミスアライメント例外イネーブルを示す。「1」はミスアライメント例外許可を示し、「0」はミスアライメント例外不許可を示す。 Bit AEE: indicates misalignment exception enable. “1” indicates that misalignment exception is permitted, and “0” indicates that misalignment exception is not permitted.
ビットIE:レベル割込みイネーブルを示す。「1」はレベル割込み許可を示し、「0」はレベル割込み不許可を示す。 Bit IE indicates level interrupt enable. “1” indicates that a level interrupt is permitted, and “0” indicates that a level interrupt is not permitted.
ビットIM[7:0]:割込みマスクを示す。レベル0〜7まで定義され、個々のレベルでマスクすることができる。レベル0が最も高いレベルとなる。IMによりマスクされていない割込み要求のうち最も高いレベルを持った割込み要求のみがプロセッサ1に受理される。割込み要求を受理すると受理したレベル以下のレベルはハードウェアで自動的にマスクされる。IM[0]はレベル0のマスクであり、IM[1]はレベル1のマスクであり、IM[2]はレベル2のマスクであり、IM[3]はレベル3のマスクであり、IM[4]はレベル4のマスクであり、IM[5]はレベル5のマスクであり、IM[6]はレベル6のマスクであり、IM[7]はレベル7のマスクである。
Bit IM [7: 0]: indicates an interrupt mask. Levels 0-7 are defined and can be masked at individual levels.
reserved:予約ビットを示す。常に0が読み出される。書き込む時は0を書き込む必要がある。 reserved: Indicates a reserved bit. 0 is always read. When writing, it is necessary to write 0.
図12は、条件フラグレジスタ(CFR)32の構造を示す図である。条件フラグレジスタ(CFR)32は、実行対象となっているタスクのコンテキストの一部を構成する32ビットのレジスタであり、コンディションフラグ(条件フラグ)、オペレーションフラグ(演算フラグ)、ベクタコンディションフラグ(ベクタ条件フラグ)、演算命令用ビット位置指定フィールド、SIMDデータアライン情報フィールドから構成される。 FIG. 12 is a diagram showing the structure of the condition flag register (CFR) 32. The condition flag register (CFR) 32 is a 32-bit register that constitutes a part of the context of the task to be executed, and includes a condition flag (condition flag), an operation flag (operation flag), and a vector condition flag (vector). Condition flag), a bit position designation field for operation instructions, and a SIMD data alignment information field.
ビットALN[1:0]:アラインモードを示す。valnvc命令のアラインモードを設定する。 Bit ALN [1: 0]: indicates an alignment mode. Sets the alignment mode of the valnvc instruction.
ビットBPO[4:0]:ビットポジションを示す。ビット位置指定の必要な命令で使用する。 Bit BPO [4: 0]: indicates a bit position. Used in instructions that require bit position specification.
ビットVC0〜VC3:ベクタ条件フラグである。LSB側のバイトあるいはハーフワードから順にVC0に対応し、MSB側がVC3に対応する。 Bits VC0 to VC3: Vector condition flags. The LSB side byte or halfword sequentially corresponds to VC0, and the MSB side corresponds to VC3.
ビットOVS:オーバーフローフラグ(サマリー)である。飽和発生やオーバーフロー検出でセットされる。検出されなかった場合は、命令実行前の値を保持する。クリアはソフトで行う必要がある。 Bit OVS: an overflow flag (summary). Set when saturation occurs or overflow is detected. If not detected, the value before instruction execution is held. Clearing must be done by software.
ビットCAS:キャリーフラグ(サマリー)である。addc命令でキャリーまたはsubc命令でボローが発生した場合セットされる。addc命令でキャリーもしくはsubc命令でボローが発生しなかった場合は、命令実行前の値を保持する。クリアはソフトで行う必要がある。 Bit CAS: carry flag (summary). Set when a carry occurs with the addc instruction or a borrow occurs with the subc instruction. If no carry occurs with the addc instruction or a borrow does not occur with the subc instruction, the value before the instruction execution is retained. Clearing must be done by software.
ビットC0〜C7:コンディションフラグである。フラグC7は常に値が1である。フラグC7へのFALSE条件の反映(0書き込み)は無視される。 Bits C0 to C7: Condition flags. The value of the flag C7 is always 1. Reflecting the FALSE condition (writing 0) to the flag C7 is ignored.
reserved:予約ビットを示す。常に0が読み出される。書き込む時は0を書き込む必要がある。 reserved: Indicates a reserved bit. 0 is always read. When writing, it is necessary to write 0.
図13は、アキュームレータ(M0,M1)30bの構造を示す図である。このアキュームレータ(M0,M1)30bは、実行対象となっているタスクのコンテキストの一部を構成し、図13(a)に示される32ビットレジスタMH0-MH1(乗除算・積和用レジスタ(上位32ビット))と、図13(b)に示される32ビットレジスタML0-ML1乗除算・積和用レジスタ(下位32ビット)とからなる。 FIG. 13 is a diagram showing the structure of the accumulator (M0, M1) 30b. This accumulator (M0, M1) 30b constitutes a part of the context of the task to be executed, and is a 32-bit register MH0-MH1 (multiplication / multiplication / sum of products register (high order) shown in FIG. 13 (a). 32 bits)) and the 32-bit register ML0-ML1 multiplication / division / product-sum register (lower 32 bits) shown in FIG. 13 (b).
レジスタMH0-MHは、乗算命令では結果の上位32ビットを格納するのに使用される。積和命令ではアキュムレータの上位32ビットとして使用される。また、ビットストリームを取り扱う場合に汎用レジスタと組み合わせて使用することができる。レジスタML0-ML1は、乗算命令では結果の下位32ビットを格納するのに使用される。積和命令ではアキュムレータの下位32ビットとして使用される。 Registers MH0-MH are used to store the upper 32 bits of the result in multiply instructions. In the product-sum instruction, it is used as the upper 32 bits of the accumulator. Further, when handling a bit stream, it can be used in combination with a general-purpose register. Registers ML0-ML1 are used in the multiply instruction to store the lower 32 bits of the result. In the product-sum instruction, it is used as the lower 32 bits of the accumulator.
図14は、プログラムカウンタ(PC)33の構造を示す図である。このプログラムカウンタ(PC)33は、実行対象となっているタスクのコンテキストの一部を構成し、実行中の命令のアドレスを保持する32ビットのカウンタである。下位1ビットは常に0が格納される。 FIG. 14 is a diagram showing the structure of the program counter (PC) 33. This program counter (PC) 33 is a 32-bit counter that constitutes a part of the context of the task to be executed and holds the address of the instruction being executed. 0 is always stored in the lower 1 bit.
図15は、PC退避用レジスタ(IPC)34の構造を示す図である。このPC退避用レジスタ(IPC)34は、実行対象となっているタスクのコンテキストの一部を構成する32ビットのレジスタであり、下位1ビットは常に0が読み出されるが、書き込み時には0を書き込む必要がある。 FIG. 15 is a diagram showing the structure of the PC save register (IPC) 34. The PC save register (IPC) 34 is a 32-bit register that constitutes a part of the context of the task to be executed. The lower 1 bit is always read as 0, but 0 must be written when writing. There is.
図16は、PSR退避用レジスタ(IPSR)35の構造を示す図である。このPSR退避用レジスタ(IPSR)35は、実行対象となっているタスクのコンテキストの一部を構成し、プログラム状態レジスタ(PSR)31を退避するための32ビットのレジスタであり、プログラム状態レジスタ(PSR)31の予約ビットに対応する部分は常に0が読み出されるが、書き込み時には0を書き込む必要がある。 FIG. 16 is a diagram showing the structure of the PSR save register (IPSR) 35. The PSR save register (IPSR) 35 is a 32-bit register that constitutes a part of the context of the task to be executed and saves the program status register (PSR) 31. 0 is always read out from the portion corresponding to the reserved bit of (PSR) 31, but it is necessary to write 0 when writing.
次に、本プロセッサ1のメモリ空間について説明する。本プロセッサ1では、4GBのリニアなメモリ空間を32分割し、128MB単位の空間に命令SRAM(Static RAM)とデータSRAMが割り当てられる。この128MBの空間を1ブロックとして、SAR(SRAM Area Register)にアクセスしたいブロックを設定する。アクセスされたアドレスがSARで設定された空間である場合は、直接命令SRAM/データSRAMに対してアクセスを行うが、SARで設定された空間でない場合は、バスコントローラ(BCU)に対してアクセス要求を出する。BCUにはオン・チップ・メモリ(OCM)、外部メモリ、外部デバイス、I/Oポート等が接続されており、それらのデバイスに対して読み書きを行うことができる。
Next, the memory space of the
図17は、本プロセッサ1のパイプライン動作を示すタイミング図である。本プロセッサ1は、本図に示されるように、基本的に命令フェッチ、命令割り当て(ディスパッチ)、デコード、実行、書き込みの5段パイプラインで構成されている。
FIG. 17 is a timing chart showing the pipeline operation of the
図18は、本プロセッサ1による命令実行時の各パイプライン動作を示すタイミング図である。命令フェッチステージでは、プログラムカウンタ(PC)33で指定されるアドレスの命令メモリをアクセスし、命令を命令バッファ10c〜10e等に転送する。命令割り当てステージでは、分岐系命令に対する分岐先アドレス情報の出力、入力レジスタ制御信号の出力、可変長命令の割り当てを行い、命令をインストラクションレジスタ(IR)に転送する。デコードステージでは、IRをデコード部20に入力し、演算器制御信号、メモリアクセス信号を出力する。実行ステージでは、演算を実行、演算結果をデータメモリか汎用レジスタ(R0〜R31)30aに出力する。書き込みステージでは、データ転送、演算結果を汎用レジスタに格納する。
FIG. 18 is a timing chart showing each pipeline operation when an instruction is executed by the
本プロセッサ1は、VLIWアーキテクチャにより上記の処理を最高3並列で行うことができる。したがって、図18に示された動作については、本プロセッサ1は、図19に示されるタイミングで並列に実行する。
The
次に、以上のように構成された本プロセッサ1の命令セットについて説明する。
以下の表3〜表5は、本プロセッサ1が実行する命令をカテゴリー別に分類した表である。
Next, the instruction set of the
Tables 3 to 5 below are tables in which instructions executed by the
なお、表中の「演算器」は、その命令が使用する演算器を示す。演算器の略号の意味は次の通りである。つまり、「A」はALU命令、「B」は分岐命令、「C」は変換命令、「DIV」は除算命令、「DBGM」はデバッグ命令、「M」はメモリアクセス命令、「S1」、「S2」はシフト命令、「X1」、「X2」は乗算命令を意味する。 Note that “operator” in the table indicates an arithmetic unit used by the instruction. The meaning of the abbreviation of the arithmetic unit is as follows. That is, “A” is an ALU instruction, “B” is a branch instruction, “C” is a conversion instruction, “DIV” is a division instruction, “DBGM” is a debug instruction, “M” is a memory access instruction, “S1”, “ “S2” means a shift instruction, and “X1” and “X2” mean a multiplication instruction.
図20は、本プロセッサ1が実行する命令のフォーマットを示す図である。そのフォーマットには、図20(a)に示される16ビット命令フォーマットと、図20(b)に示される32ビット命令フォーマットとがある。
FIG. 20 is a diagram showing a format of instructions executed by the
なお、図中における略号の意味は次の通りである。つまり、「E」はエンドビット(並列実行の境界)、「F」はフォーマットビット(00、01、10:16ビット命令フォーマット、11:32ビット命令フォーマット)、「P」はプレディケート(実行条件:8個の条件フラグC0〜C7のいずれかを指定)、「OP」はオペコードフィールド、「R」はレジスタフィールド、「I」は即値フィールド、「D」ディスプースメントフィールドを意味する。なお、「E」フィールドはVLIWに特有のもので、E=0の命令は次の命令と並列に実行される。つまり、「E」フィールドによって並列度が可変のVLIWを実現している。 In addition, the meaning of the symbol in the figure is as follows. That is, “E” is an end bit (parallel execution boundary), “F” is a format bit (00, 01, 10:16 bit instruction format, 11:32 bit instruction format), and “P” is a predicate (execution condition: "OP" means an operation code field, "R" means a register field, "I" means an immediate field, and "D" a displacement field. Note that the “E” field is unique to VLIW, and an instruction with E = 0 is executed in parallel with the next instruction. That is, a VLIW having a variable parallelism is realized by the “E” field.
図21〜図36は、本プロセッサ1が実行する命令の概略的な機能を説明する図である。つまり、図21は、カテゴリー「ALUadd(加算)系」に属する命令を説明する図であり、図22は、カテゴリー「ALUsub(減算)系」に属する命令を説明する図であり、図23は、カテゴリー「ALUlogic(論理演算)系ほか」に属する命令を説明する図であり、図24は、カテゴリー「CMP(比較演算)系」に属する命令を説明する図であり、図25は、カテゴリー「mul(乗算)系」に属する命令を説明する図であり、図26は、カテゴリー「mac(積和演算)系」に属する命令を説明する図であり、図27は、カテゴリー「msu(積差演算)系」に属する命令を説明する図であり、図28は、カテゴリー「MEMld(メモリ読み出し)系」に属する命令を説明する図であり、図29は、カテゴリー「MEMstore(メモリ書き出し)系」に属する命令を説明する図であり、図30は、カテゴリー「BRA(分岐)系」に属する命令を説明する図であり、図31は、カテゴリー「BSasl(算術バレルシフト)系ほか」に属する命令を説明する図であり、図32は、カテゴリー「BSlsr(論理バレルシフト)系ほか」に属する命令を説明する図であり、図33は、カテゴリー「CNVvaln(算術変換)系」に属する命令を説明する図であり、図34は、カテゴリー「CNV(一般変換)系」に属する命令を説明する図であり、図35は、カテゴリー「SATvlpk(飽和処理)系」に属する命令を説明する図であり、図36は、カテゴリー「ETC(その他)系」に属する命令を説明する図である。
FIG. 21 to FIG. 36 are diagrams for explaining the schematic functions of the instructions executed by the
これらの図において、項目「SIMD」は、その命令の型(SISD(SINGLE)かSIMDかの区別)を示し、項目「サイズ」は、演算の対象となる個々のオペランドのサイズを示し、項目「命令」は、その命令のオペコードを示し、項目「オペランド」は、その命令のオペランドを示し、項目「CFR」は、条件フラグレジスタの変化を示し、項目「PSR」は、プロセッサ状態レジスタの変化を示し、項目「代表的な動作」は、動作の概要を示し、項目「演算器」は、使用される演算器を示し、項目「3116」は、命令のサイズを示す。 In these figures, item “SIMD” indicates the type of instruction (distinguishing between SISD (SINGLE) and SIMD), item “size” indicates the size of each operand to be operated, and item “SIMD” "Instruction" indicates the opcode of the instruction, item "operand" indicates the operand of the instruction, item "CFR" indicates a change in the condition flag register, and item "PSR" indicates a change in the processor status register The item “representative operation” indicates an outline of the operation, the item “operation unit” indicates the operation unit to be used, and the item “3116” indicates the size of the instruction.
図37〜図748は、本プロセッサ1が実行する命令の詳細な機能を説明する図である。なお、命令の説明に用いられている各種記号の意味は、以下の表6〜表10の通りである。
37 to 748 are diagrams illustrating detailed functions of instructions executed by the
図37〜図119は、「load」関連の命令を説明する図である。
図120〜図184は、「store」関連の命令を説明する図である。
図185〜図186は、「memory(etc)」関連の命令を説明する図である。
図187〜図206は、「external register」関連の命令を説明する図である。
図207〜図247は、「branch」関連の命令を説明する図である。
図248〜図264は、「VMP/interupt」関連の命令を説明する図である。
図265〜図258は、「program interrupt」関連の命令を説明する図である。
図259〜図303は、「arithmetic」関連の命令を説明する図である。
図304〜図317は、「logic」関連の命令を説明する図である。
図318〜図359は、「compare」関連の命令を説明する図である。
図360〜図420は、「move」関連の命令を説明する図である。
図421は、「nop」関連の命令を説明する図である。
図422〜図441は、「shift(S1)」関連の命令を説明する図である。
図442〜図460は、「shift(S2)」関連の命令を説明する図である。
図461〜図380は、「extract」関連の命令を説明する図である。
図471〜図474は、「mask」関連の命令を説明する図である。
図475〜図480は、「saturation」関連の命令を説明する図である。
図481〜図512は、「conversion」関連の命令を説明する図である。
図513〜図516は、「bit count」関連の命令を説明する図である。
図517〜図520は、「etc」関連の命令を説明する図である。
図521〜図526は、「mul(X1)」関連の命令を説明する図である。
図527〜図531は、「mul(X2)」関連の命令を説明する図である。
図532〜図543は、「mac(X1)」関連の命令を説明する図である。
図544〜図547は、「mac(X2)」関連の命令を説明する図である。
図548〜図559は、「msu(X1)」関連の命令を説明する図である。
図560〜図563は、「msu(X2)」関連の命令を説明する図である。
図564〜図565は、「divide」関連の命令を説明する図である。
図566〜図569は、「debug」関連の命令を説明する図である。
図570〜図615は、「SIMD arithmetic」関連の命令を説明する図である。
図616〜図639は、「SIMD compare」関連の命令を説明する図である。
図640〜図664は、「SIMD shift(S1)」関連の命令を説明する図である。
図665〜図675は、「SIMD shift(S2)」関連の命令を説明する図である。
図676〜図680は、「SIMD saturation」関連の命令を説明する図である。
図681〜図682は、「SIMD etc」関連の命令を説明する図である。
図683〜図699は、「SIMD mul(X2)」関連の命令を説明する図である。
図700〜図728は、「SIMD mac(X2)」関連の命令を説明する図である。
図729〜図748は、「SIMD msu(X2)」関連の命令を説明する図である。
FIG. 37 to FIG. 119 are diagrams for explaining a command related to “load”.
120 to 184 are diagrams for explaining a “store” related command.
FIG. 185 to FIG. 186 are diagrams for explaining instructions related to “memory (etc)”.
FIG. 187 to FIG. 206 are diagrams for explaining instructions related to “external register”.
FIG. 207 to FIG. 247 are diagrams for explaining “branch” related instructions.
FIG. 248 to FIG. 264 are diagrams for explaining commands related to “VMP / interupt”.
265 to 258 are diagrams for explaining instructions related to “program interrupt”.
FIG. 259 to FIG. 303 are diagrams for explaining “arithmetic” related instructions.
304 to 317 are diagrams for explaining “logic” related instructions.
FIG. 318 to FIG. 359 are diagrams for explaining instructions related to “compare”.
360 to 420 are diagrams for explaining instructions related to “move”.
FIG. 421 is a diagram illustrating “nop” related instructions.
FIG. 422 to FIG. 441 are diagrams for explaining a command related to “shift (S1)”.
FIG. 442 to FIG. 460 are diagrams for explaining a command related to “shift (S2)”.
FIG. 461 to FIG. 380 are diagrams for explaining “extract” related instructions.
FIG. 471 to FIG. 474 are diagrams for explaining “mask” related instructions.
FIG. 475 to FIG. 480 are diagrams for explaining “saturation” related instructions.
481 to 512 are diagrams for explaining a command related to “conversion”.
FIG. 513 to FIG. 516 are diagrams for explaining instructions related to “bit count”.
FIG. 517 to FIG. 520 are diagrams for explaining commands related to “etc”.
FIG. 521 to FIG. 526 are diagrams illustrating instructions related to “mul (X1)”.
FIG. 527 to FIG. 531 are diagrams for explaining an instruction related to “mul (X2)”.
FIG. 532 to FIG. 543 are diagrams for explaining a command related to “mac (X1)”.
FIG. 544 to FIG. 547 are diagrams for explaining commands related to “mac (X2)”.
FIG. 548 to FIG. 559 are diagrams for explaining instructions related to “msu (X1)”.
560 to 563 are diagrams for explaining an instruction related to “msu (X2)”.
FIG. 564 to FIG. 565 are diagrams for explaining “divide” related commands.
FIG. 566 to FIG. 569 are diagrams for explaining “debug” related instructions.
570 to 615 are diagrams for explaining instructions related to “SIMD arithmetic”.
FIGS. 616 to 639 are diagrams for explaining instructions related to “SIMD compare”.
FIG. 640 to FIG. 664 are diagrams for explaining commands related to “SIMD shift (S1)”.
FIG. 665 to FIG. 675 are diagrams for explaining instructions related to “SIMD shift (S2)”.
FIG. 676 to FIG. 680 are diagrams for explaining instructions related to “SIMD saturation”.
681 to 682 are diagrams for explaining instructions related to “SIMD etc”.
FIGS. 683 to 699 are diagrams for explaining instructions related to “SIMD mul (X2)”.
700 to 728 are diagrams for explaining instructions related to “SIMD mac (X2)”.
FIG. 729 to FIG. 748 are diagrams for explaining instructions related to “SIMD msu (X2)”.
次に、いくつかの特徴的な命令について、本プロセッサ1の動作を説明する。
Next, the operation of the
(1)SIMD2項演算を、オペランドをクロスして行う命令
まず、2並列SIMD演算のうち、クロスの位置関係にあるオペランドを対象として演算を行う命令について説明する。
(1) Instructions for performing SIMD binary operations by crossing operands First, among two parallel SIMD operations, instructions for performing operations on operands having a cross positional relationship will be described.
[命令vxaddh]
命令vxaddhは、ハーフワード(16ビット)単位で、クロスの位置関係にある2組のオペランドを加算するSIMD型の命令である。例えば、
vxaddh Rc,Ra,Rb
であれば、プロセッサ1は、算術論理・比較演算器41等により、
(i)レジスタRaの上位16ビットとレジスタRbの下位16ビットとを加算し、結果をレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを加算し、結果をレジスタRcの下位16ビットに格納する。
[Instruction vxaddh]
The instruction vxaddh is a SIMD type instruction that adds two sets of operands in a cross positional relationship in units of half words (16 bits). For example,
vxaddh Rc, Ra, Rb
If so, the
(I) The upper 16 bits of the register Ra and the lower 16 bits of the register Rb are added, and the result is stored in the upper 16 bits of the register Rc.
(Ii) Add the lower 16 bits of the register Ra and the upper 16 bits of the register Rb, and store the result in the lower 16 bits of the register Rc.
このような命令は、対称型フィルタ(中心から左右対称の係数)で乗算を減らすために、予め同じ係数が乗算される値同士を加算(又は、減算)しておく場合に有効である。 Such an instruction is effective when adding (or subtracting) values multiplied by the same coefficient in advance in order to reduce multiplication by a symmetric filter (coefficient which is symmetrical from the center).
なお、本プロセッサ1は、減算命令(vxsubh等)についても、この加算命令と同様の処理を実行する。
Note that the
[命令vxmul]
命令vxmulは、ハーフワード(16ビット)単位で、クロスの位置関係にある2組のオペランドを乗算し、それらの結果の下位ハーフワードそれぞれを残す(SIMD格納する)SIMD型の命令である。例えば、
vxmul Rc,Ra,Rb
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの下位16ビットとを乗算し、その乗算結果を演算レジスタMHmの上位16ビットと演算レジスタMLmの上位16ビットに格納するとともに、その乗算結果の下位16ビットをレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの下位16ビットと演算レジスタMLmの下位16ビットに格納するとともに、その乗算結果の下位16ビットをレジスタRcの下位16ビットに格納する。
[Instruction vxmul]
The instruction vxmul is a SIMD type instruction that multiplies two sets of operands in a cross positional relationship in units of halfwords (16 bits) and leaves (stores in SIMD) each lower halfword of the result. For example,
vxmul Rc, Ra, Rb
If so, the
(I) Multiply the upper 16 bits of the register Ra and the lower 16 bits of the register Rb, store the multiplication result in the upper 16 bits of the arithmetic register MHm and the upper 16 bits of the arithmetic register MLm, and 16 bits are stored in the upper 16 bits of the register Rc, and in parallel,
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, store the multiplication result in the lower 16 bits of the operation register MHm and the lower 16 bits of the operation register MLm, and The 16 bits are stored in the lower 16 bits of the register Rc.
このような命令は、複素数の内積に有効である。結果の下位を取り出すのは整数データを扱う場合に有効である(主に画像)。 Such an instruction is effective for inner products of complex numbers. Extracting the lower order of the result is effective when handling integer data (mainly images).
[命令vxfmulh]
命令vxmulhは、ハーフワード(16ビット)単位で、クロスの位置関係にある2組のオペランドを乗算し、それらの結果の上位ハーフワードそれぞれを残す(SIMD格納する)SIMD型の命令である。例えば、
vxfmulh Rc,Ra,Rb
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの下位16ビットとを乗算し、その乗算結果を演算レジスタMHmの上位16ビットと演算レジスタMLmの上位16ビットに格納するとともに、その乗算結果の上位16ビットをレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの下位16ビットと演算レジスタMLmの下位16ビットに格納するとともに、その乗算結果の上位16ビットをレジスタRcの下位16ビットに格納する。
[Instruction vxfmulh]
The instruction vxmulh is an SIMD type instruction that multiplies two sets of operands in a cross positional relationship in units of halfwords (16 bits) and leaves the upper halfwords of those results (stores them in SIMD). For example,
vxfmulh Rc, Ra, Rb
If so, the
(I) Multiply the upper 16 bits of the register Ra and the lower 16 bits of the register Rb and store the multiplication result in the upper 16 bits of the arithmetic register MHm and the upper 16 bits of the arithmetic register MLm. 16 bits are stored in the upper 16 bits of the register Rc, and in parallel,
(Ii) Multiply the lower 16 bits of the register Ra and the upper 16 bits of the register Rb, store the multiplication result in the lower 16 bits of the arithmetic register MHm and the lower 16 bits of the arithmetic register MLm, and The 16 bits are stored in the lower 16 bits of the register Rc.
このような命令は、複素数の内積に有効である。結果の上位を取り出すのは固定小数点データを扱う場合に有効である。Q31/Q15と呼ばれる標準的なファーマット(MSB詰め)に適用することができる。 Such an instruction is effective for inner products of complex numbers. Extracting the top of the result is effective when dealing with fixed-point data. It can be applied to a standard format (MSB stuffing) called Q31 / Q15.
[命令vxfmulw]
命令vxfmulwは、ハーフワード(16ビット)単位で、クロスの位置関係にある2組のオペランドを乗算し、一方の乗算結果のみ残す(非SIMD格納する)SIMD型の命令である。例えば、
vxfmulh Rc,Ra,Rb
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの下位16ビットとを乗算し、その乗算結果を演算レジスタMHmの上位16ビットと演算レジスタMLmの上位16ビットに格納するとともに、その乗算結果(ワード)をレジスタRcに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの下位16ビットと演算レジスタMLmの下位16ビットに格納する(レジスタRcには格納しない)。
[Instruction vxfmulw]
The instruction vxfmulw is a SIMD type instruction that multiplies two sets of operands in a cross positional relationship in units of half words (16 bits) and leaves only one multiplication result (non-SIMD storage). For example,
vxfmulh Rc, Ra, Rb
If so, the
(I) Multiply the upper 16 bits of the register Ra and the lower 16 bits of the register Rb, store the multiplication result in the upper 16 bits of the arithmetic register MHm and the upper 16 bits of the arithmetic register MLm, and the multiplication result (word ) Is stored in the register Rc, and in parallel therewith,
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, and store the multiplication result in the lower 16 bits of the arithmetic register MHm and the lower 16 bits of the arithmetic register MLm (not stored in the register Rc) ).
このような命令は、精度が16ビットで足りなくなりSIMDが維持できなくなる場合に有効である(オーディオなど)。 Such an instruction is effective when the precision is insufficient at 16 bits and SIMD cannot be maintained (such as audio).
[命令vxmac]
命令vxmacは、ハーフワード(16ビット)単位で、クロスの位置関係にある2組のオペランドの積和演算を行い、それらの結果の下位ハーフワードそれぞれを残す(SIMD格納する)SIMD型の命令である。例えば、
vxmac Mm,Rc,Ra,Rb,Mn
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの下位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの上位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの上位16ビットからなる32ビット領域に格納するとともに、その加算結果の下位16ビットをレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの下位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの下位16ビットからなる32ビット領域に格納するとともに、その加算結果の下位16ビットをレジスタRcの下位16ビットに格納する。
[Instruction vxmac]
The instruction vxmac is a SIMD type instruction that performs a product-sum operation on two pairs of operands in a cross positional relationship in units of halfwords (16 bits) and leaves each of the lower halfwords of those results (stores in SIMD). is there. For example,
vxmac Mm, Rc, Ra, Rb, Mn
If so, the
(I) Multiply the upper 16 bits of the register Ra and the lower 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the upper 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result Store in the 32-bit area consisting of the upper 16 bits of the arithmetic registers MHm and MLm, and store the lower 16 bits of the addition result in the upper 16 bits of the register Rc.
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the lower 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result The lower 16 bits of the addition result are stored in the lower 16 bits of the register Rc, while being stored in a 32-bit area consisting of the lower 16 bits of the arithmetic registers MHm and MLm.
このような命令は、複素数の内積に有効である。結果の下位を取り出すのは整数データを扱う場合に有効である(主に画像)。 Such an instruction is effective for inner products of complex numbers. Extracting the lower order of the result is effective when handling integer data (mainly images).
[命令vxfmach]
命令vxmacは、ハーフワード(16ビット)単位で、クロスの位置関係にある2組のオペランドの積和演算を行い、それらの結果の上位ハーフワードそれぞれを残す(SIMD格納する)SIMD型の命令である。例えば、
vxfmach Mm,Rc,Ra,Rb,Mn
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの下位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの上位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの上位16ビットからなる32ビット領域に格納するとともに、その加算結果の上位16ビットをレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの下位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの下位16ビットからなる32ビット領域に格納するとともに、その加算結果の上位16ビットをレジスタRcの下位16ビットに格納する。
[Instruction vxfmach]
The instruction vxmac is a SIMD type instruction that performs a product-sum operation on two sets of operands in a cross positional relationship in units of halfwords (16 bits) and leaves each of the higher halfwords of those results (stores them in SIMD). is there. For example,
vxfmach Mm, Rc, Ra, Rb, Mn
If so, the
(I) Multiply the upper 16 bits of the register Ra and the lower 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the upper 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result In addition to storing in the 32-bit area consisting of the upper 16 bits of the arithmetic registers MHm and MLm, the upper 16 bits of the addition result are stored in the upper 16 bits of the register Rc.
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the lower 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result The upper 16 bits of the addition result are stored in the lower 16 bits of the register Rc, while being stored in the 32-bit area consisting of the lower 16 bits of the arithmetic registers MHm and MLm.
このような命令は、複素数の内積に有効である。結果の上位を取り出すのは固定小数点データを扱う場合に有効である。Q31/Q15と呼ばれる標準的なファーマット(MSB詰め)に適用することができる。 Such an instruction is effective for inner products of complex numbers. Extracting the top of the result is effective when dealing with fixed-point data. It can be applied to a standard format (MSB stuffing) called Q31 / Q15.
[命令vxfmacw]
命令vxfmachは、ハーフワード(16ビット)単位で、クロスの位置関係にある2組のオペランドを乗算し、一方の乗算結果のみ残す(非SIMD格納する)SIMD型の命令である。例えば、
vxfmach Mm,Rc,Ra,Rb,Mn
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの下位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの上位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの上位16ビットからなる32ビット領域に格納するとともに、その加算結果の32ビットをレジスタRcに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの下位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの下位16ビットからなる32ビット領域に格納する(レジスタRcには格納しない)。
[Instruction vxfmacw]
The instruction vxfmach is a SIMD type instruction that multiplies two sets of operands in a cross positional relationship in units of halfwords (16 bits) and leaves only one multiplication result (non-SIMD storage). For example,
vxfmach Mm, Rc, Ra, Rb, Mn
If so, the
(I) Multiply the upper 16 bits of the register Ra and the lower 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the upper 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result In addition to storing in the 32-bit area consisting of the upper 16 bits of the arithmetic registers MHm and MLm, 32 bits of the addition result are stored in the register Rc.
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the lower 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result Store in the 32-bit area consisting of the lower 16 bits of the arithmetic registers MHm and MLm (not stored in the register Rc).
このような命令は、精度が16ビットで足りなくなりSIMDが維持できなくなる場合に有効である(オーディオなど)。 Such an instruction is effective when the precision is insufficient at 16 bits and SIMD cannot be maintained (such as audio).
なお、本プロセッサ1は、積差命令(vxmsu、vxmsuh、vxmsuw等)についても、これらの積和命令と同様の処理を実行する。
Note that the
また、本プロセッサ1は、以上のようなクロスの位置関係にある2組のオペランドに対する演算(2並列SIMDによる加算、減算、乗算、積和、積差)だけでなく、これを拡張したn組のオペランドに対する演算(4並列、8並列SIMD演算など)を実行する機能を備えてもよい。
Further, the
例えば、いま、レジスタRaに格納されている4つのバイトデータを上位からRa1、Ra2,Ra3,Ra4とし、レジスタRbに格納されている4つのバイトデータを上位からRb1、Rb2,Rb3,Rb4とした場合に、レジスタRaとレジスタRbとをオペランドとするSIMD演算命令であって、以下のようなクロスの位置関係にあるバイトデータに対する演算を並列に実行する命令を備えてもよい。つまり、
(i)1対称クロスの命令
Ra1とRb4、Ra2とRb3、Ra3とRb2、Ra4とRb1、それぞれを演算対象とする4並列SIMD型の演算命令を備えてもよい。
(ii)2対称クロスの命令
Ra1とRb2、Ra2とRb1、Ra3とRb4、Ra4とRb3、それぞれを演算対象とする4並列SIMD型の演算命令を備えてもよい。
(iii)2重クロスの命令
Ra1とRb3、Ra2とRb4、Ra3とRb1、Ra4とRb2、それぞれを演算対象とする4並列SIMD型の演算命令を備えてもよい。
For example, the four byte data currently stored in the register Ra are Ra1, Ra2, Ra3, Ra4 from the top, and the four byte data stored in the register Rb are Rb1, Rb2, Rb3, Rb4 from the top. In this case, a SIMD operation instruction using the register Ra and the register Rb as operands, and an instruction for executing operations on byte data having a cross positional relationship as described below in parallel may be provided. That means
(I) Instructions with 1 Symmetric Crossing A 4-parallel SIMD type operation instruction for Ra1 and Rb4, Ra2 and Rb3, Ra3 and Rb2, and Ra4 and Rb1 may be provided.
(Ii) Two-symmetrical cross instruction It is possible to provide four parallel SIMD type arithmetic instructions for Ra1 and Rb2, Ra2 and Rb1, Ra3 and Rb4, and Ra4 and Rb3.
(Iii) Double-crossing instruction It is possible to provide four parallel SIMD type arithmetic instructions for Ra1 and Rb3, Ra2 and Rb4, Ra3 and Rb1, and Ra4 and Rb2, respectively.
そして、これらの4並列SIMD型の演算の種類は、上記2並列SIMD型の演算と同様に、加算、減算、乗算、積和、積差のいずれについても適用することができる。さらに、乗算、積和、積差については、上記2並列SIMD型の演算命令(vxmul,vxfmulh,vxfmulwなど)と同様に、4つの演算結果それぞれの下位バイトだけをレジスタRc等にSIMD格納したり、4つの演算結果それぞれの上位バイトだけをレジスタRc等にSIMD格納したり、4つの演算結果のうちの2つだけをレジスタRc等にSIMD格納したりする命令を備えてもよい。 These types of 4-parallel SIMD type operations can be applied to any of addition, subtraction, multiplication, product-sum, and product-difference similarly to the above-described 2-parallel SIMD type operations. Further, with respect to multiplication, product sum, and product difference, similar to the above-described 2-parallel SIMD type operation instructions (vxmul, vxfmulh, vxfmulw, etc.), only the lower byte of each of the four operation results can be stored in the register Rc or the like. There may be provided an instruction for SIMD storing only the upper byte of each of the four calculation results in the register Rc or the like, or storing only two of the four calculation results in the register Rc or the like.
なお、上記のようなクロスの位置関係にあるデータに対する3種類の演算は、一般化すると以下のように表現することができる。つまり、いま、演算の対象となるデータの組が、第1データ群を構成するn個のデータの並びにおける第i番目のデータと第2データ群を構成するn個のデータの並びにおける第j番目のデータとすると、
上記(i)1対称クロスの命令では、j=n−i+1 が成立し、
上記(ii)2対称クロスの命令では、j=i−(−1)^(i mod 2) が成立し、
上記(iii)2重クロスの命令では、j=n−i+1+(−1)^(i mod 2) が成立する。ここで、「^」はべき乗を意味し、「mod」は剰余を意味する。
It should be noted that the three types of operations on the data having the cross positional relationship as described above can be expressed as follows when generalized. That is, now, the set of data to be calculated is jth in the arrangement of the i-th data and the n data constituting the second data group in the arrangement of the n data constituting the first data group. As the second data,
In the above (i) 1-symmetric cross instruction, j = n−i + 1 holds.
In the above (ii) 2-symmetric cross instruction, j = i − (− 1) ^ (i mod 2) holds,
In the above (iii) double cross instruction, j = n−i + 1 + (− 1) ^ (i mod 2) holds. Here, “^” means power and “mod” means remainder.
以上のような命令は、複素数の内積等、2個の複素数を同時に演算する場合に有効である。 The above instruction is effective when computing two complex numbers simultaneously, such as inner product of complex numbers.
(2)SIMD2項演算を、一方のオペランドを固定して行う命令
次に、2並列SIMD演算のうち、一方のオペランドを固定して行う(一方のオペランドを共通とする)演算命令について説明する。
(2) Instruction for Performing SIMD Binary Operation with One Operand Fixed Next, an operation instruction performed with one operand fixed (with one operand in common) out of two parallel SIMD operations will be described.
[命令vhaddh]
命令vhaddhは、ハーフワード(16ビット)単位で、一方のオペランド(レジスタ中の上位16ビット)を共通とする2組のオペランドを加算するSIMD型の命令である。例えば、
vhaddh Rc,Ra,Rb
であれば、プロセッサ1は、算術論理・比較演算器41等により、
(i)レジスタRaの上位16ビットとレジスタRbの上位16ビットとを加算し、結果をレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを加算し、結果をレジスタRcの下位16ビットに格納する。
[Instruction vhaddh]
The instruction vhaddh is a SIMD type instruction that adds two sets of operands that share one operand (the upper 16 bits in the register) in units of half words (16 bits). For example,
vhaddh Rc, Ra, Rb
If so, the
(I) The upper 16 bits of the register Ra and the upper 16 bits of the register Rb are added, and the result is stored in the upper 16 bits of the register Rc.
(Ii) Add the lower 16 bits of the register Ra and the upper 16 bits of the register Rb, and store the result in the lower 16 bits of the register Rc.
このような命令は、2つの配列の要素間の加減算で2つの配列のアライメントがずれておりSIMD適用が困難な場合に有効である。 Such an instruction is effective when the two arrays are misaligned by addition / subtraction between the elements of the two arrays and it is difficult to apply SIMD.
なお、本プロセッサ1は、減算命令(vhsubh等)についても、この加算命令と同様の処理を実行する。
Note that the
[命令vhmul]
命令vhmulは、ハーフワード(16ビット)単位で、一方のオペランド(レジスタ中の上位16ビット)を共通とする2組のオペランドを乗算し、それらの結果の下位ハーフワードそれぞれを残す(SIMD格納する)SIMD型の命令である。例えば、
vhmul Rc,Ra,Rb
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの上位16ビットと演算レジスタMLmの上位16ビットに格納するとともに、その乗算結果の下位16ビットをレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの下位16ビットと演算レジスタMLmの下位16ビットに格納するとともに、その乗算結果の下位16ビットをレジスタRcの下位16ビットに格納する。
[Instruction vhmul]
The instruction vhmul multiplies two sets of operands that share one operand (the upper 16 bits in the register) in units of halfwords (16 bits), and leaves the lower halfwords of those results (SIMD storage). ) SIMD type instructions. For example,
vhmul Rc, Ra, Rb
If so, the
(I) Multiply the upper 16 bits of the register Ra and the upper 16 bits of the register Rb and store the multiplication result in the upper 16 bits of the arithmetic register MHm and the upper 16 bits of the arithmetic register MLm. 16 bits are stored in the upper 16 bits of the register Rc, and in parallel,
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, store the multiplication result in the lower 16 bits of the operation register MHm and the lower 16 bits of the operation register MLm, and The 16 bits are stored in the lower 16 bits of the register Rc.
このような命令は、ゲインコントロールなど全要素に係数を乗ずる場合、ループをイタレーションで展開し、SIMDで並列処理するとき、要素がずれてSIMD適用が困難な場合に有効である。基本的には、下記の下位固定の命令とペア(交互)で使用する。結果の下位を取り出すのは整数データを扱う場合に有効である(主に、画像)。 Such an instruction is effective when multiplying all elements by a coefficient such as gain control, when the loop is expanded by iteration and parallel processing is performed by SIMD, and when it is difficult to apply SIMD. Basically, it is used as a pair (alternate) with the following lower fixed instructions. Extracting the lower order of the result is effective when handling integer data (mainly images).
[命令vhfmulh]
命令vhmulhは、ハーフワード(16ビット)単位で、一方のオペランド(レジスタ中の上位16ビット)を共通とする2組のオペランドを乗算し、それらの結果の上位ハーフワードそれぞれを残す(SIMD格納する)SIMD型の命令である。例えば、
vhfmulh Rc,Ra,Rb
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの上位16ビットと演算レジスタMLmの上位16ビットに格納するとともに、その乗算結果の上位16ビットをレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの下位16ビットと演算レジスタMLmの下位16ビットに格納するとともに、その乗算結果の上位16ビットをレジスタRcの下位16ビットに格納する。
[Instruction vhfmulh]
The instruction vhmulh multiplies two sets of operands that share one operand (upper 16 bits in the register) in units of halfwords (16 bits), and leaves the upper halfwords of those results (SIMD storage). ) SIMD type instructions. For example,
vhfmulh Rc, Ra, Rb
If so, the
(I) Multiply the upper 16 bits of the register Ra and the upper 16 bits of the register Rb, store the multiplication result in the upper 16 bits of the arithmetic register MHm and the upper 16 bits of the arithmetic register MLm, and 16 bits are stored in the upper 16 bits of the register Rc, and in parallel,
(Ii) Multiply the lower 16 bits of the register Ra and the upper 16 bits of the register Rb, store the multiplication result in the lower 16 bits of the arithmetic register MHm and the lower 16 bits of the arithmetic register MLm, and The 16 bits are stored in the lower 16 bits of the register Rc.
このような命令は、上記と同様に有効である。結果の上位を取り出すのは固定小数点データを扱う場合に有効である。Q31/Q15と呼ばれる標準的なファーマット(MSB詰め)に適用することができる。 Such an instruction is valid as described above. Extracting the top of the result is effective when dealing with fixed-point data. It can be applied to a standard format (MSB stuffing) called Q31 / Q15.
[命令vhfmulw]
命令vhfmulwは、ハーフワード(16ビット)単位で、一方のオペランド(レジスタ中の上位16ビット)を共通とする2組のオペランドを乗算し、一方の乗算結果のみ残す(非SIMD格納する)SIMD型の命令である。例えば、
vhfmulh Rc,Ra,Rb
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの上位16ビットと演算レジスタMLmの上位16ビットに格納するとともに、その乗算結果(ワード)をレジスタRcに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果を演算レジスタMHmの下位16ビットと演算レジスタMLmの下位16ビットに格納する(レジスタRcには格納しない)。
[Instruction vhfmulw]
The instruction vhfmulw is a SIMD type that multiplies two operands that share one operand (upper 16 bits in the register) in units of halfword (16 bits) and leaves only one multiplication result (non-SIMD storage). It is an instruction. For example,
vhfmulh Rc, Ra, Rb
If so, the
(I) Multiply the upper 16 bits of the register Ra and the upper 16 bits of the register Rb, store the multiplication result in the upper 16 bits of the arithmetic register MHm and the upper 16 bits of the arithmetic register MLm, and the multiplication result (word ) Is stored in the register Rc, and in parallel therewith,
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, and store the multiplication result in the lower 16 bits of the arithmetic register MHm and the lower 16 bits of the arithmetic register MLm (not stored in the register Rc) ).
このような命令は精度確保に有効である。 Such an instruction is effective in ensuring accuracy.
[命令vhmac]
命令vhmacは、ハーフワード(16ビット)単位で、一方のオペランド(レジスタ中の上位16ビット)を共通とする2組のオペランドの積和演算を行い、それらの結果の下位ハーフワードそれぞれを残す(SIMD格納する)SIMD型の命令である。例えば、
vhmac Mm,Rc,Ra,Rb,Mn
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの上位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの上位16ビットからなる32ビット領域に格納するとともに、その加算結果の下位16ビットをレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの下位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの下位16ビットからなる32ビット領域に格納するとともに、その加算結果の下位16ビットをレジスタRcの下位16ビットに格納する。
[Instruction vhmac]
The instruction vhmac performs a product-sum operation on two sets of operands that share one operand (the upper 16 bits in the register) in units of halfwords (16 bits), and leaves each of the lower halfwords of those results ( This is an SIMD type instruction (stored in SIMD). For example,
vhmac Mm, Rc, Ra, Rb, Mn
If so, the
(I) Multiply the upper 16 bits of the register Ra and the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the upper 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result Store in the 32-bit area consisting of the upper 16 bits of the arithmetic registers MHm and MLm, and store the lower 16 bits of the addition result in the upper 16 bits of the register Rc.
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the lower 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result The lower 16 bits of the addition result are stored in the lower 16 bits of the register Rc, while being stored in a 32-bit area consisting of the lower 16 bits of the arithmetic registers MHm and MLm.
このような命令は、FIR(フィルタ)などでループをイタレーションで展開し、SIMDで並列処理するとき、要素がずれてSIMD適用が困難な場合に有効である。基本的には、下記の下位固定の命令とペア(交互)で使用する。結果の下位を取り出すのは整数データを扱う場合に有効である(主に、画像)。 Such an instruction is effective when it is difficult to apply SIMD when the loop is expanded by iteration using FIR (filter) or the like and parallel processing is performed using SIMD. Basically, it is used as a pair (alternate) with the following lower fixed instructions. Extracting the lower order of the result is effective when handling integer data (mainly images).
[命令vhfmach]
命令vhmacは、ハーフワード(16ビット)単位で、一方のオペランド(レジスタ中の上位16ビット)を共通とする2組のオペランドの積和演算を行い、それらの結果の上位ハーフワードそれぞれを残す(SIMD格納する)SIMD型の命令である。例えば、
vhfmach Mm,Rc,Ra,Rb,Mn
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの上位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの上位16ビットからなる32ビット領域に格納するとともに、その加算結果の上位16ビットをレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの下位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの下位16ビットからなる32ビット領域に格納するとともに、その加算結果の上位16ビットをレジスタRcの下位16ビットに格納する。
[Instruction vhfmach]
The instruction vhmac performs a product-sum operation on two sets of operands that share one operand (the upper 16 bits in the register) in units of halfwords (16 bits), and leaves each of the upper halfwords of those results ( This is an SIMD type instruction (stored in SIMD). For example,
vhfmach Mm, Rc, Ra, Rb, Mn
If so, the
(I) Multiply the upper 16 bits of the register Ra and the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the upper 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result In addition to storing in the 32-bit area consisting of the upper 16 bits of the arithmetic registers MHm and MLm, the upper 16 bits of the addition result are stored in the upper 16 bits of the register Rc.
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the lower 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result The upper 16 bits of the addition result are stored in the lower 16 bits of the register Rc, while being stored in the 32-bit area consisting of the lower 16 bits of the arithmetic registers MHm and MLm.
このような命令は、上記と同様に有効である。結果の上位を取り出すのは固定小数点データを扱う場合に有効である。Q31/Q15と呼ばれる標準的なファーマット(MSB詰め)に適用することができる。 Such an instruction is valid as described above. Extracting the top of the result is effective when dealing with fixed-point data. It can be applied to a standard format (MSB stuffing) called Q31 / Q15.
[命令vhfmacw]
命令vhfmachは、ハーフワード(16ビット)単位で、一方のオペランド(レジスタ中の上位16ビット)を共通とする2組のオペランドを乗算し、一方の乗算結果のみ残す(非SIMD格納する)SIMD型の命令である。例えば、
vhfmach Mm,Rc,Ra,Rb,Mn
であれば、プロセッサ1は、乗算・積和演算器44等により、
(i)レジスタRaの上位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの上位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの上位16ビットからなる32ビット領域に格納するとともに、その加算結果の32ビットをレジスタRcに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの上位16ビットとを乗算し、その乗算結果と演算レジスタMHn及びMLnの下位16ビットからなる32ビットとを加算し、その加算結果の32ビットを演算レジスタMHm及びMLmの下位16ビットからなる32ビット領域に格納する(レジスタRcには格納しない)。
[Instruction vhfmacw]
The instruction vhfmach is a SIMD type that multiplies two operands that share one operand (upper 16 bits in the register) in halfword (16 bits) units and leaves only one multiplication result (non-SIMD storage). It is an instruction. For example,
vhfmach Mm, Rc, Ra, Rb, Mn
If so, the
(I) Multiply the upper 16 bits of the register Ra and the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the upper 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result In addition to storing in the 32-bit area consisting of the upper 16 bits of the arithmetic registers MHm and MLm, 32 bits of the addition result are stored in the register Rc.
(Ii) Multiply the lower 16 bits of the register Ra by the upper 16 bits of the register Rb, add the multiplication result and 32 bits consisting of the lower 16 bits of the operation registers MHn and MLn, and add the 32 bits of the addition result Store in the 32-bit area consisting of the lower 16 bits of the arithmetic registers MHm and MLm (not stored in the register Rc).
このような命令は、精度確保に有効である。
なお、本プロセッサ1は、積差命令(vhmsu、vhmsuh、vhmsuw等)についても、これらの積和命令と同様の処理を実行する。
Such an instruction is effective in ensuring accuracy.
Note that the
また、これらの命令では、レジスタ中の上位16ビットが固定(共通化)されたが、レジスタ中の下位16ビットを固定(共通化)する命令(vladdh、vlsubh、vlmul、vlfmulh、vlfmulw、vlmac、vlmsu、vlfmach、vlmsuh、vlfmacw、vlmsuw等)についても、本プロセッサ1は、これらの演算命令と同様の処理を実行する。このような命令は、上記の上位固定の命令とペアで使用すると有効である。
In these instructions, the upper 16 bits in the register are fixed (shared), but the lower 16 bits in the register are fixed (shared) (vladdh, vlsubh, vlmul, vlfmulh, vlfmulw, vlmulw, vlmac, (vlmsu, vlfmach, vlmsuh, vlfmacw, vlmsuw, etc.), the
また、本プロセッサ1は、以上のような一方のオペランド(レジスタ中の上位16ビット)を共通とする2組のオペランドに対する演算(2並列SIMDによる加算、減算、乗算、積和、積差)だけでなく、これを拡張したn組のオペランドに対する演算(4並列、8並列SIMD演算など)を実行する機能を備えてもよい。
Further, the
例えば、いま、レジスタRaに格納されている4つのバイトデータを上位からRa1、Ra2,Ra3,Ra4とし、レジスタRbに格納されている4つのバイトデータを上位からRb1、Rb2,Rb3,Rb4とした場合に、レジスタRaとレジスタRbとをオペランドとするSIMD演算命令であって、以下のような一方のオペランド(レジスタ中の1バイト)を共通とするバイトデータに対する演算を並列に実行する命令を備えてもよい。つまり、
(i)最上位固定の命令
Ra1とRb1、Ra2とRb1、Ra3とRb1、Ra4とRb1、それぞれを演算対象とする4並列SIMD型の演算命令を備えてもよい。
(i)中上位固定の命令
Ra1とRb2、Ra2とRb2、Ra3とRb2、Ra4とRb2、それぞれを演算対象とする4並列SIMD型の演算命令を備えてもよい。
(i)中下位位固定の命令
Ra1とRb3、Ra2とRb3、Ra3とRb3、Ra4とRb3、それぞれを演算対象とする4並列SIMD型の演算命令を備えてもよい。
(i)最下位固定の命令
Ra1とRb4、Ra2とRb4、Ra3とRb4、Ra4とRb4、それぞれを演算対象とする4並列SIMD型の演算命令を備えてもよい。
For example, the four byte data stored in the register Ra are Ra1, Ra2, Ra3, and Ra4 from the top, and the four byte data stored in the register Rb are Rb1, Rb2, Rb3, and Rb4 from the top. In this case, a SIMD operation instruction having the register Ra and the register Rb as operands, and an instruction for executing an operation on byte data sharing one operand (one byte in the register) as follows in parallel is provided. May be. That means
(I) Highest level fixed instruction Ra1 and Rb1, Ra2 and Rb1, Ra3 and Rb1, and Ra4 and Rb1 may be provided as 4-parallel SIMD type operation instructions.
(I) Middle-upper fixed instructions Ra1 and Rb2, Ra2 and Rb2, Ra3 and Rb2, and Ra4 and Rb2 may each be provided with a 4-parallel SIMD type arithmetic instruction.
(I) Middle and lower order fixed instructions Ra1 and Rb3, Ra2 and Rb3, Ra3 and Rb3, Ra4 and Rb3 may be provided as 4-parallel SIMD type operation instructions.
(I) The lowest fixed instruction Ra1 and Rb4, Ra2 and Rb4, Ra3 and Rb4, Ra4 and Rb4 may be provided as 4-parallel SIMD type operation instructions.
そして、これらの4並列SIMD型の演算の種類は、上記2並列SIMD型の演算と同様に、加算、減算、乗算、積和、積差のいずれについても適用することができる。さらに、乗算、積和、積差については、上記2並列SIMD型の演算命令(vhmul,vhfmulh,vhfmulwなど)と同様に、4つの演算結果それぞれの下位バイトだけをレジスタRc等にSIMD格納したり、4つの演算結果それぞれの上位バイトだけをレジスタRc等にSIMD格納したり、4つの演算結果のうちの2つだけをレジスタRc等にSIMD格納したりする命令を備えてもよい。このような命令は、以下のようなケースに有効である。つまり、2つの要素を1要素ずつずらしながら要素ごとの演算をする場合に有効である。1個ずれ、2個ずれ、3個ずれの演算が必要となるからである。 These types of 4-parallel SIMD type operations can be applied to any of addition, subtraction, multiplication, product-sum, and product-difference similarly to the above-described 2-parallel SIMD type operations. Further, for multiplication, sum of products, and product difference, similar to the above-described two-parallel SIMD type operation instructions (vhmul, vhfmulh, vhfmulw, etc.), only the lower byte of each of the four operation results can be stored in the register Rc or the like. There may be provided an instruction for SIMD storing only the upper byte of each of the four calculation results in the register Rc or the like, or storing only two of the four calculation results in the register Rc or the like. Such an instruction is effective in the following cases. In other words, this is effective when performing the calculation for each element while shifting the two elements one element at a time. This is because it is necessary to calculate one deviation, two deviations, and three deviations.
以上のようなオペランドの一方を固定した演算を一般化して表現すると、次のようになる。つまり、本プロセッサ1は、n(≧2)個のデータの並びからなる第1データ群を指定する第1オペランドとn個のデータの並びからなる第2データ群を指定する第2オペランドとを含むSIMD型の命令に対して、i=1,2,…,n、j=一定値とした場合における第1データ群の第i番目データと第2データ群の第j番目データとの組からなるn組それぞれに対して演算を行ってもよい。
The above generalized operation with one of the operands fixed is expressed as follows. That is, the
(3)SIMD2項演算を実行し、その結果をビットシフトする命令
次に、2並列SIMD演算のうち、クロスの位置関係にあるオペランドを対象として演算を行う命令について説明する。
(3) Instruction for executing SIMD binary operation and bit-shifting the result Next, of 2 parallel SIMD operations, an instruction for performing an operation on operands in a cross positional relationship will be described.
[命令vaddsh]
命令vaddshは、ハーフワード(16ビット)単位で2組のオペランドを加算し、その結果を1ビットだけ算術右シフトするSIMD型の命令である。例えば、
vaddsh Rc,Ra,Rb
であれば、プロセッサ1は、算術論理・比較演算器41等により、
(i)レジスタRaの上位16ビットとレジスタRbの上位16ビットとを加算し、結果を1ビットだけ算術右シフトした値をレジスタRcの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットとレジスタRbの下位16ビットとを加算し、結果を結果を1ビットだけ算術右シフトした値をレジスタRcの下位16ビットに格納する。
[Instruction vaddsh]
The instruction vaddsh is a SIMD type instruction that adds two sets of operands in units of halfwords (16 bits) and arithmetically shifts the result by one bit to the right. For example,
vaddsh Rc, Ra, Rb
If so, the
(I) The upper 16 bits of the register Ra and the upper 16 bits of the register Rb are added, and a value obtained by arithmetically shifting the result by one bit is stored in the upper 16 bits of the register Rc.
(Ii) Add the lower 16 bits of the register Ra and the lower 16 bits of the register Rb, and store the result obtained by arithmetically shifting the result by one bit to the lower 16 bits of the register Rc.
このような命令は、加算により16ビット精度におさまらなくなる前にシフトダウンして精度を確保するときに有効である。ケースによっては丸めが必要である。FFT(バタフライ)では複素数同士の加減算が繰り返されるので多用される。 Such an instruction is effective for ensuring accuracy by shifting down before it is not reduced to 16-bit accuracy by addition. Some cases require rounding. FFT (butterfly) is frequently used because addition and subtraction of complex numbers are repeated.
なお、本プロセッサ1は、減算命令(vsubsh等)についても、この加算命令と同様の処理を実行する。
Note that the
また、本プロセッサ1は、以上のような2組のオペランドに対する演算(2並列SIMDによる加算、減算)だけでなく、これを拡張したn組のオペランドに対する演算(4並列、8並列SIMD演算など)を実行する機能を備えてもよい。
Further, the
例えば、いま、レジスタRaに格納されている4つのバイトデータを上位からRa1、Ra2,Ra3,Ra4とし、レジスタRbに格納されている4つのバイトデータを上位からRb1、Rb2,Rb3,Rb4とした場合に、レジスタRaとレジスタRbとをオペランドとするSIMD演算命令であって、以下のような演算とビットシフトとを行う命令を備えてもよい。つまり、Ra1とRb1、Ra2とRb2、Ra3とRb3、Ra4とRb4、それぞれを演算対象とする4並列SIMD型の演算命令を備えてもよい。例えば、バイト単位で4組のオペランドを加算し、その結果を1ビットだけ算術右シフトする命令vaddsbなどである。 For example, the four byte data currently stored in the register Ra are Ra1, Ra2, Ra3, Ra4 from the top, and the four byte data stored in the register Rb are Rb1, Rb2, Rb3, Rb4 from the top. In this case, a SIMD operation instruction having operands of the register Ra and the register Rb and an instruction for performing the following operation and bit shift may be provided. That is, a 4-parallel SIMD type operation instruction for Ra1 and Rb1, Ra2 and Rb2, Ra3 and Rb3, and Ra4 and Rb4 may be provided. For example, an instruction vaddsb that adds four operands in byte units and arithmetically shifts the result by one bit to the right.
このような命令は、同様に精度確保に有効である。主に平均をとる場合に使用する(縦の平均)。 Such an instruction is also effective in ensuring accuracy. Used mainly for averaging (vertical averaging).
また、このようなSIMD演算とシフトとを行う特徴的な命令は、上記のような右方向に1ビットだけシフトさせる命令に限られない。つまり、そのシフト量は、固定及び可変のいずれであってもよいし、右方向及び左方向のいずれであってもよい。また、右シフト時にこぼれたビットを丸めるようにしてもよい(例えば、命令vaddsrhや命令vaddsrbなど)。 Further, the characteristic instruction for performing such SIMD operation and shift is not limited to the instruction for shifting by one bit in the right direction as described above. That is, the shift amount may be either fixed or variable, and may be either the right direction or the left direction. Further, bits spilled during the right shift may be rounded (for example, instruction vaddsrh or instruction vaddsrb).
(4)SIMD(ベクトル)データを塁加算してスカラ化又はベクトルの低次元化をする命令 (4) An instruction to add a SIMD (vector) data to make it scalar or vector
次に、ベクトルデータをスカラ化又はベクトルの低次元化をするSIMD型の命令について説明する。 Next, a SIMD type instruction for making vector data scalar or vector reduction will be described.
[命令vsumh]
命令vsumhは、ハーフワード(16ビット)単位で、2つのSIMDデータ(ベクトルデータ)を加算し、スカラ化するSIMD型の命令である。例えば、
vsumh Rb,Ra
であれば、プロセッサ1は、算術論理・比較演算器41等により、レジスタRaの上位16ビットとレジスタRaの下位16ビットとを加算し、結果をレジスタRbに格納する。
[Instruction vsumh]
The instruction vsumh is a SIMD type instruction that adds two SIMD data (vector data) in units of halfwords (16 bits) to make a scalar. For example,
vsumh Rb, Ra
If so, the
このような命令は、様々な用途に使うことができる。平均(横の平均)、個別に演算(積和、加算)した結果を足し合わせる等である。 Such an instruction can be used for various purposes. For example, the average (horizontal average) and the results of individual calculations (sum of products, addition) are added.
[命令vsumh2]
命令vsumh2は、バイト単位で、2つのSIMDデータ(ベクトルデータ)を組とする2組それぞれについて、要素を塁加算し、スカラ化するSIMD型の命令である。例えば、
vsumh2 Rb,Ra
であれば、プロセッサ1は、算術論理・比較演算器41等により、
(i)レジスタRaの最上位バイトと中上位バイトとを塁加算し、結果をレジスタRbの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの中下位バイトと最下位バイトとを塁加算し、結果をレジスタRbの下位16ビットに格納する。
[Instruction vsumh2]
The instruction vsumh2 is a SIMD type instruction that adds elements to each of two sets each including two SIMD data (vector data) in units of bytes to make a scalar. For example,
vsumh2 Rb, Ra
If so, the
(I) Add the most significant byte and the middle high-order byte of the register Ra and store the result in the high-
(Ii) The middle lower byte and the least significant byte of the register Ra are added together and the result is stored in the lower 16 bits of the register Rb.
このような命令は、画像処理、動き補償(MC)、ハーフペル用命令として有効である。 Such a command is effective as a command for image processing, motion compensation (MC), and half-pel.
なお、本プロセッサ1は、以上のような2並列SIMDデータをスカラ化する演算だけでなく、これを拡張したn(4、8など)個の要素からなるn並列SIMDデータをスカラ化する演算を実行する機能を備えてもよい。
The
例えば、いま、レジスタRaに格納されている4つのバイトデータを上位からRa1、Ra2,Ra3,Ra4とした場合に、それらRa1、Ra2,Ra3及びRa4を塁加算し、その結果をレジスタRbに格納する命令を備えてもよい。 For example, when the four byte data stored in the register Ra is set to Ra1, Ra2, Ra3, Ra4 from the top, the Ra1, Ra2, Ra3, and Ra4 are added together and the result is stored in the register Rb. Instructions may be provided.
また、本プロセッサ1は、単に複数の要素データからなるベクトルを1つの要素データからなるスカラに変換するだけでなく、その要素データの個数を減少させるというベクトルの低次元化を行ってもよい。
Further, the
また、演算の種類は、加算だけに限られず、平均値を算出する演算であってもよい。このような命令は、平均、演算結果の足し合わせ等に有効である。 Further, the type of calculation is not limited to addition, but may be calculation for calculating an average value. Such an instruction is effective for averaging, addition of calculation results, and the like.
(5)その他SIMDに関する命令
次に、以上の分類に属さないその他のSIMD型の命令について説明する。
(5) Other SIMD Instructions Next, other SIMD type instructions not belonging to the above classification will be described.
[命令vexth]
命令vexthは、ハーフワード(16ビット)単位で、2つのSIMDデータそれぞれを符号拡張するSIMD型の命令である。例えば、
vexth Mm,Rb,Ra
であれば、プロセッサ1は、変換器47の飽和ブロック(SAT)47a等により、
(i)レジスタRaの上位16ビットを32ビットに符号拡張し、その結果を演算レジスタMHmの上位16ビットと演算レジスタMLmの上位16ビットに格納し、それと並行して、
(ii)レジスタRaの下位16ビットを32ビットに符号拡張し、その結果を演算レジスタMHmの下位16ビットと演算レジスタMLmの下位16ビットに格納し、それと並行して、
(iii)レジスタRaの32ビットをレジスタRbに格納する。
[Instruction vexth]
The instruction vexth is a SIMD type instruction that sign-extends each of two SIMD data in units of half words (16 bits). For example,
vexth Mm, Rb, Ra
If so, the
(I) The upper 16 bits of the register Ra are sign-extended to 32 bits, and the result is stored in the upper 16 bits of the arithmetic register MHm and the upper 16 bits of the arithmetic register MLm.
(Ii) The lower 16 bits of the register Ra are sign-extended to 32 bits, and the result is stored in the lower 16 bits of the arithmetic register MHm and the lower 16 bits of the arithmetic register MLm.
(Iii) 32 bits of the register Ra are stored in the register Rb.
なお、符号拡張とは、符号情報を維持したままデータの長さを大きくすることをいい、例えば、ハーフワードで表現された符号付き数値をワードで表現された同じ数値に変換することである。具体的には、元のデータの符号ビット(最上位ビット)の値で拡張した上位ビットを埋め尽くす処理である。 Note that sign extension refers to increasing the length of data while maintaining code information, for example, converting a signed numeric value expressed in half words into the same numeric value expressed in words. Specifically, it is a process of filling up the higher bits expanded with the value of the sign bit (most significant bit) of the original data.
このような命令は、SIMDデータのアキュムレータへの転送(精度が必要な場合)に有効である。 Such an instruction is effective for transferring SIMD data to an accumulator (when accuracy is required).
[命令vasubb]
命令vasubbは、バイト単位で、4組のSIMDデータそれぞれを減算し、その結果得られる4つの符号を条件フラグレジスタに格納するSIMD型の命令である。例えば、
vasubb Rc,Rb,Ra
であれば、プロセッサ1は、算術論理・比較演算器41等により、
(i)レジスタRbの最上位8ビットからレジスタRaの最上位8ビットを減算し、その結果をレジスタRcの最上位8ビットに格納するとともに、その符号を条件フラグレジスタ(CFR)32のVC3に格納し、それと並行して、
(ii)レジスタRbの中上位8ビットからレジスタRaの中上位8ビットを減算し、その結果をレジスタRcの中上位8ビットに格納するとともに、その符号を条件フラグレジスタ(CFR)32のVC2に格納し、それと並行して、
(iii)レジスタRbの中下位8ビットからレジスタRaの中下位8ビットを減算し、その結果をレジスタRcの中下位8ビットに格納するとともに、その符号を条件フラグレジスタ(CFR)32のVC1に格納し、それと並行して、
(iv)レジスタRbの最下位8ビットからレジスタRaの最下位8ビットを減算し、その結果をレジスタRcの最下位8ビットに格納するとともに、その符号を条件フラグレジスタ(CFR)32のVC0に格納する。
[Instruction vasubb]
The instruction vassub is a SIMD type instruction that subtracts four sets of SIMD data in units of bytes and stores the four codes obtained as a result in the condition flag register. For example,
Vasubb Rc, Rb, Ra
If so, the
(I) The most significant 8 bits of the register Ra is subtracted from the most significant 8 bits of the register Rb, the result is stored in the most significant 8 bits of the register Rc, and the sign thereof is stored in the VC3 of the condition flag register (CFR) 32 Store and in parallel,
(Ii) Subtract the upper 8 bits of the register Ra from the upper 8 bits of the register Rb, store the result in the upper 8 bits of the register Rc, and store the sign in the VC2 of the condition flag register (CFR) 32 Store and in parallel,
(Iii) The lower 8 bits of the register Ra are subtracted from the lower 8 bits of the register Rb, the result is stored in the 8 lower bits of the register Rc, and the sign is stored in the VC1 of the condition flag register (CFR) 32 Store and in parallel,
(Iv) The least significant 8 bits of the register Ra are subtracted from the least significant 8 bits of the register Rb, the result is stored in the least significant 8 bits of the register Rc, and the sign thereof is stored in the VC0 of the condition flag register (CFR) 32 Store.
このような命令は、絶対値差分和を得ることに一時的に9ビット精度が必要とされる場合に有効である。 Such an instruction is effective when 9-bit precision is temporarily required to obtain the absolute value difference sum.
[命令vabssumb]
命令vabssumbは、バイト単位で、4組のSIMDデータそれぞれを絶対値加算し、その結果と他の4バイトデータとを加算するSIMD型の命令である。例えば、
vabssumb Rc,Ra,Rb
であれば、プロセッサ1は、算術論理・比較演算器41等により、レジスタRaの最上位8ビットの絶対値と中上位8ビットの絶対値と中下位8ビットの絶対値と最下位8ビットの絶対値とを加算し、その結果とレジスタRbの32ビットとを加算し、得られた結果をレジスタRcに格納する。なお、本プロセッサ1は、条件フラグレジスタ(CFR)32のフラグVC0〜VC3によって、レジスタRaに格納された各バイトの絶対値を特定する。
[Instruction vabsum]
The instruction vabssum is a SIMD type instruction that adds the absolute value of each of four sets of SIMD data in units of bytes and adds the result to the other 4-byte data. For example,
vabsumb Rc, Ra, Rb
If so, the
このような命令は、上記命令vasubbと組み合わせて使用することにより、複数組のデータに対して、各組の差分を算出した後に、それぞれの差分の絶対値を合計した値が得られ、画像処理の動き予測の差分絶対値和を算出する場合等に有効である。 Such an instruction is used in combination with the instruction vasubb, so that after calculating the difference of each set for a plurality of sets of data, a value obtained by summing the absolute values of the respective differences is obtained. This is effective when calculating the sum of absolute differences of motion prediction.
(6)その他マスク演算等に関する命令
次に、SIMD型の命令ではないが、特徴的な処理を行う命令について説明する。
(6) Other Instructions Related to Mask Operations, etc. Next, instructions that are not SIMD type instructions but perform characteristic processing will be described.
[命令addmsk]
命令addmskは、2つのオペランドの一方の一部のビット(上位)をマスクして加算する命令である。例えば、
addmsk Rc,Ra,Rb
であれば、プロセッサ1は、算術論理・比較演算器41や変換器47等により、条件フラグレジスタ(CFR)32のBPOで指定された範囲(下位ビット)でのみレジスタRaとレジスタRbに格納されたデータを加算してレジスタRcに格納するとともに、指定されていない範囲(上位ビット)についてはレジスタRaの値をそのままレジスタRcに格納する。
[Instruction addmsk]
The instruction addmsk is an instruction that masks and adds some bits (upper order) of one of two operands. For example,
addmsk Rc, Ra, Rb
If so, the
このような命令は、モジュロアドレッシング(DSPでは一般的)への対応として有効である。バタフライ演算の準備のため予め特定のパターンにデータを並べ替えるあめに必要である。 Such an instruction is effective as a response to modulo addressing (common in DSP). This is necessary for rearranging data into a specific pattern in advance for preparation of butterfly computation.
なお、本プロセッサ1は、減算命令(submsk等)についても、この加算命令と同様の処理を実行する。
Note that the
[命令mskbrvh]
命令mskbrvhは、2つのオペランドの一方の一部のビット(下位)をリバース(ビットの並びを逆順に)した後に、他方のオペランドとビット連結する命令である。例えば、
mskbrvh Rc,Ra,Rb
であれば、プロセッサ1は、変換器47等により、レジスタRbの下位16ビットを逆順にした後に、条件フラグレジスタ(CFR)32のBPOで指定されたビット位置で、レジスタRaのデータとレジスタRbのデータとを連結し、結果をレジスタRcに格納する。このとき、レジスタRbの上位16ビットのうち、BP0で指定された位置よりも下位部分が0にマスクされる。
[Instruction mskbrvh]
The instruction mskbrvh is an instruction that performs bit concatenation with the other operand after reversing a part (lower order) of one of the two operands (in reverse order of the bit sequence). For example,
mskbrvh Rc, Ra, Rb
If so, the
このような命令は、リバースアドレッシングに対応し、バタフライ演算の準備のために予め特定のパターンにデータを並べ替えるのに必要である。 Such an instruction corresponds to reverse addressing and is necessary for rearranging data in a specific pattern in advance for preparation of butterfly computation.
なお、本プロセッサ1は、16ビットを逆順にするだけでなく、1バイト等の領域を逆順にする命令(mskbrvb等)についても、この命令と同様の処理を実行する。
Note that the
[命令msk]
命令mskは、オペランドを構成するビットのうち、指定された2つのビット位置で挟まれた領域をマスク(0に)する、又は、その領域の外をマスクする命令である。例えば、
msk Rc,Ra,Rb
であれば、プロセッサ1は、変換器47等により、
(i)Rb[12:8]≧Rb[4:0]である場合には、
レジスタRaに格納された32ビットのうち、レジスタRbの第0〜4の5ビットRb[4:0]で指定されるビット位置からレジスタRbの第8〜12の5ビットRb[12:8]で指定されるビット位置についてはそのままにし、他のビットについてはマスク(0に)して、レジスタRcに格納する。
(ii)Rb[12:8]<Rb[4:0]である場合には、
レジスタRaに格納された32ビットのうち、レジスタRbの第8〜12の5ビットRb[12:8]で指定されるビット位置からレジスタRbの第0〜4の5ビットRb[4:0]で指定されるビット位置についてはマスク(0に)し、他のビットについてはそのままにして、レジスタRcに格納する。
[Instruction msk]
The instruction msk is an instruction that masks (sets to 0) an area sandwiched between two designated bit positions among bits constituting an operand, or masks the outside of the area. For example,
msk Rc, Ra, Rb
If so, the
(I) When Rb [12: 8] ≧ Rb [4: 0],
Of the 32 bits stored in the register Ra, the 8th to 12th 5 bits Rb [12: 8] of the register Rb from the bit position specified by the 0th to 4th 5 bits Rb [4: 0] of the register Rb. The bit position specified by is kept as it is, and the other bits are masked (set to 0) and stored in the register Rc.
(Ii) When Rb [12: 8] <Rb [4: 0],
Of the 32 bits stored in the register Ra, the 0th to 4th 5 bits Rb [4: 0] of the register Rb from the bit position specified by the 8th to 12th 5 bits Rb [12: 8] of the register Rb. The bit position designated by (1) is masked (set to 0), the other bits are left as they are, and stored in the register Rc.
このような命令は、ビットフィールドの抽出、挿入(組み立て)に使用することができる。VLD/VLCをソフトで行う場合に使用することができる。 Such an instruction can be used for bit field extraction and insertion (assembly). It can be used when VLD / VLC is performed by software.
[命令bseq]
命令bseqは、オペランドのMSBの1ビット下から連続する符号ビットの数を数える命令である。例えば、
bseq Rb,Ra
であれば、プロセッサ1は、変換器47のBSEQブロック47bにより、レジスタRaの1ビット下から、連続する符号ビットの数を数えて結果をレジスタRbに格納する。なお、レジスタRaの値が0である場合には、レジスタRbに0を格納する。
[Instruction bseq]
The instruction bseq is an instruction that counts the number of sign bits that are consecutive from one bit below the MSB of the operand. For example,
bseq Rb, Ra
If so, the
このような命令は、有効桁の検出に使用することができる。ダイナミックレンジを大きく取るため、一部浮動小数点演算を行う場合がある。例えば、配列内の最も有効桁の多いデータに合わせて全てのデータを正規化し、演算するといったことに使用することができる。 Such an instruction can be used to detect significant digits. In order to increase the dynamic range, some floating point operations may be performed. For example, it can be used for normalizing and calculating all data according to data having the most significant digits in the array.
[命令ldbp]
命令ldbpは、メモリから2バイトのデータを符号拡張してレジスタにロードする命令である。例えば、
ldbp Rb:Rb+1,(Ra,D9)
であれば、プロセッサ1は、I/F部50等により、レジスタRaの値にディスプレースメント値(D9)を加算したアドレスから2つのバイトデータを符号拡張してレジスタRaとレジスタ(Ra+1)それぞれにロードする。
[Instruction ldbp]
The instruction ldbp is an instruction for sign-extending 2-byte data from the memory and loading the register. For example,
ldbp Rb: Rb + 1, (Ra, D9)
If so, the
このような命令は、データ供給を高速にする。
なお、本プロセッサ1は、2つのレジスタへのロードだけでなく、1つのレジスタの上位ハーフワードと下位ハーフワードへのロード等(ldbh等)についても、このロード命令と同様の処理(符号拡張を伴うロード)を実行する。
[命令rde]
命令rdeは、外部レジスタの値を読み込み、読み込みの失敗時にエラー例外を発生する命令である。例えば、
rde C0:C1,Rb,(Ra,D5)
であれば、プロセッサ1は、I/F部50等により、レジスタRaの値にディスプレースメント値(D5)を加算した値を外部レジスタ番号とし、その外部レジスタ(拡張レジスタ部80)の値をレジスタRbに読み込むとともに、読み込みの成功・失敗を条件フラグレジスタ(CFR)32のコンディションフラグC0及びC1に出力する。失敗時には拡張レジスタエラー例外を発生する。
Such instructions speed up data supply.
The
[Instruction rde]
The instruction rde is an instruction that reads the value of the external register and generates an error exception when reading fails. For example,
rde C0: C1, Rb, (Ra, D5)
If so, the
このような命令は、ハードアクセラレータを制御するための命令として有効である。ハードがエラーを返したら例外が発生し、フラグにも反映される。 Such an instruction is effective as an instruction for controlling the hard accelerator. If hardware returns an error, an exception is raised and reflected in the flag.
なお、本プロセッサ1は、外部レジスタからの読み込みだけでなく、外部レジスタへの書き出し(命令wte)についても、この読み出し命令と同様の処理(フラグのセット、例外の発生)を実行する。
The
[命令addarvw]
命令addarvwは、絶対値丸め(ゼロから離れる方向に丸め)の加算を行う命令である。例えば、
addarvw Rc,Rb,Ra
であれば、プロセッサ1は、算術論理・比較演算器41等により、レジスタRaの32ビットとレジスタRbの32ビットとを加算し、その結果が正であれば、丸めるビットを切り上げる処理をし、結果が負であれば、丸めるビットを切り下げる処理をする。具体的には、レジスタRaとRbの値を加算し、レジスタRaの値が正である場合に1を加算する。なお、絶対値丸めを行う場合、レジスタRbには丸めするビットより下位のビットを1で埋めた値をいれておく。
[Instruction addarrvw]
The instruction adddarww is an instruction that performs addition of absolute value rounding (rounding away from zero). For example,
addarrvw Rc, Rb, Ra
If so, the
このような命令は、絶対値丸め(ゼロから離れる方向に丸め)の加算IDCT(Inverse Discrete Cosine Transform)に有効である。 Such an instruction is effective for addition IDCT (Inverse Discrete Cosine Transform) of absolute value rounding (rounding away from zero).
本発明は、DSPやCPU等のプロセッサとして、特にSIMD型の命令を実行するプロセッサとして、例えば、携帯電話、モバイルAV機器、デジタルTV、DVD等に共通のコアプロセッサとして、利用することができる。 The present invention can be used as a processor such as a DSP or a CPU, particularly as a processor for executing SIMD instructions, for example, as a core processor common to a mobile phone, a mobile AV device, a digital TV, a DVD, or the like.
1 プロセッサ
10 命令制御部
10a 命令キャッシュ
10b アドレス管理部
10c〜10e 命令バッファ
10f ジャンプバッファ
10g ローテーション部
20 デコード部
30 レジスタファイル
30a 汎用レジスタ(R0〜R31)
30b アキュームレータ(MH,ML)
30c リンクレジスタ(LR)
30d 分岐レジスタ(TAR)
31 プログラム状態レジスタ(PSR)
32 条件フラグレジスタ(CFR)
33 プログラムカウンタ(PC)
34 PC退避用レジスタ(IPC)
35 PSR退避用レジスタ(IPSR)
40 演算部
41〜43 算術論理・比較演算器
41a ALU部
41b 飽和処理部
41c フラグ部
44 積和演算器
44a、44b 乗算器
44c〜44e 加算器
44f セレクタ
44g 飽和処理部
45 バレルシフタ
45a、45b セレクタ
45c 上位バレルシフタ
45d 下位バレルシフタ
45e 飽和処理部
46 除算器
47 変換器
47a SATブロック
47b BSEQブロック
47c MSKGENブロック
47d VSUMBブロック
47e BCNTブロック
47f ILブロック
50 I/F部
60 命令メモリ部
70 データメモリ部
80 拡張レジスタ部
90 I/Oインターフェース部
DESCRIPTION OF
30b Accumulator (MH, ML)
30c Link register (LR)
30d Branch register (TAR)
31 Program status register (PSR)
32 Condition flag register (CFR)
33 Program counter (PC)
34 PC save register (IPC)
35 PSR save register (IPSR)
40
Claims (14)
命令を解読する解読手段と、
解読手段による解読結果に基づいて、命令を実行する実行手段とを備え、
前記実行手段は、演算の種類を指定する命令コードとn(≧2)個のデータの並びからなる第1データ群を指定する第1オペランドとn個のデータの並びからなる第2データ群を指定する第2オペランドとを含むSIMD型の命令が前記解読手段によって解読された場合に、前記第1データ群を構成するn個のデータの並びにおける第i番目のデータと前記第2データ群を構成するn個のデータの並びにおける第j番目のデータとからなるn組それぞれに対して前記命令コードで指定される演算を行い、
前記i=1,2,…,n、前記j=一定である
ことを特徴とするプロセッサ。 A processor that executes SIMD type instructions that operate on a plurality of data with one instruction,
Decoding means for decoding instructions;
An execution means for executing an instruction based on the result of decoding by the decoding means;
The execution means includes an instruction code designating an operation type, a first operand designating a first data group consisting of a sequence of n (≧ 2) data, and a second data group consisting of a sequence of n data. When a SIMD type instruction including a second operand to be specified is decoded by the decoding means, the i-th data and the second data group in the sequence of n data constituting the first data group are Performing an operation specified by the instruction code on each of the n sets of j-th data in an array of n data constituting the data;
The processor is characterized in that i = 1, 2,..., N, and j = constant.
前記第1データ群は、第1番目データと第2番目データとからなり、
前記第2データ群は、第1番目データと第2番目データとからなり、
前記実行手段は、前記第1データ群の第1番目データと第2データ群の第1番目データとの組に対して前記演算を行うとともに、前記第1データ群の第2番目データと第2データ群の第1番目データとの組に対して前記演算を行う
ことを特徴とする請求項1記載のプロセッサ。 N is 2;
The first data group includes first data and second data,
The second data group includes first data and second data,
The execution means performs the calculation on a set of the first data of the first data group and the first data of the second data group, and the second data and second of the first data group. The processor according to claim 1, wherein the calculation is performed on a set of the data group and the first data.
前記第1データ群は、第1番目データと第2番目データとからなり、
前記第2データ群は、第1番目データと第2番目データとからなり、
前記実行手段は、前記第1データ群の第1番目データと第2データ群の第2番目データとの組に対して前記演算を行うとともに、前記第1データ群の第2番目データと第2データ群の第2番目データとの組に対して前記演算を行う
ことを特徴とする請求項1記載のプロセッサ。 N is 2;
The first data group includes first data and second data,
The second data group includes first data and second data,
The execution means performs the calculation on a set of the first data of the first data group and the second data of the second data group, and the second data and the second data of the first data group. The processor according to claim 1, wherein the calculation is performed on a set of the data group and the second data.
前記第1データ群は、第1番目データと第2番目データとからなり、
前記第2データ群は、第1番目データと第2番目データとからなり、
前記実行手段は、
第1命令が前記解読手段によって解読された場合に、前記第1データ群の第1番目データと第2データ群の第1番目データとの組に対して前記演算を行うとともに、前記第1データ群の第2番目データと第2データ群の第1番目データとの組に対して前記演算を行い、
第2命令が前記解読手段によって解読された場合に、前記第1データ群の第1番目データと第2データ群の第2番目データとの組に対して前記演算を行うとともに、前記第1データ群の第2番目データと第2データ群の第2番目データとの組に対して前記演算を行う
ことを特徴とする請求項1記載のプロセッサ。 N is 2;
The first data group includes first data and second data,
The second data group includes first data and second data,
The execution means includes
When the first instruction is decoded by the decoding means, the calculation is performed on a set of the first data of the first data group and the first data of the second data group, and the first data Performing the operation on the set of the second data of the group and the first data of the second data group,
When the second instruction is decoded by the decoding means, the calculation is performed on a set of the first data of the first data group and the second data of the second data group, and the first data The processor according to claim 1, wherein the calculation is performed on a set of second data of the group and second data of the second data group.
前記命令は、演算の結果を格納するための第3データを指定する第3オペランドを含み、
前記実行手段は、前記2つの組に対して前記演算を行って得られた結果それぞれの下位部分を前記第3データに格納する
ことを特徴とする請求項2〜4のいずれか1項に記載のプロセッサ。 The type of operation specified by the instruction code is multiplication, sum of products or product difference,
The instruction includes a third operand designating third data for storing a result of the operation,
The said execution means stores the low-order part of each result obtained by performing the said calculation with respect to said two sets in said 3rd data. The one of Claims 2-4 characterized by the above-mentioned. Processor.
前記命令は、演算の結果を格納するための第3データを指定する第3オペランドを含み、
前記実行手段は、前記2つの組に対して前記演算を行って得られた結果それぞれの上位部分を前記第3データに格納する
ことを特徴とする請求項2〜4のいずれか1項に記載のプロセッサ。 The type of operation specified by the instruction code is multiplication, sum of products or product difference,
The instruction includes a third operand designating third data for storing a result of the operation,
The said execution means stores the high-order part of each result obtained by performing the said calculation with respect to said two sets in said 3rd data. The one of Claims 2-4 characterized by the above-mentioned. Processor.
前記命令は、演算の結果を格納するための第3データを指定する第3オペランドを含み、
前記実行手段は、前記2つの組に対して前記演算を行って得られた2つの結果のいずれかを前記第3データに格納する
ことを特徴とする請求項2〜4のいずれか1項に記載のプロセッサ。 The type of operation specified by the instruction code is multiplication, sum of products or product difference,
The instruction includes a third operand designating third data for storing a result of the operation,
5. The method according to claim 2, wherein the execution unit stores one of two results obtained by performing the calculation on the two sets in the third data. The processor described.
前記第1データ群は、第1〜第4番目データの並びからなり、
前記第2データ群は、第1〜第4番目データの並びからなり、
前記実行手段は、前記第1データ群の第1番目データと第2データ群の第1番目データとの組、前記第1データ群の第2番目データと第2データ群の第1番目データとの組、前記第1データ群の第3番目データと第2データ群の第1番目データとの組、及び、前記第1データ群の第4番目データと第2データ群の第1番目データとの組に対して前記演算を行う
ことを特徴とする請求項1記載のプロセッサ。 N is 4;
The first data group includes a sequence of first to fourth data,
The second data group consists of a sequence of first to fourth data,
The execution means includes a set of the first data of the first data group and the first data of the second data group, the second data of the first data group and the first data of the second data group, A set of the third data of the first data group and the first data of the second data group, and the fourth data of the first data group and the first data of the second data group, The processor according to claim 1, wherein the calculation is performed on a set of
前記第1データ群は、第1〜第4番目データの並びからなり、
前記第2データ群は、第1〜第4番目データの並びからなり、
前記実行手段は、前記第1データ群の第1番目データと第2データ群の第2番目データとの組、前記第1データ群の第2番目データと第2データ群の第2番目データとの組、前記第1データ群の第3番目データと第2データ群の第2番目データとの組、及び、前記第1データ群の第4番目データと第2データ群の第2番目データとの組に対して前記演算を行う
ことを特徴とする請求項1記載のプロセッサ。 N is 4;
The first data group includes a sequence of first to fourth data,
The second data group consists of a sequence of first to fourth data,
The execution means includes a set of first data of the first data group and second data of the second data group, second data of the first data group, and second data of the second data group, A set of the third data of the first data group and the second data of the second data group, and the fourth data of the first data group and the second data of the second data group, The processor according to claim 1, wherein the calculation is performed on a set of
前記第1データ群は、第1〜第4番目データの並びからなり、
前記第2データ群は、第1〜第4番目データの並びからなり、
前記実行手段は、前記第1データ群の第1番目データと第2データ群の第3番目データとの組、前記第1データ群の第2番目データと第2データ群の第3番目データとの組、前記第1データ群の第3番目データと第2データ群の第3番目データとの組、及び、前記第1データ群の第4番目データと第2データ群の第3番目データとの組に対して前記演算を行う
ことを特徴とする請求項1記載のプロセッサ。 N is 4;
The first data group includes a sequence of first to fourth data,
The second data group consists of a sequence of first to fourth data,
The execution means includes a set of first data of the first data group and third data of the second data group, second data of the first data group, and third data of the second data group, A set of the third data of the first data group and the third data of the second data group, and the fourth data of the first data group and the third data of the second data group, The processor according to claim 1, wherein the calculation is performed on a set of
前記第1データ群は、第1〜第4番目データの並びからなり、
前記第2データ群は、第1〜第4番目データの並びからなり、
前記実行手段は、前記第1データ群の第1番目データと第2データ群の第4番目データとの組、前記第1データ群の第2番目データと第2データ群の第4番目データとの組、前記第1データ群の第3番目データと第2データ群の第4番目データとの組、及び、前記第1データ群の第4番目データと第2データ群の第4番目データとの組に対して前記演算を行う
ことを特徴とする請求項1記載のプロセッサ。 N is 4;
The first data group includes a sequence of first to fourth data,
The second data group consists of a sequence of first to fourth data,
The execution means includes a set of the first data of the first data group and the fourth data of the second data group, the second data of the first data group and the fourth data of the second data group, A set of the third data of the first data group and the fourth data of the second data group, and the fourth data of the first data group and the fourth data of the second data group, The processor according to claim 1, wherein the calculation is performed on a set of
前記命令は、演算の結果を格納するための第3データを指定する第3オペランドを含み、
前記実行手段は、前記4つの組に対して前記演算を行って得られた結果それぞれの下位部分を前記第3データに格納する
ことを特徴とする請求項8〜11のいずれか1項に記載のプロセッサ。 The type of operation specified by the instruction code is multiplication, sum of products or product difference,
The instruction includes a third operand designating third data for storing a result of the operation,
The said execution means stores the low-order part of each result obtained by performing the said calculation with respect to the said 4 groups in said 3rd data. The one of Claims 8-11 characterized by the above-mentioned. Processor.
前記命令は、演算の結果を格納するための第3データを指定する第3オペランドを含み、
前記実行手段は、前記4つの組に対して前記演算を行って得られた結果それぞれの上位部分を前記第3データに格納する
ことを特徴とする請求項8〜11のいずれか1項に記載のプロセッサ。 The type of operation specified by the instruction code is multiplication, sum of products or product difference,
The instruction includes a third operand designating third data for storing a result of the operation,
The said execution means stores the high-order part of each result obtained by performing the said calculation with respect to the said 4 groups in said 3rd data. The one of Claims 8-11 characterized by the above-mentioned. Processor.
前記命令は、演算の結果を格納するための第3データを指定する第3オペランドを含み、
前記実行手段は、前記4つの組に対して前記演算を行って得られた4つの結果のうちの2つを前記第3データに格納する
ことを特徴とする請求項8〜11のいずれか1項に記載のプロセッサ。 The type of operation specified by the instruction code is multiplication, sum of products or product difference,
The instruction includes a third operand designating third data for storing a result of the operation,
The said execution means stores two of the four results obtained by performing the said calculation with respect to the said four groups in said 3rd data. Any one of Claims 8-11 characterized by the above-mentioned. The processor according to item.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006210393A JP2006338684A (en) | 2006-08-01 | 2006-08-01 | Processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006210393A JP2006338684A (en) | 2006-08-01 | 2006-08-01 | Processor |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002161381A Division JP3857614B2 (en) | 2002-06-03 | 2002-06-03 | Processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006338684A true JP2006338684A (en) | 2006-12-14 |
Family
ID=37559127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006210393A Withdrawn JP2006338684A (en) | 2006-08-01 | 2006-08-01 | Processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006338684A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010140192A (en) * | 2008-12-10 | 2010-06-24 | Nec Corp | Barrel shifter device and barrel shifting method |
JP2015185076A (en) * | 2014-03-26 | 2015-10-22 | 株式会社メガチップス | VLIW processor |
-
2006
- 2006-08-01 JP JP2006210393A patent/JP2006338684A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010140192A (en) * | 2008-12-10 | 2010-06-24 | Nec Corp | Barrel shifter device and barrel shifting method |
JP2015185076A (en) * | 2014-03-26 | 2015-10-22 | 株式会社メガチップス | VLIW processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3857614B2 (en) | Processor | |
JP3958662B2 (en) | Processor | |
JP3974063B2 (en) | Processor and compiler | |
EP3629153B1 (en) | Systems and methods for performing matrix compress and decompress instructions | |
US8122078B2 (en) | Processor with enhanced combined-arithmetic capability | |
RU2263947C2 (en) | Integer-valued high order multiplication with truncation and shift in architecture with one commands flow and multiple data flows | |
JP3801545B2 (en) | COMPILER PROGRAM, COMPILER DEVICE, AND COMPILING METHOD | |
JP4064989B2 (en) | Device for performing multiplication and addition of packed data | |
US20190114169A1 (en) | Vector multiplication with accumulation in large register space | |
US20200210516A1 (en) | Apparatuses, methods, and systems for fast fourier transform configuration and computation instructions | |
US20130212360A1 (en) | In-Lane Vector Shuffle Instructions | |
CN104011664A (en) | Super multiply ADD (super MADD) instruction with three scalar terms | |
CN102053819A (en) | Information processing apparatus and instruction decoder for the information processing apparatus | |
TW201333821A (en) | System, apparatus and method for generating a loop alignment count or a loop alignment mask | |
US20040139138A1 (en) | Method and apparatus for efficient bi-linear interpolation and motion compensation | |
JP2006338684A (en) | Processor | |
US20220197974A1 (en) | Processors, methods, systems, and instructions to select and store data elements from two source two-dimensional arrays indicated by permute control elements in a result two-dimensional array | |
JP2007102821A (en) | Processor and compiler | |
JP3186095B2 (en) | Arithmetic processing unit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060914 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081125 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20081226 |