JPH05298070A - Sort processor - Google Patents

Sort processor

Info

Publication number
JPH05298070A
JPH05298070A JP12669592A JP12669592A JPH05298070A JP H05298070 A JPH05298070 A JP H05298070A JP 12669592 A JP12669592 A JP 12669592A JP 12669592 A JP12669592 A JP 12669592A JP H05298070 A JPH05298070 A JP H05298070A
Authority
JP
Japan
Prior art keywords
data
comparison
storage device
sort processing
output
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
JP12669592A
Other languages
Japanese (ja)
Inventor
Yasutaka Takeda
保孝 武田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP12669592A priority Critical patent/JPH05298070A/en
Publication of JPH05298070A publication Critical patent/JPH05298070A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To provide the sort processor for quick sort processing. CONSTITUTION:Until the comparison order of two data in a sort processing fundamental device 2 in each stage is determined, input data stored in a buffer storage device 8 in the preceding stage is repeatedly written in a storage device 2 by a data write means 4 simultaneously with read of every pieces of both data from the storage device 2 by a data read means 5 and comparison between both data pieces in a data comparing and output means 6. After the order is determined and output data is determined, only data pieces or one data to be outputted are read out from the storage device 2 and are outputted to the buffer storage device 8, and simultaneously input data is written in the storage device 2 from the buffer storage device 8 in the preceding stage. Consequently, the frequency in read access to the storage device 2 is reduced to perform the sort processing at a high speed, and the difference of operation speed between sort processing fundamental devices in respective stages is absorbed by the buffer storage device, and data is smoothly transferred between sort processing fundamental devices.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、大量のデータを指定
した順序に並び替えるソート処理を行なうソート処理装
置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sorting apparatus for sorting a large amount of data in a designated order.

【0002】[0002]

【従来の技術】図4、図5は、例えばProceedings of 5
th International Workshop on Database Machines等に
に示された従来のソート処理装置を示す概略構成図で、
図4はソート処理装置の基本を構成するソート処理基本
装置を、図5はこのソート処理基本装置を複数個組合せ
て構成したソート処理装置全体を示している。
2. Description of the Related Art FIGS. 4 and 5 show, for example, Proceedings of 5
A schematic configuration diagram showing a conventional sort processing device shown in th International Workshop on Database Machines, etc.
FIG. 4 shows a sort processing basic device forming the basis of the sort processing device, and FIG. 5 shows an entire sort processing device formed by combining a plurality of the sort processing basic devices.

【0003】図において、(1)(11)(12)・・・・(15)は比較
処理装置、(2)(21)(22)・・・・(25)は記憶装置、(3)(31)(3
2)・・・・(35)はこれら比較処理装置(1)及び記憶装置(2)に
よって構成されたソート処理基本装置、(4)(5)(6)は比
較処理装置(1)において実行される各手段で、(4)は外部
または前段のソート処理基本装置(3)からの比較対象デ
ータを順次記憶装置(2)に書込ませるデータ書込み手
段、(5)は記憶装置(2)に格納された比較対象データを各
断片毎に順次読出すデータ読出し手段、(6)はデータ読
出し手段(5)によって読出された二つの比較対象データ
をそれらの各断片毎に、データ書込み手段(4)による次
の比較対象データの書込み時に、順次比較し所定の順位
のデータのみを順次出力するデータ比較出力手段、(7)
はソート処理基本装置(3)(31)(32)・・・・(35)を複数段結
合して構成されたソート処理装置である。
In the figure, (1) (1 1 ) (1 2 ) ... (1 5 ) is a comparison processing device, and (2) (2 1 ) (2 2 ) ... (2 5 ) is Storage device, (3) (3 1 ) (3
2) .... (3 5) sorting process basic unit constituted by the comparative processing unit (1) and the storage device (2), (4) (5) (6) of the comparison processing unit (1) In each of the means to be executed, (4) is a data writing means for sequentially writing the comparison target data from an external or preceding sort processing basic device (3) to the storage device (2), and (5) is a storage device (2 ) Is a data reading means for sequentially reading the comparison target data stored in each fragment, and (6) is a data writing means for each of the two pieces of comparison data read by the data reading means (5). Data comparison output means for sequentially comparing and sequentially outputting only data of a predetermined rank when writing the next comparison target data by (4), (7)
Is a sort processing device configured by connecting a plurality of sort processing basic devices (3) (3 1 ) (3 2 ) ... (3 5 ) in multiple stages.

【0004】次に動作について説明する。ソートすべき
データは図5のソート処理装置(7)に対し、外部から左
端のソート処理基本装置(31)に順次入力され、そのソー
ト処理基本装置(31)から右側のソート処理基本装置(32)
・・・・(35)へと部分的に順序を変えながら送られ、最終段
のソート処理基本装置から最終的に所要の順序にソート
されたデータが出力される。以下、図6に示す具体例に
よってそのソート動作を詳細に説明する。図6ではデー
タが14-9-10-7-3-2-6-11-1-13-4-9-12-5-15-8の順でソ
ート処理基本装置(31)に入力されると仮定する。このデ
ータ断片列が図6のSE1の部分に示されている。説明
のためここでは大から小の降順のソートが指定されるも
のとする。
Next, the operation will be described. The data to be sorted is sequentially input from the outside to the sort processing basic device (3 1 ) from the outside to the sort processing device (7) of FIG. 5, and the sort processing basic device (3 1 ) to the right sort processing basic device. (3 2 )
... The data is sent to (3 5 ) while partially changing the order, and the final sort processing basic device finally outputs the sorted data in the required order. Hereinafter, the sorting operation will be described in detail with reference to the specific example shown in FIG. In Fig. 6, the data is input to the sort processing basic device (3 1 ) in the order of 14-9-10-7-3-2-6-11-1-13-4-9-12-5-15-8. Suppose This data fragment string is shown in the portion SE 1 of FIG. For the sake of explanation, it is assumed here that a descending sort from large to small is specified.

