JPS59189442A - Sorting processing system - Google Patents

Sorting processing system

Info

Publication number
JPS59189442A
JPS59189442A JP6497483A JP6497483A JPS59189442A JP S59189442 A JPS59189442 A JP S59189442A JP 6497483 A JP6497483 A JP 6497483A JP 6497483 A JP6497483 A JP 6497483A JP S59189442 A JPS59189442 A JP S59189442A
Authority
JP
Japan
Prior art keywords
data
register
circuit
sorting
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6497483A
Other languages
Japanese (ja)
Inventor
Yukio Takahashi
幸男 高橋
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 JP6497483A priority Critical patent/JPS59189442A/en
Publication of JPS59189442A publication Critical patent/JPS59189442A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/22Arrangements for sorting or merging computer data on continuous record carriers, e.g. tape, drum, disc
    • G06F7/24Sorting, i.e. extracting data from one or more carriers, rearranging the data in numerical or other ordered sequence, and rerecording the sorted data on the original carrier or on a different carrier or set of carriers sorting methods in general

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

PURPOSE:To execute the processing in a high speed by connecting plural sorting modules (SMs) in series to operate them in parallel and transmitting sorting data to an adjacent SM from each SM to arrange two data in a prescribed order repeatedly. CONSTITUTION:Plural SMs 1 having the same constitution each of which consists of two registers 2 and 3 and one comparator 6 are connected in series by bi-directional input/output lines 8 and 10 and are operated simultaneously in parallel by a common clock, not shown in figure. In each SM, data from signal lines 9 and 11 are inputted by a signal LOAD and are stored in registers 2 and 3. Data in the register 2 is moved to the register 3 in each SM and data in the register 3 is moved to the register 2 in the adjacent SM by an R shift signal, and data are sorted, and larger data is moved to the right. Next, data are moved to the left by an L shift signal, and data are sorted again. This operation is repeated to arrange finally data in the ascending (descending) order. Thus, data are sorted in a high speed with a small number of operations.

Description

【発明の詳細な説明】 発明の技術分野 本発明は所定の順序関係に従ってデータを並べ換えるソ
ーティング処理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a sorting processing method for sorting data according to a predetermined order relationship.

技術の背景 計算機システムにおいては、データの集合をある順序関
係に従って並べ換えるソーティング処理が頻繁に行なわ
れている。特に情報検索では、所望のデータの検索全容
易ならしめることからソーティングが基本的な処理とな
っている。例えば、ファイルを検索する場合、ファイル
名の頭文字をアルファベットの順序関係に従ってソーテ
ィングする処理が行なわれ、情報検索を容易にしている
BACKGROUND OF THE INVENTION In computer systems, sorting processing is frequently performed in which a set of data is rearranged according to a certain order relationship. Particularly in information retrieval, sorting is a basic process because it makes it easy to search for desired data. For example, when searching for a file, the initial letters of the file names are sorted according to alphabetical order, making the information search easier.

従来から、この様なソーティングを効率良く行なうため
に、ソフトウェアによるソーティングのアルゴリズムが
各種提案されている。ソーティングのステップ数はソー
ティングするデータ数inとすると、簡単な方法でn2
のオーダであシ、ヒープソートと称するアルゴリズムに
代表される効率の良い方法でnA!0g2nのオーダで
ある。
Various software-based sorting algorithms have been proposed to efficiently perform such sorting. If the number of sorting steps is the number of data to be sorted in, then n2 can be calculated using a simple method.
nA! using an efficient method represented by an algorithm called heap sort. It is on the order of 0g2n.

しかしながら、計算機システムで扱うデータ量が膨大と
な9、nが大きい値となると、高性能な大形計算機でも
多くの実行時間を要することになる。例えば、データ数
nが1万個とすると、1データ当りの平均ソーティング
ステップ数fmとすればヒープソートでは約13万×m
のステップ数であり、仮に1ステツプの実行時間を1μ
sとしても、約130msXmの実行時間を要する。
However, when the amount of data handled by a computer system becomes enormous and n becomes a large value, a large amount of execution time is required even on a high-performance large-scale computer. For example, if the number of data n is 10,000, the average number of sorting steps per data fm is approximately 130,000 x m in heap sort.
is the number of steps, and if the execution time of one step is 1μ
s, the execution time is approximately 130msXm.

従来技術と問題点 従来ソーティングを高速に行なうために、複数の計算機
を用いて並列処理する方法が提案されているが、この方
法では、全ての計算機がソーティングデータを格納して
いる記憶装置に同時にアクセスする必要があるなど記憶
装置の構成に制限が加わる。
Prior Art and Problems Conventionally, in order to perform sorting at high speed, a method has been proposed in which multiple computers are used for parallel processing. Restrictions are added to the configuration of the storage device, such as the need for access.

一方、半導体技術の発展は著しく、シリコンの集積回路
(LSI)の集積度は2倍/年で増大している。そこで
、ソーティングの高速化の方法として、従来のソフトウ
ェアによる高速なソーティングアルゴリズム1LsIで
置き換えるという方法がおる。
On the other hand, the development of semiconductor technology is remarkable, and the degree of integration of silicon integrated circuits (LSI) is increasing at a rate of double every year. Therefore, as a method for speeding up sorting, there is a method of replacing the conventional software-based high-speed sorting algorithm 1LsI.

しかし、これらのアルゴリズムは多数のソーティングモ
ジュール間で通信を必要とするためモジュール間の配線
が複雑となり、また、各モジュールが必らずしも同一構
成とはならないため多品種のLSI k必要とするなど
、LSIと整合しないという問題があった。
However, these algorithms require communication between a large number of sorting modules, which complicates the wiring between the modules, and also requires a wide variety of LSIs because each module does not necessarily have the same configuration. There was a problem that it was not compatible with LSI.

発明の目的 本発明は2個のレジスタと1個の比較回路からなる同一
構成のソーティングモジュールkn数個亘列接続して並
列に動作させ、各ソーティングモジュールはソーティン
グデータを隣接するソーティングモジュールへ伝達する
処理と、2個のデータを所定の順序関係となるようにレ
ジスタへ再配置する処理とを両隣接ソーティングデ−タ
にっいて交互に繰返すことf:特徴とし、その目的は同
一構成の繰返し構造からなる高速ソーティング処理方式
を提供することにある。以下図面を用いて本発明の詳細
な説明する。
OBJECTS OF THE INVENTION The present invention provides several sorting modules kn having the same configuration, each consisting of two registers and one comparison circuit, connected in series and operated in parallel, each sorting module transmitting sorting data to an adjacent sorting module. and the process of rearranging two pieces of data in a register so that they have a predetermined order relationship are alternately repeated for both adjacent sorting data. The object of the present invention is to provide a high-speed sorting processing method consisting of the following. The present invention will be described in detail below using the drawings.

発明の実施例 第1図は本発明の実施例であシ、ソーティングモジュー
ルのブロック図全示している。1は2個のデータをソー
ティングするソーティングモジュールであや、レジスタ
回路(RA、RB)  2 、3、選択回路(8A、S
B) 4 、5、比較回路6、制御回路7とから構成さ
れる。レジスタ回路2.3はそれぞれ選択回路4,5で
選択したデータを保持するレジスタである。また、レジ
スタ回路2,3は同一のクロック信号で動作するとする
。選択回路4は双方向データ線(8DA)8及び入力デ
ータ線(DA)9から入力されるデータとレジスタ回路
2,3で保持しているデータとを制御線球の状態に基づ
いて選択し、レジスタ回路2に出力する。選択回路5は
双方向データ線(SDB)10及び入力データ線(DB
)11かも入力されるデータとレジスタ回路2,3で保
持しているデータと全制御線13の状態に基づいて選択
し、レジスタ回路3に出力する。比較回路6はレジスタ
回路2.3で保持している2個のデータの間で比較を行
ない、比較信号14ヲ出力する。ここで比較回路6は正
整数の大小関係を比較し、レジスタ回路2および3の出
力データにおいてRA〉RBであれば、たとえば論理的
に「0」の比較信号(8W) 14’kSRA<RBで
あれば論理的に「1」の比較信号(SW)14’lr出
力する。制御回路7は制御入力線(LOAD 、 R/
L 、 5ORTの3本からなる)15と比較信号(S
W)14t−人力し、選択回路4.5を制御する制御線
シ、13ヲ出力する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is an embodiment of the present invention, and shows a complete block diagram of a sorting module. 1 is a sorting module that sorts two pieces of data, register circuits (RA, RB) 2, 3, selection circuits (8A, S
B) It is composed of 4, 5, a comparison circuit 6, and a control circuit 7. Register circuits 2 and 3 are registers that hold data selected by selection circuits 4 and 5, respectively. Further, it is assumed that register circuits 2 and 3 operate with the same clock signal. The selection circuit 4 selects the data input from the bidirectional data line (8DA) 8 and the input data line (DA) 9 and the data held in the register circuits 2 and 3 based on the state of the control line sphere, Output to register circuit 2. The selection circuit 5 connects a bidirectional data line (SDB) 10 and an input data line (DB
) 11 is also selected based on the input data, the data held in the register circuits 2 and 3, and the states of all control lines 13, and is output to the register circuit 3. Comparison circuit 6 compares two pieces of data held in register circuit 2.3 and outputs a comparison signal 14. Here, the comparison circuit 6 compares the magnitude relationship of the positive integers, and if RA>RB in the output data of the register circuits 2 and 3, the comparison signal (8W) is logically "0", for example. If so, a comparison signal (SW) 14'lr of logical "1" is output. The control circuit 7 has control input lines (LOAD, R/
L, 5ORT) 15 and comparison signal (S
W) 14t - Manually outputs the control line 13 which controls the selection circuit 4.5.

