JPH05181642A - Arithmetic unit - Google Patents

Arithmetic unit

Info

Publication number
JPH05181642A
JPH05181642A JP34570391A JP34570391A JPH05181642A JP H05181642 A JPH05181642 A JP H05181642A JP 34570391 A JP34570391 A JP 34570391A JP 34570391 A JP34570391 A JP 34570391A JP H05181642 A JPH05181642 A JP H05181642A
Authority
JP
Japan
Prior art keywords
data
value
output
mask
selector
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.)
Granted
Application number
JP34570391A
Other languages
Japanese (ja)
Other versions
JP3310316B2 (en
Inventor
Koichi Hatta
浩一 八田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP34570391A priority Critical patent/JP3310316B2/en
Publication of JPH05181642A publication Critical patent/JPH05181642A/en
Priority to US08/586,483 priority patent/US5822557A/en
Application granted granted Critical
Publication of JP3310316B2 publication Critical patent/JP3310316B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30021Compare instructions, e.g. Greater-Than, Equal-To, MINMAX
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30036Instructions to perform operations on packed data, e.g. vector, tile or matrix operations

Abstract

PURPOSE:To provide an arithmetic unit for simplifying a circuit configuration of a detecting part of the maximum value and the minimum value of vector data with a mask. CONSTITUTION:This arithmetic unit calculates the maximum value or the minimum value in prescribed data, based on prescribed data, and mask data to the prescribed data. This unit is constituted by providing a selecting means 20 for selecting and outputting one of fixed value data set by which of the maximum value or the minimum value is calculated, and the prescribed data, based on the mask data, a deciding means 21 for outputting its output value as it is when an output value from the selecting means 20 is a first element, and deciding which of its output value and an output value outputted previously is larger or smaller, based on which of the maximum value or the minimum value is calculated, when the output value from the selecting means 20 is other element than a first element.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、演算装置に係り、詳し
くは、例えば、スーパーコンピュータ、スーパーEWS
(Engineering Work Station)等の分野に用いて好適
な、ベクトル処理を高速に行う演算装置に関する。近
年、科学計算等においては、例えば、FORTRAN言
語でのDOループ、すなわち、 DO 10 I=0,100 C(I)=A(I)*B(I) F(I)=D(I)+E(I) 10 CONTINUE で表されるような繰り返し演算のように、特定のループ
処理内に大量の演算が集中している場合が多い。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic unit, and more specifically, for example, a super computer, a super EWS
The present invention relates to an arithmetic device suitable for use in fields such as (Engineering Work Station) and for performing vector processing at high speed. In recent years, in scientific calculation, for example, a DO loop in the FORTRAN language, that is, DO 10 I = 0,100 C (I) = A (I) * B (I) F (I) = D (I) + E ( I) In many cases, a large number of operations are concentrated in a specific loop process, such as repeated operations represented by 10 CONTINUE.

【0002】一定の演算を複数のデータに対して繰り返
すような処理をベクトル処理といい、大量の科学計算を
実行する、例えば、ベクトルプロセッサ等の演算装置で
は、ベクトル処理を高速に実行することが要求される。
A process of repeating a certain operation on a plurality of data is called a vector process, and a large amount of scientific calculation is executed. For example, in an arithmetic unit such as a vector processor, the vector process can be executed at high speed. Required.

【0003】[0003]

【従来の技術】従来のこの種の演算装置としては、例え
ば、図5に示すようなベクトルプロセッサがある。図
中、1はベクトルプロセッサ、2は命令制御部、3は命
令レジスタ、4は乗算器、5は加算器、6はベクトルレ
ジスタ、7はマスクレジスタ、8は入出力制御部であ
り、9はCPU(Central Processing Unit )、10は
主記憶である。
2. Description of the Related Art A conventional processor of this type is, for example, a vector processor as shown in FIG. In the figure, 1 is a vector processor, 2 is an instruction control unit, 3 is an instruction register, 4 is a multiplier, 5 is an adder, 6 is a vector register, 7 is a mask register, 8 is an input / output control unit, and 9 is A CPU (Central Processing Unit) 10 is a main memory.

【0004】以上の構成において、ベクトル処理の動作
概要を説明する。まず、CPU9により主記憶10上の
所定の命令列と演算データとがベクトルプロセッサ1に
転送され、命令列は命令レジスタ3に、また演算データ
はベクトルレジスタ6に格納される。次に、CPU9に
よってベクトルプロセッサ1が起動されると、ベクトル
プロセッサ1内の命令制御部2により命令レジスタ3か
ら1つずつ命令が取り出され、実行に必要な制御信号が
出力される。
An outline of the operation of vector processing in the above configuration will be described. First, the CPU 9 transfers a predetermined instruction sequence and operation data on the main memory 10 to the vector processor 1, the instruction sequence is stored in the instruction register 3, and the operation data is stored in the vector register 6. Next, when the CPU 9 activates the vector processor 1, the instruction control unit 2 in the vector processor 1 fetches instructions one by one from the instruction register 3 and outputs the control signals necessary for execution.

【0005】各ユニットではそれらの制御信号に従って
データの入出力や演算が実行され、例えば、乗算を実行
する場合、ベクトルレジスタ6から演算データが読み出
されて乗算器4に転送され、乗算器4によってそれらの
演算データに対する乗算が行われる。乗算器4による乗
算結果はベクトルレジスタ6に転送され、ベクトルレジ
スタ6に乗算結果が格納される。なお、前述の制御信号
にはこれらの動作に必要な読み出し・書き込みタイミン
グ等も含まれている。
In each unit, data input / output and calculation are executed according to these control signals. For example, when executing multiplication, the calculation data is read from the vector register 6 and transferred to the multiplier 4 and then the multiplier 4 The multiplication is performed on the calculated data. The multiplication result by the multiplier 4 is transferred to the vector register 6, and the multiplication result is stored in the vector register 6. The above-mentioned control signal also includes read / write timings necessary for these operations.

【0006】最後に、命令レジスタ3から取り出された
命令が終了命令であったら動作が中断され、ベクトルプ
ロセッサ1は待機状態となる。ここで、マスク付き演算
について考えてみる。マスク付き演算とは、ベクトルデ
ータの各要素に対してマスクデータというものを設定
し、マスクされているデータに関しては演算を行わない
というものである。
Finally, if the instruction fetched from the instruction register 3 is an end instruction, the operation is interrupted and the vector processor 1 enters a standby state. Let us now consider masked arithmetic. The operation with mask means that mask data is set for each element of the vector data and the operation is not performed on the masked data.

【0007】すなわち、A(I)は被演算数、B(I)
は演算数、M(I)はマスクデータとすると、図6に示
すように、A(I)×B(I)の値をC(I)に格納す
る際、M(I)の値を参照し、“M(I)=1”のとき
にはC(I)に結果を書き込まないようにするというの
がマスク付き演算である。通常、乗算や加算等の演算を
行う場合、演算データ、被演算データ、マスクデータが
処理サイクル毎にベクトルレジスタ6及びマスクレジス
タ7から乗算器4及び加算器5よりなる演算器に転送さ
れ、演算器によって演算された結果が処理サイクル毎に
ベクトルレジスタ6に転送されるというパイプライン処
理がなされている。
That is, A (I) is the operand and B (I)
Is the number of operations, and M (I) is mask data, as shown in FIG. 6, when the value of A (I) × B (I) is stored in C (I), the value of M (I) is referred to. However, when "M (I) = 1", the masked operation is such that the result is not written in C (I). Normally, when performing operations such as multiplication and addition, the operation data, the operated data, and the mask data are transferred from the vector register 6 and the mask register 7 to the operation unit including the multiplier 4 and the adder 5 for each processing cycle, and the operation is performed. Pipeline processing is performed in which the result calculated by the container is transferred to the vector register 6 every processing cycle.

【0008】ここで、ベクトル処理で扱うデータはイン
デックス、すなわち、前述の式中におけるIの値により
区別された関連のあるデータであることから、その中の
最大値、または最小値を算出することが考えられる。こ
のような処理においても前述したベクトル処理と同様
に、処理サイクル毎のデータが大小の比較を行う演算器
に転送され、この演算器で2つのデータが同時に受け取
られ、それらの比較を行うことにより大小が判断され
る。
Here, the data handled in the vector processing is an index, that is, the related data distinguished by the value of I in the above-mentioned formula, and therefore, the maximum value or the minimum value among them is calculated. Can be considered. Even in such processing, as in the case of the vector processing described above, the data for each processing cycle is transferred to the arithmetic unit that compares large and small, and this arithmetic unit receives two data at the same time and compares them. The size is judged.

【0009】この最大値、または最小値の算出における
マスク付き演算の概念を図7に示す。但し、全てのデー
タがマスクされていた場合は、最大値検出のときは最小
値を、一方最小値検出のときは最大値を結果として出力
するものとする。図8はベクトルデータの最大値、また
は最小値を求める演算回路を示すブロック図である。
FIG. 7 shows the concept of masked arithmetic in calculating the maximum value or the minimum value. However, when all the data are masked, the minimum value is output as the result when the maximum value is detected, and the maximum value is output as the result when the minimum value is detected. FIG. 8 is a block diagram showing an arithmetic circuit for obtaining the maximum value or the minimum value of vector data.

【0010】この演算回路は、入力ラッチ11,12,
13、固定値発生器14、大小比較器15、第1セレク
タ16、第2セレクタ17、一時ラッチ18、出力ラッ
チ19から構成されている。なお、図中、D’は入力ラ
ッチ11の出力信号、M’は入力ラッチ12の出力信
号、C2’は入力ラッチ13の出力信号、Kは固定値発
生器14の出力信号、Sは大小比較器15の出力信号、
Qは第1セレクタ16の出力信号,Rは第2セレクタ1
7の出力信号、Tは一時ラッチ18の出力信号、Oは出
力ラッチ19の出力信号を示す。
This arithmetic circuit includes input latches 11, 12,
13, a fixed value generator 14, a magnitude comparator 15, a first selector 16, a second selector 17, a temporary latch 18, and an output latch 19. In the figure, D'is the output signal of the input latch 11, M'is the output signal of the input latch 12, C2 'is the output signal of the input latch 13, K is the output signal of the fixed value generator 14, and S is the magnitude comparison. Output signal of the device 15,
Q is the output signal of the first selector 16 and R is the second selector 1
7, the output signal of T is the output signal of the temporary latch 18, and the output signal of O is the output signal of the output latch 19.

【0011】入力ラッチ11は、演算対象となるベクト
ルデータDを一時保持するラッチ回路であり、1サイク
ルに1要素分のデータがベクトルデータDとしてベクト
ルレジスタ6から転送される。入力ラッチ12は、ベク
トルデータDに対するマスク情報Mを一時保持するラッ
チ回路であり、マスク情報MはベクトルデータDと同期
してマスクレジスタ7から転送され、値が“1”のとき
にマスクが有効であるとする。
The input latch 11 is a latch circuit for temporarily holding the vector data D to be operated, and data for one element is transferred from the vector register 6 as vector data D in one cycle. The input latch 12 is a latch circuit that temporarily holds the mask information M for the vector data D. The mask information M is transferred from the mask register 7 in synchronization with the vector data D, and the mask is valid when the value is "1". Suppose

【0012】入力ラッチ13は、転送されたベクトルデ
ータDが第1要素であることを示す信号C2を一時保持
するラッチ回路であり、信号C2は第1要素のベクトル
データDと同期して“1”が命令制御部2から転送され
る。固定値発生器14は、入力されたベクトルデータD
がマスクされていた場合、最大値あるいは最小値のいず
れを検出するのかを示す信号C1に基づいて、演算回路
で使用されるデータの最大値、または最小値を発生する
回路である。
The input latch 13 is a latch circuit for temporarily holding a signal C2 indicating that the transferred vector data D is the first element, and the signal C2 is "1" in synchronization with the vector data D of the first element. Is transferred from the instruction control unit 2. The fixed value generator 14 receives the input vector data D
Is a circuit for generating the maximum value or the minimum value of the data used in the arithmetic circuit based on the signal C1 indicating which of the maximum value and the minimum value is to be detected.

【0013】図9(a)は固定値発生器14の要部構成
を示すブロック図であり、本演算で使用するデータを4
ビットの2の補数表現の整数としてその動作を説明す
る。すなわち、図9(b)に示すように、C1=“0”
の場合は最大値検出であるとしてセレクタによって“1
000”(最小値)が選択され、一方、C1=“1”の
場合は最小値検出であるとしてセレクタによって“01
11”(最大値)が選択されて信号Kとして出力され
る。
FIG. 9A is a block diagram showing the configuration of the main part of the fixed value generator 14, in which the data used in this operation is 4
The operation is described as an integer in the two's complement representation of bits. That is, as shown in FIG. 9B, C1 = "0"
If the maximum value is detected, the selector selects "1".
000 ”(minimum value) is selected, while when C1 =“ 1 ”, the selector selects“ 01 ”as the minimum value detection.
11 "(maximum value) is selected and output as the signal K.

【0014】大小比較器15は、図10(a)に示すよ
うに、2つの入力A,Bの大小を比較し、その比較結果
を出力する回路であり、その動作を図10(b)に基づ
いて説明する。C2’=“1”、つまり入力データが第
1番目の要素である場合は信号C1の値に関係なく信号
Sの出力はS=“0”となる。
As shown in FIG. 10A, the magnitude comparator 15 is a circuit for comparing the magnitudes of two inputs A and B and outputting the comparison result. Its operation is shown in FIG. 10B. It will be explained based on. When C2 ′ = “1”, that is, when the input data is the first element, the output of the signal S is S = “0” regardless of the value of the signal C1.

【0015】一方、C2’=“0”、つまり入力データ
が第2番目以降の要素である場合、最大値検出(C1=
“0”)の状態ならばA−B≧0のときS=“0”、A
−B<0のときS=“1”となり、最小値検出(C1=
“1”)の状態ならばA−B≧0のときS=“1”、A
−B<0のときS=“0”となる。第1セレクタ16
は、図11(a)に示すように、大小比較器15の出力
信号S、入力ラッチ12の出力信号M’(現在のデータ
に対するマスク信号)、及び一時ラッチ18の出力信号
T(以前のデータに対するマスク信号)に基づいて、入
力ラッチ11の出力信号D’、出力ラッチ19の出力信
号O、固定値発生器14の出力信号Kのいずれかを選択
するものである。
On the other hand, when C2 '= "0", that is, when the input data is the second and subsequent elements, the maximum value detection (C1 =
In the case of “0”), when A−B ≧ 0, S = “0”, A
-When B <0, S = “1”, and the minimum value is detected (C1 =
In the case of “1”), when A−B ≧ 0, S = “1”, A
When -B <0, S = “0”. First selector 16
11A, as shown in FIG. 11A, the output signal S of the magnitude comparator 15, the output signal M ′ of the input latch 12 (mask signal for the current data), and the output signal T of the temporary latch 18 (previous data). The output signal D ′ of the input latch 11, the output signal O of the output latch 19, and the output signal K of the fixed value generator 14 are selected based on the mask signal).

