JP3317985B2 - Pseudo vector processor - Google Patents

Pseudo vector processor

Info

Publication number
JP3317985B2
JP3317985B2 JP30447691A JP30447691A JP3317985B2 JP 3317985 B2 JP3317985 B2 JP 3317985B2 JP 30447691 A JP30447691 A JP 30447691A JP 30447691 A JP30447691 A JP 30447691A JP 3317985 B2 JP3317985 B2 JP 3317985B2
Authority
JP
Japan
Prior art keywords
register
instruction
value
floating
physical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP30447691A
Other languages
Japanese (ja)
Other versions
JPH07114534A (en
Inventor
喜三郎 中澤
宏 中村
弘充 位守
英夫 和田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP30447691A priority Critical patent/JP3317985B2/en
Priority to US07/977,298 priority patent/US5438669A/en
Priority to EP92119710A priority patent/EP0543366B1/en
Priority to DE69229771T priority patent/DE69229771T2/en
Publication of JPH07114534A publication Critical patent/JPH07114534A/en
Application granted granted Critical
Publication of JP3317985B2 publication Critical patent/JP3317985B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】 本発明はデ−タ処理装置に関
し、さらに具体的には命令によってアドレス可能なレジ
スタの数より多いレジスタをデ−タ処理装置がアクセス
可能とする技術に関する。特に、このようにすることに
よって、キャッシュがあまり有効でない大規模なデ−タ
を連続的に処理するいわゆるベクトル処理に際しても、
主記憶からの転送のための性能低下がほとんど生じない
ようにし、効率の良い疑似ベクトル処理を通常のデ−タ
処理装置で実現可能とする技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus, and more particularly, to a technique for enabling a data processing apparatus to access more registers than the number of registers addressable by an instruction. In particular, by doing so, so-called vector processing for continuously processing large-scale data for which the cache is not very effective,
The present invention relates to a technique which makes it possible to hardly cause a decrease in performance for transfer from a main memory and to realize efficient pseudo vector processing with a normal data processing device.

【0002】[0002]

【従来の技術】 (従来技術1)従来、命令によってア
ドレス可能なレジスタの数より多いレジスタをデ−タ処
理装置がアクセス可能とする技術としては、特開昭57
−166649号に記載があり、その方式によると、ま
ず、プログラムによってアドレス可能な汎用レジスタの
数よりも多いハ−ドウェアレジスタと称するレジスタ群
を設け、異なった主記憶アドレスから同一の汎用レジス
タに対する複数のロ−ド命令があったら、該ロ−ド命令
の数だけハ−ドウェアレジスタに保持する(すなわち、
プログラムによってアドレス可能な汎用レジスタの数が
16である場合、ハ−ドウェアレジスタを各汎用レジス
タ当たり16、つまり、合計256用意し、たとえば、
汎用レジスタ0にはハ−ドウェアレジスタ0から15を
割り当てる。汎用レジスタ0に対して16個の異なった
主記憶アドレスを指定したロ−ド命令が実行された場合
は、該16個のロ−ド命令からのデ−タをハ−ドウェア
レジスタ0からハ−ドウェアレジスタ15までの中に保
持する)。そして、過去に実行されたロ−ド命令の主記
憶アドレスとその時ロ−ドされたデ−タが格納されてい
るハ−ドウェアレジスタ番号を登録しておく記憶機構を
設け、プログラムで発行されたロ−ド命令が該記憶機構
に登録されている主記憶アドレスと一致したら、主記憶
からデ−タを読まずに、対応するハ−ドウェアレジスタ
からデ−タを読みだす。この方式により、主記憶参照回
数が低減でき、また、命令間の参照レジスタのぶつかり
による性能低下を防ぐことができる。
2. Description of the Related Art Conventionally, as a technique for enabling a data processing device to access more registers than the number of registers addressable by an instruction, Japanese Patent Laid-Open No.
According to this method, first, a register group called a hardware register is provided which is larger than the number of general-purpose registers addressable by a program, and a plurality of registers for the same general-purpose register are provided from different main memory addresses. Are stored in the hardware register as many as the number of the load instructions (that is, the number of the load instructions).
If the number of general-purpose registers that can be addressed by the program is 16, hardware registers are prepared for each general-purpose register, that is, a total of 256 hardware registers.
The hardware registers 0 to 15 are assigned to the general-purpose register 0. When a load instruction specifying 16 different main storage addresses is executed for general-purpose register 0, data from the 16 load instructions is transferred from hardware register 0 to hardware register 0. The data is stored in the hardware register 15). A storage mechanism is provided for registering a main memory address of a previously executed load instruction and a hardware register number in which data loaded at that time is stored. If the load instruction matches the main memory address registered in the storage mechanism, the data is read from the corresponding hardware register without reading the data from the main memory. According to this method, the number of times of referring to the main memory can be reduced, and performance degradation due to collision of the reference register between instructions can be prevented.

【0003】(従来技術2)従来、命令によってアドレ
ス可能なレジスタの数より多いレジスタをデ−タ処理装
置がアクセス可能とする技術としては、J.L.Hen
nessy and D.A.Patterson ”
ComputerArchitecture : A
QuantitativeApproach”, Mo
rgan Kaufmann Publish−er
s, Inc.(1990)に記載があり、その方式に
よると、まず、プログラムによってアドレス可能なレジ
スタの数より多い物理レジスタと称するレジスタを設
け、該物理レジスタを複数個のウィンドウと呼ばれる部
分に分ける。すなわち、各ウィンドウは複数個の物理レ
ジスタから成る。たとえば、プログラムによってレジス
タが番号1からnまで番号づけられるとし、物理レジス
タがn*m個、すなわち、番号1からn*mまで設けら
れたとする。ウィンドウをm個、すなわち、番号1から
mまで設けるとすれば、ウィンドウ1は物理レジスタ1
からn、ウィンドウ2は物理レジスタn+1から2nと
いうように割り当てることができる。実際には、全ウィ
ンドウ共通の物理レジスタや、隣合うウィンドウ共通の
物理レジスタなどを設けるのが通例であるが、簡単のた
め、前記の例を示した。各ウィンドウは1つのプログラ
ムが使用するレジスタを持つ。すなわち、あるプログラ
ムでアドレス可能なレジスタを参照することは、実際に
は、あるウィンドウに属する物理レジスタを参照するこ
とになる。たとえば、前記の例では、あるプログラムに
ウィンドウ2が割当てられていたとしたら、該プログラ
ムでレジスタkを指定したら、参照される物理レジスタ
は物理レジスタn+kになる。
(Prior Art 2) Conventionally, as a technique for enabling a data processing device to access more registers than the number of registers addressable by an instruction, J. L. Hen
nessy and D.S. A. Patterson "
ComputerArchitecture: A
QuantitativeApproach ", Mo
rgan Kaufmann Publish-er
s, Inc. (1990). According to this method, first, a register called a physical register that is larger than the number of registers addressable by a program is provided, and the physical register is divided into a plurality of windows. That is, each window is composed of a plurality of physical registers. For example, it is assumed that registers are numbered from number 1 to n by a program, and that n * m physical registers, that is, numbers 1 to n * m are provided. Assuming that there are m windows, that is, numbers 1 to m, window 1 is assigned to physical register 1
To n, window 2 can be assigned as physical registers n + 1 to 2n, and so on. In practice, it is customary to provide a physical register common to all windows, a physical register common to adjacent windows, and the like. However, for simplicity, the above example is shown. Each window has registers used by one program. In other words, referring to a register that can be addressed by a certain program actually refers to a physical register belonging to a certain window. For example, in the above example, if window 2 is assigned to a certain program, if the register k is specified in the program, the physical register to be referred to is the physical register n + k.

【0004】このウィンドウは以下のように使う。仮
に、あるプログラムにウィンドウjが割当てられていた
場合、該プログラムが別のプログラムを呼んだ(cal
lした)場合、呼ばれたプログラムには、ウィンドウj
+1が割当てられる。また、あるプログラムにウィンド
ウjが割当てられていた場合、該プログラムから該プロ
グラムを呼んだプログラムに戻った(returnし
た)場合、戻り先のプログラムには、ウィンドウj−1
が割当てられる。このように使うことによって、以下の
効果がある。プログラムによってアドレス可能なレジス
タの数だけのレジスタしか持たないシステムでは、前記
のようなプログラムの呼びが発生するたびに、該呼び発
生時点の情報保存のために、レジスタに格納されていた
デ−タを主記憶に格納しなければならず、プログラムの
戻りが発生するたびに、プログラムの再開のために、主
記憶に格納されていたデ−タをレジスタに書き戻さなく
てはならない。前記のウィンドウの機構を持つシステム
では、異なるウィンドウが割当てられているプログラム
は異なる物理レジスタを参照しているので、前記のレジ
スタからの主記憶への格納、主記憶からレジスタへの書
き戻しの操作が不要になり、処理が高速化される。
This window is used as follows. If window j is allocated to a certain program, the program calls another program (cal
l), the called program contains a window j
+1 is assigned. If window j is allocated to a certain program, if the program returns to the program that called the program (returned), the window j-1
Is assigned. By using in this way, the following effects are obtained. In a system having only as many registers as the number of registers that can be addressed by a program, each time a program call as described above occurs, the data stored in the register is used to save information at the time of the call. Must be stored in the main memory, and every time the program returns, the data stored in the main memory must be written back to the register in order to restart the program. In a system having the above window mechanism, since a program to which a different window is assigned refers to a different physical register, the operation of storing data from the above-mentioned register to the main memory and writing back from the main memory to the register is performed. Becomes unnecessary, and the processing speed is increased.

【0005】ただし、該ウィンドウの機構を持つシステ
ムでは、「最大のウィンドウ番号のプログラムからプロ
グラムの呼びが発された場合、ウィンドウオ−バフロ−
の割込みを起こし、最小のウィンドウ番号のプログラム
からプログラムの戻りが発された場合、ウィンドウアン
ダフロ−の割込みを起こす」という制御が必要になる。
[0005] However, in a system having the window mechanism, when a program call is issued from the program having the largest window number, the window overflow is performed.
When the program returns from the program with the smallest window number, a window underflow interrupt is caused. "

【0006】[0006]

【発明が解決しようとする課題】科学技術計算の大部分
は以下に示すような、ベクトル演算である。
The majority of scientific and technical calculations are vector operations as described below.

【0007】 C(i)=A(i)+B(i) i=1,N (1) ここで、A,B,Cは要素数Nのベクトルである。C (i) = A (i) + B (i) i = 1, N (1) Here, A, B, and C are vectors having N elements.

【0008】式(1)を、汎用計算機で実行すると、表
1のようなプログラムになる。
When equation (1) is executed by a general-purpose computer, a program as shown in Table 1 is obtained.

【0009】以下の説明で、レジスタとして浮動小数点
数が格納される浮動小数点レジスタを例にとり、浮動小
数点レジスタのデ−タ幅は8バイトであるとする。
In the following description, a floating-point register storing a floating-point number is taken as an example, and it is assumed that the data width of the floating-point register is 8 bytes.

【0010】表1中の各命令の機能を以下に説明する。The function of each instruction in Table 1 will be described below.

【0011】FLDM a(GRm),FRn (機能)汎用レジスタmの値で表される主記憶アドレス
から8バイトのデ−タを読みだし、浮動小数点レジスタ
nに格納する。
FLDM a (GRm), FRn (Function) 8-byte data is read from the main memory address represented by the value of the general-purpose register m and stored in the floating-point register n.

【0012】その後、汎用レジスタmの値をa加える。Thereafter, the value of the general-purpose register m is added by a.

【0013】FADD FRj,FRm,FRn (機能)浮動小数点レジスタmの値と浮動小数点レジス
タnの値を加えて浮動小数点レジスタjに格納する。
FADD FRj, FRm, FRn (Function) The value of the floating-point register m and the value of the floating-point register n are added and stored in the floating-point register j.

【0014】FSTM a(GRm),FRn (機能)浮動小数点レジスタnの値(8バイト)を汎用
レジスタmの値で表される主記憶アドレスにストアす
る。
FSTM a (GRm), FRn (Function) Stores the value (8 bytes) of floating-point register n in the main memory address represented by the value of general-purpose register m.

【0015】その後、汎用レジスタmの値をa加える。Thereafter, the value of the general-purpose register m is added by a.

【0016】BCNT GRm,t (機能)GRmの値を1減じる。その値がゼロでなけれ
ば、番地tに分岐する。ゼロならば、分岐しない。
BCNT GRm, t (Function) Decreases the value of GRm by one. If the value is not zero, branch to address t. If zero, do not branch.

【0017】[0017]

【表1】 [Table 1]

【0018】ここで、表1のプログラムの実行に先だっ
て、ベクトルAは、主記憶アドレスad1から始まる連
続領域に格納されているものとする。すなわち、A
(1)の主記憶アドレスがad1、A(2)の主記憶ア
ドレスがad1+8というように格納されている。同様
にベクトルBは、主記憶アドレスad2から始まる連続
領域に格納されているものとする。また、ベクトルC
は、主記憶アドレスad3から始まる連続領域に格納す
るものとする。汎用レジスタ1にはad1が、汎用レジ
スタ2にはad2が、汎用レジスタ3にはad3が、汎
用レジスタ4にはNが前もって格納されているものとす
る。
Here, it is assumed that prior to the execution of the program shown in Table 1, the vector A is stored in a continuous area starting from the main storage address ad1. That is, A
The main storage address of (1) is stored as ad1, and the main storage address of A (2) is stored as ad1 + 8. Similarly, it is assumed that the vector B is stored in a continuous area starting from the main storage address ad2. Also, the vector C
Is stored in a continuous area starting from the main storage address ad3. It is assumed that ad1 is stored in general-purpose register 1, ad2 is stored in general-purpose register 2, ad3 is stored in general-purpose register 3, and N is stored in general-purpose register 4 in advance.

【0019】表1からわかるように、No.1、No.
2のFLDM命令でA(i)、B(i)がそれぞれ、浮
動小数点レジスタ12、13にロ−ドされ、該2レジス
タの値が加えられ浮動小数点レジスタ20に格納され、
該レジスタの内容がC(i)にストアされる。
As can be seen from Table 1, no. 1, No.
A (i) and B (i) are loaded into the floating point registers 12 and 13 respectively by two FLDM instructions, the values of the two registers are added and stored in the floating point register 20,
The contents of the register are stored in C (i).

【0020】すなわち、5命令からなるル−プを1回実
行することによって、1要素の結果が求まり、このル−
プをN回実行することによって全要素計算ができる。
That is, by executing a loop consisting of five instructions once, a result of one element is obtained.
By executing the loop N times, all element calculations can be performed.

【0021】ここで問題となるのは、1ル−プの実行時
間である。まずNo.1とNo.2のFLDM命令で浮
動小数点レジスタ12と13に主記憶からデ−タをロ−
ドしているが、キャッシュにデ−タがある場合はFLD
M命令は短いサイクル数で終わるが、キャッシュにない
場合は、キャッシュよりはかなり低速の主記憶からデ−
タを読みださなくてはならず、キャッシュにデ−タがあ
る場合に比べ、かなり時間がかかることになる。次にN
o.3のFADD命令は浮動小数点レジスタ12と13
の値を使うが、浮動小数点レジスタ12と13は先行す
る2つのFLDM命令の実行が終わらないと、すなわ
ち、前記のデ−タ読みだしが終わらないと、値が決まら
ないので、FADD命令はそれまで実行が開始できな
い。さらに、No.4のFSTM命令は浮動小数点レジ
スタ20の値を使うが、浮動小数点レジスタ20の値は
先行するFADD命令の実行が終わらないと値が決まら
ないので、FSTM命令はそれまで実行が開始できな
い。すなわち、(1)デ−タ読みだし時間、(2)レジ
スタのぶつかりという2つの性能低下要因がル−プの実
行時間を長くすることになる。特に(1)は長大デ−タ
を扱う計算の場合は深刻で、必要なデ−タがキャッシュ
にはいりきらない場合が多いので、性能の低下は大きく
なる。
The problem here is the execution time of one loop. First, no. 1 and No. Load data from main memory to floating point registers 12 and 13 by FLDM instruction 2
FLD when there is data in the cache
The M instruction ends in a short number of cycles, but if it is not in the cache, the data is taken from main memory, which is much slower than the cache.
The data must be read out, which takes much longer than when data is in the cache. Then N
o. 3 FADD instructions are floating point registers 12 and 13
Since the values of the floating point registers 12 and 13 are not determined until the execution of the preceding two FLDM instructions is completed, that is, the data reading is not completed, the FADD instruction Execution cannot be started until. In addition, No. The FSTM instruction of No. 4 uses the value of the floating-point register 20, but the value of the floating-point register 20 cannot be determined until the execution of the preceding FADD instruction is completed, so that the execution of the FSTM instruction cannot be started until then. That is, (1) the data read time and (2) the collision of the registers, two performance degradation factors increase the execution time of the loop. In particular, the case (1) is serious in the case of calculation for handling long data, and since the required data often cannot be stored in the cache, the performance is greatly reduced.

【0022】この問題を解決する一手法がル−プアンロ
−リングであり、表2に示す手法である。すなわち、1
ル−プで複数要素(=nとする)を処理し、1ル−プで
1要素を処理する場合に比べ、ル−プ回数を1/nにす
る方式である。表2は1ル−プで4要素を処理する方式
である。
One method for solving this problem is loop unrolling, which is shown in Table 2. That is, 1
In this method, a plurality of elements (= n) are processed in a loop, and the number of loops is reduced to 1 / n as compared with a case where one element is processed in one loop. Table 2 shows a method for processing four elements in one loop.

【0023】[0023]

【表2】 [Table 2]

【0024】ここで、表2のプログラムの実行に先だっ
て、ベクトルAは、主記憶アドレスad1から始まる連
続領域に格納されているものとする。すなわち、A
(1)の主記憶アドレスがad1、A(2)の主記憶ア
ドレスがad1+8というように格納されている。同様
にベクトルBは、主記憶アドレスad2から始まる連続
領域に格納されているものとする。また、ベクトルC
は、主記憶アドレスad3から始まる連続領域に格納す
るものとする。汎用レジスタ1にはad1が、汎用レジ
スタ2にはad2が、汎用レジスタ3にはad3が、汎
用レジスタ4にはN/4が前もって格納されているもの
とする。
Here, it is assumed that the vector A is stored in a continuous area starting from the main storage address ad1 prior to the execution of the program shown in Table 2. That is, A
The main storage address of (1) is stored as ad1, and the main storage address of A (2) is stored as ad1 + 8. Similarly, it is assumed that the vector B is stored in a continuous area starting from the main storage address ad2. Also, the vector C
Is stored in a continuous area starting from the main storage address ad3. It is assumed that ad1 is stored in general-purpose register 1, ad2 is stored in general-purpose register 2, ad3 is stored in general-purpose register 3, and N / 4 is stored in general-purpose register 4 in advance.

【0025】表2からわかるように、17命令からなる
ル−プを1回実行することによって、4要素の結果が求
まり、このル−プをN/4回実行することによって全要
素計算ができる。
As can be seen from Table 2, by executing a loop consisting of 17 instructions once, a four-element result is obtained, and by executing this loop N / 4 times, all elements can be calculated. .

【0026】表2からわかる通り、i番目の要素に関
し、ロ−ドをNo.1とNo.2のFLDM命令で、加
算をNo.9のFADD命令で、ストアをNo.13の
FSTM命令で行う。同様に、i+1番目の要素に関
し、ロ−ドをNo.3とNo.4のFLDM命令で、加
算をNo.10のFADD命令で、ストアをNo.14
のFSTM命令で行う。同様に、i+2番目の要素に関
し、ロ−ドをNo.5とNo.6のFLDM命令で、加
算をNo.11のFADD命令で、ストアをNo.15
のFSTM命令で行う。同様に、i+3番目の要素に関
し、ロ−ドをNo.7とNo.8のFLDM命令で、加
算をNo.12のFADD命令で、ストアをNo.16
のFSTM命令で行う。したがって、表1に比べ、ある
1つの要素番号で示される要素に関するロ−ド、加算、
ストアという一連の処理が、命令列上で離れることにな
り、前記の(1)デ−タ読みだし時間、(2)レジスタ
のぶつかりという2つの性能低下要因の影響を低減でき
る。たとえば、No.1とNo.2のFLDM命令でA
(i)とB(i)のロ−ドが行われ、そのロ−ド結果が
使われるのが、7命令後になるので、デ−タ読みだし時
間が7サイクル以内ならば、そのロ−ド結果を使うN
o.9のFADD命令が待たされることはない。また、
No.9のFADD命令による加算結果A(i)+B
(i)が使われるのが、4命令後になるので、加算に要
する時間が4サイクル以内ならば、No.13のFST
M命令が待たされることはない。
As can be seen from Table 2, for the i-th element, the load is No. 1 and No. In the FLDM instruction of No. 2, the addition is No. 9 is stored in No. 9 by the FADD instruction. 13 FSTM instructions. Similarly, for the (i + 1) th element, the load is set to No. 3 and No. No. 4 FLDM instruction, the addition is No. With the FADD instruction of No. 10, the store is No. 14
FSTM instruction. Similarly, regarding the (i + 2) th element, the load is set to No. 5 and No. 5 No. 6 with the FLDM instruction No. 6 11, the store is No. 11 by the FADD instruction. Fifteen
FSTM instruction. Similarly, with respect to the (i + 3) th element, the load is No. 7 and no. No. 8 with the FLDM instruction No. 8 No. 12, the store is No. 16
FSTM instruction. Therefore, as compared with Table 1, loading, addition,
A series of processes called store are separated on the instruction sequence, and the effects of the two performance degradation factors (1) data read time and (2) register collision can be reduced. For example, No. 1 and No. A with 2 FLDM instructions
Loading of (i) and B (i) is performed, and the loading result is used after 7 instructions. If the data reading time is within 7 cycles, the loading is performed. Use result N
o. Nine FADD instructions are not awaited. Also,
No. 9 Addition result A (i) + B by FADD instruction
Since (i) is used after four instructions, if the time required for addition is within four cycles, No. 13 FSTs
There is no waiting for the M instruction.

【0027】このように、ル−プアンロ−リングによっ
て、性能は向上するが、この方式の欠点は、多くのレジ
スタを必要とすることである。表1のプログラムが3本
の浮動小数点レジスタを必要とするのに対し、表2のプ
ログラムは、12本の浮動小数点レジスタを必要とす
る。デ−タの読みだしに要する時間がさらに長かった
り、演算に要する時間がさらに長かったりすると、もっ
と多くの要素を1ル−プで処理しなくてはならず、より
多くのレジスタが必要となることになる。
Although loop unrolling improves performance, the disadvantage of this scheme is that it requires many registers. The program in Table 1 requires three floating point registers, while the program in Table 2 requires twelve floating point registers. If the time required for reading the data is longer or the time required for the operation is longer, more elements must be processed in one loop and more registers are required. Will be.

