JP2536572B2 - Sort processing device - Google Patents

Sort processing device

Info

Publication number
JP2536572B2
JP2536572B2 JP63001616A JP161688A JP2536572B2 JP 2536572 B2 JP2536572 B2 JP 2536572B2 JP 63001616 A JP63001616 A JP 63001616A JP 161688 A JP161688 A JP 161688A JP 2536572 B2 JP2536572 B2 JP 2536572B2
Authority
JP
Japan
Prior art keywords
record
sort
records
output
sorting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP63001616A
Other languages
Japanese (ja)
Other versions
JPH01177125A (en
Inventor
裕治 源代
哲司 佐藤
潔 矢田
尚彦 清水
英昭 武田
治夫 速水
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Nippon Telegraph and Telephone Corp
Original Assignee
Hitachi Ltd
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 Hitachi Ltd, Nippon Telegraph and Telephone Corp filed Critical Hitachi Ltd
Priority to JP63001616A priority Critical patent/JP2536572B2/en
Publication of JPH01177125A publication Critical patent/JPH01177125A/en
Application granted granted Critical
Publication of JP2536572B2 publication Critical patent/JP2536572B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はソート処理装置に関し、特に段階的にマージ
する処理過程において、ソート済みレコード列として出
力するレコードの整列順序に誤りがないことを、ソート
回路からのレコード出力と同期してチェックするソート
チェック手段を備えたソート処理装置に関する。
Description: TECHNICAL FIELD The present invention relates to a sorting apparatus, and in particular, in a stepwise merging process, there is no error in the sorting order of records output as sorted record strings, The present invention relates to a sort processing device equipped with sort check means for checking in synchronization with record output from a sort circuit.

〔従来の技術〕[Conventional technology]

一般に、データベース処理で扱うデータをレコードと
称するが、レコードの件数がきわめて大きい場合や、複
数のデータベースを処理の対象とする場合には、汎用の
電子計算機で処理すると膨大な時間を必要とする。この
ため、データベース処理の一部あるいは全体を直接ハー
ドウェアで実行して高速化するためのソート処理装置
が、例えば特開昭61−42031号公報に開示されている。
Generally, data handled in database processing is called a record. However, when the number of records is extremely large, or when a plurality of databases are to be processed, processing with a general-purpose electronic computer requires a huge amount of time. Therefore, a sort processing device for directly executing a part or the whole of database processing by hardware to speed it up is disclosed, for example, in Japanese Patent Laid-Open No. 61-42031.

第3図は、上述の特開昭61−42031号公報に開示され
ているソート処理装置の構成を示すものである。図にお
いて、11はソート回路、12はバッファメモリを示してお
り、50は制御回路、51は入力レジスタ、52は出力レジス
タ、53はバンクアドレス発生回路、54はソース入出力切
替え回路、55は読出しアドレス発生回路、56は書込みア
ドレス発生回路、57はアドレス切替え回路、58はデータ
切替え回路、59は切替え制御線(ST)、60はバンクアド
レス線(BA)、61はI相信号線(I)、62はII相信号線
(II)、63は状態制御線(INT)、64はソート入出力切
替え信号線(PUP)、65は入力制御線(PUSH)、66は出
力制御線(POP)、67はデータ入出力線(DIO)を示して
いる。
FIG. 3 shows the configuration of the sort processing device disclosed in the above-mentioned Japanese Patent Laid-Open No. 61-42031. In the figure, 11 is a sort circuit, 12 is a buffer memory, 50 is a control circuit, 51 is an input register, 52 is an output register, 53 is a bank address generation circuit, 54 is a source input / output switching circuit, and 55 is a read circuit. Address generating circuit, 56 write address generating circuit, 57 address switching circuit, 58 data switching circuit, 59 switching control line (ST), 60 bank address line (BA), 61 I phase signal line (I), 62 is a II phase signal line (II), 63 is a state control line (INT), 64 is a sort input / output switching signal line (PUP), 65 is an input control line (PUSH), 66 is an output control line (POP), and 67 is Shows the data input / output line (DIO).

ソート回路11は、k個のレコードを格納し、格納した
レコードを相互に比較して、格納したk個のレコード内
で最大あるいは最小となるレコードを出力する。バッフ
ァメモリ12は、ソート回路11を用いてソートしたソート
済みのレコード列を格納するための記憶回路である。
The sorting circuit 11 stores k records, compares the stored records with each other, and outputs the maximum or minimum record among the k stored records. The buffer memory 12 is a storage circuit for storing the sorted record string sorted by the sorting circuit 11.

ソート処理過程は、初期ソート段階とマージ段階から
成り、切替え制御線(ST)59によって指定する。初期ソ
ート段階は、大量の件数のソート対象レコードを、ソー
ト回路11の容量分のレコード件数を単位としてソート回
路11でソートし、その結果をソート済みのレコード列と
してバッファメモリ12内に格納する。
The sorting process consists of an initial sorting stage and a merging stage, and is designated by a switching control line (ST) 59. In the initial sorting stage, a large number of sorting target records are sorted by the sorting circuit 11 with the number of records corresponding to the capacity of the sorting circuit 11 as a unit, and the result is stored in the buffer memory 12 as a sorted record string.

マージ段階は、初期ソート段階でバッファメモリ12内
に格納した複数のレコード列を、ソート回路を用いてマ
ージする。一度にマージできるレコード列の数は、ソー
ト回路11の容量によって規定され、ソート回路11がk個
のレコードを格納できれば、k個のレコードを一度にマ
ージできる。
In the merging step, a plurality of record strings stored in the buffer memory 12 in the initial sorting step are merged using a sorting circuit. The number of record rows that can be merged at one time is defined by the capacity of the sort circuit 11, and if the sort circuit 11 can store k records, k records can be merged at one time.

初期ソート段階でバッファメモリ12内に格納するレコ
ード列は、ソート回路11で一度にソートできるレコード
数kに等しいことから、初期ソート段階とマージ段階に
よって、最大k2個のレコードを一度にソートすることが
できる。k2個を越えるレコードをソートする場合には、
上述のマージ段階の処理で得られた出力レコード列を再
度バッファメモリ12に格納し、最大k2個のレコードから
成るレコード列を、再度ソート回路11を用いてマージす
る。
Since the record string stored in the buffer memory 12 in the initial sort stage is equal to the number k of records that can be sorted at one time by the sort circuit 11, a maximum of k 2 records are sorted at once by the initial sort stage and the merge stage. be able to. If you want to sort more than k 2 records,
The output record string obtained by the processing in the above-described merge step is stored again in the buffer memory 12, and the record string consisting of a maximum of k 2 records is merged again using the sort circuit 11.

このようにして、一度にk個のレコード列をマージす
るマージ処理を、初期ソート段階をも含めてi段行うこ
とによって、バッファメモリ12の容量が溢れるまで、最
大ki個のレコードをマージすることができる。
In this way, by performing the merging process of merging k record strings at a time for i stages including the initial sorting stage, a maximum of k i records are merged until the buffer memory 12 is full. be able to.

第4図は、第3図に示したソート処理装置を用いて、
大量レコードをソートする場合の処理の流れを示すもの
である。図に示す如く、初期ソート段階,第1マージ段
階,第2マージ段階の3段階の処理を行う例である。図
中の表示は、繰り返し使用するソート回路11とバッファ
メモリ12を示している。
FIG. 4 uses the sort processing device shown in FIG.
It shows the flow of processing when sorting a large number of records. As shown in the figure, this is an example in which processing of three stages including an initial sort stage, a first merge stage, and a second merge stage is performed. The display in the figure shows the sort circuit 11 and the buffer memory 12 that are repeatedly used.

バッファメモリ12に格納するソート済みレコード列
は、レコードの大小関係を判定するためのレコードの大
きさを高さとした三角形で表わしている。k個のレコー
ドをソートできるソート回路を用いた3段階マージ処理
によって、最大k3個のレコードをソートすることができ
る。
The sorted record string stored in the buffer memory 12 is represented by a triangle whose height is the size of the record for determining the size relation of the records. A maximum of k 3 records can be sorted by a three-step merge process using a sort circuit capable of sorting k records.

以上の説明では、1個のバッファメモリと1個のソー
ト回路を用いて、段階的なマージ処理を繰り返す方法を
示したが、第3図に示す如きマージ処理回路を複数個用
いてパイプライン的に動作させ、高速にソートする方法
も既知である。この方法では、1段当りのマージ処理回
路のハードウェア量を削減するために、k=2とした2
ウェイマージが一般的である。
In the above description, the method of repeating the stepwise merge processing by using one buffer memory and one sort circuit has been described. However, a plurality of merge processing circuits as shown in FIG. There is also a known method for performing high-speed sorting by operating the. In this method, k = 2 is set in order to reduce the hardware amount of the merge processing circuit per stage.
Way merge is common.

ところで、ソート処理装置が処理対象とするレコード
は、例えば、個人名と預金残高の如く、ソート結果に対
して極めて高い信頼度を要求される場合が多い。レコー
ドの内容の信頼度を保証する方法は、汎用計算機で多用
されているパリティチェック等の技術が既知である。
By the way, the records to be processed by the sort processing device are often required to have extremely high reliability with respect to the sorting result, such as an individual name and a deposit balance. As a method of guaranteeing the reliability of the content of a record, a technique such as parity check, which is widely used in general-purpose computers, is known.

これに対して、ソート処理装置固有の問題として、最
終的に出力するレコードの出力順序に誤りがないことを
保証しなければならないという問題がある。このために
は、ソート処理装置から出力されるレコードの出力順序
を検査することが必要であり、その方法としは、例え
ば、K.Iwata et alによる“Design and Implementation
of a Two−Way Merge− Sorter and its Application
to Relational Database Processing"(ICOT Technical
Report TR−066,1984)に開示されている方法を挙げる
ことができる。
On the other hand, as a problem peculiar to the sort processing device, there is a problem that it is necessary to guarantee that there is no error in the output order of the finally output records. For this purpose, it is necessary to inspect the output order of the records output from the sort processing device, and the method is, for example, “Design and Implementation” by K. Iwata et al.
of a Two−Way Merge− Sorter and its Application
to Relational Database Processing "(ICOT Technical
The method disclosed in Report TR-066, 1984) can be mentioned.

