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

JP3310316B2 - Arithmetic unit - Google Patents

Arithmetic unit

Info

Publication number
JP3310316B2
JP3310316B2 JP34570391A JP34570391A JP3310316B2 JP 3310316 B2 JP3310316 B2 JP 3310316B2 JP 34570391 A JP34570391 A JP 34570391A JP 34570391 A JP34570391 A JP 34570391A JP 3310316 B2 JP3310316 B2 JP 3310316B2
Authority
JP
Japan
Prior art keywords
data
value
output
input
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.)
Expired - Fee Related
Application number
JP34570391A
Other languages
Japanese (ja)
Other versions
JPH05181642A (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.)
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 OR CALCULATING; 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 OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F9/30038Instructions to perform operations on packed data, e.g. vector, tile or matrix operations using a mask

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Complex Calculations (AREA)

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 supercomputer, a super EWS.
The present invention relates to an arithmetic device that performs vector processing at high speed and is suitable for use in fields such as (Engineering Work Station). In recent years, in scientific calculations and the like, 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 processing, such as an iterative operation represented by 10 CONTINUE.

【0002】一定の演算を複数のデータに対して繰り返
すような処理をベクトル処理といい、大量の科学計算を
実行する、例えば、ベクトルプロセッサ等の演算装置で
は、ベクトル処理を高速に実行することが要求される。
[0002] A process in which a certain operation is repeated for a plurality of data is called a vector process. For example, in an arithmetic device such as a vector processor that executes a large amount of scientific calculations, it is possible to execute the vector process at a 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 As a conventional arithmetic unit of this type, for example, there is 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 an input / output control unit. 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, a predetermined instruction sequence and operation data on the main memory 10 are transferred to the vector processor 1 by the CPU 9, and 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 a control signal required for execution.

【0005】各ユニットではそれらの制御信号に従って
データの入出力や演算が実行され、例えば、乗算を実行
する場合、ベクトルレジスタ6から演算データが読み出
されて乗算器4に転送され、乗算器4によってそれらの
演算データに対する乗算が行われる。乗算器4による乗
算結果はベクトルレジスタ6に転送され、ベクトルレジ
スタ6に乗算結果が格納される。なお、前述の制御信号
にはこれらの動作に必要な読み出し・書き込みタイミン
グ等も含まれている。
In each unit, data input / output and operation are executed in accordance with the control signals. For example, when multiplication is executed, operation data is read from the vector register 6 and transferred to the multiplier 4, and Performs multiplication on the operation data. The result of the multiplication by the multiplier 4 is transferred to the vector register 6, and the result of the multiplication is stored in the vector register 6. Note that the above-described control signals include read / write timings and the like 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. Here, consider an operation with a mask. The masked operation means that mask data is set for each element of the vector data, and no operation is 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 an 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 to prevent the result from being written to C (I). Normally, when an operation such as multiplication or addition is performed, operation data, operation target data, and 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. Pipeline processing is performed in which the result calculated by the device is transferred to the vector register 6 every processing cycle.

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

【0009】この最大値、または最小値の算出における
マスク付き演算の概念を図7に示す。但し、全てのデー
タがマスクされていた場合は、最大値検出のときは最小
値を、一方最小値検出のときは最大値を結果として出力
するものとする。図8はベクトルデータの最大値、また
は最小値を求める演算回路を示すブロック図である。
FIG. 7 shows the concept of a calculation with a mask in the calculation of 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 the 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 unit 15,
Q is the output signal of the first selector 16, R is the second selector 1
7, T indicates an output signal of the temporary latch 18, and O indicates an 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 vector data D to be operated on, and data of one element is transferred from the vector register 6 as vector data D in one cycle. The input latch 12 is a latch circuit for temporarily holding 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". And

【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. 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 that generates 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 detected when is masked.

【0013】図9(a)は固定値発生器14の要部構成
を示すブロック図であり、本演算で使用するデータを4
ビットの2の補数表現の整数としてその動作を説明す
る。すなわち、図9(b)に示すように、C1=“0”
の場合は最大値検出であるとしてセレクタによって“1
000”(最小値)が選択され、一方、C1=“1”の
場合は最小値検出であるとしてセレクタによって“01
11”(最大値)が選択されて信号Kとして出力され
る。
FIG. 9A is a block diagram showing a main part of the fixed value generator 14.
The operation will be described as an integer in a two's complement representation of bits. That is, as shown in FIG. 9B, C1 = "0"
In the case of “1”, it is determined by the selector that “1”
000 "(minimum value) is selected. On the other hand, when C1 =" 1 ", it is determined by the selector that the minimum value is to be detected and" 01 "
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 that compares the magnitudes of the two inputs A and B and outputs the result of the comparison. It will be described based on the following. When C2 ′ = “1”, that is, when the input data is the first element, the output of the signal S is “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 is detected (C1 =
"0"), when AB ≧ 0, S = “0”, A
When −B <0, S = “1”, and the minimum value is detected (C1 =
In the state of “1”), when AB ≧ 0, S = “1”, A
When -B <0, S = "0". First selector 16
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 (the 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 a mask signal for the input latch 11.

【0016】すなわち、図11(b)に示すように、現
在の入力のみがマスクされていた場合はそれ以前に選ば
れていた最大値もしくは最小値が選択され、以前のデー
タのみがマスクされていた場合は現在の入力が選択され
る。また、現在及び以前のデータが共に選択されていた
場合は固定値が選択され、いずれのデータもマスクされ
ていない場合は大小比較器15の出力信号Sに基づいて
信号D’もしくは信号Oが選択される。
That is, as shown in FIG. 11B, when only the current input is masked, the previously selected maximum value or minimum value is selected, and only the previous data is masked. If so, the current input is selected. When both the current and previous data are selected, a fixed value is selected. 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. Is done.

【0017】第2セレクタ17は、図12(a)に示す
ように、大小比較器15の出力信号Sに基づいて、信号
M’と信号Tのいずれかを選択する回路であり、図12
(b)に示すように、S=“0”の場合はR=M’、S
=“1”の場合はR=Tが選択される。一時ラッチ18
は、第2セレクタ17からの出力信号Rを以前のデータ
のマスク信号として使用するために一時保持するラッチ
回路である。
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, as shown in FIG.
As shown in (b), when S = "0", R = M 'and 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 the output 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 device, since the mask information for the previously input data is also latched, it is necessary to hold the mask information. 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 two types of mask information, there is a problem that the configuration of the selector becomes complicated.

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

【0021】[0021]

【課題を解決するための手段】本発明による演算装置は
上記目的達成のため、その原理図を図1に示すように、
複数の入力データ及び該複数の入力データに対するマス
クデータに基づいて該複数の入力データ中の最大値また
は最小値を演算する演算装置であって、前記マスクデー
タに基づいて、最大値または最小値のいずれを演算する
のかにより設定される固定値データと、前記入力データ
とのいずれか一方を選択して出力する選択手段20と、
前記選択手段20からの出力値が前記複数の入力データ
の内の最初の入力データ(第1番目の要素)である場合
は該出力値をそのまま出力し、前記選択手段20からの
出力値が該最初の入力データ以外の入力データ(第1番
目以外の要素)である場合は、最大値または最小値のい
ずれを演算するのかに基づいて、該出力値と以前に出力
した出力値とのどちらが大きい、もしくは小さいかを判
定する判定手段21とを備えるように構成している。
In order to achieve the above object, an arithmetic unit according to the present invention has a principle diagram as shown in FIG.
An arithmetic unit for calculating a maximum or minimum value in said plurality of input data based on the mask data for a plurality of input data and said plurality of input data based on said mask data, the maximum or minimum value Selection means 20 for selecting and outputting one of the fixed value data set according to which operation is to be performed and the input data ;
Output value of the plurality of input data from the selection means 20
The first input data when it is (first th element) outputs the output value as the input data the output value is other than outermost first input data from said selecting means 20 (No. 1 of the
(An element other than the eye) , the determining unit 21 that determines which of the output value and the previously output value is larger or smaller based on which of the maximum value and the minimum value is calculated. It is constituted so that it may be provided.

【0022】[0022]

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

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

【0024】[0024]

【実施例】以下、本発明を図面に基づいて説明する。図
2は本発明に係る演算装置の一実施例を示す図であり、
本実施例の演算装置の概略構成を示すブロック図であ
る。まず、構成を説明する。
DETAILED 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 the arithmetic device according to the present invention,
FIG. 2 is a block diagram illustrating a schematic configuration of an arithmetic unit according to the present embodiment. 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 reference numerals as those 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 device according to the present embodiment includes input latches 11 and 12, a fixed value generator 14, a selection unit 20 including a third selector 22 and a selection unit 20 and a determination unit 21, an input latch 13, a size comparator 15, and a fourth It comprises a selector 23 and a determination means 21 comprising 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 indicates an output signal of the third selector 22, and Q 'indicates an 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 output signal D ′ of the fixed value generator 14 based on the output signal M ′ of the input latch 12 (a mask signal for the current data). One of the output signals K is selected. Specifically, as shown in FIG.
“0”, that is, if the current input is not masked, the current input D ′ is selected and output as the output signal P as it is, while if 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 an output signal P (corresponding to the current data) of the third selector 22 and an 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" Q for
= 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 from the vector register 6 and the mask data is read from the mask register 7 and transferred to the arithmetic circuit in this embodiment as signals D and M, respectively, and are latched by the input latches 11 and 12, respectively. .

【0029】そして、入力ラッチ12からの出力信号
M’の値に基づいて第3セレクタ22により、入力デー
タと固定値とが選択される。ここで、最大値を検出する
場合、入力データであるベクトルデータがマスクされて
いたら、その値を最小値として大小比較されるので、入
力値が大きくても無視することが可能である。
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 that even if the input value is large, it can be ignored.

【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 input data (fixed value if masked) and the previous maximum value or minimum value. Thus, 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 the output O
5, and transferred to the outside.

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

【0032】[0032]

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

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

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

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

【図3】第3セレクタの構成、及び動作を説明するため
の図である。
FIG. 3 is a diagram illustrating 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 illustrating a calculation with a mask.

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

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

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

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

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

【図12】第2セレクタの構成、及び動作を説明するた
めの図である。
FIG. 12 is a diagram illustrating 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セレクタ DESCRIPTION OF SYMBOLS 1 Vector processor 2 Instruction control part 3 Instruction register 4 Multiplier 5 Adder 6 Vector register 7 Mask register 8 Input / output control part 9 CPU 10 Main memory 11 Input latch 12 Input latch 13 Input latch 14 Fixed value generator 15 Large and small comparator 16 First selector 17 Second selector 18 Temporary latch 19 Output latch 20 Selection means 21 Judgment means 22 Third selector 23 Fourth selector

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 7/02 G06F 17/16 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 7/02 G06F 17/16

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数の入力データ及び該複数の入力データ
に対するマスクデータに基づいて該複数の入力データ
の最大値または最小値を演算する演算装置であって、 前記マスクデータに基づいて、最大値または最小値のい
ずれを演算するのかにより設定される固定値データと、
前記入力データとのいずれか一方を選択して出力する選
択手段と、前記 選択手段からの出力値が前記複数の入力データの内
の最初の入力データである場合は該出力値をそのまま出
力し、前記選択手段からの出力値が該最初の入力データ
以外の入力データである場合は、最大値または最小値の
いずれを演算するのかに基づいて、該出力値と以前に出
力した出力値とのどちらが大きい、もしくは小さいかを
判定する判定手段と、 を備えることを特徴とする演算装置。
1. A computing device for computing a maximum or minimum value in said plurality of input data based on the mask data for a plurality of input data and said plurality of input data <br/>, the mask data Based on whether to calculate the maximum value or the minimum value, based on the fixed value data,
Selection means for selecting and outputting one of said input data, output values from said selection means of said plurality of input data
The first case is the input data and outputs the output value as the input data the output value of the outermost first from said selection means
When the input data is other than the input data , a determination unit that determines which of the output value and the previously output output value is larger or smaller based on which of the maximum value and the minimum value is calculated, An arithmetic device, 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 JPH05181642A (en) 1993-07-23
JP3310316B2 true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007083198A1 (en) * 2006-01-18 2007-07-26 Freescale Semiconductor Inc. Hardware accelerator based method and device for string searching
WO2007083199A1 (en) * 2006-01-18 2007-07-26 Freescale Semiconductor, Inc. Device and method for finding extreme values in a data block

Also Published As

Publication number Publication date
JPH05181642A (en) 1993-07-23

Similar Documents

Publication Publication Date Title
US5357237A (en) In a data processor a method and apparatus for performing a floating-point comparison operation
US5859789A (en) Arithmetic unit
US5212662A (en) Floating point arithmetic two cycle data flow
TWI470545B (en) Apparatus,processor,system,method,instruction,and logic for performing range detection
KR900011167A (en) Digital signal processing device and motion compensation calculation method
US4954947A (en) Instruction processor for processing branch instruction at high speed
EP0730220A2 (en) Method and apparatus for rapid execution of control transfer instructions
JPH05250146A (en) Arithmetic operation circuit executing integer involution processing
JP3822568B2 (en) Event processing
JP3310316B2 (en) Arithmetic unit
JPS608933A (en) Arithmetic processing unit
US5446909A (en) Binary multiplication implemented by existing hardware with minor modifications to sequentially designate bits of the operand
US4878193A (en) Method and apparatus for accelerated addition of sliced addends
KR100457040B1 (en) Apparatus and method for data processing using multiply-accumulate instructions
US6792442B1 (en) Signal processor and product-sum operating device for use therein with rounding function
JP2553728B2 (en) Arithmetic unit
KR960012664B1 (en) Fixed-Point Digital Signal Processor with Shift-Number Detection Circuit for Normalization
JP3441847B2 (en) Processor with data memory
CN120144185A (en) Coprocessor, data processing method, processor system and electronic device
JP2665067B2 (en) Floating point adder / subtracter
CN121666591A (en) Neural network operation instruction
JP2998324B2 (en) Normalized shift device and normalized shift method
JP3110072B2 (en) Pre-normalization circuit
JP2908117B2 (en) Vector arithmetic processing unit
JPH04184535A (en) Parallel arithmetic units

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