JPS6142031A - Sorting processor - Google Patents

Sorting processor

Info

Publication number
JPS6142031A
JPS6142031A JP16351984A JP16351984A JPS6142031A JP S6142031 A JPS6142031 A JP S6142031A JP 16351984 A JP16351984 A JP 16351984A JP 16351984 A JP16351984 A JP 16351984A JP S6142031 A JPS6142031 A JP S6142031A
Authority
JP
Japan
Prior art keywords
data
sorting
input
circuit
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.)
Granted
Application number
JP16351984A
Other languages
Japanese (ja)
Other versions
JPH0666050B2 (en
Inventor
Tetsuji Sato
哲司 佐藤
Nobuo Tsuda
津田 伸生
Tadamichi Kawada
川田 忠通
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 JP59163519A priority Critical patent/JPH0666050B2/en
Publication of JPS6142031A publication Critical patent/JPS6142031A/en
Publication of JPH0666050B2 publication Critical patent/JPH0666050B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To execute a merge operation in the time being proportional to the number of data by providing a sorting means for extracting the maximum and the minimum data from plural data, and determining a data train based on an identifier by adding and detaching to and from the sorted data. CONSTITUTION:In an initial sorting stage, an operation in a conventional sorting processing is executed, and plural strings are obtained in a buffer memory 15. Subsequently, in a merge stage, with regard to (k) pieces of strings stored in the buffer memory 15, one data of the maximum or the minimum is outputted as a result of merge by using a sorting circuit 7. Next, the next minimum or maximum data is fetched from the string in which the data outputted as a result of merge has been contained, inputted to the sorting circuit 7, joined together with the remaining data of (k)-1 pieces, and the extracting operation is executed repeatedly plural times. A bank address is cut from (k) pieces of data to which the bank address has been given, and given to an address generating circuit 13, and a data address to be read out in the next time to the buffer memory 15 is determined.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はソート処理装置に関し、特に大量のデータを短
時間で昇順あるいは降順に並びかえることを可能とする
ソート処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a sort processing device, and particularly to a sort processing device that can sort a large amount of data in ascending order or descending order in a short time.

〔従来技術〕[Prior art]

ソートとは、I5−えられたデータの集まりを所定の順
序に従って並び替える処理である。電子計算機における
ソート処理とは、数値あるいは文字列として与えられた
データが、計算機内部では“OIIあるいは′l″の二
値符号で表記されている事がら。
Sorting is a process of rearranging a collection of obtained data in a predetermined order. Sorting processing in electronic computers means that data given as numerical values or character strings is expressed inside the computer as a binary code of ``OII'' or ``l''.

二値符号の持つ数値的意味にもとづいて、与えられたデ
ータを相互に比較し、それぞれのデータの大小関係によ
って、昇順(小さいものから大きいものへの順)あるい
は降順〔大きいものから小さいものへの順)にデータを
並びかえることである従来、このようなソート処理を、
メモリ装置と中央演算装置I(CPU)を中核として構
成した汎用の電子計算機で実行する場合には、メモリ装
置と中央演算装置の間のデータ転送や比較が逐次処理で
あることや、一度に2個のデータ間の比較しか出来ない
等の理由により、ソート処理で対象とするデータ数が大
量の場合には、処理に要する時間が極めて長くなるとい
う問題があった。
Based on the numerical meaning of the binary code, the given data are compared with each other, and depending on the magnitude relationship of each data, ascending order (from the smallest to the largest) or descending order (from the largest to the smallest) Traditionally, this kind of sorting process involves sorting the data in the order of
When executed on a general-purpose computer configured with a memory device and central processing unit I (CPU) as its core, data transfer and comparison between the memory device and central processing unit are sequential processes, and two If a large amount of data is to be processed in the sorting process, the time required for the process becomes extremely long due to reasons such as the ability to compare only individual pieces of data.

かかるソート処理時間に関する問題を解決する従来技術
として、専用のソート処理vlW1を用いて。
As a conventional technique for solving the problem regarding the sort processing time, a dedicated sort processing vlW1 is used.

