JPH04281521A - Parallel sort device - Google Patents

Parallel sort device

Info

Publication number
JPH04281521A
JPH04281521A JP4491791A JP4491791A JPH04281521A JP H04281521 A JPH04281521 A JP H04281521A JP 4491791 A JP4491791 A JP 4491791A JP 4491791 A JP4491791 A JP 4491791A JP H04281521 A JPH04281521 A JP H04281521A
Authority
JP
Japan
Prior art keywords
data
processor
processor element
key data
comparison
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
JP4491791A
Other languages
Japanese (ja)
Inventor
Hiroshi Mori
啓 森
Ichigaku Asano
浅野 一学
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP4491791A priority Critical patent/JPH04281521A/en
Publication of JPH04281521A publication Critical patent/JPH04281521A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PURPOSE:To output data after rearranging the data in a prescribed order without increasing a buffer capacity, even when plural processor elements having the same data are present. CONSTITUTION:Key data stored in memories 201-241 of each processor element 200-240 are successively transmitted to a global bus 260 by the control of transmitting timing counters 204-244. Then, the transmitted data are compared with the data stored in the memories of each processor element by comparator circuits 203-243, and the compared result is counted by compared result counters 204-244. Then, the number of the data transmitted to the global bus is counted by the transmitting timing counters 205-245, and whether or not the compared result is counted by the compared result counters 204-244 is controlled when the compared result is an equal one, based on the counted result of the transmitting timing counters. A also, the key data and record data stored in the memories of each processor element are outputted in the prescribed order, based on the count values of the compared result counters 204-244.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、複数のプロセッサ要素
とこの複数のプロセッサ要素にそれぞれ接続された複数
のメモリをグローバルバスにより接続するマルチプロセ
ッサ構成を採る並列ソート装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a parallel sorting device having a multiprocessor configuration in which a plurality of processor elements and a plurality of memories respectively connected to the plurality of processor elements are connected by a global bus.

【0002】0002

【従来の技術】複数のモジュールにデータが分散して格
納されているシステムにおいては、格納されているデー
タのキーについて昇順(降順)に並び換えて、外部に出
力するソート処理が必要である。
2. Description of the Related Art In a system in which data is distributed and stored in a plurality of modules, it is necessary to sort the keys of the stored data in ascending order (descending order) and outputting the data to the outside.

【0003】ソート処理のアルゴリズムは幾つか提案さ
れているが、その中の一つに並列計数ソート法がある[
安浦、高木:”並列計数ソートによる高速ソーティング
回路”、信学会論文誌”82/2、Vol.J65−D
, No.2,pp.179−186(1982)]。 並列計数ソーティングの基本となる計数ソート法は、順
位付け処理、および並び換え処理の2つの処理からなる
[0003] Several algorithms for sorting processing have been proposed, one of which is the parallel counting sorting method [
Yasuura, Takagi: “High-speed sorting circuit using parallel counting sort”, IEICE Transactions” 82/2, Vol. J65-D
, No. 2, pp. 179-186 (1982)]. The counting sorting method, which is the basis of parallel counting sorting, consists of two processes: ranking processing and rearranging processing.

【0004】順位付け処理:各キーデータ(レコードデ
ータの一部)をもとに各々の順位を決定する。
[0004] Ranking process: The ranking of each key data (a part of record data) is determined.

【0005】並び換え処理:順位付け処理の結果をもと
にレコードデータの並び換えを行う。
[0005] Sorting process: Record data is sorted based on the results of the ranking process.

【0006】順位付け処理を説明すると、システムを構
成するモジュールは自分が保持するキーデータよりも小
さい(大きい)キーデータが他のモジュールに何個ある
のかをカウントして、そのカウント数をもとに順位を決
定する。一方、並び換え処理に関しては、キーデータを
任意の規則(例えばモジュールごとに割り当てられたア
ドレス順)に従って送信し、受信側で送られてきたデー
タを順位付け処理で得られた順位をもとに並び換えを行
う方法を採っている。並列計数ソートは、上記の順位付
け処理を各モジュールが並列に実行する方法である。
[0006] To explain the ranking process, the modules that make up the system count how many pieces of key data smaller (larger) than the key data it owns are in other modules, and based on the counted number. to determine the ranking. On the other hand, regarding sorting processing, key data is transmitted according to arbitrary rules (for example, the order of addresses assigned to each module), and the received data is sorted based on the ranking obtained by ranking processing. A method of sorting is used. Parallel count sorting is a method in which each module executes the above ranking process in parallel.

【0007】しかし、安浦らが提案している並列計数ソ
ートでは、キーデータ、レコードデータのモジュールか
らの送出がキーデータの昇順(降順)ではなく、キーデ
ータの入力順に従って送出されるので、ソートされたレ
コードデータを得るには、キーデータを並べ換えるため
の機能を管理モジュール(全モジュールを管理する機能
を有する)に付加する方法、あるいは、管理モジュール
がモジュールにポーリングをかける方法を必要とする。 前者の方法は、バッファの容量が大きくなり、後者の方
法はポーリング処理の時間分ソートの実行時間が増加す
る問題点を持っている。
However, in the parallel counting sort proposed by Yasuura et al., the key data and record data are sent out from the module according to the input order of the key data rather than the ascending order (descending order) of the key data. In order to obtain the recorded record data, it is necessary to add a function for sorting key data to the management module (which has the function of managing all modules), or a method for the management module to poll the modules. . The former method has a problem in that the buffer capacity becomes large, and the latter method has a problem in that the execution time for sorting increases by the time taken for polling processing.