【0005】左端のソート処理基本装置(31)では、上記
SE1のデータが外部から入力され比較処理装置(1)のデ
ータ書込み手段(4)によって記憶装置(21)に格納される
と、以下のように動作してデータ断片が二つ毎に降順に
ソートされ出力される。即ち、データ読出し手段(5)に
より、最初に入力されたデータ断片14が、次に入力され
たデータ断片9が記憶装置(2)から順次読出され、これら
のデータ断片がデータ比較出力手段(6)により比較され
て、先に14が、後に9が出力される。このような動作が
次々と繰り返され、ソート処理基本装置(31)からは、14
-9,10-7,3-2,11-6,13-1,9-4,12-5,15-8の順で二
つずつ降順にソートされたデータ断片(ここでは長さ2
のストリングと呼ぶ)が次段のソート処理基本装置(32)
に出力される。このストリング列が図6のSE2の部分
に示されている。ここで、例えば14と9の比較により14
が先に出力される期間中に次の入力データ断片10が入力
され記憶装置(21)に格納され、次に14に続いて9が出力
される期間中に次の入力データ断片7が入力され、先に
格納されている10との比較が同時に行なわれる。
In the sort processing basic device (3 1 ) at the left end, when the data of SE 1 is input from the outside and stored in the storage device (2 1 ) by the data writing means (4) of the comparison processing device (1). , The data fragments are sorted in descending order by two and output as described below. That is, the data read means (5) sequentially reads the first input data fragment 14 and the next input data fragment 9 from the storage device (2), and these data fragments are compared with the data comparison output means (6). ), 14 is output first and 9 is output later. These operations are repeated one after another, and the sorting basic device (3 1 ) sends 14
-9, 10-7, 3-2, 11-6, 13-1, 9-4, 12-5, 15-8, two data fragments sorted in descending order (length 2 here)
Is called a string) is the next sort processing basic device (3 2 )
Is output to. This string sequence is shown in part SE 2 of FIG. Here, for example, by comparing 14 and 9, 14
Is input first, the next input data fragment 10 is input and stored in the storage device (2 1 ), and then 14 and 9 are output, then the next input data fragment 7 is input. Then, the comparison with the previously stored 10 is performed at the same time.

【0006】次のソート処理基本装置(32)では、入力さ
れてくる長さ2のストリングがさらに部分的にソートさ
れ、長さ4のストリングにされて次のソート処理基本装
置(33)に送り出される。このために、まず最初に入力さ
れてくる長さ2のストリング14-9が記憶装置(22)に格納
される。次に、この長さ2のストリングの先頭のデータ
断片14と、次に入力されてくるストリング10-7の先頭デ
ータ断片10が比較され、14がまず出力される。続いて、
最初のストリングの残りのデータ断片9と後のストリン
グの先頭データ断片10が再び比較され10が出力される。
次に最初のストリングの残りのデータ断片9と後のスト
リングの残りデータ断片7が比較され、9-7の順にデータ
が出力される。この動作が第2番目のソート処理基本装
置(32)で繰り返されることにより、第3番目のソート処
理基本装置(33)に14-10-9-7,11-6-3-2,13-9-4-1,15-
12-8-5の長さ4のストリングが出力される。このストリ
ング列が図6のSE3の部分に示されている。
In the next sort processing basic device (3 2 ), the input string of length 2 is further partially sorted into a string of length 4 and the next sort processing basic device (3 3 ) Sent to. For this purpose, the first input string of length 2 14-9 is stored in the storage device (2 2 ). Next, the head data fragment 14 of the string of length 2 is compared with the head data fragment 10 of the next input string 10-7, and 14 is output first. continue,
The remaining data fragment 9 of the first string and the leading data fragment 10 of the latter string are compared again and 10 is output.
Next, the remaining data fragment 9 of the first string and the remaining data fragment 7 of the latter string are compared, and the data are output in the order of 9-7. By repeating this operation in the second sort processing basic device (3 2 ), the third sort processing basic device (3 3 ) receives 14-10-9-7, 11-6-3-2, 13-9-4-1, 15-
A string of length 4 of 12-8-5 is output. This string sequence is shown in part SE 3 of FIG.

【0007】ここで、例えば14と10が比較され14が出力
される期間中に次の入力データ断片7が入力され記憶装
置(22)に格納される。次に、9と10が比較され10が出力
される期間には次の入力データ断片3が入力され記憶装
置(22)に格納される。最後に9と7の比較の際には、これ
らデータ断片は共に記憶装置(22)内に格納されているた
め、比較の際には記憶装置(22)が2回アクセスされ、こ
れらが読出され比較出力される際に、入力されてくるデ
ータ断片2,11が記憶装置(22)に格納される。
Here, for example, 14 and 10 are compared and the next input data fragment 7 is input and stored in the storage device (2 2 ) while 14 is output. Next, when 9 and 10 are compared and 10 is output, the next input data fragment 3 is input and stored in the storage device (2 2 ). Finally, when comparing 9 and 7, since these data fragments are both stored in the storage device (2 2 ), the storage device (2 2 ) is accessed twice during the comparison and these are When read and compared and output, the input data fragments 2 and 11 are stored in the storage device (2 2 ).

【0008】上述のソート動作が引き続くソート処理基
本装置(33)(34)・・・・(35)においても同様に実行され、右
端のソート処理基本装置(35)からは所定の降順にソート
された長さ25のストリングデータが出力される。一般
的には、第i番目のソート処理基本装置(3i)が降順2i
個組を出力することにより、2n個のデータ断片はn番
目のソート処理基本装置(3n)出力時に長さ2nのストリ
ングとなって出力され、所定の降順ソートが実現される
ことになる。ここで、各データ断片の長さをLとする
と、少なくとも第i番目のソート処理基本装置(3i)の記
憶装置(2i)は2i-1×Lの容量を有する必要があり、ソ
ート処理基本装置には左端から順に記憶装置の容量が2
倍ずつ必要となる。この様子は図5に記憶装置(2)が順
に2倍の大きさとなることで示されている。
The sorting operation basic device (3 3 ) (3 4 ) ... (3 5 ) similarly performs the above-described sorting operation, and a predetermined process is performed from the rightmost sort processing basic device (3 5 ). The string data of length 2 5 sorted in descending order is output. Generally, the i-th sort processing basic device (3 i ) is descending order 2 i
By outputting the set, 2 n data fragments are output as a string of length 2 n when the n-th sort processing basic device (3 n ) is output, and a predetermined descending sort is realized. Become. Here, assuming that the length of each data fragment is L, at least the storage device (2 i ) of the i-th sorting basic device (3 i ) must have a capacity of 2 i-1 × L, and The processing basic device has a storage device capacity of 2 from the left end.
You will need to double each. This state is shown in FIG. 5 in which the storage device (2) is sequentially doubled in size.

【0009】なお、ここでソートの対象のデータ断片は
14-9等の簡単な整数のみからなるとして説明したが、実
際にはソートの対象となる個々のデータ断片は、例えば
人事データの場合は姓名、住所、年齢その他の内容を有
し、数百バイトから数Kバイトとなる場合もある。この
ように、データ長が長く、比較装置による一度の比較で
は順序を決定できない場合には順序が決定するまで各デ
ータ断片の比較の度に上記比較操作を繰り返す必要があ
る。この際、先の第2番目のソート処理基本装置(32)に
おける9と7との比較の際に説明されたように、各ソート
処理基本装置(3)内部の比較処理装置(1)は、一般的に
は、自身の記憶装置(2)から二つの比較対象データを読
出し、これらを比較すると同時に、入力されてくるデー
タを自身の記憶装置(2)に書込むことを繰り返すことに
より動作する。この様子が図7に示される。
The data fragment to be sorted here is
Although it was explained that it consists only of simple integers such as 14-9, the individual data fragments to be sorted are actually several hundreds, for example, in the case of personnel data, the surname, first name, address, age, etc. It may be from a byte to several kilobytes. As described above, when the data length is long and the order cannot be determined by one comparison by the comparison device, the above-described comparison operation needs to be repeated every time the data fragments are compared until the order is determined. At this time, as described in the comparison between 9 and 7 in the second sort processing basic device (3 2 ), the comparison processing device (1) inside each sort processing basic device (3) , Generally, it operates by reading two comparison target data from its own memory device (2), comparing them, and at the same time writing the input data to its own memory device (2). To do. This state is shown in FIG.

【0010】図7は記憶装置(2)への書込み及び読出し
のアクセスの様子を示すアク動作説明図で、図におい
て、R11,R12,R13,R14,・・・・は比較のために読出
される二つのデータの内の1番目のデータ断片、R21
22,R23,R24,・・・・は2番目のデータ断片、W31
32,W33,W34,・・・・はその前の二つのデータ断片の
比較時において書込まれる次のデータの断片をそれぞれ
示している。一般的にはi番目のデータのj回目に読出
されるデータ断片をRij、i番目のデータのj回目に書
込まれるデータ断片をWijとしている。
FIG. 7 is a diagram for explaining an access operation showing the manner of access to the memory device (2) for writing and reading. In the figure, R 11 , R 12 , R 13 , R 14 , ... The first data fragment of the two data read for R 21 ,
R 22 , R 23 , R 24 , ... Are the second data fragments, W 31 ,
W 32 , W 33 , W 34 , ... Represent the next data fragment written at the time of comparison of the previous two data fragments. In general, the data fragment read at the j-th time of the i-th data is R ij , and the data fragment written at the j-th time of the i-th data is Wij.

【0011】この図からも明らかなように、データ全体
の比較と入力データ全体の記憶装置(2)への格納には、
各断片毎に記憶装置(2)への3回のアクセスが必要であ
る。まず第1のデータの最初の断片R11をアクセスし、
次に第2のデータの最初の断片R21をアクセスし、これ
らを比較すると同時に入力データの最初の断片W31を記
憶装置に書込み格納する。次に、第1のデータの2番目
の断片R12をアクセスし、次に第2のデータの2番目の
断片R22をアクセスし、これらを比較すると同時に入力
データの2番目の断片W32を記憶装置(2)に格納する。
同様の動作が3番目の断片、4番目の断片とデータの全
断片に対して繰返されることにより、二つのデータの比
較と一つの入力データの記憶装置への格納が終了する。
As is clear from this figure, comparison of all data and storage of all input data in the storage device (2)
It is necessary to access the storage device (2) three times for each fragment. First, access the first fragment R 11 of the first data,
The first piece R 21 of the second data is then accessed and compared, and at the same time the first piece W 31 of the input data is written and stored in the storage device. Next, the second piece R 12 of the first data is accessed, then the second piece R 22 of the second data is accessed, and these are compared, and at the same time, the second piece W 32 of the input data is accessed. Store in storage device (2).
By repeating the same operation for the third fragment, the fourth fragment and all the fragments of data, the comparison of two data and the storage of one input data in the storage device are completed.

【0012】[0012]

