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
JPH0644272B2 - Arithmetic unit - Google Patents
[go: Go Back, main page]

JPH0644272B2 - Arithmetic unit - Google Patents

Arithmetic unit

Info

Publication number
JPH0644272B2
JPH0644272B2 JP22376486A JP22376486A JPH0644272B2 JP H0644272 B2 JPH0644272 B2 JP H0644272B2 JP 22376486 A JP22376486 A JP 22376486A JP 22376486 A JP22376486 A JP 22376486A JP H0644272 B2 JPH0644272 B2 JP H0644272B2
Authority
JP
Japan
Prior art keywords
operand
output
sum
signal line
circuit
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
JP22376486A
Other languages
Japanese (ja)
Other versions
JPS6379172A (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 JP22376486A priority Critical patent/JPH0644272B2/en
Publication of JPS6379172A publication Critical patent/JPS6379172A/en
Publication of JPH0644272B2 publication Critical patent/JPH0644272B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/50Adding; Subtracting
    • G06F7/505Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
    • G06F7/509Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination for multiple operands, e.g. digital integrators
    • G06F7/5095Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination for multiple operands, e.g. digital integrators word-serial, i.e. with an accumulator-register

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (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 equipped with a summation calculator.

従来の技術 第2図を参照して、従来の総和演算の一例を説明する。
ベクトルレジスタ10に格納されている第1オペランドA
i及び第2オペランドBi(ただしi=1、2、3、…
…、n)の総和を演算する命令が命令レジスタ30に格納
されると、この命令は、デコード回路40でデコードされ
て信号線204 に論理“1”を出力し、総和演算制御回路
20に対して演算動作開始を指示する。この総和演算制御
回路20は、ベクトルレジスタ10に対してn要素データの
読出しを指示し、それによって第1オペランドAi及び
第2オペランドBiが信号線200 及び信号線201 に各々
読出される。加算回路50ではこの第1オペランドAiと
第2オペランドBiの加算演算を行なってその加算結果
を信号線203 に出力し、この演算結果で1〜n/2 要素を
ベクトルレジスタ1の第1オペランド部に、n+1/2 〜n
要素を第2オペランド部にそれぞれ格納する。
2. Description of the Related Art An example of a conventional summation operation will be described with reference to FIG.
First operand A stored in vector register 10
i and the second operand Bi (where i = 1, 2, 3, ...
.., n) is stored in the instruction register 30, the instruction is decoded by the decode circuit 40 and outputs a logic "1" to the signal line 204, and the sum calculation control circuit.
Instruct 20 to start calculation operation. The summing arithmetic control circuit 20 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 1 and the signal line 201 2, respectively. In the adder circuit 50, the addition operation of the first operand Ai and the second operand Bi is performed, and the addition result is output to the signal line 203. From the operation result, 1 to n / 2 elements are added to the first operand section of the vector register 1. , N + 1/2 to n
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 same operation as the first time is performed for the n / 2 elements stored in the second time operation, and the total is obtained by performing the operation up to (Log2n + 1) times.

発明が解決しようとする問題点 しかしながら、上述したように、従来の総和演算機能を
備えた演算装置では、常に第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 operated. When the sum is calculated, the other operand must be cleared to 0 in advance, so there is a drawback that the performance is reduced.

本発明は従来の上記実情に鑑みてなされたものであり、
従って本発明の目的は、従来の技術に内在する上記欠点
を解消することを可能とした新規な演算装置を提供する
ことにある。
The present invention has been made in view of the above-mentioned conventional circumstances,
Therefore, it is an object of the present invention to provide a novel arithmetic unit capable of solving the above-mentioned drawbacks inherent in the conventional technique.

問題点を解決する為の手段 上記目的を達成する為に、本発明に係る演算装置は、第
1オペランドと第2オペランドとを格納するベクトルレ
ジスタと、1回目の演算動作であるか2回目以上の演算
動作であるかを一方のオペランドのみの総和演算時に識
別する演算回数識別回路と、第1オペランドかまたは論
理“0”を選択する第1の選択回路と、第2オペランド
かまたは論理“0”を選択する第2の選択回路と、前記
第1及び第2の2つの選択回路に接続された加算回路と
を備えて構成され、第1オペランドまたは第2オペラン
ドのみの総和演算を行なうことを可能としている。
Means for Solving the Problems In order to achieve the above-mentioned object, an arithmetic unit according to the present invention has a vector register for storing a first operand and a second operand and a first arithmetic operation or a second or more arithmetic operation. Operation number identification circuit for identifying whether the operation operation is the operation operation of only one operand at the time of the sum operation, the first selection circuit for selecting the first operand or the logic "0", and the second operand or the logic "0". And a summing circuit connected to the first and second selection circuits, and performs a summation operation only on the first operand or the second operand. It is possible.

実施例 以下、本発明をその好ましい一実施例について図面を参
照しながら具体的に説明する。
EXAMPLES Hereinafter, the present invention will be specifically described with reference to the drawings with respect to a preferred example 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と、第1オペランド
か論理“0”かを選択する選択回路6と、第2オペラン
ドか論理“0”かを選択する選択回路7と、演算回数識
別回路8とから構成されている。
Referring to FIG. 1, an embodiment of the present invention is such that a vector register 1, a summation operation control circuit 2 and an instruction register 3 are provided.
A decoding circuit 4, an addition circuit 5, a selection circuit 6 for selecting a first operand or a logic "0", a selection circuit 7 for selecting a second operand or a logic "0", and an operation number identification circuit. 8 and.

ベクトルレジスタ1に格納されている第1オペランドA
i及び第2オペランドBi(ただしi=1、2、3、…
…、n)の総和を演算する命令が命令レジスタ3に格納
されると、その命令は、デコード回路4で、デコードさ
れて信号線104 に論理“1”を出力し、総和演算制御回
路2に対して演算開始を指示する。
First operand A stored in vector register 1
i and the second operand Bi (where i = 1, 2, 3, ...
,, n), an instruction for calculating the sum total is stored in the instruction register 3, the instruction is decoded by the decode circuit 4, and a logic "1" is output to the signal line 104, and the sum calculation control circuit 2 is output. Instruct the start of calculation.

ここで、総和演算動作はベクトルレジスタ1から読出し
たデータを加算回路5で加算し、加算結果のn/2 要素を
ベクトルレジスタ1の第1オペランド部に、残りn/2 要
素を第2オペランド部に格納するまでを1回の演算動作
とし、これを(Log2n+1)回実行することで行われる。
ただし、演算要素数は1回演算動作を実行するごとに半
分に減ずる。
Here, in the sum operation, the data read from the vector register 1 is added by the adder circuit 5, 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 part. The calculation operation is performed once until it is stored in, and this operation is performed (Log2n + 1) times.
However, the number of calculation elements is reduced to half each time a calculation operation is executed.

さて、総和演算開始指示を総和演算制御回路2で受信す
ると、総和演算制御回路2は、信号線103 に論理“1”
を出力し、ベクトルレジスタ1に格納された第1オペラ
ンドAi及び第2オペランドBiを読出し、信号線100
及び101 に各々出力する。信号線100 は選択回路6に接
続され、信号線101 は選択回路7に接続されている。演
算回数識別回路8の出力信号線110 及び111 は2オペラ
ンドの総和演算なので常に論理“0”であり、選択回路
6及び7は信号線100 及び101 を各々選択し、信号線11
2 及び113 にそれぞれ出力する。信号線112 及び113 は
加算回路5の第1入力及び第2入力にそれぞれ接続され
ていて、両者の加算演算が行なわれ信号線102 にその加
算結果を出力する。要素1〜n/2 の演算結果が信号線10
2 に出力されているときに、総和演算制御回路2は、出
力信号線105 を論理“1”とし、ベクトルレジスタ1の
第1オペランド部にその演算結果を格納し、要素n+1/2
〜nの演算結果が信号線102 に出力されているときに
は、総和演算制御回路2の出力信号線104 を論理“1”
とし、その演算結果をベクトルレジスタ1の第2オペラ
ンド部に格納する。
When the summation calculation control circuit 2 receives the summation calculation start instruction, the summation calculation control circuit 2 causes the signal line 103 to have a logic “1”.
Is output, the first operand Ai and the second operand Bi stored in the vector register 1 are read, and the signal line 100
And 101 respectively. The signal line 100 is connected to the selection circuit 6, and the signal line 101 is connected to the selection circuit 7. The output signal lines 110 and 111 of the number-of-operations identification circuit 8 are always logic "0" because they are the sum operation of two operands, and the selection circuits 6 and 7 select the signal lines 100 and 101, respectively, and the signal line 11
Output to 2 and 113 respectively. The signal lines 112 and 113 are respectively connected to the first input and the second input of the adder circuit 5, the addition operation of both is performed, and the addition result is output to the signal line 102. The calculation result of elements 1 to n / 2 is the signal line 10.
When it is output to 2, the summation operation control circuit 2 sets the output signal line 105 to logic "1", stores the operation result in the first operand part of the vector register 1, and outputs the element n + 1/2.
When the calculation results of ~ n are output to the signal line 102, the output signal line 104 of the summation calculation control circuit 2 is set to logic "1".
Then, the calculation result is stored in the second operand part of the vector register 1.

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

次に、ベクトルレジスタ1に格納されている第1オペラ
ンドAiのみの総和を演算する命令が命令レジスタ3に
格納されると、その命令は、デコード回数4でデコード
されて信号線107 に論理“1”を出力し、総和演算制御
回路2に対して演算開始を指示するとともに、演算回数
識別回路8に対し演算回数を識別するよう指示する。
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 3, the instruction is decoded with the decoding count of 4 and a logical "1" is output to the signal line 107. Is output to instruct the total operation control circuit 2 to start the operation and to instruct the operation number identifying circuit 8 to identify the number of operations.

1回目の演算動作において、演算回数識別回路8の出力
信号線110 には演算回数に関係なく常に論理“0”を出
力し、出力信号線111 には演算動作回数を示す総和演算
制御回路2の出力信号線109 の内容が1回目の演算動作
を示している間だけ論理“1”を出力する。選択回路6
では信号線110 が論理“0”なので信号線100 を選択し
て、ベクトルレジスタ1から読出された第1オペランド
Aiを信号線112 に出力する。選択回路7では信号線11
1 が論理“1”なので論理“0”を選択して信号線113
に出力する。この2データの加算を加算回路5で行なっ
た結果で要素1〜n/2 はベクトルレジスタ1の第1オペ
ランド部に、要素n+1/2 〜nは第2オペランド部にそれ
ぞれ格納される。
In the first arithmetic operation, a logical "0" is always output to the output signal line 110 of the arithmetic operation number identifying circuit 8 regardless of the number of arithmetic operations, and the output signal line 111 of the total arithmetic operation control circuit 2 indicating the number of arithmetic operation operations. The logic "1" is output only while the content of the output signal line 109 indicates the first arithmetic operation. Selection circuit 6
Since the signal line 110 is logic "0", the signal line 100 is selected and the first operand Ai read from the vector register 1 is output to the signal line 112. In the selection circuit 7, the signal line 11
Since 1 is a logical "1", select a logical "0" to select the signal line 113
Output to. Elements 1 to n / 2 are stored in the first operand portion of the vector register 1 and elements n + 1/2 to n are stored in the second operand portion of the vector register 1 as a result of the addition of the two data in the adder circuit 5.

2回目の演算動作では、演算回数識別回路8の出力信号
線110 及び111 はともに論理“0”であり、選択回路6
ではベクトルレジスタ1の第1オペランドを信号線112
に、選択回路7では第2オペランドを信号線113 に各々
出力し、1回目と同じ動作が行われる。
In the second operation, the output signal lines 110 and 111 of the operation number identification circuit 8 are both logic "0", and the selection circuit 6
Now, let the first operand of the vector register 1 be the signal line 112.
In addition, the selection circuit 7 outputs the second operand to the signal line 113, and the same operation as the first operation is performed.

以下(Log2n+1)回目まで2回目と同じ演算動作を行っ
て第1オペランドAiのみの総和を求める。
The same arithmetic operation as the second time is performed until the (Log2n + 1) th time, and the sum of only the first operand Ai is obtained.

ベクトルレジスタ1の第2オペランドBiのみの総和を
演算するときには、1回目の演算動作で、演算回数識別
回路8の出力信号線110 に論理“1”を、信号線111 に
論理“0”を各々出力し、選択回数6では論理“0”を
信号線112 に、選択回路7では信号線101 を選択し、第
2オペランドBiを信号線113 に出力するところが異な
るのみで、他は第1オペランドAiの総和演算と同様の
動作を行うことにより第2オペランドBiのみの総和を
求める。
When the sum of only the second operand Bi of the vector register 1 is calculated, the output signal line 110 of the operation number identification circuit 8 is set to logic "1" and the signal line 111 is set to logic "0" in the first calculation operation. The difference is that, when the number of selection times is 6, the logic "0" is selected to the signal line 112, the selection circuit 7 selects the signal line 101, and the second operand Bi is output to the signal line 113, and the other is the first operand Ai. By performing the same operation as the total sum calculation of the above, the total sum of only the second operand Bi is obtained.

発明の効果 以上の説明から明らかなように、本発明の演算装置によ
れば、総和演算命令でベクトルレジスタの第1オペラン
ドのみまたは第2オペランドのみの総和を演算すること
ができ、予め総和演算しない方のオペランドを0クリア
しておく必要がないので、従来の演算装置に比べて性能
を向上できるという効果が得られる。
EFFECTS OF THE INVENTION As is apparent from the above description, according to the arithmetic unit of the present invention, it is possible to calculate the sum of only the first operand or only the second operand of the vector register with the sum calculation instruction, and not perform the sum calculation in advance. Since it is not necessary to clear the other operand to 0, it is possible to obtain 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……選択回路、8……演算回数
識別回路、
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 ... Sum operation control circuit, 3
... instruction register, 4 ... decoding circuit, 5 ... addition circuit, 6 ..., selection circuit 7 ... selection circuit, 8 ... number of operations identification circuit,

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】総和演算機能を備えた演算装置において、 第1オペランドと第2オペランドとを格納するベクトル
レジスタと、 該ベクトルレジスタから読出したn要素データの加算演
算を行なった結果のうち、n/2 要素をベクトルレジスタ
の第1オペランド部に、残りn/2 要素を第2オペランド
部に格納するまでを1回の演算動作としたときに、1回
目の演算動作であるか2回目以上の演算動作であるかを
一方のオペランドのみの総和演算時に識別する演算回数
識別回路と、 第1オペランドかまたは論理“0”を選択する第1の選
択回路と、 第2オペランドかまたは論理“0”を選択する第2の選
択回路と、前記第1、第2の選択回路に接続された加算
演算回路と、 を有し、 第1オペランドのみの総和を求めるときには第2オペラ
ンドに接続された前記第2の選択回路の出力に論理
“0”を、また第2オペランドのみの総和を求めるとき
には第1オペランドに接続された前記第1の選択回路の
出力に論理“0”を、前記1回目の演算動作時にのみ出
力することにより、第1オペランドまたは第2オペラン
ドのみの総和演算を行うようにした、 ことを特徴とする演算装置。
1. An arithmetic unit having a sum operation function, wherein n is one of a vector register for storing a first operand and a second operand, and n as a result of an addition operation of n element data read from the vector register. When the / 2 element is stored in the first operand section of the vector register and the remaining n / 2 elements are stored in the second operand section as one operation operation, it is the first operation operation or the second operation or more. An operation number identification circuit for identifying whether it is an operation operation at the time of the sum operation of only one operand, a first selection circuit for selecting the first operand or the logic "0", and a second operand or the logic "0" A second selection circuit for selecting, and an addition operation circuit connected to the first and second selection circuits, and connected to the second operand when the sum of only the first operand is calculated. A logical "0" is output to the output of the second selection circuit, and a logical "0" is output to the output of the first selection circuit connected to the first operand when the sum of only the second operand is calculated. An arithmetic unit characterized in that a summation operation of only the first operand or the second operand is performed by outputting only during the first arithmetic operation.
JP22376486A 1986-09-24 1986-09-24 Arithmetic unit Expired - Lifetime JPH0644272B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22376486A JPH0644272B2 (en) 1986-09-24 1986-09-24 Arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22376486A JPH0644272B2 (en) 1986-09-24 1986-09-24 Arithmetic unit

Publications (2)

Publication Number Publication Date
JPS6379172A JPS6379172A (en) 1988-04-09
JPH0644272B2 true JPH0644272B2 (en) 1994-06-08

Family

ID=16803339

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22376486A Expired - Lifetime JPH0644272B2 (en) 1986-09-24 1986-09-24 Arithmetic unit

Country Status (1)

Country Link
JP (1) JPH0644272B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2512778B2 (en) * 1988-01-13 1996-07-03 株式会社日立製作所 Arithmetic processing method

Also Published As

Publication number Publication date
JPS6379172A (en) 1988-04-09

Similar Documents

Publication Publication Date Title
US6286024B1 (en) High-efficiency multiplier and multiplying method
GB1575213A (en) Floating point data processor
JPH0353652B2 (en)
JPS6351287B2 (en)
JPH1165839A (en) Instruction control mechanism of processor
US6026486A (en) General purpose processor having a variable bitwidth
EP1634163B1 (en) Result partitioning within simd data processing systems
JPH0644272B2 (en) Arithmetic unit
JPS638971A (en) Polynomial vector arithmetic and control unit
US20010049781A1 (en) Computer with high-speed context switching
JPH0644271B2 (en) Arithmetic unit
JPH05274143A (en) Composite condition processing system
US6757813B1 (en) Processor
US20050256996A1 (en) Register read circuit using the remainders of modulo of a register number by the number of register sub-banks
US7010562B2 (en) Arithmetic circuit
JP2696903B2 (en) Numerical calculator
JP3088956B2 (en) Arithmetic unit
JPH09265396A (en) Data processor
JPH01307831A (en) Information processor
JPH0218732B2 (en)
JPH01161436A (en) Arithmetic processor
JPH0619705A (en) Pipeline control method
JPH0517574B2 (en)
JPS6120131A (en) Processing unit
JPS5843040A (en) Processor of microprogram control information