【0008】この問題点を解決するために、複数のプロ
セッサ要素がバス結合したマルチプロセッサで、各プロ
セッサ要素にレジスタ、加算回路、および比較回路を付
加して、並べ換えのためのバッファ、および並べ換え処
理時間が不要な並列計数ソートを特許として出願申請中
である。
In order to solve this problem, in a multiprocessor in which a plurality of processor elements are bus-coupled, a register, an addition circuit, and a comparison circuit are added to each processor element, and a buffer for rearrangement and a rearrangement processing are added. We are currently applying for a patent for parallel counting sort that does not require time.

【0009】しかし、上記の特許案では、同一キーデー
タが複数のプロセッサ要素に存在する状態を想定してい
ないため、キーデータ、レコードデータの送信制御に関
して問題がある。以下、従来技術の問題点を具体的に説
明する。
However, the above-mentioned patent does not assume a situation in which the same key data exists in a plurality of processor elements, and therefore there is a problem regarding transmission control of key data and record data. The problems of the prior art will be specifically explained below.

【0010】同一キーデータが複数のプロセッサに存在
する場合について、従来の並列計数ソートの処理を図4
を使って説明する。メモリ101,111,121,1
31,141にそれぞれ接続するプロセッサ要素100
,110,120,130,140と外部情報処理装置
(ホスト)とのインタフェース制御を行う制御プロセッ
サ150とがグローバルバス160を介して接続される
マルチプロセッサ構成のもとで、並列計数ソートが実行
されるものとする。プロセッサ要素100,110,1
20,130,140にそれぞれ接続されるメモリ10
1,111,121,131,141は、各アドレスに
キー(キーデータ)、レコード(レコードデータ)の二
項目を一対として格納しており、プロセッサ要素100
のメモリ101のアドレス1にはキー456、レコード
B、プロセッサ要素110のメモリ111のアドレス1
にはキー123、レコードA、プロセッサ要素120の
メモリ121のアドレス1にはキー789、レコードE
、プロセッサ要素130のメモリ131のアドレス1に
はキー456、レコードC、プロセッサ140のメモリ
141のアドレス1にはキー456、レコードDが各々
格納されている。
FIG. 4 shows the conventional parallel counting sort process when the same key data exists in multiple processors.
Explain using. Memory 101, 111, 121, 1
31 and 141, respectively.
, 110, 120, 130, 140 and a control processor 150 that performs interface control with an external information processing device (host) are connected via a global bus 160. Parallel counting sort is executed. shall be Processor elements 100, 110, 1
Memory 10 connected to 20, 130, 140, respectively
1, 111, 121, 131, and 141 store two items, a key (key data) and a record (record data), as a pair at each address, and the processor element 100
Address 1 of the memory 101 of the processor element 110 contains the key 456, record B, and address 1 of the memory 111 of the processor element 110.
has key 123 and record A, and address 1 of memory 121 of processor element 120 has key 789 and record E.
, a key 456 and a record C are stored at address 1 of the memory 131 of the processor element 130, and a key 456 and a record D are stored at address 1 of the memory 141 of the processor 140, respectively.

【0011】外部情報処理装置(ホスト)から制御プロ
セッサ150、グローバルバス160を介してプロセッ
サ要素100,110,120,130,140に昇順
ソート指示要求が送信されると、プロセッサ要素100
,110,120,130,140はメモリ101,1
11,121,131,141のアドレス1に格納され
ているキーデータをアクセスして、レジスタ102,1
12,122,132,142にそれぞれ保持し、続い
てプロセッサ要素ごとに与えられているプロセッサアド
レスを送信タイミングカウンタ104,114,124
,134,144に設定する[ここでは説明を簡単にす
るために、プロセッサ要素100のプロセッサアドレス
は0、プロセッサ要素110のプロセッサアドレスは1
、プロセッサ要素120のプロセッサアドレスは2、プ
ロセッサ要素130のプロセッサアドレスは3、プロセ
ッサ要素140のプロセッサアドレスは4であるとする
]。プロセッサ要素100,110,120,130,
140はグローバルバス160上のデータ数を送信タイ
ミングカウンタ104,114,124,134,14
4でカウントダウンして、カウンタの値が0になったプ
ロセッサ要素から自レジスタに保持しているキーデータ
を順次グローバルバス160に送信する。
When an ascending sort instruction request is sent from an external information processing device (host) to the processor elements 100 , 110 , 120 , 130 , 140 via the control processor 150 and the global bus 160 , the processor element 100
, 110, 120, 130, 140 are memories 101, 1
Access the key data stored in address 1 of 11, 121, 131, 141 and register 102, 1
12, 122, 132, and 142, respectively, and then transmit timing counters 104, 114, and 124 with processor addresses given to each processor element.
, 134, 144 [Here, to simplify the explanation, the processor address of processor element 100 is 0, and the processor address of processor element 110 is 1.
, the processor address of processor element 120 is 2, the processor address of processor element 130 is 3, and the processor address of processor element 140 is 4]. Processor elements 100, 110, 120, 130,
140 is a timing counter 104, 114, 124, 134, 14 for transmitting the number of data on the global bus 160.
4, and the key data held in its own register is sequentially transmitted to the global bus 160 from the processor element whose counter value becomes 0.