【0028】一般に、レジスタはアクティブな素子(す
なわち、メモリ素子ではない)で構成され、読みだし/
書き込みのためのポ−ト(すなわち、デ−タの出入口)
を多く用意することができるので、いわゆる記憶装置が
1つの動作サイクルに1個のデ−タの読みだし/書き込
みしかできないのに比べ、極めて高速である。したがっ
て、主記憶はもちろん、キャッシュに比べても、高速化
のためには、十分な容量のレジスタをもっていることが
必要不可欠である。それにもかかわらず、従来、レジス
タの数が比較的少なかったのは、ビット当たりのコスト
が高価であったことと、下記に示すように命令形式上の
レジスタ番号のフィ−ルドの長さに制限があったためで
ある。コストの問題はLSI化で解決されつつあるが、
後者はまだ未解決であった。
Generally, a register is made up of active elements (ie, not memory elements),
Port for writing (ie, data entry / exit)
Can be prepared, so that the speed of the storage device is much higher than that of a storage device which can only read / write one piece of data in one operation cycle. Therefore, it is indispensable to have a register with a sufficient capacity for speeding up, not only the main memory but also the cache. Nevertheless, conventionally, the number of registers was relatively small because of the high cost per bit and the restriction on the length of the register number field in the instruction format as shown below. Because there was. Although the problem of cost is being solved by LSI,
The latter was still unresolved.

【0029】プログラムでアドレス可能なレジスタの数
は、ア−キテクチャ上から制限されている。たとえば、
命令語中にレジスタ指定フィ−ルドが5ビットあれば、
アドレス可能なレジスタの数は32(2の5乗)であ
る。該レジスタ指定フィ−ルドのビット数を増せば、プ
ログラムでアドレス可能なレジスタの数は増えるが、命
令形式が変わるので、既存のプログラムの変更が必要と
なり、非現実的である。
The number of registers that can be addressed by a program is limited in terms of architecture. For example,
If there are 5 bits in the register specification field in the instruction word,
The number of addressable registers is 32 (2 to the fifth power). Increasing the number of bits in the register specification field increases the number of registers that can be addressed by the program, but changes the instruction format, which requires modification of the existing program, which is impractical.

【0030】そこで、デ−タ処理装置のア−キテクチャ
を変えずに、命令によってアドレス可能なレジスタの数
より多いレジスタをデ−タ処理装置がアクセス可能とす
る方式が必要となるが、従来技術1では、過去にロ−ド
命令が実行された主記憶アドレスに対し、新たにロ−ド
命令が発行された場合は高速化される。しかし、式
(1)のようなベクトル計算は多くの場合、表1、2の
プログラムのように主記憶上のデ−タに対するロ−ド要
求は1度しか出ないので、従来技術では高速化されない
という問題がある。
Therefore, it is necessary to provide a system in which the data processing device can access more registers than the number of registers addressable by the instruction without changing the architecture of the data processing device. In 1, when a new load instruction is issued for a main memory address where a load instruction was executed in the past, the speed is increased. However, in many cases, the vector calculation as in the equation (1) requires only one load request for the data in the main memory as in the programs shown in Tables 1 and 2. There is a problem that is not done.

【0031】また、従来技術2では、1つのプログラム
で使えるのはある1つのウィンドウに属する物理レジス
タのみであり、その数はプログラムでアドレス可能なレ
ジスタの数に等しく、1つのプログラムで行なわれる演
算を高速化できない。すなわち、前記のウィンドウの機
構は、プログラムの呼びと戻りが発生する場合のみ処理
の高速化がなされ、式(1)のベクトル計算のように1
つのプログラムで処理が完結しているような場合は高速
化されないという問題がある。また、前記のウィンドウ
オ−バフロ−、ウィンドウアンダフロ−の割込みは式
(1)のベクトル計算のように1つのプログラムで処理
が完結していて、プログラムの呼びと戻りが発生しない
場合は不要であるという問題がある。
Further, in the prior art 2, only one physical register belonging to a certain window can be used in one program, and the number thereof is equal to the number of registers addressable by the program, and the number of operations performed by one program is one. Can not speed up. In other words, the above-mentioned window mechanism speeds up the processing only when a program call and return occur.
When the processing is completed in one program, there is a problem that the speed is not increased. Also, the interruption of the window overflow and the window underflow is not necessary when the processing is completed by one program as in the vector calculation of the equation (1) and no call and return of the program occur. There is a problem that there is.

【0032】本発明の目的は、デ−タ処理装置のア−キ
テクチャを変えずに、命令によってアドレス可能なレジ
スタの数より多いレジスタをデ−タ処理装置がアクセス
可能とし、科学技術計算におけるベクトル計算を高速に
実行する方式を提供することにある。
An object of the present invention is to make it possible for a data processing device to access more registers than the number of registers addressable by an instruction without changing the architecture of the data processing device, and to provide a vector for scientific calculation. An object of the present invention is to provide a method for performing calculations at high speed.

【0033】[0033]

【課題を解決するための手段】上記目的を達成するため
に、命令によってアドレス可能な浮動小数点レジスタの
数より多い物理浮動小数点レジスタと呼ばれる浮動小数
点レジスタを用意し、該レジスタは物理浮動小数点レジ
スタ番号で参照されることにする。また、物理浮動小数
点レジスタ全体をウィンドウと呼ばれる複数個のレジス
タから成る部分群に区分けし、ウィンドウ番号とウィン
ドウ内のレジスタ番号の組合せで参照することもできる
ようにする。これらの対応関係を決定づけるために、論
理浮動小数点レジスタ番号と呼ばれる、プログラム命令
中の浮動小数点レジスタ番号を、物理浮動小数点レジス
タ番号に変換するパタ−ンを示す現浮動小数点ウィンド
ウポインタを格納する現浮動小数点ウィンドウポインタ
レジスタ、現浮動小数点ウィンドウポインタが有効であ
ることを示す値を格納しておく現浮動小数点ウィンドウ
ポインタ有効レジスタ、現浮動小数点ウィンドウポイン
タを用いて論理浮動小数点レジスタ番号を物理浮動小数
点レジスタ番号に変換する変換回路、現浮動小数点ウィ
ンドウポインタを変更する現浮動小数点ウィンドウポイ
ンタ変更命令、論理浮動小数点レジスタ番号を現浮動小
数点ウィンドウポインタから決定されるが該現浮動小数
点ウィンドウポインタとは異なる値を現浮動小数点ウィ
ンドウポインタとして変換した物理浮動小数点レジスタ
に主記憶デ−タを格納する浮動小数点レジスタプリロ−
ド命令、論理浮動小数点レジスタ番号を現浮動小数点ウ
ィンドウポインタから決定されるが該現浮動小数点ウィ
ンドウポインタとは異なる値を現浮動小数点ウィンドウ
ポインタとして変換した物理浮動小数点レジスタから主
記憶にデ−タを格納する浮動小数点レジスタポストスト
ア命令を設ける。
In order to achieve the above object, there is provided a floating point register called a physical floating point register having more than the number of floating point registers addressable by an instruction, wherein the register is a physical floating point register number. Will be referred to by In addition, the entire physical floating-point register is divided into a partial group consisting of a plurality of registers called a window, so that the register can be referred to by a combination of a window number and a register number in the window. In order to determine these correspondences, a current floating point window pointer, which stores a current floating point window pointer indicating a pattern for converting a floating point register number in a program instruction into a physical floating point register number, which is called a logical floating point register number, is used. Decimal point window pointer register, current floating point window pointer valid register that stores a value indicating that the current floating point window pointer is valid, logical floating point register number using the current floating point window pointer, physical floating point register number A floating-point window pointer change instruction for changing the current floating-point window pointer, and a logical floating-point register number determined from the current floating-point window pointer, but different from the current floating-point window pointer. Main memory de values to the physical floating point register obtained by converting the current floating point window pointer - floating point register preload to store data -
The instruction and logical floating-point register number are determined from the current floating-point window pointer, but data different from the current floating-point window pointer are converted to the current floating-point window pointer as data from the physical floating-point register and data is stored in the main memory. Provide a floating-point register post-store instruction to store.

【0034】[0034]

【作用】浮動小数点レジスタを参照する命令では全て、
現浮動小数点ウィンドウポインタ有効レジスタの値が1
であれば、論理浮動小数点レジスタ番号−物理浮動小数
点レジスタ番号変換が行われ、浮動小数点レジスタの参
照で物理浮動小数点レジスタ番号が参照される。現浮動
小数点ウィンドウポインタ有効レジスタの値が0であれ
ば、論理浮動小数点レジスタ番号は物理浮動小数点レジ
スタ番号に等しい。
[Effect] In all instructions that refer to the floating-point register,
The value of the current floating-point window pointer valid register is 1
If, the logical floating-point register number-physical floating-point register number conversion is performed, and the physical floating-point register number is referred to by referring to the floating-point register. If the value of the current floating point window pointer valid register is 0, the logical floating point register number is equal to the physical floating point register number.

【0035】論理浮動小数点レジスタ番号−物理浮動小
数点レジスタ番号変換は以下のようにして行われる。論
理浮動小数点レジスタが物理浮動小数点レジスタのどの
範囲を指定するかを、複数通り設ける。この範囲の指定
が前述のウィンドウである。
The conversion of the logical floating-point register number to the physical floating-point register number is performed as follows. A plurality of types are provided for specifying which range of the physical floating-point register the logical floating-point register specifies. The specification of this range is the above-mentioned window.

【0036】ウィンドウの設けかたの一例を図1に示
す。本例では、論理浮動小数点レジスタは32本で、論
理浮動小数点レジスタ番号は0から31まで指定可能と
する。物理浮動小数点レジスタは88本で、物理浮動小
数点レジスタ番号は0から87である。ウィンドウはw
0からw3の4通り設け、現浮動小数点ウィンドウポイ
ンタ0から3でそれぞれ指定される。
FIG. 1 shows an example of how to provide a window. In this example, there are 32 logical floating point registers, and logical floating point register numbers 0 to 31 can be specified. There are 88 physical floating point registers, and physical floating point register numbers are 0 to 87. The window is w
0 to w3 are provided, and are designated by the current floating point window pointers 0 to 3, respectively.

【0037】ここで、現浮動小数点ウィンドウポインタ
をw、論理浮動小数点レジスタ番号をrと表記し、物理
浮動小数点レジスタ番号はwとrから決まるので、<
w,r>と表記することにする。
Here, the current floating-point window pointer is denoted by w, the logical floating-point register number is denoted by r, and the physical floating-point register number is determined by w and r.
w, r>.

【0038】命令でwの増減を行なうが、該増減は4を
法として行なわれる。たとえば、w=3では、w+1の
値は0になる。
An instruction is used to increase or decrease w, and the increase or decrease is performed modulo 4. For example, when w = 3, the value of w + 1 is 0.

【0039】図1の例では、以下のように論理浮動小数
点レジスタ番号−物理浮動小数点レジスタ番号変換が行
われる。
In the example of FIG. 1, the conversion of the logical floating point register number to the physical floating point register number is performed as follows.

【0040】 1. 0≦r≦7の時 : wに関係なく<w,r>=r (2) 2. 8≦r≦31の時 : <0,r>=r (3) <1,r>=r+20 (4) <2,r>=r+40 (5) <3,r>=r+60 (8≦r≦27) r−20 (28≦r≦31) (6) 上記の変換法で以下の2つが特長的である。1. When 0 ≦ r ≦ 7: <w, r> = r regardless of w (2) When 8 ≦ r ≦ 31: <0, r> = r (3) <1, r> = r + 20 (4) <2, r> = r + 40 (5) <3, r> = r + 60 (8 ≦ r ≦ 27) r-20 (28 ≦ r ≦ 31) (6) The following two features are characteristic of the above conversion method.

【0041】1. 0番から7番の物理浮動小数点レジ
スタは、各ウィンドウ共通に使う。これらのレジスタ
は、global registerとして、それぞれ
のウィンドウを用いる演算ル−プに共通のデ−タを保持
する。
1. The physical floating point registers 0 to 7 are used in common for each window. These registers hold, as global registers, data common to the operation loop using each window.