この方法は、第5図に示す如き装置を用いるものであ
り、12個のソーティングセルの後段に、ソート結果をチ
ェックするソーティングチェッカを配置するというもの
である。ソーティングチェッカの出力はマージャに接続
されている。
This method uses a device as shown in FIG. 5, and arranges a sorting checker for checking the sorting result after the 12 sorting cells. The output of the sorting checker is connected to the merger.

すなわち、この方法(装置)は、ソート処理装置の最
終出力段において誤りがないかどうかをチェックするよ
うに構成されたものである。
That is, this method (apparatus) is configured to check whether there is an error in the final output stage of the sort processing apparatus.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上記従来技術においては、ソート処理が完了した段階
でレコードのソート順に誤りがないことを検査している
ため、ソート誤りが発生してからその誤りが検出される
までに時間遅れを生ずる問題があった。特にソート処理
の対象とするレコード数が多い場合には、ソート誤り検
出までの時間が無視できない程大きくなる問題もある。
In the above-mentioned conventional technique, since it is checked that there is no error in the sort order of the records when the sort process is completed, there is a problem that a time delay occurs after the sort error occurs until the error is detected. It was In particular, when the number of records to be sorted is large, there is a problem that the time until the detection of sort error becomes too long to ignore.

更に、従来の、繰り返しマージ処理を行うソート処理
装置では、前段のマージ処理で出力したレコード列を次
段のマージ処理の入力とすることから、最後のマージ処
理まで進んでからソート誤りを発見したのでは、どの段
階で誤りが発生したのかを究明することが困難となり、
原因を解析することが難かしいという問題もあった。
Further, in the conventional sort processing device that performs repeated merge processing, the record string output by the merge processing of the previous stage is used as the input of the merge processing of the next stage, so a sort error is discovered after proceeding to the last merge processing. It becomes difficult to find out at what stage the error occurred,
There was also a problem that it was difficult to analyze the cause.

