JPH01177125A - Sort processor - Google Patents

Sort processor

Info

Publication number
JPH01177125A
JPH01177125A JP161688A JP161688A JPH01177125A JP H01177125 A JPH01177125 A JP H01177125A JP 161688 A JP161688 A JP 161688A JP 161688 A JP161688 A JP 161688A JP H01177125 A JPH01177125 A JP H01177125A
Authority
JP
Japan
Prior art keywords
records
sorting
record
output
circuit
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
JP161688A
Other languages
Japanese (ja)
Other versions
JP2536572B2 (en
Inventor
Yuuji Gendai
裕治 源代
Tetsuji Sato
哲司 佐藤
Kiyoshi Yada
矢田 潔
Naohiko Shimizu
尚彦 清水
Hideaki Takeda
武田 英昭
Haruo Hayamizu
速水 治夫
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

Landscapes

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

Abstract

PURPOSE:To detect a sorting error with no delay of time from occurrence of said error in a merge operating process which is repetitively carried out by checking the sequence of records received from a sorting circuit. CONSTITUTION:A sorting circuit 11 consists of a 1-dimensional array of comparison/transfer units 21 containing a memory 22 storing two records, a comparator 24 for records, etc., respectively. The circuit 11 entirely stores (k) pieces of records (k: an integer larger than 1) and performs the comparison/ transfer processing for output of the maximum or minimum record out of those stored ones. In this case, a fact that the sequence of arrangement of the records received from the circuit 11 has no error is confirmed synchronously with the output of records. Thus it is possible to detect a sorting error with no delay of time from occurrence of said error in a merge operating process which is repetitively carried out.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はソート処理装置に関し、特に段階的にマージす
る処理過程において、ソート済みレコード列として出力
するレコードの整列順序に誤りがないことを、ソート回
路からのレコード出力と同期してチェックするソートチ
ェック手段を備えたソート処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a sort processing device, and in particular, it is possible to check that there is no error in the arrangement order of records output as a sorted record string in a process of merging in stages. The present invention relates to a sort processing device equipped with a 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, but if the number of records is extremely large or if multiple databases are to be processed, processing on a general-purpose computer would require an enormous amount of time. For this reason, sorting processing devices are needed to speed up database processing by directly executing part or all of it on hardware.
For example, it is disclosed in Japanese Patent Application Laid-Open No. 61-42031.

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

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

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

マージ段階は、初期ソート段階でバッファメモ1J12
内に格納した複数のレコード列を、ソート回路を用いて
マージする。−度にマージできるレコード列の数は、ソ
ート回路11の容量によって規定され、ソート回路11
かに個のレコードを格納できれば、k個のレコードを一
度にマージできる。
The merge stage is the buffer memo 1J12 at the initial sort stage.
A sorting circuit is used to merge multiple record strings stored in the memory. - The number of record strings that can be merged at a time is determined by the capacity of the sorting circuit 11.
If k records can be stored, k records can be merged at once.

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

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

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

バッファメモリ12に格納するソート済みレコード列は
、レコードの大小関係を判定するためのレコードの大き
さを高さとした三角形で表わしている。k個のレコード
をソートできるソート回路を用いた3段階マージ処理に
よって、最大に3個のレコードをソートすることができ
る。
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 relationship of the records. A maximum of three records can be sorted by a three-step merge process using a sorting circuit that can sort k records.

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

ところで、ソート処理装置が処理対象とするレコードは
、例えば、個人名と預金残高の如く、ソート結果に対し
て極めて高い信頼度を要求される場合が多い。レコード
の内容の信頼度を保証する方法は、汎用計算機で多用さ
れているパリティチェック等の技術が既知である。
By the way, the records that are processed by the sorting processing device, such as personal names and bank balances, often require extremely high reliability in the sorting results. Techniques such as parity checking, which are often used in general-purpose computers, are known as methods for guaranteeing the reliability of the contents of records.

これに対して、ソート処理装置固有の問題として、最終
的に出力するレコードの出力順序に誤りがないことを保
証しなければならないという問題がある。このためには
、ソート処理装置から出力されるレコードの出力順序を
検査することが必要であり、その方法としては、例えば
、K、Iwataet alによる”Design a
nd  Implementation ofa  T
wo−Way  Merge−5orter and 
its  Appli−cation to  Re1
ational  Database  Proces
sing”(I COT  Technical  R
eport  T R−066,1984)に開示され
ている方法を挙げることができる。
On the other hand, a problem unique to the sorting processing device is that it is necessary to ensure that there is no error in the output order of the records that are finally output. For this purpose, it is necessary to check the output order of records output from the sort processing device, and a method for doing so is, for example, "Design a" by K. Iwata et al.
nd Implementation of T
wo-Way Merge-5 alter and
Its Appli-cation to Re1
ational Database Processes
sing” (I COT Technical R
eport TR-066, 1984).

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

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

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記従来技術においては、ソート処理が完了した段階で
レコードのソート類に誤りがないことを検査しているた
め、ソート誤りが発生してからその誤りが検出されるま
でに時間遅れを生ずる問題があった。特にソート処理の
対象とするレコード数が多い場合には、ソート誤り検出
までの時間が無視できない程大きくなる問題もある。
In the above conventional technology, since the sorting of records is checked for errors when the sorting process is completed, there is a problem that there is a time delay between when a sorting error occurs and when the error is detected. there were. Particularly when the number of records to be sorted is large, there is also the problem that the time it takes to detect a sorting error becomes so long that it cannot be ignored.

更に、従来の、繰り返しマージ処理を行うソート処理装
置では、前段のマージ処理で出力したレコード列を次段
のマージ処理の入力とすることから、最後のマージ処理
まで進んでからソート誤りを発見したのでは、どの段階
で誤りが発生したのかを究明することが困難となり、原
因を解析することが難かしいという問題もあった。
Furthermore, in conventional sorting processing devices that perform repeated merging processing, the record string output from the previous merging processing is used as input for the next merging processing, so sorting errors are discovered only after the final merging processing is reached. Therefore, it is difficult to determine at what stage the error occurred, and it is also difficult to analyze the cause.

例えば、第4図に示したソート処理の例では、第1マー
ジ段階の出力レコード列の中に、本来の降順ソートでは
・・・jtl+k・・・の順序で並ぶべきレコード列が
、・・・1yJtk・・・の順序に誤って並んでいる。
For example, in the example of the sorting process shown in FIG. 4, in the output record string of the first merging stage, there is a record string that should be arranged in the order of jtl+k in the original descending order... 1yJtk... are arranged in the wrong order.

このレコード列を含めて第2段階のマージ処理を行って
、全レコードをソートした場合には、上記Lj+にのレ
コードの間に他の入力レコード列から入力したレコード
が挿入される。
When all records are sorted by performing the second-stage merge process including this record string, records input from other input record strings are inserted between the records in Lj+.

このため、最終の出力レコード列の出力順序をチェック
した場合、レコードjの前後で大小関係に誤りがあるこ
とは検出できるが、どの段階で誤りが発生したかを特定
することはできないため。
Therefore, when checking the output order of the final output record string, it is possible to detect that there is an error in the magnitude relationship before and after record j, but it is not possible to specify at what stage the error occurred.

誤り発生原因の解明が困難となるという問題があつた・ 複数のマージ処理回路を用いてパイプライン的に動作さ
せた場合であっても、同様な時間遅れを生ずる問題があ
り、何段口のマージ処理回路で誤ったのかを判定するこ
とが困難であるという問題もあった。
There was a problem that it was difficult to clarify the cause of the error. Even when operating in a pipeline using multiple merge processing circuits, there was a problem that a similar time delay occurred, and There was also the problem that it was difficult to determine whether the merge processing circuit had made an error.

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

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

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

〔作用〕[Effect]

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

〔実施例〕〔Example〕

以下、本発明の実施例を図面に基づいて詳細に説明する
Embodiments of the present invention will be described in detail below 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 device showing an embodiment of the present invention. In the figure, 21 is a comparison transfer unit (hereinafter also simply referred to as a "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, and 27 is the left data transfer line, 28 is the right data transfer line, 29 is the 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個のレコードを格納するメモリ2
2とレコード間の比較を行う比較器24等から成る比較
転送ユニット2Iの一次元アレイから構成され、ソート
回路全体でに個のレコードを格納して比較・転送処理を
行い、格納したレコードの内で最大あるいは最小となる
レコードを出力する機能を実現するものである。
The sorting circuit 11 includes a memory 2 that stores two records.
It consists of a one-dimensional array of a comparison and transfer unit 2I consisting of a comparator 24, etc. that performs comparisons between records, and the entire sorting circuit stores and compares and transfers records. This realizes the function of outputting the maximum or minimum record.

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

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

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

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

各比較転送ユニットでは、右方向への転送で空となった
メモリに、左方向から転送されたレコードを格納する。
In each comparison transfer unit, the record transferred from the left is stored in the memory that is emptied by the transfer from the right.

その際、転送に関与しないでユニットに留まるレコード
と、転送によって入力されるレコードとを比較し、大小
関係から次のレコード転送の対象となるレコードを決定
する。
At this time, records that remain in the unit without being involved in the transfer are compared with records that are input as a result of the transfer, and the record to be the next record transfer target is determined based on the size relationship.

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

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

第2図は、出力操作時に行うソートチェックの動作を説
明する図である。出力操作時には、前記比較転送ユニッ
ト21内のデータ転送路は、右隣接ユニットからレコー
ドを入力し、左に出力するようにデータ転送経路を形成
している。第2図中の33は、比較結果から求められる
データ転送路切替え信号によって、2個に区分されたメ
モリのいずれか一方に格納されたレコードを選択的に出
力するための切替え回路である。
FIG. 2 is a diagram illustrating a sort check operation performed during an output operation. During an output operation, the data transfer path in the comparison transfer unit 21 forms a data transfer path such that records are 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 one of the two divided memories in accordance with a 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, based on the results of comparison circuit A and comparison circuit B in the leftmost comparison and transfer unit, it can be checked whether the records output from the sorting circuit 11 are correctly arranged in the desired order. The result of the comparison circuit C is stored in a comparison result holding flag, and the data transfer path is controlled so that the sorting process is performed normally.

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

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

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

以上述べた如く、本発明によれば、kが1より大きな整
数であるどき、最大に個までの入力レコードを格納でき
、そのうちから最小または最大のレコードを抽出するこ
とが可能なソート手段と、予めソートされたレコード列
を格納するレコード格納手段とを有し、前記ソート済み
レコード列の各々の先頭レコードを最大に個まで読出し
て前記ソート手段に入力する入力操作と、該ソー1−手
段からレコードを出力する出力操作とを交互に実行する
マージ操作を繰り返すことによって、前記レコード格納
手段に格納された複数のレコード列をマージするソート
処理装置において、前記ソート手段から出力されるレコ
ードの整列順序に誤りがないことを、当該レコードの出
力と同期してチェックするソートチェック手段を設けた
ので、縁り返し実行するマージ操作の処理過程において
、ソート誤りの発生から時間遅れなしに、その誤りを検
出できる機構を備えたソート処理装置を実現できるとい
う顕著な効果を奏するものである。
As described above, according to the present invention, when k is an integer greater than 1, a sorting means capable of storing up to a maximum of input records and extracting the minimum or maximum record from among them; a record storage means for storing a pre-sorted record string; an input operation for reading a maximum of the first records of each of the sorted record strings and inputting them into the sorting means; In a sort processing device that merges a plurality of record columns stored in the record storage means by repeating a merge operation that alternately performs an output operation that outputs records, the sorting order of records output from the sorting means is provided. Since we have provided a sort check means to check that there are no errors in the record in synchronization with the output of the record, it is possible to correct sort errors without any time delay after they occur during the process of merging operations that perform edge reversal. This has the remarkable effect that it is possible to realize a sorting processing device equipped with a mechanism that can detect it.

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

第1図は本発明の一実施例を示すソート処理装置の構成
図、第2図は上記ソート処理装置における出力操作時に
行うソートチェックの動作を説明する図、第3図は従来
のソート処理装置の一例を示す構成図、第4図は第3図
に示した従来のソート処理装置の処理の流れを示す図、
第5図はソーティングセルの後段にソーティングチエッ
カを配置した従来のソート処理装置の一例を示す構成図
である。 11:ソート回路、12:バッファメモリ、21:比較
転送ユニット、22:メモリ、23:データ転送路、2
4:比較器、25:比較結果保持フラグ、26:データ
転送路切替え信号、27:左データ転送線、28:右デ
ータ転送線、29:メモリデータ線、30:比較結果出
力線、31ニオアゲート、32:ソート誤り検出信号。 第   2   図 第   Φ   図 レコ〜ド入力
FIG. 1 is a block diagram of a sort processing device showing an embodiment of the present invention, FIG. 2 is a diagram illustrating a sort check operation performed during an output operation in the sort processing device, and FIG. 3 is a conventional sort processing device. FIG. 4 is a diagram showing the processing flow of the conventional sort processing device shown in FIG.
FIG. 5 is a configuration diagram showing an example of a conventional sorting processing apparatus in which a sorting checker is arranged after a sorting cell. 11: Sorting circuit, 12: Buffer memory, 21: Comparison transfer unit, 22: Memory, 23: Data transfer path, 2
4: 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 Nior gate, 32: Sort error detection signal. Figure 2 Figure Φ Record input

Claims (1)

【特許請求の範囲】[Claims] 1、最大k個(k:1より大きな整数)までの入力レコ
ードを格納でき、そのうちから最小または最大のレコー
ドを抽出することが可能なソート手段と、予めソートさ
れたレコード列を格納するレコード格納手段とを有し、
前記ソート済みレコード列の各々の先頭レコードを最大
k個まで読出して前記ソート手段に入力する入力操作と
、該ソート手段からレコードを出力する出力操作とを交
互に実行するマージ操作を繰り返すことによって、前記
レコード格納手段に格納された複数のレコード列をマー
ジするソート処理装置において、前記ソート手段から出
力されるレコードの整列順序に誤りがないことを、当該
レコードの出力と同期してチェックするソートチェック
手段を設けたことを特徴とするソート処理装置。
1. A sorting means that can store up to k input records (k: an integer greater than 1) and extract the smallest or largest record from among them, and a record storage that stores pre-sorted record strings. and means;
By repeating a merge operation that alternately performs an input operation of reading up to k first records of each of the sorted record strings and inputting them to the sorting means, and an output operation of outputting records from the sorting means, In a sort processing device that merges a plurality of record strings stored in the record storage means, a sort check that checks, in synchronization with the output of the records, that there is no error in the sorting order of the records output from the sorting means. A sort processing device characterized by being provided with means.
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 true JPH01177125A (en) 1989-07-13
JP2536572B2 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016115092A (en) * 2014-12-12 2016-06-23 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Device, method, and program for sorting array consisting of large number of elements

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016115092A (en) * 2014-12-12 2016-06-23 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Device, method, and program for sorting array consisting of large number of elements

Also Published As

Publication number Publication date
JP2536572B2 (en) 1996-09-18

Similar Documents

Publication Publication Date Title
US10698697B2 (en) Adaptive routing to avoid non-repairable memory and logic defects on automata processor
EP0095928A2 (en) Pipeline processing apparatus having a test function
US5634003A (en) Logic simulation apparatus based on dedicated hardware simulating a logic circuit and selectable to form a processing scale
US3387261A (en) Circuit arrangement for detection and correction of errors occurring in the transmission of digital data
JPS62214599A (en) Semiconductor memory device
US4205301A (en) Error detecting system for integrated circuit
JPS6142031A (en) Sorting processor
JPH01177125A (en) Sort processor
JP2587447B2 (en) Sorting device
US5774482A (en) Apparatus and method for processing errors associated with data transfers in a computer
JPS62192837A (en) Data holding circuit
JPH07120264B2 (en) Sort processing device
Kamiya et al. A hardware pipeline algorithm for relational database operation
JP2744298B2 (en) Failure detection method for buffer control counting circuit
JPH01171021A (en) Sorting processor
Abdulhadi et al. Self Checking Register File Using Berger Code
JPH0373020B2 (en)
JPH02133831A (en) Error information storing circuit
CN117574880A (en) Model processing method and device
JPH03233638A (en) Memory error information collecting system
JPH03147036A (en) Variable length data processor
JPS61224044A (en) Error check circuit
JPH03204727A (en) Interruption control circuit
JPS5816556B2 (en) Error detection method
JPH01201722A (en) Sort processor

Legal Events

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