【0016】すなわち、図11(b)に示すように、現
在の入力のみがマスクされていた場合はそれ以前に選ば
れていた最大値もしくは最小値が選択され、以前のデー
タのみがマスクされていた場合は現在の入力が選択され
る。また、現在及び以前のデータが共に選択されていた
場合は固定値が選択され、いずれのデータもマスクされ
ていない場合は大小比較器15の出力信号Sに基づいて
信号D’もしくは信号Oが選択される。
That is, as shown in FIG. 11B, when only the current input is masked, the maximum value or the minimum value selected before that is selected, and only the previous data is masked. Current input is selected. Further, when both the current and previous data are selected, a fixed value is selected, and when neither data is masked, the signal D ′ or the signal O is selected based on the output signal S of the magnitude comparator 15. To be done.

【0017】第2セレクタ17は、図12(a)に示す
ように、大小比較器15の出力信号Sに基づいて、信号
M’と信号Tのいずれかを選択する回路であり、図12
(b)に示すように、S=“0”の場合はR=M’、S
=“1”の場合はR=Tが選択される。一時ラッチ18
は、第2セレクタ17からの出力信号Rを以前のデータ
のマスク信号として使用するために一時保持するラッチ
回路である。
As shown in FIG. 12A, the second selector 17 is a circuit for selecting either the signal M ′ or the signal T based on the output signal S of the magnitude comparator 15, and FIG.
As shown in (b), when S = “0”, R = M ′, S
If = "1", R = T is selected. Temporary latch 18
Is a latch circuit for temporarily holding the output signal R from the second selector 17 for use as a mask signal for previous data.