例えば、第4図に示したソート処理の例では、第1マ
ージ段階の出力レコード列の中に、本来の降順ソートで
は…j,i,k…の順序で並ぶべきレコード列が、…i,j,k…
の順序に誤って並んでいる。このレコード列を含めて第
2段階のマージ処理を行って、全レコードをソートした
場合には、上記i,j,kのレコードの間に他の入力レコー
ド列から入力したレコードが挿入される。
For example, in the example of the sorting process shown in FIG. 4, in the output record string of the first merging stage, the record strings that should be arranged in the order of j, i, k ... j, k ...
They are in the wrong order. When all the records are sorted by performing the second-stage merging process including this record string, the records input from other input record strings are inserted between the records i, j, and k.

このため、最終の出力レコード列の出力順序をチェッ
クした場合、レコードjの前後で大小関係に誤りがある
ことは検出できるが、どの段階で誤りが発生したかを判
定することはできないため、誤り発生原因の解明が困難
となるという問題があった。
Therefore, when the output order of the final output record string is checked, it is possible to detect that there is an error in the magnitude relationship before and after the record j, but it is not possible to determine at what stage the error occurred, so an error occurs. There is a problem that it is difficult to elucidate the cause of the occurrence.

複数のマージ処理回路を用いてパイプライン的に動作
させた場合であっても、同様な時間遅れを生ずる問題が
あり、何段目のマージ処理回路で誤ったのかを判定する
ことが困難であるという問題もあった。
Even when a pipeline operation is performed using a plurality of merge processing circuits, there is a problem that a similar time delay occurs, and it is difficult to determine at what stage of the merge processing circuit an error has occurred. There was also a problem.