【0012】図4では、プロセッサ要素100の送信タ
イミングカウンタ104の値が一番目に0となるので、
プロセッサ要素100はレジスタ102に保持している
キーデータ456を送信して、他のプロセッサ要素11
0,120,130,140は当該キーデータを受信し
、レジスタに保持しているキーデータと受信キーデータ
456を大小比較回路115,125,135,145
により比較して、保持しているキーが受信キーデータよ
りも大きい場合には、比較結果カウンタ113,123
,133,143を+1だけ更新する。以後、プロセッ
サ要素110,120,130,140の順序でキーデ
ータの送信が行われ、比較結果カウンタ103,113
,123,133,143の更新も実行される。以上の
処理結果、比較結果カウンタ103,113,123,
133,143の値はそれぞれ1,0,4,1,1とな
り、その値を送信タイミングカウンタ104,114,
124,134,144に設定する。また、プロセッサ
要素100,110,120,130,140はレジス
タ102,112,122,132,142にアドレス
1にあるキーデータ、レコードデータを設定する。 図4は、以上の処理結果を示す図である。
In FIG. 4, since the value of the transmission timing counter 104 of the processor element 100 becomes 0 first,
The processor element 100 transmits the key data 456 held in the register 102 to other processor elements 11.
0, 120, 130, 140 are magnitude comparison circuits 115, 125, 135, 145 which receive the key data and compare the key data held in the register with the received key data 456.
If the held key is larger than the received key data, the comparison result counters 113 and 123
, 133, and 143 are updated by +1. Thereafter, key data is transmitted in the order of processor elements 110, 120, 130, 140, and comparison result counters 103, 113
, 123, 133, and 143 are also updated. The above processing results, comparison result counters 103, 113, 123,
The values of 133 and 143 are 1, 0, 4, 1, and 1, respectively, and the values are sent to the transmission timing counters 104, 114,
Set to 124, 134, 144. Further, the processor elements 100, 110, 120, 130, 140 set the key data and record data at address 1 in the registers 102, 112, 122, 132, 142. FIG. 4 is a diagram showing the results of the above processing.

【0013】次に、プロセッサ要素100,110,1
20,130,140はグローバルバス160上のデー
タ数を送信タイミングカウンタ104,114,124
,134,144によりカウントダウンしていき、その
カウンタ値が0になった時に送信回路106,116,
126,136,146はレジスタ102,112,1
22,132,142に保持しているキーデータ、レコ
ードデータをグローバルバス160に送信するが、送信
タイミングカウンタの値が0でないプロセッサ要素は送
信タイミングカウンタの値が0になるまでカウントダウ
ンを継続する。図4では、まずプロセッサ要素110の
送信タイミングカウンタ114のカウンタ値が一番目に
0となるので、レジスタ112に保持しているキーデー
タ123、レコードデータAをグローバルバス160に
送信する。次に送信タイミングカウンタの値が0となる
プロセッサ要素は、100,130,140であるが、
各プロセッサ要素は同時にキーデータ、レコードデータ
の送信を実行しようとするために、送信順序が競合する
Next, processor elements 100, 110, 1
20, 130, 140 are transmission timing counters 104, 114, 124 that measure the number of data on the global bus 160.
, 134, 144, and when the counter value reaches 0, the transmitting circuits 106, 116,
126, 136, 146 are registers 102, 112, 1
The key data and record data held in 22, 132, and 142 are transmitted to the global bus 160, but the processor element whose transmission timing counter value is not 0 continues counting down until the transmission timing counter value becomes 0. In FIG. 4, first, the counter value of the transmission timing counter 114 of the processor element 110 becomes 0, so the key data 123 and record data A held in the register 112 are transmitted to the global bus 160. The next processor elements whose transmission timing counter value becomes 0 are 100, 130, and 140.
Since each processor element attempts to transmit key data and record data at the same time, there is a conflict in the transmission order.

【0014】[0014]

【発明が解決しようとする課題】上述したように、並列
計数ソート処理では、送信タイミングカウンタの値が0
となるプロセッサ要素、すなわち同一キーデータを有す
る部要素が複数存在すると、この複数のプロセッサ要素
間において送信順序が競合するという問題がある。
[Problems to be Solved by the Invention] As mentioned above, in parallel counting sort processing, the value of the transmission timing counter is 0.
If there are a plurality of processor elements having the same key data, there is a problem that the transmission order conflicts between the plurality of processor elements.

【0015】また、このような競合を回避する方法とし
て、プロセッサ要素間で同一キーを有するプロセッサ要
素の識別子(プロセッサアドレス)を比較する手段、そ
の結果をカウントするカウンタ、および送信時にそのカ
ウンタの結果をカウントダウンするカウンタを各プロセ
ッサ要素に追加する方法が考えられるが、この方法はプ
ロセッサ要素に多くのハードウェアの追加を必要とし、
非経済的であるという問題がある。
[0015] In addition, as a method for avoiding such conflicts, a means for comparing the identifiers (processor addresses) of processor elements having the same key between processor elements, a counter for counting the result, and a means for comparing the result of the counter at the time of transmission are provided. One possibility is to add a counter to each processor element to count down the value, but this method requires adding a lot of hardware to the processor element.
The problem is that it is uneconomical.