第2図は第1図におけるソーティングモジュールの動作
金示している。5W=OはRA≧RB、5W−1はRA
 < RBにおけるそれぞれの比較信号の論理値を示す
。制御入力線LOADが「1」のとき、選択回路(SA
、SB) 4 、5はそれぞれ入力データ線9.11か
らのデータを選択し、レジスタ回路(RA。
FIG. 2 shows the operation of the sorting module in FIG. 5W=O is RA≧RB, 5W-1 is RA
< Indicates the logic value of each comparison signal in RB. When the control input line LOAD is “1”, the selection circuit (SA
, SB) 4 and 5 select data from input data lines 9 and 11, respectively, and register circuits (RA) select data from input data lines 9 and 11, respectively.

RB) 2 、3は前記選択されたデータを保持する。RB) 2 and 3 hold the selected data.

制御入力線5ORTとR/Lは制御入力線LOADが「
O」のとき有効な信号線となる。制御人力#5ORTが
「0」のとき、双方向データ線(8DA、5DB) 8
 、10をを介して、レジスタ回路(RA、RB) 2
 、3のデー、りをシフトすることを指定する。ここで
、制御入力線R/I、が「1」でおれば、双方向データ
線8,10はそれぞれ入力データfs、出力データ線と
して動作し、双方向データ線レジスタ回路(RA、RB
)2 、3、双方向データ線(SDR)10という順番
に直列接続される。そして、双方向データ線(SDA)
 8のデータがレジスタ回路(RA) 2へ、レジスタ
回路(8人)2のデータがレジスタ回路(RB) 3へ
、レジスタ回路(RB) 3のデータが双方向データ線
(SDR)10へとシフトする。この処理を右シフト処
理と呼ぶ。
The control input lines 5ORT and R/L are connected to the control input line LOAD.
When the line is “O”, it becomes an effective signal line. When control manual #5ORT is “0”, bidirectional data line (8DA, 5DB) 8
, 10, register circuit (RA, RB) 2
, 3 specifies that the data be shifted. Here, if the control input line R/I is "1", the bidirectional data lines 8 and 10 operate as input data fs and output data lines, respectively, and the bidirectional data line register circuits (RA, RB
)2, 3, and bidirectional data line (SDR) 10 are connected in series in this order. and bidirectional data line (SDA)
Data of 8 is shifted to register circuit (RA) 2, data of register circuit (8 people) 2 is shifted to register circuit (RB) 3, data of register circuit (RB) 3 is shifted to bidirectional data line (SDR) 10. do. This process is called right shift process.

また、制御入力線R/I、が「0」であれば、双方向デ
ータ線8,10はそれぞれ出力データ線、入力データ線
として動作し、前記処理とは逆に双方向データ線(8D
B)10、レジスタ回路(RB、RA) 3 、2、双
方向データ線(SDA) 8という順番に直列接続され
る。そして双方向データ線(SDR)10のデータがレ
ジスタ回路(RB) 3へ、レジスタ回路(RB) 3
のデータがレジスタ回路(RA) 2へ、レジスタ回路
(RA) 2のデータが双方向データ線(SDA) 8
へとシフトする。この処理を左シフト処理と呼ぶ。制御
入力線80RTがrlJのとき、比較回路6の比較結果
に基づいてレジスタ回路(RA、RB) 2 、3のデ
ータを並べ換える。ここでは、小さい値のデータがレジ
スタ回路(RA) 2に保持されると仮定する。
Further, if the control input line R/I is "0", the bidirectional data lines 8 and 10 operate as an output data line and an input data line, respectively, and contrary to the above process, the bidirectional data line (8D
B) 10, register circuits (RB, RA) 3, 2, and bidirectional data line (SDA) 8 are connected in series in this order. Then, the data on the bidirectional data line (SDR) 10 is transferred to the register circuit (RB) 3.
Data of 2 goes to register circuit (RA) 2, data of register circuit (RA) 2 goes to bidirectional data line (SDA) 8
Shift to. This process is called left shift process. When the control input line 80RT is rlJ, the data in the register circuits (RA, RB) 2 and 3 are rearranged based on the comparison result of the comparison circuit 6. Here, it is assumed that data of a small value is held in the register circuit (RA) 2.

したがって比較の結果、レジスタ回路(RA) 2のデ
ータの値がレジスタ回路(RB) 3のデ・−夕の値よ
り大きいかあるいは等しいとき、データの並べ換えが行
なわれ、レジスタ回路(RB) 3のデータがレジスタ
回路(RA) 2に、レジスタ回路(RA)2のデータ
がレジスタ回路(RB) 3に交換されて保持される。
Therefore, as a result of the comparison, if the value of the data in register circuit (RA) 2 is greater than or equal to the value of the data in register circuit (RB) 3, the data is rearranged, and the data in register circuit (RB) 3 is rearranged. Data is exchanged and held in the register circuit (RA) 2, and data in the register circuit (RA) 2 is exchanged and held in the register circuit (RB) 3.

また、比較の結果、レジスタ回路(8人)2のデータの
値がレジスタ回路(RB) 3のデータの値より小さい
とき、データの並べ換えは行なわれず、両レジスタ回路
は元のデータを保持する。以上述べた様なデータを比較
し、並べ換える処理を交換処理と呼ぶこととする。
Further, as a result of the comparison, when the data value of the register circuit (8 people) 2 is smaller than the data value of the register circuit (RB) 3, the data is not rearranged and both register circuits retain the original data. The process of comparing and rearranging data as described above will be referred to as exchange process.

第3図は本発明の実施例であシ、第2図の動作を行う第
1図の構成のソーティングモジュール(以下モジュール
と略記する。) (Si、  i=1〜l)全1佃直列
接続して構成したソーティング処理装置である。モジュ
ール(Si) 1の双方向データ線8は隣接のモジュー
ル(Si−t)”の双方向データ線10と接続し、モジ
ュール(Si)1の双方向データ線lOは反対側の隣接
モジュール(Si+1)1の双方向データ線8と接続す
る。3本の制御入力線は全てのモジュールの制御回路7
(図は省略)と接続し、全てのモジュールを共通して制
御する。両端のモジュール(Si) 1と(87) 1
の双方向データ線8゜10からはソーティング処理され
たデータが出力される。16はモジュール1に対応して
設けたデータ処理モジュール(PEi)16であシ、演
算、記憶等通常の計算機の処理を行なう。モジュール(
Si) 1とデータ処理モジュール(PEi)16とは
入力データ線9.11とで接続される。したがって、デ
ータ処理モジュール(PEt)x6でのデータ処理後、
ソーティングの必要なデータは入力データ線9.ii’
l介して対応するモジュール(Si)1に入力しレジス
タ回路2,3(図示省略)に保持される。17 、18
は制御入力線P/Lで制御するレジスタ回路(R1,R
2)であ)、それぞれモジュール(81)1の双方向デ
ータ線8.モジュール(87) 1の双方向データ線1
oに接続される。レジスタ回路(R1)17はデータの
左シフト処理でモジュール(Sl)1の双方向データ線
8よシ出力されるデータを保持し、データの右シフト処
理では、レジスタ回路(R1)17のデータをモジュー
ル(Sl) 1に双方向データ線8を介して入力する。
FIG. 3 shows an embodiment of the present invention, in which a sorting module (hereinafter abbreviated as module) having the configuration shown in FIG. 1 that performs the operation shown in FIG. 2 (Si, i=1 to l) is connected in series. This is a sorting processing device configured as follows. The bidirectional data line 8 of module (Si) 1 is connected to the bidirectional data line 10 of the adjacent module (Si-t), and the bidirectional data line IO of module (Si) 1 is connected to the adjacent module (Si+1) on the opposite side. ) 1 bidirectional data line 8. The three control input lines connect to the control circuit 7 of all modules.
(Figure omitted) to control all modules in common. Modules (Si) 1 and (87) 1 at both ends
The sorted data is output from the bidirectional data line 8°10. Reference numeral 16 denotes a data processing module (PEi) 16 provided corresponding to module 1, which performs normal computer processing such as processing, calculation, and storage. module(
Si) 1 and the data processing module (PEi) 16 are connected by an input data line 9.11. Therefore, after data processing in data processing module (PEt) x6,
Data that requires sorting is input data line 9. ii'
The signal is input to the corresponding module (Si) 1 via 1 and held in register circuits 2 and 3 (not shown). 17, 18
is a register circuit (R1, R
2)) and bidirectional data lines 8. of module (81) 1, respectively. Module (87) 1 bidirectional data line 1
connected to o. The register circuit (R1) 17 holds the data output from the bidirectional data line 8 of the module (Sl) 1 during data left shift processing, and holds the data output from the register circuit (R1) 17 during data right shift processing. It is input to the module (Sl) 1 via a bidirectional data line 8.

レジスタ・回M(R2)1.8はデータの右シフト処理
テモジュール(SA) 1の双方向データ線10よシ出
カされるデータを保持し、左シフト処理では、レジスタ
回路(R2)18のデータをモジュール(Sl)1に双
方向データ線10ヲ介して入力する。通常、ソーティン
グ処理の初期状態においては、レジスタ回路(R1゜R
2) 17 、18のどちらが一方にはソーティング処
理に影響を与えない最/F値あるいは最大値がセットさ
れる。この場合、レジスタ回路は保持データがソーティ
ング処理過程において変化しないので、必らずしもフリ
ップフロップで構成した回路テある必要はない。
The register circuit M (R2) 1.8 holds the data output from the bidirectional data line 10 of the data right shift processing module (SA) 1, and in the left shift processing, the register circuit (R2) 18 data is input to the module (Sl) 1 via the bidirectional data line 10. Normally, in the initial state of the sorting process, the register circuit (R1゜R
2) For either 17 or 18, the lowest/F value or the highest value that does not affect the sorting process is set. In this case, since the data held in the register circuit does not change during the sorting process, the register circuit does not necessarily need to be a circuit composed of flip-flops.

また、全てのモジュールは同一のクロックによシ同期し
て動作する構成とする。したがって、データ処理モジュ
ールからのデータの取シ込み、データの右シフト、左シ
フト、交換の谷処理は全てのモジュールが同時に行なわ
れる。
Furthermore, all modules are configured to operate in synchronization with the same clock. Therefore, all the modules perform the fetching of data from the data processing module, the shifting of data to the right, the shifting to the left, and the valley processing of exchange.

第4図は第3図のソーティング処理装置において、モジ
ュールが4個のときの動作例を示している。第4図にお
いて、レジスタ回路(R1)17は初期状態として正整
数の最小値ゼロがセットされると仮定する。フェーズT
iにおける1oではデータの右シフトあるいは左シフト
処理を行ない、tlではデータの交換処理を行なう。ま
た、第4図は谷フェーズのjG+hにおける制御入力線
LOAD、 5ORT 。
FIG. 4 shows an example of the operation when there are four modules in the sorting processing apparatus of FIG. 3. In FIG. 4, it is assumed that the register circuit (R1) 17 is set to the minimum positive integer value zero as an initial state. Phase T
At 1o in i, data is shifted to the right or left, and at tl, data is exchanged. Moreover, FIG. 4 shows the control input line LOAD, 5ORT at jG+h in the valley phase.

R/Lの状態を示している。まず、LOADを「1」と
して、モジュールに対応するデータ処理モジュールより
ソーティングするデータを同時に取カ込む。
It shows the R/L status. First, LOAD is set to "1" and data to be sorted is simultaneously fetched from data processing modules corresponding to the modules.

フェーズT1のtoでは谷モジュールのデータを隣接モ
ジュールに右シフトする。tlでは各モジュール同時に
左側のレジスタ内のデータが小さい値と々るようにデー
タの交換処理を行なう。フェーズTQのToでは各モジ
ュールのデータを反対側の隣接モジュールに左シフトす
る。tlでは前記と同様にデータの交換処理を行なう。
In phase T1 to, the data of the valley module is right-shifted to the adjacent module. At tl, each module simultaneously performs data exchange processing so that the data in the left register reaches a small value. In To of phase TQ, the data of each module is shifted to the left to the adjacent module on the opposite side. At tl, data exchange processing is performed in the same manner as described above.

以下同様に右シフト/交換、左シフト/交換管<9返し
行ない、フェーズT8でソーティング処理が終了する。
Thereafter, the right shift/exchange and left shift/exchange tube <9 returns are performed in the same manner, and the sorting process is completed in phase T8.

その後、モジュールS1の双方向データ線8よシデータ
金読出せば非減少順にソーティングされたデータが得ら
れる。またモジュールS4の双方向データ線10よシデ
ータを読出せば非増大順にソーティングされたデータが
得られる。
Thereafter, by reading data from the bidirectional data line 8 of the module S1, data sorted in non-decreasing order is obtained. Furthermore, if the data is read through the bidirectional data line 10 of the module S4, data sorted in non-increasing order can be obtained.

また、第1図の比較回路6によるデータの比較の結果、
第1図のレジスタ回路2に大きい値のデータを保持する
ように構成すれば、モジュールSlの双方向データ線8
からは非増大順にソーティングされたデータが得られる
Furthermore, as a result of data comparison by the comparison circuit 6 in FIG.
If the register circuit 2 of FIG. 1 is configured to hold data of a large value, the bidirectional data line 8 of the module Sl
gives data sorted in non-increasing order.

第3図におけるソーティング処理装置の動作を第5図a
+b k用いて、一般的に説明する。モジュール51(
t=i、z、・・・、))のレジスタ回路2.3全それ
ぞれPA 1 * RB iと表わし、RAi、RBi
の内容全それぞれ5(RAi)、 5(RBi)とする
。tni、7エーズTkのtlにおいて5(PAi)=
αl 、 5(RJ)=βiとすると、αlとβiの大
小関係は明らかにα1くβiである。フェーズTk+1
で右シフト処理、フェーズTl(−+−s+で左シフト
処理を行なうとし、そのときのモジュールSiのレジス
タRAi、RJの内容を第5図aに示す。フェーズTl
(+s の右シフト処理で隣接βi7t  となるので
、7エーズTl(+zの左シフト/交換においてもβi
−1はモジュールSiにとどまる。
Figure 5a shows the operation of the sorting processing device in Figure 3.
A general explanation will be given using +b k. Module 51 (
t=i, z, ..., ))) All register circuits 2.3 are each expressed as PA 1 * RB i, and RAi, RBi
The total contents of are 5 (RAi) and 5 (RBi), respectively. tni, 5 (PAi) in tl of 7 aes Tk =
When αl, 5(RJ)=βi, the magnitude relationship between αl and βi is clearly α1 × βi. Phase Tk+1
Suppose that right shift processing is performed in phase Tl (-+-s+), and the contents of registers RAi and RJ of module Si at that time are shown in FIG. 5a. Phase Tl
(The right shift process of +s results in adjacent βi7t, so even in the left shift/exchange of +z, βi
-1 remains in module Si.

βi−1<”iであれば、7エーズTl(+1 +7)
 t1テ5(RBi)=β1−tとなるので、フェーズ
Tk+ sの左シフト処理でβi−1は元のモジュール
5i−1にもどる。
If βi-1<”i, then 7 aes Tl (+1 +7)
Since t1te5(RBi)=β1-t, βi-1 returns to the original module 5i-1 in the left shift process of phase Tk+s.

このことは、モジュール内の大きい値のデータは右シフ
ト処理によりそのデータの順位に応じたモジュールまで
右シフトし、隣接モジュールに確実にシフトするのにT
k ” 11 Tk + zの2フエーズを必要とする
ことを示している。
This means that data with a large value within a module is shifted to the right by the right shift process to a module according to the order of that data, and it is reliably shifted to an adjacent module.
This shows that two phases of k '' 11 Tk + z are required.

また1、フェーズTl(+xで左シフト処理、フェーズ
Tk+2で右シフト処理を行なうとしたときのモジュー
ル81のレジスタRAi、RBiの内容を第5図すに示
す。7エーズTl(+tの左シフト処理で隣接モジュー
ルSi+xよ多α1+1が入力され、仮すにβi〉αi
+1であればフェーズTk+1Otl f 5(RAl
)−αi+1となるので、 フェーズTk+gの右シフ
ト処理後においてもαi+xはモジュールSiにとどま
る。βi〈αi+1であれば、フェーズTl(+iのt
lで5(RJ)=α[+1となるので、7エーズTk+
+の右シフト処理でαi+1は元のモジュールSi+1
にモトる。このことは、モジール内の小さい値のデータ
は左シフト処理にょシ、そのデータの順位に応じたモジ
ュールまで左シフトし、隣接モジュールに確実にシフト
するのにTl(+t 、 Tl(+zの27エーズを必
要とすることを示している。
1. The contents of the registers RAi and RBi of the module 81 when performing left shift processing at phase Tl (+x and right shift processing at phase Tk+2) are shown in FIG. 5.7 Ace Tl (left shift processing at +t) , the adjacent module Si+x is inputted as α1+1, and if βi〉αi
+1, phase Tk+1Otl f 5(RAl
)-αi+1, so αi+x remains in module Si even after the right shift processing in phase Tk+g. If βi<αi+1, the phase Tl(t of +i
Since 5(RJ)=α[+1 at l, 7 aes Tk+
+ right shift processing αi+1 is the original module Si+1
Motoru. This means that data with small values in a module needs to be left-shifted, and it takes 27 days of Tl(+t, Tl(+z) to shift left to the module corresponding to the rank of the data, and to ensure a shift to the adjacent module. indicates that it is necessary.

したがって、以上述べた処理ヲ<シ返し行なうことによ
シ、データが所定の順序関係にソーティングされる。つ
ぎに、このソーティングの処理時間を求める。処理時間
が最大となるのは、モジュール5t(Sz)のRAI(
RBAI)のデータがモジュール87(St)のRB7
 (RAt )に伝達される場合である。
Therefore, by repeating the process described above, the data is sorted into a predetermined order relationship. Next, the processing time for this sorting is determined. The processing time is the largest for module 5t (Sz) RAI (
RBAI) data is RB7 of module 87 (St)
(RAt).

すなわち、ソーティングデータの集合で最大値(最小値
)のデータがモジュール51(84)のRA、(RBl
)に存在するときが、最大の処理時間となる。第4図の
動作例で述べたように7工−ズTgk+xで右シフト、
交換、フェーズTgkで左シフト、交換の処理を行なう
と仮定する。最大値のデータがモジュール81のRA、
に存在する場合、フェーズT1.T2では最大値のデー
タの移動はなくフェーズT8から瞬接モジュールへシフ
トラ始め、2(J−1)フェーズでモジュールIJに伝
達する。したがって、この場合、モジュールS1からモ
ジュールSl!に伝達するのに21フエーズかかる。最
小値のデータがモジュール87のRBJに存在する場合
、フェーズTlで最小値のデータがレジスタ回路18に
移動するため、1個のモジュールを移動する必要がある
ので同様に21フエーズかかる。 したがって、ソーテ
ィングデータin個とすると、ソーティングの処理時間
はnフェーズとなる。
That is, the data with the maximum value (minimum value) in the set of sorting data is the RA, (RBl) of the module 51 (84).
), the maximum processing time is reached. As mentioned in the operation example in Fig. 4, shift to the right with 7th gear Tgk+x,
It is assumed that left shift and exchange processing is performed in exchange phase Tgk. The maximum value data is the RA of module 81,
If present in phase T1. At T2, the data of the maximum value does not move, but shifts to the instant contact module from phase T8, and is transmitted to module IJ at phase 2 (J-1). Therefore, in this case, from module S1 to module Sl! It takes 21 phases to transmit. When the minimum value data exists in the RBJ of the module 87, the minimum value data is moved to the register circuit 18 in phase Tl, so it is necessary to move one module, so it similarly takes 21 phases. Therefore, if there are in pieces of sorting data, the processing time for sorting is n phases.

以上、第3図のソーティング処理装置がどのように動作
するかを第4図、第5図a+b k用いて説明した。第
4図においては、ソーティング処理を7工−ズTgk+
tで右シフト/交換、フェーズT21(で左シフト/交
換としたが、これを逆にしてフェーズT+に+1で左シ
フト/交換、7工−ズTg、で右シフト/交換としても
同様の動作をするのは勿論である。この場合も、ソーテ
ィングの処理時間は2J(n)フェーズである。
The manner in which the sorting processing apparatus shown in FIG. 3 operates has been described above with reference to FIGS. 4 and 5. In Fig. 4, the sorting process is performed by 7 steps Tgk+
Right shift/exchange at t, left shift/exchange at phase T21 (but if you reverse this and phase T+ +1 at left shift/exchange, 7th Tg, right shift/exchange, the same operation will occur) Of course, in this case as well, the processing time for sorting is 2J(n) phases.

また、各フェーズの10でシフト処理、tlで交換処理
としたが、これを逆にして、toで交換処理、11でシ
フト処理としても同様の動作をするのは勿論である。こ
の場合のソーティング処理時間は、最大値のデータがモ
ジュールs1のRAlにあるときについては、7エーズ
T1で最大値のデータの移動が行なわれ、最後の交換処
理でソーティングが終了するので、2(J−1)+−フ
ェーズである。 最小値のデータがモジュールslのR
BJにあるときは、最小値のデータがレジスタ回路18
に移動することがないので、(1−t)個のモジュール
を移動すればよく、ソーティング処理時間は2(J−1
)十−フエ−ズである。
In addition, in each phase 10 is a shift process and tl is a replacement process, but it goes without saying that the same operation can be performed by reversing this and performing a replacement process in to and a shift process in 11. The sorting processing time in this case is 2( J-1) +- phase. The minimum value data is R of module sl
When it is in BJ, the minimum value data is in the register circuit 18.
Therefore, it is only necessary to move (1-t) modules, and the sorting processing time is 2(J-1
) Ten phases.

第1図のソーティングモジュールを用いた第3図のソー
ティング処理装置では、ソーティングの4!r7エーズ
の処理(シフトと交換)に2クロツク必猥とする。第6
図は本発明の他の実施例であり、ソーティングの谷フェ
ーズの処理全1クロツクで処理するソーティングモジュ
ールのブロック図である。1は2つのデータをソーティ
ングするソーティングモジュールでアシ、レジスタDo
 路(RA、RB)2.3、比較回路(COMP) 6
、双方向データ線8゜10、入力データ線9,11、制
御入力線15、選択回路(SAI、 SBI、 SA2
.5B2) 19.2Q、21,22、制御回路23、
とから構成される。レジスタ回路2,3はそれぞれ選択
回路19 、20で選択したデータを保持するレジスタ
であり、同一のクロック信号で動作する。選択回路19
は双方向データ線8,10及び入力データ線(DA) 
 9から入力されるデータとレジスタ回路2,3で保持
しているデータとを制御線24の状態に基づいて選択し
、レジスタ回路2に出力する。選択回路20は双方向デ
ータ線8,10及び入力データ線(1)B) 11から
入力されるデータとレジスタ回路2,3で保持して因る
データとを制御線nの状態に基づいて選択し、レジスタ
回路(RB )3に出力する。選択回路21は双方向デ
ータ線(SDA)8のデータとレジスタ回路(RB)3
のデータとを制御線筋の状態に基づいて選択し、比較回
路6に出力する。選択回路22は双方向データ線(SD
R)10のデータとレジスタ回路(RA)2のデータと
全制御線26の状態に基づいて選択し、比較回路6に出
力する。比較回路6は正整数の大小関係全比較し、(選
択回路SA2の出力データ)≧(選択回路SB2の出力
データ)であれば論理的に「0」の比較信号(SW)1
4を、(選択回路SA2の出力データ)〈(選択回路S
B2の出力データ〕であれば論理的に「1」の比較信号
(SW)14ffi出力する。制御回路23は2本の制
御入力線(LOAD 、 R/L) 15と比較信号(
5W)14を入力し、選択回路19 、20 、21 
、22を制御する制御線24 、25 、26 、27
を出力する。
In the sorting processing apparatus shown in FIG. 3 using the sorting module shown in FIG. 1, 4! It takes two clocks to process r7 aids (shift and exchange). 6th
The figure shows another embodiment of the present invention, and is a block diagram of a sorting module that processes the valley phase of sorting in one clock. 1 is a sorting module that sorts two data;
circuit (RA, RB) 2.3, comparison circuit (COMP) 6
, bidirectional data line 8゜10, input data lines 9, 11, control input line 15, selection circuit (SAI, SBI, SA2
.. 5B2) 19.2Q, 21, 22, control circuit 23,
It consists of Register circuits 2 and 3 are registers that hold data selected by selection circuits 19 and 20, respectively, and operate using the same clock signal. Selection circuit 19
are bidirectional data lines 8, 10 and input data line (DA)
9 and the data held in the register circuits 2 and 3 are selected based on the state of the control line 24 and output to the register circuit 2. The selection circuit 20 selects the data input from the bidirectional data lines 8, 10 and the input data lines (1) (B) 11 and the data held in the register circuits 2, 3 based on the state of the control line n. and outputs it to the register circuit (RB) 3. The selection circuit 21 selects the data on the bidirectional data line (SDA) 8 and the register circuit (RB) 3.
data is selected based on the state of the control line and output to the comparison circuit 6. The selection circuit 22 includes a bidirectional data line (SD
R) 10, the data of the register circuit (RA) 2, and the states of all control lines 26, and outputs it to the comparison circuit 6. Comparison circuit 6 compares all the magnitudes of positive integers, and if (output data of selection circuit SA2) ≧ (output data of selection circuit SB2), the comparison signal (SW) 1 is logically "0".
4, (output data of selection circuit SA2) <(selection circuit S
B2 output data], a comparison signal (SW) 14ffi of logical "1" is output. The control circuit 23 has two control input lines (LOAD, R/L) 15 and a comparison signal (
5W) Input 14 and select circuits 19, 20, 21
, 22 control lines 24 , 25 , 26 , 27
Output.

第7図は第6図のソーティングモジュールの動作を示し
ておシ、選択回路(SAI、SBI、SA2,5R2)
19 、20 、21 、22が制御人力線15と比較
信号14とからどのデータ全選択するかを示した図であ
る。制御入力線LOADが「1」のとき、選択回路(S
AI、5BI)19 、20はそれぞれ入力データ線9
,11からのデータを選択し、レジスタ回路(RA、R
B)2 、3は前記選択されたデータを保持する。双方
向データ線8゜10は制御入力線R/I、が「Ojのと
きそれぞれ出力データ線、入力データ線として動作する
。選択回路(SA2 、5B2) 21 、20は制御
入力線R/I、が「0」のときそれぞれレジスタ回路(
RB) 3 、双方向データ線(SDR) 10のデー
タを選択し、「1」のときそれぞれ双方向データ線(S
DA)8.レジスタ回路(RA) 2のデータを選択し
て、比較回路6に出力する。制御入力線LOADが「0
」のとき、第1図で説明したシフト処理と交換処理が1
クロツクで実行される。
Figure 7 shows the operation of the sorting module in Figure 6.
19, 20, 21, and 22 are diagrams showing which data are all selected from the control human power line 15 and the comparison signal 14. When the control input line LOAD is “1”, the selection circuit (S
AI, 5BI) 19 and 20 are input data lines 9, respectively.
, 11 and register circuits (RA, R
B) 2 and 3 hold the selected data. The bidirectional data line 8.10 operates as an output data line and an input data line, respectively, when the control input line R/I is Oj.The selection circuits (SA2, 5B2) 21 and 20 operate as the control input line R/I, When is “0”, the register circuit (
RB) 3, bidirectional data line (SDR) 10 data is selected, and when it is "1", the bidirectional data line (SDR)
DA)8. Register circuit (RA) 2 selects data and outputs it to comparison circuit 6. Control input line LOAD is “0”
”, the shift processing and exchange processing explained in FIG.
Executed by clock.

すなわち、制御入力線n/Lが「1」のとき選択回路(
SAI、5BI)19 、20は比較信号14に基づい
てレジスタ回路(RA) 2のデータあるいは双方向デ
ータ線(8DA) 8のデータのどちらかを選択する。
That is, when the control input line n/L is "1", the selection circuit (
SAI, 5BI) 19 and 20 select either the data of the register circuit (RA) 2 or the data of the bidirectional data line (8DA) 8 based on the comparison signal 14.

ここでは、小さい値のデータがレジスタ回路(RA) 
2に保持されると仮定すると、比較信号(SW)14が
「1」(RA)SDA)であれば、選択回路(SAI 
、 SBI ) 19゜20はそれぞれ双方向データ線
(SDA) 、レジスタ回路(RA)のデータを選択し
、比較信号(SW)14がrOJ (RAり5DA)で
あれば、選択回路(SAI)(SBI)19 、20は
それぞれ前記と逆のデータを選択する。
Here, small value data is sent to the register circuit (RA).
2, if the comparison signal (SW) 14 is "1" (RA)SDA), the selection circuit (SAI
, SBI) 19 and 20 select the data of the bidirectional data line (SDA) and the register circuit (RA), respectively, and if the comparison signal (SW) 14 is rOJ (RA is 5DA), the selection circuit (SAI) ( SBI) 19 and 20 each select data opposite to the above.

これにより右シフト処理と交換処理が同時に実行される
。また、制御入力線R/Lが「O」のとき選択回路(S
A1,5B1)19,20は比較信号14に基づいてレ
ジスタ回路(RB)3L7)−データおるいは双方向デ
ータ線(SDR)10のデータのどちらかを選択する。
As a result, right shift processing and exchange processing are executed simultaneously. Also, when the control input line R/L is “O”, the selection circuit (S
A1, 5B1) 19, 20 select either the register circuit (RB) 3L7)-data or the data of the bidirectional data line (SDR) 10 based on the comparison signal 14.

比較信号14が「OJ (RB≧SDR)であれば、選
択回路(SAI、5BI) 19.20はそれぞれ双方
向データ線(SDB)。
If the comparison signal 14 is OJ (RB≧SDR), the selection circuits (SAI, 5BI) 19.20 are bidirectional data lines (SDB).

レジスタ回路(RB)のデータを選択し、比較信号14
がrlJ (RB<5DR)であれば、それぞれ前記と
逆のデータを選択する。これによシ左シフト処理と交換
処理が同時に実行される。このように、第6図のソーテ
ィングモジュールは右シフト処理と交換処理あるいは左
シフト処理と交換処理を1クロツクで実行する。したが
って、第3図のソーテインク処理装置に第6図のソーテ
ィングモジュールを用いれば、第4図の動作例のとと(
27個のデータ全その大小関係に基づいてソーティング
することができる。このときのソーティング処理時間は
、各7′ニーズの処理順序がシフト処理、交換処理の順
であるので、21フエーズ(2/クロツクと等しい)で
おる。ソーティング結果の読出しは制御入力線R/L 
’i常に「0」とすればソーティングモジュール81の
双方向データ線8よシ非減少順にソーティングされたデ
ータが得られ、制御入力線R/Lを常に「1」とすれば
ソーティングモジュールSノの双方向データ線10より
非増大順にソーティングされたデータが得られる。
Select the data of the register circuit (RB) and use the comparison signal 14.
If rlJ (RB<5DR), data opposite to the above is selected. As a result, left shift processing and exchange processing are executed simultaneously. In this manner, the sorting module of FIG. 6 executes right shift processing and exchange processing or left shift processing and exchange processing in one clock. Therefore, if the sorting module shown in FIG. 6 is used in the sorting ink processing apparatus shown in FIG. 3, the operation example shown in FIG.
All 27 pieces of data can be sorted based on their size relationships. The sorting processing time at this time is 21 phases (equal to 2/clock) because the processing order of each 7' need is shift processing and exchange processing. The sorting results are read using the control input line R/L.
If 'i' is always set to ``0'', data sorted in non-decreasing order is obtained from the bidirectional data line 8 of the sorting module 81, and if the control input line R/L is always set to ``1'', data sorted by the bidirectional data line 8 of the sorting module 81 is obtained. Data sorted in non-increasing order is obtained from the bidirectional data line 10.

第6図のソーティングモジュールは、ソーティングの谷
フェーズの処理を1クロツクで処理し、各フェーズにお
ける処理順序がシフト処理、交換処理の順とした構成例
である。第8図は本発明の他の実施例であり、ソーティ
ングの各フェーズの処理を1クロツクで処理するが、各
フェーズにおける処理順序を交換処理、シフト処理の順
とじた構成例である。1は2個のデータをンーティン゛
グするソーティングモジュールであシ、レジスタ回路(
RA、RB) 2 、3、比較回路(COMP) 6、
双方向データ線8,10.入力データ線9,11、制御
入力線15、選択回路(SA3.SB3.SA4,5B
4) 28,29,30゜31、制御回路32とから構
成される。レジスタ回路(RA、RB) 2 、3はそ
れぞれ選択回路(SA3,5B3)28 、29で選択
したデータを保持するレジスタであシ、同一のクロック
信号で動作する。選択回路(SA3)28は双方向デー
タ線(SDA) 8 、入力データ線(DA) 9及び
レジスタ回路(RA、RB) 2 、3のデータを制御
線間の状態に基づいて選択踵レジスタ回路(RA)2に
出力する。選択回路(SB3)29は双方向データ線(
8DB) 10 、 入カテ−タ線(DB) 11及び
レジスタ回路(RA、IRB) 2 、3のデータを制
御線あの状態に基づいて選択し、レジスタ回路(RB 
)3に出力する。比較回路6はレジスタ回路(RA)2
とレジスタ回路(RB) 3のデータを比較する。ここ
では、正整数の大小関係を比較し、(RAの出力データ
)″> (RBの出力データ)であれば比較信号(SW
) 14として「0」を出力し、(RAの出力データ)
((RBの出力データ)であれば「1」全出力すると仮
定する。選択回路(SA4 、 S、BA) 30 、
31は比較信号1417) 状態に基づいてレジスタ回
路(RA、RB) 2 、3のどちらかのデータを選択
する。制御回路32は2本の制御入力線(LOAD、 
R/L) 15を入力し、選択回路(SA3,5B3)
 28.29を制御する制御線33 、34を出力する
The sorting module shown in FIG. 6 is an example of a configuration in which the valley phase of sorting is processed in one clock, and the processing order in each phase is shift processing and exchange processing. FIG. 8 shows another embodiment of the present invention, in which each phase of sorting is processed in one clock, but the processing order in each phase is changed to exchange processing and shift processing. 1 is a sorting module that sorts two pieces of data, and has a register circuit (
RA, RB) 2, 3, comparison circuit (COMP) 6,
Bidirectional data lines 8, 10. Input data lines 9, 11, control input line 15, selection circuit (SA3.SB3.SA4,5B
4) Consists of 28, 29, 30° 31, and a control circuit 32. Register circuits (RA, RB) 2 and 3 are registers that hold data selected by selection circuits (SA3 and 5B3) 28 and 29, respectively, and operate with the same clock signal. The selection circuit (SA3) 28 selects the data of the bidirectional data line (SDA) 8, the input data line (DA) 9, and the register circuits (RA, RB) 2, 3 based on the state between the control lines. RA) Output to 2. The selection circuit (SB3) 29 has a bidirectional data line (
8DB) 10, the data of the input cater line (DB) 11 and the register circuits (RA, IRB) 2, 3 are selected based on the state of the control lines, and the data of the register circuit (RB
)3. Comparison circuit 6 is register circuit (RA) 2
and the data of register circuit (RB) 3 are compared. Here, the magnitude relationship of positive integers is compared, and if (RA output data)''> (RB output data), the comparison signal (SW
) Output "0" as 14, (RA output data)
(If (RB output data), it is assumed that "1" is fully output. Selection circuit (SA4, S, BA) 30,
31 is a comparison signal 1417) Data from either of the register circuits (RA, RB) 2 and 3 is selected based on the state. The control circuit 32 has two control input lines (LOAD,
R/L) 15 and select circuit (SA3, 5B3)
Control lines 33 and 34 for controlling 28 and 29 are output.

第9図は第8図のソーティングモジュールの動作を示し
ておp1選択回路(SA3.SB3.SA4.5B4)
28 、29 、30 、31がどのデータを選択する
かを示す図である。制御入力線LOADが「1」のとき
、選択回路(SA3,5B3)28 、29はそれぞれ
入力データ線9,11からのデータを選択し、レジスタ
回路(RA、RB)2゜3は前記選択されたデータを保
持する。選択回路(SA4 、8B4) 30 、31
は比較回路6とともに交換処理の役割を果たす。すなわ
ちソーティング終了径小さい値のデータがレジスタ回路
(RA) 2に保持されると仮定すれば、比較信号14
が「o」のときそれぞれレジスタ回路(RB、RA) 
3 、.2のデータを選択し、「1」のときそれぞれレ
ジスタ回路(RA、RB)2゜3のデータを出力する。
Figure 9 shows the operation of the sorting module in Figure 8, p1 selection circuit (SA3.SB3.SA4.5B4)
28 is a diagram showing which data is selected by 28, 29, 30, and 31. When the control input line LOAD is "1", the selection circuits (SA3, 5B3) 28, 29 select the data from the input data lines 9, 11, respectively, and the register circuits (RA, RB) 2.3 select the data from the input data lines 9, 11, respectively. Retain the data. Selection circuit (SA4, 8B4) 30, 31
together with the comparator circuit 6 plays the role of exchange processing. That is, if it is assumed that data with a smaller sorting end diameter is held in the register circuit (RA) 2, the comparison signal 14
When is "o", the respective register circuits (RB, RA)
3. 2 is selected, and when it is "1", the data of the register circuits (RA, RB) 2.3 is output.

制御入力線R/LがrOJのとき、双方向データ線8は
選択回路(8A4)300出力データを出力し、双方向
データ線10は入力データ線となる。このとき選択回路
(SB3)29は双方向データ線10のデータを選択し
、また比較信号14が「0」であればレジスタ回路(R
B)−3のデータが双方向データ線8に出力するので、
選択回路(SA3 )詔はレジスタ回路(RA) 2の
データを選択する。
When the control input line R/L is rOJ, the bidirectional data line 8 outputs the selection circuit (8A4) 300 output data, and the bidirectional data line 10 becomes an input data line. At this time, the selection circuit (SB3) 29 selects the data on the bidirectional data line 10, and if the comparison signal 14 is "0", the register circuit (R
B) -3 data is output to the bidirectional data line 8, so
The selection circuit (SA3) selects the data in the register circuit (RA) 2.

比較信号14が「1」であれば、レジスタ回路(RA)
2のデータが双方向データ線8に出力するので、選択回
路(SA3)28はレジスタ回路(RB) 3のデータ
全選択する。これにより交換処理と左シフト処理が同時
に実行される。制御入力線R/Eが「1」のとき、双方
向データ線8は入力データ線となシ、双方向データ線1
0は選択回路(SBA)31の出力データ全出力する。
If the comparison signal 14 is "1", the register circuit (RA)
Since the data of 2 is output to the bidirectional data line 8, the selection circuit (SA3) 28 selects all the data of the register circuit (RB) 3. As a result, exchange processing and left shift processing are executed simultaneously. When the control input line R/E is "1", the bidirectional data line 8 is not an input data line, and the bidirectional data line 1 is
0 outputs all output data of the selection circuit (SBA) 31.

このとき選択回路(SA3)28は双方向データ線8の
データを選択し、また比較信号14が「0」であればレ
ジスタ回路(R/1) 2のデータが双方向データ線1
0に出力するので、選択回路(SB3)29はレジスタ
回路(RB) 3のデータを選択する。
At this time, the selection circuit (SA3) 28 selects the data on the bidirectional data line 8, and if the comparison signal 14 is "0", the data on the register circuit (R/1) 2 is selected on the bidirectional data line 1.
Since the output is 0, the selection circuit (SB3) 29 selects the data of the register circuit (RB) 3.

比較信号14が「1」であれば、レジスタ回路(RB)
3のデータが双方向データ線lOに出力するので、選択
回路(SB3)29はレジスタ回路(RA) 2のデー
タを選択する。これによシ交換処理と右シフト処理が同
時に実行される。このように第8図のソーティングモジ
ュールは交換処理と右シフト処理あるいは交換処理と左
シフト処理を1クロツクで実行する。したがって第3図
のソーティング処理装置に第8図のモジュールを用いれ
ば、21個のデータをその大小関係に基づいてソーティ
ングすることができる。このときのソーティング処理時
間は各フェーズの処理順序が交換処理、シフト処理の順
であるので、前述したように2ノー17エーズ(2J−
1クロツクと等しい)である。ただし、ソーティングの
最後の処理がシフト処理であるので、ソーティング結果
のデータが隣接モジュールに1個づつシフトすることに
なる。そのため、ソーティング結果を読出すのにデータ
を1目金分にシフトする必要があるので、ソーティング
結果の読出し時間まで含めた処理時間は第6図のソーテ
ィングモジュールの場合と同一となる。
If the comparison signal 14 is "1", the register circuit (RB)
Since data No. 3 is output to the bidirectional data line IO, the selection circuit (SB3) 29 selects the data from the register circuit (RA) 2. As a result, the exchange process and the right shift process are executed simultaneously. In this manner, the sorting module of FIG. 8 executes the exchange process and the right shift process or the exchange process and the left shift process in one clock. Therefore, if the module shown in FIG. 8 is used in the sorting processing device shown in FIG. 3, 21 pieces of data can be sorted based on their magnitude relationship. Since the processing order of each phase is exchange processing and shift processing, the sorting processing time at this time is 2-no-17-A (2J-
(equal to one clock). However, since the last process of sorting is a shift process, the data resulting from the sorting is shifted to adjacent modules one by one. Therefore, since it is necessary to shift the data by one amount in order to read out the sorting results, the processing time including the time to read out the sorting results is the same as in the case of the sorting module shown in FIG. 6.

以上本発明につめて実施例を用いて説明した。The present invention has been explained above using examples.

第1図、第6図、第8図のソーティングモジュールでは
、隣接モジュール間のデータの伝達に双方向データ線を
用いたが、これt入力データ線、出力データ線の二つに
分割しても同様の動作をする。
In the sorting modules shown in Figures 1, 6, and 8, bidirectional data lines are used to transmit data between adjacent modules. It does the same thing.

また、第3図のソーティング処理装置においては、ソー
ティング処理結果全双方向データ線よシ読出す構成とし
たが、これをデータ処理モジュールに格納する構成とす
ることも可能である。
Further, although the sorting processing apparatus shown in FIG. 3 has a configuration in which the sorting processing results are read out from all bidirectional data lines, it is also possible to adopt a configuration in which the sorting processing results are stored in the data processing module.

なお本発明における選択回路、制御回路は、たとえばマ
イクロコンピュータを内蔵した各種プロセッサに使用さ
れている通常の信号選択、制御用論理回路を適用する。
As the selection circuit and control circuit in the present invention, for example, normal signal selection and control logic circuits used in various processors incorporating a microcomputer are applied.

発明の詳細 な説明したように、本発明では第1.第2のデータをソ
ーティングするソーティングモジュールを一次元配列状
に直列接続し、各モジュールは第2のデータを隣接モジ
ュールヘシフトし、隣接モジュールからのデータと該モ
ジュールの第1のデータとの比較結果に基づいて交換す
る処理と、各モジュールは第1のデータを前記と反対側
の隣接モジュールヘシフトし、隣接モジュールからのデ
ータと該モジュールの第2のデータとの比較結果に基づ
いて交換する処理とを交互にくシ返し行なって複数のデ
ータ全ハードウェアでソーティングしているので次のよ
うな利点がある。
As described in detail, the present invention includes the first aspect. Sorting modules that sort the second data are connected in series in a one-dimensional array, and each module shifts the second data to an adjacent module, and uses the comparison result between the data from the adjacent module and the first data of the module. and a process in which each module shifts the first data to an adjacent module on the opposite side and exchanges based on a comparison result between the data from the adjacent module and the second data of the module. Since the combing is performed alternately and multiple pieces of data are sorted using all hardware, there are the following advantages.

第1の利点は、ソーティングの処理時間がデータ数fn
とすると最大nフェーズ(あるいはnクロック)である
ので、大量のデータを高速にソーティングすることがで
きる。
The first advantage is that the processing time for sorting is
Since there are a maximum of n phases (or n clocks), a large amount of data can be sorted at high speed.

第2の利点は、第3図のようなソーティング処理装置を
構成すれば、データ処理モジュールの処理とソーティン
グモジュールの処理と全独立に行なうことができる。そ
のため両モジュール全バイグライン的に制御し、両モジ
ュールの処理全オーバラッグさせればさらに処理性能が
向上する。
The second advantage is that if the sorting processing apparatus is configured as shown in FIG. 3, the processing of the data processing module and the processing of the sorting module can be performed completely independently. Therefore, processing performance can be further improved by controlling both modules in a big-line manner and overlapping the processing of both modules.

第3の利点は、谷ソーティングモジュールが全て同一構
成であり、またモジュール間の通信が隣接モジュールだ
けであるので、データ数の拡張が答易である。さらに、
<シ返し性の高い回路構成であるのでLSIとの整合性
が良い。
The third advantage is that all the valley sorting modules have the same configuration and the communication between modules is only with adjacent modules, so it is easy to expand the number of data. moreover,
<Since the circuit configuration has high reversibility, it has good compatibility with LSI.

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

if図は本発明のソーティングモジュールの構成例、第
2図は第1図のソーティングモジールの動作例を示す図
、第3図は第1図のソーティングモジュールを用いたソ
ーティング処理装置の構成例、第4図はモジュールを4
個としたときの第3図のソーティング処理装置の動作例
を示す図、第5図a、l)は第3図のソーティング処理
装置の一般的な動作例を示す図、第6図、第8図は1ク
ロツクで処理するソーティングモジュールの構成例、第
7図、第9図はそれぞれ第6図、第8図のソーティング
モジュールの動作例を示す図である。 1°・°ソーティングモジュール、2,3・・・レジス
タ回路、4,5・・・選択回路、7・・・制御回路、8
.10・・・双方向データ線、 9,11・・・入力デ
ータ線、12.13・・・制御線、14・・・比較信号
線、15・・・制御入方線、16・・・データ処理モジ
ュール、17.18・・・レジスタ回路、19 、20
 、21 、22 ・・・選択回路、23 ・・・制御
回路、u、2526 、27・・・制御線、28 、2
9 、30 、31・・・選択回路、32・・・制御回
路、33 、34・・・制御線。 特許出願人 日本電信電話公社 代理人弁理士 玉  蟲  久 五 部(外3名) −228− 第 5 図 を事件の表示 昭和58年特許願第64974号 2、発明の名称 ソーティング処理方式 3、補正をする者 事件との関係  特許出願人 住 所  東京都千代田区内幸町1丁目1番6号氏名 
(422)日本電信電話公社 代表者真藤 恒 4、代理人 明細書第4頁第7行から第30頁第6行迄の発明の詳細
な説明の欄について、 (1)第14頁第18行目の[第5 ’3 a 、 b
 J ヲl第1表および第2表」と補正する。 (2)第14頁第18行目「・・・一般的に説明する。 」の次(二次の第1表および第2表を挿入する。 第 1 表 第  2  表 (3)第15頁第6行目乃至第7行目の「第5図α」を
「第1表」と補正する。 (4)第16頁第2行目乃至第3行目の「第5図b」を
「第2表」と補正する。 (5)第18頁第1行目の「第5図α、AJを「第1表
、第2表」と補正する。 (6)第19頁第5行目の「第6区」を「第5区」と補
正する。 (7)第20頁第19行目の「第7図」を「第6図」、
「第6図」を「第5図」とそれぞれ補正する。 (8)第22頁第17行目乃至第18行目の「第6図」
を「第5凶」と補正する。 (9)第26頁第1行目の「第6図」を「第5図」と補
正する。 (10)第26頁第14行目の「第6図」を「第5図」
と補正する。 (11)第14頁第18行目の1第8図」を「第7図」
と補正する。 (12)第25頁第9行目の「第9図」を「第8図」。 「第8図」を「第7図」とそれぞれ補正する。 (16)第27頁第6行目の「第8図」を「第7図」と
補正する。 (14)第27頁第10行目の「第8図Jtr第7図」
と補正する。 (15)第28頁第1行目の[第6図Jを「第5図」と
補正する。 (16)第28頁第4行目の「第6図」を「第5図」、
「第8図」を「第7図」とそれぞれ補正する。 明細書第60頁第4行から第61頁第6行迄の図面の簡
単な説明の欄について、 (17)第60頁第10行目乃至第12行目の「第5図
α、には第6図のソーティング処理装置の一般的な動作
例を示す図、」を削除する。 (18)第30頁第12行目の「第6図、第8図」を「
第5図、第7図」と補正する。 (19)第60頁第14行目の「第7図、第9図」を「
第6図、第8図」、「第6図、第8図」を「第5図、第
7図」とそれぞれ補正する。 (20)図面について、第5図α、hを削除し、第6図
、第7図、第8図、第9図をそれぞれ繰上げ第5図、第
6図、第7図、第8図と添付する赤で示すとおり補正す
る。
IF diagram is a configuration example of the sorting module of the present invention, FIG. 2 is a diagram showing an operation example of the sorting module of FIG. 1, FIG. 3 is a configuration example of a sorting processing device using the sorting module of FIG. 1, Figure 4 shows four modules.
Figures 5a and l) are diagrams showing general operation examples of the sorting processing apparatus shown in FIG. 3; The figure shows an example of the configuration of a sorting module that processes in one clock, and FIGS. 7 and 9 show examples of the operation of the sorting modules shown in FIGS. 6 and 8, respectively. 1°/° sorting module, 2, 3... register circuit, 4, 5... selection circuit, 7... control circuit, 8
.. 10... Bidirectional data line, 9, 11... Input data line, 12.13... Control line, 14... Comparison signal line, 15... Control input line, 16... Data Processing module, 17.18...Register circuit, 19, 20
, 21 , 22 ... selection circuit, 23 ... control circuit, u, 2526 , 27 ... control line, 28 , 2
9, 30, 31... selection circuit, 32... control circuit, 33, 34... control line. Patent Applicant Nippon Telegraph and Telephone Public Corporation Patent Attorney Hisashi Gobe Tamamushi (3 others) -228- Figure 5 shows the case 1982 Patent Application No. 64974 2, Invention Name Sorting Processing Method 3, Amendment Relationship with the case involving the person filing the patent application Address: 1-1-6 Uchisaiwai-cho, Chiyoda-ku, Tokyo Name
(422) Tsune Shindo 4, representative of Nippon Telegraph and Telephone Public Corporation, regarding the column for detailed explanation of the invention from page 4, line 7 of the agent's specification to page 30, line 6: (1) Page 14, line 18 Eye [5th '3 a, b
J Wol Tables 1 and 2”. (2) Page 14, line 18, after "...generally explains." (Insert secondary Tables 1 and 2. Table 1, Table 2, Table (3), Page 15. Correct “Fig. 5 α” in the 6th and 7th lines to “Table 1.” (4) Correct “Fig. 5 b” in the 2nd and 3rd lines of page 16 to “Table 1.” (5) Correct "Figure 5 α, AJ" in the first line of page 18 to "Table 1, Table 2." (7) "Figure 7" on page 20, line 19 is changed to "Figure 6".
"Figure 6" is corrected as "Figure 5". (8) “Figure 6” on page 22, lines 17 to 18
is corrected as the "fifth evil". (9) Correct "Fig. 6" in the first line of page 26 to "Fig. 5." (10) “Figure 6” on page 26, line 14 is changed to “Figure 5”
and correct it. (11) Page 14, line 18, 1 “Figure 8” is changed to “Figure 7”
and correct it. (12) "Figure 9" on page 25, line 9 is changed to "Figure 8.""Figure8" is corrected as "Figure 7". (16) Correct "Fig. 8" on the 6th line of page 27 to "Fig. 7." (14) “Figure 8 Jtr Figure 7” on page 27, line 10
and correct it. (15) In the first line of page 28, [Figure 6 J is corrected to read ``Figure 5.'' (16) “Figure 6” on page 28, line 4, “Figure 5”
"Figure 8" is corrected as "Figure 7". Regarding the brief explanation column of the drawings from page 60, line 4 to page 61, line 6 of the specification, (17) “Fig. "A diagram showing a general operation example of the sorting processing device in FIG. 6" is deleted. (18) Change “Figures 6 and 8” on page 30, line 12 to “
5 and 7”. (19) Change “Figures 7 and 9” on page 60, line 14 to “
6, 8'' and ``Fig. 6, 8'' are respectively corrected to ``Fig. 5, 7''. (20) Regarding the drawings, Figure 5 α and h have been deleted, and Figures 6, 7, 8, and 9 have been moved to Figure 5, Figure 6, Figure 7, and Figure 8. Correct as shown in red attached.

Claims (2)

【特許請求の範囲】[Claims] (1)双方向データ線および入力データ線からの入力デ
ータと第1および第2のレジスタ回路に保持するデータ
とを選択する第1および第2の選択回路と、該第1およ
び第2の選択回路によシ選択したデータ會それぞれ保持
する第1および第2のレジスタ回路と、該第1および第
2のレジスタ回路、または該第1および第2のレジスタ
回路のそれぞれと該第1および第2のレジスタ回路に隣
接する他の第2および第1のレジスタ回路で保持してい
る2個のデータを比較し、該2個のデータの大小関係に
よシ定まる比較信号を出力する比較回路と、該比較回路
からの該比較信号出力と、前記入力データ線の選択およ
び前記双方向データ線に対し入力データ線、出力データ
線を指定する制御入力線からの制御信号とを入力踵前些
第1および第2の選択回路のデータ選択全制御する制御
回路とからなる同一構成のソーティングモジュールを複
数個直列接続してなシ、該各ソーティングモジュールは
並列動作を行い、前記第1のレジスタのデータと第2の
レジスタのデータとを前記比較回路によp比較し、該2
個のデータを前記制御回路によシ隣接する一方のソーテ
ィングモジュールの第1のレジスタと、当該ソーティン
グモジュールの第2のレジスタに再配置する処理と、前
記第1のレジスタのデータと第2のレジスタのデータと
を前記比較回路によシ比較し、該2個のデータを前記制
御回路によシ轟該ソーティングモジュールの第1のレジ
スタと、隣接する他方のソーティングモジュールの第2
のレジスタとに再配置する処理とを交互に繰返すことを
特徴とするソーティング処理方式。
(1) First and second selection circuits that select input data from the bidirectional data line and the input data line and data held in the first and second register circuits, and the first and second selection circuits. first and second register circuits respectively holding data selected by the circuit, and the first and second register circuits, or each of the first and second register circuits and the first and second a comparison circuit that compares two pieces of data held in other second and first register circuits adjacent to the register circuit, and outputs a comparison signal determined by the magnitude relationship between the two pieces of data; The comparison signal output from the comparison circuit and the control signal from the control input line for selecting the input data line and specifying the input data line and the output data line for the bidirectional data line are input. A plurality of sorting modules having the same configuration are connected in series, each consisting of a control circuit for controlling all the data selections of the second selection circuit, and each sorting module operates in parallel, and the data in the first register and The comparator circuit compares the data of the second register with the data of the second register.
a process of rearranging the data of the first register to a first register of one sorting module adjacent to the control circuit and a second register of the sorting module; The data of the sorting module are compared by the comparison circuit, and the two data are transferred to the control circuit.
A sorting processing method characterized by alternately repeating processing of registers and relocation processing.
(2)双方向データ線および入力データ線からの入力デ
ータと第1および第2のレジスタ回路に保持す基データ
とを選択する第1および第2の選択回路と、該第1およ
び第2の選択回路によシ選択したデータをそれぞれ保持
する第1および第2のレジスタ回路と、該第1および第
2のレジスタ回路、または該第1および第2のレジスタ
回路のそれぞれと該第1および第2のレジスタ回路に隣
接する他の第2および第1のレジスタ回路で保持してい
る2個のデータ全比較し、該2個のデータの大小関係に
より定まる比較信号を出力する比較回路と、該比較回路
からの該比較信号出力と、前記入力データ線の選択およ
び前記双方向データ線に対し入力データ線、出力データ
線を指定する制御入力線からの制御信号とを入力し、前
記第1および第2の選択回路のデータ選択を制御する制
御回路とからなる同一構成のソーティングモジュールを
複数個直列接続してなシ、該谷ンーテイングモジュール
は並列動作を行い、前記第2のレジスタのデータと、隣
接する一方のソーティングモジュールの第1のレジスタ
のデータと全前記比較回路により比較し、該2個のデー
タを前記制御回路によ)当該ソーティングモジュールの
第1のレジスタと第2のレジスタとに再配置する処理と
、前記第1のレジスタのデータと隣接する他方のソーテ
ィングモジュールの第2のレジスタのデータとを前記比
較回路によシ比較し、該2個のデータ全前記制御回路に
よシ当該ソーティングモジュールの第1のレジスタと第
2のレジスタとに再配置する処理とを交互に繰返すこと
全特徴とするソーティング処理方式。
(2) first and second selection circuits that select input data from the bidirectional data line and the input data line and base data held in the first and second register circuits; first and second register circuits each holding data selected by the selection circuit; and the first and second register circuits, or each of the first and second register circuits and the first and second a comparison circuit that compares all two pieces of data held in other second and first register circuits adjacent to the second register circuit and outputs a comparison signal determined by the magnitude relationship between the two pieces of data; The comparison signal output from the comparison circuit and the control signal from the control input line for selecting the input data line and specifying the input data line and the output data line for the bidirectional data line, A plurality of sorting modules having the same configuration each consisting of a control circuit for controlling the data selection of the second selection circuit are connected in series, and the valley sorting module operates in parallel, and the data in the second register and , and the data in the first register of one of the adjacent sorting modules are compared by all the comparison circuits, and the two data are stored in the first register and the second register of the sorting module by the control circuit. the data in the first register and the data in the second register of the other adjacent sorting module are compared by the comparison circuit, and all of the two data are transferred to the control circuit; A sorting processing method characterized by alternately repeating a process of relocating to a first register and a second register of the sorting module.
JP6497483A 1983-04-13 1983-04-13 Sorting processing system Pending JPS59189442A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6497483A JPS59189442A (en) 1983-04-13 1983-04-13 Sorting processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6497483A JPS59189442A (en) 1983-04-13 1983-04-13 Sorting processing system

Publications (1)

Publication Number Publication Date
JPS59189442A true JPS59189442A (en) 1984-10-27

Family

ID=13273523

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6497483A Pending JPS59189442A (en) 1983-04-13 1983-04-13 Sorting processing system

Country Status (1)

Country Link
JP (1) JPS59189442A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61279976A (en) * 1985-06-05 1986-12-10 Hitachi Ltd Vector processor
JPH076021A (en) * 1993-06-18 1995-01-10 Nec Corp Data rearranging device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
IBM TECHNICAL DISCLOSURE BULLETIN=1969 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61279976A (en) * 1985-06-05 1986-12-10 Hitachi Ltd Vector processor
JPH076021A (en) * 1993-06-18 1995-01-10 Nec Corp Data rearranging device

Similar Documents

Publication Publication Date Title
JP2642671B2 (en) Digital crossbar switch
US8190943B2 (en) Systolic merge sorter
JP2002544586A (en) Apparatus and method for a programmable data path arithmetic array
WO1989003566A2 (en) Layered network
JPS6259495A (en) Correcting method for solving bias of communication connecting switch
CN101313290B (en) Performing an N-bit write access to an MxN-bit-only peripheral
JPH01283625A (en) Solid wiring circuit for sorting data
CN213042269U (en) Computing chip, computing force plate and digital currency mining machine
WO2021232422A1 (en) Neural network arithmetic device and control method thereof
JPS59189442A (en) Sorting processing system
CN111274193A (en) Data processing apparatus and method
CN111061335B (en) Clock network circuit, circuit system, chip and electronic equipment
CN101315547B (en) Control system based on multiple FPGA
JPS6369262A (en) Semiconductor integrated circuit
US7817651B2 (en) Method and apparatus for controlling storage of data
EP1754159A2 (en) Configurable ping-pong buffers for usb buffer description tables
JPH0479422A (en) Transmission control circuit
CN114442996A (en) Computing chip, computing force plate and digital currency mining machine
JPS59189443A (en) Sorting processing system
US6510480B1 (en) Data transfer circuit and data processing method using data transfer circuit for handling interruption processing
JPS5965352A (en) Sorting device
Takagi et al. A hardware sort-merge system
JPH04112319A (en) Data storing method and first-in/first-out device
EP0676702B1 (en) Shared bus non-sequential data ordering
JPH10257077A (en) Interface device, control unit and logic cell to extract m bit set from n bit set