JP4391464B2 - Device for storing binary tree structure information and device for storing heap structure information - Google Patents

Device for storing binary tree structure information and device for storing heap structure information Download PDF

Info

Publication number
JP4391464B2
JP4391464B2 JP2005304336A JP2005304336A JP4391464B2 JP 4391464 B2 JP4391464 B2 JP 4391464B2 JP 2005304336 A JP2005304336 A JP 2005304336A JP 2005304336 A JP2005304336 A JP 2005304336A JP 4391464 B2 JP4391464 B2 JP 4391464B2
Authority
JP
Japan
Prior art keywords
information
layer
address
memory device
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005304336A
Other languages
Japanese (ja)
Other versions
JP2007114944A (en
Inventor
宗良 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2005304336A priority Critical patent/JP4391464B2/en
Publication of JP2007114944A publication Critical patent/JP2007114944A/en
Application granted granted Critical
Publication of JP4391464B2 publication Critical patent/JP4391464B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

この発明は、2分木構造の情報を記憶する装置及びヒープ構造の情報を記憶する装置に関し、特に、ヒープによるソータの並列処理による実現に係わる、2分木構造の情報を記憶する装置及びヒープ構造の情報を記憶する装置に関する。   The present invention relates to an apparatus for storing binary tree structure information and an apparatus for storing heap structure information, and more particularly to an apparatus and heap for storing binary tree structure information related to realization by parallel processing of a sorter using a heap. The present invention relates to an apparatus for storing structure information.

従来、通信の分野で通信品質制御のために広く使用されている各種のキューイング(待ち行列)システムは、通信回線の高速化への対応やキュー数の増大への対応等のスケーラビリティの向上のために、高速且つ、大容量のソータを必要としている。ここで言う、ソータとは、優先度が付与された情報の中から、最も優先度が高い情報を特定する装置のことで、スケジューリング、符号化、配置配線、数値計算等の幅広い情報処理分野で使用されている。   Conventionally, various queuing systems that are widely used for communication quality control in the communication field have improved scalability, such as support for higher communication lines and increased queue count. Therefore, a high speed and large capacity sorter is required. The sorter mentioned here is a device that identifies the information with the highest priority from the information given priority. In the wide range of information processing fields such as scheduling, encoding, placement and routing, and numerical calculation. in use.

図10は、優先キューの一例を示す説明図である。図10に示すように、キューイングシステムの中で最も基本的な優先キュー(priority queue)とは、キューに対して優先度が規定され、受信したパケットが対応する優先度に基づいてパケットをキューに分類し、パケットの送信が可能なキューの中から最も優先度が高いキューを選択するサービス規則に基づいたキューイングシステムのことである。   FIG. 10 is an explanatory diagram illustrating an example of a priority queue. As shown in FIG. 10, in the queuing system, the most basic priority queue (priority queue) has a priority defined for the queue and queues packets based on the priority corresponding to the received packet. And a queuing system based on a service rule that selects a queue with the highest priority from queues that can transmit packets.

優先キューは、対応する優先度が数レベルであれば実用に供されているが、優先度を数千レベルとした場合や高速回線対応とした場合、パケットの送信が可能なキューの中から最も優先度が高いキューを選択する処理がネックとなる。このため、パケットが送信可能であるか否かを、最も優先度が高いキューから低いキューへ逐次確認した場合、数千レベルの優先度や高速回線に対応可能な速度で処理を行なうことは、困難となる。この解決には、高速、且つ、多数の優先度に対応したソータの実現が必要となる。   The priority queue is practically used if the corresponding priority is several levels. However, when the priority is set to several thousand levels or high-speed lines are supported, the priority queue is the most queue that can transmit packets. The process of selecting a queue with a high priority is a bottleneck. For this reason, when sequentially checking whether a packet can be transmitted from the queue with the highest priority to the queue with the lowest priority, processing at a speed that can handle thousands of priorities and high-speed lines is It becomes difficult. In order to solve this problem, it is necessary to realize a sorter corresponding to a large number of priorities at high speed.

図11は、巡回型キューの一例を示す説明図である。図11に示すように、巡回(ラウンドロビン)型キューとは、キューに対して環状の順序関係が規定され、受信したパケットに含まれるプロトコル情報等に基づいてパケットをキューに分類し、パケットの送信が可能なキューの中から、直前の送信を行なったキューに最も順序が近いキューを選択するサービス規則に基づいたキューイングシステムのことである。   FIG. 11 is an explanatory diagram illustrating an example of a cyclic queue. As shown in FIG. 11, the cyclic (round robin) type queue has a circular order relationship with respect to the queue, classifies packets into queues based on protocol information included in the received packets, This is a queuing system based on a service rule that selects a queue that is closest in order to the queue that performed the previous transmission from the queues that can be transmitted.

巡回型キューも、キュー数を数千レベルとした場合や高速回線対応とした場合、パケットの送信が可能なキューの中から、直前の送信を行なったキューに最も順序が近いキューを選択する処理がネックとなる。パケットが送信可能であるか否かを、送信を行なったキューを起点として逐次確認した場合、数千レベルのキュー数や高速回線に対応可能な速度で処理を行なうことは困難となる。キューの順序関係は優先度と見なすことができるため、この間題の解決にも、高速、且つ、多数の優先に対応したソータが必要となる。   When the number of queues is several thousand levels or for high-speed lines, the cyclic queue is a process that selects the queue that is closest in order to the queue that sent the packet from the queues that can send packets. Becomes a bottleneck. When it is sequentially confirmed whether or not a packet can be transmitted, starting from a queue that has transmitted, it is difficult to perform processing at a speed that can handle thousands of queues and high-speed lines. Since the order relation of queues can be regarded as a priority, a sorter corresponding to a large number of priorities is required to solve this problem.

図12は、タグ付け型キューの一例を示す説明図である。図12に示すように、タグ付け型キューとは、WFQ(Weighted Fair Queuing),Virtual Clock,Jitta−EDD(Earlist Due Date)等に基づいたキューイングシステムのことである。これらの方式には細部に相違があるものの、受信したパケットに含まれるプロトコル情報等に基づいてパケットをキューに分類し、受信したパケットの送信タイミングを計算し、その値をタグとしてパケットに付与して、キューの先頭のパケットの中から、送信タイミングが最も早いタグを持つパケットを記憶するキューを選択するサービス規則に基づく。   FIG. 12 is an explanatory diagram illustrating an example of a tagging queue. As shown in FIG. 12, the tagging queue is a queuing system based on WFQ (Weighted Fair Queuing), Virtual Clock, Jitter-EDD (Early Due Date), and the like. Although there are differences in the details of these methods, the packets are classified into queues based on the protocol information contained in the received packets, the transmission timing of the received packets is calculated, and the value is assigned to the packet as a tag. Thus, based on a service rule for selecting a queue storing a packet having a tag with the earliest transmission timing from among the first packets in the queue.

タグ付け型キューも、キュー数を数千レベルとした場合や高速回線対応とした場合、送信タイミングが最も早いタグを持つパケットを記憶するキューを選択する処理が、ネックとなる。キューの先頭のパケットのタグの値を逐次比較した場合、数千レベルのキュー数や高速回線に対応可能な速度で処理を行なうことは困難となる。送信タイミングの値は、優先度と見なすことができるため、この問題の解決にも、高速、且つ、多数の優先度に対応したソータの実現が必要となる。
以上から明らかな通り、キューイングシステムのスケーラビリティの向上には、複数の優先度情報から最も高い優先度を選択するソータを、多数の優先度に対応させ、且つ、高速に実現することが必要となる。
When the number of queues is set to several thousand levels or the high-speed line correspondence is also applied to the tagging type queue, processing for selecting a queue storing a packet having a tag with the earliest transmission timing becomes a bottleneck. When the tag values of the packets at the head of the queue are sequentially compared, it is difficult to perform processing at a speed that can handle thousands of queues and high-speed lines. Since the value of the transmission timing can be regarded as a priority, it is necessary to realize a sorter corresponding to a large number of priorities in order to solve this problem.
As is clear from the above, in order to improve the scalability of the queuing system, it is necessary to implement a sorter that selects the highest priority from a plurality of priority information in correspondence with many priorities and at high speed. Become.

従来の技術では、複数の優先度情報から最も高い優先度を選択するソータは、プライオリティエンコーダによって実現することができる。
図13は、プライオリティエンコーダの一例を示す説明図である。図13に示すように、プライオリティエンコーダとは、入力信号に対応する優先度が予め定められ、入力信号によって示される優先度から最も高い優先度の値を出力する、組み合わせ論理回路のことである。
In the prior art, a sorter that selects the highest priority from a plurality of priority information can be realized by a priority encoder.
FIG. 13 is an explanatory diagram illustrating an example of a priority encoder. As shown in FIG. 13, the priority encoder is a combinational logic circuit in which a priority corresponding to an input signal is determined in advance and the highest priority value is output from the priority indicated by the input signal.

図13に示すのは、8レベルの優先度入力から、最も高い優先度の値を3ビットにコード化して出力するプライオリティエンコーダの例である。プライオリティエンコーダは、論理的には線形探索のハードウェアによる実装であり、多入力若しくは多段の論理和回路を必要とする。このため、優先度の入力から、最も高い優先度が出力されるまでの時間が優先度数に比例し、実用的に対応可能な優先度数は多くても十数レベルとなる。
多数の優先度への対応を必要とするため、プライオリティエンコーダでは対応が困難となる場合、従来の技術では、2分木(binary tree)によるソータが多く用いられる。
FIG. 13 shows an example of a priority encoder that encodes and outputs the highest priority value into 3 bits from eight levels of priority input. The priority encoder is logically implemented by hardware for linear search, and requires a multi-input or multi-stage OR circuit. For this reason, the time from the input of priority until the highest priority is output is proportional to the number of priorities, and the number of priorities that can be practically used is at most a dozen levels.
Since it is necessary to deal with a large number of priorities, it is difficult to deal with priority encoders. In the conventional technique, a sorter based on a binary tree is often used.

図14は、2分木によるソータのハードウェアによる実現例を示す説明図である。図14に示すように、2分木によるソータとは、2分木の最も低いレイヤ(図では最も下の階層)のノードに優先度情報を配置し、それ以外のレイヤのノードには比較器を配置する。そして、比較器は、下のレイヤから優先度情報を入力し、優先度が高い方の優先度情報を上のレイヤに出力する。結果として、最も高いレイヤのノードに配置された比較器の出力は、最も高い優先度となる。図14に示した優先度情報は、値が低い程、優先度が高いものとして記載してある。   FIG. 14 is an explanatory diagram showing an implementation example of the sorter hardware using a binary tree. As shown in FIG. 14, the sorter based on the binary tree arranges the priority information at the node of the lowest layer (the lowest hierarchy in the figure) of the binary tree, and the comparator at the nodes of the other layers. Place. Then, the comparator inputs priority information from the lower layer, and outputs priority information having a higher priority to the upper layer. As a result, the output of the comparator placed at the node of the highest layer has the highest priority. The priority information shown in FIG. 14 is described as having a higher priority as the value is lower.

2分木によるソータでは、優先度情報が入力されてから最も高い優先度情報が出力されるまでの時間は、(log2 2分木のノード数)に比例する。このため、2分木によるソータは、プライオリティエンコーダと比較して、多数の優先度に対応することが可能であり、実用的に対応可能な優先度数は数千、キューイングシステムに適用した場合の対応可能な通信速度は、数百M〜1Gbps程度となる。しかし、現在、通信速度が10G〜40Gbpsの回線が実用に供されており、更に、高速なソータが必要とされている。   In a sorter using a binary tree, the time from when priority information is input to when the highest priority information is output is proportional to (log2 number of nodes of binary tree). For this reason, the sorter based on the binary tree can cope with a large number of priorities as compared with the priority encoder, and the number of priorities that can be practically used is several thousand, when applied to a queuing system. Corresponding communication speeds are about several hundred M to 1 Gbps. However, at present, a line having a communication speed of 10 G to 40 Gbps is practically used, and a high-speed sorter is required.

アルゴリズムの高速化には、並列処理による高速化とパイプライン処理による高速化がある。並列処理による高速化とは、アルゴリズムを構成する各種の処理の内、実行順序に依存しない処理、即ち、同時に実行可能な処理を物理的に同時に実行することにより、アルゴリズムの実行時間の短縮を図る方法である。従って、アルゴリズムの並列処理化が可能か否かは、対象とするアルゴリズムに依存する。アルゴリズムを構成する処理が逐次処理、即ち、処理が実行順序に依存し、同時に実行可能な処理が存在しない場合は、並列処理化することはできない。
2分木によるソータは、優先度情報の比較を下位のレイヤから上位のレイヤに逐次実行する必要があるため、並列処理によって高速化することは論理的に不可能である。
Algorithm acceleration includes parallel processing and pipeline processing. The speeding up by parallel processing means shortening the execution time of the algorithm by physically executing simultaneously the processes that do not depend on the execution order among the various processes constituting the algorithm, that is, the processes that can be executed simultaneously. Is the method. Therefore, whether or not the algorithm can be processed in parallel depends on the target algorithm. If the processes that make up the algorithm are sequential processes, that is, the processes depend on the execution order, and there are no processes that can be executed simultaneously, parallel processing cannot be performed.
Since the sorter based on the binary tree needs to sequentially compare the priority information from the lower layer to the upper layer, it is logically impossible to increase the speed by parallel processing.

パイプライン処理による高速化とは、アルゴリズムを構成する処理を幾つかの段階に分割して、各段階の処理を独立に動作させることにより、単位時間当たりの見掛けの処理能力を向上させる方法である。パイプライン処理では、アルゴリズムの実行時間は短縮されないことに注意する必要がある。アルゴリズムのパイプライン化が可能か否かは、対象とするアルゴリズムに依存する。パイプライン処理では、分割された各段階の処理が独立に実行できる必要がある。
従って、アルゴリズムを独立に動作可能な幾つかの段階に分割できない場合、例えば、アルゴリズムの初期段階で参照される変数が、アルゴリズムの最終段階で更新されている場合等は、パイプライン化することはできない。
The speeding up by pipeline processing is a method of improving the apparent processing capacity per unit time by dividing the processing that constitutes the algorithm into several stages and operating each stage processing independently. . It should be noted that pipeline processing does not reduce algorithm execution time. Whether the algorithm can be pipelined depends on the target algorithm. In pipeline processing, it is necessary that the processing of each divided stage can be executed independently.
Therefore, if the algorithm cannot be divided into several stages that can operate independently, for example, if a variable referenced in the initial stage of the algorithm is updated in the final stage of the algorithm, it can be pipelined. Can not.

2分木によるソータは、優先度情報の比較を下位のレイヤから上位のレイヤに逐次実行する必要があるため、レイヤ単位に処理を分割して独立に動作させた場合、下位のレイヤの比較結果が上位のレイヤに伝播して、最も高い優先度情報が出力されるまでの間に、更に高い優先度情報が入力される可能性がある。即ち、この場合は、最上位のレイヤの比較器が優先度情報を識別した時点では、その優先度情報が最も高い優先度であるとは限らない。このため、2分木によるソータは、パイプライン化により処理能力の向上を図ることはできない。   Since the sorter based on the binary tree needs to sequentially compare the priority information from the lower layer to the upper layer, if the processing is divided into layers and operated independently, the comparison result of the lower layer Is propagated to a higher layer and there is a possibility that higher priority information is input until the highest priority information is output. That is, in this case, the priority information is not always the highest priority when the comparator of the highest layer identifies the priority information. For this reason, the sorter based on the binary tree cannot improve the processing capacity by pipelining.

ところで、2分木によるソータをソフトウェアで実現した場合、2分木によるソータのハードウェアによる実現例(図14参照)における比較器の代わりに、優先度が高い方の優先度情報が比較結果として配置される。このため、2分木によるソータをソフトウェアで実現した場合は、対応する優先度情報数の約2倍のメモリが必要となる問題点がある。
この間題点を解決し、対応する優先度情報数のメモリでソータを実現する方法として、非特許文献1に、ヒープによるソータが開示されている。ヒープは、2分木によるデータ構造の一種であるヒープ構造と、これに優先度情報を入出力するアルゴリズムから構成される。
By the way, when the sorter based on the binary tree is realized by software, the priority information having the higher priority is used as the comparison result instead of the comparator in the implementation example of the sorter based on the binary tree (see FIG. 14). Be placed. For this reason, when the sorter based on the binary tree is realized by software, there is a problem that a memory of about twice the number of corresponding priority information is required.
Non-Patent Document 1 discloses a sorter using a heap as a method for solving this problem and realizing a sorter with a memory having a corresponding number of priority information. The heap is composed of a heap structure which is a kind of data structure based on a binary tree and an algorithm for inputting / outputting priority information to / from the heap structure.

図15は、ヒープ構造の一例を示す説明図である。図15において、丸は優先度情報を示し、リンクは優先度情報間の上下関係を示す。優先度情報は、値が低いほど優先度が高いものとして記載してある。ある優先度情報の上の優先度情報を「親」、下の優先度情報を「子」と呼ぶ。   FIG. 15 is an explanatory diagram illustrating an example of a heap structure. In FIG. 15, circles indicate priority information, and links indicate the vertical relationship between the priority information. In the priority information, the lower the value, the higher the priority. Priority information above certain priority information is called “parent”, and lower priority information is called “child”.

図16は、ヒープ構造における優先度情報の親子関係を示す説明図である。図16に示すように、1つの優先度情報は、最大2優先度情報を子とすることができる。ヒープ構造では、優先度情報が子を持つ場合、その優先度情報は、子の優先度以上となるように優先度情報を配置する。従って、最上位の優先度情報が最も高い優先度となる。ある優先度情報が2つの子を持つ場合、子の間には優先度の大小関係は特に規定されないことに注意する必要がある。また、同じ優先度の情報が、必ずしも同じレイヤに位置するわけではないことに注意する必要がある。ヒープ構造には多数の実現方法があるが、配列で実現する場合、優先度情報はアドレスで識別される。   FIG. 16 is an explanatory diagram showing the parent-child relationship of priority information in the heap structure. As shown in FIG. 16, one priority information can have a maximum of two priority information as children. In the heap structure, when the priority information has a child, the priority information is arranged so that the priority information is equal to or higher than the priority of the child. Therefore, the highest priority information is the highest priority. When certain priority information has two children, it should be noted that the magnitude relationship of priority is not particularly defined between the children. It should also be noted that information with the same priority is not necessarily located in the same layer. There are many implementation methods for the heap structure, but when the implementation is implemented by an array, priority information is identified by an address.

図17は、配列で実現したヒープ構造の一例を示す説明図である。図17に示すように、最上位の優先度情報のアドレスを1とし、以下、上位レイヤから下位レイヤに、左側の優先度情報から右側にアドレスを順次割り当てる。その結果、配列によるヒープ構造の実現では、優先度情報は、低位アドレスから上位アドレスに向けて左詰めで配置される。図17において、アドレス1の優先度情報を最も左の優先度情報、アドレス12の優先度情報を最も右の優先度情報、アドレス13を最も左の空き情報、アドレス15を最も右の空き情報と呼ぶ。
配列によるヒープ構造に優先度情報を入力する挿入処理、ヒープ構造から最も優先度が高い優先度情報を出力する削除処理は、配列によるヒープ構造において、親の優先度情報が子の優先度以上となる関係、及び優先度情報が左詰めで配置される関係を保つように、優先度情報を再配置する。
FIG. 17 is an explanatory diagram showing an example of a heap structure realized by an array. As shown in FIG. 17, the address of the highest priority information is set to 1, and hereinafter, addresses are sequentially assigned from the upper layer to the lower layer and from the left priority information to the right. As a result, in the realization of the heap structure by the array, the priority information is arranged left justified from the lower address to the upper address. In FIG. 17, the priority information of address 1 is the leftmost priority information, priority information of address 12 is the rightmost priority information, address 13 is the leftmost free information, and address 15 is the rightmost free information. Call.
Insertion processing that inputs priority information to the heap structure by the array, and deletion processing that outputs the highest priority information from the heap structure, the priority information of the parent is higher than the priority of the child in the heap structure of the array The priority information is rearranged so as to maintain the relationship in which the priority information is arranged left-justified.

ヒープ構造に優先度情報を挿入する際のアルゴリズムは、入力する優先度情報の適切な挿入アドレスを探索することによって実現される。優先度情報を挿入する際のアルゴリズムを以下に示す。
(a)挿入位置の初期値を、最も左の空き情報とする。
(b)入力する優先度情報の優先度が、挿入位置の親の優先度以下の場合、若しくは挿入位置が最上位の優先度情報となる場合、入力する優先度情報を挿入位置に移動して停止。(c)入力する優先度情報の優先度が、挿入位置の親の優先度より高い場合、挿入位置の親の優先度情報を挿入位置へ移動し、次の挿入位置を(移動前の)親の位置とする。
(d)停止するまで(b),(c)を繰り返す。
図18は、図17に示したヒープ構造に優先度7の情報を挿入する場合のアルゴリズムの例を示す説明図であり、図19は、図18において情報を挿入した後のヒープ構造を示す説明図である。
An algorithm for inserting priority information into the heap structure is realized by searching for an appropriate insertion address of input priority information. An algorithm for inserting priority information is shown below.
(A) The initial value of the insertion position is the leftmost empty information.
(B) When the priority of the input priority information is equal to or lower than the priority of the parent of the insertion position, or when the insertion position is the highest priority information, the input priority information is moved to the insertion position. Stop. (C) When the priority of the input priority information is higher than the priority of the parent of the insertion position, the priority information of the parent of the insertion position is moved to the insertion position, and the next insertion position is changed to the parent (before movement). The position of
(D) Repeat (b) and (c) until stopped.
18 is an explanatory diagram illustrating an example of an algorithm when information of priority 7 is inserted into the heap structure illustrated in FIG. 17, and FIG. 19 is an explanatory diagram illustrating the heap structure after information is inserted in FIG. FIG.

ヒープ構造から最も優先度が高い優先度情報を削除する際のアルゴリズムは、最上位の優先度情報を削除し、最も右の優先度情報の適切な挿入アドレスを探索することによって実現される。優先度情報を削除する際のアルゴリズムを以下に示す。
(a)最上位の優先度情報を削除して出力し、その結果、ヒープ構造に記憶された優先度情報数が0となる場合、停止。
(b)最も右の優先度情報を削除して、挿入する優先度情報とする。
(c)挿入位置の初期値を、最上位の優先度情報とする。
(d)挿入する優先度情報の優先度が、挿入位置の全ての子の優先度以上の場合、若しくは挿入位置の優先度情報が子を持たない場合、挿入する優先度情報を挿入位置に移動して停止。
(e)挿入する優先度情報の優先度が、少なくとも1つの子の優先度より低い場合、(子が2つある場合は優先度が高い方の)子を挿入位置に移動し、次の挿入位置を(移動前の)子の位置とする。
(f)停止するまで(d),(e)を繰り返す。
The algorithm for deleting the highest priority information from the heap structure is realized by deleting the highest priority information and searching for an appropriate insertion address of the rightmost priority information. The algorithm for deleting priority information is shown below.
(A) The highest priority information is deleted and output. As a result, when the number of priority information stored in the heap structure becomes zero, the process is stopped.
(B) The rightmost priority information is deleted and used as priority information to be inserted.
(C) The initial value of the insertion position is the highest priority information.
(D) When the priority of the priority information to be inserted is equal to or higher than the priority of all the children at the insertion position, or when the priority information at the insertion position has no children, the priority information to be inserted is moved to the insertion position. Then stop.
(E) If the priority of the priority information to be inserted is lower than the priority of at least one child, move the child (the one with higher priority when there are two children) to the insertion position, and then insert the next The position is the child position (before movement).
(F) Repeat (d) and (e) until stopped.

図20は、図17に示したヒープ構造から最も優先度が高い情報を削除するアルゴリズムの例を示す説明図であり、図21は、図20において情報を削除した後のヒープ構造を示す説明図である。
先に述べた通り、ヒープによるソータの特徴は、必要となるメモリが2分木によるソータの場合の約半分で済むため、リソースの使用効率が高い点が上げられる。更に、ヒープ構造を配列で実現した場合、優先度情報が低位アドレスから上位アドレスに向けて左詰めで配置されるため、メモリの空き領域の管理が非常に容易となり、高速な動作が可能となる点にある。
20 is an explanatory diagram showing an example of an algorithm for deleting information having the highest priority from the heap structure shown in FIG. 17, and FIG. 21 is an explanatory diagram showing the heap structure after information is deleted in FIG. It is.
As described above, the heap sorter requires about half the memory required for the sorter based on the binary tree, which increases the use efficiency of resources. In addition, when the heap structure is realized as an array, priority information is arranged from the lower address to the upper address in a left-justified manner, so it becomes very easy to manage the free area of the memory, and high-speed operation is possible. In the point.

2分木によるソータは、その実現方法がハードウェアであれ、或いはソフトウェアであれ、2分木の優先度情報を配置するノード毎に、優先度情報が記憶されているか否かを管理する必要がある。例えば、優先度情報の記憶の値が特定の値(例えば最も高い値)の場合は、優先度情報が記憶されていないと判断したり、優先度情報の記憶を構成する特定のビットの値(例えば、最上位ビット)によって、優先度情報が記憶されていないと判断する必要が生じる。
更に、優先度情報が記憶されていないノードを高速に特定するために、優先度情報が記憶されていないノードのアドレスをFIFO(First In First Out)キュー等で管理する必要が生じる場合がある。このような処理は、多数の優先度数に対応する場合、高速化への大きな妨げとなる。
Whether a binary tree sorter is implemented in hardware or software, it is necessary to manage whether priority information is stored for each node on which binary tree priority information is placed. is there. For example, when the value stored in the priority information is a specific value (for example, the highest value), it is determined that the priority information is not stored, or the value of a specific bit constituting the storage of the priority information ( For example, it is necessary to determine that priority information is not stored by the most significant bit).
Furthermore, in order to quickly identify a node in which priority information is not stored, it may be necessary to manage the address of a node in which priority information is not stored using a FIFO (First In First Out) queue or the like. Such processing greatly hinders speeding up when dealing with a large number of priorities.

一方、ヒープ構造を配列で実現した場合は、優先度情報は左詰めで配置されるため、配列メモリの空き領域の管理は、メモリに対して空き領域の開始位置を示すポインタを設定し、ポインタ以降の領域のメモリは空きであるとすれば十分である。このため、ヒープによるソータは、メモリ等のリソースの使用効率が高い点、及びメモリの空き領域の管理が非常に容易な点から、ハードウェアによる実装に適している、
以上述べた、ヒープによるソータが、実用的に対応可能な優先度数は数千、キューイングシステムに適用した場合に対応可能な通信速度は1Gbps程度となるが、現在、通信速度が10G〜40Gbpsの回線が実用に供されており、ヒープによるソータも高速化が必要とされている。
On the other hand, when the heap structure is realized as an array, the priority information is arranged left-justified. Therefore, the management of the free area of the array memory sets the pointer indicating the start position of the free area to the memory, and the pointer It is sufficient if the memory in the subsequent areas is free. For this reason, the sorter by heap is suitable for mounting by hardware from the point that the use efficiency of resources such as memory is high and the management of the free area of the memory is very easy.
The heap sorter described above has several thousand priority levels that can be practically used, and the communication speed that can be handled when applied to a queuing system is about 1 Gbps. Currently, the communication speed is 10 G to 40 Gbps. Lines are put into practical use, and heap sorters are also required to be sped up.

しかし、以上の動作原理に基づくヒープによるソータにおいて、優先度情報を挿入するアルゴリズムと削除するアルゴリズムは、オーバラップして実行することができないため、パイプライン化により処理能力の向上を図ることは論理的に不可能である。何故ならば、優先度情報をヒープ構造に挿入する際の、上位レイヤから下位レイヤヘの優先度情報の移動は、下位のレイヤから上位のレイヤに向けて順次実行されるが、これに対して、優先度情報をヒープ構造から削除する際の、下位レイヤから上位レイヤヘの優先度情報の移動は、上位のレイヤから下位のレイヤに向けて順次実行されるためである。   However, in a sorter using a heap based on the above operating principle, the algorithm for inserting priority information and the algorithm for deleting priority information cannot be executed in an overlapping manner, so it is logical to improve processing capacity by pipelining. Is impossible. This is because when the priority information is inserted into the heap structure, the movement of the priority information from the upper layer to the lower layer is sequentially performed from the lower layer to the upper layer. This is because the movement of the priority information from the lower layer to the upper layer when the priority information is deleted from the heap structure is sequentially executed from the upper layer to the lower layer.

この間題を解決するために、ヒープによるソータのアルゴリズムを修正して、パイプライン化する方法が、特許文献1、特許文献2及び非特許文献2に開示されている。特許文献1と特許文献2は、論理的には同一の装置を異なる視点から記述したものであるため、以後、特許文献2を参照して説明する。また、非特許文献2には、特許文献2の請求項1から9と、14から17に係わる技術が開示されている。   In order to solve this problem, Patent Literature 1, Patent Literature 2, and Non-Patent Literature 2 disclose a method of correcting the heap sorter algorithm into a pipeline. Since Patent Document 1 and Patent Document 2 logically describe the same device from different viewpoints, the following description will be given with reference to Patent Document 2. Non-Patent Document 2 discloses techniques related to claims 1 to 9 and 14 to 17 of Patent Document 2.

図22は、特許文献2に記載された、ヒープによるソータから最も高い優先度情報を削除する際のアルゴリズムを示す説明図であり、図23は、図22に示したヒープ構造の削除後の状態を示す説明図である。図22に示すように、特許文献2に記載された、ヒープによるソータから最も高い優先度情報を削除する際のアルゴリズムでは、最初に最上位の優先度情報を削除して出力する。そして、削除した優先度情報の子が存在すれば、優先度が高い方の子を削除して上位レイヤに出力して移動する操作を、上位レイヤから下位レイヤに向けて繰り返す。   FIG. 22 is an explanatory diagram showing an algorithm for deleting the highest priority information from the sorter by heap described in Patent Document 2, and FIG. 23 shows a state after deletion of the heap structure shown in FIG. It is explanatory drawing which shows. As shown in FIG. 22, the algorithm for deleting the highest priority information from the heap sorter described in Patent Document 2 first deletes and outputs the highest priority information. If there is a child of the deleted priority information, the operation of deleting the child with the higher priority, outputting it to the upper layer, and moving is repeated from the upper layer to the lower layer.

図24は、特許文献2に記載された、ヒープによるソータに優先度情報を挿入する際のアルゴリズムをヒープ構造で示す説明図であり、図25は、図24に示したヒープ構造の挿入後の状態を示す説明図である。図24に示すように、特許文献2に記載された、ヒープによるソータに優先度情報を挿入する際のアルゴリズムでは、最初に入力する優先度情報を最上位の優先度情報と比較し、入力する情報の方の優先度が高ければ、入力する優先度情報を比較した情報の位置に挿入して、比較した優先度情報を下位レイヤに出力し、さもなければ、入力する優先度情報を下位レイヤに出力する。そして、以下のレイヤでは、上位レイヤで比較した優先度情報の子の一方を選択して、上位レイヤから出力された優先度情報と比較し、同様な処理を順次繰り返す。   FIG. 24 is an explanatory diagram showing an algorithm for inserting priority information in a heap sorter described in Patent Document 2 in a heap structure. FIG. 25 is a diagram after insertion of the heap structure shown in FIG. It is explanatory drawing which shows a state. As shown in FIG. 24, in the algorithm for inserting priority information into the sorter by heap described in Patent Document 2, the priority information input first is compared with the highest priority information and input. If the priority of the information is higher, the input priority information is inserted at the position of the compared information, and the compared priority information is output to the lower layer. Otherwise, the input priority information is input to the lower layer. Output to. In the following layers, one of the priority information children compared in the upper layer is selected, compared with the priority information output from the upper layer, and the same processing is sequentially repeated.

最上位レイヤ以外のレイヤにおいて、上位レイヤで比較した優先度情報の子の情報から、比較する優先度情報を選択する方法に関しては、基本的に2つの方法が示されている。1つは、ヒープ構造の各ノードに、そのノードの左の子のノードの配下に記憶された優先度情報数と、右の子のノードの配下に記憶された優先度情報数の差分を記憶し、配下に記憶された優先度情報数が少ない方の子を、比較する優先度情報として選択する方法(特許文献2の請求項10から13)である。図24のヒープ構造で示すアルゴリズムは、この方法に基づいて記載されている。
もう1つの方法は、最下位のレイヤにおいて、優先度情報が記憶されていないノードを何らかの方法で選択し、そのノードから最上位のノードに至るまでの優先度情報を、比較する優先度情報として選択する方法(特許文献2の請求項4から9参照)である。
As a method of selecting priority information to be compared from child information of priority information compared in an upper layer in layers other than the highest layer, basically two methods are shown. One is that each node of the heap structure stores a difference between the number of priority information stored under the left child node of the node and the number of priority information stored under the right child node. In this method, the child with the smaller number of priority information stored under it is selected as the priority information to be compared (claims 10 to 13 of Patent Document 2). The algorithm shown in the heap structure of FIG. 24 is described based on this method.
Another method is to select a node in which the priority information is not stored in the lowest layer by some method, and the priority information from the node to the highest node is used as the priority information to be compared. This is a selection method (see claims 4 to 9 of Patent Document 2).

以上から明らかな通り、特許文献2に記載されたヒープによるソータにおける、優先度情報の挿入処理、削除処理は、何れも最上位のレイヤから下位のレイヤに向けてレイヤ毎に順次実行されるため、レイヤ毎に処理をオーバラップさせることによるパイプライン処理によって、単位時間当たりの見かけの処理能力を向上させることが可能である。
特開平10−336215号公報 特開平10−336216号公報 特開2004−23809号公報 J.W.J Williams.“Heapsort,”CACM,Vol.7,No.6,June1964. Tuan Ha−duoug,and Serafim Soares Moreira,“The heap−sort based ATM cells spacer,”1999 2nd International Conference on ATM,ICATM’99,June 1999.
As is clear from the above, the priority information insertion processing and deletion processing in the sorter using the heap described in Patent Document 2 are executed sequentially from the highest layer to the lower layer for each layer. The apparent processing capability per unit time can be improved by pipeline processing by overlapping processing for each layer.
Japanese Patent Laid-Open No. 10-336215 Japanese Patent Laid-Open No. 10-336216 JP 2004-23809 A J. et al. W. J Williams. “Heathsort,” CACM, Vol. 7, no. 6, June 1964. Tuan Ha-douch, and Serafim Soares Moreira, “The heap-sort based ATM cells spacer,” 1999 2nd International Conference on ATM, ICATM '99, June 1999.

しかしながら、特許文献2に記載されたヒープによるソータは、非特許文献1のヒープによるソータのアルゴリズムを修正したため、優先度情報の配置が左詰めでは無くなっている。このため、特許文献2に記載されたヒープによるソータは、2分木によるソータと同様に、ヒープ構造の優先度情報を配置するノード毎に、優先度情報が記憶されているか否かを管理している。具体的には、特許文献2の段落番号0005に、優先度情報の記憶の値が特定の値(例えば、最も高い値)の場合は、優先度情報が記憶されていないと判断したり、優先度情報の記憶を構成する特定のビットの値(例えば、最上位ビット)によって、優先度情報が記憶されていないと判断する方法が開示されている。   However, since the sorter based on the heap described in Patent Document 2 has modified the sorter algorithm based on the heap described in Non-Patent Document 1, the arrangement of the priority information is not left-justified. For this reason, the sorter using a heap described in Patent Document 2 manages whether or not priority information is stored for each node on which heap structure priority information is arranged, as with a binary tree sorter. ing. Specifically, in paragraph number 0005 of Patent Document 2, if the value stored in the priority information is a specific value (for example, the highest value), it is determined that the priority information is not stored, Disclosed is a method for determining that priority information is not stored based on the value of a specific bit (for example, the most significant bit) constituting the storage of degree information.

前者の方法は、このソータがタグ付け型キューイングシステムに使用される場合に大きな問題を起こす。先に述べた通り、タグ付け型キューイングシステムは、パケットの送信タイミングをタグとしてパケットに付与する。このため、特定の値がパケットの送信タイミングとして使用できない場合は、送信タイミングの計算の方法をこれに合わせて修正する必要がある。   The former method presents a major problem when this sorter is used in a tagged queuing system. As described above, the tagging type queuing system assigns packet transmission timing to a packet as a tag. For this reason, when a specific value cannot be used as the packet transmission timing, it is necessary to modify the transmission timing calculation method accordingly.

更に、この送信タイミングは、仮想時間であれ実時間であれ、有限語長の数値で表現される。このため、特許文献3に開示されるように、このキューイングシステムの実装では、時間の経過に伴い、パケットに付与される送信タイミングの値が最大値を越えた場合、初期の値に戻る回り込み現象が発生してしまう。この間題を解決するために、送信タイミングの値の比較や各種のパラメータを、回り込みの発生に応じて修正する必要がある。この際、特定の値が送信タイミングとして使用できないと、回り込みに伴う修正処理が複雑化してしまう問題が生じる。
後者の方法は、優先度情報の1ビットを情報の有無の識別に使用するため、優先度情報が表現可能な数値の範囲が半減して、リソースの使用効率を低下させてしまう問題が生じる。
Further, the transmission timing is expressed by a numerical value having a finite word length, whether it is virtual time or real time. For this reason, as disclosed in Patent Document 3, in the implementation of this queuing system, when the value of the transmission timing given to the packet exceeds the maximum value as time elapses, the wraparound returns to the initial value. The phenomenon will occur. In order to solve this problem, it is necessary to compare the values of transmission timings and modify various parameters according to the occurrence of wraparound. At this time, if a specific value cannot be used as the transmission timing, there arises a problem that the correction processing accompanying the wraparound becomes complicated.
In the latter method, since one bit of priority information is used for identifying the presence / absence of information, there is a problem that the range of numerical values that can be expressed by priority information is halved and resource use efficiency is lowered.

また、特許文献2に記載されたヒープによるソータの挿入処理において、上位レイヤで比較した優先度情報の子の情報から、比較する優先度情報を選択する方法として、請求項10から13に記載した、ヒープ構造の各ノードに、そのノードの左の子のノードの配下に記憶された優先度情報数と、右の子のノードの配下に記憶された優先度情報数の差分を記憶する方法を用いるのは、非現実的である。
この場合、ヒープ構造の最上位以外の各ノードに、記憶した情報数の差分を計数するカウンタを設ける必要があり、ヒープ構造を数千優先度に対応させると、実装に必要なリソース量が莫大なものになってしまう。
Further, in the insertion processing of the sorter by heap described in Patent Document 2, the priority information to be compared is selected from the child information of the priority information compared in the upper layer. A method of storing, in each node of the heap structure, the difference between the number of priority information stored under the left child node of the node and the number of priority information stored under the right child node It is unrealistic to use.
In this case, it is necessary to provide a counter that counts the difference in the number of stored information at each node other than the top level of the heap structure. If the heap structure is made to support thousands of priorities, the amount of resources required for implementation is enormous. It will become something.

また、特許文献2の請求項4から9に記載した、最下位のレイヤにおいて、優先度情報が記憶されていないノードをFIFOキュー等を用いて選択する方法は、実装に要するリソースを増大させ、高速化への大きな妨げになってしまう。更に、この方法では、特許文献2の請求項5に記載の通り、最下位の優先度情報が記憶されていないノードを挿入処理のために選択した場合、そのノードはその挿入処理が終了するまでは再度選択されてはならない。何故ならば、同一のノードを短時間に立て続けに選択した場合、優先度情報の下位レイヤヘの移動がオーバフローする可能性があるからである。
このため、特許文献2の請求項5に記載の通り、優先度情報が記憶されていないノードは、挿入処理のため選択されているノードとそれ以外のノードに分別して管理しなければならず、更に、実装が複雑化してしまうことが避けられない。
In addition, the method of selecting a node in which priority information is not stored in the lowest layer using a FIFO queue or the like described in claims 4 to 9 of Patent Document 2 increases resources required for implementation, It will be a big hindrance to speedup. Furthermore, in this method, as described in claim 5 of Patent Document 2, when a node for which the lowest priority information is not stored is selected for insertion processing, the node continues until the insertion processing ends. Must not be selected again. This is because if the same node is selected in a short time, the movement of the priority information to the lower layer may overflow.
For this reason, as described in claim 5 of Patent Document 2, nodes for which priority information is not stored must be managed separately from the node selected for insertion processing and the other nodes. Furthermore, the implementation is inevitably complicated.

また、先に述べた通り、パイプライン処理は見かけの処理能力を向上させるが、アルゴリズムの実行時間は短縮されない。このため、最下位の優先度情報が記憶されていないノードを挿入処理のために選択した場合、挿入処理が終了するまでの相当の時間、例えば、ヒープ構造を4095優先度に対応させた場合、12レイヤの処理が全て終了するまでは、そのノードを新たな挿入処理のために選択することができない。
このため、特許文献2の段落番号0064に記載されている通り、ヒープ構造に記憶された優先度情報がほぼ満杯に近い状態では、挿入処理が実行できない場合が生じ、ヒープ構造が完全には使用できないという問題が生じる。
Further, as described above, pipeline processing improves the apparent processing capability, but does not reduce the algorithm execution time. For this reason, if a node for which the lowest priority information is not stored is selected for insertion processing, a considerable amount of time until the insertion processing ends, for example, if the heap structure is associated with 4095 priority, The node cannot be selected for a new insertion process until all 12 layers have been processed.
For this reason, as described in paragraph No. 0064 of Patent Document 2, when the priority information stored in the heap structure is almost full, insertion processing may not be performed, and the heap structure is completely used. The problem that it is not possible arises.

以上から明らかな通り、特許文献2に記載されたヒープによるソータは、パイプライン化を実現するために、非特許文献1に記載されたヒープによるソータのアルゴリズムを修正している。その結果、メモリの空き領域の管理が非常に容易であるという、非特許文献1に記載されたヒープによるソータの大きな特徴が失われ、実現に際して多くのリソースと複雑な処理を必要とすることになり、高速化への大きな妨げになってしまうという問題点がある。   As is clear from the above, the sorter using a heap described in Patent Document 2 corrects the algorithm of the sorter using heap described in Non-Patent Document 1 in order to realize pipelining. As a result, the large feature of the sorter by the heap described in Non-Patent Document 1 that the management of the free area of the memory is very easy is lost, and many resources and complicated processing are required for the realization. Therefore, there is a problem that it becomes a great obstacle to speeding up.

この発明の目的は、非特許文献1に記載された、ヒープによるソータのアルゴリズムを並列化するために必要な2分木構造の情報を記憶する装置を実現し、更に、非特許文献1に記載されたヒープによるソータにおける、メモリ等のリソースの使用効率が高い特徴や、メモリの空き領域の管理が非常に容易な特徴をそのまま生かした並列処理アルゴリズムによって、ヒープによるソータの実行時間を短縮し、少ないリソースで多数の優先度に対応し、且つ、高速なヒープ構造の情報を記憶することができる、2分木構造の情報を記憶する装置及びヒープ構造の情報を記憶する装置を提供することである。   An object of the present invention is to realize an apparatus for storing information of a binary tree structure necessary for parallelizing a sorter algorithm using a heap described in Non-Patent Document 1, and further described in Non-Patent Document 1. With the parallel processing algorithm that takes advantage of the features that the use efficiency of resources such as memory in the sorter based on the heap and the management of the free space of the memory are very easy, the sorter execution time by the heap is shortened. By providing an apparatus for storing binary tree structure information and an apparatus for storing heap structure information that can store a large number of priorities with a small number of resources and that can store high-speed heap structure information. is there.

上記目的を達成するため、この発明に係る2分木構造の情報を記憶する装置は、N個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ0からレイヤN−1とする場合、レイヤ0に対応するメモリ装置は、単一の情報を記憶し、(1≦i≦N−1)となるレイヤiに対応するメモリ装置は、各々iビットのアドレスで情報を識別し、小数点以下を切り捨てた整数値を商とする除算演算子を「/」として、レイヤ1に対応するメモリ装置のアドレス0若しくはアドレス1で識別される情報を第1の情報とし、レイヤ0に対応するメモリ装置の情報を第2の情報とする場合、該第2の情報は該第1の情報の親に、該第1の情報は該第2の情報の子になる第1の関係と、(2≦j≦N−1)となるレイヤjに対応するメモリ装置のアドレスAで識別される情報を第3の情報とし、レイヤj−1に対応するメモリ装置のアドレスA/2で識別される情報を第4の情報とする場合、該第4の情報は該第3の情報の親に、該第3の情報は該第4の情報の子になる第2の関係に基づいて、2分木構造の情報における親子の対応関係が識別される分散メモリ手段と、(1≦L≦N−1)となるレイヤLに対応する該分散メモリ手段のメモリ装置のアドレスにBが入力された場合、(1≦k≦L−1)となるレイヤkに対応する該分散メモリ手段のメモリ装置のアドレスに、各々、B/2(L−k)を入力することによって、レイヤLに対応する該分散メモリ手段のメモリ装置のアドレスBの情報から、レイヤ1に対応する該分散メモリ手段のメモリ装置のアドレスB/2(L−1)に至るまでの親子の対応関係にある情報を、同時に選択するアドレス入力手段とを備えて構成したことを特徴としている。 In order to achieve the above object, an apparatus for storing information of a binary tree structure according to the present invention is composed of N memory devices, and the layers corresponding to each of the memory devices are layer 0 to layer N-1. The memory device corresponding to layer 0 stores a single piece of information, and the memory device corresponding to layer i where (1 ≦ i ≦ N−1) identifies the information with an i-bit address, A division operator whose quotient is an integer value rounded down to the nearest decimal point is “/”, the information identified by address 0 or address 1 of the memory device corresponding to layer 1 is the first information, and the layer 0 corresponds When the memory device information is the second information, the second information is a parent of the first information, the first information is a child of the second information, and ( Memory device corresponding to layer j satisfying 2 ≦ j ≦ N−1) When the information identified by the address A is the third information and the information identified by the address A / 2 of the memory device corresponding to the layer j−1 is the fourth information, the fourth information is Distributed memory means for identifying a correspondence relationship between a parent and a child in information of a binary tree structure based on a second relationship in which the third information is a child of the fourth information; , (B) is input to the address of the memory device of the distributed memory means corresponding to the layer L satisfying (1 ≦ L ≦ N−1), corresponding to the layer k satisfying (1 ≦ k ≦ L−1). Corresponding to layer 1 from the information of address B of the memory device of the distributed memory unit corresponding to layer L by inputting B / 2 (Lk) to the address of the memory device of the distributed memory unit, respectively. Address B / 2 of the memory device of the distributed memory means (L− It is characterized in that it comprises address input means for simultaneously selecting information in the parent-child correspondence relationship up to 1) .

また、この発明に係るヒープ構造の情報を記憶する装置は、請求項3又は4に記載の2分木構造の情報を記憶する装置に記憶される情報がヒープ構造であるヒープ構造の情報を記憶する装置であって、前記分散メモリ手段から情報を出力する際に、レイヤ0に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1の状態である場合、該レイヤ0に対応する前記分散メモリ手段のメモリ装置に記憶された情報を削除して出力し、その結果、レイヤ0からレイヤN−1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が全て0の状態となる場合、前記分散メモリ手段からの情報の出力を終了し、(1≦S≦N−1)となるレイヤSに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1以上の状態となる場合であって、且つ、レイヤS+1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が0の状態となる、若しくはレイヤSがレイヤN−1となる場合、該レイヤSに対応する前記分散メモリ手段のメモリ装置に記憶された情報数の値をCとすると、該レイヤSに対応する前記分散メモリ手段のメモリ装置のアドレスC−1の情報を削除して、挿入する情報とする情報出力手段と、該情報出力手段による情報の削除の結果、(1≦T≦N−1)となるレイヤTに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1以上の状態となる場合であって、且つ、レイヤT+1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が0の状態となる、若しくはレイヤTがレイヤN−1となる場合、該レイヤTに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が、前記アドレス生成手段が生成したレイヤTに対応するアドレスの値より大きければ、前記アドレス生成手段が生成したレイヤTに対応するアドレスを、該レイヤTに対応する前記分散メモリ手段のメモリ装置のアドレスに入力し、さもなければ、前記アドレス生成手段が生成したレイヤT−1に対応するアドレスを、レイヤT−1に対応する前記分散メモリ手段のメモリ装置のアドレスに入力して、前記アドレス入力手段により、レイヤ1からレイヤT若しくはレイヤT−1に対応する前記分散メモリ手段のメモリ装置の情報を同時に選択する第1の比較情報選択手段と、該第1の比較情報選択手段によって情報が選択された場合は、前記分散メモリ手段のメモリ装置から選択された全ての情報を読み出して、挿入する情報と各々比較し、読み出した情報より、該挿入する情報の優先度が高ければ高優先、さもなければ低優先、或いは読み出した情報より、該挿入する情報の優先度が高いか等しければ高優先、さもなければ低優先とし、比較の結果、レイヤUから読み出した情報より、該挿入する情報が低優先となる場合であって、且つ、レイヤU+1から読み出した情報より、該挿入する情報が高優先となる、若しくはレイヤU+1に対応する前記分散メモリ手段のメモリ装置の情報が選択されていない、若しくはレイヤUがレイヤN−1となる場合、レイヤ1から読み出した情報を、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に書き込み、(U≧2)の場合はレイヤ2からレイヤUまでのレイヤから読み出した情報を、該第1の比較情報選択手段によって選択されたレイヤ1からレイヤU−1に対応する前記分散メモリ手段のメモリ装置の情報に各々書き込み、且つ、該第1の比較情報選択手段によって選択されたレイヤUに対応する前記分散メモリ手段のメモリ装置の情報に、該挿入する情報を書き込み、比較の結果、レイヤ1から読み出した情報より、該挿入する情報が高優先となる場合、若しくは該第1の比較情報選択手段によって情報が選択されなかった場合は、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に、該挿入する情報を書き込む第1の情報移動手段とを備えて構成したことを特徴としている。   An apparatus for storing heap structure information according to the present invention stores heap structure information in which the information stored in the binary tree structure information according to claim 3 or 4 is a heap structure. When the number of pieces of information stored in the memory device of the distributed memory unit corresponding to layer 0 is 1 when outputting information from the distributed memory unit, the device corresponds to layer 0. The information stored in the memory device of the distributed memory means is deleted and output, and as a result, the number of information stored in the memory device of the distributed memory means corresponding to layer 0 to layer N-1 is all zero The output of information from the distributed memory means is terminated, and the number of information stored in the memory device of the distributed memory means corresponding to the layer S satisfying (1 ≦ S ≦ N−1) is one or more. State If the number of pieces of information stored in the memory device of the distributed memory unit corresponding to the layer S + 1 is 0 or the layer S is the layer N-1, the layer S corresponds to the layer S. If the value of the number of information stored in the memory device of the distributed memory means is C, the information at the address C-1 of the memory device of the distributed memory means corresponding to the layer S is deleted and inserted as information. Information output means and the number of information stored in the memory device of the distributed memory means corresponding to the layer T satisfying (1 ≦ T ≦ N−1) as a result of deletion of information by the information output means is 1 or more And the number of pieces of information stored in the memory device of the distributed memory means corresponding to layer T + 1 is 0, or the layer T is layer N-1, the layer T versus If the number of information stored in the memory device of the distributed memory means is larger than the value of the address corresponding to the layer T generated by the address generating means, the address corresponding to the layer T generated by the address generating means is Input to the address of the memory device of the distributed memory means corresponding to the layer T; otherwise, the address corresponding to the layer T-1 generated by the address generating means is set to the distributed memory corresponding to the layer T-1 First comparison information selecting means for inputting the address of the memory device of the means, and simultaneously selecting the information of the memory device of the distributed memory means corresponding to layer T to layer T or layer T-1 by the address input means And when the information is selected by the first comparison information selecting means, the information is selected from the memory device of the distributed memory means. All the read information is read and compared with the information to be inserted. If the priority of the information to be inserted is higher than the read information, the priority is higher, otherwise the priority is lower, or the information is inserted from the read information. If the priority of the information is equal or higher, the priority is higher, otherwise the priority is lower. As a result of the comparison, the information to be inserted has lower priority than the information read from the layer U. If the information to be inserted has higher priority than the read information, or the memory device information of the distributed memory means corresponding to the layer U + 1 is not selected, or the layer U is the layer N-1, the layer 1 The information read out from the memory device of the distributed memory means corresponding to layer 0 is written, and if (U ≧ 2), the layer from layer 2 to layer U The read information is written in the memory device information of the distributed memory unit corresponding to the layer U-1 from the layer 1 selected by the first comparison information selection unit, and the first comparison information selection unit When the information to be inserted is written in the information of the memory device of the distributed memory unit corresponding to the layer U selected by the above-described information, and the information to be inserted has higher priority than the information read from the layer 1 as a result of comparison, Alternatively, when information is not selected by the first comparison information selection unit, the first information movement unit writes the information to be inserted into the information of the memory device of the distributed memory unit corresponding to the layer 0. It is characterized by being configured.

この発明によれば、同時に実行可能な処理を物理的に同時に実行する並列処理によって、ヒープによるソータを実現しているため、実行時間が大幅に短縮され、高速化が実現されている。更に、非特許文献1に記載されたヒープによるソータと同様に、メモリ等のリソースの使用効率が高い特徴や、メモリの空き領域の管理が非常に容易な特徴を有する。この結果、非特許文献1に記載された、ヒープによるソータのアルゴリズムを並列化するために必要な2分木構造の情報を記憶する装置を実現し、更に、非特許文献1に記載されたヒープによるソータにおける、メモリ等のリソースの使用効率が高い特徴や、メモリの空き領域の管理が非常に容易な特徴をそのまま生かした並列処理アルゴリズムによって、ヒープによるソータの実行時間を短縮し、少ないリソースで多数の優先度に対応し、且つ、高速なヒープ構造の情報を記憶することができる。   According to the present invention, since the sorter by heap is realized by parallel processing that physically executes simultaneously executable processes, the execution time is greatly shortened and the speed is increased. Further, like the sorter using a heap described in Non-Patent Document 1, it has a feature that the use efficiency of resources such as a memory is high and a management of a free area of the memory is very easy. As a result, a device for storing the binary tree structure information necessary for parallelizing the sorter algorithm based on the heap described in Non-Patent Document 1 is realized. Further, the heap described in Non-Patent Document 1 is realized. By using a parallel processing algorithm that takes advantage of the high efficiency of using resources such as memory and the ability to manage free memory space very easily, the sorter execution time by heap can be shortened with less resources. It is possible to store information of a high-speed heap structure corresponding to a large number of priorities.

以下、この発明を実施するための最良の形態について図面を参照して説明する。
この発明の一実施の形態に係る2分木構造の情報を記憶する装置は、N個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ0からレイヤN−1とする場合、レイヤ0に対応するメモリ装置は、単一の情報を記憶し、(1≦i≦N−1)となるレイヤiに対応するメモリ装置は、各々iビットのアドレスで情報を識別し、小数点以下を切り捨てた整数値を商とする除算演算子を「/」として、レイヤ1に対応するメモリ装置のアドレス0若しくはアドレス1で識別される情報を第1の情報とし、レイヤ0に対応するメモリ装置の情報を第2の情報とする場合、該第2の情報は該第1の情報の親に、該第1の情報は該第2の情報の子になる第1の関係と、(2≦j≦N−1)となるレイヤjに対応するメモリ装置のアドレスAで識別される情報を第3の情報とし、レイヤj−1に対応するメモリ装置のアドレスA/2で識別される情報を第4の情報とする場合、該第4の情報は該第3の情報の親に、該第3の情報は該第4の情報の子になる第2の関係に基づいて、2分木構造の情報における親子の対応関係が識別される分散メモリ手段と、(1≦L≦N−1)となるレイヤLに対応する該分散メモリ手段のメモリ装置のアドレスにBが入力された場合、(1≦k≦L−1)となるレイヤkに対応する該分散メモリ手段のメモリ装置のアドレスに、各々、B/2(L−k)を入力することによって、レイヤLに対応する該分散メモリ手段のメモリ装置のアドレスBの情報から、レイヤ1に対応する該分散メモリ手段のメモリ装置のアドレスB/2(L−1)に至るまでの親子の対応関係にある情報を、同時に選択するアドレス入力手段とを備えて構成したことを特徴とする。
The best mode for carrying out the present invention will be described below with reference to the drawings.
An apparatus for storing information of a binary tree structure according to an embodiment of the present invention includes N memory devices, and when the memory devices respectively correspond to layers 0 to N-1, The memory device corresponding to layer 0 stores a single piece of information, and the memory device corresponding to layer i satisfying (1 ≦ i ≦ N−1) identifies information by an i-bit address, Is a division operator whose quotient is the integer value obtained by truncating, “0”, the address 0 of the memory device corresponding to layer 1 or the information identified by address 1 is the first information, and the memory device corresponding to layer 0 The second information is the parent of the first information, the first information is a child of the second information, and (2 ≦ address of the memory device corresponding to layer j where j ≦ N−1) When the information identified by A is the third information and the information identified by the address A / 2 of the memory device corresponding to the layer j−1 is the fourth information, the fourth information is the third information. Distributed memory means for identifying the correspondence relationship between the parent and the child in the binary tree structure information based on the second relationship in which the third information is a child of the fourth information; When B is input to the address of the memory device of the distributed memory means corresponding to the layer L satisfying 1 ≦ L ≦ N−1), the distribution corresponding to the layer k satisfying (1 ≦ k ≦ L−1) By inputting B / 2 (L−k) to the addresses of the memory devices of the memory means, the information corresponding to the layer 1 is obtained from the information of the addresses B of the memory devices of the distributed memory means corresponding to the layer L. It reaches the address B / 2 (L-1) of the memory device of the distributed memory means. The present invention is characterized by comprising address input means for simultaneously selecting information in the parent-child correspondence relationship.