【0018】出力ラッチ19は、第1セレクタ16から
の出力信号Qを以前のデータとして使用するために一時
保持するラッチ回路であり、その出力信号である信号O
を大小比較器15、及び第1セレクタ16にフィードバ
ックしている。
The output latch 19 is a latch circuit for temporarily holding the output signal Q from the first selector 16 for use as previous data, and its output signal is the signal O.
Is fed back to the magnitude comparator 15 and the first selector 16.

【0019】[0019]

【発明が解決しようとする課題】しかしながら、このよ
うな従来の演算装置にあっては、以前に入力されたデー
タに対するマスク情報までもラッチするという構成とな
っていたため、マスク情報の保持のためのラッチ回路が
2つ必要であるという問題点があった。また、2種類の
マスク情報に基づいて第1セレクタ16、第2セレクタ
17を動作させるようになっていたため、セレクタの構
成が複雑になるという問題点があった。
However, in such a conventional arithmetic unit, even the mask information for the previously input data is latched, so that the mask information is retained. There is a problem that two latch circuits are required. Further, since the first selector 16 and the second selector 17 are operated based on the two types of mask information, there is a problem that the configuration of the selector becomes complicated.

【0020】[目的]そこで本発明は、マスク付きベク
トルデータの最大値、及び最小値の検出部分の回路構成
を簡素化する演算装置を提供することを目的としてい
る。
[Purpose] Therefore, an object of the present invention is to provide an arithmetic unit which simplifies the circuit configuration of the detection part of the maximum value and the minimum value of vector data with a mask.

【0021】[0021]

【課題を解決するための手段】本発明による演算装置は
上記目的達成のため、その原理図を図1に示すように、
所定データ、及び該所定データに対するマスクデータに
基づいて該所定データ中の最大値または最小値を演算す
る演算装置であって、前記マスクデータに基づいて、最
大値または最小値のいずれを演算するのかにより設定さ
れる固定値データと、前記所定データとのいずれか一方
を選択して出力する選択手段20と、該選択手段20か
らの出力値が第1番目の要素である場合は該出力値をそ
のまま出力し、該選択手段20からの出力値が第1番目
以外の要素である場合は、最大値または最小値のいずれ
を演算するのかに基づいて、該出力値と以前に出力した
出力値とのどちらが大きい、もしくは小さいかを判定す
る判定手段21とを備えるように構成している。
In order to achieve the above-mentioned object, an arithmetic unit according to the present invention has the principle diagram shown in FIG.
A calculation device for calculating a maximum value or a minimum value in the predetermined data based on predetermined data and mask data for the predetermined data, and which of the maximum value and the minimum value is calculated based on the mask data. Selecting means 20 for selecting and outputting any one of the fixed value data set by the above and the predetermined data, and when the output value from the selecting means 20 is the first element, the output value is If the output value from the selecting means 20 is an element other than the first element, the output value and the previously output value are output based on whether the maximum value or the minimum value is calculated. And a determination means 21 for determining which is larger or smaller.