【発明が解決しようとする課題】従来のソート処理装置
は以上のように構成され、上述のように複数台連続に接
続された各ソート処理基本装置でデータの比較出力が行
なわれる際、各段のソート処理基本装置(3)において、
データ読出し手段(5)による2個の比較されるデータの
記憶装置(2)からの2回の読出しと、データ読出し手段
(5)による前段のソート処理基本装置(3)から送られるデ
ータの記憶装置(2)への1回の書込みとが一つの処理単
位として同期して行なわれるので、二つのデータを比較
し一つのデータを出力するためには記憶装置に対して3
回のアクセスが必要である。しかも、比較処理装置(1)
のデータ比較出力手段(6)によるデータの一時保持、比
較処理、比較結果の出力等の単純な作業は高速に処理さ
れ得るのに対し、データ書込み手段(4)及びデータ読出
し手段(5)による書込み読出し時の、記憶装置(2)対する
アクセス処理時間は、記憶装置(2)を構成する記憶素子
の性能に制約され比較対象データ長が大なる程長くな
る。従って、ソート処理基本装置(3)でのデータ処理の
速度は記憶装置(2)に対する2回の読出しと1回の書込
みに要するアクセス時間により決定され、ソート処理装
置(7)全体の処理速度が比較データ増加により著しく低
下するといった問題点があった。
The conventional sort processing device is configured as described above, and when each sort processing basic device connected in series as described above performs data comparison and output, each stage is processed. In the sorting processing basic device (3),
Two readings of two compared data from the storage device (2) by the data reading means (5) and data reading means
Since the data sent from the sorting basic device (3) at the preceding stage by (5) and the writing to the storage device (2) once are performed in synchronization as one processing unit, two data are compared and compared. 3 to the storage device to output one data
Needs to be accessed once. Moreover, the comparison processing device (1)
While simple operations such as temporary holding of data by the data comparison and output means (6), comparison processing, and output of comparison results can be processed at high speed, data writing means (4) and data reading means (5) The access processing time with respect to the storage device (2) at the time of writing and reading becomes longer as the comparison target data length becomes larger due to the limitation of the performance of the storage element constituting the storage device (2). Therefore, the speed of data processing in the sort processing basic device (3) is determined by the access time required for two readings and one writing to the storage device (2), and the processing speed of the entire sort processing device (7) is There was a problem that it was significantly reduced due to an increase in comparison data.

【0013】この発明は、上記のような問題点を解消す
るためになされたもので、データの比較出力に要する記
憶装置への読出しアクセスを減少させ、高速なソート処
理が可能となるソート処理装置を得ることを目的とす
る。
The present invention has been made in order to solve the above problems, and reduces the read access to the storage device required for data comparison and output, and makes it possible to perform high-speed sort processing. Aim to get.

【0014】[0014]

【課題を解決するための手段】一般的に、ソート処理す
るデータの長さが長く、1データが複数の断片に分割さ
れる場合には、データの比較によりいずれのデータを出
力すべきか決定されるまでに要する断片の数は比較する
二つのデータの組合わせによって異なり、例えば姓名を
ソートする場合、姓のみで判定される場合もあれば名を
みるまで判定結果がつかない場合もある。従って、二つ
のデータの比較にあたってなかなか判定結果がつかない
時は判定がつく迄、データ断片の読出し比較を続けなけ
ればならず、一方、最初に近い断片の比較で出力すべき
データが決定されれば、以後の断片の比較は意味がなく
出力されないデータ断片の読出しは必要がなくなる。こ
の発明はこの点に着目してなされたものである。
Generally, when the length of data to be sorted is long and one data is divided into a plurality of pieces, which data should be output is determined by comparing the data. The number of fragments required to obtain the name depends on the combination of two data to be compared. For example, when sorting the family name, there are cases where the family name alone is used for the determination, and cases where the name cannot be obtained until the first name is checked. Therefore, when it is difficult to obtain a judgment result when comparing two data, it is necessary to continue reading and comparing the data fragments until the judgment is made, while the data to be output is determined by comparing the first fragment. For example, the subsequent comparison of fragments is meaningless, and it is not necessary to read out data fragments that are not output. The present invention has been made with this point in mind.

【0015】この発明の第1の発明に係るソート処理装
置は、各ソート処理基本装置における比較処理装置のデ
ータ比較出力手段により複数の比較対象データの所定順
位が決定される迄は全データの断片を、順位決定後は所
定順位となり出力されるデータの断片のみを読出すよう
なされたデータ読出し手段を備えた比較処理装置を有す
るソート処理基本装置を複数段結合して構成したもので
ある。
The sort processing apparatus according to the first aspect of the present invention is a fragment of all data until the predetermined order of the plurality of comparison target data is determined by the data comparison and output means of the comparison processing apparatus in each sort processing basic apparatus. Is a combination of a plurality of stages of sort processing basic devices having a comparison processing device equipped with a data reading means for reading only the fragments of the data that have a predetermined rank and are output after the order is determined.

【0016】この発明の第2の発明に係るソート処理装
置は、各ソート処理基本装置の比較処理装置のデータ比
較出力手段からの出力データが一時格納され、この格納
されたデータが次段のソート処理基本装置における比較
処理装置からの状態信号に応じ、これのデータ書込み手
段に出力される先入れ先出し方式の緩衝記憶装置を設け
たものである。
In the sorting apparatus according to the second aspect of the present invention, the output data from the data comparison and output means of the comparison processing apparatus of each sorting processing basic apparatus is temporarily stored, and the stored data is sorted in the next stage. According to the status signal from the comparison processing device in the basic processing device, a buffer memory device of the first-in first-out system which is output to the data writing means thereof is provided.

【0017】[0017]