【0016】本発明は、上記に鑑みてなされたもので、
その目的とするところは、同一データを有する複数のプ
ロセッサ要素が存在する場合にも、並び換えのためのバ
ッファ容量を増大することなく、データを所定の順番で
並び換えて出力する並列ソート装置を提供することにあ
る。
The present invention has been made in view of the above, and
The objective is to create a parallel sorting device that sorts and outputs data in a predetermined order without increasing the buffer capacity for sorting even when there are multiple processor elements that have the same data. It is about providing.

【0017】[0017]

【課題を解決するための手段】上記目的を達成するため
、本発明の並列ソート装置は、各々メモリを有する複数
のプロセッサ要素が共通バスを介して接続されたマルチ
プロセッサシステムから前記メモリにそれぞれ格納され
たデータを所定の順番で並び換えて出力する並列ソート
装置であって、各プロセッサ要素は、自己のメモリに格
納されたデータを所定の順序で順次共通バスに送出する
送出制御手段と、該送出制御手段により共通バスに送出
されたデータを自己のメモリに格納されたデータと比較
する比較手段と、この比較結果を計数する比較結果計数
手段と、前記送出制御手段の制御による共通バスに送出
されたデータの数を計数するデータ数計数手段と、前記
比較手段による比較結果が等しい場合に該比較手段の比
較結果を前記比較結果計数手段で計数するか否かを前記
データ数計数手段の計数結果に基づいて制御する制御手
段と、前記比較結果計数手段の計数値に基づいて各プロ
セッサ要素のメモリに記憶されているデータを所定の順
番で出力する出力制御手段とを有することを要旨とする
[Means for Solving the Problems] In order to achieve the above object, the parallel sorting device of the present invention provides a parallel sorting device in which a plurality of processor elements each having a memory are stored in the memory from a multiprocessor system connected via a common bus. A parallel sorting device that rearranges and outputs data stored in a predetermined order in a predetermined order, and each processor element includes a sending control unit that sequentially sends data stored in its own memory to a common bus in a predetermined order; a comparison means for comparing the data sent to the common bus by the sending control means with data stored in its own memory; a comparison result counting means for counting the results of the comparison; and sending the data to the common bus under the control of the sending control means. a data number counting means for counting the number of data that has been compared; and a data number counting means for counting whether or not the comparison result of the comparison means is counted by the comparison result counting means when the comparison results by the comparison means are equal. The gist of the present invention is to have a control means for controlling based on the result, and an output control means for outputting data stored in the memory of each processor element in a predetermined order based on the count value of the comparison result counting means. .

【0018】[0018]

【作用】本発明の並列ソート装置では、各プロセッサ要
素のメモリに格納されたデータを所定の順序で順次共通
バスに送出し、この出力されたデータと各プロセッサ要
素のメモリに格納されているデータとを比較し、この比
較結果を比較結果計数手段で計数するとともに、共通バ
スに送出されたデータの数をデータ数計数手段で計数し
、前記比較結果が等しい場合に該比較結果を前記比較結
果計数手段で計数するか否かを前記データ数計数手段の
計数結果に基づいて制御し、前記比較結果計数手段の計
数値に基づいて各プロセッサ要素のメモリに記憶されて
いるデータを所定の順番で出力する。
[Operation] The parallel sorting device of the present invention sequentially sends the data stored in the memory of each processor element to the common bus in a predetermined order, and combines this output data with the data stored in the memory of each processor element. The comparison result is counted by a comparison result counting means, and the number of data sent to the common bus is counted by a data number counting means, and if the comparison results are equal, the comparison result is used as the comparison result. Controlling whether or not to count by the counting means based on the count result of the data number counting means, and sorting the data stored in the memory of each processor element in a predetermined order based on the count value of the comparison result counting means. Output.

【0019】[0019]

【実施例】以下、図面を用いて本発明の実施例を説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Examples of the present invention will be described below with reference to the drawings.

【0020】図1は、本発明の一実施例に係わる並列ソ
ート装置が適用される並列プロセッサ構成の全体構成図
である。同図において、250は並列プロセッサと外部
処理装置(ホスト)とのインタフェースを制御する制御
プロセッサ、200,210,220,230,240
はプロセッサ要素、260はプロセッサ要素200,2
10,220,230,240間を接続するグローバル
バスである。
FIG. 1 is an overall configuration diagram of a parallel processor configuration to which a parallel sorting device according to an embodiment of the present invention is applied. In the figure, 250 is a control processor that controls the interface between the parallel processor and an external processing device (host); 200, 210, 220, 230, 240;
is a processor element, 260 is a processor element 200,2
This is a global bus that connects 10, 220, 230, and 240.

【0021】図2は、各プロセッサ要素200,210
,220,230,240の内部構成を詳細に示すブロ
ック図である。各プロセッサ要素は、同じように構成さ
れているので、図2はプロセッサ要素200について示
している。なお、各プロセッサ要素200,210,2
20,230,240は、図2に示すものと同じ構成要
素を有しているが、図1においては各符号の十位の番号
が各プロセッサ要素の十位の番号と一致する符号で示さ
れている。
FIG. 2 shows each processor element 200, 210
, 220, 230, 240 in detail. FIG. 2 depicts processor element 200 since each processor element is similarly configured. Note that each processor element 200, 210, 2
20, 230, and 240 have the same components as shown in FIG. 2, but in FIG. ing.

