Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0644271B2 - Arithmetic unit - Google Patents
[go: Go Back, main page]

JPH0644271B2 - Arithmetic unit - Google Patents

Arithmetic unit

Info

Publication number
JPH0644271B2
JPH0644271B2 JP20485386A JP20485386A JPH0644271B2 JP H0644271 B2 JPH0644271 B2 JP H0644271B2 JP 20485386 A JP20485386 A JP 20485386A JP 20485386 A JP20485386 A JP 20485386A JP H0644271 B2 JPH0644271 B2 JP H0644271B2
Authority
JP
Japan
Prior art keywords
operand
circuit
signal line
vector register
output
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
JP20485386A
Other languages
Japanese (ja)
Other versions
JPS6361363A (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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP20485386A priority Critical patent/JPH0644271B2/en
Publication of JPS6361363A publication Critical patent/JPS6361363A/en
Publication of JPH0644271B2 publication Critical patent/JPH0644271B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/80Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
    • G06F15/8053Vector processors

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Complex Calculations (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、演算装置、特に、総和演算機能を備えたベク
トル演算装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic device, and more particularly to a vector arithmetic device having a sum operation function.

従来の技術 第2図を参照して、従来の総和演算の一例を説明する。
ベクトルレジスタ10に格納されている第1オペランドAi
及び第2オペランドBi(ただしi=1,2,3,…,
n)の総和を演算する命令が命令レジスタ40に格納され
ると、この命令は、デコード回路50でデコードされて信
号線204に論理“1”を出力し、総和演算制御回路60に
対して演算動作開始を指示する。この総和演算制御回路
60は、ベクトルレジスタ10に対してn要素データの読出
しを指示し、それによつて第1オペランドAi及び第2オ
ペランドBiが信号線200及び信号線201にそれぞれ読出さ
れる。加算回路30ではこの第1オペランドAiと第2オペ
ランドBiの加算演算を行なつて信号線203にその加算結
果を出力し、この演算結果で1〜n/2要素をベクトルレ
ジスタ10の第1オペランド部に、 要素を第2オペランド部にそれぞれ格納する。
2. Description of the Related Art An example of a conventional summation operation will be described with reference to FIG.
First operand Ai stored in vector register 10
And the second operand Bi (where i = 1, 2, 3, ...,
When the instruction for calculating the sum of n) is stored in the instruction register 40, the instruction is decoded by the decode circuit 50 and outputs a logic “1” to the signal line 204, and the instruction is calculated for the sum calculation control circuit 60. Instruct to start operation. This sum operation control circuit
60 instructs the vector register 10 to read n-element data, whereby the first operand Ai and the second operand Bi are read to the signal line 200 and the signal line 201, respectively. The adder circuit 30 performs an addition operation on the first operand Ai and the second operand Bi and outputs the addition result to the signal line 203. The operation result indicates 1 to n / 2 elements as the first operand of the vector register 10. To the department Each element is stored in the second operand part.

以上を1回目の演算動作とし、2回目の演算動作では1
回目の演算で格納されたn/2要素について1回目と同様
の演算を行ない、(log2n+1)回目まで演算を行なうこ
とによつて総和を求めている。
The above is the first calculation operation, and the second calculation operation is 1
The n / 2 elements stored in the second calculation are calculated in the same manner as in the first calculation, and the total is obtained by performing the calculation up to (log 2 n + 1) th calculation.

発明が解決しようとする問題点 しかしながら、上述したように、従来の総和演算機能を
備えた演算装置では、常に第1オペランドと第2オペラ
ンドの総和演算を行なつており、どちらか一方のオペラ
ンドのみの総和を演算するときには、他方のオペランド
を予め0クリアしておかなければならないので、性能が
低下するという欠点があつた。
DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention However, as described above, in the conventional arithmetic unit having the sum operation function, the sum operation of the first operand and the second operand is always performed, and only one of the operands is executed. When the sum of the two is calculated, the other operand must be cleared to 0 in advance, so there is a drawback in that the performance decreases.

本発明は従来の技術に内在する上記欠点を解消する為に
なされたものであり、従つて本発明の目的は、高性能の
総和演算機能を備えた新規な演算装置を提供することに
ある。
The present invention has been made to solve the above-mentioned drawbacks inherent in the prior art, and therefore an object of the present invention is to provide a novel arithmetic unit having a high-performance summing arithmetic function.

問題点を解決するための手段 上記目的を達成する為に、本発明に係る演算装置は第1
オペランドと第2オペランドとを格納するベクトルレジ
スタと、1回目の演算動作であるか2回目以上の演算動
作であるかを一方のオペランドのみの総和演算時に識別
する演算回数識別回路と、一方のオペランドのみの総和
演算時に総和演算を行なわない方のオペランドかまたは
論理“0”を選択する選択回路と、一方のオペランドの
みの総和演算時に総和演算を行なう方のオペランドと前
記選択回路の出力とを入力とする加算回路とを備えて構
成され、しかして、一方のオペランドのみの総和演算を
行なうことを可能としている。
Means for Solving the Problems In order to achieve the above object, the arithmetic unit according to the present invention is
A vector register for storing an operand and a second operand, an operation number identifying circuit for identifying whether it is the first operation operation or the second or more operation operation in the sum operation of only one operand, and one operand The selection circuit for selecting the operand or the logic "0" that does not perform the summation operation when only the summation operation is performed, and the operand that performs the summation operation for the summation operation for only one operand and the output of the selection circuit And an adder circuit that makes it possible to perform a summation operation on only one of the operands.

実施例 以下本発明をその好ましい一実施例について図面を参照
しながら具体的に説明する。
Embodiment Hereinafter, the present invention will be specifically described with reference to the drawings with respect to a preferred embodiment thereof.

第1図は本発明の一実施例を示すブロツク構成図であ
り、本発明による演算装置の総和演算を説明するための
図である。
FIG. 1 is a block diagram showing an embodiment of the present invention, and is a diagram for explaining a summation operation of an arithmetic unit according to the present invention.

第1図を参照するに、本発明の一実施例は、ベクトルレ
ジスタ1、選択回路2、加算回路3、命令レジスタ4、
デコード回路5、総和演算制御回路6、および演算回数
識別回路7から構成されている。
With reference to FIG. 1, an embodiment of the present invention includes a vector register 1, a selection circuit 2, an addition circuit 3, an instruction register 4,
It is composed of a decoding circuit 5, a sum calculation control circuit 6, and a calculation number identification circuit 7.

今、ベクトルレジスタ1に格納されている第1オペラン
ドAi及び第2オペランドBi(ただしi=1,2,3,
…,n)の総和を演算する命令が命令レジスタ4に格納
されると、この命令は、デコード回路5でデコードされ
て信号線104に論理“1”を出力し、総和演算制御回路
6に対して演算動作開始を指示する。ここで、総和演算
動作は、ベクトルレジスタ1から読出したデータを加算
回路3で加算し、加算結果のn/2要素をベクトルレジス
タ1の第1オペランド部に、残りn/2要素を第2オペラ
ンド部に格納するまでを1回の演算動作とし、これを
(log2n+1)回実行することで行なわれている。ただ
し、演算要素数は、1回演算動作を実行するごとに半分
に減る。
Now, the first operand Ai and the second operand Bi stored in the vector register 1 (where i = 1, 2, 3,
,, n), when an instruction for calculating the sum total is stored in the instruction register 4, the instruction is decoded by the decode circuit 5 and outputs a logic “1” to the signal line 104, and the sum calculation control circuit 6 is notified. To instruct calculation start. Here, in the sum calculation operation, the data read from the vector register 1 is added by the adder circuit 3, the n / 2 element of the addition result is in the first operand part of the vector register 1, and the remaining n / 2 elements are in the second operand. The operation is performed once until it is stored in the copy, and this is performed by executing (log 2 n + 1) times. However, the number of calculation elements is reduced to half each time a calculation operation is executed.

さて、総和演算制御回路6は、総和演算開始指示を受信
すると、信号線107に論理“1”を出力し、ベクトルレ
ジスタ1に格納された第1オペランドAi及び第2オペラ
ンドBiを読出し、各々、信号線100及び信号線101に出力
する。信号線100は加算回路3の第1入力に接続され、
信号線101は選択回路2に接続されている。演算回数識
別回路7は、デコード回路5の出力信号線105が論理
“0”で、第1オペランドAiのみの総和演算でないので
その出力信号線110に論理“0”を出力し、選択回路2
の出力信号線102に信号線101の内容を出力させる。信号
線102は加算回路3の第2入力に接続されており、信号
線100の内容との加算が行なわれ、結果を信号線103に出
力する。
Upon receipt of the summing calculation start instruction, the summing calculation control circuit 6 outputs a logic “1” to the signal line 107, reads the first operand Ai and the second operand Bi stored in the vector register 1, and Output to the signal line 100 and the signal line 101. The signal line 100 is connected to the first input of the adder circuit 3,
The signal line 101 is connected to the selection circuit 2. Since the output signal line 105 of the decoding circuit 5 has a logic "0" and the summation operation of only the first operand Ai is not performed, the operation number identification circuit 7 outputs a logic "0" to the output signal line 110, and the selection circuit 2
The contents of the signal line 101 are output to the output signal line 102 of. The signal line 102 is connected to the second input of the adder circuit 3, is added with the contents of the signal line 100, and outputs the result to the signal line 103.

要素1〜n/2の加算結果が信号線103に出力されていると
きに、総和演算制御回路6の出力信号線108を論理
“1”とし、ベクトルレジスタ1の第1オペランド部に
格納し、要素 の加算結果が信号線103に出力されているときに、総和
演算制御回路6の出力信号線109を論理“1”とし、ベ
クトルレジスタ1の第2オペランド部に格納する。
When the addition result of the elements 1 to n / 2 is output to the signal line 103, the output signal line 108 of the sum operation control circuit 6 is set to logic “1” and stored in the first operand part of the vector register 1, element When the addition result of is output to the signal line 103, the output signal line 109 of the sum operation control circuit 6 is set to logic “1” and stored in the second operand portion of the vector register 1.

以上、ベクトルレジスタ1からn要素のデータを読出し
て加算結果をベクトルレジスタ1の第1オペランド部と
第2オペランド部にn/2要素ずつ格納するまでを1回目
の演算動作とすると、2回目は同様のことをベクトルレ
ジスタ1に格納されたn/2要素について行う。以下同様
のことを(log2n+1)回実行することにより総和を求め
る。
As described above, when the operation of reading the n-element data from the vector register 1 and storing the addition result in the first operand part and the second operand part of the vector register 1 by n / 2 elements is the first operation, the second operation is The same thing is done for the n / 2 elements stored in the vector register 1. Then, the same operation is performed (log 2 n + 1) times to obtain the sum.

次に、ベクトルレジスタ1に格納されている第1オペラ
ンドAiのみの総和を演算する命令が命令レジスタ4に格
納されると、その命令は、デコード回路5でデコードさ
れて信号線105に論理“1”を出力し、総和演算制御回
路6に対して演算開始を指示するとともに、演算回数識
別回路7に対して演算回数を識別するよう指示する。
Next, when an instruction for calculating the sum of only the first operand Ai stored in the vector register 1 is stored in the instruction register 4, the instruction is decoded by the decoding circuit 5 and a logical "1" is given to the signal line 105. Is output to instruct the total operation control circuit 6 to start the operation and to instruct the operation number identifying circuit 7 to identify the operation number.

1回目の演算動作において、ベクトルレジスタ1から読
出された第1オペランドAiが信号線100に出力されて加
算回路3の第1入力に入力される。演算回数識別回路7
では、デコード回路5の出力信号線105が論理“1”の
ときに、演算回数を示す総和演算制御回路6の出力信号
線106の内容が1回目の演算動作を示しているときにの
みその出力信号線110に論理“1”を出力する。選択回
路2では信号線110が論理“1”のときには論理“0”
を選択して信号線102に出力し、加算回路3の第2入力
に入力される。この加算回路3での加算結果で要素1〜
n/2はベクトルレジスタ1の第1オペランド部に、要素 は第2オペランド部にそれぞれ格納される。
In the first arithmetic operation, the first operand Ai read from the vector register 1 is output to the signal line 100 and input to the first input of the adder circuit 3. Calculation number identification circuit 7
Then, when the output signal line 105 of the decoding circuit 5 is a logic "1", the output is output only when the content of the output signal line 106 of the summation operation control circuit 6 indicating the number of operations indicates the first operation operation. The logic “1” is output to the signal line 110. In the selection circuit 2, when the signal line 110 is logic "1", it is logic "0".
Is output to the signal line 102 and input to the second input of the adder circuit 3. The elements 1 to
n / 2 is an element in the first operand part of vector register 1. Are stored in the second operand part, respectively.

2回目の演算動作においては、加算回路3の第1入力に
は1回目同様のベクトルレジスタ1の第1オペランドAi
が入力されるが、第2入力には、演算回数識別回路7の
出力信号110に論理“0”が出力されており、選択回路
2は信号線101の内容を選択して信号線102に出力し、そ
れを入力していて、つまりはベクトルレジスタ1の第2
オペランドBiが入力される。ここでベクトルレジスタ1
から読出すデータの要素数はn/2(i=1,2,…,n/
2)である。加算回路3での加算結果で要素1〜n/4はベ
クトルレジスタ1の第1オペランドAiに、要素 は第2オペランドBiにそれぞれ格納される。
In the second arithmetic operation, the first input of the adder circuit 3 is applied to the first operand Ai of the vector register 1 similar to the first time.
However, the logic “0” is output to the output signal 110 of the operation number identification circuit 7, and the selection circuit 2 selects the content of the signal line 101 and outputs it to the signal line 102. And input it, that is, the second of vector register 1
Operand Bi is input. Vector register 1 here
The number of data elements read from is n / 2 (i = 1, 2, ..., N /
2). Elements 1 to n / 4 are added to the first operand Ai of the vector register 1 by the addition result of the adder circuit 3, and Are respectively stored in the second operand Bi.

以下、要素数は異るが2回目と同じ演算動作を(log2n+
1)回目まで行われる。
Hereafter, the same calculation operation as the second time (log 2 n +
1) Up to the first time.

このようにして第1オペランドAiのみの総和演算が行な
われる。
In this way, the summation operation of only the first operand Ai is performed.

発明の効果 以上の説明から明らかなように、本発明の演算装置によ
れば、総和演算命令でベクトルレジスタの1つのオペラ
ンドのみの総和を容易に演算することができ、予め他方
のオペランドを0クリアしておく必要がないので、従来
の演算装置に比べて性能を向上できるという効果が得ら
れる。
EFFECTS OF THE INVENTION As is apparent from the above description, according to the arithmetic unit of the present invention, the summation of only one operand of the vector register can be easily calculated by the summation operation instruction, and the other operand is cleared to 0 in advance. Since it is not necessary to keep it in advance, there is an effect that the performance can be improved as compared with the conventional arithmetic unit.

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

第1図は本発明の一実施例を示すブロツク構成図、第2
図は従来の演算装置に用いられている総和演算を行なう
回路を示すブロツク図である。 1……ベクトルレジスタ、2……選択回路、3……加算
回路、4……命令レジスタ、5……デコード回路、6…
…総和演算制御回路、7……演算回数識別回路
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG.
The figure is a block diagram showing a circuit for performing a summation operation used in a conventional arithmetic unit. 1 ... Vector register, 2 ... Selection circuit, 3 ... Addition circuit, 4 ... Instruction register, 5 ... Decode circuit, 6 ...
… Sum operation control circuit, 7 …… Calculation frequency identification circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】総和演算機能を備えた演算装置において、
第1オペランドと第2オペランドとを格納するベクトル
レジスタと、該ベクトルレジスタから読出したn要素デ
ータの加算演算を行なつた結果のうちn/2要素をベクト
ルレジスタの第1オペランド部に残りn/2要素を第2オ
ペランド部に格納するまでを1回の演算動作としたとき
に1回目の演算動作であるか2回目以上の演算動作であ
るかを一方のオペランドのみの総和演算時に識別する演
算回数識別回路と、一方のオペランドのみの総和演算時
に総和演算を行なわない方のオペランドかまたは論理
“0”を選択する選択回路と、一方のオペランドのみの
総和演算時に総和演算を行なう方のオペランドと前記選
択回路の出力とを入力とする加算演算回路とを有し、前
記1回目の演算動作のときにのみ前記選択回路の出力を
論理“0”とすることにより一方のオペランドのみの総
和演算を行うようにしたことを特徴とする演算装置。
1. An arithmetic unit having a sum operation function,
A vector register for storing the first operand and the second operand, and n / 2 elements of the result of the addition operation of the n element data read from the vector register are left in the first operand section of the vector register n / An operation that identifies whether it is a first operation operation or a second or more operation operation when storing two elements in the second operand part is one operation operation when a sum operation of only one operand is performed. A number-of-times identification circuit, a selection circuit that selects a logical "0" or one of the operands that does not perform summation operation when summing only one operand, and a operand that performs summation operation when summing only one operand An addition arithmetic circuit having the output of the selection circuit as an input, and setting the output of the selection circuit to a logical "0" only in the first arithmetic operation. Ri that it has to perform summation of only one of the operands computing device according to claim.
JP20485386A 1986-08-30 1986-08-30 Arithmetic unit Expired - Lifetime JPH0644271B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20485386A JPH0644271B2 (en) 1986-08-30 1986-08-30 Arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20485386A JPH0644271B2 (en) 1986-08-30 1986-08-30 Arithmetic unit

Publications (2)

Publication Number Publication Date
JPS6361363A JPS6361363A (en) 1988-03-17
JPH0644271B2 true JPH0644271B2 (en) 1994-06-08

Family

ID=16497479

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20485386A Expired - Lifetime JPH0644271B2 (en) 1986-08-30 1986-08-30 Arithmetic unit

Country Status (1)

Country Link
JP (1) JPH0644271B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9141386B2 (en) * 2010-09-24 2015-09-22 Intel Corporation Vector logical reduction operation implemented using swizzling on a semiconductor chip

Also Published As

Publication number Publication date
JPS6361363A (en) 1988-03-17

Similar Documents

Publication Publication Date Title
JPH0786826B2 (en) Integer division circuit
EP0240606A2 (en) Pipe-line processing system and microprocessor using the system
JPH0644271B2 (en) Arithmetic unit
JP2553200B2 (en) Information processing device
JPS638971A (en) Polynomial vector arithmetic and control unit
JPH0644272B2 (en) Arithmetic unit
JPS6217773B2 (en)
JPS6057435A (en) Microprocessor
JPH0222413B2 (en)
US6757813B1 (en) Processor
JP3524240B2 (en) Parallel instruction processing unit
JPH0588893A (en) Parallel operation processor
JPH0424732B2 (en)
JP2851192B2 (en) Addition / subtraction processing method with carry in parallel processing unit
JPS6244657B2 (en)
JPH0218732B2 (en)
JPS61177536A (en) Arithmetic device
JPH04316127A (en) Information processor
JPS6155731A (en) Processor provided with condition code discriminating function
JPS6278630A (en) information processing equipment
JPS61255437A (en) Information processor
JPS5971544A (en) Multiplication processor
JPS6024642A (en) Microprogram controlling system
JPS6019238A (en) Decimal arithmetic device
JPS6151242A (en) Instruction decoding circuit