【0022】[0022]

【作用】本発明では、現在入力される所定データに対し
てのみマスクデータが適用されることによりマスク情報
の保持のためのラッチ回路が削減され、これによって、
このマスク情報に基づいて動作するセレクタ等の構成が
複雑になることが防止される。
According to the present invention, since the mask data is applied only to the currently input predetermined data, the number of latch circuits for holding the mask information is reduced.
It is possible to prevent the configuration of the selector or the like that operates based on the mask information from becoming complicated.

【0023】すなわち、マスク付きベクトルデータの最
大値、及び最小値の検出部分の回路構成が簡素化され
る。
That is, the circuit configuration of the portion for detecting the maximum value and the minimum value of the vector data with mask is simplified.

【0024】[0024]

【実施例】以下、本発明を図面に基づいて説明する。図
2は本発明に係る演算装置の一実施例を示す図であり、
本実施例の演算装置の概略構成を示すブロック図であ
る。まず、構成を説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings. FIG. 2 is a diagram showing an embodiment of an arithmetic unit according to the present invention,
It is a block diagram which shows schematic structure of the arithmetic unit of a present Example. First, the configuration will be described.

【0025】なお、図2において、図1に示した原理
図、及び図8〜図10に示した従来例に付された番号と
同一番号は同一部分を示す。本実施例の演算装置は、入
力ラッチ11,12、固定値発生器14、第3セレクタ
22から選択手段20、判定手段21からなる選択手段
20と、入力ラッチ13、大小比較器15、第4セレク
タ23、出力ラッチ19からなる判定手段21とから構
成されている。
In FIG. 2, the same numbers as the numbers given to the principle diagram shown in FIG. 1 and the conventional example shown in FIGS. 8 to 10 indicate the same parts. The arithmetic unit according to the present embodiment includes the input latches 11 and 12, the fixed value generator 14, the selecting means 20 including the third selector 22, the selecting means 20, and the determining means 21, the input latch 13, the magnitude comparator 15, and the fourth comparator. It is composed of a selector 23 and a judging means 21 composed of an output latch 19.