また、この発明の一実施の形態に係るヒープ構造の情報を記憶する装置は、2分木構造の情報を記憶する装置に記憶される情報がヒープ構造であるヒープ構造の情報を記憶する装置であって、前記分散メモリ手段から情報を出力する際に、レイヤ0に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1の状態である場合、該レイヤ0に対応する前記分散メモリ手段のメモリ装置に記憶された情報を削除して出力し、その結果、レイヤ0からレイヤN−1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が全て0の状態となる場合、前記分散メモリ手段からの情報の出力を終了し、(1≦S≦N−1)となるレイヤSに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1以上の状態となる場合であって、且つ、レイヤS+1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が0の状態となる、若しくはレイヤSがレイヤN−1となる場合、該レイヤSに対応する前記分散メモリ手段のメモリ装置に記憶された情報数の値をCとすると、該レイヤSに対応する前記分散メモリ手段のメモリ装置のアドレスC−1の情報を削除して、挿入する情報とする情報出力手段と、該情報出力手段による情報の削除の結果、(1≦T≦N−1)となるレイヤTに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1以上の状態となる場合であって、且つ、レイヤT+1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が0の状態となる、若しくはレイヤTがレイヤN−1となる場合、該レイヤTに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が、前記アドレス生成手段が生成したレイヤTに対応するアドレスの値より大きければ、前記アドレス生成手段が生成したレイヤTに対応するアドレスを、該レイヤTに対応する前記分散メモリ手段のメモリ装置のアドレスに入力し、さもなければ、前記アドレス生成手段が生成したレイヤT−1に対応するアドレスを、レイヤT−1に対応する前記分散メモリ手段のメモリ装置のアドレスに入力して、前記アドレス入力手段により、レイヤ1からレイヤT若しくはレイヤT−1に対応する前記分散メモリ手段のメモリ装置の情報を同時に選択する第1の比較情報選択手段と、該第1の比較情報選択手段によって情報が選択された場合は、前記分散メモリ手段のメモリ装置から選択された全ての情報を読み出して、挿入する情報と各々比較し、読み出した情報より、該挿入する情報の優先度が高ければ高優先、さもなければ低優先、或いは読み出した情報より、該挿入する情報の優先度が高いか等しければ高優先、さもなければ低優先とし、比較の結果、レイヤUから読み出した情報より、該挿入する情報が低優先となる場合であって、且つ、レイヤU+1から読み出した情報より、該挿入する情報が高優先となる、若しくはレイヤU+1に対応する前記分散メモリ手段のメモリ装置の情報が選択されていない、若しくはレイヤUがレイヤN−1となる場合、レイヤ1から読み出した情報を、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に書き込み、(U≧2)の場合はレイヤ2からレイヤUまでのレイヤから読み出した情報を、該第1の比較情報選択手段によって選択されたレイヤ1からレイヤU−1に対応する前記分散メモリ手段のメモリ装置の情報に各々書き込み、且つ、該第1の比較情報選択手段によって選択されたレイヤUに対応する前記分散メモリ手段のメモリ装置の情報に、該挿入する情報を書き込み、比較の結果、レイヤ1から読み出した情報より、該挿入する情報が高優先となる場合、若しくは該第1の比較情報選択手段によって情報が選択されなかった場合は、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に、該挿入する情報を書き込む第1の情報移動手段とを備えて構成したことを特徴とする。   An apparatus for storing heap structure information according to an embodiment of the present invention is an apparatus for storing heap structure information in which information stored in the apparatus for storing binary tree structure information is a heap structure. When the number of pieces of information stored in the memory device of the distributed memory means corresponding to layer 0 is 1 when outputting information from the distributed memory means, the distributed memory corresponding to layer 0 When the information stored in the memory device of the means is deleted and output, and as a result, the number of information stored in the memory device of the distributed memory means corresponding to the layer 0 to the layer N-1 is all zero The output of information from the distributed memory means is terminated, and the number of information stored in the memory device of the distributed memory means corresponding to the layer S satisfying (1 ≦ S ≦ N−1) becomes one or more. In case When the number of pieces of information stored in the memory device of the distributed memory unit corresponding to the layer S + 1 is 0, or the layer S is the layer N-1, the distributed memory corresponding to the layer S If the value of the number of information stored in the memory device of the means is C, the information output means for deleting the information of the address C-1 of the memory device of the distributed memory means corresponding to the layer S and making it information to be inserted And the number of pieces of information stored in the memory device of the distributed memory unit corresponding to the layer T satisfying (1 ≦ T ≦ N−1) is 1 or more as a result of deletion of information by the information output unit And when the number of pieces of information stored in the memory device of the distributed memory unit corresponding to the layer T + 1 is 0, or when the layer T is the layer N−1, the information corresponding to the layer T If the number of pieces of information stored in the memory device of the distributed memory means is larger than the value of the address corresponding to the layer T generated by the address generating means, the address corresponding to the layer T generated by the address generating means is Input to the address of the memory device of the distributed memory means corresponding to T, otherwise the address corresponding to the layer T-1 generated by the address generating means is the address of the distributed memory means corresponding to the layer T-1. First comparison information selection means for inputting the address of the memory device and simultaneously selecting information of the memory device of the distributed memory means corresponding to layer T to layer T or layer T-1 by the address input means; When the information is selected by the first comparison information selection means, all the information selected from the memory device of the distributed memory means If the priority of the information to be inserted is higher than the read information, the priority is lower. Otherwise, the priority of the information to be inserted is higher than the read information. If the degree is high or equal, high priority is given, otherwise low priority is given, and as a result of comparison, the information to be inserted has lower priority than information read from layer U, and information read from layer U + 1 If the information to be inserted has high priority, or the information of the memory device of the distributed memory means corresponding to layer U + 1 is not selected, or layer U is layer N-1, read from layer 1 Information is written in the information of the memory device of the distributed memory means corresponding to layer 0. When (U ≧ 2), the information is read from layers 2 to U Information is written in the memory device information of the distributed memory unit corresponding to layer U-1 from layer 1 selected by the first comparison information selection unit, and by the first comparison information selection unit When the information to be inserted is written in the information of the memory device of the distributed memory means corresponding to the selected layer U and the information to be inserted has higher priority than the information read from layer 1 as a result of comparison, or When information is not selected by the first comparison information selection unit, the first comparison information selection unit includes a first information moving unit that writes the information to be inserted into the information of the memory device of the distributed memory unit corresponding to the layer 0. It is characterized by comprising.