本発明は上記事情に鑑みてなされたもので、その目的
とするところは、従来のソート処理装置における上述の
如き問題を解消して、繰り返し実行するマージ操作の処
理過程において、ソート誤りの発生から時間遅れなし
に、その誤りを検出できる機構を備えたソート処理装置
を提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to solve the above-described problems in a conventional sort processing device and to prevent a sort error from occurring in a process of a merge operation that is repeatedly executed. An object of the present invention is to provide a sort processing device having a mechanism capable of detecting the error without a time delay.

〔課題を解決するための手段〕[Means for solving the problem]

本発明の上記目的は、kが1より大きな整数であると
き、最大k個までの入力レコードを格納でき、そのうち
から最小または最大のレコードを抽出することが可能な
ソート手段と、予めソートされたレコード列を格納する
レコード格納手段とを有し、前記ソート済みレコード列
の各々の先頭レコードを最大k個まで読出して前記ソー
ト手段に入力する入力操作と、該ソート手段からレコー
ドを出力する出力操作とを交互に実行するマージ操作を
繰り返すことによって、前記レコード格納手段に格納さ
れた複数のレコード列をマージするソート処理装置にお
いて、前記ソート手段から出力されるレコードの整列順
序に誤りがないことを、当該レコードの出力と同期して
チェックするソートチェック手段を設けたことを特徴と
するソート処理装置によって達成される。
The above object of the present invention is to provide a sorting means capable of storing a maximum of k input records when k is an integer greater than 1, and extracting a minimum or maximum record from the input records. A record storage unit for storing a record string, and an input operation for reading up to k top records of each sorted record string and inputting them to the sort unit, and an output operation for outputting a record from the sort unit. In a sort processing device for merging a plurality of record strings stored in the record storage means by repeating a merge operation that alternately executes and, it is confirmed that there is no error in the sorting order of the records output from the sort means. And a sort processing device provided with sort check means for checking in synchronization with the output of the record. Thus it is achieved.

〔作用〕[Action]

本発明のソート処理装置においては、ソート手段から
出力するレコードが、指定した順序でソートされている
ことを、レコード出力に同期してチェックする手段を設
けることにより、マージ処理の過程で直ちにソート誤り
を検出することができる。この結果、誤ってソートした
レコード列を次段に送ることをなくし、誤りが発生した
原因の究明を容易にすることができる。また、誤ってソ
ートされたレコード列を入力としたマージ処理を中断し
て、無意味なソート処理の継続を抑止することができ
る。
In the sort processing apparatus of the present invention, by providing a means for checking that the records output from the sorting means are sorted in a specified order in synchronization with the record output, a sort error is immediately generated in the process of the merge processing. Can be detected. As a result, it is possible to prevent the erroneously sorted record string from being sent to the next stage, and to easily find the cause of the error. Further, it is possible to interrupt the merge process in which a record string that has been erroneously sorted is input to suppress the meaningless continuation of the sort process.

〔実施例〕〔Example〕

以下、本発明の実施例を図面に基づいて詳細に説明す
る。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

第1図は本発明の一実施例を示すソート処理装置の構
成図である。図において、21は比較転送ユニット(以
下、単に「ユニット」ともいう)、22はメモリ、23はデ
ータ転送路、24は比較器、25は比較結果保持フラグ、26
はデータ転送路切替え信号、27は左データ転送線、28は
右データ転送線、29はメモリデータ線、30は比較結果出
力線、31はオアゲート、32はソート誤り検出信号を示し
ている。
FIG. 1 is a block diagram of a sort processing apparatus showing an embodiment of the present invention. In the figure, 21 is a comparison transfer unit (hereinafter also simply referred to as “unit”), 22 is a memory, 23 is a data transfer path, 24 is a comparator, 25 is a comparison result holding flag, 26
Is a data transfer path switching signal, 27 is a left data transfer line, 28 is a right data transfer line, 29 is a memory data line, 30 is a comparison result output line, 31 is an OR gate, and 32 is a sort error detection signal.