【0026】なお、図中、Pは第3セレクタ22の出力
信号,Q’は第4セレクタ23の出力信号を示す。第3
セレクタ22は、図3(a)に示すように、入力ラッチ
12の出力信号M’(現在のデータに対するマスク信
号)に基づいて、入力ラッチ11の出力信号D’、及び
固定値発生器14の出力信号Kのいずれかを選択するも
のであり、詳しくは、図3(b)に示すように、M’=
“0”、すなわち、現在の入力がマスクされていない場
合は現在の入力であるD’がそのまま出力信号Pとして
選択されて出力され、一方、マスクされていた場合
(M’=“1”)は、固定値発生器14の出力Kが出力
信号Pとして選択されて出力される。
In the figure, P is the output signal of the third selector 22, and Q'is the output signal of the fourth selector 23. Third
As shown in FIG. 3A, the selector 22 outputs the output signal D ′ of the input latch 11 and the fixed value generator 14 based on the output signal M ′ of the input latch 12 (mask signal for the current data). One of the output signals K is selected, and more specifically, as shown in FIG. 3B, M ′ =
“0”, that is, when the current input is not masked, the current input D ′ is directly selected and output as the output signal P, while when it is masked (M ′ = “1”) , The output K of the fixed value generator 14 is selected and output as the output signal P.

【0027】第4セレクタ23は、図4(a)に示すよ
うに、大小比較器15の出力信号Sに基づいて、第3セ
レクタ22の出力信号P(現在のデータに対応)と、出
力ラッチ19の出力信号O(以前のデータに対応)との
いずれかを選択する回路であり、図4(b)に示すよう
に、S=“0”の場合はQ=P、S=“1”の場合はQ
=Oが選択される。
As shown in FIG. 4A, the fourth selector 23 outputs the output signal P of the third selector 22 (corresponding to the current data) and the output latch based on the output signal S of the magnitude comparator 15. This is a circuit for selecting any one of the 19 output signals O (corresponding to the previous data). As shown in FIG. 4B, when S = “0”, Q = P and S = “1”. In case of Q
= O is selected.

【0028】次に作用を説明する。まず、命令制御部2
の指示によりベクトルレジスタ6からベクトルデータ
が、また、マスクレジスタ7からマスクデータが読みだ
され、それぞれ信号D,Mとして本実施例における演算
回路に転送され、入力ラッチ11,12でそれぞれラッ
チされる。
Next, the operation will be described. First, the instruction control unit 2
The vector data is read out from the vector register 6 and the mask data is read out from the mask register 7 according to the instruction, and transferred to the arithmetic circuit in this embodiment as signals D and M, respectively, and latched by the input latches 11 and 12, respectively. ..

【0029】そして、入力ラッチ12からの出力信号
M’の値に基づいて第3セレクタ22により、入力デー
タと固定値とが選択される。ここで、最大値を検出する
場合、入力データであるベクトルデータがマスクされて
いたら、その値を最小値として大小比較されるので、入
力値が大きくても無視することが可能である。
Then, the input data and the fixed value are selected by the third selector 22 based on the value of the output signal M'from the input latch 12. Here, when the maximum value is detected, if the vector data that is the input data is masked, the value is compared as the minimum value, so it is possible to ignore even if the input value is large.

【0030】次に、大小比較器15の出力信号Sに基づ
いて、第4セレクタ23により入力データ(マスクされ
ていた場合は固定値)と以前までの最大値あるいは最小
値とのいずれかが選択されることにより、それまでに入
力された全てのベクトルデータの最大値あるいは最小値
が選択される。第4セレクタ23の出力Q’は出力ラッ
チ19によってラッチされ、出力Oとして大小比較器1
5、及び外部に転送される。
Next, based on the output signal S of the magnitude comparator 15, the fourth selector 23 selects either the input data (fixed value if masked) or the previous maximum or minimum value. By doing so, the maximum value or the minimum value of all the vector data input so far is selected. The output Q ′ of the fourth selector 23 is latched by the output latch 19 and is output as the output O by the magnitude comparator 1
5, and transferred to the outside.