本発明による、ヒープによるソータに優先度情報を挿入する際の並列化されたアルゴリズムの概略を、以下に説明する。
図1は、本発明による、ヒープによるソータに優先度情報を挿入する際の並列化されたアルゴリズムの概要を示し、(a)は、挿入位置の決定の説明図、(b)は、挿入位置への移動の説明図である。図1は、図19に示したヒープ構造に優先度7の情報を挿入する場合の例である。
An outline of a parallelized algorithm when inserting priority information into a sorter by heap according to the present invention will be described below.
FIG. 1 shows an outline of a parallelized algorithm when priority information is inserted into a sorter by heap according to the present invention, (a) is an explanatory diagram for determining an insertion position, and (b) is an insertion position. It is explanatory drawing of the movement to. FIG. 1 shows an example in which information of priority 7 is inserted into the heap structure shown in FIG.

図1(a)に示すように、本発明では、優先度情報を挿入する際に、先ず、最も左の空き情報から最上位の優先度情報に至るまでの親子の関係にある情報を選択し、最も左の空き情報を除く各レイヤの選択された優先度情報と入力する情報を同時に比較して、挿入位置を決定する。次に、図1(b)に示すように、挿入位置以下の選択された優先度情報を、各々下のレイヤに移動し、入力する情報を挿入位置に移動する。   As shown in FIG. 1A, in the present invention, when priority information is inserted, first, information having a parent-child relationship from the leftmost empty information to the highest priority information is selected. The insertion priority is determined by simultaneously comparing the selected priority information of each layer excluding the leftmost empty information and the input information. Next, as shown in FIG. 1B, the selected priority information below the insertion position is moved to the lower layer, and the input information is moved to the insertion position.

図2は、本発明による、ヒープによるソータから最も高い優先度を削除する際の並列化されたアルゴリズムの概略を示し、(a)は、挿入位置の決定の説明図、(b)は、挿入位置への移動の説明図である。図2は、図19に示したヒープ構造から最も優先度が高い情報を削除する場合の例である。
図2(a)に示すように、本発明では、最上位の優先度情報を削除して出力する。削除の結果、ヒープ構造に記憶された優先度情報数が0となる場合、削除処理を終了し、それ以外の場合は、最も右の優先度情報を削除して、挿入する優先度情報に移動する。また、最上位のレイヤの次のレイヤから下位レイヤに向けて優先度情報を選択し、挿入する優先度情報と同時に比較して、挿入位置を決定する。
FIG. 2 shows an outline of a parallelized algorithm for removing the highest priority from a sorter by heap according to the present invention, (a) is an explanatory diagram of determination of an insertion position, and (b) is an insertion It is explanatory drawing of the movement to a position. FIG. 2 shows an example in which information having the highest priority is deleted from the heap structure shown in FIG.
As shown in FIG. 2A, in the present invention, the highest priority information is deleted and output. If the number of priority information stored in the heap structure becomes 0 as a result of the deletion, the deletion process is terminated. Otherwise, the rightmost priority information is deleted and moved to the priority information to be inserted. To do. In addition, priority information is selected from the layer next to the highest layer toward the lower layer, and compared with the priority information to be inserted, the insertion position is determined.

次に、図2(b)に示すように、挿入位置以上の選択された優先度情報を、各々上のレイヤに移動し、挿入する情報を挿入位置に移動する。挿入する優先度情報と比較される優先度情報の具体的な選択方法は、最上位の次のレイヤでは、優先度情報が2つ存在する場合、優先度の高い方を選択し(優先度が同一の場合は任意に選択する)、優先度情報が1つ存在する場合、その優先度情報を選択し、優先度情報が存在しない場合、選択を終了する。そして、それ以下のレイヤでは、上のレイヤで選択された優先度情報を親とする優先度情報が2つ存在する場合、優先度の高い方を(優先度が同一の場合は任意に)選択し、1つ存在する場合、その優先度情報を選択し、存在しない場合、選択を終了する。   Next, as shown in FIG. 2B, the selected priority information above the insertion position is moved to the upper layer, and the information to be inserted is moved to the insertion position. The specific method of selecting the priority information to be compared with the priority information to be inserted is to select the one with the higher priority when there are two pieces of priority information in the next highest layer (the priority is If the priority information is present, the priority information is selected. If the priority information is not present, the selection is terminated. And in the layers below that, if there is two priority information with the priority information selected in the upper layer as a parent, select the higher priority (optional if the priority is the same) And when one exists, the priority information is selected, and when it does not exist, the selection is terminated.

以上の作用から明らかな通り、非特許文献1に記載されたヒープによるソータのアルゴリズムが逐次処理となっているのに対して、本発明は、同時に実行可能な処理を物理的に同時に実行する並列処理によって、ヒープによるソータを実現しているため、実行時間が大幅に短縮され、高速化が実現されている。更に、特許文献1、特許文献2、非特許文献2に記載されたパイプライン処理に基づくヒープによるソータが、メモリの空き領域の管理のため、多くのリソースと複雑な処理とを必要とするのに対して、本発明は、非特許文献1に記載されたヒープによるソータと同様に、メモリ等のリソースの使用効率が高い特徴や、メモリの空き領域の管理が非常に容易な特徴を有するため、少ないリソースで、多数の優先度に対応し、且つ、高速なヒープ構造の情報を記憶する装置を提供できる点が、最も異なる。   As apparent from the above operation, the sorter algorithm based on the heap described in Non-Patent Document 1 is a sequential process, whereas the present invention is a parallel process that physically executes simultaneously executable processes. Since the processing implements a sorter using a heap, the execution time is greatly shortened and the speed is increased. Furthermore, the sorter using a heap based on pipeline processing described in Patent Literature 1, Patent Literature 2, and Non-Patent Literature 2 requires a lot of resources and complicated processing for managing the free area of the memory. On the other hand, the present invention, like the sorter using a heap described in Non-Patent Document 1, has features such as high use efficiency of resources such as memory and very easy management of free areas of memory. The most different point is that it is possible to provide a device that can store a high-speed heap structure information with a small number of resources, corresponding to a large number of priorities.

図3は、本発明に係る2分木構造の情報を記憶する装置のデータ構造の例を示す説明図である。図3における、本発明に係る2分木構造の情報を記憶する装置のデータ構造は、2分木構造の情報を記憶する装置が4レイヤで構成される例(請求項1及び請求項3に記載した装置に相当)を示し、最上位のレイヤをレイヤ0とし、以下、順次、レイヤ1,レイヤ2とし、最下位のレイヤをレイヤ3としている。   FIG. 3 is an explanatory diagram showing an example of the data structure of the apparatus for storing the binary tree structure information according to the present invention. The data structure of the apparatus for storing binary tree structure information according to the present invention in FIG. 3 is an example in which the apparatus for storing binary tree structure information is composed of four layers (claims 1 and 3). The uppermost layer is designated as layer 0, the layers 1 and 2 are designated in this order, and the lowest layer is designated as layer 3.

図3に示すように、各レイヤは、情報を記憶するメモリ装置を有し、レイヤiは2i個の情報を記憶する。情報を記憶するメモリのアドレスは、レイヤ内で最も左の情報を識別するアドレスを0とし、以下、順次、割り当てる。最上位のレイヤのメモリ装置に記憶される情報数は最大1であるため、アドレス入力を有さないメモリ装置で実現しても、アドレス入力の値が0のみとなるメモリ装置で実現しても、論理的には等価であり、本発明の請求項はこれら双方の場合を包含していることは自明である。分散メモリ手段は、これらのメモリ装置によって構成される。   As shown in FIG. 3, each layer has a memory device that stores information, and layer i stores 2i pieces of information. The address of the memory for storing information is set to 0 for identifying the leftmost information in the layer, and is sequentially assigned below. Since the maximum number of pieces of information stored in the memory device of the highest layer is 1, it can be realized by a memory device that does not have an address input or by a memory device in which the address input value is only 0. It is self-evident that it is logically equivalent and the claims of the present invention include both cases. The distributed memory means is constituted by these memory devices.

この分散メモリ手段は、2分木構造の情報を記憶する、あるレイヤのメモリ装置のアドレスAに記憶された情報に対して、その上のレイヤが存在する場合、その上のレイヤのメモリ装置のアドレスA/2に親の情報が記憶される。従って、aを偶数とするアドレスa及びa+1に記憶された情報の親は同一の情報となり、これらの情報はその親の情報の子となる。   The distributed memory means stores the binary tree structure information. When there is a layer above the information stored in the address A of the memory device of a certain layer, the distributed memory means stores the information of the memory device of the upper layer. Parent information is stored at address A / 2. Therefore, the parents of the information stored at addresses a and a + 1, where a is an even number, are the same information, and these information are children of the information of the parent.

また、図3に示すように、最上位以外の各レイヤは、比較結果を記憶するメモリ装置を有しても良く、レイヤmは、2m−1個の比較結果を記憶する。レイヤ1のメモリ装置に記憶される比較結果数は最大1であるため、アドレス入力を有さないメモリ装置で実現しても、アドレス入力の値が0のみとなるメモリ装置で実現しても、論理的には等価であり、本発明の請求項は、これら双方の場合を包含していることは自明である。比較結果メモリ手段は、これらのメモリ装置によって構成される。 As shown in FIG. 3, each layer other than the top layer may have a memory device that stores the comparison results, and the layer m stores 2 m−1 comparison results. Since the maximum number of comparison results stored in the memory device of layer 1 is 1, even if it is realized by a memory device having no address input or by a memory device in which the value of the address input is only 0, It is logically equivalent and it is obvious that the claims of the present invention include both cases. The comparison result memory means is constituted by these memory devices.

この比較結果メモリ手段は、分散メモリ手段に記憶された2分木構造の情報に対応する。あるレイヤの比較結果メモリ手段のメモリ装置のアドレスDに記憶された比較結果は、同じレイヤの分散メモリ手段のメモリ装置のアドレス2Dと2D+1に記憶された情報の比較結果に対応する。
本発明の請求項2及び請求項4に記載の2分木構造の情報を記憶する装置は、各々本発明の請求項1及び請求項3に記載の2分木構造の情報を記憶する装置における、メモリ装置のアドレス入力のビットの上位下位の関係が逆転した装置であり、論理的には等価である。このため、説明は省略する。
This comparison result memory means corresponds to the binary tree structure information stored in the distributed memory means. The comparison result stored at the address D of the memory device of the comparison result memory means of a certain layer corresponds to the comparison result of the information stored at the addresses 2D and 2D + 1 of the memory devices of the distributed memory means of the same layer.
An apparatus for storing binary tree structure information according to claims 2 and 4 of the present invention is an apparatus for storing binary tree structure information according to claims 1 and 3, respectively. This is a device in which the relationship between the upper and lower bits of the address input bits of the memory device is reversed and is logically equivalent. Therefore, the description is omitted.

図4は、本発明に係る2分木構造の情報を記憶する装置、及びヒープ構造の情報を格納する装置の実施例を示す説明図である。図4では、装置が6レイヤで構成される場合の例を示し、各レイヤは、分散メモリ手段のメモリ装置を有し、最上位以外の各レイヤは、比較結果メモリ手段のメモリ装置を有しても良い。   FIG. 4 is an explanatory diagram showing an embodiment of an apparatus for storing binary tree structure information and an apparatus for storing heap structure information according to the present invention. FIG. 4 shows an example in which the device is composed of 6 layers, each layer having a memory device of distributed memory means, and each layer other than the highest layer having a memory device of comparison result memory means. May be.

図4において、data_in入力は、分散メモリ手段に情報を入力する際に用いられる信号である。data_out出力は、分散メモリ手段から優先度が最も高い情報を出力する際に用いられる信号である。comparison_data_busは、挿入する情報若しくは入力する情報の値を、各レイヤに供給するバスである。push_pop_address_busは、挿入する情報若しくは入力する情報の値と比較される情報を選択するアドレスを、レイヤ0以外の各レイヤに供給するバスであり、アドレス入力手段で使用される、pop_address出力は、アドレス生成手段が生成したアドレスを、下のレイヤに示す信号である。   In FIG. 4, data_in input is a signal used when information is input to the distributed memory means. The data_out output is a signal used when outputting information having the highest priority from the distributed memory means. The comparison_data_bus is a bus that supplies information to be inserted or information to be input to each layer. push_pop_address_bus is a bus that supplies an address for selecting information to be inserted or information to be compared with the value of the input information to each layer other than layer 0. The pop_address output used by the address input means is an address generator. The address generated by the means is a signal indicating the lower layer.

empty出力は、これを出力するレイヤに対応する分散メモリ手段のメモリ装置に記憶されている情報数が空であることを、上のレイヤに示す信号であり、情報出力手段及び第1の比較情報選択手段で使用される。full出力は、これを出力するレイヤに対応する分散メモリ手段のメモリ装置に記憶されている情報数が満杯であることを、下のレイヤに示す信号であり、第2の比較情報選択手段で使用される。
pop出力は、これを出力するレイヤが情報の移動元であることを上のレイヤに示す信号であり、第1の情報移動手段で使用される。push出力は、これを出力するレイヤが情報の移動元であることを下のレイヤに示す信号であり、第2の情報移動手段で使用される。pop_data出力は、移動する情報を上のレイヤに示す信号であり、第1の情報移動手段で使用される。push_data出力は、移動する情報を下のレイヤに示す信号であり、第2の情報移動手段で使用される。
The empty output is a signal indicating to the upper layer that the number of pieces of information stored in the memory device of the distributed memory means corresponding to the layer that outputs the empty output is empty, and the information output means and the first comparison information Used in selection means. The full output is a signal indicating to the lower layer that the number of pieces of information stored in the memory device of the distributed memory unit corresponding to the layer that outputs the full output is full, and is used by the second comparison information selecting unit. Is done.
The pop output is a signal indicating to the upper layer that the layer that outputs this is the source of information movement, and is used by the first information moving means. The push output is a signal indicating to the lower layer that the layer that outputs this is the source of information movement, and is used by the second information moving means. The pop_data output is a signal indicating moving information to the upper layer, and is used by the first information moving means. The push_data output is a signal indicating information to be moved to the lower layer, and is used by the second information moving means.

非特許文献1のヒープによるソータと同様に、本発明のヒープ構造の情報を記憶する装置の、請求項5に記載の情報出力手段、第1の比較情報選択手段及び第1の情報移動手段、請求項6に記載の第2の比較情報選択手段及び第2の情報移動手段は、何れも親の優先度が子の優先度以上となる関係、及び情報が左詰めで配置される関係を保つように情報を再配置する。即ち、本発明のヒープ構造の情報を記憶する装置の情報は、上位のレイヤから下位のレイヤに、レイヤ内ではアドレス0から順次配置される。
このため、本発明のヒープ構造の情報を記憶する装置において、情報の入出力処理が行なわれていない状態では、あるレイヤの情報数が満杯であれば、それ以上のレイヤの情報数も満杯となる。また、あるレイヤの情報数が空であれば、それ以下のレイヤの情報数も空となる。
The information output means, the first comparison information selection means and the first information movement means according to claim 5 of the apparatus for storing the information of the heap structure of the present invention, similar to the sorter using a heap in Non-Patent Document 1, The second comparison information selecting unit and the second information moving unit according to claim 6 both maintain a relationship in which the priority of the parent is equal to or higher than the priority of the child, and the relationship in which the information is arranged left-justified. To rearrange the information. That is, the information of the apparatus for storing the heap structure information of the present invention is sequentially arranged from the upper layer to the lower layer, and from address 0 in the layer.
Therefore, in the apparatus for storing heap structure information according to the present invention, when the information input / output processing is not performed, if the information count of a certain layer is full, the information count of the further layers is also full. Become. Further, if the number of information of a certain layer is empty, the number of information of the layers below that is also empty.

従って、最も左の空き情報を有するレイヤでは、情報数が満杯では無く、且つ、その上のレイヤの情報数が満杯となるため、(full出力=FALSE AND full入力=TRUE)が成立する。但し、最上位のレイヤは、(full出力=FALSE)が成立すれば最も左の空き情報を有する。若しくは、最上位のレイヤでは、(full入力=TRUE)が常に成立すると見なしても良い。本発明の請求項は、何れの場合も包含していることは自明である。また、最下位のレイヤではfullを出力する必要は無いが、最も左の空き情報を有するレイヤであることの判定のために、レイヤ内部でfull出力に相当する信号を作成する。   Therefore, in the layer having the leftmost empty information, the number of information is not full and the number of information in the layer above it is full, so that (full output = FALSE AND full input = TRUE) is established. However, the uppermost layer has the leftmost empty information if (full output = FALSE) is established. Alternatively, it may be considered that (full input = TRUE) always holds in the highest layer. It is obvious that the claims of the present invention include any case. Further, although it is not necessary to output full in the lowest layer, a signal corresponding to full output is created inside the layer in order to determine that the layer has the leftmost empty information.

また、最も右の情報を有するレイヤでは、情報数が空ではなく、且つ、その下のレイヤの情報数が空となるため、(empty出力=FALSE AND empty入力=TRUE)が成立する。但し、最下位のレイヤは(empty出力=FALSE)が成立すれば最も右の情報を有する。若しくは、最下位のレイヤでは(empty入力=TRUE)が常に成立すると見なしても良い。本発明の請求項は、何れの場合も包含していることは自明である。また、最上位のレイヤではemptyを出力する必要は無いが、最も右の情報を有するレイヤであることの判定のために、レイヤ内部でempty出力に相当する信号を作成する。   In the layer having the rightmost information, the number of information is not empty, and the number of information in the layer below it is empty, so that (empty output = FALSE AND empty input = TRUE) holds. However, the lowest layer has the rightmost information if (empty output = FALSE) is satisfied. Alternatively, it may be considered that (empty input = TRUE) always holds in the lowest layer. It is obvious that the claims of the present invention include any case. In addition, although it is not necessary to output empty in the highest layer, a signal corresponding to the empty output is created inside the layer in order to determine that the layer has the rightmost information.

本発明の請求項5に記載の第1の比較情報選択手段が、レイヤ1から最も右の情報を有するレイヤ、若しくは、最も右の情報を有するレイヤの上のレイヤまでの、親子関係にある情報を選択した場合、第1の情報移動手段は、選択した情報と挿入する情報を比較して、後者が低優先となる場合、(pop出力=TRUE)とする。ここで、本発明のヒープ構造の情報を記憶する装置において、情報の入出力処理が行なわれていない状態では、親の優先度は子の優先度以上となる関係にある。このため、あるレイヤの選択された情報と挿入する情報の比較の結果、後者が低優先となる場合、それ以上のレイヤにおいても後者が低優先となる。   The first comparison information selecting means according to claim 5 of the present invention is a parent-child information from the layer 1 to the layer having the rightmost information or the layer having the rightmost information. When the first information moving means compares the selected information with the information to be inserted, if the latter has a low priority, the first information moving means sets (pop output = TRUE). Here, in the apparatus for storing the information of the heap structure of the present invention, when the information input / output processing is not performed, the parent priority is higher than the child priority. For this reason, when the latter has a low priority as a result of comparison between the selected information of a certain layer and the information to be inserted, the latter has a low priority in the layers beyond that.

従って、挿入する情報の挿入位置となるレイヤは、比較の結果挿入する情報が低優先となるレイヤであって、且つ、その下のレイヤでは比較の結果挿入する情報が高優先となる、若しくは、その下のレイヤでは情報が選択されていないレイヤ、即ち、(pop出力=TRUE AND pop入力=FALSE)となる。但し、最下位のレイヤでは(pop出力=TRUE)が成立すれば挿入位置となる。若しくは、最下位のレイヤでは(pop入力=FALSE)が常に成立していると見なしても良い。本発明の請求項は何れの場合も包含していることは自明である。また、上のレイヤヘの情報の移動元となるレイヤは(pop出力=TRUE)となるレイヤ、下のレイヤからの情報の移動先となるレイヤは(pop入力=TRUE)となるレイヤとなる。   Therefore, the layer that becomes the insertion position of the information to be inserted is a layer in which the information to be inserted as a result of comparison has a low priority, and the information to be inserted as a result of the comparison has a high priority in the layer below it, or In the lower layer, the information is not selected, that is, (pop output = TRUE AND pop input = FALSE). However, in the lowest layer, if (pop output = TRUE) is established, it becomes an insertion position. Alternatively, it may be considered that (pop input = FALSE) is always established in the lowest layer. It is obvious that the claims of the present invention include any case. Further, the layer that becomes the source of information transfer to the upper layer is the layer that becomes (pop output = TRUE), and the layer that becomes the destination of information transfer from the lower layer becomes the layer that becomes (pop input = TRUE).

本発明の請求項6に記載の第2の比較情報選択手段が、レイヤ0から最も左の空き情報までの、親子関係にある情報を選択した場合、第2の情報移動手段は、レイヤ0から最も左の空き情報を有するレイヤの上のレイヤまで、即ち、(full出力=TRUE)が成立するレイヤの選択した情報と、入力する情報を比較し、後者が高優先となる場合(push出力=TRUE)とする。ここで、本発明のヒープ構造の情報を記憶する装置において、情報の入出力処理が行なわれていない状態では、親の優先度は子の優先度以上となる関係にある。このため、あるレイヤの選択された情報と入力する情報の比較の結果、後者が高優先の場合、それ以下のレイヤにおいても後者が高優先となる。   When the second comparison information selecting means according to claim 6 of the present invention selects information in a parent-child relationship from the layer 0 to the leftmost empty information, the second information moving means When the input information is compared with information selected by the layer up to the layer having the leftmost empty information, that is, (full output = TRUE), and the latter has high priority (push output = TRUE). Here, in the apparatus for storing the information of the heap structure of the present invention, when the information input / output processing is not performed, the parent priority is higher than the child priority. For this reason, if the latter is a high priority as a result of comparison between selected information of a certain layer and input information, the latter is also a high priority in the layers below it.

従って、入力する情報の挿入位置となるレイヤは、(1)比較の結果入力する情報が高優先となるレイヤであって、且つ、その上のレイヤでは比較の結果入力する情報が低優先となるレイヤ、即ち、(push入力=FALSE AND push出力=TRUE)となるレイヤか、(2)最も左の空き情報を有するレイヤであって、且つ、その上のレイヤでは比較の結果入力する情報が低優先度となるレイヤ、即ち、(push入力=FALSE AND 最も左の空き情報を有するレイヤ)となる。   Therefore, the layer that is the insertion position of the information to be input is (1) the information that is input as a result of the comparison has a high priority, and the information that is input as a result of the comparison has a low priority in the layer above it. Layer, that is, (push input = FALSE AND push output = TRUE), or (2) the leftmost layer that has empty information, and the information input as a result of comparison is low in the layer above it. It becomes a layer to be a priority, that is, (push input = FALSE AND layer having leftmost empty information).

(1)の場合は、そのレイヤ以下の選択された情報を、各々下のレイヤへ移動する。但し、レイヤ0では、(push出力=TRUE)若しくは(最も左の空き情報を有するレイヤ)が成立すれば、入力する情報の挿入位置となる。若しくは、レイヤ0では(push入力=FALSE)が常に成立すると見なしても良い。本発明の請求項は何れの場合も包含していることは明白である。また、下のレイヤへの情報の移動元となるレイヤは、(push出力=TRUE)となるレイヤ、上のレイヤからの情報の移動先となるレイヤは、(push入力=TRUE)となるレイヤとなる。
なお、第1の情報移動手段及び第2の情報移動手段における選択された情報と、挿入する情報若しくは入力する情報の比較の結果、優先度が等しい場合は、低優先若しくは高優先の何れか一方に分類すればよく、本発明の請求項は何れの場合も包含していることは自明である。
In the case of (1), the selected information below the layer is moved to the lower layer. However, in layer 0, if (push output = TRUE) or (the layer having the leftmost empty information) is established, the input information is inserted. Alternatively, it may be considered that (push input = FALSE) always holds in layer 0. It is obvious that the claims of the present invention are encompassed in any case. Also, the layer from which information is transferred to the lower layer is the layer that becomes (push output = TRUE), and the layer from which information is moved from the upper layer is the layer that is to be (push input = TRUE) Become.
In addition, when the priority is the same as a result of comparison between the information selected by the first information moving means and the second information moving means and the information to be inserted or the information to be inputted, either the low priority or the high priority is selected. It is obvious that the claims of the present invention include any case.

図5は、図4に示した、2分木構造の情報を記憶する装置及びヒープ構造の情報を格納する装置における、分散メモリ手段のメモリ装置、アドレス入力手段、比較結果メモリ手段のメモリ装置、及びアドレス生成手段間の配線例を示す説明図である。図5において、分散メモリ手段のメモリ装置は、請求項1若しくは請求項3に基づくものであり、比較結果メモリ手段のメモリ装置は、比較結果メモリ、と表記してある。   FIG. 5 shows a memory device of distributed memory means, an address input means, a memory device of comparison result memory means in the device for storing binary tree structure information and the heap structure information shown in FIG. FIG. 6 is an explanatory diagram showing an example of wiring between the address generating means. In FIG. 5, the memory device of the distributed memory means is based on claim 1 or claim 3, and the memory device of the comparison result memory means is expressed as a comparison result memory.

図5に示すように、アドレス入力手段は、各レイヤを接続するpush_pop_address_busで構成され、バスへの入力は、3状態バッファにより、各レイヤの情報数、及び比較結果メモリ手段のメモリ装置の出力を用いたアドレス生成手段から選択される。また、例えば、レイヤ4の分散メモリ手段のメモリ装置のアドレスにBが入力された場合、レイヤ3の分散メモリ手段のメモリ装置のアドレスにB/2が入力され、レイヤ2の分散メモリ手段のメモリ装置のアドレスにB/4が入力され、レイヤ1の分散メモリ手段のメモリ装置のアドレスにB/8が入力され、レイヤ4からレイヤ1までの親子の対応関係にある情報が同時に選択される。   As shown in FIG. 5, the address input means is composed of push_pop_address_bus connecting each layer, and the input to the bus is the three-state buffer, the number of information of each layer, and the output of the memory device of the comparison result memory means. It is selected from the address generation means used. Also, for example, when B is input to the address of the memory device of the layer 4 distributed memory means, B / 2 is input to the address of the memory device of the layer 3 distributed memory means, and the memory of the layer 2 distributed memory means B / 4 is input to the address of the device, B / 8 is input to the address of the memory device of the distributed memory means of layer 1, and information having a parent-child correspondence relationship from layer 4 to layer 1 is simultaneously selected.

また、図5に示すように、アドレス生成手段は、各レイヤ間のpop_address信号から構成される。図5に示した、比較結果メモリ手段のメモリ装置に記憶される比較結果は、これに対応する分散メモリ手段のメモリ装置に記憶される情報の偶数アドレス側が高優先である場合、若しくは奇数アドレス側に情報が記憶されていない場合は0、奇数アドレス側が高優先である場合、若しくは偶数アドレス側に情報が記憶されていない場合は1、さもなければ0か1、の何れかとする。無論、記憶される比較結果は、他の表現形式で記憶されてもよく、本発明の請求項はそのような場合をも包含していることは自明である。なお、本発明のヒープ構造の情報を記憶する装置では、情報を左詰めで記憶するため、奇数アドレス側に情報が記憶されているが、偶数アドレス側に情報が記憶されていない場合は、存在しない。   Further, as shown in FIG. 5, the address generation means is composed of a pop_address signal between each layer. The comparison result stored in the memory device of the comparison result memory means shown in FIG. 5 is obtained when the even address side of the information stored in the memory device of the corresponding distributed memory means has high priority, or the odd address side. 0 when no information is stored, 1 when the odd address side has high priority, or 1 when the information is not stored on the even address side, and 0 or 1 otherwise. Of course, the stored comparison results may be stored in other expressions, and it is obvious that the claims of the present invention include such cases. In the device for storing heap structure information according to the present invention, information is stored left-justified, so information is stored on the odd address side, but there is no information stored on the even address side. do not do.

図5において、あるレイヤの比較結果メモリ手段のメモリ装置のアドレスに、上位のレイヤからアドレスEが入力された場合、メモリ装置のデータ出力を、入力されたアドレスの最下位ビットに付与して下位レイヤに出力する。これにより、対応する分散メモリ手段のメモリ装置のアドレス2Eの記憶が高優先、若しくは、2E+1に情報が記憶されていない場合は、アドレス2Eを生成して出力し、アドレス2E+1の記憶が高優先の場合は、アドレス2E+1を生成して出力し、さもなければ、アドレス2Eか2E+1を生成して出力する。   In FIG. 5, when an address E is input from the upper layer to the address of the memory device of the comparison result memory means of a certain layer, the data output of the memory device is assigned to the least significant bit of the input address and the lower order Output to layer. As a result, if storage of the address 2E of the memory device of the corresponding distributed memory means has high priority, or if no information is stored in 2E + 1, the address 2E is generated and output, and storage of the address 2E + 1 has high priority In the case, the address 2E + 1 is generated and output. Otherwise, the address 2E or 2E + 1 is generated and output.

また、図5に示すように、あるレイヤが生成するアドレスの最下位ビット以外のビットの値は、上位レイヤで生成されたアドレスの値と同じであるため、各レイヤから、アドレス生成手段が生成したアドレスの最下位ビットがpush_pop_addressに入力されている。このため、あるレイヤが生成したアドレスの値を、push_pop_address_busに入力する場合は、3状態バッファにより、そのレイヤ以上の各レイヤが生成したアドレスの最下位ビットを、図5に示すように入力すれば良い。
無論、3状態バッファを介して、各レイヤが生成したアドレスの値を、各々push_pop_address_busに接続し、あるレイヤが生成したアドレスの値を、push_pop_address_busに入力する場合は、そのレイヤの3状態バッファによって信号を入力しても良く、本発明の請求項は、何れの実施方法をも包含していることは自明である。
Further, as shown in FIG. 5, since the value of the bits other than the least significant bit of the address generated by a certain layer is the same as the value of the address generated by the upper layer, the address generating means generates from each layer. The least significant bit of the selected address is input to push_pop_address. For this reason, when the address value generated by a certain layer is input to push_pop_address_bus, the least significant bit of the address generated by each layer above that layer is input as shown in FIG. good.
Of course, if the value of the address generated by each layer is connected to each push_pop_address_bus via the three-state buffer and the value of the address generated by a certain layer is input to the push_pop_address_bus, the signal is sent by the three-state buffer of that layer. It is self-evident that the claims of the present invention encompass any method of implementation.

図6は、図5に示した、push_pop_address_busの入出力、分散メモリ手段のメモリ装置のアドレス入力、各レイヤの優先度情報数、比較結果メモリのアドレス入力とデータ出力の論理的な対応関係の例を示す説明図である。ここで、push_pop_address_busからの入出力の0から4のビットは、バスとの対応関係を示すビットである。
図6に示すように、バスのビット4は、レイヤ1の分散メモリ手段のメモリ装置のアドレス入力A0、レイヤ2のA1、レイヤ3のA2、レイヤ4のA3、レイヤ5のA4に入力され、バスの他のビットも、入力される。
FIG. 6 shows an example of the logical correspondence between the input / output of push_pop_address_bus, the address input of the memory device of the distributed memory means, the number of priority information of each layer, the address input of the comparison result memory and the data output shown in FIG. It is explanatory drawing which shows. Here, the bits 0 to 4 of the input / output from the push_pop_address_bus are bits indicating the correspondence with the bus.
As shown in FIG. 6, bit 4 of the bus is input to address input A0 of the memory device of the distributed memory means of layer 1, A1 of layer 2, A2 of layer 3, A3 of layer 4, and A4 of layer 5, The other bits of the bus are also input.

本発明の2分木構造の情報を記憶する装置では、各レイヤの分散メモリ手段のメモリ装置が記憶する情報数の値が必要となる。図6において、情報数のビット0は最下位ビットを示す。各レイヤの情報数の値は、図6に示すように、レイヤ毎に記憶しても良い。また、2分木構造の情報を記憶する装置全体の情報数を記憶して、これから各レイヤの情報数を生成しても良く、本発明の請求項は、何れの場合をも包含していることは自明である。
図6に示すように、バスのビット4には、レイヤ1の情報数のビット0、レイヤ2の情報数のビット1、レイヤ3の情報数のビット2、レイヤ4の情報数のビット3、レイヤ5の情報数のビット4が、3状態バッファを介して接続され、バスの他のビットも、接続される。
In the device for storing information of the binary tree structure of the present invention, the value of the number of information stored in the memory device of the distributed memory means of each layer is required. In FIG. 6, bit 0 of the number of information indicates the least significant bit. The value of the information number of each layer may be stored for each layer as shown in FIG. Further, the number of information of the entire apparatus that stores the information of the binary tree structure may be stored, and the number of information of each layer may be generated therefrom, and the claims of the present invention encompass any case. That is obvious.
As shown in FIG. 6, bit 4 of the bus includes bit 0 of the number of information of layer 1, bit 1 of the number of information of layer 2, bit 2 of the number of information of layer 3, bit 3 of the number of information of layer 4, Bit 4 of the number of information of layer 5 is connected through a three-state buffer, and other bits of the bus are also connected.

図5に示すように、各レイヤの情報数をレイヤ毎に記憶した場合、レイヤiに記憶できる情報数は、0から2となるため、これを識別するために情報数の記憶には、i+1ビットの語長が必要となる。但し、本発明の2分木構造の情報を記憶する装置では、情報数が満杯、即ち、情報数が2となるレイヤiから、アドレス入力手段に情報数を入力することは有り得ないため、図5及び図6に示すように、各レイヤの情報数の最上位ビットを除くビットを、push_pop_address_busに、3状態バッファを介して接続し、アドレス入力手段に出力する情報数の値を選択する。
また、図6に示すように、バスのビット4には、レイヤ1の比較結果メモリ手段のメモリ装置の出力が、3状態バッファを介して接続され、この出力は、同時に、レイヤ2のA0、レイヤ3のA1、レイヤ4のA2、レイヤ5のA3に入力され、他のバスのビットも、接続される。
As shown in FIG. 5, when the number of information of each layer is stored for each layer, the number of information that can be stored in the layer i is from 0 to 2 i . A word length of i + 1 bits is required. However, in the device for storing information of the binary tree structure of the present invention, the number of information is full, that is, it is impossible to input the number of information to the address input means from the layer i where the number of information is 2 i . As shown in FIGS. 5 and 6, the bits except the most significant bit of the number of information of each layer are connected to push_pop_address_bus via a three-state buffer, and the value of the number of information to be output to the address input means is selected.
Also, as shown in FIG. 6, the output of the memory device of the comparison result memory means of layer 1 is connected to bit 4 of the bus through a three-state buffer. Input to layer A1, layer 4 A2, and layer 5 A3, and other bus bits are also connected.

先に述べた通り、本発明の請求項2及び請求項4に記載の2分木構造の情報を記憶する装置は、各々、本発明の請求項1及び請求項3に記載の2分木構造の情報を記憶する装置における、メモリ装置のアドレス入力のビットの上位下位の関係が逆転した装置であり、論理的には等価である。この場合のpush_pop_address_busの入出力、分散メモリ装置のアドレス入力、各レイヤの情報数、比較結果メモリのアドレス入力とデータ出力の論理的な対応関係を、図7に示す。
図7は、push_pop_address_busの入出力、分散メモリ装置のアドレス入力、各レイヤの優先度情報数、比較結果メモリのアドレス入力とデータ出力の論理関係が異なる例を示す説明図である。なお、図7に示す関係は、図6に示した関係と論理的には等価であるため、説明は省略する。
As described above, the apparatus for storing binary tree structure information according to claims 2 and 4 of the present invention is the binary tree structure according to claims 1 and 3, respectively. Is a device in which the relationship between the upper and lower bits of the address input bits of the memory device is reversed, and is logically equivalent. FIG. 7 shows the logical correspondence between the input / output of push_pop_address_bus, the address input of the distributed memory device, the number of information of each layer, the address input of the comparison result memory and the data output in this case.
FIG. 7 is an explanatory diagram showing an example in which the logical relationship between the input / output of push_pop_address_bus, the address input of the distributed memory device, the number of priority information of each layer, the address input of the comparison result memory and the data output is different. Note that the relationship shown in FIG. 7 is logically equivalent to the relationship shown in FIG.

分散メモリ手段のメモリ装置に記憶された情報を更新した際、比較結果メモリ手段のメモリ装置の比較結果も更新する。これは、分散メモリ手段のメモリ装置に記憶された情報を更新した際に、更新した情報の親の情報が子を2つ有する場合、更新した情報では無い方の子の情報をメモリ装置から読み出して比較し、結果を、対応する比較結果メモリ手段のメモリ装置に書き込めばよい。分散メモリ装置のメモリ装置から比較する情報を読み出すアドレスは、更新した情報のアドレスの最下位ビットを反転させたアドレス(請求項3の記載参照)か、最上位ビットを反転させたアドレス(請求項4の記載参照)となる。   When the information stored in the memory device of the distributed memory means is updated, the comparison result of the memory device of the comparison result memory means is also updated. This is because when the information stored in the memory device of the distributed memory means is updated, if the parent information of the updated information has two children, the child information that is not the updated information is read from the memory device. And the result may be written into the memory device of the corresponding comparison result memory means. The address for reading the information to be compared from the memory device of the distributed memory device is an address obtained by inverting the least significant bit of the updated information address (see claim 3), or an address obtained by inverting the most significant bit (claim). 4).

図5に示した配線例には、比較結果メモリの更新に用いるアドレス入力は、煩雑となるため記載されていない。これは、図5に示した比較結果メモリのアドレス入力にセレクタを加えて、アドレス入力信号を選択しても良く、デュアルポートメモリを使用して、更新の際のアドレスを別ポートから入力しても良く、本発明の請求項は、これらの例に限定されるものではないことは自明である。   In the wiring example shown in FIG. 5, the address input used for updating the comparison result memory is not described because it becomes complicated. This is because the address input signal may be selected by adding a selector to the address input of the comparison result memory shown in FIG. 5, and the dual port memory is used to input the address at the time of update from another port. Obviously, the claims of the present invention are not limited to these examples.

本発明の請求項5に記載の、ヒープ構造の情報を記憶する装置の分散メモリ手段から情報を出力する際の動作を説明する。情報出力手段は、レイヤ0の分散メモリ手段のメモリ装置に記憶された情報数が1の場合、記憶されている情報を削除してdata_outから出力する。その結果、レイヤ0からレイヤN−1の分散メモリ手段のメモリ装置に記憶された情報数が全て0の状態となる場合、即ち、レイヤ0において(empty入力=TRUE)となる場合、情報の出力を終了し、さもなければ、最も右の情報を有するレイヤの分散メモリ手段のメモリ装置の情報から、最も右の情報を削除してcomparison_data_busに出力し、挿入する情報として各レイヤにブロードキャストする。   The operation of outputting information from the distributed memory means of the apparatus for storing heap structure information according to claim 5 of the present invention will be described. When the number of information stored in the memory device of the layer 0 distributed memory unit is 1, the information output unit deletes the stored information and outputs it from data_out. As a result, when the number of information stored in the memory devices of the distributed memory means of layer 0 to layer N-1 is all 0, that is, when (empty input = TRUE) in layer 0, information output Otherwise, the rightmost information is deleted from the information of the memory device of the distributed memory means of the layer having the rightmost information, output to comparison_data_bus, and broadcast to each layer as information to be inserted.

なお、最も右の情報の削除には、分散メモリ手段のメモリ装置からの情報の読み出しを伴っている必要は必ずしもなく、分散メモリ手段のメモリ装置に情報を書き込む際に、最も右の情報を予めレジスタ等にキャッシュしておいて、comparison_data_busへの出力はキャッシュから行なっても良く、本発明の請求項は、このような場合をも包含していることは自明である。   It is not always necessary to delete the rightmost information from the memory device of the distributed memory means, and when the information is written to the memory device of the distributed memory means, the rightmost information is previously stored. Cached in a register or the like and output to comparison_data_bus may be performed from the cache, and it is obvious that the claims of the present invention include such a case.

図8は、図2(a)に示した情報の選択方法の詳細を示す説明図である。図8は、最も右の情報を削除した後の状態を示したものであり、レイヤ3の情報数は4となっている。この例では、レイヤ3においてアドレス生成手段が生成するアドレスの値は1(二進表記では001)となる。図8に示すように、最も右の情報を有するレイヤの情報数は満杯とは限らないことに注意する必要がある。生成されたアドレスの値が、このレイヤの情報数の値より小さい場合は、アドレス生成手段が生成するアドレスには有効な情報が記憶されている。従って、挿入する情報と比較される情報を有するレイヤは、レイヤ1から最も右の情報を有するレイヤまでとなる。   FIG. 8 is an explanatory diagram showing details of the information selection method shown in FIG. FIG. 8 shows a state after the rightmost information is deleted, and the number of information of layer 3 is four. In this example, the value of the address generated by the address generation means in layer 3 is 1 (001 in binary notation). As shown in FIG. 8, it should be noted that the number of information of the layer having the rightmost information is not always full. When the value of the generated address is smaller than the value of the number of information of this layer, valid information is stored in the address generated by the address generating means. Therefore, the layers having information to be compared with the information to be inserted are from layer 1 to the layer having the rightmost information.

しかし、生成されたアドレスの値が、このレイヤの情報数の値以上となる場合は、図8から明らかな通り、アドレス生成手段が生成するアドレスには有効な情報が記憶されていない。従って、挿入する情報と比較される情報を有するレイヤは、レイヤ1から最も右の情報を有するレイヤの上のレイヤまでとなる(なお、最も右の情報を有するレイヤがレイヤ1となる場合、レイヤ1の情報数は、レイヤ1のアドレス生成手段が生成するアドレスの値より必ず大きくなる)。   However, when the value of the generated address is equal to or greater than the value of the number of information of this layer, as is apparent from FIG. 8, no valid information is stored in the address generated by the address generation means. Therefore, the layer having information to be compared with the information to be inserted is from layer 1 to the layer above the layer having the rightmost information (in the case where the layer having the rightmost information is layer 1, The number of information of 1 is always greater than the address value generated by the layer 1 address generation means).

即ち、第1の比較情報選択手段は、情報出力手段が情報を削除した結果、最も右の情報を有するレイヤの分散メモリ手段のメモリ装置に記憶された情報数が、そのレイヤのアドレス生成手段が生成したアドレスの値より大きい場合は、このレイヤの分散メモリ手段のメモリ装置のアドレスに、このアドレスの値を入力する。さもなければ、このレイヤの上のレイヤの分散メモリ手段のメモリ装置のアドレスに、そのレイヤのアドレス生成手段が生成したアドレスの値を入力する。   In other words, the first comparison information selection means has the number of information stored in the memory device of the distributed memory means of the layer having the rightmost information as a result of the information output means deleting the information, and the address generation means of the layer When the value is larger than the generated address value, the value of this address is input to the address of the memory device of the distributed memory means of this layer. Otherwise, the value of the address generated by the address generation means of the layer is input to the address of the memory device of the distributed memory means of the layer above this layer.

これにより、レイヤ1から最も右の情報を有するレイヤ、若しくは最も右の情報を有するレイヤの上のレイヤまでの親子の関係にある情報を選択する。この処理は一見複雑であるが、図5に示した配線例の場合、優先度情報数が満杯のレイヤでは、比較結果メモリの出力をpush_pop_address_busに出力し、最も右の情報を有するレイヤにおいて比較結果メモリの出力の可否を判断することで、容易に実現できる。   Thus, information having a parent-child relationship from the layer 1 to the layer having the rightmost information or the layer above the layer having the rightmost information is selected. Although this process is complicated at first glance, in the case of the wiring example shown in FIG. 5, in the layer where the number of priority information is full, the output of the comparison result memory is output to push_pop_address_bus, and the comparison result in the layer having the rightmost information This can be easily realized by determining whether the memory can be output.

前に述べた通り、第1の比較情報選択手段が情報を選択した場合、第1の情報移動手段は、レイヤ1から最も右の情報を有するレイヤ、若しくは最も右の情報を有するレイヤの上のレイヤまでの、選択した情報を読み出して、pop_dataに各々出力すると共に挿入する情報と比較し、後者が低優先となる場合、(pop出力=TRUE)とし、情報の移動元となることを上のレイヤに示す。   As described above, when the first comparison information selecting unit selects the information, the first information moving unit selects the layer having the rightmost information from the layer 1 or the layer having the rightmost information. The selected information up to the layer is read out and compared with the information to be inserted and inserted into the pop_data. If the latter has low priority, (pop output = TRUE) Shown in layer.

これに基づいて、(pop入力=TRUE)となるレイヤは、pop_dataから情報を入力して、これを選択した情報、若しくはレイヤ0の分散メモリ手段のメモリ装置に書き込む。また、挿入する情報の挿入位置となるレイヤの選択した情報に、挿入する情報を書き込む。レイヤ1から読み出した情報より、挿入する情報が高優先となる場合、若しくは第1の比較情報選択手段が情報を選択しなかった場合、第1の情報移動手段は、レイヤ0の分散メモリ手段のメモリ装置の情報に、挿入する情報を書き込む。   Based on this, the layer that becomes (pop input = TRUE) inputs information from pop_data and writes it into the selected information or the memory device of the distributed memory means of layer 0. Also, the information to be inserted is written in the information selected by the layer that is the insertion position of the information to be inserted. When the information to be inserted has higher priority than the information read from the layer 1 or when the first comparison information selecting unit does not select the information, the first information moving unit is the layer 0 distributed memory unit. Write the information to be inserted into the memory device information.

本発明の請求項6に記載の、ヒープ構造の情報を記憶する装置の分散メモリ手段に情報を入力する際の動作を説明する。
図9は、図1(a)に示した情報の選択方法の詳細を示す説明図である。図9に示すように、最も左の空き情報を有するレイヤQ(図9の例ではレイヤ3)では、このレイヤの情報数が満杯であることはあり得ないため、このレイヤの情報数の下位Qビットは、このレイヤの分散メモリ手段のメモリ装置の最も左の空き情報のメモリのアドレスとなる。
The operation when inputting information to the distributed memory means of the apparatus for storing heap structure information according to claim 6 of the present invention will be described.
FIG. 9 is an explanatory diagram showing details of the information selection method shown in FIG. As shown in FIG. 9, in the layer Q having the leftmost empty information (layer 3 in the example of FIG. 9), the number of information in this layer cannot be full. The Q bit is the address of the leftmost empty information memory in the memory device of the distributed memory means of this layer.

従って、このレイヤの分散メモリ手段のメモリ装置のアドレスに、この値を入力して、レイヤQの最も左の空き情報から、レイヤ1の情報の親子の関係にある情報を選択し、更に、レイヤ0の情報も親の情報となるため選択する。但し、最も左の空き情報を有するレイヤが、レイヤ0となる場合、即ち、装置に記憶された情報が空の場合は、入力する情報の挿入位置はレイヤ0となり、入力する情報との比較を行なう情報は無いため、情報の選択は行なわない。   Therefore, this value is input to the address of the memory device of the distributed memory means of this layer, and information having the parent-child relationship of the information of layer 1 is selected from the leftmost free information of layer Q. Since 0 information is also parent information, it is selected. However, when the layer having the leftmost empty information is layer 0, that is, when the information stored in the device is empty, the insertion position of the input information is layer 0, and the comparison with the input information is performed. Since there is no information to perform, no information is selected.

即ち、第2の比較情報選択手段は、分散メモリ手段に情報を入力する際に、入力する情報をdata_inから、comparison_data_busに出力して、各レイヤにブロードキャストする。また、レイヤ0の分散メモリ手段のメモリ装置に記憶された情報数が1の場合は、その情報を選択し、レイヤ0以外の最も左の空き情報を有するレイヤが存在すれば、そのレイヤに記憶された情報数の値を、分散メモリ手段のメモリ装置のアドレスに入力して、アドレス入力手段によってレイヤ1から最も左の空き情報を有するレイヤまでの情報を選択する。   That is, when the second comparison information selection unit inputs information to the distributed memory unit, the input information is output from data_in to comparison_data_bus and broadcast to each layer. If the number of information stored in the memory device of the distributed memory means of layer 0 is 1, that information is selected, and if there is a layer having the leftmost empty information other than layer 0, the information is stored in that layer. The value of the number of information is input to the address of the memory device of the distributed memory means, and information from the layer 1 to the layer having the leftmost empty information is selected by the address input means.

前に述べた通り、第2の比較情報選択手段が情報を選択した場合、第2の情報移動手段は、レイヤ0から最も左の空き情報を有するレイヤの上のレイヤまで、即ち、(full出力=TRUE)が成立するレイヤの選択した情報を読み出して、push_dataに各々出力すると共に入力する情報と比較し、後者が高優先となる場合、(push出力=TRUE)とし、情報の移動元となることを下のレイヤに示す。これに基づいて、(push入力=TRUE)となるレイヤは、push_dataから情報を入力して、これを選択した情報に書き込む。
また、入力する情報の挿入位置となるレイヤの選択した情報に、入力する情報を書き込む。第2の比較情報選択手段が情報を選択しなかった場合、第2の情報移動手段は、レイヤ0の分散メモリ手段のメモリ装置の情報に、入力する情報を書き込む。
As described above, when the second comparison information selecting unit selects information, the second information moving unit moves from the layer 0 to the layer having the leftmost empty information, that is, (full output = TRUE) is read out, the information selected by the layer is read out and compared with the information input and input to push_data. If the latter has high priority, it is set as (push output = TRUE) and becomes the source of information movement This is shown in the lower layer. Based on this, the layer of (push input = TRUE) inputs information from push_data and writes it into the selected information.
Further, the input information is written in the information selected by the layer that is the insertion position of the input information. When the second comparison information selecting unit does not select information, the second information moving unit writes the input information to the information of the memory device of the distributed memory unit of layer 0.

以上から明らかな通り、本発明は、従来のヒープによるソータのアルゴリズムを並列化するために必要な2分木構造の情報を記憶する装置を提供し、更に、従来のヒープによるソータにおける、メモリ等のリソースの使用効率が高い特徴や、メモリの空き領域の管理が非常に容易な特徴をそのまま生かした、並列処理アルゴリズムに基づくヒープ構造の情報を記憶する装置を提供することによって、実行時間が短く、少ないリソースで、多数の優先度に対応し、且つ、高速なヒープによるソータを実現することができる。   As is apparent from the above, the present invention provides a device for storing binary tree structure information necessary for parallelizing a conventional sorter algorithm using a heap, and further, a memory or the like in a conventional sorter using a heap. By providing a device for storing heap structure information based on a parallel processing algorithm that takes advantage of the features of high resource usage efficiency and the features that make it very easy to manage free memory space, the execution time is shortened. Therefore, it is possible to realize a sorter using a high-speed heap that supports a large number of priorities with fewer resources.

なお、本発明の請求項に記載された各種の論理関係に対して、例えば、メモリ装置が対応するレイヤをレイヤ1からレイヤNとする、メモリ装置の開始アドレスを1とする等の、加算・減算・乗算・除算・論理値の反転・上位下位ビットの反転等、或いはこれらの任意の組み合わせを施して得られる、本発明と本質的に同一の論理関係に基づく装置は、全て本発明に含まれることは自明である。
以上、本発明を、実施の形態に基づき具体的に説明したが、本発明は、上述した実施の形態に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは勿論である。
It should be noted that, for various logical relationships described in the claims of the present invention, for example, addition / reduction of layers corresponding to the memory device from layer 1 to layer N, a memory device start address of 1, and the like All devices based on essentially the same logical relationship as the present invention obtained by performing subtraction, multiplication, division, inversion of logical values, inversion of upper and lower bits, or any combination thereof are included in the present invention. It is self-evident.
The present invention has been specifically described above based on the embodiments. However, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention. It is.

このように、この発明に係る2分木構造の情報を記憶する装置によれば、N個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ0からレイヤN−1とする場合、レイヤ0に対応するメモリ装置は、単一の情報を記憶し、(1≦i≦N−1)となるレイヤiに対応するメモリ装置は、各々iビットのアドレスで情報を識別し、小数点以下を切り捨てた整数値を商とする除算演算子を「/」として、レイヤ1に対応するメモリ装置のアドレス0若しくはアドレス1で識別される情報を第1の情報とし、レイヤ0に対応するメモリ装置の情報を第2の情報とする場合、該第2の情報は該第1の情報の親に、該第1の情報は該第2の情報の子になる第1の関係と、(2≦j≦N−1)となるレイヤjに対応するメモリ装置のアドレスAで識別される情報を第3の情報とし、レイヤj−1に対応するメモリ装置のアドレスA/2で識別される情報を第4の情報とする場合、該第4の情報は該第3の情報の親に、該第3の情報は該第4の情報の子になる第2の関係に基づいて、2分木構造の情報における親子の対応関係が識別される分散メモリ手段と、(1≦L≦N−1)となるレイヤLに対応する該分散メモリ手段のメモリ装置のアドレスにBが入力された場合、(1≦k≦L−1)となるレイヤkに対応する該分散メモリ手段のメモリ装置のアドレスに、各々、B/2(L−k)を入力することによって、レイヤLに対応する該分散メモリ手段のメモリ装置のアドレスBの情報から、レイヤ1に対応する該分散メモリ手段のメモリ装置のアドレスB/2(L−1)に至るまでの親子の対応関係にある情報を、同時に選択するアドレス入力手段とを備えて構成したことを特徴としている。 As described above, according to the apparatus for storing the information of the binary tree structure according to the present invention, it is constituted by N memory devices, and the memory devices respectively correspond to layers 0 to N−1. The memory device corresponding to layer 0 stores single information, and the memory device corresponding to layer i satisfying (1 ≦ i ≦ N−1) identifies the information with an i-bit address, and A division operator that uses an integer value obtained by rounding down the following as a quotient is “/”, the address 0 of the memory device corresponding to layer 1 or the information identified by address 1 is the first information, and the memory corresponding to layer 0 When the device information is the second information, the second information is a parent of the first information, the first information is a child of the second information, and (2 ≦ j ≦ N−1), the memory device corresponding to layer j In the case where the information identified by address A is the third information and the information identified by address A / 2 of the memory device corresponding to layer j−1 is the fourth information, the fourth information is the third information. Distributed memory means for identifying a correspondence relationship between a parent and a child in the binary tree structure information based on a second relationship in which the third information is a child of the fourth information; When B is input to the address of the memory device of the distributed memory unit corresponding to the layer L that satisfies (1 ≦ L ≦ N−1), the layer k that corresponds to (1 ≦ k ≦ L−1) By inputting B / 2 (Lk) to the addresses of the memory devices of the distributed memory means, it corresponds to the layer 1 from the information of the address B of the memory devices of the distributed memory means corresponding to the layer L. To the address B / 2 (L-1) of the memory device of the distributed memory means The present invention is characterized in that it comprises address input means for simultaneously selecting information having a correspondence relationship between the parent and child.

また、N個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ0からレイヤN−1とする場合、レイヤ0に対応するメモリ装置は、単一の情報を記憶し、(1≦i≦N−1)となるレイヤiに対応するメモリ装置は、各々iビットのアドレスで情報を識別し、整数値の剰余を求める剰余演算子を「%」として、レイヤ1に対応するメモリ装置のアドレス0若しくはアドレス1で識別される情報を第1の情報とし、レイヤ0に対応するメモリ装置の情報を第2の情報とする場合、該第2の情報は該第1の情報の親に、該第1の情報は該第2の情報の子になる第1の関係と、(2≦j≦N−1)となるレイヤjに対応するメモリ装置のアドレスAで識別される情報を第3の情報とし、レイヤj−1に対応するメモリ装置のアドレスA%2(j−1)で識別される情報を第4の情報とする場合、該第4の情報は該第3の情報の親に、該第3の情報は該第4の情報の子になる第2の関係に基づいて、2分木構造の情報における親子の対応関係が識別される分散メモリ手段と、(1≦L≦N−1)となるレイヤLに対応する、該分散メモリ手段のメモリ装置のアドレスにBが入力された場合、(1≦k≦L−1)となるレイヤkに対応する該分散メモリ手段のメモリ装置のアドレスに、各々B%2を入力することによって、レイヤLに対応する該分散メモリ手段のメモリ装置のアドレスBの情報から、レイヤ1に対応する該分散メモリ手段のメモリ装置のアドレスB%2に至るまでの親子の対応関係にある情報を、同時に選択するアドレス入力手段とを備えて構成したことを特徴としている。 In addition, when the memory device includes N memory devices, and the layers corresponding to each of the memory devices are changed from layer 0 to layer N-1, the memory device corresponding to layer 0 stores a single piece of information (1 A memory device corresponding to layer i satisfying ≦ i ≦ N−1) identifies information by an i-bit address, and sets a remainder operator for obtaining a remainder of an integer value as “%” as a memory corresponding to layer 1 When the information identified by the device address 0 or address 1 is the first information and the memory device information corresponding to the layer 0 is the second information, the second information is the parent of the first information. In addition, the first information includes information identified by the first relationship that is a child of the second information and the address A of the memory device corresponding to the layer j that is (2 ≦ j ≦ N−1). The third information is the memory device corresponding to layer j-1. If the information identified by less A% 2 (j-1) and the fourth information, the information of said fourth parent information of the third information of said third said fourth information A distributed memory means for identifying a correspondence relationship between a parent and a child in the binary tree structure information based on the second relationship to be a child, and the distribution corresponding to the layer L that is (1 ≦ L ≦ N−1) When B is input to the memory device address of the memory means, B% 2k is input to each of the memory device addresses of the distributed memory means corresponding to the layer k satisfying (1 ≦ k ≦ L−1). Thus, information on the correspondence relationship between the parent and the child from the information of the address B of the memory device of the distributed memory means corresponding to the layer L to the address B% 2 of the memory device of the distributed memory means corresponding to the layer 1 With address input means for selecting at the same time It is characterized by that.

また、N−1個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ1からレイヤN−1とする場合、レイヤ1に対応するメモリ装置は、単一の比較結果を記憶し、該比較結果は、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス0及びアドレス1で識別される情報に対応する比較結果となり、(2≦m≦N−1)となるレイヤmに対応するメモリ装置は、各々m−1ビットのアドレスで比較結果を識別し、アドレスDで識別される比較結果は、レイヤmに対応する前記分散メモリ手段のメモリ装置のアドレス2D及びアドレス2D+1で識別される情報に対応する比較結果となり、前記分散メモリ手段のメモリ装置に記憶された情報が更新された際に、該情報に対応する比較結果が更新される比較結果メモリ手段と、レイヤ1に対応する該比較結果メモリ手段のメモリ装置に記憶された比較結果に基づいて、レイヤ1に対応するアドレスを生成し、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス0で識別される情報が高優先、若しくはアドレス1で識別される情報が存在しない場合は、生成されるアドレスは0となり、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス1で識別される情報が高優先、若しくはアドレス0で識別される情報が存在しない場合は、生成されるアドレスは1となり、さもなければ、生成されるアドレスは0か1の何れかとなり、(2≦p≦N−1)となるレイヤpに対応する該比較結果メモリ手段のメモリ装置のアドレスに、各々レイヤp−1に対応するアドレスEp−1を入力することによって選択した比較結果に基づいて、レイヤpに対応するアドレスを各々生成し、レイヤpに対応する前記分散メモリ手段のメモリ装置のアドレス2Ep−1で識別される情報が高優先、若しくはアドレス2Ep−1+1で識別される情報が存在しない場合は、生成されるアドレスは2Ep−1となり、レイヤpに対応する前記分散メモリ手段のメモリ装置のアドレス2Ep−1+1で識別される情報が高優先、若しくはアドレス2Ep−1で識別される情報が存在しない場合は、生成されるアドレスは2Ep−1+1となり、さもなければ、生成されるアドレスは2Ep−1か2Ep−1+1の何れかとなるアドレス生成手段とを備えて構成したことを特徴としている。 In addition, when the memory device is composed of N−1 memory devices and the layers corresponding to the memory devices are changed from layer 1 to layer N−1, the memory device corresponding to layer 1 stores a single comparison result. The comparison result is a comparison result corresponding to the information identified by the address 0 and address 1 of the memory device of the distributed memory unit corresponding to the layer 1, and the layer m satisfying (2 ≦ m ≦ N−1). The corresponding memory device identifies the comparison result by an address of m−1 bits, and the comparison result identified by the address D is identified by the address 2D and address 2D + 1 of the memory device of the distributed memory means corresponding to the layer m. When the information stored in the memory device of the distributed memory unit is updated, the comparison result corresponding to the information is updated. Based on the comparison result stored in the memory device of the comparison result memory unit corresponding to layer 1 and the memory device of the distributed memory unit corresponding to layer 1 If the information identified by address 0 has high priority, or there is no information identified by address 1, the generated address is 0, which is identified by address 1 of the memory device of the distributed memory means corresponding to layer 1 If the information to be generated has high priority or there is no information identified by address 0, the generated address is 1, otherwise the generated address is either 0 or 1 (2 ≦ p to ≦ N-1) and comprising addresses of a memory device of the comparison result memory means corresponding to the layer p, enter the address E p-1 corresponding respectively to the layer p-1 Based on the comparison result selected by the, it generates each address corresponding to the layer p, information high priority identified by the address 2E p-1 of the memory device of the distributed memory means corresponding to the layer p, or address If there is no information identified by 2E p−1 +1, the generated address is 2E p−1 , which is identified by the address 2E p−1 +1 of the memory device of the distributed memory means corresponding to layer p. If the information has high priority or there is no information identified by address 2E p-1 , the generated address is 2E p-1 +1, otherwise the generated address is 2E p-1 or 2E p It is characterized by comprising an address generating means which is either −1 +1.