【作用】この発明の第1の発明におけるソート処理装置
は、比較処理装置のデータ比較出力手段により二つのデ
ータのうち何れが出力されるか末決定である間は、従来
のソート処理基本装置と同様に、データ読出し手段によ
り記憶装置から両データが断片毎に読出され、データ比
較出力手段により比較される。データ比較出力手段によ
りいずれのデータを出力すべきか決定された後は、両デ
ータの残り断片については、従来のようにデータ読出し
手段による記憶装置からの両データの2回の読出し、デ
ータ書込み手段による記憶装置への1回の書込みといっ
た同期的な動作を行なうことなく、データ読出し手段に
より出力すべき一方のデータ断片のみが記憶装置から1
回読出され、データ書込み手段により記憶装置への1回
の書込み行なわれるよう切替えられ、記憶装置からの読
出しアクセス回数が減少し、ソート処理が高速に行なわ
れる。
The sort processing device according to the first aspect of the present invention is the same as the conventional sort processing basic device while the data comparison output means of the comparison processing device determines which of the two data is to be output. Similarly, both pieces of data are read from the storage device by the data reading means for each fragment and compared by the data comparing and outputting means. After the data comparing and outputting means determines which data should be output, the remaining fragments of both data are read by the data reading means from the storage device twice and the data writing means is used as in the conventional case. Only one data fragment to be output by the data reading means is output from the storage device without performing a synchronous operation such as one-time writing to the storage device.
The data is read once and switched by the data writing means to be written once to the storage device, the number of read accesses from the storage device is reduced, and the sorting process is performed at high speed.

【0018】この発明の第2の発明におけるソート処理
装置は、上記第1の発明においては、各段のソート処理
基本装置での読出し書込みのタイミングが比較データに
よって異なるため、比較処理装置のデータ比較出力手段
によって出力されるデータが、一旦先入れ先出し方式の
緩衝記憶装置に格納され、次段のソート処理基本装置か
らの書込み可能を表す状態信号に応じ、上記緩衝記憶装
置に格納されたデータが次段比較処理装置のデータ書込
み手段に出力される。
According to the second aspect of the present invention, the sort processing device according to the first aspect of the invention is characterized in that the read / write timing in the sort processing basic device of each stage differs depending on the comparison data. The data output by the output means is temporarily stored in a first-in first-out buffer storage device, and the data stored in the buffer storage device is transferred to the next stage in accordance with a writable state signal from the next sort processing basic device. It is output to the data writing means of the comparison processing device.

【0019】[0019]

【実施例】【Example】

実施例1.図1、図2はこの発明の一実施例を示す概略
構成図で、図1はソート処理装置の基本を構成するソー
ト処理基本装置を、図2はこのソート処理基本装置を複
数個組合せて構成したソート処理装置全体を示してい
る。
Example 1. 1 and 2 are schematic configuration diagrams showing an embodiment of the present invention. FIG. 1 shows a sort processing basic device that constitutes the basis of a sort processing device, and FIG. 2 shows a combination of a plurality of these sort processing basic devices. 3 shows the entire sorted processing device.

【0020】図において、(1)(11)(12)・・・・(15)は比較
処理装置、(2)(21)(22)・・・・(25)は記憶装置、(3)(31)(3
2)・・・・(35)はこれら比較処理装置(1)及び記憶装置(2)に
よって構成されたソート処理基本装置、(4)(5)(6)は比
較処理装置(1)において実行される各手段で、(4)は外部
または前段のソート処理基本装置(3)からの比較対象デ
ータを順次記憶装置(2)に書込ませるデータ書込み手
段、(5)は記憶装置(2)に格納された比較対象データを各
断片毎に順次読出すデータ読出し手段、(6)はデータ読
出し手段(5)によって読出された二つの比較対象データ
をそれらの各断片毎に順次比較し所定の順位のデータの
みを順次出力するデータ比較出力手段、(7)はソート処
理基本装置(3)(31)(32)・・・・(35)を複数段結合して構成
されたソート処理装置、(8)(81)(82)・・・・(85)は比較処
理装置(1)(11)(12)・・・・(15)の出力に接続された先入れ
先出しの緩衝記憶装置、(9)は後段のソート処理基本装
置(3)から前段のソート処理基本装置(3)に対するデータ
受信の可否を示すための状態信号である。
In the figure, (1) (1 1 ) (1 2 ) ... (1 5 ) is a comparison processing device, and (2) (2 1 ) (2 2 ) ... (2 5 ) is Storage device, (3) (3 1 ) (3
2) .... (3 5) sorting process basic unit constituted by the comparative processing unit (1) and the storage device (2), (4) (5) (6) of the comparison processing unit (1) In each of the means to be executed, (4) is a data writing means for sequentially writing the comparison target data from an external or preceding sort processing basic device (3) to the storage device (2), and (5) is a storage device (2 ), Data read means for sequentially reading the comparison target data stored in each fragment, (6) sequentially comparing the two comparison target data read by the data reading means (5) for each fragment, and determining a predetermined value. The data comparison and output means that sequentially outputs only the data of the order of (7) is composed of the basic unit for sorting processing (3) (3 1 ) (3 2 ) ... (3 5 ) connected in multiple stages. Sort processor, (8) (8 1 ) (8 2 ) ・ ・ ・ ・ (8 5 ) is connected to the output of comparison processor (1) (1 1 ) (1 2 ) ・ ・ ・ ・ (1 5 ). First-in first-out buffer storage, (9) A status signal to indicate whether the data received from the sort process basic unit (3) for the preceding sorting process basic unit (3).

【0021】図3はこの実施例における記憶装置(2)へ
の書込み及び読出しのアクセスの様子を示すアクセス動
作説明図で、従来例の図7に対応するものである。
FIG. 3 is an access operation explanatory view showing a state of writing and reading access to the storage device (2) in this embodiment, and corresponds to FIG. 7 of the conventional example.