【0022】図2において、201はメモリ、202は
メモリから読み出したキーデータを登録するレジスタ、
203はレジスタ302の内容とグローバルバスから送
られてきたキーデータを比較する比較回路、204は比
較回路203の結果とカウンタ制御回路207の指示に
より+1加算の更新を行う比較結果カウンタ、205は
グローバルバス上のデータ数をカウントする送信タイミ
ングカウンタ、206は送信タイミングカウンタ205
の結果によりレジスタ202に保持されているデータの
送信を指示する送信回路、207は送信タイミングカウ
ンタ205の値が0より大きい場合には他プロセッサ要
素のレジスタに保持されている同一キーデータも含めて
レジスタ202に保持されているキーデータよりも小さ
いキーデータをカウントの対象とし、送信タイミングカ
ウンタ205の値が0以下の場合にはレジスタ202に
保持されているキーデータより小さいキーデータのみを
カウントの対象とするように比較回路203を通じて比
較結果カウンタ204へ指示を出すカウンタ制御回路で
ある。
In FIG. 2, 201 is a memory, 202 is a register for registering key data read from the memory,
203 is a comparison circuit that compares the contents of the register 302 and the key data sent from the global bus; 204 is a comparison result counter that performs +1 addition updating according to the result of the comparison circuit 203 and instructions from the counter control circuit 207; 205 is a global A transmission timing counter that counts the number of data on the bus, 206 is a transmission timing counter 205
A transmitting circuit 207 instructs to transmit the data held in the register 202 based on the result of , and a transmitting circuit 207 includes the same key data held in the registers of other processor elements if the value of the sending timing counter 205 is greater than 0. The key data smaller than the key data held in the register 202 is counted, and if the value of the transmission timing counter 205 is 0 or less, only the key data smaller than the key data held in the register 202 is counted. This is a counter control circuit that issues an instruction to the comparison result counter 204 through the comparison circuit 203 to target the comparison result.

【0023】次に、以上のように構成される並列ソート
装置の作用について説明する。
Next, the operation of the parallel sorting device constructed as above will be explained.

【0024】外部情報処理装置(ホスト)は、昇順ソー
ト指示要求を制御プロセッサ250に対して送信し、制
御プロセッサ250は当該命令を受信して、グローバル
バス260を介して全プロセッサ要素200,210,
220,230,240に送信する。プロセッサ要素2
00,210,220,230,240は制御プロセッ
サ250から当該命令を受信すると、メモリ201,2
11,221,231,241のアドレス1にあるキー
データに対してリードアクセスを行い、当該命令に対応
するキーデータをレジスタ202,212,222,2
32,242に格納する。この処理は各プロセッサ要素
200,210,220,230,240で同時に処理
される。すなわち、この処理の結果としてレジスタ20
2にはキーデータ456、レジスタ212にはキーデー
タ123、レジスタ222にはキーデータ789、レジ
スタ232にはキーデータ456、レジスタ242には
キーデータ456が各々格納される。
The external information processing device (host) transmits an ascending sort instruction request to the control processor 250, and the control processor 250 receives the instruction and sends all processor elements 200, 210,
220, 230, 240. Processor element 2
00, 210, 220, 230, 240 receive the relevant instruction from the control processor 250, and then the memories 201, 2
Read access is made to the key data at address 1 of 11, 221, 231, 241, and the key data corresponding to the instruction is stored in registers 202, 212, 222, 2.
32,242. This processing is performed simultaneously by each processor element 200, 210, 220, 230, and 240. That is, as a result of this processing, the register 20
2 stores key data 456, register 212 stores key data 123, register 222 stores key data 789, register 232 stores key data 456, and register 242 stores key data 456, respectively.

【0025】プロセッサ要素200,210,220,
230,240が他のプロセッサ要素200,210,
220,230,240に対してグローバルバス260
を介してキーデータの送信を行う際、プロセッサ要素2
00,210,220,230,240はあらかじめプ
ロセッサ要素ごとに割り当てられている識別子(プロセ
ッサアドレス)を送信タイミングカウンタ204,21
4,224,234,244に設定し、送信タイミング
カウンタ204,214,224,234,244はグ
ローバルバス260上のデータ数によってカウンタに設
定された値のカウントダウンを実行し、カウンタ値が0
になった時、レジスタ202,212,222,232
,242に保持しているキーデータをグローバルバス2
60へ送信する[ここでは、プロセッサ要素200、プ
ロセッサ要素210、プロセッサ要素220、プロセッ
サ要素230、プロセッサ要素240の順序で送信する
ものとする]。
Processor elements 200, 210, 220,
230, 240 are other processor elements 200, 210,
Global bus 260 for 220, 230, 240
When transmitting key data via the processor element 2
00, 210, 220, 230, 240 are transmission timing counters 204, 21 that transmit identifiers (processor addresses) assigned in advance to each processor element.
4,224,234,244, and the transmission timing counters 204, 214, 224, 234, 244 count down the value set in the counter according to the number of data on the global bus 260, and when the counter value is 0,
When , registers 202, 212, 222, 232
, 242 is transferred to the global bus 2.
60 [Here, it is assumed that the data is transmitted in the order of processor element 200, processor element 210, processor element 220, processor element 230, and processor element 240].

【0026】はじめに、受信元のプロセッサ要素210
,220,230,240は送信元のプロセッサ要素2
00から送信されたキーデータ456を受信し、比較回
路213,223,233,243はレジスタ212,
222,232,242に登録されているキーデータと
受信したキーデータ456の比較を行う。レジスタ21
2に登録されているキーデータ123は受信キーデータ
456よりも小さいので比較結果カウンタ214の値は
更新されないが、レジスタ222に登録されているキー
データ789は受信キーデータ456よりも大きいので
、カウンタ制御回路227は比較結果カウンタ224に
対して+1更新を指示する。また、レジスタ232,2
42は受信キーデータ456と同一キーデータを保持し
ているが、送信タイミングカウンタ235,245の値
が各々2,3であるため、カウンタ制御回路237,2
47が比較結果カウンタ234,244に対して+1更
新を指示する。
First, the receiving processor element 210
, 220, 230, 240 are the sending processor elements 2
The comparison circuits 213, 223, 233, 243 receive the key data 456 sent from the register 212,
The key data registered in 222, 232, and 242 is compared with the received key data 456. register 21
Since the key data 123 registered in register 222 is smaller than the received key data 456, the value of the comparison result counter 214 is not updated, but the key data 789 registered in the register 222 is larger than the received key data 456, so the value of the comparison result counter The control circuit 227 instructs the comparison result counter 224 to update by +1. Also, registers 232, 2
42 holds the same key data as the received key data 456, but since the values of the transmission timing counters 235 and 245 are 2 and 3, respectively, the counter control circuits 237 and 2
47 instructs the comparison result counters 234 and 244 to be updated by +1.

【0027】次のデータ送信ではプロセッサ要素210
の送信タイミングカウンタ215の値が0となるので、
レジスタ212に保持されているキーデータ123がグ
ローバルバス260に送信される。プロセッサ要素20
0では、送信タイミングカウンタ205の値が−1とな
っているが、レジスタ202が保持するキーデータ45
6が受信キーデータ123より大きいので、カウンタ制
御回路207は比較結果カウンタ204に対して+1更
新を指示する。また、プロセッサ要素220,230,
240のレジスタ222,232,242が保持するキ
ーデータはいずれも受信キーデータ123より大きいの
で、カウンタ制御回路227,237,247は比較結
果カウンタ224,234,244に対しても+1更新
を指示する。
In the next data transmission, processor element 210
Since the value of the transmission timing counter 215 becomes 0,
Key data 123 held in register 212 is transmitted to global bus 260. processor element 20
0, the value of the transmission timing counter 205 is -1, but the key data 45 held by the register 202
6 is larger than the received key data 123, the counter control circuit 207 instructs the comparison result counter 204 to update by +1. Additionally, processor elements 220, 230,
Since the key data held by the registers 222, 232, 242 of 240 are all larger than the received key data 123, the counter control circuits 227, 237, 247 also instruct the comparison result counters 224, 234, 244 to update by +1. .

【0028】以後、送信タイミングカウンタ224,2
34,244の値が0となる順序に従って、レジスタが
保持するキーデータの送信がプロセッサ要素220,2
30,240の順序で実行されて、キーデータの送信毎
に他プロセッサ要素200,210,220,230,
240の送信タイミングカウンタ203,213,22
3,233,243の更新も実行される。左記の処理が
終了した結果、比較結果カウンタ204,214,22
4,234,244の値は各々1,0,4,2,3に更
新される。次に、プロセッサ要素200,210,22
0,230,240は送信タイミングカウンタ205,
215,225,235,245の値を0にリセットし
てから、比較結果カウンタ204,214,224,2
34,244の最終結果を送信タイミングカウンタ20
5,215,225,235,245にセットし、また
レジスタ202,212,222,232,242には
キーデータ、レコードデータをセットしておく。図2は
、以上の処理結果を示すシステム全体図である。
Thereafter, the transmission timing counter 224,2
The key data held in the registers is transmitted to the processor elements 220 and 2 in accordance with the order in which the values of 34 and 244 become 0.
30, 240, and other processor elements 200, 210, 220, 230, 200, 210, 220, 230,
240 transmission timing counters 203, 213, 22
Updates of 3,233,243 are also executed. As a result of the completion of the processing described on the left, the comparison result counters 204, 214, 22
The values of 4,234,244 are updated to 1, 0, 4, 2, and 3, respectively. Next, processor elements 200, 210, 22
0, 230, 240 are the transmission timing counter 205,
After resetting the values of 215, 225, 235, and 245 to 0, the comparison result counters 204, 214, 224, and 2
The final result of 34,244 is sent to the timing counter 20.
5, 215, 225, 235, and 245, and key data and record data are set in registers 202, 212, 222, 232, and 242. FIG. 2 is an overall system diagram showing the above processing results.

【0029】次に、図3を用いて各プロセッサ要素が図
1に示す状態からレコードデータ、キーデータの送信を
開始する場合の動作を具体的に説明する。プロセッサ要
素のデータ送信は、グローバルバス上のデータ数を送信
タイミングカウンタがカウントダウンすることにより始
まる。
Next, the operation when each processor element starts transmitting record data and key data from the state shown in FIG. 1 will be specifically explained using FIG. 3. Data transmission by a processor element begins when a transmission timing counter counts down the number of data on the global bus.

【0030】なお、図3において、各プロセッサ要素2
00,210,220,230,240の下方に記載さ
れている初期状態を含む各プロセッサの内部状態を示す
括弧()または送信データを示す角括弧[]内の意味は
、(K,L,M)および[K,L,M]とした場合、K
はキーデータを示し、Lはレコードデータを示し、Mは
送信タイミングカウンタの値を示す。
Note that in FIG. 3, each processor element 2
00, 210, 220, 230, 240, the meaning in parentheses () indicating the internal state of each processor including the initial state or in square brackets [] indicating the transmission data is (K, L, M ) and [K,L,M], then K
indicates key data, L indicates record data, and M indicates the value of the transmission timing counter.

【0031】図3では、順番Iで第1番目のデータが送
信され、プロセッサ要素はデータ数のカウントダウンを
開始する。まず、プロセッサ要素200,220,23
0,240は更新前の送信タイミングカウンタの値が各
々1,4,2,3なので、それぞれ0,3,1,2に更
新するが、キーデータ、レコードデータの送信を行わず
、プロセッサ要素210の送信タイミングカウンタの初
期値が0であるので、送信回路216がデータ送信の指
示を出して、最初にキーデータ123、レコードデータ
Aをグローバルバス上に送信する。
In FIG. 3, the first data is transmitted in order I, and the processor element begins counting down the number of data. First, processor elements 200, 220, 23
0 and 240 are updated to 0, 3, 1, and 2, respectively, since the values of the transmission timing counters before updating are 1, 4, 2, and 3, respectively, but the key data and record data are not transmitted, and the processor element 210 Since the initial value of the transmission timing counter is 0, the transmission circuit 216 issues a data transmission instruction and first transmits the key data 123 and record data A onto the global bus.

【0032】順序IIで、第2番目のデータが送信され
ると、送信タイミングカウンタの値が0であるプロセッ
サ要素200がキーデータ456、レコードデータBを
グローバルバスに送信する。以後、順序III では、
プロセッサ要素230がキーデータ456、レコードデ
ータCを、順序IVではプロセッサ要素240がキーデ
ータ456、レコードデータDを、順序Vではプロセッ
サ要素220がキーデータ789、レコードデータEを
グローバルバス上に順次送信する。各順番における送信
タイミングカウンタの更新処理の過程は順番Iの場合と
同じである。
In order II, when the second data is transmitted, the processor element 200 whose transmission timing counter value is 0 transmits the key data 456 and record data B to the global bus. Hereafter, in order III,
The processor element 230 sequentially transmits key data 456 and record data C, in order IV the processor element 240 transmits key data 456 and record data D, and in order V the processor element 220 sequentially transmits key data 789 and record data E on the global bus. do. The process of updating the transmission timing counter in each order is the same as in order I.

【0033】制御プロセッサは、上記の処理の過程で各
プロセッサ要素200,210,220,230,24
0からグローバルバスを通じて送信されてくるデータ(
キーデータ、レコードデータ)を順次受信することによ
り、同一キーデータを含むデータをソート順にストリー
ム形式で得ることが可能となる。
The control processor controls each processor element 200, 210, 220, 230, 24 in the course of the above processing.
Data sent from 0 through the global bus (
By sequentially receiving key data, record data), data containing the same key data can be obtained in a stream format in sorted order.

【0034】[0034]

【発明の効果】以上説明したように、本発明によれば、
各プロセッサ要素のメモリに格納されたデータを所定の
順序で順次共通バスに送出し、この出力されたデータと
各プロセッサ要素のメモリに格納されているデータとを
比較し、この比較結果を比較結果計数手段で計数すると
ともに、共通バスに送出されたデータの数をデータ数計
数手段で計数し、前記比較結果が等しい場合に該比較結
果を前記比較結果計数手段で計数するか否かを前記デー
タ数計数手段の計数結果に基づいて制御し、前記比較結
果計数手段の計数値に基づいて各プロセッサ要素のメモ
リに記憶されているデータを所定の順番で出力している
ので、同一データを有するプロセッサ要素が複数存在し
ても、送出データ数の計数結果に基づいて所定の順番で
競合することなく的確に送出されるとともに、またデー
タの並び換えのためのバッファを必要とせず、経済化を
図ることができる。
[Effects of the Invention] As explained above, according to the present invention,
The data stored in the memory of each processor element is sequentially sent to the common bus in a predetermined order, the output data is compared with the data stored in the memory of each processor element, and the comparison result is used as the comparison result. At the same time as counting by the counting means, the number of data sent to the common bus is counted by the data number counting means, and if the comparison results are equal, the data determines whether or not the comparison result is to be counted by the comparison result counting means. The control is performed based on the counting result of the comparison result counting means, and the data stored in the memory of each processor element is output in a predetermined order based on the counted value of the comparison result counting means, so that processors having the same data Even if there are multiple elements, they are accurately sent in a predetermined order without conflict based on the result of counting the number of sent data, and there is no need for a buffer for rearranging the data, making it more economical. be able to.

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

【図1】本発明の一実施例に係わる並列ソート装置を適
用したマルチプロセッサシステムの全体構成図である。
FIG. 1 is an overall configuration diagram of a multiprocessor system to which a parallel sorting device according to an embodiment of the present invention is applied.

【図2】図1の実施例に使用されるプロセッサ要素の内
部構成を示すブロック図である。
FIG. 2 is a block diagram showing the internal configuration of a processor element used in the embodiment of FIG. 1;

【図3】図1に示す並列ソート装置において同一キーデ
ータが複数のプロセッサ要素に存在する場合の複数のプ
ロセッサ要素間で行われるデータの送信順番を示す説明
図である。
FIG. 3 is an explanatory diagram showing the order in which data is transmitted between a plurality of processor elements when the same key data exists in a plurality of processor elements in the parallel sorting device shown in FIG. 1;

【図4】従来の並列計数ソートを実行するマルチプロセ
ッサの全体構成図である。
FIG. 4 is an overall configuration diagram of a multiprocessor that executes conventional parallel counting sort.

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

200,210,220,230,240  プロセッ
サ要素 201〜241  メモリ 202〜242  レジスタ 203〜243  比較回路 204〜244  比較結果カウンタ 205〜245  送信タイミングカウンタ206〜2
46  送信回路 207〜247  カウンタ制御回路
200, 210, 220, 230, 240 Processor elements 201-241 Memories 202-242 Registers 203-243 Comparison circuits 204-244 Comparison result counters 205-245 Transmission timing counters 206-2
46 Transmission circuit 207-247 Counter control circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  各々メモリを有する複数のプロセッサ
要素が共通バスを介して接続されたマルチプロセッサシ
ステムから前記メモリにそれぞれ格納されたデータを所
定の順番で並び換えて出力する並列ソート装置であって
、各プロセッサ要素は、自己のメモリに格納されたデー
タを所定の順序で順次共通バスに送出する送出制御手段
と、該送出制御手段により共通バスに送出されたデータ
を自己のメモリに格納されたデータと比較する比較手段
と、この比較結果を計数する比較結果計数手段と、前記
送出制御手段の制御による共通バスに送出されたデータ
の数を計数するデータ数計数手段と、前記比較手段によ
る比較結果が等しい場合に該比較手段の比較結果を前記
比較結果計数手段で計数するか否かを前記データ数計数
手段の計数結果に基づいて制御する制御手段と、前記比
較結果計数手段の計数値に基づいて各プロセッサ要素の
メモリに記憶されているデータを所定の順番で出力する
出力制御手段とを有することを特徴とする並列ソート装
置。
1. A parallel sorting device that sorts and outputs data stored in each memory in a predetermined order from a multiprocessor system in which a plurality of processor elements each having a memory are connected via a common bus. , each processor element includes a transmission control means for sequentially transmitting data stored in its own memory to a common bus in a predetermined order, and a transmission control means for transmitting data stored in its own memory to the common bus. a comparison means for comparing the data, a comparison result counting means for counting the comparison results, a data number counting means for counting the number of data sent to the common bus under the control of the sending control means, and a comparison by the comparison means. control means for controlling whether or not the comparison result of the comparison means is counted by the comparison result counting means when the results are equal, based on the count result of the data number counting means; 1. A parallel sorting device comprising: output control means for outputting data stored in the memory of each processor element in a predetermined order based on the output control means.
JP4491791A 1991-03-11 1991-03-11 Parallel sort device Pending JPH04281521A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4491791A JPH04281521A (en) 1991-03-11 1991-03-11 Parallel sort device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4491791A JPH04281521A (en) 1991-03-11 1991-03-11 Parallel sort device

Publications (1)

Publication Number Publication Date
JPH04281521A true JPH04281521A (en) 1992-10-07

Family

ID=12704818

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4491791A Pending JPH04281521A (en) 1991-03-11 1991-03-11 Parallel sort device

Country Status (1)

Country Link
JP (1) JPH04281521A (en)

Similar Documents

Publication Publication Date Title
US5678060A (en) System for executing high speed communication protocol processing by predicting protocol header of next frame utilizing successive analysis of protocol header until successful header retrieval
US5193197A (en) Apparatus and method for distributed dynamic priority arbitration for access to a shared resource
US20060080479A1 (en) Information processing apparatus
JPH04257054A (en) Inter-channel connecting apparatus
JP2003271574A (en) Data communication method for shared memory type multiprocessor system
JPH04281521A (en) Parallel sort device
US6829647B1 (en) Scaleable hardware arbiter
JPH04281519A (en) Parallel sort device
JP3005456B2 (en) Vector processing equipment
JP2731761B2 (en) Network control device
JPH02245860A (en) Data transfer sysem
JPH04247548A (en) Parallel sorter
JP3031591B2 (en) Access arbitration method
JP3982077B2 (en) Multiprocessor system
JP2913702B2 (en) Access reception control method of multiprocessor system
JP2699873B2 (en) Bus control circuit
JPH09269937A (en) Method and device for transmitting packet in inter-processor communication
JPH07319829A (en) Method for transferring data
JP2531207B2 (en) Channel device
JPH0520183A (en) Memory access control system
JPS6126104B2 (en)
JPH03241442A (en) Store buffer control system
JPH0235541A (en) Control system for main storage device
JP3211694B2 (en) Multiprocessor connection method
JPH04346140A (en) Access controller for shared memory