【0042】2. 各ウィンドウの論理浮動小数点レジ
スタ28番から31番は、現浮動小数点ウィンドウポイ
ンタが1つ大きいウィンドウの論理浮動小数点レジスタ
8番から11番と同一の物理浮動小数点レジスタを指
す。これらのレジスタは、overlap regis
terとして隣合うウィンドウを用いる演算ル−プ間の
デ−タの受渡しに用いる。
2. The logical floating point registers 28 to 31 of each window indicate the same physical floating point registers as the logical floating point registers 8 to 11 of the window whose current floating point window pointer is one larger. These registers are overlap regis
It is used to transfer data between operation loops using adjacent windows as ter.

【0043】前記新設命令の命令ニモニックと機能を、
一例として、以下のように定める。
The instruction mnemonics and functions of the new instruction are as follows:
As an example, it is determined as follows.

【0044】 1.現浮動小数点ウィンドウポインタ変更命令 (命令ニモニック)CFRWPS GRm (機能)汎用レジスタmの値を現浮動小数点ウィンドウ
ポインタレジスタにセットする。 2.浮動小数点レジスタプリロ−ド命令 (命令ニモニック)FLDPRM a(GRm),FR
n (機能)汎用レジスタmの値で表される主記憶アドレス
から8バイトのデ−タを読みだし、浮動小数点レジスタ
nに格納する。このとき、(現浮動小数点レジスタウィ
ンドウポインタ+1)を現浮動小数点レジスタウィンド
ウポインタとして、論理浮動小数点レジスタ番号−物理
浮動小数点レジスタ番号変換が行われる。
1. Current floating-point window pointer change instruction (instruction mnemonic) CFRWPS GRm (Function) Sets the value of the general-purpose register m to the current floating-point window pointer register. 2. Floating point register preload instruction (instruction mnemonic) FLDPRM a (GRm), FR
n (Function) Reads 8-byte data from the main memory address represented by the value of the general-purpose register m and stores it in the floating-point register n. At this time, logical floating-point register number-physical floating-point register number conversion is performed using (current floating-point register window pointer + 1) as the current floating-point register window pointer.

【0045】その後、汎用レジスタmの値をa加える。Thereafter, the value of the general-purpose register m is added by a.

【0046】3.浮動小数点レジスタポストストア命令 FSTPOM a(GRm),FRn (機能)浮動小数点レジスタnの値(8バイト)を汎用
レジスタmの値で表される主記憶アドレスにストアす
る。このとき、(現浮動小数点レジスタウィンドウポイ
ンタ−1)を現浮動小数点レジスタウィンドウポインタ
として、論理浮動小数点レジスタ番号−物理浮動小数点
レジスタ番号変換が行われる。
3. Floating-point register post store instruction FSTPOM a (GRm), FRn (Function) Stores the value (8 bytes) of floating-point register n at the main memory address represented by the value of general-purpose register m. At this time, logical floating point register number-physical floating point register number conversion is performed using (current floating point register window pointer-1) as the current floating point register window pointer.

【0047】その後、汎用レジスタmの値をa加える。Thereafter, the value of the general-purpose register m is added by a.

【0048】また、一般の浮動小数点命令(すなわち、
上記2−3を除く浮動小数点命令)では、現浮動小数点
レジスタウィンドウポインタを用いて、論理浮動小数点
レジスタ番号−物理浮動小数点レジスタ番号変換が行わ
れる。
In addition, a general floating-point instruction (ie,
In the floating-point instructions except for the above 2-3, the logical floating-point register number-physical floating-point register number conversion is performed using the current floating-point register window pointer.

【0049】式(1)を、上記新設機能を用いると、表
3のようなプログラムになる。
When the above-mentioned new function is used for the expression (1), a program as shown in Table 3 is obtained.

【0050】ここで、表3のプログラムの実行に先だっ
て、ベクトルAは、主記憶アドレスad1から始まる連
続領域に格納されているものとする。すなわち、A
(1)の主記憶アドレスがad1、A(2)の主記憶ア
ドレスがad1+8というように格納されている。同様
にベクトルBは、主記憶アドレスad2から始まる連続
領域に格納されているものとする。また、ベクトルC
は、主記憶アドレスad3から始まる連続領域に格納す
るものとする。汎用レジスタ4にはN−2、汎用レジス
タ5には1、汎用レジスタ6には0、現浮動小数点レジ
スタウインドウポインタレジスタには0が格納されてい
るものとする。
Here, it is assumed that the vector A is stored in a continuous area starting from the main storage address ad1 prior to execution of the program shown in Table 3. That is, A
The main storage address of (1) is stored as ad1, and the main storage address of A (2) is stored as ad1 + 8. Similarly, it is assumed that the vector B is stored in a continuous area starting from the main storage address ad2. Also, the vector C
Is stored in a continuous area starting from the main storage address ad3. It is assumed that N-2 is stored in the general-purpose register 4, 1 is stored in the general-purpose register 5, 0 is stored in the general-purpose register 6, and 0 is stored in the current floating-point register window pointer register.

【0051】ここで、表3には、上記の記述にないAD
D命令が含まれているので、該命令の機能を以下に述べ
る。
Here, Table 3 shows ADs that are not described above.
Since the D instruction is included, the function of the instruction will be described below.

【0052】ADD GRj,GRm (機能)汎用レジスタjの値と汎用レジスタmの値を加
えて汎用レジスタjに格納する。
ADD GRj, GRm (Function) Adds the value of general-purpose register j and the value of general-purpose register m and stores the result in general-purpose register j.

【0053】[0053]

【表3】 [Table 3]

【0054】以下、表3について説明する。No.1の
FLDM命令では、現浮動小数点レジスタウィンドウポ
インタで論理浮動小数点レジスタ番号−物理浮動小数点
レジスタ番号変換が行われるので、A(1)が物理浮動
小数点レジスタ<0、12>に格納される。同様にN
o.2のFLDM命令でB(1)が物理浮動小数点レジ
スタ<0、13>に格納される。No.3のFLDPR
M命令では、「現浮動小数点レジスタウィンドウポイン
タ+1」の値で論理浮動小数点レジスタ番号−物理浮動
小数点レジスタ番号変換が行われるので、A(2)が物
理浮動小数点レジスタ<1、12>に格納される。同様
に、No.4のFLDPRM命令でB(2)が物理浮動
小数点レジスタ<1、13>に格納される。No.5の
FADD命令では、現浮動小数点レジスタウィンドウポ
インタで論理浮動小数点レジスタ番号−物理浮動小数点
レジスタ番号変換が行われるので、物理浮動小数点レジ
スタ<0、12>の値と物理浮動小数点レジスタ<0、
13>の値が加算されて物理浮動小数点レジスタ<0、
20>に格納される。No.1,No.2のFLDM命
令でA(1)、B(1)がそれぞれ物理浮動小数点レジ
スタ<0、12>と物理浮動小数点レジスタ<0、13
>に格納されているので、A(1)+B(1)が物理浮
動小数点レジスタ<0、20>に格納されることにな
る。No.5のADD命令とNo.6のCFRWPS命
令で現浮動小数点レジスタウィンドウポインタが+1さ
れ、1になる。No.8のFLDPRM命令からNo.
14のBCNT命令までが、ル−プを構成し、N−2回
くりかえし実行される。以下、ル−プ内での現浮動小数
点レジスタウィンドウポインタの値をwとする。第i−
1回目に実行されるル−プについて見る。汎用レジスタ
1、汎用レジスタ2の値からわかる通り、No.10の
FADD命令で加算されるデ−タはA(i)とB(i)
になり、No.8、No.9のFLDPRM命令で物理
浮動小数点レジスタ<w+1、12>と物理浮動小数点
レジスタ<w+1、13>にロ−ドされるのは、それぞ
れ、A(i+1)、B(i+1)になる。汎用レジスタ
3の値からわかる通り、No.11のFSTPOM命令
で物理浮動小数点レジスタ<w−1、20>の値がC
(i−1)の主記憶位置に格納される。No.12のA
DD命令とNo.13のCFRWPS命令で現浮動小数
点レジスタウィンドウポインタwが+1され、ル−プの
先頭に戻る。すなわち、1つのル−プの中では、1つ後
のル−プで加算されるデ−タA(i+1)、B(i+
1)をそれぞれ、物理浮動小数点レジスタ<w+1,1
2>、物理浮動小数点レジスタ<w+1,13>に格納
し、前のル−プでそれぞれ、物理浮動小数点レジスタ<
w,12>、物理浮動小数点レジスタ<w,13>に格
納されたA(i)とB(i)を加算して、物理浮動小数
点レジスタ<w,20>に格納し、前のル−プで物理浮
動小数点レジスタ<w−1,20>に格納されたA(i
−1)+B(i−1)をC(i−1)の主記憶位置に格
納する。
Table 3 will be described below. No. In the FLDM instruction of No. 1, the conversion of the logical floating-point register number to the physical floating-point register number is performed by the current floating-point register window pointer, so that A (1) is stored in the physical floating-point register <0, 12>. Similarly N
o. B (1) is stored in the physical floating point register <0, 13> by the second FLDM instruction. No. 3 FLDPR
In the M instruction, since the logical floating-point register number-physical floating-point register number conversion is performed using the value of "current floating-point register window pointer + 1", A (2) is stored in the physical floating-point register <1, 12>. You. Similarly, no. By the FLDPRM instruction of No. 4, B (2) is stored in the physical floating-point register <1, 13>. No. In the FADD instruction No. 5, the logical floating-point register number-physical floating-point register number conversion is performed by the current floating-point register window pointer, so that the values of the physical floating-point registers <0, 12> and the physical floating-point registers <0,
13> is added to the physical floating-point register <0,
20>. No. 1, No. A (1) and B (1) are respectively the physical floating point registers <0, 12> and the physical floating point registers <0, 13
>, A (1) + B (1) is stored in the physical floating point register <0, 20>. No. No. 5 ADD instruction and No. 5 The current CFP register window pointer is incremented by one by the CFWWPS instruction of No. 6 to be 1. No. No. 8 to No. 8 FLDPRM instruction.
Up to 14 BCNT instructions constitute a loop and are repeatedly executed N-2 times. Hereinafter, the value of the current floating point register window pointer in the loop is defined as w. I-th
Let's look at the first loop. As can be seen from the values of the general-purpose registers 1 and 2, The data added by the 10 FADD instructions are A (i) and B (i).
No. 8, no. The data loaded to the physical floating point registers <w + 1, 12> and <w + 1, 13> by the FLDPRM instruction No. 9 are A (i + 1) and B (i + 1), respectively. As can be seen from the value of general-purpose register 3, No. The value of the physical floating-point register <w-1, 20> is C
It is stored in the main storage location of (i-1). No. 12 A
DD instruction and No. The current floating-point register window pointer w is incremented by 1 by the 13 CFRWPS instruction, and the process returns to the top of the loop. That is, in one loop, data A (i + 1) and B (i +
1) respectively correspond to the physical floating-point registers <w + 1, 1
2> and stored in the physical floating-point registers <w + 1, 13>, and the physical loop-point registers <
w, 12> and A (i) and B (i) stored in the physical floating-point register <w, 13>, and the result is stored in the physical floating-point register <w, 20>. A (i) stored in the physical floating-point register <w−1, 20>
-1) + B (i-1) is stored in the main storage location of C (i-1).

【0055】ル−プを抜けた後のNo.15からNo.
19の命令は、未処理の要素の処理であり、No.15
のFADD命令でA(N)+B(N)を実行し、No.
16、、No.19のFSTPOM命令でそれぞれA
(N−1)+B(N−1)、A(N)+B(N)の主記
憶へのストアを行う。
No. after exiting the loop. No. 15 to No.
The instruction of No. 19 is processing of an unprocessed element. Fifteen
A (N) + B (N) is executed by the FADD instruction of
16, No. A in each of 19 FSTPOM instructions
(N-1) + B (N-1) and A (N) + B (N) are stored in the main memory.