【0022】次に動作について説明する。ソートすべき
データは図2のソート処理装置(7)に対し、外部から左
端のソート処理基本装置(31)に順次入力され、そのソー
ト処理基本装置(31)から右側のソート処理基本装置(32)
・・・・(35)へと部分的に順序を変えながら送られ、最終段
のソート処理基本装置から最終的に所要の順序にソート
されたデータが出力される。各段のソート処理基本装置
(31)(32)・・・・(35)の動作は基本的に同じであるために、
ここでは、ある段のソート処理基本装置(3n)の動作につ
いて説明する。
Next, the operation will be described. Data to be sorted to the sorting device of Fig 2 (7), are sequentially inputted to the left end of the sorting process basic unit from the outside (3 1), the sorting process basic unit (3 1) from the right side of the sorting process basic unit (3 2 )
... The data is sent to (3 5 ) while partially changing the order, and the final sort processing basic device finally outputs the sorted data in the required order. Basic equipment for sorting process of each stage
The operation of (3 1 ) (3 2 ) ... (3 5 ) is basically the same,
Here, the operation of the sort processing basic device (3 n ) at a certain stage will be described.

【0023】記憶装置(2)に格納されている2データの
内の一方の第1のデータの最初の断片R11が比較のため
データ読出し手段(5)によってアクセスされて読出さ
れ、次に他方の第2のデータの最初の断片R12がアクセ
スされて読出され、これら両データ断片R11、R12がデ
ータ比較出力手段(6)によって比較されると同時に、前
段のソート処理基本装置(3n-1)に入力可を表す状態信号
(9)が送られ、前段の緩衝記憶装置(8n-1)内の次のデー
タの断片W31が入力され、データ書込み手段(4)により
記憶装置(2)に書込まれる。次に、第1のデータの2番
目の断片R12がアクセスされて読出され、第2のデータ
の2番目の断片R22がアクセスされて読出され、これら
が比較されると同時に入力データの2番目の断片W32
記憶装置(2)に格納される。同様の動作が第1、第2デ
ータの順位が判定される迄繰返される。
The stored device (2) first fragment R 11 of one of the first data of the two data stored is accessed by the data reading means (5) for comparison with the read, then the other The first fragment R 12 of the second data of the above is accessed and read, and both of these data fragments R 11 and R 12 are compared by the data comparison and output means (6), and at the same time, the sorting basic device (3 n-1 ) is a status signal indicating that input is possible
(9) is sent, and the next data fragment W 31 in the buffer memory (8 n-1 ) in the previous stage is input and written in the memory (2) by the data writing means (4). Then, the second fragment R 12 of the first data is accessed and read, and the second fragment R 22 of the second data is accessed and read, and these are compared and at the same time, 2 of the input data is read. The th piece W 32 is stored in the storage device (2). The same operation is repeated until the order of the first and second data is determined.

【0024】例えば、両データの2番目の断片R12、R
22の比較で第1のデータの優位が判定された後の3番目
以降の残りの断片については、データ読出し手段(5)に
よる第1のデータのみの読出しと、データ比較出力手段
(6)によるそのデータの出力と同時に行なわれるデータ
書込み手段(4)による入力データの書込みとに切替えら
れ、以後は図3に示すようにR13、W33、R14、W34
・・・・と繰返され、1つのデータの緩衝記憶装置(8)への
出力と1つの入力データの記憶装置(2)への格納が終了
する。このように、出力すべきデータが決定後は比較に
負けたデータの記憶装置(2)からの読出しは行なわれ
ず、それだけアクセス時間が短縮され、処理時間が高速
化する。
For example, the second fragment R 12 , R of both data
For the remaining fragments after the third one after the superiority of the first data is determined by the comparison of 22 , the data read means (5) reads only the first data and the data comparison output means.
It is switched to the writing of the input data by the data writing means (4) which is performed at the same time as the output of the data by (6), and thereafter, as shown in FIG. 3, R 13 , W 33 , R 14 , W 34 ,
.. is repeated, and output of one data to the buffer storage device (8) and storage of one input data to the storage device (2) are completed. In this way, after the data to be output is determined, the data that has lost the comparison is not read from the storage device (2), so that the access time is shortened and the processing time is shortened.

【0025】以上の動作説明から明かなように、比較対
象データの何番目の断片で出力すべきデータが決定され
るかは、各段のソート処理基本装置(3n)によって異な
り、それぞれまちまちの処理速度で動作していることと
なる。従って、各段の比較処理装置(1n)から出力された
データは一旦その段の緩衝記憶装置(8n)に格納され、次
段のソート処理基本装置(3n+1)がデータの受信可能であ
るときに送られる状態信号(9)に応じて、先入れ先出し
方式に従って緩衝記憶装置(8n)から次段のソート処理基
本装置(3n+1)に出力される。
As is clear from the above description of the operation, the number of the fragment of the data to be compared that determines the data to be output depends on the sort processing basic device (3 n ) of each stage, and it varies from one to the next. It is operating at the processing speed. Therefore, the data output from the comparison processing device (1 n ) at each stage is temporarily stored in the buffer storage device (8 n ) at that stage, and the sorting processing basic device (3 n + 1 ) at the next stage receives the data. According to the status signal (9) sent when possible, the buffer memory (8 n ) is output to the next-stage sort processing basic device (3 n + 1 ) according to the first-in first-out method.

【0026】実施例2.上記実施例では、二つのデータ
を比較出力する場合について説明したが、三つの以上の
データを比較出力する場合についても同様に比較決定後
の記憶装置からのデータの読出しアクセスを減少させる
ことができる。
Example 2. In the above embodiment, the case of comparing and outputting two data has been described, but in the case of comparing and outputting three or more data, the read access of the data from the storage device after the comparison determination can be similarly reduced. ..

【0027】実施例3.また、上記実施例では、各段の
比較処理装置の出力に緩衝記憶装置を接続する構成につ
いて説明したが、状態信号の代わりに後段のソート処理
基本装置が前段のソート処理基本装置の動作を一時的に
停止させることにより、各段のソート処理基本装置間の
動作の同期をとる方式も考えられる。
Example 3. In the above embodiment, the configuration in which the buffer storage device is connected to the output of the comparison processing device of each stage has been described. However, instead of the status signal, the sorting process basic device of the latter stage temporarily operates the operation of the sorting process basic device of the preceding stage. It is also conceivable that the operation is synchronized between the basic processing devices of each stage by temporarily stopping.

【0028】実施例4.また、上記実施例では、各段の
比較処理装置の出力側に緩衝記憶装置を接続する構成に
ついて説明したが、ソート処理基本装置の入力側に緩衝
記憶装置を接続する構成でも同様の効果が得られる。
Example 4. Further, in the above embodiment, the configuration in which the buffer storage device is connected to the output side of each stage of the comparison processing device has been described, but the same effect can be obtained also in the configuration in which the buffer storage device is connected to the input side of the sort processing basic device. Be done.

【0029】[0029]

【発明の効果】以上のようにこの発明の第1の発明によ
れば、各ソート処理基本装置における比較処理装置のデ
ータ比較出力手段により複数の比較対象データの所定順
位が決定される迄は全データの断片を、順位決定後は所
定順位となり出力されるデータの断片のみを読出すよう
なされたデータ読出し手段を備えた比較処理装置を有す
るソート処理基本装置を複数段結合して構成したので、
データの比較決定後の記憶装置からのデータ読出しアク
セス回数が減少し、高速にソート処理を行なうことが可
能なソート処理装置が得られる効果がある。
As described above, according to the first aspect of the present invention, all sorts of data to be compared are determined by the data comparison / output means of the comparison processing device in each sort processing basic device until the predetermined order is determined. Since the data fragment has a predetermined rank after the rank is determined and only the fragment of the data to be output is read, the sorting processing basic device having the comparison processing device is connected in plural stages.
The number of data read accesses from the storage device after data comparison and determination is reduced, and a sort processing device capable of performing sort processing at high speed is obtained.

【0030】さらに、この発明の第2の発明によれば、
各ソート処理基本装置の比較処理装置のデータ比較出力
手段からの出力データが一時格納され、この格納された
データが次段のソート処理基本装置における比較処理装
置からの状態信号に応じ、これのデータ書込み手段に出
力される先入れ先出し方式の緩衝記憶装置を設けたの
で、各段のソート処理基本装置での処理速度がまちまち
であっても、それらの間のデータの転送が円滑に行なう
ことができるソート処理装置が得られる効果がある。
Further, according to the second aspect of the present invention,
Output data from the data comparison and output means of the comparison processing device of each sort processing basic device is temporarily stored, and this stored data is stored in accordance with the status signal from the comparison processing device in the next sort processing basic device. Since the buffer memory device of the first-in first-out system for outputting to the writing means is provided, even if the processing speeds of the respective sort processing basic devices are different, the sort in which the data transfer between them can be smoothly performed There is an effect that a processing device can be obtained.

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

【図1】この発明の一実施例のソート処理装置の基本を
構成するソート処理基本装置を示す概略構成図。
FIG. 1 is a schematic configuration diagram showing a sort processing basic device that forms the basis of a sort processing device according to an embodiment of the present invention.

【図2】この発明の一実施例の全体を示す概略構成図。FIG. 2 is a schematic configuration diagram showing an entire embodiment of the present invention.

【図3】この実施例における記憶装置への書込み及び読
出しのアクセスの様子を示すアクセス動作説明図。
FIG. 3 is an access operation explanatory diagram showing a write and read access state to a storage device in this embodiment.

【図4】従来のソート処理装置の基本を構成するソート
処理基本装置を示す概略構成図。
FIG. 4 is a schematic configuration diagram showing a sort processing basic device that forms the basis of a conventional sort processing device.

【図5】従来のソート処理装置の全体を示す概略構成
図。
FIG. 5 is a schematic configuration diagram showing an entire conventional sort processing device.

【図6】従来のソート処理装置のソート動作説明図。、FIG. 6 is an explanatory diagram of a sort operation of a conventional sort processing device. ,

【図7】従来のソート処理装置における記憶装置のアク
セス動作説明図。
FIG. 7 is an explanatory diagram of an access operation of a storage device in a conventional sort processing device.

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