【0031】このように本実施例では、マスク情報の保
持のための余計なラッチ回路を省くことができ、回路全
体における素子量を削減できる。したがって、マスク付
きベクトルデータの最大値または最小値を演算する演算
回路の回路規模を縮小することができる。なお、上記実
施例は演算で使用するデータを4ビットの2の補数で表
されるデータとして説明しているが、これに限らず、実
際のデータとしては、例えば、浮動小数点データであっ
てもよく、また、ビット長も任意であることはいうまで
もない。
As described above, in this embodiment, an extra latch circuit for holding mask information can be omitted, and the number of elements in the entire circuit can be reduced. Therefore, the circuit scale of the arithmetic circuit for calculating the maximum value or the minimum value of the masked vector data can be reduced. In the above embodiment, the data used in the calculation is described as the data represented by the 4-bit 2's complement, but the data is not limited to this, and the actual data may be, for example, floating point data. It goes without saying that the bit length is also arbitrary.

【0032】[0032]

【発明の効果】本発明では、現在入力される所定データ
に対してのみマスクデータを適用することで、マスク情
報の保持のためのラッチ回路を削減することができ、こ
のマスク情報に基づいて動作するセレクタ等の構成が複
雑化することを防止できる。したがって、マスク付きベ
クトルデータの最大値、及び最小値の検出部分の回路構
成を簡素化できる。
According to the present invention, by applying the mask data only to the predetermined data that is currently input, it is possible to reduce the latch circuit for holding the mask information, and operate based on this mask information. It is possible to prevent the configuration of the selectors, etc., to be complicated. Therefore, it is possible to simplify the circuit configuration of the detection unit of the maximum value and the minimum value of the masked vector data.

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

【図1】本発明の演算装置の原理図である。FIG. 1 is a principle diagram of an arithmetic unit according to the present invention.

【図2】本実施例の演算装置の概略構成を示すブロック
図である。
FIG. 2 is a block diagram showing a schematic configuration of an arithmetic unit of this embodiment.

【図3】第3セレクタの構成、及び動作を説明するため
の図である。
FIG. 3 is a diagram for explaining the configuration and operation of a third selector.

【図4】第4セレクタの構成、及び動作を説明するため
の図である。
FIG. 4 is a diagram for explaining the configuration and operation of a fourth selector.

【図5】ベクトルプロセッサの概略図である。FIG. 5 is a schematic diagram of a vector processor.

【図6】マスク付き演算を説明するための図である。FIG. 6 is a diagram for explaining an operation with a mask.

【図7】最大値、最小値検出のマスク付き演算を説明す
るための図である。
FIG. 7 is a diagram for explaining a masked operation for detecting a maximum value and a minimum value.

【図8】従来の演算装置の概略構成を示すブロック図で
ある。
FIG. 8 is a block diagram showing a schematic configuration of a conventional arithmetic device.

【図9】固定値発生器の構成、及び動作を説明するため
の図である。
FIG. 9 is a diagram for explaining the configuration and operation of a fixed value generator.

【図10】大小比較器の構成、及び動作を説明するため
の図である。
FIG. 10 is a diagram for explaining the configuration and operation of a size comparator.

【図11】第1セレクタの構成、及び動作を説明するた
めの図である。
FIG. 11 is a diagram for explaining the configuration and operation of the first selector.

【図12】第2セレクタの構成、及び動作を説明するた
めの図である。
FIG. 12 is a diagram for explaining the configuration and operation of a second selector.

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