【0056】ル−プ内の処理をからわかるように、N
o.8、No.9のFLDPRM命令で論理浮動小数点
レジスタ12、13を指定して、直後のNo.10のF
ADD命令で論理浮動小数点レジスタ12、13を使っ
ているが、アクセスしている物理浮動小数点レジスタは
異なる。また、No.10のFADD命令で論理浮動小
数点レジスタ20に加算結果を格納し、直後のFSTP
OM命令で論理浮動小数点レジスタ20を使っている
が、アクセスしている物理浮動小数点レジスタは異な
る。したがって、表1のプログラムで発生した、デ−タ
読みだし待ち、演算終了待ちで後続命令の実行が待たさ
れるという現象は起こらず、言いかえれば、デ−タ読み
だし、演算は次ル−プの実行までに完了すればよいわけ
で、プログラムが高速に実行される。また、プログラム
で指定している論理浮動小数点レジスタは3つだけであ
り、表2のプログラムのように浮動小数点レジスタを数
多く使う必要もない。
As can be seen from the processing in the loop, N
o. 8, no. The FLPRM instruction No. 9 specifies the logical floating-point registers 12 and 13 and the immediately following No. 9 10 F
Although the logical floating point registers 12 and 13 are used in the ADD instruction, the physical floating point registers accessed are different. In addition, No. The addition result is stored in the logical floating-point register 20 by the FADD instruction No. 10 and the FSTP
Although the logical floating point register 20 is used in the OM instruction, the physical floating point register accessed is different. Therefore, the phenomenon of waiting for the data reading and the completion of the operation and waiting for the execution of the subsequent instruction which occurred in the program of Table 1 does not occur. In other words, the data is read and the operation is executed in the next loop. That is, the program is executed at high speed. Further, since only three logical floating point registers are specified in the program, there is no need to use many floating point registers as in the program of Table 2.

【0057】ここで、表3のプログラムには、表1、表
2のプログラムにはない現浮動小数点レジスタウィンド
ウポインタの更新の処理があってオ−バヘッドになって
いる。たとえば、表1のプログラムのル−プが5命令で
構成されているのに対し、表3のプログラムのル−プは
7命令で構成されている。しかし、表1のプログラムに
あるデ−タ読みだし待ち、演算終了待ちで後続命令の実
行が待たされるオ−バヘッドの方がはるかに大きい。ま
た、表2のプログラムのようなル−プアンロ−リングの
手法も、プログラムで指定できるレジスタを使い果たし
てしまうと実現できないので、現浮動小数点レジスタウ
ィンドウポインタの更新のオ−バヘッドがあっても、本
発明の方式のほうがすぐれていると考えられる。
Here, the program of Table 3 has a process of updating the current floating point register window pointer which is not included in the programs of Tables 1 and 2, and thus has an overhead. For example, while the loop of the program in Table 1 is composed of five instructions, the loop of the program in Table 3 is composed of seven instructions. However, the overhead of waiting for reading of data and waiting for completion of operation in the program of Table 1 and waiting for execution of a subsequent instruction is much larger. Also, the loop unrolling method as shown in the program of Table 2 cannot be realized if the registers that can be specified by the program are exhausted. Therefore, even if there is overhead for updating the current floating-point register window pointer, this method is not applicable. It is believed that the inventive scheme is superior.

【0058】以上のように、本発明の方式によって、命
令列のル−プのくりかえしが主となる科学技術計算のベ
クトル計算では、ル−プごとに現浮動小数点レジスタウ
ィンドウポインタを変え、すなわち、使うウィンドウを
変え、i番目の要素の処理を、第i−1ル−プにおける
浮動小数点レジスタプリロ−ド命令によるオペランドベ
クトルの第i要素のロ−ド、第iル−プにおける演算、
第i+1ル−プにおける浮動小数点レジスタポストスト
ア命令による結果格納用ベクトルの第i要素への演算結
果のストアによって行なうことによって、1つのデ−タ
に対するロ−ド、演算、ストアの処理の命令列上での距
離が大きくなり、デ−タの読みだし時間、演算実行時間
の影響による性能低下を防ぐことができ、高速化ができ
る。
As described above, according to the method of the present invention, in the vector calculation of the scientific and technical calculation in which the loop of the instruction sequence is mainly performed, the current floating-point register window pointer is changed for each loop. The window to be used is changed, and the processing of the i-th element is performed by loading the i-th element of the operand vector by the floating-point register preload instruction in the (i-1) -th loop, performing the operation in the i-th loop,
An instruction sequence of load, operation, and store processing for one data is performed by storing the operation result in the i-th element of the result storage vector by the floating-point register post-store instruction in the (i + 1) -th loop. The above distance is increased, and the performance can be prevented from deteriorating due to the influence of the data reading time and the operation execution time, and the speed can be increased.

【0059】[0059]

【実施例】以下、本発明の一実施例を図を用いて説明す
る。図2に本実施例のデ−タ処理装置を示す。デ−タ処
理装置は、命令の発行および実行を行なう命令処理ユニ
ット10、命令処理ユニットで実行する命令やデ−タを
記憶する主記憶30、命令処理ユニットと主記憶との間
のデ−タのやりとりを制御する記憶制御ユニット20か
ら構成される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. FIG. 2 shows a data processing apparatus according to the present embodiment. The data processing device includes an instruction processing unit 10 for issuing and executing instructions, a main memory 30 for storing instructions and data to be executed by the instruction processing unit, and data between the instruction processing unit and the main memory. And a storage control unit 20 for controlling the exchange of data.

【0060】命令処理ユニット10は、実行する命令を
保持する命令レジスタ101、命令レジスタ101の内
容を解読し、命令実行の制御を行なう命令制御部10
2、汎用演算およびアドレス計算に必要なデ−タを保持
する汎用レジスタ群103、命令で指定される汎用演算
を実行する汎用演算器104、浮動小数点演算に必要な
デ−タを保持する物理浮動小数点レジスタ群105、命
令で指定される浮動小数点演算を実行する浮動小数点演
算器106、主記憶デ−タをアクセスするための主記憶
アドレスを計算するアドレス加算器107、記憶制御ユ
ニット20から読みだされた主記憶デ−タを保持するキ
ャッシュ108、キャッシュ108の検索結果に従い記
憶制御ユニット20から主記憶デ−タを読みだすなどの
制御を行なう主記憶アクセス制御部109、現浮動小数
点レジスタウィンドウポインタを格納する現浮動小数点
ウィンドウポインタレジスタ110、現浮動小数点レジ
スタウィンドウポインタが有効であることを示す現浮動
小数点ウィンドウポインタ有効レジスタ111、命令で
指定された論理浮動小数点レジスタ番号を物理浮動小数
点レジスタ番号に式(2)−(6)にしたがって変換す
る変換論理112から構成される。
The instruction processing unit 10 includes an instruction register 101 for holding an instruction to be executed, an instruction control unit 10 for decoding the contents of the instruction register 101 and controlling the instruction execution.
2. A general-purpose register group 103 for holding data required for general-purpose operation and address calculation, a general-purpose arithmetic unit 104 for executing general-purpose operation specified by an instruction, and a physical floating unit for holding data required for floating-point operation. A decimal point register group 105, a floating-point arithmetic unit 106 for executing a floating-point operation specified by an instruction, an address adder 107 for calculating a main storage address for accessing main storage data, and a read from the storage control unit 20. A cache 108 for holding the main memory data, a main memory access control unit 109 for performing control such as reading the main memory data from the storage control unit 20 in accordance with a search result of the cache 108, a current floating point register window pointer Floating point window pointer register 110 for storing the current floating point The current floating-point window pointer valid register 111 indicating that the counter is valid, and the conversion logic 112 for converting the logical floating-point register number specified by the instruction into the physical floating-point register number according to the equations (2) to (6). Be composed.

【0061】ここで、このデ−タ処理装置には、図3で
示すように、4つの命令が新たに追加される。それら
は、(a)現浮動小数点レジスタウィンドウポインタ変
更命令、(b)浮動小数点レジスタプリロ−ド命令、
(c)拡張浮動小数点レジスタプリロ−ド命令、(d)
浮動小数点レジスタポストストア命令である。現浮動小
数点レジスタウィンドウポインタ変更命令は現浮動小数
点レジスタウィンドウポインタを変更する命令である。
前記命令のうち(a),(b),(d)の命令ニモニッ
クと機能は「作用」の項に述べた。図3(a)中、命令
コ−ドは、現浮動小数点レジスタウィンドウポインタ変
更命令であることを示すものである。汎用レジスタ番号
は、セットする現浮動小数点レジスタウィンドウポイン
タの値が格納されている汎用レジスタを指定する。浮動
小数点レジスタプリロ−ド命令は、主記憶デ−タを、
(現浮動小数点レジスタウィンドウポインタ+1)のウ
ィンドウに属する浮動小数点レジスタに格納する命令で
ある。図3(b)中、命令コ−ドは、浮動小数点レジス
タプリロ−ド命令であることを示すものである。浮動小
数点レジスタ番号は主記憶デ−タが格納される論理浮動
小数点レジスタ番号(rとする)であり、対応する物理
浮動小数点レジスタ番号は、現浮動小数点レジスタウィ
ンドウポインタをwとして、<w+1,r>である。汎
用レジスタの値が、デ−タを主記憶から読みだすための
主記憶アドレスである。該読みだし実行後、汎用レジス
タに加える値がインクリメント値である。拡張浮動小数
点レジスタプリロ−ド命令は、主記憶デ−タを、(現浮
動小数点レジスタウィンドウポインタ+2)のウィンド
ウに属する浮動小数点レジスタに格納する命令である。
図3(c)中、命令コ−ドは、拡張浮動小数点レジスタ
プリロ−ド命令であることを示すものである。浮動小数
点レジスタ番号は主記憶デ−タが格納される論理浮動小
数点レジスタ番号(rとする)であり、対応する物理浮
動小数点レジスタ番号は、現浮動小数点レジスタウィン
ドウポインタをwとして、<w+2,r>である。汎用
レジスタの値が、デ−タを主記憶から読みだすための主
記憶アドレスである。該読みだし実行後、汎用レジスタ
に加える値がインクリメント値である。なお、拡張浮動
小数点レジスタプリロ−ド命令の機能は「作用」の項に
示していないが、拡張浮動小数点レジスタプリロ−ド命
令の単なる拡張で、上記説明から自明である。浮動小数
点レジスタポストストア命令は、(現浮動小数点レジス
タウィンドウポインタ−1)のウィンドウに属する浮動
小数点レジスタからデ−タを主記憶に格納する命令であ
る。図3(d)中、命令コ−ドは、浮動小数点レジスタ
ポストストア命令であることを示すものである。浮動小
数点レジスタ番号はデ−タが読みだされる論理浮動小数
点レジスタ番号(rとする)であり、対応する物理浮動
小数点レジスタ番号は、現浮動小数点レジスタウィンド
ウポインタをwとして、<w−1,r>である。汎用レ
ジスタの値がデ−タが格納される主記憶のアドレスであ
る。該読みだし実行後、汎用レジスタに加える値がイン
クリメント値である。 これらの命令の動作を図2に従
い、説明する。まず、現浮動小数点レジスタウィンドウ
ポインタ変更命令について説明する。命令レジスタ10
1に命令が取り込まれていると、命令は命令制御部10
2で解読され、現浮動小数点レジスタウィンドウポイン
タ変更命令であることが識別されると、命令中に指定さ
れた汎用レジスタが汎用レジスタ群103から読みださ
れ、該レジスタに格納されている値が現浮動小数点ウィ
ンドウポインタレジスタ110にセットされる。
Here, as shown in FIG. 3, four new instructions are added to the data processing device. They are: (a) a current floating point register window pointer change instruction, (b) a floating point register preload instruction,
(C) an extended floating-point register preload instruction, (d)
Floating point register post store instruction. The current floating point register window pointer change instruction is an instruction for changing the current floating point register window pointer.
The instruction mnemonics and functions of the instructions (a), (b), and (d) are described in the section of “action”. In FIG. 3A, the instruction code indicates that the instruction is a current floating-point register window pointer change instruction. The general-purpose register number designates a general-purpose register in which the value of the current floating-point register window pointer to be set is stored. The floating-point register preload instruction stores the main memory data.
This is an instruction to be stored in the floating-point register belonging to the window of (current floating-point register window pointer + 1). In FIG. 3B, the instruction code indicates that it is a floating-point register preload instruction. The floating-point register number is a logical floating-point register number (referred to as r) in which main memory data is stored, and the corresponding physical floating-point register number is <w + 1, r, where w is the current floating-point register window pointer. >. The value of the general-purpose register is a main memory address for reading data from the main memory. After the reading, the value added to the general-purpose register is the increment value. The extended floating-point register preload instruction is an instruction for storing main storage data in a floating-point register belonging to the window of (current floating-point register window pointer + 2).
In FIG. 3C, the instruction code indicates an extended floating-point register preload instruction. The floating-point register number is a logical floating-point register number (r) in which main storage data is stored, and the corresponding physical floating-point register number is <w + 2, r, where w is the current floating-point register window pointer. >. The value of the general-purpose register is a main memory address for reading data from the main memory. After the reading, the value added to the general-purpose register is the increment value. Although the function of the extended floating-point register preload instruction is not shown in the section of "Operation", it is merely an extension of the extended floating-point register preload instruction and is obvious from the above description. The floating-point register post-store instruction is an instruction to store data from the floating-point register belonging to the window of (current floating-point register window pointer-1) in the main memory. In FIG. 3D, the instruction code indicates that the instruction is a floating-point register post-store instruction. The floating-point register number is the logical floating-point register number (r) from which data is read, and the corresponding physical floating-point register number is <w−1, where w is the current floating-point register window pointer. r>. The value of the general-purpose register is the address of the main memory where the data is stored. After the reading, the value added to the general-purpose register is the increment value. The operation of these instructions will be described with reference to FIG. First, the current floating-point register window pointer change instruction will be described. Instruction register 10
When the instruction is loaded into the instruction control unit 10
When the instruction is decoded in step 2 and it is identified that the instruction is the current floating-point register window pointer change instruction, the general-purpose registers specified in the instruction are read out from the general-purpose register group 103, and the value stored in the register is read out. Set in floating point window pointer register 110.