ソート回路11は、2個のレコードを格納するメモリ22
とレコード間の比較を行う比較器24等から成る比較転送
ユニット21の一次元アレイから構成され、ソート回路全
体でk個のレコードを格納して比較・転送処理を行い、
格納したレコードの内で最大あるいは最小となるレコー
ドを出力する機能を実現するものである。
The sorting circuit 11 has a memory 22 for storing two records.
Is composed of a one-dimensional array of the comparison transfer unit 21 including a comparator 24 and the like for comparing between records, and k records are stored in the entire sorting circuit to perform comparison / transfer processing.
It realizes the function of outputting the maximum or minimum record among the stored records.

メモリ22は、ユニット当り2個のレコードを格納する
ために内部をMA,MBに二分割し、それぞれ、メモリデー
タ線29によってデータ転送路23に接続されている。デー
タ転送路23は、上記メモリデータ線29,左右の二方向に
隣接する比較転送ユニットとデータ転送を行う左データ
転送線27,右データ転送線28の間で、レコードの双方向
転送を実現するための切替え回路である。
The memory 22 is divided into MA and MB into two for storing two records per unit, and each is connected to the data transfer path 23 by a memory data line 29. The data transfer path 23 realizes bidirectional transfer of records between the memory data line 29, the left and right adjacent data transfer lines 27 and the right data transfer line 28 which perform data transfer with the comparison transfer units adjacent in the left and right directions. It is a switching circuit for.

比較器24は、2個のレコードを入力して、所定の規則
に基づいて大小関係を判定する3個の比較回路(A,B,
C)から成る。このうち、比較回路Cの出力は、比較結
果保持フラグ25に設定され、データ転送切替え信号26と
して、データ転送路23の切替えを制御する。比較回路A,
Bの出力は、オアゲート31を介してソート誤り検出信号3
2を生成し、ソート回路11の外部に出力する。
The comparator 24 inputs two records and determines three magnitude comparison circuits (A, B,
C). Of these, the output of the comparison circuit C is set in the comparison result holding flag 25, and controls the switching of the data transfer path 23 as the data transfer switching signal 26. Comparison circuit A,
The output of B is the sort error detection signal 3 via the OR gate 31.
2 is generated and output to the outside of the sort circuit 11.

ソート処理回路(図示されていない)では、上記ソー
ト回路11から出力されるソート誤り検出信号32によっ
て、ソート回路11からのレコードの出力順序に誤りが発
生したことを検出し、誤った順序でレコードが出力され
た場合には、直ちにマージ操作を中止する等の障害処理
を行う。
A sort processing circuit (not shown) detects that an error has occurred in the output order of the records from the sort circuit 11 by the sort error detection signal 32 output from the sort circuit 11, and records in the wrong order. If is output, fault processing such as immediately stopping the merge operation is performed.

本ソート回路11におけるレコードの格納(入力)は、
左端の比較転送ユニットにソート回路の外部からレコー
ドを入力するとともに、一次元アレイ接続した各比較転
送ユニット間で右方向にレコードの転送を行う。昇順に
ソートする場合は、各比較転送ユニットに格納された2
個のレコードのうちで大きい方を右に転送し、降順にソ
ートする場合は、小さい方を右に転送する。
The storage (input) of records in the sorting circuit 11 is
Records are input from the outside of the sort circuit to the comparison transfer unit at the left end, and records are transferred to the right between the comparison transfer units connected in a one-dimensional array. When sorting in ascending order, 2 stored in each comparison transfer unit
Of the records, the larger one is transferred to the right, and when sorting in descending order, the smaller one is transferred to the right.

各比較転送ユニットでは、右方向への転送で空となっ
たメモリに、左方向から転送されたレコードを格納す
る。その際、転送に関与しないでユニットに留まるレコ
ードと、転送によって入力されるレコードとを比較し、
大小関係から次のレコード転送の対象となるレコードを
決定する。
In each comparison transfer unit, the record transferred from the left side is stored in the memory emptied by the transfer to the right side. At that time, the record that stays in the unit without being involved in the transfer is compared with the record input by the transfer,
The record to be transferred next is determined based on the size relationship.

レコードの出力は、格納時と転送方向を逆にして、右
に隣接する比較転送ユニットからレコードを入力し、左
に隣接する比較転送ユニットにレコードを出力する。左
端のユニットから、ソート回路に格納されているすべて
のレコードに対して最大あるいは最小となるレコードが
出力される。左方向に転送するレコードは、昇順ソート
時には、各ユニットに格納された2個のレコードの内で
小さい方を転送し、降順ソート時には大きい方を転送す
る。
Regarding the output of the record, the transfer direction is reversed from that at the time of storage, the record is input from the adjacent comparison transfer unit on the right, and the record is output to the adjacent comparison transfer unit on the left. The leftmost unit outputs the maximum or minimum record of all the records stored in the sort circuit. Regarding the record to be transferred to the left, the smaller one of the two records stored in each unit is transferred at the time of ascending sort, and the larger one is transferred at the descending sort.

本発明のソート処理装置の特徴であるソートチェック
は、上記レコードの出力時に、レコードの出力と同期し
て、少なくとも左端の比較転送ユニット21で行う。チェ
ックの内容は、ユニットから出力するレコード(以下、
「出力レコード」という)が、自ユニット内に留まるレ
コード(以下、「残留レコード」という)および自ユニ
ットに左隣接ユニットから入力されるレコード(以下、
「入力レコード」という)より、小さい(昇順ソート
時)あるいは大きい(降順ソート時)ことを検査する。
The sort check, which is a feature of the sort processing apparatus of the present invention, is performed at least at the leftmost comparison transfer unit 21 in synchronization with the output of the record when the record is output. The contents of the check are the records output from the unit (hereinafter,
The “output record” is a record that remains in the own unit (hereinafter, “residual record”) and a record that is input to the own unit from the left adjacent unit (hereinafter, “record”).
Check that it is smaller (during ascending sort) or larger (descent descending sort) than "input record".

第2図は、出力操作時に行うソートチェックの動作を
説明する図である。出力操作時には、前記比較転送ユニ
ット21内のデータ転送路は、右隣接ユニットからレコー
ドを入力し、左に出力するようにデータ転送経路を形成
している。第2図中の33は、比較結果から求められるデ
ータ転送路切替え信号によって、2個に区分されたメモ
リのいずれか一方に格納されたレコードを選択的に出力
するための切替え回路である。
FIG. 2 is a diagram for explaining the sort check operation performed during the output operation. At the time of output operation, the data transfer path in the comparison transfer unit 21 forms a data transfer path so that a record is input from the right adjacent unit and output to the left. Reference numeral 33 in FIG. 2 is a switching circuit for selectively outputting a record stored in either one of the memories divided into two according to the data transfer path switching signal obtained from the comparison result.

比較回路Aは上記出力レコードと残留レコードとの比
較,比較回路Bは上記出力レコードと入力レコードとの
比較,比較回路Cは上記残留レコードと入力レコードと
の比較を行うものである。
The comparison circuit A compares the output record with the residual record, the comparison circuit B compares the output record with the input record, and the comparison circuit C compares the residual record with the input record.

少なくとも、左端の比較転送ユニットにおける比較回
路Aと比較回路Bの結果によって、ソート回路11から出
力するレコードの並び順が所望の順序に正しく整列して
いるか否かを検査することができる。比較回路Cの結果
は、比較結果保持フラグに蓄えられて、ソート処理が正
常に行われるように、データ転送路を制御する。
At least, the result of the comparison circuit A and the comparison circuit B in the comparison transfer unit at the left end can check whether or not the order of the records output from the sort circuit 11 is properly aligned in a desired order. The result of the comparison circuit C is stored in the comparison result holding flag, and the data transfer path is controlled so that the sorting process is performed normally.

上記実施例に示した、比較転送ユニットの一次元アレ
イから成るソート回路の左端のユニットでソートチェッ
クを行う場合には、ソート回路から出力するレコードの
順序に誤りが発生したことを検出できることから、誤っ
てマージされたレコード列を入力として引続くマージ処
理を継続することはない。更に、ソート回路を構成する
複数のユニットでソートチェックを行うことによって、
ソート誤りの発生から誤り検出までの時間を短縮するこ
とができる。これにより、障害発生時の対処を容易と
し、ソート処理装置の信頼度向上に効果がある。
When the sort check is performed by the leftmost unit of the sort circuit including the one-dimensional array of the comparison transfer unit shown in the above embodiment, it is possible to detect that an error has occurred in the order of the records output from the sort circuit. It does not continue the subsequent merging process with the record string erroneously merged as an input. Furthermore, by performing a sort check on multiple units that make up the sort circuit,
It is possible to shorten the time from the occurrence of sort error to the detection of error. As a result, it is easy to deal with the occurrence of a failure, and it is effective in improving the reliability of the sort processing device.

上記実施例の説明においては、ソート回路に比較転送
ユニットの一次元アレイを用いた場合を示しているが、
k個のレコードを格納して、格納したレコードの大小関
係から、最大あるいは最小となるレコードを出力する回
路、例えば、連想メモリ等を用いてソート回路を構成し
て、従来法に示しマージ処理を行う構成であっても、ソ
ート回路から出力するレコードの順序を検査することに
よって、本発明のソート処理装置の特徴を実現すること
が可能である。
In the above description of the embodiment, the case where the one-dimensional array of the comparison transfer unit is used for the sorting circuit is shown.
A circuit that stores k records and outputs the maximum or minimum record according to the size relation of the stored records, for example, a sort circuit is configured using an associative memory or the like, and merge processing is performed as shown in the conventional method. Even with the configuration, the features of the sorting apparatus of the present invention can be realized by inspecting the order of records output from the sorting circuit.

〔発明の効果〕〔The invention's effect〕

以上述べた如く、本発明によれば、kが1より大きな
整数であるとき、最大k個までの入力レコードを格納で
き、そのうちから最小または最大のレコードを抽出する
ことが可能なソート手段と、予めソートされたレコード
列を格納するレコード格納手段とを有し、前記ソート済
みレコード列の各々の先頭レコードを最大k個まで読出
して前記ソート手段に入力する入力操作と、該ソート手
段からレコードを出力する出力操作とを交互に実行する
マージ操作を繰り返すことによって、前記レコード格納
手段に格納された複数のレコード列をマージするソート
処理装置において、前記ソート手段から出力されるレコ
ードの整列順序に誤りがないことを、当該レコードの出
力と同期してチェックするソートチェック手段を設けた
ので、繰り返し実行するマージ操作の処理過程におい
て、ソート誤りの発生から時間遅れなしに、その誤りを
検出できる機構を備えたソート処理装置を実現できると
いう顕著な効果を奏するものである。
As described above, according to the present invention, when k is an integer greater than 1, a maximum of k input records can be stored, and a minimum or maximum record can be extracted from the sorting means, A record storage unit for storing a presorted record sequence, and an input operation of reading up to k top records of each sorted record sequence and inputting to the sort unit, and a record from the sort unit. In a sort processing device for merging a plurality of record strings stored in the record storage means by repeating a merge operation that alternately executes an output operation to output, the sorting order of the records output from the sort means is incorrect. Since there is a sort check unit that checks that there is no record in synchronization with the output of the record, it is repeated In process of that merge operation, with no time delay from the occurrence of the sort error, in which a marked effect of realizing a sort processing apparatus having a mechanism capable of detecting the error.

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

第1図は本発明の一実施例を示すソート処理装置の構成
図、第2図は上記ソート処理装置における出力操作時に
行うソートチェックの動作を説明する図、第3図は従来
のソート処理装置の一例を示す構成図、第4図は第3図
に示した従来のソート処理装置の処理の流れを示す図、
第5図はソーティングセルの後段にソーティングチェッ
カを配置した従来のソート処理装置の一例を示す構成図
である。 11:ソート回路、12:バッファメモリ、21:比較転送ユニ
ット、22:メモリ、23:データ転送路、24:比較器、25:比
較結果保持フラグ、26:データ転送路切り替え信号、27:
左データ転送線、28:右データ転送線、29:メモリデータ
線、30:比較結果出力線、31:オアゲート、32:ソート誤
り検出信号。
FIG. 1 is a block diagram of a sort processing apparatus showing an embodiment of the present invention, FIG. 2 is a view for explaining a sort check operation performed at the time of an output operation in the sort processing apparatus, and FIG. 3 is a conventional sort processing apparatus. FIG. 4 is a configuration diagram showing an example, FIG. 4 is a diagram showing a processing flow of the conventional sort processing apparatus shown in FIG.
FIG. 5 is a block diagram showing an example of a conventional sort processing device in which a sorting checker is arranged at the subsequent stage of the sorting cell. 11: Sort circuit, 12: Buffer memory, 21: Comparison transfer unit, 22: Memory, 23: Data transfer path, 24: Comparator, 25: Comparison result holding flag, 26: Data transfer path switching signal, 27:
Left data transfer line, 28: right data transfer line, 29: memory data line, 30: comparison result output line, 31: OR gate, 32: sort error detection signal.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 矢田 潔 神奈川県秦野市堀山下1番地 株式会社 日立製作所神奈川工場内 (72)発明者 清水 尚彦 神奈川県秦野市堀山下1番地 株式会社 日立製作所神奈川工場内 (72)発明者 武田 英昭 東京都千代田区内幸町1丁目1番6号 日本電信電話株式会社内 (72)発明者 速水 治夫 東京都千代田区内幸町1丁目1番6号 日本電信電話株式会社内 ─────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Kiyoshi Yata 1 Horiyamashita, Hadano-shi, Kanagawa Hitachi, Ltd. Kanagawa factory (72) Inventor Naohiko Shimizu 1 Horiyamashita, Hadano, Kanagawa Hitachi, Ltd. Kanagawa factory (72) Inventor Hideaki Takeda 1-1-6 Uchisaiwaicho, Chiyoda-ku, Tokyo Nippon Telegraph and Telephone Corporation (72) Haruo Hayami 1-1-6 Uchiyuki-cho, Chiyoda-ku, Tokyo Nippon Telegraph and Telephone Corporation

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】最大k個(k:1より大きな整数)までの入
力レコードを格納でき、そのうちから最小または最大の
レコードを抽出することが可能なソート手段と、予めソ
ートされたレコード列を格納するレコード格納手段とを
有し、前記ソート済みレコード列の各々の先頭レコード
を最大k個まで読出して前記ソート手段に入力する入力
操作と、該ソート手段からレコードを出力する出力操作
とを交互に実行するマージ操作を繰り返すことによっ
て、前記レコード格納手段に格納された複数のレコード
列をマージするソート処理装置において、前記ソート手
段から出力されるレコードの整列順序に誤りがないこと
を、当該レコードの出力と同期してチェックするソート
チェック手段を設けたことを特徴とするソート処理装
置。
1. A sort means capable of storing a maximum of k input records (an integer greater than k: 1), and a minimum or maximum record of the input records, and a presorted record string. And a record storing means for reading the first record of each sorted record string up to k in number and inputting to the sorting means, and an output operation for outputting records from the sorting means alternately. In a sort processing device for merging a plurality of record strings stored in the record storing means by repeating the merge operation to be executed, it is confirmed that there is no error in the sorting order of the records output from the sorting means. A sort processing device comprising a sort check means for checking in synchronization with an output.
JP63001616A 1988-01-07 1988-01-07 Sort processing device Expired - Fee Related JP2536572B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63001616A JP2536572B2 (en) 1988-01-07 1988-01-07 Sort processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63001616A JP2536572B2 (en) 1988-01-07 1988-01-07 Sort processing device

Publications (2)

Publication Number Publication Date
JPH01177125A JPH01177125A (en) 1989-07-13
JP2536572B2 true JP2536572B2 (en) 1996-09-18

Family

ID=11506449

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63001616A Expired - Fee Related JP2536572B2 (en) 1988-01-07 1988-01-07 Sort processing device

Country Status (1)

Country Link
JP (1) JP2536572B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6380952B2 (en) * 2014-12-12 2018-08-29 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Apparatus, method, and program for sorting array of multiple elements

Also Published As

Publication number Publication date
JPH01177125A (en) 1989-07-13

Similar Documents

Publication Publication Date Title
US4945512A (en) High-speed partitioned set associative cache memory
US3585378A (en) Error detection scheme for memories
US3897626A (en) Method of manufacturing a full capacity monolithic memory utilizing defective storage cells
US10698697B2 (en) Adaptive routing to avoid non-repairable memory and logic defects on automata processor
JPS63221445A (en) Memory system, related erroneous detection and corrector
JPH03129427A (en) Data maintainability feature of sorting accelerator
US3387261A (en) Circuit arrangement for detection and correction of errors occurring in the transmission of digital data
JPS63273942A (en) Logical arithmetic unit
JP2536572B2 (en) Sort processing device
US20050088904A1 (en) Systems for Built-In-Self-Test for content addressable memories and methods of operating the same
JPS62236038A (en) Control memory
JPS6142031A (en) Sorting processor
JPH03129521A (en) Stabilizing sorting of sorting accelerator
JP2587447B2 (en) Sorting device
JPH06242925A (en) Sort processor
JP2729491B2 (en) Variable length character string detector
JPH01173230A (en) Merge processing system
JPS62192837A (en) Data holding circuit
JPH01171021A (en) Sorting processor
JPH07101382B2 (en) Margin processing device
JP2744298B2 (en) Failure detection method for buffer control counting circuit
JPH0367346A (en) Address control circuit
JPH036760A (en) Ram fault processing system
JPS5816556B2 (en) Error detection method
JPS63303448A (en) Data storing circuit

Legal Events

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