4比較による大小関係の判定と、データの伝送を波列に
行って高速化を図る方法がある。第2図に該ソート処理
装置に用いるソート回路の構成例を示す0本回路は、比
較の対象となるデータを保持するための第1のメモリ1
および第2のメモリ2、比較[I3.該比較器3によっ
て得られた判定結果を保持するためのフラグレジスタ4
および入出力回路5からなるユニット6の複数個を一次
元接続した構成を有し、でいる1本回路では、データ相
互の比較と転送を複数のユニットで同時に実行できるた
め、以下に説明する動作原理にしたがって、データ数に
比例する時間でソート処理を行うことができる。
4. There is a method of determining the magnitude relationship by comparison and transmitting data in a wave train to increase the speed. FIG. 2 shows an example of the configuration of a sorting circuit used in the sorting processing device.
and second memory 2, comparison [I3. a flag register 4 for holding the determination result obtained by the comparator 3;
It has a configuration in which a plurality of units 6 consisting of input/output circuits 5 and 5 are connected one-dimensionally, and with the single circuit, mutual comparison and transfer of data can be performed simultaneously in multiple units, so the operation described below is as follows. According to this principle, sorting processing can be performed in a time proportional to the number of data.

第3図は、ff52図のソート回路の動作原理図であり
、−例として、0から9までの電析の数値データのうち
、3.6.5,2,4.Iの6個のデータを降順にソー
トする場合の動作を示している。
FIG. 3 is a diagram showing the operating principle of the sorting circuit shown in FIG. This shows the operation when six pieces of data of I are sorted in descending order.

なお、第3図では、第2図におけろ第1のメモリ1およ
び第2のメモリ2とフラグレジスタ4のみを簡略に示し
ており、他の回路は省略しである。
Note that, in FIG. 3, only the first memory 1, second memory 2, and flag register 4 in FIG. 2 are simply shown, and other circuits are omitted.

ソート処理を行うにあたって、はじめに全てのユニット
のI5tのメモリ1および@2のメモリ2の内容を初期
設定する。この際、降順にソートする場合には、データ
の最小値として0を設定し。
In performing the sorting process, first, the contents of memory 1 of I5t and memory 2 of @2 of all units are initialized. At this time, when sorting in descending order, set 0 as the minimum value of the data.

昇順にソートする場合には、データの最大値として9を
設定する。第3図は降順にソートする場合であり、第1
および第2のメモリl9.2には0を設定しである1本
回路では、順次データを入力する入力操作と、順次デー
タを出力する出力操作とでソート処理を行うが、−口の
入力操作で各ユニットでは、データの右方向への転送と
2個のデータ間での比較とを行う、この場合、転送され
るデータは第1および第2のメモリ1.2に保持された
2個のデータのうちの小さい方である。この時。
When sorting in ascending order, 9 is set as the maximum value of data. Figure 3 shows the case of sorting in descending order.
In this single circuit, the second memory l9.2 is set to 0, and the sorting process is performed using an input operation that sequentially inputs data and an output operation that sequentially outputs data. In each unit, data is transferred to the right and a comparison is made between two pieces of data. In this case, the data to be transferred are two pieces of data held in the first and second memories 1.2. This is the smaller of the data. At this time.

データの転送と同期して1個のデータをソート回路に入
力し、最左端のユニットの第1のメモリ1あるいは第2
のメモリ2のいずれかのうち、転送によって空になった
方のメモリに保持する。(−T1〜T6) この入力操作を繰り返して6個のデータの全ての入力が
完了した時点で、今度は出力操作によって順次データを
隣接する左側のユニットに転送する。この時、転送する
データはユニット内の2個のデータのうち大きい方であ
り、Iα右端のユニットには0を入力する。(T7〜T
12)以上、入力操作の繰り返しによってデータが順次
入力され、データの入力が完了した段階で出力操作を実
行することにより、最大値から順次データが降順に取り
出される。ここで説明したソート処理の一例では、6個
のデータの並べかえが3個のユニットを用いることによ
って、6目の入力操作と6回の出力操作とで行えること
から、一般に第2図のソート回路では、1回の入力操作
と1回の出力操作と11す、rクルとすると、データ数
に等しい入力サイクルおよび出力サイクル数で昇順ある
いは降順のソー1−処理が行える。
One piece of data is input to the sorting circuit in synchronization with the data transfer, and the data is input to the first memory 1 or the second memory of the leftmost unit.
The data is held in one of the memories 2 that is emptied by the transfer. (-T1 to T6) When this input operation is repeated and all six pieces of data have been input, the data is sequentially transferred to the adjacent left unit by an output operation. At this time, the data to be transferred is the larger of the two pieces of data in the unit, and 0 is input to the rightmost unit of Iα. (T7~T
12) As described above, data is sequentially input by repeating the input operation, and by executing the output operation when the data input is completed, data is sequentially extracted in descending order starting from the maximum value. In the example of the sorting process described here, by using three units, the sorting of six pieces of data can be performed by the sixth input operation and the sixth output operation, so generally the sorting circuit shown in Figure 2 is used. Now, assuming that there is one input operation and one output operation, and 11, r cycles, ascending or descending sort processing can be performed with the number of input cycles and output cycles equal to the number of data.

本ソート回路を電子計算機の1.’f1辺装置i!(ソ
ート処理袋WI)とし、で使用する場合には、W1子計
算機のメモリ等に予め保持しであるソート対象のデー夕
を電子計算機のデータ転送路を介してソート処理装置に
順次入力し、次いでソート処理がなされたデータを同じ
くデータ転送路を介して元のメモリ等に順次格納する。
1. This sorting circuit is used in an electronic computer. 'f1 side device i! (Sort processing bag WI), when used in, the data to be sorted, which is stored in advance in the memory of the W1 child computer, is sequentially input to the sort processing device via the data transfer path of the computer, Next, the sorted data is sequentially stored in the original memory or the like via the same data transfer path.

この場合、データの転送時間と重畳して比較による大小
判定を行うなどにより、はぼデータの転送時間でソート
処理を行なうことができ、ソート処理に要する時間を大
幅に短縮することが可能となる。
In this case, by overlapping the data transfer time to determine the size by comparison, sorting can be performed within the data transfer time, and the time required for sorting can be significantly reduced. .

以上説明した第2図のソート回路では、lユニット当り
2個のデータを取り込むためL個のユニットを一次元に
接続した場合には、一度に最大2L個までのデータのソ
ートが可能である。しかし、このようなソート回路を電
子計算機の周辺装置として設ける場合には、予めソート
処理で対象とするデータ数の上限を想定して、これに見
合う十分大量のユニットを設けておく必要があり、ソー
ト処理装置の規模が大型になり不経済となるという問題
があった。また、いったんユニット数を決定してソート
処理装置を構成してしまうと、許容されるデータ数をこ
えるソートは本ソート処理装置では行えない問題があっ
た。このため、従来はt4jめて大量のデータのソート
が必要な場合には、データ全体をソート処理装置でソー
ト処理できろ程度の規模に分割し・た後に、それぞれを
ソート処理装置でソートし、全体を汎用針t!機上のC
PU装置を用いてソフトウェアの手段によってマージ(
併用)するマージ・ソート法と呼ばれるソート方法がと
られてきた。
In the sorting circuit shown in FIG. 2 described above, when L units are connected one-dimensionally to take in two data items per l unit, it is possible to sort up to 2L data items at a time. However, when such a sorting circuit is installed as a peripheral device of a computer, it is necessary to assume in advance the upper limit of the number of data to be processed in the sorting process, and to provide a sufficiently large number of units to correspond to this upper limit. There is a problem in that the scale of the sort processing device becomes large and uneconomical. Furthermore, once the number of units has been determined and the sorting processing device has been configured, there is a problem that the sorting processing device cannot perform sorting that exceeds the permissible number of data. For this reason, conventionally, when a large amount of data needs to be sorted for the first time in t4j, the entire data is divided into pieces that can be sorted by a sort processing device, and then each piece is sorted by the sort processing device. General-purpose needle T! C on the plane
Merge by means of software using PU equipment (
A sorting method called the merge-sort method has been used.

一般に、いくつかのデータがある規則にもとすいて並べ
られたデータ列をストリングと称している。マージ・ソ
ート法では2個以上のストリングを1個のストリングと
し、てマージする。この時、一度にマージできるストリ
ング数をマージ・ウェイ数という、いまストリング数が
16個あったとすると、マージ・ウェイ数が2ならば、
ストリング数は、16個から8個、4個、2個、1個と
減少していき、ソート処理が終る。−同のマージ操作で
は、マージ・ウェイ数と等しい数のデータを相互に比較
し、比較の結果にもとづいて、全てのデータを並びかえ
るために移動する。上記の例では、このマージ操作を4
回行っており、何回のマージ操作を必要とするかは、ス
トリング数mとマージ・ウェイ数にの関係からloIK
kmでケ、えられる、し、たがって1m個のストリング
に予めソートされた全体でN個のデータをマージするた
めには。
Generally, a data string in which several pieces of data are arranged according to a certain rule is called a string. In the merge sort method, two or more strings are combined into one string and merged. At this time, the number of strings that can be merged at once is called the number of merge ways.If there are currently 16 strings, and the number of merge ways is 2, then
The number of strings decreases from 16 to 8, 4, 2, and 1, and the sorting process ends. - In the same merge operation, a number of data equal to the number of merge ways are compared with each other, and based on the comparison result, all data are moved to be rearranged. In the above example, this merge operation would be 4
The number of merge operations required is determined by the relationship between the number of strings m and the number of merge ways.
km can be obtained, so to merge a total of N data pre-sorted into 1m strings.

NXlogbm回のデータの移動が必要となる。NXlogbm data movements are required.

一般に、汎用の計算機では1台のCPU装置で比較を行
うために、マージ・ウェイ数、には2である。このため
、汎用計算機に、専用のソート処理装置を付加した場合
であっても、データ数が極めて大きく、ストリング数m
も大きい大量のデータをソート処理する場合には、複数
回のマージ操作が必要となり、膨大な処理時間が必要と
なるという問題があった。したがって、今日、データベ
ースを対象とした情報処理技術の進展に伴ってソート処
理で対象とするデータの件数はますます増大する傾向に
あり、かかる従来技術の問題を解決した。極めて膨大な
データ数にも柔軟に対処できる処理能力の高いソート処
理装置が望まれている−0〔発明の目的〕 本発明の目的は、上記従来技術の問題点を除去し、デー
タベース等の唖めて大量のデータを対象としたソート処
理に適するソート処理V&lを提供することにある。
Generally, in a general-purpose computer, the number of merge ways is 2 because the comparison is performed using one CPU device. For this reason, even when a dedicated sort processing device is added to a general-purpose computer, the amount of data is extremely large, and the number of strings is m.
When sorting a large amount of data, multiple merge operations are required, resulting in a huge amount of processing time. Therefore, with the progress of information processing technology for databases today, the number of data items to be processed in sorting processing tends to increase more and more, and the problems of the prior art have been solved. There is a need for a sort processing device with high processing capacity that can flexibly handle extremely large amounts of data. The object of the present invention is to provide a sorting process V&I suitable for sorting a large amount of data.

〔発明の構成および作用〕[Structure and operation of the invention]

本発明は、少なくともに個のデータのうちから最小もし
くは最大のデータを1*出できるソート手段と、ソート
済の複数のデータ列の中から11!lのデータ列を選択
してデータを取り出し、取り出したデータに識別子を付
グして前記ソート手段へ入力する入力処理手段と、該ソ
ー1一手段によって抽出し、たデータから識別子を切り
出す出力処理手段とを少なくとも具備してソート処理装
置を構成し。
The present invention provides a sorting means capable of outputting 1* minimum or maximum data from at least 2 data, and 11* data from among a plurality of sorted data strings. an input processing means for selecting the data string of 1 and extracting the data, attaching an identifier to the extracted data and inputting it to the sorting means; and an output processing for cutting out the identifier from the data extracted by the saw means. The sorting processing device comprises at least means.

前記出力処理手段によって得られる識21子にもとづい
て前記入力処理手段によって選択するデータ列を決定す
ることによりマージ操作を行うことを特徴とするもので
ある。以下1本発明の実施例について詳細に説明する。
The merge operation is performed by determining a data string to be selected by the input processing means based on the identifier obtained by the output processing means. Hereinafter, one embodiment of the present invention will be described in detail.

第1図は本発明の一実施例にかかるソート処理装置の構
成図である。同図において、7はソート回路、8は制御
回路、9は入力レジスタ、10は出力レジスタ、11は
バンクアドレス発生回路。
FIG. 1 is a block diagram of a sort processing apparatus according to an embodiment of the present invention. In the figure, 7 is a sorting circuit, 8 is a control circuit, 9 is an input register, 10 is an output register, and 11 is a bank address generation circuit.

12はソート入出力切り換え回路、13は読み出L5ア
ドレス発生回路、14は書き込みアドレス発生回路、1
5はバッファメモリ、16はアドレス切り換え回路、1
7はデータ切り替え回路、18は切り替う制御1it(
ST)、19はバンクアドレス編(BA)、20はI相
信号線(1)、21は■相信号線(n)、22は状態制
御線(INT)。
12 is a sort input/output switching circuit, 13 is a read L5 address generation circuit, 14 is a write address generation circuit, 1
5 is a buffer memory, 16 is an address switching circuit, 1
7 is a data switching circuit, 18 is a switching control 1it (
ST), 19 is a bank address (BA), 20 is an I-phase signal line (1), 21 is a ■-phase signal line (n), and 22 is a state control line (INT).

23は入力制御線(PUSH)、24は出力制御線(P
OP)、25は入出力制御線(PUP)。
23 is the input control line (PUSH), 24 is the output control line (P
OP), 25 is an input/output control line (PUP).

26はデータ入出力線(D I O)である。26 is a data input/output line (DIO).

以上の構成において、ソート回路7が最小値あるいは最
大値を抽出するためのソート手段を構成し1.入力レジ
スタ9とソート入出力切り替え回路12、読み出しアド
レス発生口路13とが入力処理手段を構成し、出力レジ
スタ10とバンクアドレス発生回路11.書き込みアド
レス発生回路14とが出力処理手段を構成している。
In the above configuration, the sorting circuit 7 constitutes a sorting means for extracting the minimum value or maximum value.1. The input register 9, the sort input/output switching circuit 12, and the read address generation circuit 13 constitute an input processing means, and the output register 10 and the bank address generation circuit 11. The write address generation circuit 14 constitutes an output processing means.

ソート回路7は1本実施例では、第2図に示したソート
回路と同一構成の回路が適用しである。
In this embodiment, the sorting circuit 7 has the same configuration as the sorting circuit shown in FIG. 2.

本回路では、ユニット数をL個とし、た場合にはL≧に
/2 (L、 k :整数)の関係にあるに個のデータ
のソート処理が行える。ただし本発明では。
In this circuit, when the number of units is L, it is possible to sort data having a relationship of L≧/2 (L, k: integer). However, in the present invention.

二のツートロ路を従来技術のように、に回の入力操作を
緑り返し1次にに回の出力操作を繰り返すことによりに
個の非整列データをFl順もしくは降順に並べ替える手
段として用いるのみならず、順次1個のデータが更新さ
れるに個のデータの組から、その組のうち最小あるいは
最大のデータを順次に抽出する手段として用いる点が兄
なる。すなわち、第2図のソート回路では、第3図で説
明したように、昇順あるいは降順にソート処理を行う手
順でに個のデータに対するに回の入力操作を行った場合
には、データを入力し・た入出力端子に最も近いユニッ
ト内に最小もしくは最大のデータが保持されているにの
ため1.二の後1回の出力操作を行うことにより、この
最小あるいは最大のデータを抽出できる。このような1
回の出力操作により格納されているデータのうちの最小
もし、(は最大のデータを抽出できる原理は、すでに行
った入力操作の回数、出力操作の回数、入力操作と出力
操作の組み合わせ方には依存せず、ソート回路内にデー
タが存在する限り保証されている。したがって、このソ
ート回路を前記のような最小あるいは最大のデータを抽
出する手段として用いるには、に個のデータに対するに
回の入力操作をあらかじめ行った後に、出力操作と入力
操1作とを交互に繰り返すことにより行える。なお最小
のデータあるいは最大のデータのいずれを抽出するかは
The second two-toro path is only used as a means to rearrange the unsorted data in Fl order or descending order by repeating the input operation once and repeating the output operation once again, as in the prior art. Rather, it is used as a means for sequentially extracting the smallest or largest data from a set of data when each piece of data is updated. In other words, in the sorting circuit shown in Fig. 2, as explained in Fig. 3, if an input operation is performed on each piece of data in the procedure of sorting in ascending or descending order, the data will not be input.・Because the minimum or maximum data is held in the unit closest to the input/output terminal, 1. This minimum or maximum data can be extracted by performing one output operation after the second. 1 like this
The principle that the minimum and maximum data can be extracted from the data stored by the number of output operations is based on the number of input operations that have already been performed, the number of output operations that have been performed, and the combination of input and output operations. It is guaranteed as long as there is data in the sorting circuit.Therefore, in order to use this sorting circuit as a means to extract the minimum or maximum data as described above, it is necessary to This can be done by performing the input operation in advance and then repeating the output operation and the input operation alternately.Whether to extract the minimum data or the maximum data is determined.

ソート処理を行う向きが昇順であるか降順であるかによ
って、あらかじめ設定し、ておく。
This is set in advance depending on whether the sorting process is to be performed in ascending or descending order.

次に、第1図に示した本発明実施例のソート処理装置の
動作を、第4図を参照し、て説明する6本ソート処理装
置のソート処理の過程は、初期ソート段階とマージ段階
とから成る。この切り替えは。
Next, the operation of the sorting device according to the embodiment of the present invention shown in FIG. 1 will be explained with reference to FIG. 4. The sorting process of the six-piece sorting device includes an initial sorting stage and a merging stage. Consists of. This switch.

切り替え制御線(ST)18によって行い、5T18が
論理レベルで11177の場合には初期ソート段階であ
り、”o”の場合にはマージ段階である。−はしめに、
初期ソート段階(ST=”ビ′)について説明する。初
期ソートmNでは、外部から′jえられるソート対象の
非整列データをソート回路7で部分的にソートしてスト
リングを形成し、バッファメモリ15に格納する処理を
行う8この際。
This is done by the switching control line (ST) 18, and when 5T18 has a logic level of 11177, it is the initial sorting stage, and when it is "o", it is the merging stage. - At the bottom,
The initial sorting stage (ST = "BI') will be explained. In the initial sorting mN, the unaligned data to be sorted which is obtained from the outside is partially sorted by the sorting circuit 7 to form a string, and the string is stored in the buffer memory 15. 8 At this time, perform the process of storing it in .

非整列データは外部からデータ入出力線(DID)26
を介して順次与えられる。このデータを入力レジスタ9
およびソート入出力切り向え回路12を介して、ソート
回路7に順次人力する。ソート回路7では、第3図に示
したように、ttt数回の入力操作と複数回の出力操作
を繰り返すことにより、ソート済みデータ列すなわちス
トリングを出力する。このス1−リングをソート入出力
q1り替え回路12と出力レジスタIOを介して、バッ
ファメモリ15に格納する。この時のバッファメモリ1
5の書き込みアドレス(ADW)は、書き込みアドレス
発生回路14によって生成する。
Unaligned data is transferred from outside via data input/output line (DID) 26.
are given sequentially via Input this data into register 9
Then, the sorting circuit 7 is manually input via the sorting input/output switching circuit 12. As shown in FIG. 3, the sorting circuit 7 outputs a sorted data sequence, that is, a string, by repeating several input operations and multiple output operations. This string is stored in the buffer memory 15 via the sort input/output q1 switching circuit 12 and the output register IO. Buffer memory 1 at this time
The write address (ADW) No. 5 is generated by the write address generation circuit 14.

以上のように、初期ソート段階では、第3図に示し、た
従来技術のソート処理に於ける操作と同様の操作を本ソ
ート処理装置でt7う、二とにより、バッファメモリ1
5内に複数回のストリングを1!)ることができる、第
4図のバッファメモリ15内の三角形は、この初期ソー
ト段階で得られた個々のストリングを示しており、この
図ではklのストリングを得られた場合を示している。
As described above, in the initial sorting stage, the present sorting processing apparatus performs operations similar to those in the sorting processing of the prior art shown in FIG.
1 string multiple times within 5! ), the triangles in the buffer memory 15 in FIG. 4 indicate the individual strings obtained in this initial sorting stage, in this figure the case where kl strings were obtained.

次に、マージ段階(ST=”O”)について説明する。Next, the merge stage (ST="O") will be explained.

マージ段階では1次に説明する初期操作と通常操作とを
行うことにより、バッファメモリ15に格納しているに
個のストリングを、ソート回路7を用いてマージし、デ
ータ入出力線(D I 0)26からソート済みのデー
タとして出力する処理を行う、はじめに初期操作では、
バッファメモリ15にケ・えられたに個のストリングの
それぞれから最小あるいは最大のデータを取り出し、取
り出されたに個のデータを入力レジスタ9を介して、k
回の入力操作によってソート回路7に入力する。
In the merging stage, by performing the initial operation and normal operation described next, the 2 strings stored in the buffer memory 15 are merged using the sorting circuit 7, and the data input/output line (D I 0 ) 26 to output the data as sorted data.
The minimum or maximum data is taken out from each of the strings stored in the buffer memory 15, and the taken out data are sent to the input register 9 and k
The data is input to the sorting circuit 7 by the input operation twice.

最小のデータを取り出すか最大のデータを取り出すかは
、W順にソートするか降順にソートするかで決める。次
の通常操作では、ソート回路7に入力されたに個のデー
タから1回の出力操作によって、最小あるいは最大のデ
ータ1個をマージ結果として出力する。この際出力デー
タは、前記と同様に昇順にソートするか降順にソー1−
するかで。
Whether to extract the minimum data or the maximum data is determined by sorting in W order or descending order. In the next normal operation, the smallest or largest piece of data is output as a merge result from the pieces of data input to the sorting circuit 7 through one output operation. At this time, the output data can be sorted in ascending order as above, or sorted in descending order.
I'll do it.

最小のデータを出力するか最大のデー・りを出力するか
を決め、ソート入出力切り替え回路12および出力レジ
スタ10を介してデータ入出力8(DIO)26からソ
ート済みのデータとして外部に出力する。次に、マージ
結果として出JJしたデータが含まれていたストリング
から次の最小あるいは最大のデータを取り出しソー1へ
回路7へ入力し。
Decide whether to output the minimum data or the maximum data, and output it to the outside as sorted data from the data input/output 8 (DIO) 26 via the sort input/output switching circuit 12 and the output register 10. . Next, the next minimum or maximum data is extracted from the string containing the JJ data output as a merge result and inputted to the circuit 7 of the saw 1.

ソート回路7内に残っている(k−1)個のデータと合
わせてに個のデータ間で2回目の最小あるいは最大のデ
ータを取り出す操作を行う0以上の操作を、順次マージ
結果を出力しながらに個のストリングの全てのデータが
無くなるまで繰り返すことにより、マージン操作が完了
する。
In addition to the (k-1) pieces of data remaining in the sorting circuit 7, 0 or more operations are performed to extract the second minimum or maximum data among the pieces of data, and the merge result is output in sequence. The margin operation is completed by repeating this until all the data in the string is exhausted.

以上の通常操作を繰り返し8行うにあたっては。To repeat the above normal operations 8 times.

ソート回路7へ入力するデータに、いずれのス(−リン
グから取り出し、たデータであるかを識別するための識
別子を前記の入力処理手段によってあらかじめ付加し、
ておき、ソート回路7から出力された最小あるいは最大
のデータの識別子を前記の出力処理手段によって参照す
ることにより、次に入/+″ 力すべきデータをいずれのストリングから取り出せば良
いかを決定することができろ。この識別子は、少なくと
もに個のストリングのいずれであるのかを判別すること
ができればよく、2進表現をし、た場合には、 log
、、 kビットとなる。この2進表現し、た識別子をバ
ンクアドレスと称する。
An identifier is added in advance to the data input to the sorting circuit 7 by the input processing means for identifying which string the data is extracted from,
Then, by referring to the identifier of the minimum or maximum data output from the sorting circuit 7 by the output processing means, it is determined from which string the data to be input next should be extracted. This identifier only needs to be able to determine which of at least two strings it is, and if it is expressed in binary, then log
,, k bits. This binary-expressed identifier is called a bank address.

次に、バンクアドレスの付与方法について説明する。初
期操作では、バンクアドレスは初期値としてOから(k
−1)までのに個のアドレスをバンクアドレス発生回路
11で生成し、入力レジスタ9によってソート対象デー
タに付与、し5人力操作によって、バンクアドレスが付
与さ九たに個のデータが、ソート入出力切り替え回路1
2を介してソート回路7に入力される。出力時には、ソ
ート回路7からバンクアドレスが付与、されたデータが
ソート入出力切り替え回路12を介して出力レジスタ1
0に格納される。このデータからバンクアドレス(すな
わち識別子)を切り出して読み出しアドレス発生回路1
3に与えろ:とによって。
Next, a method of assigning bank addresses will be explained. In the initial operation, the bank address is initialized from O to (k
-1) The bank address generation circuit 11 generates 9 addresses, and the input register 9 assigns them to the data to be sorted. By manual operation, the 9 data with the bank addresses assigned are sorted. Output switching circuit 1
2 to the sorting circuit 7. At the time of output, data to which a bank address is assigned from the sorting circuit 7 is sent to the output register 1 via the sorting input/output switching circuit 12.
Stored at 0. Address generation circuit 1 reads out a bank address (that is, an identifier) from this data.
Give to 3: by.

この読み出しアドレス発生回路13で、バッファメモリ
15内の次に読み出すべきデータのアトし・スを決定す
る。この時、出力lノジスタ10に?!)I:。
This read address generation circuit 13 determines the address of data to be read next in the buffer memory 15. At this time, the output l nozzle 10? ! )I:.

れた識別子以外のデータ (本来ソートしようとし。Data other than the specified identifier (originally attempted to be sorted)

ているデータ)は、データ切り替え回路17を介して、
データ入出力線(DIO):!Gから出υする0、二の
時、出力されたデータは、11順あるいは降順にソート
されている。
data) is sent via the data switching circuit 17,
Data input/output line (DIO):! When 0 and 2 are output from G, the output data is sorted in 11th order or descending order.

次に、マージ段階に於ける木ソーl−処理装置各部の動
作を詳細に説明する。本ソート処理装置は。
Next, the operation of each part of the tree saw l-processing device in the merging stage will be explained in detail. This sorting processing device.

■相、■用の信号による同期回yδで全体がlIη成さ
れており、■相、■用からなろ1サイクルで1−】のデ
ータを並びかえる。第1図の20.21がすれぞtシT
相、■相のクロック線である。22け状態信号線であり
、この状態信号・線22によって初期操作状態と通常操
作状態とを設定する。状fll (,1号122を論理
1ノベルで″l ”に設定すると初期操作状態となり、
初期ソート段階とマージ段階のIII期操作に於いて、
ソート回路7にデータを連続して格納する動作または昇
順あるいは降順に連続してデータを抽出する動作のいず
九かを行うことができる。状態信号線22が論理レベル
で0′″の時は、データの入力操作と出力操作を交互に
行いながらマージする通常操作状態である。
The entire system is formed by a synchronization cycle yδ using the signals for the (2) phase and (2), and the data of 1-] is rearranged in one cycle from the (2) phase and (4). 20.21 in Figure 1 is right.
These are the phase and ■ phase clock lines. There are 22 status signal lines, and the initial operating status and normal operating status are set by this status signal line 22. If you set the state fll (, No. 1 122 to "l" in the logic 1 novel, it will be in the initial operation state,
In the stage III operation of the initial sorting stage and the merging stage,
It is possible to perform either an operation of successively storing data in the sorting circuit 7 or an operation of successively extracting data in ascending or descending order. When the status signal line 22 is at a logic level of 0'', it is a normal operation state in which data input and output operations are performed alternately and merged.

f55図は、ソート回路7に連続し、てデータを格納す
る初iI′I操作の動作を示すタイムチャートである。
FIG.

連続してデータを格納する場合に、は、バンクアドレス
は、[前のバンクアドレスからインクリメント等の処理
によって一意に決定できるため。
When storing data continuously, the bank address can be uniquely determined by processing such as incrementing from the previous bank address.

同図に示すように、バンクアドレスの計算→読み出しア
ドレスの計算→データの読み出しの手順に従ってソート
回路7へのデータの格納を1サイクルの間に2回実行で
きる。これにより、kウェイのマージソートを行うため
に初期操作で実施するに個のデータのソート回路7への
格納は、に/2す・(クルで完了する。
As shown in the figure, data can be stored in the sorting circuit 7 twice in one cycle according to the procedure of bank address calculation→read address calculation→data reading. As a result, the storage of data into the sorting circuit 7, which is performed in the initial operation to perform a k-way merge sort, is completed in 2/2 hours.

第6図は、ソート回路7にデータの入力処理と出力処理
を交互に行う通常操作のタイムチャートである。出力処
理によって、ツートロ路7から油出されたデータからバ
ンクアドレスを切り出し。
FIG. 6 is a time chart of a normal operation in which data input processing and output processing to the sorting circuit 7 are performed alternately. By output processing, the bank address is extracted from the data extracted from the two-way road 7.

次に入力するデータのバンクアドレスとする。このバン
クアドレスに基づいて読み出しアドレスを決定し1.バ
ッファメモリ15からデータを読み出してソート回路7
に入力する。二の1サイクルの間に、W前のサイクルで
すでに読み出されて人力レジスタ9に保持されているデ
ータむソート回v87に入力する。このように、データ
の入力処理と出力処理とを172サイクルずらして行う
ことにより、アドレス計算とソート回路への入出力を挿
行して行う二とが可能となり、連続し1て各サイクルご
とに1個のデータの入出力が完了する。したがって1本
ソート処理装置では、データ数がN個であればNサイク
ルでマージ操作が行える。
This is the bank address for the next input data. Determine the read address based on this bank address.1. Reading data from buffer memory 15 and sorting circuit 7
Enter. During the second cycle, data already read out in the previous cycle and held in the manual register 9 is input to the sorting circuit v87. In this way, by shifting data input processing and data output processing by 172 cycles, it is possible to perform address calculation and input/output to the sorting circuit by inserting them. The input/output of one piece of data is completed. Therefore, in a single sort processing device, if the number of data is N, the merge operation can be performed in N cycles.

次に9本ソート処理装置各部の詳細な回路構成を示す。Next, the detailed circuit configuration of each part of the nine-piece sort processing device will be shown.

  ゛ 第7図は、第1図に示した制御回路8の詳細図である。 ゛ FIG. 7 is a detailed diagram of the control circuit 8 shown in FIG. 1.

図中の、27はリセット(、”を目線(R3T)。In the figure, 27 is reset (, looking at `` (R3T)).

28はORゲート、29はANr)ゲート、、1IO1
:tインバータ、31はアップダウンカウンタ、32は
フリップフロップ回路である。アップダウンカウンタ3
1は、現在ソート回路7に格納されているデータの数を
示し、ソート回路7に対する入力操作の回数および出力
操作の回数によってカウンタ値が増減する。その結果と
して、現在ソート回路7に格納されているデータの数が
0個であることもし、くけに個であることを検出して、
フリップフロップ回路32をセットするかある。はりセ
ットする。ブリップフロップ回路32の出力であるPU
P信号25によってソート入出力切り替え回路12を制
御し、データの入出力方向を決定する。
28 is an OR gate, 29 is an ANr) gate, 1IO1
:t inverter, 31 is an up/down counter, and 32 is a flip-flop circuit. up/down counter 3
1 indicates the number of data currently stored in the sorting circuit 7, and the counter value increases or decreases depending on the number of input operations and the number of output operations to the sorting circuit 7. As a result, it is detected that the number of data currently stored in the sorting circuit 7 is 0 pieces, and it is also detected that the number of pieces of data is 0 pieces.
The flip-flop circuit 32 may be set. Set the beam. PU which is the output of the flip-flop circuit 32
The sort input/output switching circuit 12 is controlled by the P signal 25, and the input/output direction of data is determined.

第8図は第1図に示したソート入出力切り替え回路12
の詳細図である1図中の点線枠内は、lビット分だけを
示しており、33はトライステートバッファゲートであ
る。PUr’信号25が論理レベルで“ビ°の場合は入
力操作時であり、入力レジスタ9のデータをソート回路
7の入力とする。
Figure 8 shows the sort input/output switching circuit 12 shown in Figure 1.
The area within the dotted line frame in Figure 1, which is a detailed diagram of , shows only l bits, and 33 is a tri-state buffer gate. When the logic level of the PUr' signal 25 is "BI°", it is an input operation, and the data in the input register 9 is input to the sorting circuit 7.

・方、 r’Ur’信号25が論理レベルで0′°の場
合は出力操作時であり、ツートロ路7の出力データを出
力レジスタ10に格納する方向にデータの流れを切り替
える。
On the other hand, when the r'Ur' signal 25 is at a logic level of 0'°, it is an output operation, and the data flow is switched in the direction of storing the output data of the two-way path 7 in the output register 10.

第9図は第1図に示したバンクアドレス発生回路】2の
詳細図である1図中の371はカウンタであり、初期操
作において連続的なバンクアドレスを発生する。出力レ
ジスタ10から切り出したバンクアドレスとカウンタ3
4で生成し、たアドレスとの切り替えは、状態信pf線
22によって行う。
FIG. 9 is a detailed diagram of the bank address generation circuit shown in FIG. 1. Reference numeral 371 in FIG. 1 is a counter, which generates continuous bank addresses in the initial operation. Bank address and counter 3 extracted from output register 10
Switching with the address generated in step 4 is performed using the status signal pf line 22.

第1O図および第11図はそJLぞれ第1図のアドレス
切り替え回路16およびデータ切り替え回路17の詳細
図である0、これらの回路では、」tに給替え制御線(
ST)18によってアドレスお上びデータそtLぞれの
切り替えを行う。
1O and 11 are detailed diagrams of the address switching circuit 16 and data switching circuit 17 shown in FIG. 1, respectively. In these circuits, the switching control line (
ST) 18 performs switching between addresses and data.

第12図は第1図の読み出しアドレス発生回路13の詳
細図である1本回路は、2騙のカウンタ35および36
と多ビットのシフト回路371隻ビットの加算回路38
から構成されている。カウンタ35け、に個のストリン
グのそれぞれに7,1シて何番口のデータを次に取り出
すかのアドレスを設定するためのカウンタであり、この
アドレスをバンク内アドレスと称する。カウンタ:1G
はデー夕の読み出しアドレスの内でバンクアドレスより
上位のビットのアドレスを発生するためのカウンタであ
る。多ビットのシフト回路37は、カウンタ3Gの出力
とバンクアドレス(BA)とを任意の位置にシフトし、
このシフト回路37の出力を。
FIG. 12 is a detailed diagram of the read address generation circuit 13 shown in FIG. 1. One circuit consists of two counters 35 and 36.
and multi-bit shift circuit 371-bit addition circuit 38
It consists of Counter 35 is a counter for setting an address indicating which number of data is to be extracted next in each of the 7,1 strings, and this address is called an in-bank address. Counter: 1G
is a counter for generating the address of bits higher than the bank address in the data read address. The multi-bit shift circuit 37 shifts the output of the counter 3G and the bank address (BA) to an arbitrary position,
The output of this shift circuit 37.

多ビットの加算回路38によってバンク内アドレスと加
えて読み出しアドレス(図中のADR)とする、これに
より、2のべき乗のm位でストリングを構成するデータ
数を可変とすることができる。
The multi-bit adder circuit 38 adds the in-bank address to the read address (ADR in the figure), thereby making it possible to vary the number of data constituting a string at m-th power of 2.

先に説明し、た処理ソート段階では、多ビットのシフト
回路37によってバンクアドレスを読み出しアドレスの
最下位ビット側に移動する二とによって、初期バンクア
ドレスを用いて、連続するメモリ領域をアクセスする。
In the processing sorting stage described above, consecutive memory areas are accessed using the initial bank address by moving the bank address to the least significant bit side of the read address using the multi-bit shift circuit 37.

第13図は、第1図の書き込みアドレス発生回路]/の
詳細図である。この回路はカウンタ39で構成されてお
り、初期ソート段階では、pop償号と同期し、て得ら
れるマージ結果としてのデータを順次連続してバッファ
メモリ15に格納するための書き込みアドレスを発生す
る。
FIG. 13 is a detailed diagram of the write address generation circuit shown in FIG. 1. This circuit is composed of a counter 39, and in the initial sorting stage, it generates write addresses for successively storing data as a result of merging in the buffer memory 15 in synchronization with pop decoding.

以上説明した本実施例のソート処理装置はカウンタと切
替回路およびnQlなΔNDゲート、ORゲートなどか
ら構成されているため、バイポーラトランジスタやMo
Sトランジスタなど、従来既知のn路手段を用いて構成
できろ。
The sort processing device of this embodiment explained above is composed of a counter, a switching circuit, an nQl ΔAND gate, an OR gate, etc.
It can be constructed using conventionally known n-way means such as an S transistor.

以上説明した本発明の実施例では、同一ソート手段を用
いて、初期ソート段階とマージ段階とでデータ全体のソ
ート処理を行う構成を示したが。
In the embodiment of the present invention described above, the configuration is shown in which the same sorting means is used to sort the entire data in the initial sorting stage and the merging stage.

初期ソート段階を行うソート″f、p2とマージ段階を
行うソート1段の双方を具備する構成とすること。
The configuration has both a sort "f, p2 which performs an initial sorting stage and a sort 1 stage which performs a merging stage.

あるいはマージ!!111のみを行うように構成するこ
とも可能である。
Or merge! ! It is also possible to perform a configuration in which only 111 is performed.

また1本実施例では、1回のマージ操作によってに個の
ストリングを1個のストリングとする場合を示したが、
ソート対象となるデータを十分に格納できるだけの容量
のバッファメモリ15および前記メモリ*itを備える
ことによって1本ソート処理装置を用いた複数回のマー
ジ操作の繰り返しで、に値以上のストリングであっても
容易にソート可能な構成にできる。さらに、J+、ソー
ト処理装置を複数台用いて多段接続することによって。
In addition, in this embodiment, a case is shown in which several strings are made into one string by one merge operation, but
By providing the buffer memory 15 with a capacity sufficient to store the data to be sorted and the memory *it, it is possible to repeat the merging operation multiple times using one sorting processing device, and it is possible to generate strings with a value greater than or equal to . can also be configured to be easily sortable. Furthermore, by using multiple J+ sort processing devices and connecting them in multiple stages.

1台のソート処理装置で繰り返しマージ操作をするより
も短時間でソート処理を行うことができる。
Sorting processing can be performed in a shorter time than when a single sorting processing device repeatedly performs merging operations.

この場合には、複数の前段のソート処理装置で得られた
マージ結果すなわちバッファメモリに格納したストリン
グを直接次段のソート処理装置の入力とするように接続
した複数台のソート処理装置で順次マージ操作を行うこ
とにより、マージ操作を波列に実行できるため、全体の
ソート処理時間を短縮できる。
In this case, the merge results obtained by multiple previous-stage sorting devices, that is, the strings stored in the buffer memory, are sequentially merged by multiple sorting devices connected so that they are directly input to the next-stage sorting device. By performing this operation, a merge operation can be performed on the wave train, thereby reducing the overall sorting processing time.

また本実施例では、に個のデータのうちから最大値ある
いは最小値を短時間で抽出する手段として第2図に示し
・た従来技術によるソート回路を適用し、た場合を示た
が、最大値あるいは最小値を抽出する手段としては、連
想メモリなどを適用することも可能である。
In addition, in this embodiment, a case is shown in which the conventional sorting circuit shown in FIG. As a means for extracting the value or minimum value, it is also possible to apply an associative memory or the like.

また本実施例では、バッファメモリ15として。Further, in this embodiment, it is used as the buffer memory 15.

ランダムアクセス可能なメモリを使用し、た場合を示し
たが、二九以外にもストリングを保持し、、J小値ある
いは最大値から順次データを読み出しあるいはf”込み
できるシーケンシャルアクセス可能なデータの保持手段
を適用することもできろ。
We have shown the case where randomly accessible memory is used, but it is also possible to store strings in addition to 29, and store sequentially accessible data that can read or write data sequentially from the smallest value or the largest value. You can also apply the means.

また、本実施例のソート処理装置を計算機の付属装置と
し、て接続する場合には、バッファメモリ15を計′W
機のメインメモリ等と併用する構成も可能である。
In addition, when the sort processing device of this embodiment is connected as an accessory device to a computer, the buffer memory 15 is
A configuration in which it is used in combination with the machine's main memory, etc. is also possible.

また本実施例では、ソート回路7に入力するデータへの
識別子を付与する操作は、バッファメモリ15からデー
タを抽出した後に行う構成を例示し、だが、バッファメ
モリ15ヘス1−リングとして格納する際にあらかじめ
付与、して1.<構成も容易に実施できる。
Furthermore, in this embodiment, the operation of assigning an identifier to the data input to the sorting circuit 7 is performed after extracting the data from the buffer memory 15. However, when storing the data as one ring in the buffer memory 15, 1. <The configuration is also easy to implement.

〔発明の効果〕〔Effect of the invention〕

以上説明したように9本発明のソート処理装置では、少
なくともに¥のY−夕の)ちがら最小もしくは最大のデ
ータを抽出できるソート″f段と。
As explained above, in the sorting processing device of the present invention, the sort processing apparatus according to the present invention can perform sorting in the "f" stage, which can extract the minimum or maximum data of at least ¥ Y - yen.

あらかじめソート済のデータ列の1個を選択してデータ
を取り出し、取り出したデータに識別子を付与して該ソ
ート手段へ入力する六方処理手段と。
a hexagonal processing means for selecting one of the pre-sorted data strings, extracting the data, assigning an identifier to the extracted data, and inputting the extracted data to the sorting means;

該ソート手段によって抽出したデー9がら識別子を切り
出す出力処理手段をもってソート処理¥i[を構成し、
たことにより、従来技術ではできなかった極めて大きな
マージウェイ数によるマージ操作がデータ数に比例する
時間で実施する二とができる。こすしとともに、同一ソ
ート手段を用いて従来のソート方法による初期ソートを
併用できるようにした・二とにより、ソート対象である
データ数が大量の場合でも少ないマージ操作回数でデー
タ全体をソートできるため、大量のデータを短時間でソ
ートできる利点を有している。また、データそのものに
識別子(バンクアドレス)を付与して扱うために、1個
のストリングを構成するデータ数の制限をなくすことが
でき、従来のソート処理袋h1では扱うことの出来なか
った極めて大量のデータであってもソートできる利点が
ある。
A sorting process \i[ is configured with an output processing means for cutting out an identifier from the data 9 extracted by the sorting means,
As a result, it is possible to perform a merge operation with an extremely large number of merge ways, which was not possible with the prior art, in a time proportional to the number of data. In addition to Kosushi, it is now possible to use the same sorting method in combination with initial sorting using the conventional sorting method.With the second feature, even if the number of data to be sorted is large, the entire data can be sorted with a small number of merge operations. , which has the advantage of being able to sort large amounts of data in a short time. In addition, since the data itself is handled by being assigned an identifier (bank address), there is no limit to the number of data that can make up one string. It has the advantage of being able to sort even data.

さらに1本発明のソート処理装置は、メモリ。Furthermore, the sorting processing device of the present invention includes a memory.

カウンタ、切り替え回路およびANDゲート、ORゲー
トなどの従来既知の回路手段を用いて構成でき、バッフ
ァメモリの容量を拡大する。二とにより容易にソート処
理の対象とするデータ数を拡張できるため、従来技術に
よるソート処理装置を拡張するよりも、極めて性能/釧
(8比の高い寝首を実現する二とができる。
It can be configured using conventionally known circuit means such as counters, switching circuits, AND gates, and OR gates, and expands the capacity of the buffer memory. Since the number of data to be sorted can be easily expanded by the above method, it is possible to achieve an extremely high performance ratio (2) compared to expanding the sort processing device according to the prior art.

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

第1図は本発明の−・実施1列であるソート処]′II
Iv!装置の構成図、第2図は汎用計vI機の周辺装置
として使用する従来のソート処理回路の構成図、第3図
は第2図に示したソート処理日′111の動作原理図、
第4図は第1図に示したソート処理νi盾のl1lI+
 (’+’原理図、第5図および第6図は第1rlIの
ソート処理装置の動作説明用のタイムチャート、第7図
は第1図の制御回路の詳細図、第8図は第1図のソート
入出力切り替え回路の詳細図、第9図は第1図のバンク
アドレス発生回路のat繕図、第10図は第1図のアド
レス切り替え回路の詳細図、第11図は第1図のデータ
切り替え回v3の、lY′j1図、第12図は第1図の
読み出しアドレス発生回路の詳細図、第13図は第1図
の書き込みアドレス発生回路の詳細図である。 7・・・ソート回路、  8・・・制御回路、  9 
人力レジスタ、   10・・・出力レジスタ、   
11・・・バンクアドレス発生回路  12・・・ソー
ト入出力切り替え回路、  13・・・読み出し、アド
レス発生回路、   l/l・・・書き込みアトL・大
発生回路。 15・・・バッファメモリ、  16・・・アドレス切
り替え回路、  17・・・データ切り替え回路。 第  2  図 第3図 PUP 次旬しYスフ10 22  INT ハ”ツ伶メるツ ADW      ADR 第11図 r −−−−−−−−/ ’1 DW
FIG. 1 is a sorting process which is the first implementation of the present invention]'II
IV! A configuration diagram of the device, FIG. 2 is a configuration diagram of a conventional sort processing circuit used as a peripheral device of a general-purpose vI machine, and FIG. 3 is a diagram of the operating principle of the sort processing date '111 shown in FIG. 2.
Figure 4 shows l1lI+ of the sorting process νi shield shown in Figure 1.
('+' principle diagram, Figures 5 and 6 are time charts for explaining the operation of the 1st rlI sort processing device, Figure 7 is a detailed diagram of the control circuit in Figure 1, and Figure 8 is the diagram in Figure 1. 9 is a detailed diagram of the bank address generation circuit of FIG. 1, FIG. 10 is a detailed diagram of the address switching circuit of FIG. 1, and FIG. 11 is a detailed diagram of the address switching circuit of FIG. 1. FIG. 12 is a detailed diagram of the read address generation circuit of FIG. 1, and FIG. 13 is a detailed diagram of the write address generation circuit of FIG. 1. 7... Sort Circuit, 8... Control circuit, 9
Manual register, 10...output register,
11... Bank address generation circuit 12... Sort input/output switching circuit, 13... Read, address generation circuit, l/l... Write at L/large generation circuit. 15... Buffer memory, 16... Address switching circuit, 17... Data switching circuit. Fig. 2 Fig. 3 PUP Next Season Y Sufu 10 22 INT HA”TSURETSUADW ADR Fig. 11 r --------/ '1 DW

Claims (2)

【特許請求の範囲】[Claims] (1)少なくともk個(k<1:整数)のデータを格納
でき、該格納データのうちから最小もしくは最大のデー
タを抽出するソート手段と、昇順もしくは降順にあらか
じめ並び換えられたk個のデータ列のうちから1個のデ
ータ列を選択して該データ列中の最小もしくは最大のデ
ータを抽出して前記ソート手段へ入力するとともに、該
入力するデータにいずれのデータ列から抽出したかを示
す識別子を付与する入力処理手段と、前記ソート手段に
より抽出したデータから前記識別子を切り出す出力処理
手段とを具備し、前記出力処理手段により切り出した該
識別子にもとづいて前記入力処理手段により選択するデ
ータ列を決定することにより、k個のデータを昇順もし
くは降順の1個のデータ列へ並び換えるマージ操作が行
えるように構成したことを特徴とするソート処理装置。
(1) A sorting means that can store at least k pieces of data (k<1: integer) and extracts the minimum or maximum data from the stored data, and k pieces of data sorted in advance in ascending or descending order. Selecting one data string from among the columns, extracting the minimum or maximum data in the data string and inputting it to the sorting means, and indicating in the input data from which data string the data was extracted. The data string is provided with an input processing means for assigning an identifier, and an output processing means for cutting out the identifier from the data extracted by the sorting means, and selected by the input processing means based on the identifier cut out by the output processing means. 1. A sorting processing device characterized by being configured to perform a merging operation of sorting k data into one data string in ascending order or descending order by determining .
(2)前記ソート手段は、2個の記憶回路と、該記憶回
路に格納している2個のデータの大小関係を比較する比
較器と、該比較器の判定結果にもとづいて前記2個の記
憶回路のうち一方を選択して格納しているデータを転送
するためのデータ入出力回路とを少なくとも有するユニ
ットをL個(L≧k/2:整数)一次元接続してなり、
該一次元接続したユニットの一端から順次行うデータの
入力操作および出力操作に同期し、該ユニットのそれぞ
れで並列に比較器による比較と入出力回路による隣接ユ
ニットへの転送を行うことにより、k個の入力操作で格
納したk個のデータのうちから1回の出力操作で最小も
しくは最大データを抽出することを特徴とする特許請求
の範囲第1項記載のソート処理装置。
(2) The sorting means includes two memory circuits, a comparator that compares the magnitude relationship between the two data stored in the memory circuit, and a comparator that compares the magnitude relationship between the two data stored in the memory circuit, and a L units (L≧k/2: integer) are one-dimensionally connected, each having at least a data input/output circuit for selecting one of the memory circuits and transferring the stored data;
In synchronization with data input and output operations that are sequentially performed from one end of the one-dimensionally connected units, each unit performs a comparison using a comparator and transfers data to an adjacent unit using an input/output circuit in parallel. 2. The sort processing device according to claim 1, wherein the minimum or maximum data is extracted in one output operation from among the k pieces of data stored in the input operation.
JP59163519A 1984-08-03 1984-08-03 Sort processing method Expired - Fee Related JPH0666050B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59163519A JPH0666050B2 (en) 1984-08-03 1984-08-03 Sort processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59163519A JPH0666050B2 (en) 1984-08-03 1984-08-03 Sort processing method

Publications (2)

Publication Number Publication Date
JPS6142031A true JPS6142031A (en) 1986-02-28
JPH0666050B2 JPH0666050B2 (en) 1994-08-24

Family

ID=15775407

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59163519A Expired - Fee Related JPH0666050B2 (en) 1984-08-03 1984-08-03 Sort processing method

Country Status (1)

Country Link
JP (1) JPH0666050B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62113234A (en) * 1985-11-07 1987-05-25 インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション Sorting of record set
JPS6318434A (en) * 1986-07-10 1988-01-26 Nec Corp Data processor
JPS6426223A (en) * 1987-07-22 1989-01-27 Canon Kk Sequential array circuit
WO1989003091A1 (en) * 1987-09-25 1989-04-06 Hitachi, Ltd. Method of sorting vector data and a vector processor adapted thereto
JPH01173230A (en) * 1987-12-28 1989-07-07 Nippon Telegr & Teleph Corp <Ntt> Merge processing system
JPH01177122A (en) * 1988-01-07 1989-07-13 Hitachi Ltd Sort processor
JPH0312736A (en) * 1989-06-12 1991-01-21 Hitachi Ltd Method and device for processing merge
JPH03116323A (en) * 1989-06-30 1991-05-17 Digital Equip Corp <Dec> Classification accelerating apparatus using rebound sorting apparatus as integrated apparatus
JPH03129426A (en) * 1989-06-30 1991-06-03 Digital Equip Corp <Dec> Speed and memory control for sorting accelerator
JPH03129521A (en) * 1989-06-30 1991-06-03 Digital Equip Corp <Dec> Stabilizing sorting of sorting accelerator

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5958852U (en) * 1982-10-12 1984-04-17 株式会社明電舎 data processing equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5958852U (en) * 1982-10-12 1984-04-17 株式会社明電舎 data processing equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62113234A (en) * 1985-11-07 1987-05-25 インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション Sorting of record set
JPS6318434A (en) * 1986-07-10 1988-01-26 Nec Corp Data processor
JPS6426223A (en) * 1987-07-22 1989-01-27 Canon Kk Sequential array circuit
WO1989003091A1 (en) * 1987-09-25 1989-04-06 Hitachi, Ltd. Method of sorting vector data and a vector processor adapted thereto
US5226135A (en) * 1987-09-25 1993-07-06 Hitachi, Ltd. Method for sorting vector data on the basis of partial vectors and vector processor
JPH01173230A (en) * 1987-12-28 1989-07-07 Nippon Telegr & Teleph Corp <Ntt> Merge processing system
JPH01177122A (en) * 1988-01-07 1989-07-13 Hitachi Ltd Sort processor
JPH0312736A (en) * 1989-06-12 1991-01-21 Hitachi Ltd Method and device for processing merge
JPH03116323A (en) * 1989-06-30 1991-05-17 Digital Equip Corp <Dec> Classification accelerating apparatus using rebound sorting apparatus as integrated apparatus
JPH03129426A (en) * 1989-06-30 1991-06-03 Digital Equip Corp <Dec> Speed and memory control for sorting accelerator
JPH03129521A (en) * 1989-06-30 1991-06-03 Digital Equip Corp <Dec> Stabilizing sorting of sorting accelerator

Also Published As

Publication number Publication date
JPH0666050B2 (en) 1994-08-24

Similar Documents

Publication Publication Date Title
US5349684A (en) Sort and merge system using tags associated with the current records being sorted to lookahead and determine the next record to be sorted
US4053871A (en) Method and system for the iterative and simultaneous comparison of data with a group of reference data items
US5319651A (en) Data integrity features for a sort accelerator
US5142687A (en) Sort accelerator with rebound sorter repeatedly merging sorted strings
US5185886A (en) Multiple record group rebound sorter
JPS6142031A (en) Sorting processor
JPS63129425A (en) Data processor
JP2752634B2 (en) Sorting device
US5206947A (en) Stable sorting for a sort accelerator
US6240540B1 (en) Cyclic redundancy check in a computer system
US6513053B1 (en) Data processing circuit and method for determining the first and subsequent occurences of a predetermined value in a sequence of data bits
JP2587447B2 (en) Sorting device
JPS62237523A (en) Sorting circuit
JPH0926872A (en) Pipeline merge sorter
JPH0315772B2 (en)
Gonzalez et al. Sorting numbers in linear expected time and optimal extra space
JPH07120264B2 (en) Sort processing device
JPH01121927A (en) Data processor
JPH01177124A (en) Sorter memory control system
JPH0437455B2 (en)
JPH03129520A (en) Control of sorting accelerator
JPS63231526A (en) Sort processor
JPS6054043A (en) Sort processor
Stephen Huang A VLSI partition algorithm
JPS61110233A (en) Data processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees