JP2014126931A - Logic circuit device for data processing - Google Patents
Logic circuit device for data processing Download PDFInfo
- Publication number
- JP2014126931A JP2014126931A JP2012281410A JP2012281410A JP2014126931A JP 2014126931 A JP2014126931 A JP 2014126931A JP 2012281410 A JP2012281410 A JP 2012281410A JP 2012281410 A JP2012281410 A JP 2012281410A JP 2014126931 A JP2014126931 A JP 2014126931A
- Authority
- JP
- Japan
- Prior art keywords
- buffer queue
- buffer
- queue
- index
- stage
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
この発明は、複数段のバッファ・キューをもち、下段からから上段にデータを送りながら処理するデータ処理用論理回路装置に関する。その1つの具体例は、FPGAなどによって実装される、ソータである。 The present invention relates to a data processing logic circuit device that has a plurality of buffer queues and performs processing while sending data from a lower stage to an upper stage. One specific example is a sorter implemented by an FPGA or the like.
複数段のバッファ・キューをもつソータにおいては、下段からから上段にデータを送り込む際に、データを比較するためのコンパレータ(比較器)を使用する。このようなソータは、複数のコンパレータにより一気にデータを比較する構成をとるが、複数のコンパレータを備えると、ハードウェア・サイズが大きくなるという問題がある。 A sorter having a plurality of buffer queues uses a comparator (comparator) for comparing data when data is sent from the lower stage to the upper stage. Such a sorter has a configuration in which data is compared at once by a plurality of comparators. However, if a plurality of comparators are provided, there is a problem that the hardware size increases.
そこで、ハードウェア・サイズを節約した、下段と上段の間に単一のコンパレータ構成のソータが例えば、Kerming Fleming et al., "High-throughput Pinelined Mergesort", MIT - CSAIL, 2008などによって提案された。しかし、コンパレータが単一だと、どのような順序でコンパレータを適用するかという、スケジューリングが必要になる。 Therefore, a sorter with a single comparator configuration between the lower and upper stages, saving hardware size, was proposed by Kerming Fleming et al., "High-throughput Pinelined Mergesort", MIT-CSAIL, 2008, etc. . However, if there is a single comparator, scheduling in which order the comparators are applied is necessary.
スケジューリングには、下段から上段にデータを送り込むプッシュ・スケジューリングと、上段が下段にデータを要求して引き上げるプル・スケジューリングがある。 Scheduling includes push scheduling in which data is sent from the lower stage to the upper stage and pull scheduling in which the upper stage requests and pulls data from the lower stage.
しかし、プッシュ・スケジューリングを実現するためには、依然として、比較的大規模のハードウェアが必要になり、レイテンシも大きいという問題があった。 However, in order to realize push scheduling, there is still a problem that relatively large-scale hardware is required and latency is large.
このとき、プッシュ・スケジューリングを、プル・スケジューリングにすることで、ハードウェア・サイズをさらに節約することができる。これによる既知のアルゴリズムは、入力が揃っていて、出力バッファが満杯でないとき、処理を行いデータを移動するというものである。 At this time, push size scheduling is pull scheduling, so that the hardware size can be further saved. A known algorithm is to process and move data when the inputs are complete and the output buffer is not full.
従来技術として、特開平5−151166号公報は、受信バッファに記憶された先頭データの、データメモリのインデックスレジスタが指示するメモリデータに対するソート順位の適否を比較部にて比較判断させ、ソート順位「適」の場合には、制御部により上記受信バッファの先頭データを上記インデックスレジスタが指示するメモリデータの前に挿入登録し、ソート順位「否」の場合には、制御部によりインデックスレジスタが指示するメモリデータを次のデータ位置まで更新させ、上記ソート順位適否の比較判断処理が常に最新ソート位置以降のメモリデータを対象にして実施されるよう構成するソータを開示する。 As a conventional technique, Japanese Patent Application Laid-Open No. 5-151166 discloses that a comparison unit compares and determines whether or not the head data stored in the reception buffer is suitable for the sort order with respect to the memory data indicated by the index register of the data memory. If “appropriate”, the control unit inserts and registers the head data of the reception buffer before the memory data indicated by the index register, and if the sorting order is “no”, the index register indicates by the control unit. Disclosed is a sorter configured to update memory data to the next data position so that the above-described sorting order suitability determination process is always performed on the memory data after the latest sorting position.
特開平7−160475号公報は、マージソート処理のマージ対象リスト群生成処理時に,書き出しブロック毎にそのブロックの識別子とそのブロックの代表キー値からなる補助情報を取得して補助情報リストを作成し、次に,補助情報リストを代表キー値に従ってソートし,そのソートされた補助情報リストをサブ補助情報リストに分割し,それぞれを各処理装置に割り当て、各処理装置は自分に割り当てられたサブ補助情報リストに従って並列にマージ処理を行いソート処理を完了する構成を開示する。 Japanese Patent Application Laid-Open No. 7-160475 creates auxiliary information list by acquiring auxiliary information including an identifier of a block and a representative key value of the block for each write block at the time of merge target list group generation processing of merge sort processing. Next, the auxiliary information list is sorted according to the representative key value, the sorted auxiliary information list is divided into sub auxiliary information lists, each is assigned to each processing device, and each processing device is assigned to the sub auxiliary information assigned to itself. A configuration is disclosed in which merge processing is performed in parallel according to an information list to complete sort processing.
特開平10−336216号公報は、それぞれソートキーを含むデータ要素をソートするために、記憶手段が、それぞれ要素を含むことが可能であり、0からn−1まで番号を付けられたn個の連続したステージに分配されていて、ステージqはノード2qから2q+1−1を有する、2n−1個のノードを有するバイナリツリーにしたがって構成され、要素は、ノードiに含まれている各要素が、ノード2iおよび2i+1に含まれている要素のソートキーよりも小さいソートキーを有するように、ツリーの中で分散され、それぞれステージ20qあるいは連続したステージ間にn−1個のインタフェース・レジスタ26qを有するツリー(2≦m≦n)の数個の連続したステージと組み合わされたm個の連続したコントローラ21qによってツリーが管理されるソータを開示する。
Japanese Patent Application Laid-Open No. 10-336216 discloses that in order to sort data elements each including a sort key, the storage means can include each element, and n consecutive numbers numbered from 0 to n−1. Stage q is organized according to a binary tree having 2 n -1 nodes with
しかし、これらの従来技術は、ハードウェア・サイズを節約できる、単一コンパレータでプルスケジューリングのソータの構成を示唆するものではない。 However, these prior arts do not suggest a single comparator, pull scheduling sorter configuration that can save hardware size.
この発明の目的は、単一コンパレータでプル・スケジューリングのソータを提供することにある。 It is an object of the present invention to provide a pull scheduling sorter with a single comparator.
この発明の他の目的は、単一コンパレータでプル・スケジューリングのソータにおいて、動作時に出力バッファが常に一杯にならないことを保証することによって、デッドロックを回避する技法を提供することにある。 Another object of the present invention is to provide a technique for avoiding deadlocks in a single comparator and pull scheduling sorter by ensuring that the output buffer is not always full during operation.
この発明によれば、複数段のバッファ・キューをもち、下段から1/N(Nは好適には2mで、mは1以上の整数)ずつ減らしながら上段に伝播することによりデータを処理する装置であって、隣接する段のバッファ・キューの間に配置され、バッファ・キューの対のエントリを比較して、比較結果に基づき上段のバッファに値を上げる、単一のコンパレータを有し、各コンパレータが比較すべきバッファ・キューの対のエントリの位置の指定を上段から受け取り、下段へ指定を行う装置が提供される。この構成の典型的な応用例は、ソータである。 According to this invention, it has a multi-stage buffer queue, and processes data by propagating to the upper stage while decreasing by 1 / N (N is preferably 2 m , m is an integer of 1 or more) from the lower stage. A device having a single comparator that is arranged between adjacent stage buffer queues, compares the entries of a pair of buffer queues and raises the value of the upper stage buffer based on the comparison result; An apparatus is provided for receiving designations from the upper stage of the entry of the pair of buffer queues to be compared by each comparator and making designations to the lower stage. A typical application of this configuration is a sorter.
この発明の1つの側面によれば、各コンパレータが比較すべきバッファ・キューの対のエントリの位置の指定を、上段から受け取って格納する、複数段のインデックス・キューが設けられる。 According to one aspect of the present invention, a multi-stage index queue is provided that receives and stores designations of entry positions of buffer queue pairs to be compared by each comparator from the upper stage.
この発明の別の側面によれば、前記対のエントリがどちらも空でなく、下位段のインデックス・キューが満杯でないことに応答して、前記コンパレータを動作させて前記対のエントリの一方の内容を上位段に送出するとともに、該一方の内容を除去し、該一方のエントリのインデックスに対するリクエストを下段に送る処理と、当該段のインデックス・キューの最初の要素をポップする処理を実行する論理回路が設けられる。 According to another aspect of the invention, in response to neither of the pair of entries being empty and the lower level index queue being full, the comparator is operated to cause the contents of one of the pair of entries. Is a logic circuit that executes processing for sending the request for the index of the one entry to the lower stage and popping the first element of the index queue of the stage Is provided.
この発明のさらに別の側面によれば、論理回路は、前記対のエントリがどちらかが空であることに応答して、空のエントリのインデックスに対するリクエストを下段に送る機能を実行する。 According to yet another aspect of the invention, the logic circuit performs a function of sending a request for an index of an empty entry to the lower stage in response to either of the pair of entries being empty.
この発明のさらに別の側面によれば、デッドロック回避のために、バッファ・キューがフル状態の時に更に要素を追加しようとしてオーバーフローすることがないようになされる。さらに、高性能を達成するために、スタートアップ終了時に、バッファ・キューがフルになるように設計される。このため、バッファ・キューのサイズと、インデックス・キューのサイズが等しくなるようになされる。 According to still another aspect of the present invention, in order to avoid deadlock, when the buffer queue is full, an attempt to add more elements does not cause overflow. In addition, the buffer queue is designed to be full at the end of startup to achieve high performance. For this reason, the size of the buffer queue is made equal to the size of the index queue.
この発明のさらに別の側面によれば、高性能の達成のため、上位段からのリクエストを受け取ることのレイテンシをサイクル数でLとしたとき、定常状態でバッファ・キューが決して空にならないように、バッファ・キューのサイズは、L+1以上とされる。 According to still another aspect of the present invention, in order to achieve high performance, the buffer queue is never emptied in a steady state when the latency of receiving a request from the upper stage is L in cycle number. The size of the buffer queue is set to L + 1 or more.
以上のように、この発明によれば、単一コンパレータでプル・スケジューリングの構成によって、ハードウェア実装した際に、少ないハードウェア消費量で効率的に動作するソータを実現できるという効果が得られる。 As described above, according to the present invention, it is possible to realize a sorter that operates efficiently with a small amount of hardware consumption when mounted in hardware by a configuration of pull scheduling with a single comparator.
以下、図面に従って、本発明の実施例を説明する。これらの実施例は、本発明の好適な態様を説明するためのものであり、発明の範囲をここで示すものに限定する意図はないことを理解されたい。また、以下の図を通して、特に断わらない限り、同一符号は、同一の対象を指すものとする。 Embodiments of the present invention will be described below with reference to the drawings. It should be understood that these examples are for the purpose of illustrating preferred embodiments of the invention and are not intended to limit the scope of the invention to what is shown here. Further, throughout the following drawings, the same reference numerals denote the same objects unless otherwise specified.
図1は、本発明の一実施例に係るソータのハードウェア構成のブロック図である。この構成は、FPGA(Field Programmable Gate Array)によって作製されたものである。 FIG. 1 is a block diagram of a hardware configuration of a sorter according to an embodiment of the present invention. This configuration is produced by an FPGA (Field Programmable Gate Array).
このソータの典型的な用途は、ETL(Extract/Transformation/Load)・データベース系の製品で、ETL/データベースエンジンからデータベース・レコードの列を受け取り、特定のキーでソートしてまたETL/データベースエンジンにソート済みレコード列を返す、という使用法である。しかし、これには限定されず、任意のソータとして用いることができる。 A typical use of this sorter is an ETL (Extract / Transformation / Load) database product that receives database record columns from an ETL / database engine, sorts them by a specific key, and then returns them to the ETL / database engine. The usage is to return a sorted record sequence. However, the present invention is not limited to this, and any sorter can be used.
また、この実施例では4段のバッファーキュー・アレイとして実装されているが、この段数及び個々のバッファーキュー・アレイにおけるバッファキューの数は使用目的に応じて適宜設定され、但し、上段に進むに従って、下段から1/N(Nは好適には2mで、mは1以上の整数)ずつ減らしていくように設定される。この実施例では、m=1である。 In this embodiment, it is implemented as a four-stage buffer queue array. However, the number of stages and the number of buffer queues in each buffer queue array are appropriately set according to the purpose of use, but as the process proceeds to the upper stage. From the lower stage, 1 / N (N is preferably 2 m , m is an integer of 1 or more) is set to decrease. In this embodiment, m = 1.
図1の構成は、バッファキュー・アレイ102、104、106及び108をもつ。例えばメモリ・バスに接続されたデータ入力論理回路110から、バッファキュー・アレイ102、104、106及び108の順にソートしながらデータを送り込み、例えばメモリ・バスに接続されたデータ出力論理回路112にソートされたデータを出力する動作を行う。
The configuration of FIG. 1 has
一番下の段であるバッファキュー・アレイ102は、8つのバッファキュー102a、102b、102c、102d、102e、102f、102g及び102hをもち、その上段のバッファキュー・アレイ104は、4つのバッファキュー104a、104b、104c及び104dをもち、その上段のバッファキュー・アレイ106は、2つのバッファキュー104a及び104bをもち、最上段のバッファキュー・アレイ108は、単一の108aをもつ。
The lowermost
バッファキュー・アレイ102とバッファキュー・アレイ104の間には、バッファキュー・アレイ102の2つのバッファキューの値を比較して、バッファキュー・アレイ104に送り込むための単一のコンパレータ114と、スケジューラ120からのリクエストを受け取り、コンパレータ114が比較動作を行うバッファキューの位置を指定するスケジューラ116が配置されている。
Between the
バッファキュー・アレイ104とバッファキュー・アレイ106の間には、バッファキュー・アレイ104の2つのバッファキューの値を比較して、バッファキュー・アレイ106に送り込むための単一のコンパレータ118と、スケジューラ124からのリクエストを受け取り、コンパレータ118が比較動作を行うバッファキューの位置を指定するスケジューラ120が配置されている。
Between the
バッファキュー・アレイ106とバッファキュー・アレイ108の間には、バッファキュー・アレイ106の2つのバッファキューの値を比較して、バッファキュー・アレイ108に送り込むための単一のコンパレータ122と、データ出力論理回路112からのリクエストを受け取り、コンパレータ122が比較動作を行うバッファキューの位置を指定するスケジューラ124が配置されている。
Between the
スケジューラ116、120、及び124はそれぞれ、図4に示すように、上段のバッファキュー・アレイからのインデックスを格納するためのインデックス・キューをもつ。以下、スケジューラ116のインデックス・キューは116a、スケジューラ120のインデックス・キューは120aのような符号で示す。データ入力論理回路110も、メモリ・バスからバッファキュー・アレイ102にデータを送り込む位置を指定するためのスケジューラ機能をもつ。
Each of the
図2は、論理的に図1の構成と等価な構成の一部を示す。すなわち、図1の構成では、コンパレータとスケジューラが、別の構成要素として示されていたが、図2では、コンパレータ122が、図1に示すスケジューラ124の機能も含むものとして示されている。これは単に、機能要素の呼び方だけの問題で本質的ではないと理解されたい。
FIG. 2 shows a part of a configuration logically equivalent to the configuration of FIG. That is, in the configuration of FIG. 1, the comparator and the scheduler are shown as separate components, but in FIG. 2, the
図3は、コンパレータとスケジューラの機能を図式的に示す図である。すなわち、図3に示されているように、上位の段(ステージともいう)のスケジューラ120が、すぐ下の段のスケジューラ116に2ビットのインデックスとしてリクエストを送る。
FIG. 3 is a diagram schematically illustrating the functions of the comparator and the scheduler. That is, as shown in FIG. 3, the
スケジューラ116は、このリクエストを処理して、以下の4箇所に制御信号を送る。
(1) バッファキュー・アレイ104の書込み位置指示の信号。図4あるいは図6などで示されているように、各バッファキュー・アレイは、書込みインデックスをもつ。すなわち、0番目から数えて、i番目のバッファ・キューに書き込む、というように指示がなされる。
(2) バッファキュー・アレイ104の下位のバッファキュー・アレイ102の読取り位置指示。図4あるいは図6などに示されているように、各バッファキュー・アレイは、読取りインデックスをもつ。すなわち、読取りインデックスを以って、i*2番目とi*2+1番目のバッファ・キューからデータを読み取って、コンパレータ114で比較する、というように指示がなされる。
(3) コンパレータ114に対する制御信号。すなわち、コンパレータ114の処理を開始させる。また、コンパレータ114から処理完了の制御信号を受け取る。
(4) 下位のスケジューラに対するリクエスト。下位のバッファーキュー・アレイが最下段であるなら、データ入力論理回路110が、スケジューラの役割を果たす。
このような機能は、スケジューラ120及び124にも共通である。
The
(1) A signal for designating the write position of the
(2) Reading position indication of the
(3) Control signal for the
(4) Requests for lower level schedulers. If the lower buffer queue array is at the bottom, the
Such a function is common to the
次に、図4を参照して、図1に示したソータの論理的機能を説明する。まず、図1に示すように、各バッファキュー・アレイは、1つ以上のバッファキューをもつが、各バッファキューは、図4のように、複数のエントリ(要素)をもつ。やはり図4あるいは図6などで示されているように、インデックス・キューもまた、複数のエントリをもつ。本発明の1つの側面によれば、デッドロックを回避するために、バッファキューのエントリのサイズと、インデックス・キューのサイズが、所定の制約の下に選ばれる。この制約については後述する。 Next, the logical function of the sorter shown in FIG. 1 will be described with reference to FIG. First, as shown in FIG. 1, each buffer queue array has one or more buffer queues, but each buffer queue has a plurality of entries (elements) as shown in FIG. As also shown in FIG. 4, FIG. 6, etc., the index queue also has a plurality of entries. According to one aspect of the invention, to avoid deadlock, the size of the buffer queue entry and the size of the index queue are chosen subject to predetermined constraints. This restriction will be described later.
さらに、図4には、コンパレータ114が、バッファキュー・アレイ102の偶数番と奇数番のバッファ・キューの対を比較することが示されている。図4に示されているように、このようなバッファ・キューの対毎に0,1,2,3と、読取りインデックスとして番号が振られ、インデックス・キュー116aのエントリが、この読取りインデックスを指し示す。
Further, FIG. 4 shows that the
次に、図5のフローチャートを参照して、図1のソータの機能、特にスケジューラの処理について説明する。図5は、各段のスケジューラの処理をあらわす。従って、個々のスケジューラが図5に示す処理を実行する。 Next, the function of the sorter in FIG. 1, particularly the processing of the scheduler, will be described with reference to the flowchart in FIG. FIG. 5 shows the process of the scheduler at each stage. Accordingly, each scheduler executes the processing shown in FIG.
ステップ502において、スケジューラは、自分のインデックス・キューが空かどうか判断し、もしそうなら、ステップ524で何もしないで、ステップ526で、上のステージ(段)からのリクエストがあればインデックス・キューの末尾に追加して、処理を終了する。
In
もしステップ502においてスケジューラが、自分のインデックス・キューが空でないと判断したなら、ステップ504でインデックス・キューの先頭要素をiという変数に格納し、ステップ506で、下のステージのインデックス・キューが一杯かどうか判断し、もしそうなら、ステップ524で何もしないで、ステップ526で、上のステージ(段)からのリクエストがあればインデックス・キューの末尾に追加して、処理を終了する。
If the scheduler determines in
下のステージのインデックス・キューが一杯でないなら、スケジューラは、ステップ508で、下のステージのバッファキューi*2が空かどうか判断する。そして、もしそうなら、スケジューラは、ステップ510で、リクエスト(i*2)を下のステージに送り、ステップ526で、上のステージからのリクエストがあればインデックス・キューの末尾に追加して、処理を終了する。
If the lower stage index queue is not full, the scheduler determines in
もし下のステージのバッファキューi*2が空でないなら、スケジューラは、ステップ512で、下のステージのバッファキューi*2+1が空かどうか判断する。そして、もしそうなら、スケジューラは、ステップ514で、リクエスト(i*2+1)を下のステージに送り、ステップ526で、上のステージ(段)からのリクエストがあればインデックス・キューの末尾に追加して、処理を終了する。
If the lower stage buffer queue i * 2 is not empty, the scheduler determines in
入力側のバッファキューi*2も下のステージのバッファキューi*2+1も空でないと判断すると、スケジューラは、ステップ516で、a := 下のステージのバッファキューi*2の先頭の値、b: = 下のステージのバッファキューi*2+1の先頭の値と格納する。
If the scheduler determines that neither the input-side buffer queue i * 2 nor the lower-stage buffer queue i * 2 + 1 is empty, the scheduler, at
ステップ518では、コンパレータがaとbの値を比較し、a > bならステップ520でbを出力側、すなわち上段のバッファキュー・アレイのバッファキューiの末尾に追加し、リクエスト(i*2+1)を下のステージに送り、入力バッファキューi*2+1の先頭の値を削除し、インデックス・キューの先頭の値(i)を削除し、ステップ526で、上のステージ(段)からのリクエストがあればインデックス・キューの末尾に追加して、処理を終了する。
In
ステップ518でコンパレータが、a > bでないと判断したなら、ステップ522でaを出力側、すなわち上段のバッファキュー・アレイのバッファキューiの末尾に追加し、リクエスト(i*2)を下のステージに送り、入力バッファキューi*2の先頭の値を削除し、インデックス・キューの先頭の値(i)を削除し、ステップ526で、上のステージ(段)からのリクエストがあればインデックス・キューの末尾に追加して、処理を終了する。
If the comparator determines in
尚、上記の処理で、ステップ510、514、522及び524で、リクエストを下のステージに送る処理が行われるが、この構成では、このときリクエストを投げる時点で、次のような条件設定で、出力側のバッファキューが一杯ならないように保証する。
In the above processing, in
すなわちまず、スタートアップ時に、バッファキューがフルとなり、また決してオーバーフローしないようにするために、バッファ・キューのサイズと、インデックスキューのサイズが等しくなるようになされる。ここでのインデックスキューのサイズとは、当該バッファキューの直下にあるインデックスキューのサイズのことである。 That is, at startup, the size of the buffer queue is made equal to the size of the index queue so that the buffer queue is full and never overflows. The size of the index queue here is the size of the index queue immediately below the buffer queue.
さらに、上位段からのリクエストを受け取ることのレイテンシをサイクル数でLとしたとき、定常状態でバッファキューが決して空にならないように、バッファキューのサイズは、L+1以上とされる。レイテンシをより詳細に説明すると、当該バッファキューの直上のステージからのリクエストが発行されてから、リクエストされたデータが当該バッファキューに対して書き込まれるまでのレイテンシのことである。 Further, when the latency for receiving a request from the upper stage is L in terms of the number of cycles, the size of the buffer queue is set to L + 1 or more so that the buffer queue never becomes empty in a steady state. In more detail, the latency is the latency from when a request from the stage immediately above the buffer queue is issued until the requested data is written to the buffer queue.
このように設定しておくことにより、図5のフローチャートで示す処理が、特に出力バッファキューの空きの有無をチェックすることなく、デッドロックを回避することが可能となる。 By setting in this way, the process shown in the flowchart of FIG. 5 can avoid deadlock without particularly checking whether the output buffer queue is empty.
次に、図6から図19までを参照して、図1の構成の動作の一例を説明する。この実施例では、最下段のバッファキュー・アレイ102のバッファキューのサイズが3であるが、その上の2つのバッファキュー・アレイ104及び106のバッファキューのサイズは2である。このように、バッファキュー・アレイ毎にバッファキューのサイズは同一にする必要はなく、異なるサイズに設定してもよい。但し、上述の制約により、バッファキューのサイズと、その直下にあるインデックスキューのサイズは同一になるようになされる。図6の例では、バッファキュー・アレイ104の直下にあるのは、インデックスキュー116aである。
Next, an example of the operation of the configuration of FIG. 1 will be described with reference to FIGS. In this embodiment, the size of the buffer queue of the lowermost
さて、ソータの動作は、スタートアップ・サイクルと定常サイクルからなる。図6は、スタートアップ・サイクル1を示す図である。図6において、バッファキュー・アレイ104のバッファキュー104aとバッファキュー104bの先頭のエントリが空なので、スケジューラ120は、インデックス=0のリクエストを、下段のバッファキュー・アレイ102のスケジューラ116に送る。
The sorter operation consists of a start-up cycle and a steady cycle. FIG. 6 is a diagram showing the
図7に示す次のスタートアップ・サイクル2では、バッファキュー・アレイ104のバッファキュー104aとバッファキュー104bの先頭のエントリが依然として空なので、スケジューラ120は、インデックス=0のリクエストを、下段のバッファキュー・アレイ102のスケジューラ116に再び送る。こうして、スケジューラ116がリクエストを受け取るが、バッファキュー・アレイ102のバッファキュー102aとバッファキュー102bの先頭のエントリが空なので、スケジューラ116は、下段の入力論理回路110にリクエストを送る。
In the next start-up
図8に示す次のスタートアップ・サイクル3では、バッファキュー・アレイ104のバッファキュー104aとバッファキュー104bの先頭のエントリが依然として空であるが、下位段のインデックス・キュー116aが一杯なので、スケジューラ120は何もしない。一方、スケジューラ116は、バッファキュー・アレイ102のバッファキュー102aとバッファキュー102bの先頭のエントリが空なので、スケジューラ116は、下段の入力論理回路110にリクエストを送る。
In the next start-up
図9に示す次のスタートアップ・サイクル4では、バッファキュー・アレイ104のバッファキュー104aとバッファキュー104bの先頭のエントリが依然として空であるが、下位段のインデックス・キュー116aが一杯なので、スケジューラ120は何もしない。一方、スケジューラ116は、バッファキュー・アレイ102のバッファキュー102aとバッファキュー102bの両方の先頭にエントリが格納されるのを待つ。
In the
図10は、スタートアップ・サイクル7を示す図である。この段階でも、バッファキュー・アレイ104のバッファキュー104aとバッファキュー104bの先頭のエントリが依然として空であるが、下位段のインデックス・キュー116aが一杯なので、スケジューラ120は何もしない。一方、スケジューラ116は、バッファキュー・アレイ102のバッファキュー102aにエントリが格納されたが、バッファキュー102bのエントリがまだ空なので、その両方の先頭にエントリが格納されるのを待つ。
FIG. 10 is a diagram showing the
図11は、スタートアップ・サイクル8を示す図である。バッファキュー・アレイ104のバッファキュー104aとバッファキュー104bの先頭のエントリが依然として空であるが、下位段のインデックス・キュー116aが一杯なので、スケジューラ120は何もしない。一方、スケジューラ116は、バッファキュー・アレイ102のバッファキュー102aとバッファキュー102bの両方の先頭に値が格納されたので作動し始め、これにより、バッファキュー102aの先頭のエントリが、バッファキュー・アレイ104のバッファキュー104aにポップされる。
FIG. 11 is a diagram showing the
図12のスタートアップ・サイクル9では、バッファキュー104aが最早空ではなく、一方バッファキュー104bが依然として空なので、インデックス=1というリクエストをスケジューラ120が送る。一方、インデックス・キュー116aのエントリに応答して、バッファキュー・アレイ102のバッファキュー102aとバッファキュー102bがコンパレータ114によって比較され、結果がバッファキュー・アレイ104のバッファキュー104aにポップされる。
In the
図13のスタートアップ・サイクル10では、インデックス・キューの2つのエントリに対応して、バッファキュー・アレイ104のバッファキュー104aに2つのエントリがプッシュされた状態となる。
In the
図14から図19までは、定常サイクルの動作を示す。図14から図19において、インデックス・キュー116a、120a、124aは便宜上単一要素として示されているけれども、実際は2要素である。図14の定常サイクル1では、スケジューラ124のインデックス・キュー124aがバッファキュー・アレイ106の読取りインデックス=0を指し示し、この結果、バッファキュー106aとバッファキュー106bの先頭のエントリがコンパレータ122により比較されて、バッファキュー104aの先頭のエントリが上段に移動対象となる。また、移動対象になったバッファキュー104aの書込みインデックスは、次のサイクルで使用される。
14 to 19 show the operation of a steady cycle. 14 to 19, the
さらに図14において、インデックス・キュー120aがバッファキュー・アレイ104の読取りインデックス=1を指し示し、この結果、バッファキュー104cとバッファキュー104dの先頭のエントリがコンパレータ118により比較されて、バッファキュー104cの先頭のエントリが上段に移動対象となる。また、移動対象になったバッファキュー104cの書込みインデックスは、次のサイクルで使用される。
Further, in FIG. 14, the
さらに図14において、インデックス・キュー116aがバッファキュー・アレイ102の読取りインデックス1を指し示し、この結果、バッファキュー102cとバッファキュー102dの先頭のエントリがコンパレータ114により比較されて、バッファキュー104cの先頭のエントリが上段に移動対象となる。
Further, in FIG. 14, the
図15は、定常サイクル1の続きを示す。すなわち、図15において、バッファキュー・アレイ106のバッファキュー106aの先頭のエントリがデータ出力論理回路112に送られ、バッファキュー・アレイ104のバッファキュー104cの先頭のエントリがバッファキュー・アレイ106のバッファキュー106bに送られ、バッファキュー・アレイ102のバッファキュー102dの先頭のエントリがバッファキュー・アレイ104のバッファキュー104bに送られる。
FIG. 15 shows the continuation of
図16の定常サイクル2では、スケジューラ124のインデックス・キュー124aがバッファキュー・アレイ106の読取りインデックス=0を指し示し、この結果、バッファキュー106aとバッファキュー106bの先頭のエントリがコンパレータ122により比較されて、バッファキュー104aの先頭のエントリが上段に移動対象となる。また、移動対象になったバッファキュー104aの書込みインデックスは、次のサイクルで使用される。
In
さらに図16において、インデックス・キュー120aがバッファキュー・アレイ104の読取りインデックス=0を指し示し、この結果、バッファキュー104aとバッファキュー104bの先頭のエントリがコンパレータ118により比較されて、バッファキュー104aの先頭のエントリが上段に移動対象となる。また、移動対象になったバッファキュー104aの書込みインデックスは、次のサイクルで使用される。
Further, in FIG. 16, the
さらに図16において、インデックス・キュー116aがバッファキュー・アレイ102の読取りインデックス=2を指し示し、この結果、バッファキュー102eとバッファキュー102fの先頭のエントリがコンパレータ114により比較されて、バッファキュー104fの先頭のエントリが上段に移動対象となる。
Further, in FIG. 16, the
図17は、定常サイクル2の続きを示す。すなわち、図17において、バッファキュー・アレイ106のバッファキュー106aの先頭のエントリがデータ出力論理回路112に送られ、バッファキュー・アレイ104のバッファキュー104aの先頭のエントリがバッファキュー・アレイ106のバッファキュー106aに送られ、バッファキュー・アレイ102のバッファキュー102fの先頭のエントリがバッファキュー・アレイ104のバッファキュー104cに送られる。
FIG. 17 shows the continuation of
図18の定常サイクル3では、スケジューラ124のインデックス・キュー124aがバッファキュー・アレイ106の読取りインデックス=0を指し示し、この結果、バッファキュー106aとバッファキュー106bの先頭のエントリがコンパレータ122により比較されて、バッファキュー104bの先頭のエントリが上段に移動対象となる。また、移動対象になったバッファキュー104bの書込みインデックスは、次のサイクルで使用される。
In
さらに図18において、インデックス・キュー120aがバッファキュー・アレイ104の読取りインデックス=0を指し示し、この結果、バッファキュー104aとバッファキュー104bの先頭のエントリがコンパレータ118により比較されて、バッファキュー104bの先頭のエントリが上段に移動対象となる。また、移動対象になったバッファキュー104bの書込みインデックスは、次のサイクルで使用される。
Further, in FIG. 18, the
さらに図18において、インデックス・キュー116aがバッファキュー・アレイ102の読取りインデックス=0を指し示し、この結果、バッファキュー102aとバッファキュー102bの先頭のエントリがコンパレータ114により比較されて、バッファキュー104aの先頭のエントリが上段に移動対象となる。
Further, in FIG. 18, the
図19は、定常サイクル2の続きを示す。すなわち、図19において、バッファキュー・アレイ106のバッファキュー106aの先頭のエントリがデータ出力論理回路112に送られ、バッファキュー・アレイ104のバッファキュー104bの先頭のエントリがバッファキュー・アレイ106のバッファキュー106aに送られ、バッファキュー・アレイ102のバッファキュー102aの先頭のエントリがバッファキュー・アレイ104のバッファキュー104aに送られる。
FIG. 19 shows the continuation of
以上のように、特定の数のバッファキュー・アレイの段数と、バッファキューのサイズと、インデックス・キューのサイズ(要素数)における実施例を説明してきたが、上記制約条件に従う限り、適用するアプリケーションに従い、任意の数のバッファキュー・アレイの段数、バッファキューのサイズ及びインデックス・キューの数を使用することができる。 As described above, the embodiments of the specific number of buffer queue arrays, the buffer queue size, and the index queue size (number of elements) have been described. Any number of buffer queue array stages, buffer queue sizes, and index queue numbers can be used.
また、この発明の構成の好適な実装は、FPGA(Field Programmable Gate Array)またはCPLD(Complex Programmable Logic Device)などの書き換え可能な論理素子を用いたハードウェアによる実装であるが、通常のフォトリソグラフ技術によりシリコン・ウェーハ上に作りこんだ論理回路でもよいし、ソフトウェアにより実装してもよい。ソフトウェアによる実装の場合は、一般的にハードウェアによる実装よりは動作速度は低下するが、それでも、本発明の機能をコード化した場合、機能の簡易化によるコード記述の合理化を計ることができる。 Further, the preferred implementation of the configuration of the present invention is hardware implementation using a rewritable logic element such as FPGA (Field Programmable Gate Array) or CPLD (Complex Programmable Logic Device). The logic circuit built on the silicon wafer may be used, or may be implemented by software. In the case of software implementation, the operation speed is generally lower than that of hardware implementation. However, when the functions of the present invention are coded, the code description can be rationalized by simplifying the functions.
102、104、106 ・・・ バッファキュー・アレイ
114、118、122 ・・・ コンパレータ
116、120、124 ・・・ スケジューラ
116a、120a、124a ・・・ インデックス・キュー
102, 104, 106 ...
Claims (10)
隣接する段のバッファ・キューの間に配置され、バッファ・キューの対のエントリを比較して、比較結果に基づき上段のバッファに値を上げる、単一のコンパレータを有し、
各コンパレータが比較すべきバッファ・キューの対のエントリの位置の指定を上段から受け取り、下段へ指定を行う、
装置。 A device that has multiple stages of buffer queues and processes data by propagating to the upper stage while decreasing by 1 / N (N is an integer of 2 or more) from the lower stage,
A single comparator located between adjacent stage buffer queues that compares entries in a pair of buffer queues and increments the upper stage buffer based on the comparison results;
Each comparator receives the specification of the position of the entry of the buffer queue pair to be compared from the upper stage, and performs the specification to the lower stage.
apparatus.
当該段のインデックス・キューの最初の要素をポップする手段をさらに有する、請求項2に記載の装置。 In response to the fact that neither of the pair of entries is empty and the lower-level index queue is not full, the comparator is operated to send the contents of one of the pair of entries to the upper level, And a means for sending a request for the index of the one entry to the lower stage,
The apparatus of claim 2, further comprising means for popping the first element of the stage index queue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012281410A JP2014126931A (en) | 2012-12-25 | 2012-12-25 | Logic circuit device for data processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012281410A JP2014126931A (en) | 2012-12-25 | 2012-12-25 | Logic circuit device for data processing |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014126931A true JP2014126931A (en) | 2014-07-07 |
Family
ID=51406399
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012281410A Pending JP2014126931A (en) | 2012-12-25 | 2012-12-25 | Logic circuit device for data processing |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014126931A (en) |
-
2012
- 2012-12-25 JP JP2012281410A patent/JP2014126931A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4339381B2 (en) | Shared memory multiprocessor system and information processing method thereof | |
EP2791854B1 (en) | Counter operation in a state machine lattice | |
US9111615B1 (en) | RAM-based ternary content addressable memory | |
US7694068B1 (en) | Re-entrant processing in a content addressable memory | |
US9240237B2 (en) | Semiconductor device and method of writing/reading entry address into/from semiconductor device | |
Zhang et al. | cublastp: Fine-grained parallelization of protein sequence search on cpu+ gpu | |
US11580055B2 (en) | Devices for time division multiplexing of state machine engine signals | |
JP2002313086A (en) | Information retrieving device | |
WO2024066561A1 (en) | Apparatus and method for searching for free memory and chip | |
CN115982311B (en) | Method and device for generating linked list, terminal equipment and storage medium | |
US5903780A (en) | Data sorting device having multi-input comparator comparing data input from latch register and key value storage devices | |
US8495644B2 (en) | Method for registering and scheduling execution demands | |
US7370046B2 (en) | Sort processing method and sort processing apparatus | |
JP2009070226A (en) | Matching device | |
JP2014126931A (en) | Logic circuit device for data processing | |
CN115543254A (en) | Sorting circuit, sorting method and electronic equipment | |
JPH03129521A (en) | Stabilizing sorting of sorting accelerator | |
US10949258B1 (en) | Multistage round robin arbitration in a multiuser system | |
CN109002467B (en) | Database sorting method and system based on vectorization execution | |
JP4391464B2 (en) | Device for storing binary tree structure information and device for storing heap structure information | |
US12019644B1 (en) | Methods and systems for performing database operations | |
US20220012010A1 (en) | Reformatting Matrices to Improve Computing Efficiency | |
CN113448962B (en) | Database data management method and device | |
JP2752902B2 (en) | Vector processing equipment | |
US20230214178A1 (en) | Device and method for selecting top values from a set of raw values |