【0062】次に浮動小数点レジスタプリロ−ド命令に
ついて説明する。命令レジスタ101に命令が取り込ま
れていると、命令は命令制御部102で解読され、浮動
小数点レジスタプリロ−ド命令であることが識別される
と、アドレス加算器107は、命令に指定された汎用レ
ジスタ番号で示される汎用レジスタの内容をデ−タを主
記憶から読みだすための主記憶アドレスとする。主記憶
アクセス制御部109は前記主記憶アドレスをもとにキ
ャッシュ108を検索し、キャッシュに所望のデ−タが
あれば、キャッシュからデ−タを転送し、なければ、記
憶制御ユニット20経由で、主記憶30からデ−タを転
送する。該転送デ−タは、浮動小数点レジスタ105に
格納されるが、格納される浮動小数点レジスタの物理浮
動小数点レジスタ番号は、変換回路112で以下のよう
にして求められる。命令中に指定された浮動小数点レジ
スタ番号は論理浮動小数点レジスタ番号(rとする)で
あり、現浮動小数点レジスタウィンドウポインタレジス
タ110の値をwとして、<w+1,r>が物理浮動小
数点レジスタ番号になる。該デ−タ転送動作開始後、汎
用演算器104で汎用レジスタの値にインクリメント値
を加える。
Next, the floating point register preload instruction will be described. When the instruction is loaded into the instruction register 101, the instruction is decoded by the instruction control unit 102. When the instruction is identified as a floating-point register preload instruction, the address adder 107 operates the general-purpose register designated by the instruction. The content of the general-purpose register indicated by the number is used as a main storage address for reading data from the main storage. The main memory access control unit 109 searches the cache 108 based on the main memory address. If desired data is found in the cache, the data is transferred from the cache. The data is transferred from the main memory 30. The transfer data is stored in the floating-point register 105. The physical floating-point register number of the stored floating-point register is obtained by the conversion circuit 112 as follows. The floating-point register number specified in the instruction is a logical floating-point register number (r), and the value of the current floating-point register window pointer register 110 is w, and <w + 1, r> is a physical floating-point register number. Become. After the start of the data transfer operation, the general-purpose arithmetic unit 104 adds an increment value to the value of the general-purpose register.

【0063】次に拡張浮動小数点レジスタプリロ−ド命
令について説明する。命令レジスタ101に命令が取り
込まれていると、命令は命令制御部102で解読され、
拡張浮動小数点レジスタプリロ−ド命令であることが識
別されると、アドレス加算器107は、命令に指定され
た汎用レジスタ番号で示される汎用レジスタの内容をデ
−タを主記憶から読みだすための主記憶アドレスとす
る。主記憶アクセス制御部109は前記主記憶アドレス
をもとにキャッシュ108を検索し、キャッシュに所望
のデ−タがあれば、キャッシュからデ−タを転送し、な
ければ、記憶制御ユニット20経由で、主記憶30から
デ−タを転送する。該転送デ−タは、浮動小数点レジス
タ105に格納されるが、格納されるレジスタの物理浮
動小数点レジスタ番号は、変換回路112で以下のよう
にして求められる。命令中に指定された浮動小数点レジ
スタ番号は論理浮動小数点レジスタ番号(rとする)で
あり、現浮動小数点レジスタウィンドウポインタレジス
タ110の値をwとして、<w+2,r>が物理浮動小
数点レジスタ番号になる。該デ−タ転送動作開始後、汎
用演算器104で汎用レジスタの値にインクリメント値
を加える。
Next, the extended floating point register preload instruction will be described. When the instruction is taken into the instruction register 101, the instruction is decoded by the instruction control unit 102,
When it is determined that the instruction is an extended floating-point register preload instruction, the address adder 107 reads the contents of the general-purpose register indicated by the general-purpose register number specified in the instruction from the main memory. The storage address. The main memory access control unit 109 searches the cache 108 based on the main memory address. If desired data is found in the cache, the data is transferred from the cache. The data is transferred from the main memory 30. The transfer data is stored in the floating point register 105. The physical floating point register number of the stored register is obtained by the conversion circuit 112 as follows. The floating-point register number specified in the instruction is a logical floating-point register number (r), and the value of the current floating-point register window pointer register 110 is w, and <w + 2, r> is a physical floating-point register number. Become. After the start of the data transfer operation, the general-purpose arithmetic unit 104 adds an increment value to the value of the general-purpose register.

【0064】次に浮動小数点レジスタポストストア命令
について説明する。命令レジスタ101に命令が取り込
まれていると、命令は命令制御部102で解読され、浮
動小数点レジスタポストストア命令であることが識別さ
れると、アドレス加算器107は、命令に指定された汎
用レジスタ番号で示される汎用レジスタの内容をデ−タ
を主記憶に格納するための主記憶アドレスとする。浮動
小数点レジスタ105からデ−タが読みだされるが、読
みだされるレジスタの物理浮動小数点レジスタ番号は、
変換回路112で以下のようにして求められる。命令中
に指定された浮動小数点レジスタ番号は論理浮動小数点
レジスタ番号(rとする)であり、現浮動小数点レジス
タウィンドウポインタレジスタ110の値をwとして、
<w−1,r>が物理浮動小数点レジスタ番号になる。
主記憶アクセス制御部109は前記主記憶アドレスをも
とにキャッシュ108を検索し、キャッシュ中に、主記
憶30の該主記憶アドレスに格納されているデ−タの写
しがあれば、該デ−タを前記読みだしデ−タに置き換
え、なければ、キャッシュは操作しない。さらに、主記
憶アクセス制御部109は記憶制御ユニット20経由
で、主記憶30の前記主記憶アドレスに前記読みだしデ
−タを格納する。該デ−タ転送動作開始後、汎用演算器
104で汎用レジスタの値にインクリメント値を加え
る。
Next, the floating-point register post-store instruction will be described. When the instruction is loaded into the instruction register 101, the instruction is decoded by the instruction control unit 102, and when the instruction is identified as a floating-point register post-store instruction, the address adder 107 causes the general-purpose register designated by the instruction to operate. The contents of the general-purpose register indicated by the number are used as a main memory address for storing data in the main memory. Data is read from the floating-point register 105. The physical floating-point register number of the register to be read is:
It is obtained by the conversion circuit 112 as follows. The floating point register number specified in the instruction is a logical floating point register number (r), and the value of the current floating point register window pointer register 110 is w,
<W-1, r> is the physical floating-point register number.
The main memory access control unit 109 searches the cache 108 based on the main memory address, and if there is a copy of the data stored in the main memory address of the main memory 30 in the cache, the data is retrieved. If the data is not replaced with the read data, the cache is not operated. Further, the main memory access control unit 109 stores the read data at the main memory address of the main memory 30 via the storage control unit 20. After the start of the data transfer operation, the general-purpose arithmetic unit 104 adds an increment value to the value of the general-purpose register.

【0065】また、一般の浮動小数点命令(演算命令、
ロ−ド命令、ストア命令)では、命令中に示された論理
浮動小数点レジスタ番号rは、現浮動小数点レジスタウ
ィンドウポインタレジスタ110の値をwとして、<
w,r>で示される物理浮動小数点レジスタ番号に、変
換論理112で変換され、該物理浮動小数点レジスタ番
号の示す浮動小数点レジスタが参照される。
Further, general floating-point instructions (operation instructions,
Load instruction, store instruction), the logical floating-point register number r indicated in the instruction is determined by setting the value of the current floating-point register window pointer register 110 to w.
The conversion logic 112 converts the data into a physical floating-point register number represented by w, r>, and refers to the floating-point register indicated by the physical floating-point register number.

【0066】また、現浮動小数点ウィンドウポインタ有
効レジスタ111の値が「1」であると、現浮動小数点
レジスタウィンドウポインタが有効である。すなわち、
変換回路112における論理レジスタ番号−物理レジス
タ番号変換が行なわれ、「0」であると、論理レジスタ
番号−物理レジスタ番号変換は行なわれず、命令で指定
された論理浮動小数点レジスタ番号がそのまま物理浮動
小数点レジスタ番号になり、該物理浮動小数点レジスタ
番号の示す物理浮動小数点レジスタが参照される。 こ
こで、現浮動小数点ウィンドウポインタ有効レジスタ1
11には、デ−タ処理システムの制御情報を格納する既
存のレジスタの空きビットを割当てれば良く、該レジス
タに値を格納する既存の命令を用いて値をセットするも
のとする。
When the value of the current floating point window pointer valid register 111 is “1”, the current floating point register window pointer is valid. That is,
Conversion of the logical register number to the physical register number in the conversion circuit 112 is performed. If the conversion result is "0", the conversion of the logical register number to the physical register number is not performed, and the logical floating point register number specified by the instruction remains unchanged. It becomes a register number, and refers to the physical floating point register indicated by the physical floating point register number. Here, the current floating-point window pointer valid register 1
An empty bit of an existing register for storing control information of the data processing system may be assigned to 11, and a value is set using an existing instruction for storing a value in the register.

【0067】以上のように現浮動小数点レジスタウィン
ドウポインタ変更命令、浮動小数点レジスタプリロ−ド
命令、拡張浮動小数点レジスタプリロ−ド命令、浮動小
数点レジスタポストストア命令、現浮動小数点ウィンド
ウポインタの制御下での一般の浮動小数点命令は動作す
る。
As described above, the current floating-point register window pointer change instruction, floating-point register preload instruction, extended floating-point register preload instruction, floating-point register post-store instruction, and general control under the control of the current floating-point window pointer Floating point instructions work.

【0068】上記の実施例により、表3のようなプログ
ラムが実現でき、ベクトル計算が高速化されることは、
「作用」の欄に述べた。
According to the above embodiment, a program as shown in Table 3 can be realized, and the speed of the vector calculation is increased.
It was mentioned in the column of "action".

【0069】したがって、本発明の方式によると、現浮
動小数点ウィンドウポインタを変えることにより、命令
中のある浮動小数点レジスタ番号は異なる物理浮動小数
点レジスタ番号に変換されるので、命令によってアドレ
ス可能なレジスタの数よりも多い物理レジスタをデ−タ
処理装置のア−キテクチャを変えることなくアクセス可
能にでき、表3に示すようなプログラムが実現でき、デ
−タ読みだし、レジスタのぶつかりによって命令実行が
待たされることによる性能低下を防ぐことができ、プロ
グラムの高速な実行が可能である。
Therefore, according to the method of the present invention, by changing the current floating-point window pointer, one floating-point register number in an instruction is converted to a different physical floating-point register number. More physical registers than the number can be accessed without changing the architecture of the data processing device, the program as shown in Table 3 can be realized, data is read out, and the execution of the instruction is delayed due to the collision of the registers. Performance can be prevented from being reduced, and high-speed execution of the program is possible.

【0070】特に、表3のプログラムからもわかる通
り、命令列のル−プのくりかえしが主となる科学技術計
算のベクトル計算では、ル−プごとに使うウィンドウを
変え、i番目の要素の処理を、第i−1ル−プにおける
浮動小数点プリロ−ド命令によるオペランドベクトルの
第i要素のロ−ド、第iル−プにおける演算、第i+1
ル−プにおける浮動小数点ポストストア命令による結果
格納用ベクトルの第i要素への演算結果のストアを行う
ことによって、1つのデ−タに対するロ−ド、演算、ス
トアの処理の命令列上での距離が大きくなり、デ−タの
読みだし時間、演算実行時間の影響による性能低下を防
ぐことができ、高速化ができる。
In particular, as can be seen from the program shown in Table 3, in the vector calculation of the scientific and technical calculation in which the loop of the instruction sequence is mainly performed, the window used for each loop is changed, and the processing of the i-th element is performed. Is the load of the i-th element of the operand vector by the floating-point preload instruction in the (i-1) -th loop, the operation in the i-th loop, the (i + 1) -th loop
By storing the operation result in the i-th element of the result storage vector by the floating-point post-store instruction in the loop, load, operation, and store processing of one data on the instruction sequence is performed. The distance is increased, and the performance can be prevented from deteriorating due to the influence of the data reading time and the operation execution time, and the speed can be increased.

【0071】ここで、表3にない拡張浮動小数点プリロ
−ド命令が実施例では導入されているが、これは、主記
憶からデ−タを読みだす時間が長いシステムにおいて
は、表3のプログラムのように、プリロ−ド命令を発行
したル−プの次のル−プでロ−ドされたデ−タを演算し
ようとしても、まだロ−ドが完了していなくて、演算命
令が待たされる場合が生じる恐れがある。したがって、
プリロ−ド命令を発行したル−プの次の次のル−プでロ
−ドされたデ−タを演算するようにプログラムできるよ
うに拡張浮動小数点プリロ−ド命令を考案した。
Here, an extended floating-point preload instruction not shown in Table 3 is introduced in the embodiment. This is because, in a system in which the time for reading data from the main memory is long, the program shown in Table 3 is used. When the data loaded in the next loop of the loop that issued the preload instruction is to be calculated, the load has not yet been completed, and the operation instruction waits. May occur. Therefore,
An extended floating point preload instruction has been devised so that it can be programmed to operate on data loaded in the next loop following the loop that issued the preload instruction.

【0072】[0072]

【発明の効果】本発明によれば、現浮動小数点ウィンド
ウポインタを変えることにより、命令中のある浮動小数
点レジスタ番号は異なる物理浮動小数点レジスタ番号に
変換されるので、命令によってアドレス可能なレジスタ
の数よりも多い物理レジスタをデ−タ処理装置のア−キ
テクチャを変えることなくアクセス可能にできるので、
デ−タ読みだし、レジスタのぶつかりによって命令実行
が待たされることによる性能低下を防ぐことができ、プ
ログラムの高速な実行が可能であるという効果がある。
According to the present invention, by changing the current floating point window pointer, one floating point register number in an instruction is converted to a different physical floating point register number, so that the number of registers addressable by the instruction Since more physical registers can be accessed without changing the architecture of the data processing device,
It is possible to prevent a decrease in performance due to waiting for instruction execution due to data reading and register collision, and the program can be executed at high speed.

【0073】特に、命令列のル−プのくりかえしが主と
なる科学技術計算のベクトル計算では、ル−プごとに使
うウィンドウを変え、i番目の要素の処理を、第i−1
ル−プにおける浮動小数点プリロ−ド命令によるオペラ
ンドベクトルの第i要素のロ−ド、第iル−プにおける
演算、第i+1ル−プにおける浮動小数点ポストストア
命令による結果格納用ベクトルの第i要素への演算結果
のストアを行うことによって、1つのデ−タに対するロ
−ド、演算、ストアの処理の命令列上での距離が大きく
なり、デ−タの読みだし時間、演算実行時間の影響によ
る性能低下を防ぐことができ、高速化ができる。
In particular, in the vector calculation of scientific and technical calculation in which the repetition of the loop of the instruction sequence is the main, the window used for each loop is changed, and the processing of the i-th element is performed by the i-1 th element.
Load the i-th element of the operand vector by the floating-point preload instruction in the loop, perform the operation in the i-th loop, and the i-th element of the result storage vector by the floating-point poststore instruction in the (i + 1) -th loop Storing the operation result in the instruction column increases the distance of the load, operation, and store processing for one data on the instruction sequence, and influences the data read time and the operation execution time. Performance can be prevented and the speed can be increased.

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

【図1】 本発明による論理浮動小数点レジスタ番号−
物理浮動小数点レジスタ番号変換の1実施例。
FIG. 1 shows a logical floating-point register number according to the present invention.
One embodiment of physical floating point register number conversion.

【図2】 本発明による図3で示す命令を実行するデー
タ処理装置の1実施例を示す構成図。
FIG. 2 is a configuration diagram showing one embodiment of a data processing device for executing the instruction shown in FIG. 3 according to the present invention.

【図3】 本発明による現浮動小数点レジスタウィンド
ウポインタ変更命令、浮動小数点レジスタプリロード命
令、拡張浮動小数点レジスタプリロード命令、浮動小数
点レジスタポイントストア命令の1実施例を示す図。
FIG. 3 is a diagram showing an embodiment of a current floating-point register window pointer change instruction, floating-point register preload instruction, extended floating-point register preload instruction, and floating-point register point store instruction according to the present invention.

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

10は命令処理ユニット、20は記憶制御ユニット、3
0は主記憶、101は命令レジスタ、102は命令制御
部、103は汎用レジスタ群、104は汎用演算器、1
05は物理浮動小数点レジスタ群、106は浮動小数点
演算器、107はアドレス加算器、108はキャッシ
ュ、109は主記憶アクセス制御部、110は現浮動小
数点ウィンドウポインタレジスタ、111は現浮動小数
点ウィンドウポインタ有効レジスタ、112は変換論理
10 is an instruction processing unit, 20 is a storage control unit, 3
0 is a main memory, 101 is an instruction register, 102 is an instruction control unit, 103 is a general-purpose register group, 104 is a general-purpose arithmetic unit, 1
05 is a physical floating-point register group, 106 is a floating-point arithmetic unit, 107 is an address adder, 108 is a cache, 109 is a main memory access control unit, 110 is a current floating-point window pointer register, and 111 is a current floating-point window pointer valid. Register, 112 is conversion logic

───────────────────────────────────────────────────── フロントページの続き (72)発明者 中澤 喜三郎 神奈川県相模原市相模台6丁目29番10号 (72)発明者 中村 宏 茨城県つくば市並木4丁目1043番 (72)発明者 位守 弘充 茨城県つくば市天久保2丁目23番6号 (72)発明者 和田 英夫 神奈川県秦野市堀山下1番地 株式会社 日立製作所 神奈川工場内 (56)参考文献 特開 昭62−98434(JP,A) 特開 平1−161477(JP,A) 特開 昭62−17873(JP,A) 特開 昭61−267134(JP,A) 特開 昭61−241870(JP,A) 特開 昭61−136131(JP,A) 特開 昭60−129838(JP,A) 特開 平5−233279(JP,A) Daniel Tabak著,大森健 児訳,RISCシステム,日本,海文堂 出版株式会社,1991年11月1日,初版, p.110−116 D.R.Miller,D.J.Qu ammen,Exploiting l arge register set s,Microprocessors and Microsystems,英 国,Butterworth−Hein emann Ltd.,1990年,第14 巻,第6号,p.333−340 (58)調査した分野(Int.Cl.7,DB名) G06F 17/16 G06F 9/30 - 9/355 G06F 9/38 G06F 9/40 - 9/42 G06F 9/46 - 9/54 ──────────────────────────────────────────────────の Continuing on the front page (72) Inventor Kisaburo Nakazawa 6-29-10 Sagamidai, Sagamihara City, Kanagawa Prefecture (72) Inventor Hiroshi Nakamura 4-1043, Namiki, Tsukuba City, Ibaraki Prefecture (72) Inventor Hiromitsu Hiromitsu Ibaraki 2-23-6, Akubo, Tsukuba, Japan (72) Inventor Hideo Wada 1 Horiyamashita, Hadano-shi, Kanagawa Prefecture Hitachi, Ltd. Kanagawa Plant (56) References JP-A-62-98434 Japanese Patent Laid-Open No. 1-161477 (JP, A) Japanese Patent Application Laid-Open No. Sho 62-17873 (JP, A) Japanese Patent Application Laid-Open No. 61-267134 (JP, A) Japanese Patent Application Laid-Open No. 61-241870 (JP, A) Japanese Patent Application Laid-Open No. 61-136131 (Japanese) JP, A) JP-A-60-129838 (JP, A) JP-A-5-233279 (JP, A) Daniel Tabak, translated by Kenji Omori, RISC system, Japan, Kaibundo Publishing Co., Ltd., November 1991 Day, first edition, p. 110-116 D.C. R. Miller, D.M. J. Quammen, Exploiting large register sets, Microprocessors and Microsystems, Butterworth-Hein emann Ltd., UK. , 1990, Vol. 14, No. 6, p. 333-340 (58) Fields investigated (Int.Cl. 7 , DB name) G06F 17/16 G06F 9/30-9/355 G06F 9/38 G06F 9/40-9/42 G06F 9/46-9 / 54

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】命令やデ−タを保持する主記憶と、該主記
憶内に保持された主記憶デ−タを用いて命令を実行し、
その命令には、該主記憶から主記憶デ−タを読みだし、
命令中で番号づけされたレジスタに格納するロ−ド命令
、命令中で番号づけされたレジスタから該主記憶にデ
−タを格納するストア命令、演算を行い、演算結果を
命令中で番号づけされたレジスタに格納する演算命令
を含む命令処理ユニットから成るデ−タ処理装置におい
て、命令によってアドレス可能なレジスタの数より多い
物理レジスタと呼ばれるレジスタ、複数のビットから
成るウィンドウポインタレジスタと呼ばれるレジスタ
、1ビットのウィンドウポインタ有効レジスタと呼ば
れるレジスタ、該ウィンドウポインタ有効レジスタの
値が1のときに、命令中のレジスタ番号を物理レジスタ
番号へ変換し、かつ前記ウィンドウポインタレジスタの
値によって該変換のパタ−ンを変える変換回路とを備
前記命令処理ユニットが実行する命令には、前記ウ
ィンドウポインタレジスタの値を変更するためのウィン
ドウポインタ変更命令、命令中のレジスタ番号を前記
ウィンドウポインタレジスタの値から決定されるが該ウ
ィンドウポインタレジスタの値とは異なる値を前記ウィ
ンドウポインタレジスタの値とみなして前記変換回路で
物理レジスタ番号へ変換し、該物理レジスタ番号の示す
物理レジスタに主記憶デ−タを格納するレジスタプリロ
−ド命令、命令中のレジスタ番号を前記ウィンドウポ
インタレジスタの値から決定されるが該ウィンドウポイ
ンタレジスタの値とは異なる値を前記ウィンドウポイン
タレジスタの値とみなして前記変換回路で物理レジスタ
番号へ変換し、該物理レジスタ番号の示す物理レジスタ
から読み出したデ−タを主記憶に格納するレジスタポス
トストア命令とを含み前記命令処理ユニットは、前記
レジスタプリロ−ド命令、前記レジスタポストストア命
令を除く前記ロ−ド命令、前記ストア命令、及び前記演
算命令の実行時には、命令中のレジスタ番号を前記ウィ
ンドウポインタレジスタの値で前記変換回路で物理レジ
スタ番号へ変換し、該物理レジスタ番号の示す物理レジ
スタを参照し、前記レジスタプリロ−ド命令の実行時に
は、命令中のレジスタ番号を前記ウィンドウポインタレ
ジスタの値から決定されるが該ウィンドウポインタレジ
スタの値とは異なる値を前記ウィンドウポインタレジス
タの値とみなして前記 変換回路で物理レジスタ番号へ変
換し、該物理レジスタ番号の示す物理レジスタに主記憶
データを格納し、前記レジスタポストストア命令の実行
時には、命令中のレジスタ番号を前記ウィンドウポイン
タレジスタの値から決定されるが該ウィンドウポインタ
レジスタの値とは異なる値を前記ウィンドウポインタレ
ジスタの値とみなして前記変換回路で物理レジスタ番号
へ変換し、該物理レジスタ番号の示す物理レジスタから
読み出したデータを主記憶に格納することを特徴とする
デ−タ処理装置。
An instruction is executed using a main memory for holding instructions and data, and main memory data held in the main memory.
The instruction includes reading main memory data from the main memory,
Load instruction stored in the register numbered in the instruction
If, de to the main storage from the numbered by the register in the instruction - and the store instruction for storing data, performs calculation, and operation instructions to be stored in the numbered by the register computation results in an instruction <br/> de consisting instruction processing unit comprising - in data processing apparatus, a register called more physical registers than the number of addressable registers by the instruction, from a plurality of bits
Register called window pointer register
When, the transformation and register called 1-bit window pointer valid register, when the value of the window pointer valid register is 1, and converts the register number in the instruction to a physical register number, and the value of the window pointer register Bei and a conversion circuit to change the emissions - of pattern
The instructions executed by the instruction processing unit include a window pointer change instruction for changing the value of the window pointer register, and a register number in the instruction determined from the value of the window pointer register. A register preload instruction which regards a value different from the register value as a value of the window pointer register, converts the value into a physical register number by the conversion circuit, and stores main memory data in the physical register indicated by the physical register number ; The register number in the instruction is determined from the value of the window pointer register, but a value different from the value of the window pointer register is regarded as the value of the window pointer register, and the conversion circuit converts the value into a physical register number. de read from the physical register indicated by the physical register number And a register poststore instruction for storing in the main memory data, said instruction processing unit, said register preload - de instruction, the B excluding the register poststore instruction - de instruction, the store instruction, and execution of the operation instruction In some cases, the register number in the instruction is converted into a physical register number by the conversion circuit using the value of the window pointer register, and the physical register indicated by the physical register number is referred to when executing the register preload instruction.
Indicates the register number in the instruction
Determined from the register value, the window pointer register
The window pointer register to a value different from the
Data is converted to a physical register number by the conversion circuit.
The main memory is stored in the physical register indicated by the physical register number.
Storing data and executing the register post-store instruction
Sometimes, the register number in the instruction is
Window pointer
A value different from the value of the register
Assuming the value of the register
To the physical register indicated by the physical register number.
A data processing device for storing read data in a main memory .
【請求項2】前記命令処理ユニットは、前記レジスタプ
リロ−ド命令の実行時には、前記ウィンドウポインタレ
ジスタの値に任意の整数値を加えた値を用いることを特
徴とする請求項1記載のデ−タ処理装置。
2. The data processing apparatus according to claim 1 , wherein said instruction processing unit uses a value obtained by adding an arbitrary integer to the value of said window pointer register when executing said register preload instruction. Data processing device.
【請求項3】前記命令処理ユニットは、前記レジスタプ
リロ−ド命令の実行時には、主記憶デ−タの読みだしに
おいて、主記憶の内容の一部を一時的に保持しておく緩
衝記憶装置であるキャッシュに該主記憶デ−タが登録さ
れていなかった場合は、該キャッシュの内容は変更
、前記レジスタポストストア命令の実行時には、主記
憶へのデ−タ書き込みにおいて、該当する主記憶アドレ
スの主記憶デ−タが該キャッシュに登録されていなかっ
た場合は、該キャッシュの内容は変更しないことを特徴
とする請求項1記載のデ−タ処理装置。
3. The buffer memory device according to claim 1 , wherein said instruction processing unit temporarily stores a part of the contents of said main memory when reading said main memory data when said register preload instruction is executed. If the main memory data is not registered in a certain cache, the contents of the cache are changed .
On the other hand , when the register post-store instruction is executed , if the main memory data of the corresponding main memory address is not registered in the cache in writing the data to the main memory, the content of the cache is changed. 2. The data processing apparatus according to claim 1, wherein the data processing is not changed.
【請求項4】命令中のレジスタ番号から前記物理レジス
タ番号の変換において、該ウィンドウポインタレジスタ
の値によって命令中のレジスタ番号から変換されうる前
記物理レジスタ番号の集合と、該ウィンドウポインタレ
ジスタの値と1異なる値によって命令中のレジスタ番号
から変換されうる前記物理レジスタ番号の集合が1つま
たは複数個のオ−バラップレジスタ番号と呼ばれる同一
の値を含むことと、命令中のレジスタ番号のうち1つま
たは複数個は、前記ウィンドウポインタレジスタの値に
よらずグロ−バルレジスタ番号と呼ばれる同一の前記物
理レジスタ番号に変換されることと、上記オ−バラップ
レジスタ番号と上記グロ−バルレジスタ番号以外の前記
物理レジスタ番号は、前記ウィンドウポインタレジスタ
の1つの値のみによって変換される結果であることを特
徴とする請求項1記載のデ−タ処理装置。
4. A set of said physical register numbers which can be converted from a register number in an instruction by a value of said window pointer register in converting said register number in said instruction to said physical register number; The set of physical register numbers that can be converted from the register number in the instruction by one different value includes one or more identical register numbers called the overlap register number; One or a plurality of the register numbers are converted into the same physical register number called a global register number irrespective of the value of the window pointer register, and other than the overlapping register number and the global register number The physical register number of only one value of the window pointer register De according to claim 1, characterized in that the the outcome converted I - data processing device.
【請求項5】前記命令中で番号づけされたレジスタと前
記物理レジスタが、浮動小数点レジスタと呼ばれる、浮
動小数点数を格納する専用レジスタであることを特徴と
する請求項1記載のデ−タ処理装置。
5. The data processing according to claim 1, wherein the registers numbered in the instruction and the physical registers are dedicated registers for storing floating-point numbers, called floating-point registers. apparatus.
【請求項6】前記命令処理ユニットは、前記ウィンドウ
ポインタ変更命令の実行時には、前記ウィンドウポイン
タレジスタに値をセットするか、または、前記ウィンド
ウポインタレジスタの値を増減するかいずれかの動作を
行なうことを特徴とする請求項1記載のデ−タ処理装
置。
6. The instruction processing unit performs an operation of setting a value in the window pointer register or increasing or decreasing the value of the window pointer register when executing the window pointer change instruction. The data processing apparatus according to claim 1, wherein:
JP30447691A 1991-11-20 1991-11-20 Pseudo vector processor Expired - Lifetime JP3317985B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP30447691A JP3317985B2 (en) 1991-11-20 1991-11-20 Pseudo vector processor
US07/977,298 US5438669A (en) 1991-11-20 1992-11-16 Data processor with improved loop handling utilizing improved register allocation
EP92119710A EP0543366B1 (en) 1991-11-20 1992-11-19 Data processing method and apparatus
DE69229771T DE69229771T2 (en) 1991-11-20 1992-11-19 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30447691A JP3317985B2 (en) 1991-11-20 1991-11-20 Pseudo vector processor

Publications (2)

Publication Number Publication Date
JPH07114534A JPH07114534A (en) 1995-05-02
JP3317985B2 true JP3317985B2 (en) 2002-08-26

Family

ID=17933482

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30447691A Expired - Lifetime JP3317985B2 (en) 1991-11-20 1991-11-20 Pseudo vector processor

Country Status (1)

Country Link
JP (1) JP3317985B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190073593A (en) * 2016-01-20 2019-06-26 캠브리콘 테크놀로지스 코퍼레이션 리미티드 Vector computing device
US11734383B2 (en) 2016-01-20 2023-08-22 Cambricon Technologies Corporation Limited Vector and matrix computing device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1011352A (en) * 1996-06-19 1998-01-16 Hitachi Ltd Data processor and its register address converting method
US10564965B2 (en) * 2017-03-03 2020-02-18 International Business Machines Corporation Compare string processing via inline decode-based micro-operations expansion

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
D.R.Miller,D.J.Quammen,Exploiting large register sets,Microprocessors and Microsystems,英国,Butterworth−Heinemann Ltd.,1990年,第14巻,第6号,p.333−340
Daniel Tabak著,大森健児訳,RISCシステム,日本,海文堂出版株式会社,1991年11月1日,初版,p.110−116

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190073593A (en) * 2016-01-20 2019-06-26 캠브리콘 테크놀로지스 코퍼레이션 리미티드 Vector computing device
KR20200058562A (en) * 2016-01-20 2020-05-27 캠브리콘 테크놀로지스 코퍼레이션 리미티드 Vector computing device
KR102185287B1 (en) 2016-01-20 2020-12-01 캠브리콘 테크놀로지스 코퍼레이션 리미티드 Vector computing device
KR102304216B1 (en) 2016-01-20 2021-09-23 캠브리콘 테크놀로지스 코퍼레이션 리미티드 Vector computing device
US11734383B2 (en) 2016-01-20 2023-08-22 Cambricon Technologies Corporation Limited Vector and matrix computing device

Also Published As

Publication number Publication date
JPH07114534A (en) 1995-05-02

Similar Documents

Publication Publication Date Title
JP2725546B2 (en) Data processing device
US4745547A (en) Vector processing
US4740893A (en) Method for reducing the time for switching between programs
EP0543366B1 (en) Data processing method and apparatus
JPH0778734B2 (en) Subsystem and method for changing program status word
JPH0855028A (en) Microprocessor
JPH063584B2 (en) Information processing equipment
EP0201833A2 (en) Instruction processor
JP3317985B2 (en) Pseudo vector processor
JPH0410108B2 (en)
US5729723A (en) Data processing unit
EP0550289A2 (en) A mechanism to detect stores into the instruction stream
JPS6116335A (en) Information processor
JPH0512751B2 (en)
JP2875426B2 (en) Pseudo vector processor
JP3097981B2 (en) Data processing device
WO1998011484A1 (en) Command processor having history memory
JPS60129839A (en) Information processor
JP2783285B2 (en) Information processing device
JPH0326862B2 (en)
JP2000029865A (en) Data processor
JP2812610B2 (en) Pipeline control method
JPH08263289A (en) Pipeline computer for plural instruction flows
JPH06162067A (en) Device and method for controlling vector instruction
JPH06301537A (en) Instruction fetching circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080614

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080614

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090614

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100614

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100614

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110614

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110614

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120614

Year of fee payment: 10

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120614

Year of fee payment: 10