1 ベクトルプロセッサ 2 命令制御部 3 命令レジスタ 4 乗算器 5 加算器 6 ベクトルレジスタ 7 マスクレジスタ 8 入出力制御部 9 CPU 10 主記憶 11 入力ラッチ 12 入力ラッチ 13 入力ラッチ 14 固定値発生器 15 大小比較器 16 第1セレクタ 17 第2セレクタ 18 一時ラッチ 19 出力ラッチ 20 選択手段 21 判定手段 22 第3セレクタ 23 第4セレクタ 1 vector processor 2 instruction control unit 3 instruction register 4 multiplier 5 adder 6 vector register 7 mask register 8 input / output control unit 9 CPU 10 main memory 11 input latch 12 input latch 13 input latch 14 fixed value generator 15 large / small comparator 16 First Selector 17 Second Selector 18 Temporary Latch 19 Output Latch 20 Selection Means 21 Judging Means 22 Third Selector 23 Fourth Selector

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】所定データ、及び該所定データに対するマ
スクデータに基づいて該所定データ中の最大値または最
小値を演算する演算装置であって、 前記マスクデータに基づいて、最大値または最小値のい
ずれを演算するのかにより設定される固定値データと、
前記所定データとのいずれか一方を選択して出力する選
択手段と、 該選択手段からの出力値が第1番目の要素である場合は
該出力値をそのまま出力し、該選択手段からの出力値が
第1番目以外の要素である場合は、最大値または最小値
のいずれを演算するのかに基づいて、該出力値と以前に
出力した出力値とのどちらが大きい、もしくは小さいか
を判定する判定手段と、 を備えることを特徴とする演算装置。
1. An arithmetic unit for calculating a maximum value or a minimum value in predetermined data based on predetermined data and mask data for the predetermined data, wherein the maximum value or the minimum value is calculated based on the mask data. Fixed value data set depending on which is calculated,
Selecting means for selecting and outputting any one of the predetermined data, and if the output value from the selecting means is the first element, the output value is output as it is, and the output value from the selecting means Is an element other than the first element, the determination means for determining which of the output value and the output value output previously is larger or smaller, based on which of the maximum value and the minimum value is calculated. An arithmetic unit comprising:
JP34570391A 1991-12-27 1991-12-27 Arithmetic unit Expired - Fee Related JP3310316B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP34570391A JP3310316B2 (en) 1991-12-27 1991-12-27 Arithmetic unit
US08/586,483 US5822557A (en) 1991-12-27 1996-01-16 Pipelined data processing device having improved hardware control over an arithmetic operations unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34570391A JP3310316B2 (en) 1991-12-27 1991-12-27 Arithmetic unit

Publications (2)

Publication Number Publication Date
JPH05181642A true JPH05181642A (en) 1993-07-23
JP3310316B2 JP3310316B2 (en) 2002-08-05

Family

ID=18378398

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34570391A Expired - Fee Related JP3310316B2 (en) 1991-12-27 1991-12-27 Arithmetic unit

Country Status (1)

Country Link
JP (1) JP3310316B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8117383B2 (en) * 2006-01-18 2012-02-14 Freescale Semiconductor, Inc. Hardware accelerator based method and device for string searching
US8296548B2 (en) * 2006-01-18 2012-10-23 Freescale Semiconductor, Inc. Device and method for finding extreme values in a data block

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8117383B2 (en) * 2006-01-18 2012-02-14 Freescale Semiconductor, Inc. Hardware accelerator based method and device for string searching
US8296548B2 (en) * 2006-01-18 2012-10-23 Freescale Semiconductor, Inc. Device and method for finding extreme values in a data block

Also Published As

Publication number Publication date
JP3310316B2 (en) 2002-08-05

Similar Documents

Publication Publication Date Title
US3943494A (en) Distributed execution processor
KR900011167A (en) Digital signal processing device and motion compensation calculation method
JPH0542011B2 (en)
US4954947A (en) Instruction processor for processing branch instruction at high speed
US4677549A (en) Pipelined data processor system having increased processing speed
JP3822568B2 (en) Event processing
US6629118B1 (en) Zero result prediction
US5974436A (en) Execution processor for carrying out power calculation
JP3310316B2 (en) Arithmetic unit
US6240540B1 (en) Cyclic redundancy check in a computer system
US5748933A (en) Data driven type information processor suitable for image processing that utilizes a configuration condition
KR100457040B1 (en) Apparatus and method for data processing using multiply-accumulate instructions
JPH05274143A (en) Composite condition processing system
JP2553728B2 (en) Arithmetic unit
JP3278441B2 (en) Vector processing equipment
US5381380A (en) Divide circuit having high-speed operating capability
JP2919184B2 (en) Information processing device that performs pipeline processing
JPH04184535A (en) Parallel arithmetic units
JP3441847B2 (en) Processor with data memory
US6772318B1 (en) Bypass control circuit
JP3487420B2 (en) SIMD parallel computing device
JPH0250258A (en) Vector processing device
TW579483B (en) Data processing device and method
JP2615746B2 (en) Bit operation circuit
JP2542120B2 (en) Information processing device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020507

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

Free format text: PAYMENT UNTIL: 20080524

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090524

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees