JPH0250220A - Summarized arithmetic processing machine - Google Patents

Summarized arithmetic processing machine

Info

Publication number
JPH0250220A
JPH0250220A JP20019388A JP20019388A JPH0250220A JP H0250220 A JPH0250220 A JP H0250220A JP 20019388 A JP20019388 A JP 20019388A JP 20019388 A JP20019388 A JP 20019388A JP H0250220 A JPH0250220 A JP H0250220A
Authority
JP
Japan
Prior art keywords
data
register
value
value register
maximum value
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.)
Pending
Application number
JP20019388A
Other languages
Japanese (ja)
Inventor
Takao Iwasaki
孝夫 岩崎
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP20019388A priority Critical patent/JPH0250220A/en
Publication of JPH0250220A publication Critical patent/JPH0250220A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

PURPOSE:To execute processing at high speed by executing the large quantity of summarized arithmetic processing with use of hardware. CONSTITUTION:A memory 1 to store data being the subject of summarized arithmetic, and a subject register 2 to take out the data from this memory and to hold the data as subject data are provided. Then, in order to obtain a maximum value, the subject data to be held in the subject register 2 and the data to be held in a maximum value register 4 are compared and the data of a larger value are stored in the maximum value register 4. In case to obtain a minimum value, the comparison is samely executed and the data are stored. In order to obtain a total value, the data to be held in the subject register are added to a total value register. Namely, the summarized arithmetic processing being executed by software is executed by using the hardware. Thus, the processing is executed at the high speed.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は、複数の対象データに対する最大値あるいは
最小値あるいは合計値(及び平均値)等を求める集約演
算をソフトウェアによらずに高速で実行する、コンピュ
ータ装置等における集約演算の処理機構に関する。
[Detailed Description of the Invention] [Objective of the Invention] (Field of Industrial Application) This invention uses software to perform aggregation calculations to obtain the maximum value, minimum value, total value (and average value), etc. for a plurality of target data. The present invention relates to a processing mechanism for aggregation calculations in a computer device, etc., which is executed at high speed without any problems.

(従来の技術) 従来、複数の対象データに対する最大値あるいは最小値
あるいは合計値(及び平均値)等を求める集約演算は、
ソフトウェアを利用して、逐次的に行なわれることが多
かった。
(Prior art) Conventionally, aggregation calculations for calculating the maximum value, minimum value, total value (and average value), etc. for multiple target data are
This was often done sequentially using software.

第2図は、このような従来のソフトウェアによる集約演
算の実行動作を示すフローチャートの一例である。この
例では、複数の対象データに対し、最大値及び合計値を
求め、また対象データ数をカウントすることにより、平
均値をも得ることを可能にしている。
FIG. 2 is an example of a flowchart showing the execution operation of such a conventional software-based aggregation operation. In this example, by finding the maximum value and total value for a plurality of target data, and counting the number of target data, it is also possible to obtain an average value.

第2図の動作を説明すると、最初に、最大値用の記憶領
域及び合計値用の記憶領域を用意し、これら各領域に対
象データの内の先頭のデータを格納する(ステップ10
1乃至103)。また対象データ数のカウンタを[1」
に設定しておく(ステップ105)。
To explain the operation of FIG. 2, first, a storage area for the maximum value and a storage area for the total value are prepared, and the first data of the target data is stored in each of these areas (step 10).
1 to 103). Also, set the counter for the number of target data to [1].
(Step 105).

そして、以下のステップ(109乃至117)を対象デ
ータが無くなるまで繰返す(ステップ107)。
Then, the following steps (109 to 117) are repeated until there is no more target data (step 107).

先ずカウンタに1を加え(ステップ109)、次の(カ
ウンタに保持される番号に対応する順番の)対象データ
を取出す(ステップ111)。
First, 1 is added to the counter (step 109), and the next target data (in the order corresponding to the number held in the counter) is retrieved (step 111).

そして、この取出したデータと以前に最大値用の記憶領
域に保持していたデータとの大きさを比較しくステップ
113)、取出したデータの方が大きければ(ステップ
113肯定)、この取出したデータを最大値用の記憶領
域に格納する(ステップ115)。
Then, compare the size of this extracted data with the data previously held in the maximum value storage area (Step 113). If the extracted data is larger (Yes at Step 113), the extracted data is stored in the storage area for maximum value (step 115).

さらに、この取出したデータを合計値用の記憶領域に加
算する(ステップ115)。
Furthermore, this extracted data is added to the storage area for the total value (step 115).

こうして、全ての対象データについての上記処理が終了
するまで、上述のステップ109から117までを繰返
すと、対象とする全データの最大値及び合計値が得られ
、またこの合計値をカウンタに保持されるデータの総個
数で割るとことにより平均値を得ることもできる。
In this way, by repeating steps 109 to 117 described above until the above processing for all target data is completed, the maximum value and total value of all target data are obtained, and this total value is held in the counter. The average value can also be obtained by dividing by the total number of data.

(発明が解決しようとする課題) このように、従来は、複数の対象データについての最大
値や最小値、合計値、平均値等を求める場合に、ソフト
ウェアを用いて、上述のような集約演算を一つずつ行な
っていた。
(Problem to be Solved by the Invention) Conventionally, when calculating the maximum value, minimum value, total value, average value, etc. of multiple target data, software has been used to perform the aggregation calculations as described above. were done one by one.

このなめ、対象データの個数が増加すればする程、その
集約演算処理に要する時間も膨大なものとなり、コンピ
ュータ等を利用した時、このために大きな時間を専有さ
れていた。
For this reason, as the number of target data increases, the time required for the aggregation processing becomes enormous, and when a computer or the like is used, a large amount of time is occupied for this purpose.

この発明は、このような従来の事情に鑑み、なされたも
ので、大量の処理時間を必要とする集約演算処理をハー
ドウェアを用いて構成した集約演算処理機構を提供する
ことにより、処理を高速で実行できるようにすると共に
、コンピュータ等の専有時間を減少させ、システム等の
処理性能の向上を可能にすることを目的とするものであ
る。
The present invention was made in view of the conventional circumstances, and provides an aggregate arithmetic processing mechanism that uses hardware to perform aggregate arithmetic processing that requires a large amount of processing time, thereby speeding up the processing. The purpose of this is to make it possible to execute the system using a computer, reduce the exclusive time of a computer, etc., and improve the processing performance of the system.

[発明の構成] (課題を解決するための手段) このような目的を達成するために、この発明に係る集約
演算処理機構にあっては、集約演算の対象となる複数の
データを記憶するメモリと、このメモリから前記データ
を一個ずつ取出し、対象データとして保持する対象レジ
スタとを備え、さらに次の3つのグループ、即ち、最大
値レジスタ、及びこの最大値レジスタに格納されるデー
タと前記対象データとを比較し、値の大きい方を前記最
大値レジスタに格納する比較器とからなる第1のグルー
プと、最小値レジスタ、及びこの最小値レジスタに格納
されるデータと前記対象データとを比較し、値の小さい
方を前記最小値レジスタに格納する比較器とからなる第
2のグループと、合計値レジスタ、及びこの合計値レジ
スタに前記対象データを順次加算する加算器、並びに前
記メモリから前記データが一個取出される毎に1ずつ加
算するカウンタからなる第3のグループとを備えて構成
している。
[Structure of the Invention] (Means for Solving the Problems) In order to achieve such an object, the aggregate calculation processing mechanism according to the present invention includes a memory for storing a plurality of data to be subjected to aggregate calculations. and a target register that retrieves the data one by one from this memory and holds it as target data, and further includes the following three groups: a maximum value register, the data stored in this maximum value register, and the target data. a first group consisting of a comparator that compares the values and stores the larger value in the maximum value register, a minimum value register, and compares the data stored in the minimum value register with the target data. , a second group consisting of a comparator that stores the smaller value in the minimum value register, a total value register, an adder that sequentially adds the target data to the total value register, and the data from the memory. and a third group consisting of a counter that increments by 1 each time one is taken out.

(作用) このような構成を有する集約演算処理機構であれば、最
大値を求°めるには、最大値レジスタと、この最大値レ
ジスタに値の大きい方を格納する比較器とを備え、集約
演算処理対象の複数のデータを記憶するメモリから順次
取出し、対象レジスタに保持する対象データと、この最
大値レジスタに保持するデータとを前記比較器により比
較し、値の大きい方を前記最大値レジスタに格納するよ
うにすればよい。
(Function) If the aggregate arithmetic processing mechanism has such a configuration, in order to find the maximum value, it is equipped with a maximum value register and a comparator that stores the larger value in this maximum value register. The comparator compares the data stored in the target register with the data stored in the maximum value register, which sequentially retrieves multiple pieces of data to be subjected to aggregate calculation processing from the memory, and selects the larger value as the maximum value. All you have to do is store it in a register.

最小値を求める場合にも、上記最大値の場合と略同様に
、最小値レジスタと、このレジスタに値の小さい方を格
納する比較器とを備え、対象レジスタに保持するデータ
と順次比較しながら格納すればよい。
When finding the minimum value, in almost the same way as for the maximum value above, we have a minimum value register and a comparator that stores the smaller value in this register, and sequentially compare it with the data held in the target register. Just store it.

また合計値を求めるには、合計値レジスタと、このレジ
スタに前記対象レジスタに保持するデータを加算する加
算器とを備え、順次加算して行けばよい、そして平均値
を求めるには、さらにメモリからデータを一個取出す度
に1ずつ加算するカウンタを有して前記合計値レジスタ
に生成される合計値をこのカウンタが保持するカウント
値で割ればよい。
In addition, to obtain the total value, it is necessary to provide a total value register and an adder that adds the data held in the target register to this register, and perform the additions sequentially.And to obtain the average value, it is sufficient to add the data held in the target register to this register. It is sufficient to have a counter that increments by 1 each time one piece of data is taken out, and divide the total value generated in the total value register by the count value held by this counter.

(実施例) 第1図は、この発明に係る一実施例の集約演算機構のブ
ロック図である。
(Embodiment) FIG. 1 is a block diagram of an aggregation calculation mechanism according to an embodiment of the present invention.

集約演算の対象となる複数のデータを記憶するメモリ1
と、このメモリIから前記データを一個ずつ取出し、対
象データとして保持する対象レジスタ2とがある。
Memory 1 that stores multiple pieces of data that are subject to aggregate calculations
and a target register 2 which takes out the data one by one from this memory I and holds it as target data.

また、最大値レジスタ4と、この最大値レジスタ4に格
納されるデータ、及び対象レジスタ2に保持される対象
データとを比較し、値の大きい方を最大値レジスタ4に
格納する比較器G3とが設けられている。
Also, a comparator G3 compares the maximum value register 4 with the data stored in this maximum value register 4 and the target data held in the target register 2, and stores the larger value in the maximum value register 4. is provided.

同様に、最小値レジスタ6と、この最小値レジスタ6に
格納されるデータ及び対象レジスタ2に保持される対象
データとを比較し、値の小さい方を最小値レジスタ6に
格納する比較器L5とがある。
Similarly, a comparator L5 compares the minimum value register 6 with the data stored in this minimum value register 6 and the target data held in the target register 2, and stores the smaller value in the minimum value register 6. There is.

さらに、合計値レジスタ8と、この合計値レジスタ8に
、対象レジスタ2に保持される対象データを順次加算す
る加算器7と、メモリ1から前記データを一個取出す度
に発生する信号aに応じ、1ずつ加算するカウンタ9と
が設けられている。
Further, in response to a total value register 8, an adder 7 that sequentially adds the target data held in the target register 2 to the total value register 8, and a signal a generated each time one piece of data is taken out from the memory 1, A counter 9 that increments by 1 is provided.

なお、10は出力バスであり、最大値レジスタ4、最小
値レジスタ6、合計値レジスタ8、及びカウンタ9等の
各出力値がこのバス10に出力される。
Note that 10 is an output bus, and each output value of the maximum value register 4, minimum value register 6, total value register 8, counter 9, etc. is output to this bus 10.

次に、この一実施例の集約演算機構の動作について説明
する。
Next, the operation of the aggregation calculation mechanism of this embodiment will be explained.

最初に、メモリ1に集約演算の対象となる複数のデータ
を全て格納しておく。また、合計値レジスタ8及びカウ
ンタ9には零を、最大値レジスタ4には表現可能な最少
の値を、そして最小値レジスタ6には表現可能な最大の
値を、夫々設定して置く。
First, all the plurality of data to be subjected to the aggregation calculation are stored in the memory 1. Further, the total value register 8 and counter 9 are set to zero, the maximum value register 4 is set to the minimum value that can be represented, and the minimum value register 6 is set to the maximum value that can be represented.

次いで、メモリ1から1個の集約演算対象データが読出
され、対象レジスタ2に保持される。この時、新たな対
象データが対象レジスタ2に保持されたことを示す信号
aが対象レジスタ2から送出され、この信号aによりカ
ウンタ9が1だけ加算される。
Next, one piece of aggregate operation target data is read from the memory 1 and held in the target register 2. At this time, a signal a indicating that new target data is held in the target register 2 is sent from the target register 2, and the counter 9 is incremented by 1 based on this signal a.

対象レジスタ2に保持された対象データは、比較器G3
、比較器L5、加算器7に同時に送付される。
The target data held in target register 2 is transferred to comparator G3.
, comparator L5, and adder 7 at the same time.

そして、比較器G3では、この対象データと最大値レジ
スタ4に格納されているデータとを比較し、値の大きい
方を選出して最大値レジスタ4に出力し、格納させる。
Then, the comparator G3 compares this target data with the data stored in the maximum value register 4, selects the one with the larger value, outputs it to the maximum value register 4, and stores it.

また比較器L5では、この対象データと最小値レジスタ
6に格納されているデータとを比較し、値の小さい友を
選出して最小値レジスタ6に出力し、格納させる。
Further, the comparator L5 compares this target data with the data stored in the minimum value register 6, selects a friend with a smaller value, outputs it to the minimum value register 6, and stores it.

さらに加算器7は、この対象データと合計値レジスタ8
に保持されている合計値データとを加算し、その加算結
果を合計値レジスタ8に送り、保持させる。
Furthermore, the adder 7 combines this target data with the total value register 8.
and the total value data held in , and send the addition result to the total value register 8 to be held there.

こうして1個の対象データについての各処理が終了する
と、メモリ1からさらに次の1個のデータが読出され、
上記各処理と同様に処理される。
When each process for one piece of target data is completed in this way, the next piece of data is read out from memory 1,
Processing is performed in the same manner as each process described above.

こうして順次、メモリ1に記憶される集約演算の対象デ
ータが読出され、処理されて行く。そして全ての対象デ
ータについて、上記処理が完了すると、最大値レジスタ
4、最小値レジスタ6、合計値レジスタ8、及びカウン
タ9等に保持される各処理結果の値が出力バス10に各
々出力される。
In this way, the data to be subjected to the aggregation calculation stored in the memory 1 is sequentially read out and processed. When the above processing is completed for all target data, the values of each processing result held in the maximum value register 4, minimum value register 6, total value register 8, counter 9, etc. are output to the output bus 10. .

そして、図示しないコンピュータ等の他装置は、この出
力バス10を介して出力される上記の各位を読取ること
により、最大値、最小値、合計値、件数(カウンタ9の
出力値)に関する集約演算結果を直ちに得ることができ
るようになる。また、平均値については、前記合計値を
得て前記件数で割ることにより直ちにその集約演算結果
を得ることができる。
Then, other devices (not shown), such as a computer, read the above-mentioned items outputted via this output bus 10 to obtain aggregate calculation results regarding the maximum value, minimum value, total value, and number of cases (output value of the counter 9). You will be able to obtain it immediately. Further, regarding the average value, by obtaining the total value and dividing it by the number of cases, the aggregation calculation result can be immediately obtained.

なお、上述の一実施例の集約演算処理機構では、最大値
、最小値、及び合計値(平均値)のいずれについても同
時に演算処理する構成を示したが、勿論この構成に限る
ものではなく、上記3種の内、いずれか1つあるいは2
つだけを選択して構成することも可能である。
In addition, in the aggregation processing mechanism of the above-mentioned embodiment, a configuration was shown in which calculations are performed on all of the maximum value, minimum value, and total value (average value) at the same time, but of course the configuration is not limited to this. Any one or two of the above three types
It is also possible to select and configure only one.

[発明の効果] このように、この発明を適用した集約演算処理機構によ
れば、従来ソフトウェアで一般に行なわれていた集約演
算処理を専用のハードウェアを用いて実行するよう構成
しているため、集約演算処理が高速で行なえるようにな
る。従って、集約演算処理に要していた膨大な時間を大
幅に短縮することが可能になる。
[Effects of the Invention] As described above, the aggregate arithmetic processing mechanism to which the present invention is applied is configured to use dedicated hardware to perform aggregate arithmetic processing that has conventionally been generally performed by software. Aggregate calculation processing can be performed at high speed. Therefore, it becomes possible to significantly reduce the enormous amount of time required for aggregate calculation processing.

またコンピュータ等の、従来、上記処理を担当していた
装置等は、この大量の時間を要する集約演算処理から解
放され、他の各処理の実行にその時間を割当てることが
可能になるため、システム等としての処理性能を向上さ
せることができるようになる。
In addition, devices such as computers that were traditionally responsible for the above processing are freed from the intensive calculation processing that requires a large amount of time, and can allocate that time to executing other processes. It becomes possible to improve the processing performance as

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明に係る一実施例の集約演算処理機構の
ブロック図、第2図は従来のソフトウェアによる集約演
算処理の一動作例を示すフローチャートである。 1・・・メモリ 3・・・比較器G 5・・・比較器L 7・・・加算器 9・・・カウンタ 2・・・対象レジスタ 4・・・最大値レジスタ 6・・・最小値レジスタ 8・・・合計値レジスタ 10・・・出力バス
FIG. 1 is a block diagram of an aggregate arithmetic processing mechanism according to an embodiment of the present invention, and FIG. 2 is a flowchart showing an example of the operation of aggregate arithmetic processing by conventional software. 1...Memory 3...Comparator G 5...Comparator L 7...Adder 9...Counter 2...Target register 4...Maximum value register 6...Minimum value register 8...Total value register 10...Output bus

Claims (1)

【特許請求の範囲】[Claims] (1)集約演算の対象となる複数のデータを記憶するメ
モリと、このメモリから前記データを一個ずつ取出し、
対象データとして保持する対象レジスタと、 最大値レジスタ、及びこの最大値レジスタに格納される
データと前記対象データとを比較し、値の大きい方を前
記最大値レジスタに格納する比較器とからなる第1のグ
ループと、 最小値レジスタ、及びこの最小値レジスタに格納される
データと前記対象データとを比較し、値の小さい方を前
記最小値レジスタに格納する比較器とからなる第2のグ
ループと、 合計値レジスタ、及びこの合計値レジスタに前記対象デ
ータを順次加算する加算器、並びに前記メモリから前記
データが一個取出される毎に1ずつ加算するカウンタか
らなる第3のグループと、を具備することを特徴とする
集約演算処理機構。
(1) A memory that stores a plurality of data to be subjected to an aggregation operation, and extracts the data one by one from this memory,
A comparator comprising a target register held as target data, a maximum value register, and a comparator that compares the data stored in the maximum value register with the target data and stores the larger value in the maximum value register. a second group consisting of a minimum value register, and a comparator that compares the data stored in the minimum value register with the target data and stores the smaller value in the minimum value register; , a third group consisting of a total value register, an adder that sequentially adds the target data to the total value register, and a counter that adds 1 each time one piece of the data is taken out from the memory. An aggregate calculation processing mechanism characterized by the following.
JP20019388A 1988-08-12 1988-08-12 Summarized arithmetic processing machine Pending JPH0250220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20019388A JPH0250220A (en) 1988-08-12 1988-08-12 Summarized arithmetic processing machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20019388A JPH0250220A (en) 1988-08-12 1988-08-12 Summarized arithmetic processing machine

Publications (1)

Publication Number Publication Date
JPH0250220A true JPH0250220A (en) 1990-02-20

Family

ID=16420346

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20019388A Pending JPH0250220A (en) 1988-08-12 1988-08-12 Summarized arithmetic processing machine

Country Status (1)

Country Link
JP (1) JPH0250220A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101104850B1 (en) * 2003-05-19 2012-01-16 허진 Automatic rising structure for bar-like member and method of producing bar-like member
DE102009003293B4 (en) 2008-05-22 2021-11-04 Denso Corporation Exhaust emission control device for internal combustion engine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101104850B1 (en) * 2003-05-19 2012-01-16 허진 Automatic rising structure for bar-like member and method of producing bar-like member
DE102009003293B4 (en) 2008-05-22 2021-11-04 Denso Corporation Exhaust emission control device for internal combustion engine

Similar Documents

Publication Publication Date Title
CN112446007A (en) Matrix operation method, operation device and processor
JPH0250220A (en) Summarized arithmetic processing machine
US4038538A (en) Integer and floating point to binary converter
Vassiliadis et al. Block based compression storage expected performance
US6718356B1 (en) In-place operation method and apparatus for minimizing the memory of radix-r FFTs using maximum throughput butterflies
WO2021120646A1 (en) Data processing system
JPH0528431B2 (en)
JP2003244190A (en) Processor for data flow control switch and data flow control switch
US9311274B2 (en) Approach for significant improvement of FFT performance in microcontrollers
CN112464157B (en) Vector ordering method and system
JP2696903B2 (en) Numerical calculator
JP3105842B2 (en) Ring buffer control method and processing device thereof
JP2735255B2 (en) Hatching treatment method
JPH02100135A (en) Method of controlling signal processor
JPH01263735A (en) Real register address preparing circuit
CN115374388A (en) Multidimensional array compression and decompression method and device
CN116225532A (en) General processor supporting acceleration vector operation
JPS59188900A (en) Data processor
KR920008212B1 (en) 2-dimension fast fourier transform processor by using mixed shuffle connection method
JPS62212723A (en) Access system for general-purpose register
JPH09190336A (en) Bucket sort processing system using vector arithmetic unit
JPH03163630A (en) Stack control method for processor
JPS60250475A (en) Vector processor
JPH0553759A (en) Fixed decimal point arithmetic unit
JPS59197920A (en) Address controlling device