1,11,12・・・15 比較処理装置 2,21,22・・・25 記憶装置 3,31,32・・・35 ソート処理基本装置 4 データ書込み手段 5 データ読出し手段 6 データ比較出力手段 7 ソート処理装置 8 緩衝記憶装置1, 1 1 , 1 2 ... 1 5 Comparison processing device 2, 2 1 , 2 2 ... 2 5 Storage device 3, 3 1 , 3 2 ... 3 5 Sort processing basic device 4 Data writing means 5 Data reading means 6 Data comparison output means 7 Sort processing device 8 Buffer storage device

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成5年2月23日[Submission date] February 23, 1993

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】特許請求の範囲[Name of item to be amended] Claims

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【特許請求の範囲】[Claims]

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0010[Correction target item name] 0010

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0010】図7は記憶装置(2)への書込み及び読出し
のアクセスの様子を示す動作説明図で、図において、R
11,R12,R13,R14,・・・・は比較のために読出される
二つのデータの内の1番目のデータ断片、R21,R22
23,R24,・・・・は2番目のデータ断片、W31,W32
33,W34,・・・・はその前の二つのデータ断片の比較時
において書込まれる次のデータの断片をそれぞれ示して
いる。一般的にはi番目のデータのj回目に読出される
データ断片をRij、i番目のデータのj回目に書込まれ
るデータ断片をWijとしている。
[0010] Figure 7 is a state the shown to operation explanatory diagram of the write and read access to a storage device (2), in FIG, R
11 , R 12 , R 13 , R 14 , ... Are the first data fragments of the two data read out for comparison, R 21 , R 22 ,
R 23 , R 24 , ... Are the second data fragments, W 31 , W 32 ,
W 33 , W 34 , ... Represent the next data fragment written at the time of comparison of the two previous data fragments. In general, the data fragment read at the j-th time of the i-th data is R ij , and the data fragment written at the j-th time of the i-th data is Wij.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 複数の断片からなる比較対象データを格
納する記憶装置と、外部または前段のソート処理基本装
置からの比較対象データを順次上記記憶装置に書込ませ
るデータ書込み手段、上記記憶装置に格納された比較対
象データを各断片毎に順次読出すデータ読出し手段、及
びこのデータ読出し手段によって読み出された複数の比
較対象データをそれらの各断片毎に、上記データ書込み
手段による次の比較対象データの書込み時に、順次比較
し所定の順位のデータのみを順次出力するデータ比較出
力手段を備えた比較処理装置とを有するソート処理基本
装置を複数台結合して構成されるソート処理装置におい
て、上記各ソート処理基本装置における比較処理装置の
データ読出し手段は、上記データ比較出力手段により複
数の比較対象データの所定順位が決定される迄は全デー
タの断片を、順位決定後は所定順位となり出力されるデ
ータの断片のみを読出すようなされたことを特徴とする
ソート処理装置。
1. A storage device for storing comparison target data composed of a plurality of fragments, and a data writing unit for sequentially writing comparison target data from an external or preceding sort processing basic device in the storage device. Data reading means for sequentially reading the stored comparison target data for each fragment, and a plurality of comparison target data read by the data reading means for each fragment, the next comparison target by the data writing means. A sort processing device configured by combining a plurality of sort processing basic devices each having a comparison processing device having a data comparison and output means for sequentially comparing and sequentially outputting only data of a predetermined rank when writing data, The data reading means of the comparison processing device in each sort processing basic device has a plurality of comparison target data by the data comparison output device. The sorting apparatus is characterized in that all the pieces of data are read until the predetermined rank is determined, and only the pieces of the data that have the predetermined rank and are output after the rank is determined are read.
【請求項2】 複数の断片からなる比較対象データを格
納する記憶装置と、外部または前段のソート処理基本装
置からの比較対象データを順次上記記憶装置に書込ませ
るデータ書込み手段、上記記憶装置に格納された比較対
象データを各断片毎に順次読出すデータ読出し手段、及
びこのデータ読出し手段によって読み出された複数の比
較対象データをそれらの各断片毎に、上記データ書込み
手段による次の比較対象データの書込み時に、順次比較
し所定の順位のデータのみを順次出力するデータ比較出
力手段を備えた比較処理装置とを有するソート処理基本
装置を複数台結合して構成されるソート処理装置におい
て、上記各ソート処理基本装置の比較処理装置のデータ
比較出力手段からの出力データが一時格納され、この格
納されたデータが次段のソート処理基本装置における比
較処理装置からの状態信号に応じ、これのデータ書込み
手段に出力される先入れ先出し方式の緩衝記憶装置を設
けたことを特徴とするソート処理基本装置。
2. A storage device for storing comparison target data composed of a plurality of fragments, and a data writing means for sequentially writing the comparison target data from an external or preceding sort basic device in the storage device. Data reading means for sequentially reading the stored comparison target data for each fragment, and a plurality of comparison target data read by the data reading means for each fragment, the next comparison target by the data writing means. A sort processing device configured by combining a plurality of sort processing basic devices each having a comparison processing device having a data comparison and output means for sequentially comparing and sequentially outputting only data of a predetermined rank when writing data, The output data from the data comparison and output means of the comparison processing device of each sort processing basic device is temporarily stored, and this stored data is next stored. A sort processing basic device comprising a first-in first-out buffer memory device for outputting to a data writing means of the comparison processing device in the sorting basic device in stages.
JP12669592A 1992-04-21 1992-04-21 Sort processor Pending JPH05298070A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12669592A JPH05298070A (en) 1992-04-21 1992-04-21 Sort processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12669592A JPH05298070A (en) 1992-04-21 1992-04-21 Sort processor

Publications (1)

Publication Number Publication Date
JPH05298070A true JPH05298070A (en) 1993-11-12

Family

ID=14941564

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12669592A Pending JPH05298070A (en) 1992-04-21 1992-04-21 Sort processor

Country Status (1)

Country Link
JP (1) JPH05298070A (en)

Similar Documents

Publication Publication Date Title
US4031520A (en) Multistage sorter having pushdown stacks with concurrent access to interstage buffer memories for arranging an input list into numerical order
US5329405A (en) Associative cam apparatus and method for variable length string matching
JPH0728624A (en) Device and method for sorting
US6424970B1 (en) Sorting system and method executed by plural computers for sorting and distributing data to selected output nodes
US6295534B1 (en) Apparatus for maintaining an ordered list
JPS6142031A (en) Sorting processor
JPH05298070A (en) Sort processor
JPH06242925A (en) Sort processor
JPH05298069A (en) Sort processor
JPH04160532A (en) Sort processor
JPH07120264B2 (en) Sort processing device
JPS5849960B2 (en) Information check method
JPH0218638A (en) Data control system
JPH01177124A (en) Sorter memory control system
JPH1021053A (en) Data processor
JPH04195234A (en) Data transfer system
JPH01201722A (en) Sort processor
JPH1051469A (en) Atm switch
JPS6043592B2 (en) Large capacity static shift register
JPH0376557B2 (en)
JPS61224731A (en) Changing point detection system
JPS61110233A (en) Data processor
JPH0434647A (en) Retrieving device
JPH0433059B2 (en)
JPH05197778A (en) Logical simulation system