また、N−1個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ1からレイヤN−1とする場合、レイヤ1に対応するメモリ装置は単一の比較結果を記憶し、該比較結果は、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス0及びアドレス1で識別される情報に対応する比較結果となり、(2≦m≦N−1)となるレイヤmに対応するメモリ装置は、各々m−1ビットのアドレスで比較結果を識別し、アドレスDで識別される比較結果は、レイヤmに対応する前記分散メモリ手段のメモリ装置のアドレスD及びアドレスD+2m−1で識別される情報に対応する比較結果となり、前記分散メモリ手段のメモリ装置に記憶された情報が更新された際に、該情報に対応する比較結果が更新される比較結果メモリ手段と、レイヤ1に対応する該比較結果メモリ手段のメモリ装置に記憶された比較結果に基づいて、レイヤ1に対応するアドレスを生成し、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス0で識別される情報が高優先、若しくはアドレス1で識別される情報が存在しない場合は、生成されるアドレスは0となり、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス1で識別される情報が高優先、若しくはアドレス0で識別される情報が存在しない場合は、生成されるアドレスは1となり、さもなければ、生成されるアドレスは0か1の何れかとなり、(2≦p≦N−1)となるレイヤpに対応する該比較結果メモリ手段のメモリ装置のアドレスに、各々レイヤp−1に対応するアドレスEp−1を入力することによって選択した比較結果に基づいて、レイヤpに対応するアドレスを各々生成し、レイヤpに対応する前記分散メモリ手段のメモリ装置のアドレスEp−1で識別される情報が高優先、若しくはアドレスEp−1+2m−1で識別される情報が存在しない場合は、生成されるアドレスはEp−1となり、レイヤpに対応する前記分散メモリ手段のメモリ装置のアドレスEp−1+2m−1で識別される情報が高優先、若しくはアドレスEp−1で識別される情報が存在しない場合は、生成されるアドレスはEp−1+2m−1となり、さもなければ、生成されるアドレスはEp−1かEp−1+2m−1の何れかとなるアドレス生成手段とを備えて構成したことを特徴としている。 In addition, when the memory device is composed of N-1 memory devices, and the layer corresponding to each of the memory devices is changed from layer 1 to layer N-1, the memory device corresponding to layer 1 stores a single comparison result, The comparison result is a comparison result corresponding to information identified by address 0 and address 1 of the memory device of the distributed memory unit corresponding to layer 1, and corresponds to layer m satisfying (2 ≦ m ≦ N−1). Each of the memory devices identifies the comparison result with an address of m−1 bits, and the comparison result identified with the address D is the address D and the address D + 2 m−1 of the memory device of the distributed memory means corresponding to the layer m. The comparison result corresponding to the information identified by the information is obtained, and when the information stored in the memory device of the distributed memory means is updated, the comparison result corresponding to the information is updated. And the memory device of the distributed memory unit corresponding to layer 1 is generated based on the comparison result stored in the memory device of the memory unit of the memory unit and the comparison result memory unit corresponding to layer 1. If the information identified by address 0 has high priority, or there is no information identified by address 1, the generated address is 0, which is identified by address 1 of the memory device of the distributed memory means corresponding to layer 1 If the information to be generated has high priority or there is no information identified by address 0, the generated address is 1, otherwise the generated address is either 0 or 1 (2 ≦ p The address Ep-1 corresponding to the layer p-1 is input to the address of the memory device of the comparison result memory means corresponding to the layer p satisfying .ltoreq.N-1. Each of the addresses corresponding to the layer p is generated based on the comparison result selected, and the information identified by the address E p-1 of the memory device of the distributed memory means corresponding to the layer p is given high priority or If there is no information identified by E p−1 +2 m−1 , the generated address is E p−1 , and the address E p−1 +2 m of the memory device of the distributed memory means corresponding to layer p If the information identified by -1 is high priority or there is no information identified by the address E p-1 , the generated address is E p-1 +2 m-1 , otherwise it is generated. The address is characterized by comprising address generating means that is either E p-1 or E p-1 +2 m-1 .

また、この発明に係るヒープ構造の情報を記憶する装置は、請求項3又は4に記載の2分木構造の情報を記憶する装置に記憶される情報がヒープ構造であるヒープ構造の情報を記憶する装置であって、前記分散メモリ手段から情報を出力する際に、レイヤ0に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1の状態である場合、該レイヤ0に対応する前記分散メモリ手段のメモリ装置に記憶された情報を削除して出力し、その結果、レイヤ0からレイヤN−1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が全て0の状態となる場合、前記分散メモリ手段からの情報の出力を終了し、(1≦S≦N−1)となるレイヤSに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1以上の状態となる場合であって、且つ、レイヤS+1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が0の状態となる、若しくはレイヤSがレイヤN−1となる場合、該レイヤSに対応する前記分散メモリ手段のメモリ装置に記憶された情報数の値をCとすると、該レイヤSに対応する前記分散メモリ手段のメモリ装置のアドレスC−1の情報を削除して、挿入する情報とする情報出力手段と、該情報出力手段による情報の削除の結果、(1≦T≦N−1)となるレイヤTに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1以上の状態となる場合であって、且つ、レイヤT+1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が0の状態となる、若しくはレイヤTがレイヤN−1となる場合、該レイヤTに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が、前記アドレス生成手段が生成したレイヤTに対応するアドレスの値より大きければ、前記アドレス生成手段が生成したレイヤTに対応するアドレスを、該レイヤTに対応する前記分散メモリ手段のメモリ装置のアドレスに入力し、さもなければ、前記アドレス生成手段が生成したレイヤT−1に対応するアドレスを、レイヤT−1に対応する前記分散メモリ手段のメモリ装置のアドレスに入力して、前記アドレス入力手段により、レイヤ1からレイヤT若しくはレイヤT−1に対応する前記分散メモリ手段のメモリ装置の情報を同時に選択する第1の比較情報選択手段と、該第1の比較情報選択手段によって情報が選択された場合は、前記分散メモリ手段のメモリ装置から選択された全ての情報を読み出して、挿入する情報と各々比較し、読み出した情報より、該挿入する情報の優先度が高ければ高優先、さもなければ低優先、或いは読み出した情報より、該挿入する情報の優先度が高いか等しければ高優先、さもなければ低優先とし、比較の結果、レイヤUから読み出した情報より、該挿入する情報が低優先となる場合であって、且つ、レイヤU+1から読み出した情報より、該挿入する情報が高優先となる、若しくはレイヤU+1に対応する前記分散メモリ手段のメモリ装置の情報が選択されていない、若しくはレイヤUがレイヤN−1となる場合、レイヤ1から読み出した情報を、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に書き込み、(U≧2)の場合はレイヤ2からレイヤUまでのレイヤから読み出した情報を、該第1の比較情報選択手段によって選択されたレイヤ1からレイヤU−1に対応する前記分散メモリ手段のメモリ装置の情報に各々書き込み、且つ、該第1の比較情報選択手段によって選択されたレイヤUに対応する前記分散メモリ手段のメモリ装置の情報に、該挿入する情報を書き込み、比較の結果、レイヤ1から読み出した情報より、該挿入する情報が高優先となる場合、若しくは該第1の比較情報選択手段によって情報が選択されなかった場合は、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に、該挿入する情報を書き込む第1の情報移動手段とを備えて構成したことを特徴としている。   An apparatus for storing heap structure information according to the present invention stores heap structure information in which the information stored in the binary tree structure information according to claim 3 or 4 is a heap structure. When the number of pieces of information stored in the memory device of the distributed memory unit corresponding to layer 0 is 1 when outputting information from the distributed memory unit, the device corresponds to layer 0. The information stored in the memory device of the distributed memory means is deleted and output, and as a result, the number of information stored in the memory device of the distributed memory means corresponding to layer 0 to layer N-1 is all zero The output of information from the distributed memory means is terminated, and the number of information stored in the memory device of the distributed memory means corresponding to the layer S satisfying (1 ≦ S ≦ N−1) is one or more. State If the number of pieces of information stored in the memory device of the distributed memory unit corresponding to the layer S + 1 is 0 or the layer S is the layer N-1, the layer S corresponds to the layer S. If the value of the number of information stored in the memory device of the distributed memory means is C, the information at the address C-1 of the memory device of the distributed memory means corresponding to the layer S is deleted and inserted as information. Information output means and the number of information stored in the memory device of the distributed memory means corresponding to the layer T satisfying (1 ≦ T ≦ N−1) as a result of deletion of information by the information output means is 1 or more And the number of pieces of information stored in the memory device of the distributed memory means corresponding to layer T + 1 is 0, or the layer T is layer N-1, the layer T versus If the number of information stored in the memory device of the distributed memory means is larger than the value of the address corresponding to the layer T generated by the address generating means, the address corresponding to the layer T generated by the address generating means is Input to the address of the memory device of the distributed memory means corresponding to the layer T; otherwise, the address corresponding to the layer T-1 generated by the address generating means is set to the distributed memory corresponding to the layer T-1 First comparison information selecting means for inputting the address of the memory device of the means, and simultaneously selecting the information of the memory device of the distributed memory means corresponding to layer T to layer T or layer T-1 by the address input means And when the information is selected by the first comparison information selecting means, the information is selected from the memory device of the distributed memory means. All the read information is read and compared with the information to be inserted. If the priority of the information to be inserted is higher than the read information, the priority is higher, otherwise the priority is lower, or the information is inserted from the read information. If the priority of the information is equal or higher, the priority is higher, otherwise the priority is lower. As a result of the comparison, the information to be inserted has lower priority than the information read from the layer U. If the information to be inserted has higher priority than the read information, or the memory device information of the distributed memory means corresponding to the layer U + 1 is not selected, or the layer U is the layer N-1, the layer 1 The information read out from the memory device of the distributed memory means corresponding to layer 0 is written, and if (U ≧ 2), the layer from layer 2 to layer U The read information is written in the memory device information of the distributed memory unit corresponding to the layer U-1 from the layer 1 selected by the first comparison information selection unit, and the first comparison information selection unit When the information to be inserted is written in the information of the memory device of the distributed memory unit corresponding to the layer U selected by the above-described information, and the information to be inserted has higher priority than the information read from the layer 1 as a result of comparison, Alternatively, when information is not selected by the first comparison information selection unit, the first information movement unit writes the information to be inserted into the information of the memory device of the distributed memory unit corresponding to the layer 0. It is characterized by being configured.

また、請求項1から4のいずれか一項に記載の2分木構造の情報を記憶する装置に記憶される情報がヒープ構造であるヒープ構造の情報を記憶する装置、若しくは請求項5に記載のヒープ構造の情報を記憶する装置であって、前記分散メモリ手段に情報を入力する際に、レイヤ0に対応する該分散メモリ手段のメモリ装置に記憶された情報数が1の状態である場合、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報を選択し、(1≦Q≦N−1)となるレイヤQに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が2未満の状態であり、且つ、レイヤQ−1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が2Q−1の状態となる場合、レイヤQに対応する前記分散メモリ手段のメモリ装置のアドレスに、レイヤQに対応する前記分散メモリ手段のメモリ装置に記憶された情報数の値を入力して、前記アドレス入力手段により、レイヤ1からレイヤQに対応する前記分散メモリ手段のメモリ装置の情報を同時に選択する第2の比較情報選択手段と、該第2の比較情報選択手段によって情報が選択された場合は、レイヤ0からレイヤQ−1までの前記分散メモリ手段のメモリ装置から選択された情報を読み出して、入力する情報と各々比較し、読み出した情報より該入力する情報の優先度が高ければ高優先、さもなければ低優先、或いは読み出した情報より該入力する情報の優先度が高いか等しければ高優先、さもなければ低優先とし、比較の結果、レイヤRから読み出した情報より該入力する情報が高優先となる場合であって、且つ、レイヤR−1から読み出した情報より該入力する情報が低優先となる、若しくはレイヤRがレイヤ0となる場合、レイヤRからレイヤQ−1までのレイヤから読み出した情報を、該第2の比較情報選択手段によって選択されたレイヤR+1からレイヤQに対応する前記分散メモリ手段のメモリ装置の情報に各々書き込み、且つ、該第2の比較情報選択手段によって選択されたレイヤRに対応する前記分散メモリ手段のメモリ装置の情報に、該入力する情報を書き込み、比較の結果、レイヤQ−1から読み出した情報より該入力する情報が低優先となる場合、該第2の比較情報選択手段によって選択されたレイヤQに対応する前記分散メモリ手段のメモリ装置の情報に、該入力する情報を書き込み、該第2の比較情報選択手段によって情報が選択されなかった場合は、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に、該入力する情報を書き込む第2の情報移動手段とを備えて構成したことを特徴としている。 Furthermore, the information memorize | stored in the apparatus which memorize | stores the information of the binary tree structure as described in any one of Claim 1 to 4 the information memorize | stored in the heap structure whose information is a heap structure, or Claim 5 When the information stored in the memory device of the distributed memory unit corresponding to layer 0 is 1 when the information is input to the distributed memory unit. The information of the memory device of the distributed memory means corresponding to layer 0 is selected, and the number of information stored in the memory device of the distributed memory means corresponding to layer Q corresponding to (1 ≦ Q ≦ N−1) is 2 If the number of information stored in the memory device of the distributed memory means corresponding to the layer Q-1 is less than Q and the number of pieces of information stored in the memory device is 2 Q-1 , the distributed memory means corresponding to the layer Q Add memory device The value of the number of information stored in the memory device of the distributed memory unit corresponding to layer Q is input to the memory device, and the address input unit stores the value of the memory device of the distributed memory unit corresponding to layer Q from layer 1 to layer Q. A second comparison information selecting means for selecting information simultaneously, and when the information is selected by the second comparison information selecting means, the information is selected from the memory devices of the distributed memory means from layer 0 to layer Q-1. If the priority of the information to be input is higher than that of the read information, the priority is low, otherwise the priority of the information to be input is higher than that of the read information. If it is equal or higher, the priority is higher, otherwise the priority is lower. As a result of the comparison, the input information has higher priority than the information read from the layer R, and the If the input information has a lower priority than the information read from the R-1 or the layer R becomes the layer 0, the information read from the layers from the layer R to the layer Q-1 is compared with the second comparison. The distributed memory corresponding to the layer R selected by the second comparison information selecting means and written in the memory device information of the distributed memory means corresponding to the layer Q from the layer R + 1 selected by the information selecting means When the input information is written in the memory device information of the means and the input information has a lower priority than the information read from the layer Q-1 as a result of comparison, the information is selected by the second comparison information selection means. The input information is written in the memory device information of the distributed memory means corresponding to the layer Q, and the information is selected by the second comparison information selecting means. If no, the information of the memory device of the distributed memory means corresponding to the layer 0, and characterized by being configured and a second information moving means for writing information to said input.

これにより、同時に実行可能な処理を物理的に同時に実行する並列処理によって、ヒープによるソータを実現しているため、実行時間が大幅に短縮され、高速化が実現されている。更に、非特許文献1に記載されたヒープによるソータと同様に、メモリ等のリソースの使用効率が高い特徴や、メモリの空き領域の管理が非常に容易な特徴を有する。この結果、非特許文献1に記載された、ヒープによるソータのアルゴリズムを並列化するために必要な2分木構造の情報を記憶する装置を実現し、更に、非特許文献1に記載されたヒープによるソータにおける、メモリ等のリソースの使用効率が高い特徴や、メモリの空き領域の管理が非常に容易な特徴をそのまま生かした並列処理アルゴリズムによって、ヒープによるソータの実行時間を短縮し、少ないリソースで多数の優先度に対応し、且つ、高速なヒープ構造の情報を記憶することができる。   As a result, a sorter using a heap is realized by parallel processing in which processes that can be executed at the same time are executed simultaneously, so that the execution time is greatly shortened and high speed is realized. Further, like the sorter using a heap described in Non-Patent Document 1, it has a feature that the use efficiency of resources such as a memory is high and a management of a free area of the memory is very easy. As a result, a device for storing the binary tree structure information necessary for parallelizing the sorter algorithm based on the heap described in Non-Patent Document 1 is realized. Further, the heap described in Non-Patent Document 1 is realized. By using a parallel processing algorithm that takes advantage of the high efficiency of using resources such as memory and the ability to manage free memory space very easily, the sorter execution time by heap can be shortened with less resources. It is possible to store information of a high-speed heap structure corresponding to a large number of priorities.

本発明による、ヒープによるソータに優先度情報を挿入する際の並列化されたアルゴリズムの概要を示し、(a)は、挿入位置の決定の説明図、(b)は、挿入位置への移動の説明図である。The outline | summary of the parallelized algorithm at the time of inserting priority information in the sorter by heap by this invention is shown, (a) is explanatory drawing of determination of an insertion position, (b) is the movement of an insertion position. It is explanatory drawing. 本発明による、ヒープによるソータから最も高い優先度を削除する際の並列化されたアルゴリズムの概略を示し、(a)は、挿入位置の決定の説明図、(b)は、挿入位置への移動の説明図である。The outline of the parallelized algorithm at the time of deleting the highest priority from the sorter by heap by this invention is shown, (a) is explanatory drawing of determination of an insertion position, (b) is a movement to an insertion position It is explanatory drawing of. 本発明に係る2分木構造の情報を記憶する装置のデータ構造の例を示す説明図である。It is explanatory drawing which shows the example of the data structure of the apparatus which memorize | stores the information of the binary tree structure concerning this invention. 本発明に係る2分木構造の情報を記憶する装置、及びヒープ構造の情報を格納する装置の実施例を示す説明図である。It is explanatory drawing which shows the Example of the apparatus which memorize | stores the information of the binary tree structure concerning this invention, and the apparatus which stores the information of a heap structure. 図4に示した、2分木構造の情報を記憶する装置及びヒープ構造の情報を格納する装置における、分散メモリ手段のメモリ装置、アドレス入力手段、比較結果メモリ手段のメモリ装置、及びアドレス生成手段間の配線例を示す説明図である。Memory device of distributed memory means, address input means, memory device of comparison result memory means, and address generation means in the apparatus for storing binary tree structure information and the heap structure information shown in FIG. It is explanatory drawing which shows the example of wiring between. 図5に示した、push_pop_address_busの入出力、分散メモリ手段のメモリ装置のアドレス入力、各レイヤの優先度情報数、比較結果メモリのアドレス入力とデータ出力の論理的な対応関係の例を示す説明図である。FIG. 5 is an explanatory diagram showing an example of the logical correspondence between the input / output of push_pop_address_bus, the address input of the memory device of the distributed memory means, the number of priority information of each layer, the address input of the comparison result memory and the data output shown in FIG. It is. push_pop_address_busの入出力、分散メモリ装置のアドレス入力、各レイヤの優先度情報数、比較結果メモリのアドレス入力とデータ出力の論理関係が異なる例を示す説明図である。It is explanatory drawing which shows the example from which the logical relationship of the input / output of push_pop_address_bus, the address input of a distributed memory device, the priority information number of each layer, the address input of a comparison result memory, and a data output differs. 図2(a)に示した情報の選択方法の詳細を示す説明図である。It is explanatory drawing which shows the detail of the selection method of the information shown to Fig.2 (a). 図1(a)に示した情報の選択方法の詳細を示す説明図である。It is explanatory drawing which shows the detail of the selection method of the information shown to Fig.1 (a). 優先キューの一例を示す説明図である。It is explanatory drawing which shows an example of a priority queue | queue. 巡回型キューの一例を示す説明図である。It is explanatory drawing which shows an example of a cyclic | annular queue. タグ付け型キューの一例を示す説明図である。It is explanatory drawing which shows an example of a tagging type | mold queue. プライオリティエンコーダの一例を示す説明図である。It is explanatory drawing which shows an example of a priority encoder. 2分木によるソータのハードウェアによる実現例を示す説明図である。It is explanatory drawing which shows the implementation example by the hardware of the sorter by a binary tree. ヒープ構造の一例を示す説明図である。It is explanatory drawing which shows an example of a heap structure. ヒープ構造における優先度情報の親子関係を示す説明図である。It is explanatory drawing which shows the parent-child relationship of the priority information in a heap structure. 配列で実現したヒープ構造の一例を示す説明図である。It is explanatory drawing which shows an example of the heap structure implement | achieved by the arrangement | sequence. 図17に示したヒープ構造に優先度7の情報を挿入する場合のアルゴリズムの例を示す説明図である。It is explanatory drawing which shows the example of the algorithm in the case of inserting the information of the priority 7 into the heap structure shown in FIG. 図18において情報を挿入した後のヒープ構造を示す説明図である。It is explanatory drawing which shows the heap structure after inserting information in FIG. 図17に示したヒープ構造から最も優先度が高い情報を削除するアルゴリズムの例を示す説明図である。It is explanatory drawing which shows the example of the algorithm which deletes the information with the highest priority from the heap structure shown in FIG. 図20において情報を削除した後のヒープ構造を示す説明図である。It is explanatory drawing which shows the heap structure after deleting information in FIG. 特許文献2に記載された、ヒープによるソータから最も高い優先度情報を削除する際のアルゴリズムを示す説明図である。It is explanatory drawing which shows the algorithm at the time of deleting the highest priority information described in the patent document 2 from the sorter by heap. 図22に示したヒープ構造の削除後の状態を示す説明図である。It is explanatory drawing which shows the state after deletion of the heap structure shown in FIG. 特許文献2に記載された、ヒープによるソータに優先度情報を挿入する際のアルゴリズムをヒープ構造で示す説明図である。It is explanatory drawing which shows the algorithm at the time of inserting priority information in the sorter by heap described in patent document 2 with a heap structure. 図24に示したヒープ構造の挿入後の状態を示す説明図である。It is explanatory drawing which shows the state after insertion of the heap structure shown in FIG.

Claims (6)

N個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ0からレイヤN−1とする場合、レイヤ0に対応するメモリ装置は、単一の情報を記憶し、(1≦i≦N−1)となるレイヤiに対応するメモリ装置は、各々iビットのアドレスで情報を識別し、
小数点以下を切り捨てた整数値を商とする除算演算子を「/」として、レイヤ1に対応するメモリ装置のアドレス0若しくはアドレス1で識別される情報を第1の情報とし、レイヤ0に対応するメモリ装置の情報を第2の情報とする場合、該第2の情報は該第1の情報の親に、該第1の情報は該第2の情報の子になる第1の関係と、(2≦j≦N−1)となるレイヤjに対応するメモリ装置のアドレスAで識別される情報を第3の情報とし、レイヤj−1に対応するメモリ装置のアドレスA/2で識別される情報を第4の情報とする場合、該第4の情報は該第3の情報の親に、該第3の情報は該第4の情報の子になる第2の関係に基づいて、2分木構造の情報における親子の対応関係が識別される分散メモリ手段と、
(1≦L≦N−1)となるレイヤLに対応する該分散メモリ手段のメモリ装置のアドレスにBが入力された場合、(1≦k≦L−1)となるレイヤkに対応する該分散メモリ手段のメモリ装置のアドレスに、各々、B/2(L−k)を入力することによって、レイヤLに対応する該分散メモリ手段のメモリ装置のアドレスBの情報から、レイヤ1に対応する該分散メモリ手段のメモリ装置のアドレスB/2(L−1)に至るまでの親子の対応関係にある情報を、同時に選択するアドレス入力手段と
を備えて構成したことを特徴とする2分木構造の情報を記憶する装置。
When the memory device is composed of N memory devices, and each of the memory devices corresponds to a layer 0 to a layer N−1, the memory device corresponding to the layer 0 stores a single piece of information (1 ≦ i Each of the memory devices corresponding to layer i satisfying ≦ N−1) identifies information by an i-bit address,
A division operator whose quotient is an integer value rounded down to the nearest decimal point is “/”, the information identified by address 0 or address 1 of the memory device corresponding to layer 1 is the first information, and the layer 0 corresponds When the memory device information is the second information, the second information is a parent of the first information, the first information is a child of the second information, and ( The information identified by the address A of the memory device corresponding to the layer j satisfying 2 ≦ j ≦ N−1) is the third information, and is identified by the address A / 2 of the memory device corresponding to the layer j−1. When the information is the fourth information, the fourth information is based on the second relation that becomes the parent of the third information, and the third information becomes the child of the fourth information. Distributed memory means for identifying the correspondence between the parent and child in the information of the tree structure;
When B is input to the address of the memory device of the distributed memory unit corresponding to the layer L that satisfies (1 ≦ L ≦ N−1), the layer k that corresponds to (1 ≦ k ≦ L−1) By inputting B / 2 (Lk) to the addresses of the memory devices of the distributed memory means, it corresponds to the layer 1 from the information of the address B of the memory devices of the distributed memory means corresponding to the layer L. A binary tree comprising: address input means for simultaneously selecting information in a correspondence relationship between a parent and a child up to an address B / 2 (L-1) of the memory device of the distributed memory means A device that stores structural information.
N個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ0からレイヤN−1とする場合、レイヤ0に対応するメモリ装置は、単一の情報を記憶し、(1≦i≦N−1)となるレイヤiに対応するメモリ装置は、各々iビットのアドレスで情報を識別し、
整数値の剰余を求める剰余演算子を「%」として、レイヤ1に対応するメモリ装置のアドレス0若しくはアドレス1で識別される情報を第1の情報とし、レイヤ0に対応するメモリ装置の情報を第2の情報とする場合、該第2の情報は該第1の情報の親に、該第1の情報は該第2の情報の子になる第1の関係と、(2≦j≦N−1)となるレイヤjに対応するメモリ装置のアドレスAで識別される情報を第3の情報とし、レイヤj−1に対応するメモリ装置のアドレスA%2(j−1)で識別される情報を第4の情報とする場合、該第4の情報は該第3の情報の親に、該第3の情報は該第4の情報の子になる第2の関係に基づいて、2分木構造の情報における親子の対応関係が識別される分散メモリ手段と、
(1≦L≦N−1)となるレイヤLに対応する、該分散メモリ手段のメモリ装置のアドレスにBが入力された場合、(1≦k≦L−1)となるレイヤkに対応する該分散メモリ手段のメモリ装置のアドレスに、各々B%2を入力することによって、レイヤLに対応する該分散メモリ手段のメモリ装置のアドレスBの情報から、レイヤ1に対応する該分散メモリ手段のメモリ装置のアドレスB%2に至るまでの親子の対応関係にある情報を、同時に選択するアドレス入力手段と
を備えて構成したことを特徴とする2分木構造の情報を記憶する装置。
When the memory device is composed of N memory devices, and each of the memory devices corresponds to a layer 0 to a layer N−1, the memory device corresponding to the layer 0 stores a single piece of information (1 ≦ i Each of the memory devices corresponding to layer i satisfying ≦ N−1) identifies information by an i-bit address,
The remainder operator for calculating the remainder of the integer value is “%”, the address 0 of the memory device corresponding to layer 1 or the information identified by address 1 is the first information, and the information of the memory device corresponding to layer 0 is In the case of second information, the second information is a parent of the first information, the first information is a child of the second information, and (2 ≦ j ≦ N -1) is the information identified by the address A of the memory device corresponding to the layer j, which is the third information, and is identified by the address A% 2 (j-1) of the memory device corresponding to the layer j-1. When the information is the fourth information, the fourth information is based on the second relation that becomes the parent of the third information, and the third information becomes the child of the fourth information. Distributed memory means for identifying the correspondence between the parent and child in the information of the tree structure;
When B is input to the address of the memory device of the distributed memory unit corresponding to the layer L satisfying (1 ≦ L ≦ N−1), it corresponds to the layer k satisfying (1 ≦ k ≦ L−1). The distributed memory means corresponding to layer 1 can be obtained from the information of the address B of the memory apparatus corresponding to layer L by inputting B% 2 k to the addresses of the memory devices of the distributed memory means. An apparatus for storing binary tree structure information, comprising: address input means for simultaneously selecting information corresponding to a parent-child relationship up to address B% 2 of the memory device of FIG.
N−1個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ1からレイヤN−1とする場合、レイヤ1に対応するメモリ装置は、単一の比較結果を記憶し、該比較結果は、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス0及びアドレス1で識別される情報に対応する比較結果となり、(2≦m≦N−1)となるレイヤmに対応するメモリ装置は、各々m−1ビットのアドレスで比較結果を識別し、アドレスDで識別される比較結果は、レイヤmに対応する前記分散メモリ手段のメモリ装置のアドレス2D及びアドレス2D+1で識別される情報に対応する比較結果となり、前記分散メモリ手段のメモリ装置に記憶された情報が更新された際に、該情報に対応する比較結果が更新される比較結果メモリ手段と、
レイヤ1に対応する該比較結果メモリ手段のメモリ装置に記憶された比較結果に基づいて、レイヤ1に対応するアドレスを生成し、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス0で識別される情報が高優先、若しくはアドレス1で識別される情報が存在しない場合は、生成されるアドレスは0となり、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス1で識別される情報が高優先、若しくはアドレス0で識別される情報が存在しない場合は、生成されるアドレスは1となり、さもなければ、生成されるアドレスは0か1の何れかとなり、
(2≦p≦N−1)となるレイヤpに対応する該比較結果メモリ手段のメモリ装置のアドレスに、各々レイヤp−1に対応するアドレスEp−1を入力することによって選択した比較結果に基づいて、レイヤpに対応するアドレスを各々生成し、レイヤpに対応する前記分散メモリ手段のメモリ装置のアドレス2Ep−1で識別される情報が高優先、若しくはアドレス2Ep−1+1で識別される情報が存在しない場合は、生成されるアドレスは2Ep−1となり、レイヤpに対応する前記分散メモリ手段のメモリ装置のアドレス2Ep−1+1で識別される情報が高優先、若しくはアドレス2Ep−1で識別される情報が存在しない場合は、生成されるアドレスは2Ep−1+1となり、さもなければ、生成されるアドレスは2Ep−1か2Ep−1+1の何れかとなるアドレス生成手段と
を備えて構成したことを特徴とする請求項1に記載の2分木構造の情報を記憶する装置。
When N-1 memory devices are configured and the layers corresponding to the memory devices are changed from layer 1 to layer N-1, the memory device corresponding to layer 1 stores a single comparison result, and The comparison result is a comparison result corresponding to information identified by address 0 and address 1 of the memory device of the distributed memory means corresponding to layer 1, and corresponds to layer m satisfying (2 ≦ m ≦ N−1). Each memory device identifies a comparison result with an address of m−1 bits, and the comparison result identified with address D is identified with address 2D and address 2D + 1 of the memory device of the distributed memory means corresponding to layer m. When the comparison result corresponding to the information is obtained and the information stored in the memory device of the distributed memory means is updated, the comparison result corresponding to the information is updated. And,
Based on the comparison result stored in the memory device of the comparison result memory means corresponding to layer 1, an address corresponding to layer 1 is generated and identified by address 0 of the memory device of the distributed memory means corresponding to layer 1 If the information to be processed has high priority or there is no information identified by address 1, the generated address is 0, and the information identified by address 1 of the memory device of the distributed memory means corresponding to layer 1 is If there is no information identified with high priority or address 0, the generated address will be 1, otherwise the generated address will be either 0 or 1,
Comparison result selected by inputting the address Ep-1 corresponding to the layer p-1 to the address of the memory device of the comparison result memory means corresponding to the layer p satisfying (2≤p≤N-1). Each of the addresses corresponding to the layer p is generated, and the information identified by the address 2E p-1 of the memory device of the distributed memory means corresponding to the layer p is high priority, or the address 2E p-1 +1 If there is no information to be identified, the generated address is 2E p-1 , and the information identified by the address 2E p-1 +1 of the memory device of the distributed memory means corresponding to layer p has high priority, or address 2E if information identified by p-1 is not present, the address to be generated 2E p-1 +1 becomes otherwise, the address generated 2E Device for storing information of a binary tree structure according -1 or 2E p-1 +1 by being configured a one to become the address generating means to claim 1, characterized in.
N−1個のメモリ装置から構成され、該メモリ装置が各々対応するレイヤをレイヤ1からレイヤN−1とする場合、レイヤ1に対応するメモリ装置は単一の比較結果を記憶し、該比較結果は、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス0及びアドレス1で識別される情報に対応する比較結果となり、(2≦m≦N−1)となるレイヤmに対応するメモリ装置は、各々m−1ビットのアドレスで比較結果を識別し、アドレスDで識別される比較結果は、レイヤmに対応する前記分散メモリ手段のメモリ装置のアドレスD及びアドレスD+2m−1で識別される情報に対応する比較結果となり、前記分散メモリ手段のメモリ装置に記憶された情報が更新された際に、該情報に対応する比較結果が更新される比較結果メモリ手段と、
レイヤ1に対応する該比較結果メモリ手段のメモリ装置に記憶された比較結果に基づいて、レイヤ1に対応するアドレスを生成し、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス0で識別される情報が高優先、若しくはアドレス1で識別される情報が存在しない場合は、生成されるアドレスは0となり、レイヤ1に対応する前記分散メモリ手段のメモリ装置のアドレス1で識別される情報が高優先、若しくはアドレス0で識別される情報が存在しない場合は、生成されるアドレスは1となり、さもなければ、生成されるアドレスは0か1の何れかとなり、
(2≦p≦N−1)となるレイヤpに対応する該比較結果メモリ手段のメモリ装置のアドレスに、各々レイヤp−1に対応するアドレスEp−1を入力することによって選択した比較結果に基づいて、レイヤpに対応するアドレスを各々生成し、レイヤpに対応する前記分散メモリ手段のメモリ装置のアドレスEp−1で識別される情報が高優先、若しくはアドレスEp−1+2m−1で識別される情報が存在しない場合は、生成されるアドレスはEp−1となり、レイヤpに対応する前記分散メモリ手段のメモリ装置のアドレスEp−1+2m−1で識別される情報が高優先、若しくはアドレスEp−1で識別される情報が存在しない場合は、生成されるアドレスはEp−1+2m−1となり、さもなければ、生成されるアドレスはEp−1かEp−1+2m−1の何れかとなるアドレス生成手段と
を備えて構成したことを特徴とする請求項2に記載の2分木構造の情報を記憶する装置。
When the memory device is composed of N−1 memory devices, and each of the memory devices corresponds to the layer 1 to the layer N−1, the memory device corresponding to the layer 1 stores a single comparison result, and the comparison The result is a comparison result corresponding to the information identified by address 0 and address 1 of the memory device of the distributed memory means corresponding to layer 1, and the memory corresponding to layer m satisfying (2 ≦ m ≦ N−1). The device identifies the comparison result with an address of m−1 bits each, and the comparison result identified with the address D is identified with the address D and the address D + 2 m−1 of the memory device of the distributed memory means corresponding to the layer m. When the information stored in the memory device of the distributed memory means is updated, the comparison result corresponding to the information is updated. Step and
Based on the comparison result stored in the memory device of the comparison result memory means corresponding to layer 1, an address corresponding to layer 1 is generated and identified by address 0 of the memory device of the distributed memory means corresponding to layer 1 If the information to be processed has high priority or there is no information identified by address 1, the generated address is 0, and the information identified by address 1 of the memory device of the distributed memory means corresponding to layer 1 is If there is no information identified with high priority or address 0, the generated address will be 1, otherwise the generated address will be either 0 or 1,
Comparison result selected by inputting the address Ep-1 corresponding to the layer p-1 to the address of the memory device of the comparison result memory means corresponding to the layer p satisfying (2≤p≤N-1). The address corresponding to the layer p is generated based on the information, and the information identified by the address E p-1 of the memory device of the distributed memory means corresponding to the layer p is high priority, or the address E p-1 +2 m If the information identified by −1 does not exist, the generated address is E p−1 , and is identified by the address E p−1 +2 m−1 of the memory device of the distributed memory means corresponding to the layer p. If the information has high priority or there is no information identified by the address E p−1 , the generated address is E p−1 +2 m−1 , otherwise the generated address The apparatus for storing information of the binary tree structure according to claim 2, further comprising: an address generation unit that is either E p-1 or E p-1 +2 m−1 .
請求項3又は4に記載の2分木構造の情報を記憶する装置に記憶される情報がヒープ構造であるヒープ構造の情報を記憶する装置であって、
前記分散メモリ手段から情報を出力する際に、レイヤ0に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1の状態である場合、該レイヤ0に対応する前記分散メモリ手段のメモリ装置に記憶された情報を削除して出力し、その結果、レイヤ0からレイヤN−1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が全て0の状態となる場合、前記分散メモリ手段からの情報の出力を終了し、
(1≦S≦N−1)となるレイヤSに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1以上の状態となる場合であって、且つ、レイヤS+1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が0の状態となる、若しくはレイヤSがレイヤN−1となる場合、該レイヤSに対応する前記分散メモリ手段のメモリ装置に記憶された情報数の値をCとすると、該レイヤSに対応する前記分散メモリ手段のメモリ装置のアドレスC−1の情報を削除して、挿入する情報とする情報出力手段と、
該情報出力手段による情報の削除の結果、(1≦T≦N−1)となるレイヤTに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が1以上の状態となる場合であって、且つ、レイヤT+1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が0の状態となる、若しくはレイヤTがレイヤN−1となる場合、該レイヤTに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が、前記アドレス生成手段が生成したレイヤTに対応するアドレスの値より大きければ、前記アドレス生成手段が生成したレイヤTに対応するアドレスを、該レイヤTに対応する前記分散メモリ手段のメモリ装置のアドレスに入力し、さもなければ、前記アドレス生成手段が生成したレイヤT−1に対応するアドレスを、レイヤT−1に対応する前記分散メモリ手段のメモリ装置のアドレスに入力して、前記アドレス入力手段により、レイヤ1からレイヤT若しくはレイヤT−1に対応する前記分散メモリ手段のメモリ装置の情報を同時に選択する第1の比較情報選択手段と、
該第1の比較情報選択手段によって情報が選択された場合は、前記分散メモリ手段のメモリ装置から選択された全ての情報を読み出して、挿入する情報と各々比較し、読み出した情報より、該挿入する情報の優先度が高ければ高優先、さもなければ低優先、或いは読み出した情報より、該挿入する情報の優先度が高いか等しければ高優先、さもなければ低優先とし、
比較の結果、レイヤUから読み出した情報より、該挿入する情報が低優先となる場合であって、且つ、レイヤU+1から読み出した情報より、該挿入する情報が高優先となる、若しくはレイヤU+1に対応する前記分散メモリ手段のメモリ装置の情報が選択されていない、若しくはレイヤUがレイヤN−1となる場合、レイヤ1から読み出した情報を、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に書き込み、(U≧2)の場合はレイヤ2からレイヤUまでのレイヤから読み出した情報を、該第1の比較情報選択手段によって選択されたレイヤ1からレイヤU−1に対応する前記分散メモリ手段のメモリ装置の情報に各々書き込み、且つ、該第1の比較情報選択手段によって選択されたレイヤUに対応する前記分散メモリ手段のメモリ装置の情報に、該挿入する情報を書き込み、
比較の結果、レイヤ1から読み出した情報より、該挿入する情報が高優先となる場合、若しくは該第1の比較情報選択手段によって情報が選択されなかった場合は、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に、該挿入する情報を書き込む第1の情報移動手段と
を備えて構成したことを特徴とするヒープ構造の情報を記憶する装置。
A device for storing information on a heap structure in which the information stored in the device for storing information on the binary tree structure according to claim 3 or 4 is a heap structure,
When outputting information from the distributed memory means, if the number of information stored in the memory device of the distributed memory means corresponding to layer 0 is 1, the memory of the distributed memory means corresponding to the layer 0 If the information stored in the device is deleted and output, and as a result, the number of information stored in the memory device of the distributed memory means corresponding to layer 0 to layer N-1 is all zero, the distributed Finish outputting information from the memory means,
The distribution corresponding to the layer S + 1 when the number of information stored in the memory device of the distributed memory means corresponding to the layer S corresponding to (1 ≦ S ≦ N−1) is 1 or more. When the number of information stored in the memory device of the memory means is 0, or when the layer S is layer N-1, the number of information stored in the memory device of the distributed memory means corresponding to the layer S If the value is C, the information output means for deleting the information of the address C-1 of the memory device of the distributed memory means corresponding to the layer S and making it information to be inserted;
This is a case where the number of pieces of information stored in the memory device of the distributed memory unit corresponding to the layer T satisfying (1 ≦ T ≦ N−1) is 1 or more as a result of deletion of information by the information output unit. And when the number of pieces of information stored in the memory device of the distributed memory means corresponding to the layer T + 1 is 0, or when the layer T is the layer N-1, the distributed memory corresponding to the layer T If the number of pieces of information stored in the memory device of the means is larger than the value of the address corresponding to the layer T generated by the address generation means, the address corresponding to the layer T generated by the address generation means is assigned to the layer T. Input to the address of the memory device of the corresponding distributed memory means, otherwise the address corresponding to the layer T-1 generated by the address generating means is the layer T-1 First, the address of the memory device of the distributed memory means corresponding to layer T to layer T or layer T-1 is simultaneously selected by the address input means by inputting the address of the memory device of the corresponding distributed memory means. Comparison information selection means,
When information is selected by the first comparison information selection means, all the information selected from the memory device of the distributed memory means is read out, compared with the information to be inserted, and the insertion is performed from the read information. If the priority of information to be high is high priority, otherwise low priority, or if the priority of the information to be inserted is higher than or equal to the read information, high priority, otherwise low priority,
As a result of comparison, the information to be inserted has a lower priority than the information read from the layer U, and the information to be inserted has a higher priority than the information read from the layer U + 1. When the corresponding memory device information of the distributed memory means is not selected or the layer U is layer N-1, the information read from the layer 1 is read from the memory device of the distributed memory means corresponding to the layer 0. In the case of (U ≧ 2), the information read from the layers from the layer 2 to the layer U is written in the information, and the distribution corresponding to the layer 1 to the layer U-1 selected by the first comparison information selection unit The distributed memory means corresponding to the layer U respectively written to the information of the memory device of the memory means and selected by the first comparison information selecting means The information of the memory device, writes the information to the insert,
As a result of the comparison, if the information to be inserted has higher priority than the information read from layer 1, or if the information is not selected by the first comparison information selection unit, the distributed memory corresponding to layer 0 An apparatus for storing information of a heap structure, comprising: first information moving means for writing information to be inserted into information of a memory device of the means.
請求項1から4のいずれか一項に記載の2分木構造の情報を記憶する装置に記憶される情報がヒープ構造であるヒープ構造の情報を記憶する装置、若しくは請求項5に記載のヒープ構造の情報を記憶する装置であって、
前記分散メモリ手段に情報を入力する際に、レイヤ0に対応する該分散メモリ手段のメモリ装置に記憶された情報数が1の状態である場合、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報を選択し、
(1≦Q≦N−1)となるレイヤQに対応する前記分散メモリ手段のメモリ装置に記憶された情報数が2未満の状態であり、且つ、レイヤQ−1に対応する前記分散メモリ手段のメモリ装置に記憶された情報数が2Q−1の状態となる場合、レイヤQに対応する前記分散メモリ手段のメモリ装置のアドレスに、レイヤQに対応する前記分散メモリ手段のメモリ装置に記憶された情報数の値を入力して、前記アドレス入力手段により、レイヤ1からレイヤQに対応する前記分散メモリ手段のメモリ装置の情報を同時に選択する第2の比較情報選択手段と、
該第2の比較情報選択手段によって情報が選択された場合は、レイヤ0からレイヤQ−1までの前記分散メモリ手段のメモリ装置から選択された情報を読み出して、入力する情報と各々比較し、読み出した情報より該入力する情報の優先度が高ければ高優先、さもなければ低優先、或いは読み出した情報より該入力する情報の優先度が高いか等しければ高優先、さもなければ低優先とし、
比較の結果、レイヤRから読み出した情報より該入力する情報が高優先となる場合であって、且つ、レイヤR−1から読み出した情報より該入力する情報が低優先となる、若しくはレイヤRがレイヤ0となる場合、レイヤRからレイヤQ−1までのレイヤから読み出した情報を、該第2の比較情報選択手段によって選択されたレイヤR+1からレイヤQに対応する前記分散メモリ手段のメモリ装置の情報に各々書き込み、且つ、該第2の比較情報選択手段によって選択されたレイヤRに対応する前記分散メモリ手段のメモリ装置の情報に、該入力する情報を書き込み、
比較の結果、レイヤQ−1から読み出した情報より該入力する情報が低優先となる場合、該第2の比較情報選択手段によって選択されたレイヤQに対応する前記分散メモリ手段のメモリ装置の情報に、該入力する情報を書き込み、
該第2の比較情報選択手段によって情報が選択されなかった場合は、レイヤ0に対応する前記分散メモリ手段のメモリ装置の情報に、該入力する情報を書き込む第2の情報移動手段と
を備えて構成したことを特徴とするヒープ構造の情報を記憶する装置。
The apparatus which memorize | stores the information of the heap structure whose information memorize | stored in the apparatus which memorize | stores the information of the binary tree structure as described in any one of Claim 1 to 4 is a heap structure, or the heap of Claim 5 A device for storing structural information,
When the number of pieces of information stored in the memory device of the distributed memory unit corresponding to layer 0 is 1 when inputting information to the distributed memory unit, the memory device of the distributed memory unit corresponding to layer 0 Select information for
The distributed memory in which the number of pieces of information stored in the memory device of the distributed memory unit corresponding to the layer Q satisfying (1 ≦ Q ≦ N−1) is less than 2Q and corresponding to the layer Q−1 When the number of pieces of information stored in the memory device of the means is in the state of 2Q-1 , the address of the memory device of the distributed memory means corresponding to layer Q is set to the memory device of the distributed memory means corresponding to layer Q. Second comparison information selection means for inputting the value of the number of stored information and simultaneously selecting information of the memory devices of the distributed memory means corresponding to layer 1 to layer Q by the address input means;
When information is selected by the second comparison information selection means, the information selected from the memory devices of the distributed memory means from layer 0 to layer Q-1 is read and compared with the input information, If the priority of the information to be input is higher than the read information, the priority is high, otherwise low priority, or if the priority of the information to be input is higher than the read information, high priority, otherwise low priority,
As a result of the comparison, the input information has a higher priority than the information read from the layer R, and the input information has a lower priority than the information read from the layer R-1, or the layer R In the case of layer 0, the information read from the layers R to Q-1 is read from the memory device of the distributed memory unit corresponding to the layer R + 1 to the layer Q selected by the second comparison information selecting unit. Each of the information is written, and the input information is written in the information of the memory device of the distributed memory unit corresponding to the layer R selected by the second comparison information selection unit,
As a result of the comparison, when the input information has a lower priority than the information read from the layer Q-1, information on the memory device of the distributed memory unit corresponding to the layer Q selected by the second comparison information selection unit To write the information to be input,
When information is not selected by the second comparison information selection unit, the second comparison unit includes a second information moving unit that writes the input information to the information of the memory device of the distributed memory unit corresponding to the layer 0. An apparatus for storing information of a heap structure characterized by being configured.
JP2005304336A 2005-10-19 2005-10-19 Device for storing binary tree structure information and device for storing heap structure information Expired - Fee Related JP4391464B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005304336A JP4391464B2 (en) 2005-10-19 2005-10-19 Device for storing binary tree structure information and device for storing heap structure information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005304336A JP4391464B2 (en) 2005-10-19 2005-10-19 Device for storing binary tree structure information and device for storing heap structure information

Publications (2)

Publication Number Publication Date
JP2007114944A JP2007114944A (en) 2007-05-10
JP4391464B2 true JP4391464B2 (en) 2009-12-24

Family

ID=38097071

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005304336A Expired - Fee Related JP4391464B2 (en) 2005-10-19 2005-10-19 Device for storing binary tree structure information and device for storing heap structure information

Country Status (1)

Country Link
JP (1) JP4391464B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7966336B2 (en) * 2007-11-30 2011-06-21 Palo Alto Research Center Incorporated Bounded sub-optimal problem solving
CN105094825B (en) * 2015-07-21 2018-11-06 中国科学院信息工程研究所 A kind of memory variable distribution dynamic discovery method

Also Published As

Publication number Publication date
JP2007114944A (en) 2007-05-10

Similar Documents

Publication Publication Date Title
JP6535253B2 (en) Method and apparatus for utilizing multiple linked memory lists
US10545865B2 (en) Systems and methods for implementing low-latency lookup circuits using sparse hash functions
JP5529976B2 (en) Systolic array architecture for high-speed IP lookup
TWI250424B (en) Method and apparatus for enhancing multiway radix tree
US10698831B2 (en) Method and apparatus for data access
JPH0856230A (en) Switching system
US10417304B2 (en) Dual phase matrix-vector multiplication system
US9892149B2 (en) Parallelized in-place radix sorting
US8693615B2 (en) RAM-based event counters using transposition
US11354094B2 (en) Hierarchical sort/merge structure using a request pipe
JP4391464B2 (en) Device for storing binary tree structure information and device for storing heap structure information
US9823896B2 (en) Parallelized in-place radix sorting
WO2019156060A1 (en) Parallel union control device, parallel union control method, and storage medium
US20210082082A1 (en) Data processing method and processing circuit
US8495275B2 (en) List structure control circuit
CN114546329B (en) Method, apparatus and medium for implementing data parity rearrangement
JP3506612B2 (en) Scheduling control device
CN116820344B (en) Memory access circuit, memory access method, integrated circuit, and electronic device
CN117891758B (en) Memory access system, processor and computing device based on arbitration
WO2022017593A1 (en) Hardware based pipelined sorter
JP2023041098A (en) Data processing device, data processing method and program
CN117713800A (en) Multi-bit wide binary multiplexer and method and system for reducing fan-out thereof
Suzuki et al. Concurrent heap-based network sort engine-toward enabling massive and high speed per-flow queuing
CN114546328A (en) Method, apparatus and medium for implementing data arrangement
CN116126920A (en) Data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20070614

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20070614

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080206

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20081017

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091006

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091007

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121016

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121016

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131016

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees