JP2003224581A - Longest match search circuit and method, program and recording medium - Google Patents
Longest match search circuit and method, program and recording mediumInfo
- Publication number
- JP2003224581A JP2003224581A JP2002024068A JP2002024068A JP2003224581A JP 2003224581 A JP2003224581 A JP 2003224581A JP 2002024068 A JP2002024068 A JP 2002024068A JP 2002024068 A JP2002024068 A JP 2002024068A JP 2003224581 A JP2003224581 A JP 2003224581A
- Authority
- JP
- Japan
- Prior art keywords
- bit
- entry data
- search
- node
- interest
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
(57)【要約】
【課題】 大規模なパトリシアツリーを用いた検索方法
を高速かつ経済的に実現する。
【解決手段】 パトリシアツリーを構成するノードのア
ドレスと、このアドレスに対応するエントリーデータの
着目ビット位置に関する情報と、この着目ビット位置に
対応するエントリーデータの取り得る値に対する行き先
ノードまたは終端点の情報とをRAM等の安価なメモリ
を用いて記録し、パトリシアツリーの始点から下流に向
かうノード毎に順次その着目ビットの値にしたがってエ
ントリーデータの行き先ノードまたは終端点を検索す
る。
(57) [Summary] [PROBLEMS] To realize a high-speed and economical search method using a large-scale Patricia tree. SOLUTION: The address of a node constituting a Patricia tree, information on a bit position of interest of entry data corresponding to this address, and information on a destination node or a termination point with respect to a possible value of entry data corresponding to this bit position of interest Are recorded using an inexpensive memory such as a RAM, and the destination node or the end point of the entry data is sequentially searched for each node going downstream from the start point of the Patricia tree according to the value of the bit of interest.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、パトリシアツリー
を用いたデータ検索に利用する。特に、ルーティングテ
ーブル検索システムに利用するに適する。TECHNICAL FIELD The present invention is used for data retrieval using a Patricia tree. In particular, it is suitable for use in a routing table search system.
【0002】[0002]
【従来の技術】従来のルーティングテーブル検索システ
ム等に用いられるパトリシアツリーの構成を図9に示
す。パトリシアツリーを用いた最長一致検索は、エント
リーデータの数字のうち、できるだけ長いビットが一致
するものを検索し、その条件で次のルータ(NHR)向
けの出力ポートやその他の優先制御等を行う。それらN
HR等の情報は図10のメモリに格納されている。2. Description of the Related Art FIG. 9 shows the structure of a Patricia tree used in a conventional routing table search system or the like. In the longest match search using a Patricia tree, the longest possible bit match among the numbers of the entry data is searched, and the output port for the next router (NHR) and other priority control are performed under that condition. Those N
Information such as HR is stored in the memory of FIG.
【0003】図9の例ではエントリーデータのうち、例
えば0001であれば#a4というアドレス情報を格納
したメモリの#a4の内容を読み4番ポートへ出力す
る。一方、エントリーデータで0010の場合は、上か
ら同様にツリーを検索し、1ビット目が0、2ビット目
が0、3ビット目が1で、終端点を見つけ#a2という
値を得て、NHRは2となる。In the example of FIG. 9, if the entry data is, for example, 0001, the contents of # a4 of the memory storing the address information of # a4 is read and output to the 4th port. On the other hand, when the entry data is 0010, the tree is searched in the same manner from the above, the first bit is 0, the second bit is 0, the third bit is 1, the end point is found, and the value # a2 is obtained. NHR is 2.
【0004】従来、パトリシアツリーを用いた検索方法
の実現例としては、CAM(連想メモリ)を用いたもの
がある。図11に示すように、CAMは、格納されてい
るデータの上位(上の方のアドレス)が優先で、上から
サーチして、一致した場所で止まり、その内容を読出す
ものである。Conventionally, as an example of implementation of a search method using a Patricia tree, there is one using a CAM (associative memory). As shown in FIG. 11, in the CAM, the higher order (upper address) of the stored data is prioritized, the search is performed from the top, the stop is made at the coincident position, and the content is read.
【0005】[0005]
【発明が解決しようとする課題】このように、CAMに
よりパトリシアツリーを用いた検索方法を実現して、先
に説明した最長一致検索を行うことができるが、CAM
の容量には限界があり、大規模にはできない。また、原
理的にアドレスを同時に多く探すので、非常に大きな消
費電力を要し、かつ高価であるため、経済的ではない。As described above, the search method using the Patricia tree can be realized by the CAM to perform the longest match search described above.
There is a limit to the capacity of, and it cannot be done on a large scale. In addition, since many addresses are searched at the same time in principle, very large power consumption is required and it is expensive, which is not economical.
【0006】本発明は、このような背景に行われたもの
であって、大規模なパトリシアツリーを用いた検索方法
を高速かつ経済的に実現することができる最長一致検索
回路および方法およびプログラムおよび記録媒体を提供
することを目的とする。The present invention has been made against such a background, and is a longest-match search circuit, method, program, and program capable of realizing a search method using a large-scale Patricia tree at high speed and economically. The purpose is to provide a recording medium.
【0007】[0007]
【課題を解決するための手段】本発明は、パトリシアツ
リーの構造をRAM等のメモリを用いたテーブルに記録
できる形に置き換えることを第一の特徴とする。The first feature of the present invention is to replace the structure of the Patricia tree with a form that can be recorded in a table using a memory such as a RAM.
【0008】すなわち、パトリシアツリーを構成するノ
ードのアドレスと、このアドレスに対応するエントリー
データの着目ビット位置に関する情報と、この着目ビッ
ト位置に対応するエントリーデータの取り得る値に対す
る行き先ノードまたは終端点の情報とをパトリシアツリ
ー接続テーブルとして記録することを特徴とする。前記
着目ビット位置は、パトリシアツリーの始点から下流に
向かう段毎に順次先頭ビットから1ビットずつ下位ビッ
トに移行する。これにより、大規模なパトリシアツリー
であってもRAM等の安価なメモリを用いて記録するこ
とができるので経済的である。That is, the address of the node forming the Patricia tree, the information on the target bit position of the entry data corresponding to this address, and the destination node or terminal point for the possible value of the entry data corresponding to this target bit position. The information is recorded as a Patricia tree connection table. The bit position of interest shifts from the head bit to the lower bit one bit at a time from the start point of the Patricia tree to the downstream side. As a result, even a large-scale Patricia tree can be recorded using an inexpensive memory such as RAM, which is economical.
【0009】このようにRAM等のメモリを用いたパト
リシアツリー接続テーブルを用いて最長一致検索を行う
ための構成を本発明の第二の特徴とする。本発明では、
前記テーブルにおけるパトリシアツリーの始点から下流
に向かうノード毎に順次その着目ビットの値にしたがっ
てエントリーデータの行き先ノードまたは終端点を検索
するので、ツリー構造の末端まで到達する以前に終端点
にヒットすれば、その時点で検索を終了することができ
るため、最長一致検索を高速に行うことができることを
特徴とする。A second feature of the present invention is a configuration for performing the longest match search using the Patricia tree connection table using a memory such as a RAM. In the present invention,
Since the destination node or end point of the entry data is sequentially searched according to the value of the bit of interest for each node going downstream from the start point of the Patricia tree in the table, if the end point is hit before reaching the end of the tree structure, Since the search can be terminated at that point, the longest match search can be performed at high speed.
【0010】すなわち、本発明の第一の観点は、パトリ
シアツリーを構成するノードのアドレスと、このアドレ
スに対応するエントリーデータの着目ビット位置に関す
る情報と、この着目ビット位置に対応するエントリーデ
ータの取り得る値に対する行き先ノードまたは終端点の
情報とが記録されたパトリシアツリー接続テーブルを備
え、前記着目ビット位置は、パトリシアツリーの始点か
ら下流に向かう段毎に順次先頭ビットから1ビットずつ
下位ビットに移行し、前記テーブルにおけるパトリシア
ツリーの始点から下流に向かうノード毎に順次その着目
ビットの値にしたがってエントリーデータの行き先ノー
ドまたは終端点を検索する手段を備えたことを特徴とす
る最長一致検索回路である。That is, a first aspect of the present invention is to obtain an address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and an entry data corresponding to the target bit position. A Patricia tree connection table in which information about a destination node or an end point for the obtained value is recorded is provided, and the bit position of interest is sequentially shifted from the head bit to the lower bit by one bit for each stage from the start point to the downstream of the Patricia tree. However, the longest match search circuit is provided with means for sequentially searching the destination node or the end point of the entry data according to the value of the bit of interest for each node going downstream from the starting point of the Patricia tree in the table. .
【0011】さらに、高速化を図る構成として、前記テ
ーブルにおけるパトリシアツリーの始点から下流に向か
うノードの着目ビット毎にエントリーデータの行き先ノ
ードまたは終端点をそれぞれ並行して検索する手段を複
数備え、この検索する手段は、自己の検索結果が終端点
を示すときにはその検索結果をエントリーデータの最長
一致検索結果として出力し、自己の検索結果が次段のノ
ードのアドレスを示すときには、エントリーデータを着
目ビット位置が自己よりも一つ下位の次段の検索する手
段に引き渡す手段を備えることもできる。Further, as a structure for increasing the speed, there is provided a plurality of means for retrieving the destination node or the end point of the entry data in parallel for each bit of interest of the node going downstream from the start point of the Patricia tree in the table. The means for searching outputs the search result as the longest match search result of the entry data when the self search result indicates the terminal point, and when the self search result indicates the address of the node of the next stage, the entry data It is also possible to provide a means for handing over to a searching means at a next stage whose position is one lower than itself.
【0012】これによれば、パトリシアツリーの各段に
相当する部分が並列処理を行っているので、一つのエン
トリーデータの検索結果が出るまで次のエントリーデー
タのエントリーを待つことなく、連続的に複数のエント
リーデータをエントリーさせることができるため、高速
処理を行うことができる。According to this, since the parts corresponding to the respective stages of the Patricia tree are performing the parallel processing, the entry of the next entry data is not continuously waited until the search result of one entry data is obtained. Since a plurality of entry data can be entered, high speed processing can be performed.
【0013】他の高速化を図る構成として、前記テーブ
ルにおけるパトリシアツリーの始点から下流に向かうk
(kは自然数)段目までのノード毎に順次その着目ビッ
トの値にしたがってエントリーデータの行き先ノードま
たは終端点を検索する第一検索手段と、前記テーブルに
おける(k+1)段目以降の複数のサブツリー毎に、そ
のサブツリーの始点から下流に向かうノード毎に順次そ
の着目ビットの値にしたがってエントリーデータの行き
先ノードまたは終端点をそれぞれ並行して検索する複数
の第二検索手段と、この第二検索手段の複数の検索結果
の中から前記第一検索手段の検索結果に基づきいずれか
一つを最終的な最長一致検索結果として選択する手段と
を備えることもできる。As another configuration for increasing the speed, k from the starting point of the Patricia tree in the table to the downstream side
(K is a natural number) First search means for sequentially searching the destination node or terminal point of the entry data according to the value of the bit of interest for each node up to the (k + 1) th stage, and a plurality of subtrees after the (k + 1) th stage in the table. A plurality of second search means for sequentially searching destination nodes or end points of entry data in parallel according to the value of the bit of interest for each node going downstream from the start point of the subtree. And a means for selecting any one of the plurality of search results based on the search result of the first search means as a final longest match search result.
【0014】これによれば、パトリシアツリーを適当な
ところから上下に分割し、上部分は上部分で最長一致検
索を実行し、下部分は下部分で最長一致検索を実行す
る。このとき、上部分は、パトリシアツリーの始点から
検索を開始するので、エントリーデータに対する検索結
果は一つに定まるが、下部分は、複数のサブツリーに分
かれており、それぞれのサブツリー毎に検索を開始する
ので、エントリーデータに対する検索結果も複数存在す
る。このようにして上部分と下部分とでそれぞれ検索結
果が定まった時点で、上部分の検索結果に基づき下部分
の複数の検索結果のいずれか一つを最終的な検索結果と
して選択する。このようにして、一つのパトリシアツリ
ーを上下に分割し、並列処理を行うことができるので、
検索時間を高速化することができる。According to this, the Patricia tree is vertically divided from an appropriate place, the upper part performs the longest match search in the upper part, and the lower part executes the longest match search in the lower part. At this time, the upper part starts the search from the starting point of the Patricia tree, so the search result for the entry data is set to one, but the lower part is divided into multiple subtrees and the search is started for each subtree. Therefore, there are a plurality of search results for the entry data. In this way, when the search results for the upper part and the lower part are determined, one of the plurality of search results for the lower part is selected as the final search result based on the search result for the upper part. In this way, one Patricia tree can be split up and down and parallel processing can be performed.
The search time can be shortened.
【0015】他の高速化を図る構成として、前記テーブ
ルにおけるパトリシアツリーの始点から下流に向かうk
段目までのノード毎に順次その着目ビットの値にしたが
って複数のエントリーデータの行き先ノードまたは終端
点を並行して検索する複数の第三検索手段が設けられ、
前記テーブルにおける(k+1)段目以降の複数のサブ
ツリー毎に、そのサブツリーの始点から下流に向かうノ
ード毎に順次その着目ビットの値にしたがってエントリ
ーデータの行き先ノードまたは終端点をそれぞれ並行し
て検索する複数の第四検索手段が設けられ、複数の前記
第三検索手段の検索結果に基づき前記第三検索手段から
出力されるエントリーデータをその行き先ノードに振り
分けるあるいは前記第三検索手段により検索された終端
点を最長一致検索結果出力に振り分ける手段が設けら
れ、前記第四検索手段は、この振り分ける手段により振
り分けられたエントリーデータについて前記サブツリー
の始点から下流に向かうノード毎に順次その着目ビット
の値にしたがって終端点を検索する手段を備えることも
できる。As another configuration for increasing the speed, k from the starting point of the Patricia tree in the table to the downstream side
A plurality of third search means are provided for searching destination nodes or termination points of a plurality of entry data in parallel according to the value of the bit of interest for each node up to the stage,
For each of a plurality of (k + 1) th and subsequent subtrees in the table, a destination node or an end point of entry data is sequentially searched in parallel for each node from the start point of the subtree to the downstream side according to the value of the bit of interest. A plurality of fourth search means are provided, and the entry data output from the third search means is distributed to the destination node based on the search results of the plurality of third search means or the terminal searched by the third search means. Means for allocating points to the longest match search result output is provided, and the fourth search means sequentially, for each node going downstream from the starting point of the subtree, for the entry data distributed by this allocating means, according to the value of the bit of interest. It is also possible to provide a means for searching the end point.
【0016】これは、複数のパトリシアツリーを用いて
同時に複数のエントリーデータを並列処理することによ
り高速化を図るという発想に基づく構成であるが、本発
明では、パトリシアツリーを適当なところから上下に分
割し、上部分は複製を複数用意するが、下部分は一つの
ツリーを共用することにより、メモリ量を低く抑えるこ
とを特徴とする。すなわち、複数の上部分で複数のエン
トリーデータを並列処理し、それぞれの検索結果が出た
時点で、エントリーデータを一つの下部分のそれぞれの
行き先ノードに振り分ける。このとき、下部分の同じノ
ードに複数のエントリーデータがほぼ同時に振り分けら
れる場合を想定し、前記振り分ける手段により振り分け
られたエントリーデータを一時蓄積する手段が設けら
れ、この一時蓄積する手段は、一つのノードに対して複
数のエントリーデータが蓄積されたときには、蓄積され
たエントリーデータを一つずつ当該ノードにエントリー
する手段を備えることが望ましい。This is a structure based on the idea that a plurality of entry data are simultaneously processed in parallel by using a plurality of Patricia trees to increase the speed. However, in the present invention, the Patricia trees are moved up and down from an appropriate position. Although it is divided and the upper part prepares a plurality of replicas, the lower part is characterized by keeping the memory amount low by sharing one tree. That is, a plurality of entry data are processed in parallel in a plurality of upper parts, and when each search result is obtained, the entry data is distributed to each destination node in one lower part. At this time, assuming a case where a plurality of entry data are distributed to the same node in the lower part almost at the same time, means for temporarily storing the entry data distributed by the distribution means is provided, and this temporary storage means is When a plurality of entry data are stored in a node, it is desirable to provide a means for entering the stored entry data into the node one by one.
【0017】これにより、複数のパトリシアツリーの全
体を用意する場合と比較して低いメモリ量により複数の
エントリーデータを並列処理し、最長一致検索を高速に
行うことができる。As a result, a plurality of entry data can be processed in parallel with a smaller amount of memory than in the case of preparing a plurality of Patricia trees as a whole, and the longest match search can be performed at high speed.
【0018】本発明の第二の観点は、情報処理装置にイ
ンストールすることにより、その情報処理装置に、最長
一致検索回路に相応する機能として、パトリシアツリー
を構成するノードのアドレスと、このアドレスに対応す
るエントリーデータの着目ビット位置に関する情報と、
この着目ビット位置に対応するエントリーデータの取り
得る値に対する行き先ノードまたは終端点の情報とが記
録されたパトリシアツリー接続テーブルに相応する機能
を実現させ、前記着目ビット位置は、パトリシアツリー
の始点から下流に向かう段毎に順次先頭ビットから1ビ
ットずつ下位ビットに移行し、前記テーブルにおけるパ
トリシアツリーの始点から下流に向かうノード毎に順次
その着目ビットの値にしたがってエントリーデータの行
き先ノードまたは終端点を検索する機能を実現させるこ
とを特徴とするプログラムである。According to a second aspect of the present invention, when installed in an information processing device, the information processing device has, as a function corresponding to a longest match search circuit, an address of a node forming a Patricia tree and the address of this node. Information on the bit position of interest of the corresponding entry data,
The function corresponding to the Patricia tree connection table in which the information of the destination node or the terminal point for the possible value of the entry data corresponding to the bit position of interest is recorded is realized, and the bit position of interest is located downstream from the start point of the Patricia tree. For each stage going to the lower bit, one bit at a time from the first bit to the lower bit, and for each node going downstream from the start point of the Patricia tree in the table, the destination node or end point of the entry data is sequentially searched according to the value of the bit of interest. It is a program that realizes the function of performing.
【0019】あるいは、前記テーブルにおけるパトリシ
アツリーの始点から下流に向かうノードの着目ビット毎
にエントリーデータの行き先ノードまたは終端点をそれ
ぞれ並行して検索する機能を複数実現させ、この検索す
る機能として、自己の検索結果が終端点を示すときには
その検索結果をエントリーデータの最長一致検索結果と
して出力し、自己の検索結果が次段のノードのアドレス
を示すときには、エントリーデータを着目ビット位置が
自己よりも一つ下位の次段の検索する手段に引き渡す機
能を実現させることを特徴とするプログラムである。Alternatively, a plurality of functions for searching the destination node or the terminal point of the entry data in parallel for each bit of interest of the node going downstream from the starting point of the Patricia tree in the table are realized, and this searching function is When the search result of indicates the end point, the search result is output as the longest match search result of the entry data, and when the search result of itself indicates the address of the node of the next stage, the entry data is set so that the bit position of interest is It is a program that realizes a function to be handed over to a search means in the next lower stage.
【0020】あるいは、前記テーブルにおけるパトリシ
アツリーの始点から下流に向かうk段目までのノード毎
に順次その着目ビットの値にしたがってエントリーデー
タの行き先ノードまたは終端点を検索する第一検索機能
と、前記テーブルにおける(k+1)段目以降の複数の
サブツリー毎に、そのサブツリーの始点から下流に向か
うノード毎に順次その着目ビットの値にしたがってエン
トリーデータの行き先ノードまたは終端点をそれぞれ並
行して検索する複数の第二検索機能と、この第二検索機
能の複数の検索結果の中から前記第一検索機能の検索結
果に基づきいずれか一つを最終的な最長一致検索結果と
して選択する機能とを実現させることを特徴とするプロ
グラムである。Alternatively, a first search function for sequentially searching the destination node or terminal point of the entry data according to the value of the bit of interest for each node from the starting point of the Patricia tree in the table to the k-th stage going downstream, For each of a plurality of (k + 1) th and subsequent subtrees in the table, a destination node or an end point of the entry data is sequentially searched in parallel according to the value of the bit of interest for each node from the starting point of the subtree to the downstream side. And the function of selecting any one of the plurality of search results of the second search function as the final longest-match search result based on the search result of the first search function. It is a program characterized by that.
【0021】あるいは、前記テーブルにおけるパトリシ
アツリーの始点から下流に向かうk段目までのノード毎
に順次その着目ビットの値にしたがって複数のエントリ
ーデータの行き先ノードまたは終端点を並行して検索す
る複数の第三検索機能を実現させ、前記テーブルにおけ
る(k+1)段目以降の複数のサブツリー毎に、そのサ
ブツリーの始点から下流に向かうノード毎に順次その着
目ビットの値にしたがってエントリーデータの行き先ノ
ードまたは終端点をそれぞれ並行して検索する複数の第
四検索機能を実現させ、複数の前記第三検索機能の検索
結果に基づき前記第三検索機能から出力されるエントリ
ーデータをその行き先ノードに振り分けるあるいは前記
第三検索機能により検索された終端点を最長一致検索結
果出力に振り分ける機能を実現させ、前記第四検索機能
として、この振り分ける機能により振り分けられたエン
トリーデータについて前記サブツリーの始点から下流に
向かうノード毎に順次その着目ビットの値にしたがって
終端点を検索する機能を実現させることを特徴とするプ
ログラムである。Alternatively, a plurality of destination data nodes or terminal points of a plurality of entry data are sequentially searched in parallel for each node from the starting point of the Patricia tree in the table to the k-th stage going downstream, according to the value of the bit of interest. The third search function is realized, and for each of a plurality of subtrees from the (k + 1) th stage onward in the table, a destination node or a terminal of the entry data is sequentially added to each node from the start point of the subtree to the downstream side according to the value of the bit of interest. A plurality of fourth search functions for searching points in parallel are realized, and the entry data output from the third search function is distributed to the destination node based on the search results of the plurality of third search functions, or (3) The end points searched by the search function are distributed to the longest match search result output. A function is realized, and as the fourth search function, a function of sequentially searching the end point according to the value of the bit of interest for each node going downstream from the start point of the subtree for the entry data distributed by this distribution function is realized. It is a program characterized by that.
【0022】さらに、前記振り分ける機能により振り分
けられたエントリーデータを一時蓄積する機能を実現さ
せ、この一時蓄積する機能として、一つのノードに対し
て複数のエントリーデータが蓄積されたときには、蓄積
されたエントリーデータを一つずつ当該ノードにエント
リーする機能を実現させることが望ましい。Further, a function of temporarily storing the entry data distributed by the distribution function is realized, and as a function of temporarily storing the plurality of entry data for one node, the accumulated entries are stored. It is desirable to realize the function of entering data one by one into the relevant node.
【0023】本発明の第三の観点は、本発明のプログラ
ムが記録された前記情報処理装置読み取り可能な記録媒
体である。本発明のプログラムは本発明の記録媒体に記
録されることにより、前記情報処理装置は、この記録媒
体を用いて本発明のプログラムをインストールすること
ができる。あるいは、本発明のプログラムを保持するサ
ーバからネットワークを介して直接前記情報処理装置に
本発明のプログラムをインストールすることもできる。A third aspect of the present invention is a recording medium readable by the information processing device, in which the program of the present invention is recorded. By recording the program of the present invention on the recording medium of the present invention, the information processing apparatus can install the program of the present invention using this recording medium. Alternatively, the program of the present invention can be installed in the information processing apparatus directly from a server holding the program of the present invention via a network.
【0024】これにより、コンピュータ装置等の情報処
理装置により、大規模なパトリシアツリーを用いた検索
方法を高速かつ経済的に実現することができる最長一致
検索回路を実現することができる。As a result, an information processing device such as a computer can realize a longest-match search circuit capable of realizing a search method using a large-scale Patricia tree at high speed and economically.
【0025】本発明の第四の観点は、パトリシアツリー
を構成するノードのアドレスと、このアドレスに対応す
るエントリーデータの着目ビット位置に関する情報と、
この着目ビット位置に対応するエントリーデータの取り
得る値に対する行き先ノードまたは終端点の情報とをパ
トリシアツリー接続テーブルとして記録し、前記着目ビ
ット位置は、パトリシアツリーの始点から下流に向かう
段毎に順次先頭ビットから1ビットずつ下位ビットに移
行し、前記テーブルにおけるパトリシアツリーの始点か
ら下流に向かうノード毎に順次その着目ビットの値にし
たがってエントリーデータの行き先ノードまたは終端点
を検索することを特徴とする最長一致検索方法である。According to a fourth aspect of the present invention, an address of a node forming a Patricia tree and information on a bit position of interest of entry data corresponding to this address,
The information of the destination node or the terminal point for the possible values of the entry data corresponding to the bit position of interest is recorded as a Patricia tree connection table, and the bit position of interest is sequentially headed for each stage from the start point of the Patricia tree to the downstream side. The longest feature is that the destination node or the end point of the entry data is sequentially searched according to the value of the bit of interest for each node moving from the start point of the Patricia tree in the table to the lower bit one by one to the lower bit. It is a match search method.
【0026】あるいは、前記テーブルにおけるパトリシ
アツリーの始点から下流に向かうノードの着目ビット毎
にエントリーデータの行き先ノードまたは終端点をそれ
ぞれ並行して検索し、このときに、検索結果が終端点を
示すときにはその検索結果をエントリーデータの最長一
致検索結果として出力し、検索結果が次段のノードのア
ドレスを示すときには、エントリーデータを着目ビット
位置が当該検索よりも一つ下位の検索にかけることを特
徴とする最長一致検索方法である。Alternatively, the destination node or the terminal point of the entry data is searched in parallel for each bit of interest of the node that goes downstream from the starting point of the Patricia tree in the table, and when the search result indicates the terminal point, The search result is output as the longest match search result of the entry data, and when the search result indicates the address of the node at the next stage, the entry data is subjected to the search one bit lower in the bit position of interest. Is the longest match search method.
【0027】あるいは、前記テーブルにおけるパトリシ
アツリーの始点から下流に向かうk段目までのノード毎
に順次その着目ビットの値にしたがってエントリーデー
タの行き先ノードまたは終端点を第一検索として検索
し、前記テーブルにおける(k+1)段目以降の複数の
サブツリー毎に、そのサブツリーの始点から下流に向か
うノード毎に順次その着目ビットの値にしたがってエン
トリーデータの行き先ノードまたは終端点をそれぞれ第
二検索として並行して検索し、この第二検索による複数
の検索結果の中から前記第一検索による検索結果に基づ
きいずれか一つを最終的な最長一致検索結果として選択
することを特徴とする最長一致検索方法である。Alternatively, the destination node or the terminal point of the entry data is sequentially searched as a first search according to the value of the bit of interest for each node from the starting point of the Patricia tree in the table to the k-th stage downstream. For each of a plurality of subtrees after the (k + 1) th stage in, the destination node or the end point of the entry data is sequentially paralleled as a second search according to the value of the bit of interest for each node from the start point of the subtree to the downstream side. The longest match search method is characterized by searching and selecting one of the plurality of search results of the second search as a final longest match search result based on the search result of the first search. .
【0028】あるいは、前記テーブルにおけるパトリシ
アツリーの始点から下流に向かうk段目までのノード毎
に順次その着目ビットの値にしたがってエントリーデー
タの行き先ノードまたは終端点を検索する第三検索を複
数のエントリーデータについて並行に行い、前記テーブ
ルにおける(k+1)段目以降の複数のサブツリー毎
に、そのサブツリーの始点から下流に向かうノード毎に
順次その着目ビットの値にしたがってエントリーデータ
の行き先ノードまたは終端点をそれぞれ第四検索として
並行して検索し、前記第三検索による検索結果に基づき
前記第三検索により出力されるエントリーデータをその
行き先ノードに振り分けるあるいは前記第三検索により
検索された終端点を最長一致検索結果出力に振り分け、
前記第四検索では、この振り分けにより振り分けられた
エントリーデータについて前記サブツリーの始点から下
流に向かうノード毎に順次その着目ビットの値にしたが
って終端点を検索することを特徴とする最長一致検索方
法である。Alternatively, for each node from the starting point of the Patricia tree in the table to the k-th stage going downstream, the third search for sequentially searching the destination node or terminal point of the entry data in accordance with the value of the bit of interest is made into a plurality of entries. The data is performed in parallel, and for each of a plurality of subtrees from the (k + 1) th stage in the table, the destination node or the end point of the entry data is sequentially determined according to the value of the bit of interest for each node going downstream from the start point of the subtree. Each of them is searched in parallel as a fourth search, and the entry data output by the third search is distributed to the destination node based on the search result by the third search or the end point searched by the third search is the longest match. Allocate to search result output,
The fourth search is a longest match search method characterized in that, for the entry data sorted by this sorting, the end point is sequentially searched for each node going downstream from the start point of the subtree according to the value of the bit of interest. .
【0029】このとき、前記振り分けにより振り分けら
れたエントリーデータを一時蓄積し、一つのノードに対
して複数のエントリーデータが蓄積されたときには、蓄
積されたエントリーデータを一つずつ当該ノードにエン
トリーすることが望ましい。At this time, the entry data sorted by the sorting is temporarily stored, and when a plurality of entry data is stored for one node, the stored entry data is entered into the node one by one. Is desirable.
【0030】[0030]
【発明の実施の形態】(第一実施例)本発明第一実施例
を図1ないし図4を参照して説明する。図1は第一実施
例の構成図である。図2は本実施例で用いるパトリシア
ツリーを示す図である。図3は本実施例で用いるパトリ
シアツリー接続テーブルを示す図である。図4は第一実
施例の最長一致検索回路の動作を示すフローチャートで
ある。BEST MODE FOR CARRYING OUT THE INVENTION (First Embodiment) A first embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram of the first embodiment. FIG. 2 is a diagram showing a Patricia tree used in this embodiment. FIG. 3 is a diagram showing a Patricia tree connection table used in this embodiment. FIG. 4 is a flow chart showing the operation of the longest match search circuit of the first embodiment.
【0031】第一実施例は、図3に示すように、パトリ
シアツリーを構成するノードのアドレス(ノードアドレ
ス)と、このアドレスに対応するエントリーデータの着
目ビット位置に関する情報(マスク)と、この着目ビッ
ト位置に対応するエントリーデータの取り得る値
(“0”、“1”)に対する行き先ノードまたは終端点
の情報とが記録されたパトリシアツリー接続テーブルT
を図1に示すテーブル部Mに備え、前記着目ビット位置
は、パトリシアツリーの始点から下流に向かう段毎に順
次先頭ビットから1ビットずつ下位ビットに移行し、パ
トリシアツリー接続テーブルTにおけるパトリシアツリ
ーの始点から下流に向かうノード毎に順次その着目ビッ
トの値にしたがってエントリーデータの行き先ノードま
たは終端点を検索する処理部Pを備えたことを特徴とす
る最長一致検索回路である。In the first embodiment, as shown in FIG. 3, the address (node address) of the node forming the Patricia tree, the information (mask) about the bit position of the entry data corresponding to this address, and this attention. Patricia tree connection table T in which information of destination nodes or termination points for possible values (“0”, “1”) of entry data corresponding to bit positions is recorded
1 is provided in the table unit M shown in FIG. 1, the bit position of interest is sequentially shifted from the start bit of the Patricia tree to the lower bit one bit at a time from the start point to the lower bit of the Patricia tree. The longest match search circuit is provided with a processing unit P that sequentially searches the destination node or the end point of the entry data according to the value of the bit of interest for each node going from the start point to the downstream side.
【0032】すなわち、第一実施例の最長一致検索回路
は、RAMから構成されたテーブル部Mと、処理部Pと
から構成されている。理解をしやすくするために、図2
に従来例と同じパトリシアツリーにノードアドレスを〇
数字で記載する。アドレス情報テーブルは従来例の図1
0と共通である。図3に図2のパトリシアツリーの検索
データを示すパトリシアツリー接続テーブルTの内容を
示す。また、図4は、処理部Pの動作をフローチャート
で示してある。That is, the longest match search circuit of the first embodiment is composed of a table section M composed of a RAM and a processing section P. Fig. 2 for easier understanding
Enter the node address in the same Patricia tree as the conventional example with a number. The address information table is shown in FIG.
It is common with 0. FIG. 3 shows the contents of the Patricia tree connection table T showing the search data of the Patricia tree of FIG. Further, FIG. 4 is a flowchart showing the operation of the processing unit P.
【0033】図1〜図4を参照して第一実施例の最長一
致検索回路の動作を説明する。サーチするエントリーデ
ータは、処理部Pで上位ビットからマスクがかけられ、
パトリシアツリーのデータ(接続および結果)のテーブ
ルであるパトリシアツリー接続テーブルTから、データ
を一つ取り出し、そこで、マスクされた残りのデータが
“0”か“1”で、次のツリーの接続へ飛ぶ。終端点に
あたるところでは、アドレス情報を格納したメモリのア
ドレスが呼び出され、そのパトリシアツリー接続テーブ
ルTをさらに読むことによりNHRのポートを読み出せ
る。もちろん、このNHR自身を終端点に格納すること
も可能である。例えは、図3の#a1の代わりにNHR
7を格納してもよい。The operation of the longest match search circuit of the first embodiment will be described with reference to FIGS. The entry data to be searched is masked from the upper bits by the processing unit P,
One data is taken out from the Patricia tree connection table T which is a table of data (connections and results) of the Patricia tree, and when the remaining masked data is "0" or "1", the next tree connection is made. jump. At the end point, the address of the memory storing the address information is called, and the Patricia tree connection table T is further read to read the NHR port. Of course, it is also possible to store this NHR itself at the end point. For example, instead of # a1 in Figure 3, NHR
7 may be stored.
【0034】図4のフローチャートを説明する。スター
トは、ノードアドレス#0であり、これはパトリシアツ
リー(図2)の一番上のツリーのブランチに当たる。マ
スク処理は、_***であるので、エントリーデータの
1ビット目のデータで“0”もしくは、“1”を判断し
て、“0”ならばノードアドレス1、“1”ならばノー
ドアドレス2が次のノードアドレスであり、(niにあ
たる)そのアドレスへ飛ぶため、再びノードアドレス1
もしくはノードアドレス2のアドレスのデータをリード
する。The flowchart of FIG. 4 will be described. The start is node address # 0, which is the branch of the top tree of the Patricia tree (FIG. 2). Since the mask processing is _ ***, it judges "0" or "1" by the first bit data of the entry data, and if it is "0", it is the node address 1, and if it is "1", it is the node address. 2 is the next node address, and it jumps to that address (corresponding to ni).
Alternatively, the data of the address of the node address 2 is read.
【0035】このリードしたデータは、再びマスク処理
され、2ビット目のデータを基に、同様に“0”、
“1”の判断で、次のツリーの接続データへ飛ぶ。
“0”、“1”のデータが終端点ならば、#aiつまり
NHRが格納されているメモリのアドレスが出る。The read data is masked again, and based on the data of the second bit, “0”,
If it is "1", jump to the connection data of the next tree.
If the data of "0" or "1" is the end point, #ai, that is, the address of the memory in which NHR is stored is output.
【0036】このような構成であるため、RAMにより
構成されるパトリシアツリーの格納データは、極めて大
規模でかつ、拡張性が高い。またCAMを必要としてい
ないので、低消費電力でかつ経済的である。With such a configuration, the stored data of the Patricia tree constituted by the RAM is extremely large in scale and highly expandable. Further, since no CAM is required, it has low power consumption and is economical.
【0037】(第二実施例)本発明第二実施例を図5を
参照して説明する。第二実施例は、図5に示すように、
パトリシアツリー接続テーブルTにおけるパトリシアツ
リーの始点から下流に向かうノードの着目ビット毎にエ
ントリーデータの行き先ノードまたは終端点をそれぞれ
並行して検索する処理部P1〜P4を複数備え、この処
理部Pi(iは1〜4のいずれか)は、自己の検索結果
が終端点を示すときにはその検索結果をエントリーデー
タの最長一致検索結果として出力し、自己の検索結果が
次段のノードのアドレスを示すときには、エントリーデ
ータを着目ビット位置が自己よりも一つ下位の次段の処
理部P(i+1)に引き渡すことを特徴とする最長一致
検索回路である。図5ではテーブル部Mの図示は省略し
たが、処理部P1〜P4はテーブル部Mを参照して処理
を実行する。(Second Embodiment) A second embodiment of the present invention will be described with reference to FIG. In the second embodiment, as shown in FIG.
The Patricia tree connection table T is provided with a plurality of processing units P1 to P4 which respectively search in parallel the destination node or the terminal point of the entry data for each bit of interest of the node going downstream from the starting point of the Patricia tree. Is any one of 1 to 4), when its own search result indicates the end point, the search result is output as the longest match search result of the entry data, and when its own search result indicates the address of the node at the next stage, The longest match search circuit is characterized in that the entry data is transferred to the processing unit P (i + 1) at the next stage, which is one bit lower than the self in the bit position of interest. Although illustration of the table unit M is omitted in FIG. 5, the processing units P1 to P4 execute processing by referring to the table unit M.
【0038】第一実施例では、1つのエントリーデータ
を最長一致させるのに4クロック必要としている。一
方、第二実施例では、マスクビット毎にパイプライン化
して、1ビット処理して、終端点にヒットしたら結果部
Rへ、さらに下位ビットをサーチする必要があれば、次
ノードアドレスと一緒に次段のパイプラインにデータを
引き渡す。次段へデータを引き渡したら、次のエントリ
ーデータが上位から挿入され、パンプライン処理を行
う。In the first embodiment, four clocks are required to match one entry data at the longest. On the other hand, in the second embodiment, pipeline processing is performed for each mask bit, 1-bit processing is performed, and if it is necessary to search the result portion R when the end point is hit, further lower bits are searched together with the next node address. Pass the data to the next pipeline. When the data is delivered to the next stage, the next entry data is inserted from the higher order and the pump line processing is performed.
【0039】すなわち、パトリシアツリーの各段に相当
する部分が並列処理を行っているので、一つのエントリ
ーデータの検索結果が出るまで次のエントリーデータの
エントリーを待つことなく、連続的に複数のエントリー
データをエントリーさせることができるため、高速処理
を行うことができる。That is, since the parts corresponding to the respective stages of the Patricia tree are performing parallel processing, a plurality of entries are continuously input without waiting for the entry of the next entry data until a search result for one entry data is obtained. Since data can be entered, high speed processing can be performed.
【0040】(第三実施例)本発明第三実施例を図6お
よび図7を参照して説明する。第三実施例は、図6およ
び図7に示すように、パトリシアツリー接続テーブルT
におけるパトリシアツリーの始点から下流に向かう2段
目までのノード毎に順次その着目ビットの値にしたがっ
てエントリーデータの行き先ノードまたは終端点を検索
する処理部P11と、パトリシアツリー接続テーブルT
における3段目以降の複数のサブツリー#1〜#3毎
に、そのサブツリー#1〜#3の始点から下流に向かう
ノード毎に順次その着目ビットの値にしたがってエント
リーデータの行き先ノードまたは終端点をそれぞれ並行
して検索する複数の処理部P21、P22、P23と、
このP21、P22、P23の複数の検索結果の中から
処理部P11の検索結果に基づきいずれか一つを最終的
な最長一致検索結果として選択する結果部R1〜R3お
よび結果処理部RCとを備えたことを特徴とする最長一
致検索回路である。図6ではテーブル部Mの図示は省略
したが、処理部P11、P21〜P23はテーブル部M
を参照して処理を実行する。(Third Embodiment) A third embodiment of the present invention will be described with reference to FIGS. 6 and 7. In the third embodiment, as shown in FIGS. 6 and 7, the Patricia tree connection table T
Processing unit P11 that sequentially searches the destination node or terminal point of the entry data according to the value of the bit of interest for each node from the start point of the Patricia tree to the second stage downstream, and the Patricia tree connection table T.
In each of the plurality of subtrees # 1 to # 3 in the third and subsequent stages in the above, the destination node or the end point of the entry data is sequentially determined according to the value of the bit of interest for each node going downstream from the start point of the subtree # 1 to # 3. A plurality of processing units P21, P22, P23 which are searched in parallel,
The result sections R1 to R3 and the result processing section RC are provided for selecting any one of the plurality of search results of P21, P22 and P23 as the final longest match search result based on the search result of the processing section P11. The longest match search circuit is characterized by the fact that Although the table portion M is not shown in FIG. 6, the processing portions P11 and P21 to P23 are not included in the table portion M.
Refer to to execute the process.
【0041】図6の構成では、3〜4bit目のエント
リーデータの検索を先行的に行い、1〜2bit目の検
索結果から、3〜4bit目の答えの1つを選ぶ。もし
くは、1〜2bitで終端した処理を行うものである。
本図を用いて動作を説明する。In the configuration of FIG. 6, the entry data of the 3rd to 4th bits is searched in advance, and one of the answers of the 3rd to 4th bits is selected from the search results of the 1st to 2nd bits. Alternatively, the processing is terminated with 1 to 2 bits.
The operation will be described with reference to this figure.
【0042】エントリーデータは、1〜2bit目のサ
ーチ処理および3〜4bit目のサーチ処理をパラレル
に行っている。3〜4bit目は、上位2ビットの値は
不明であるが、下位2ビットで、例では、3並列にサー
チしている。結果はノードアドレス3、4、5それぞれ
で出てくるが上位2bitの結果でノードのノードアド
レス3、4、5のいずれに飛んだ、もしくは、2bit
でみつかったことにより、結果処理部RCで、適当なも
のが選択される。このことにより、パイプラインがビッ
ト数だけかかり、高速処理はできるが遅延時間が大きい
第二実施例と比べ、より高速に処理できる。For the entry data, the search processing for the first and second bits and the search processing for the third and fourth bits are performed in parallel. At the 3rd to 4th bits, the value of the upper 2 bits is unknown, but the lower 2 bits are used, and in the example, the search is performed in parallel with 3 bits. The result comes out at each of the node addresses 3, 4, and 5, but as the result of the upper 2 bits, the node address 3, 4, or 5 of the node is jumped to, or 2 bits
As a result, the result processing section RC selects an appropriate one. As a result, the pipeline takes only the number of bits and high-speed processing is possible, but higher-speed processing can be performed as compared with the second embodiment.
【0043】すなわち、パトリシアツリーを適当なとこ
ろから上下に分割し、上部分は上部分で最長一致検索を
実行し、下部分は下部分で最長一致検索を実行する。こ
のとき、上部分は、パトリシアツリーの始点から検索を
開始するので、エントリーデータに対する検索結果は一
つに定まるが、下部分は、複数のサブツリー#1〜#3
に分かれており、それぞれのサブツリー#1〜#3毎に
検索を開始するので、エントリーデータに対する検索結
果も複数存在する。このようにして上部分と下部分とで
それぞれ検索結果が定まった時点で、上部分の検索結果
に基づき下部分の複数の検索結果のいずれか一つを最終
的な検索結果として選択する。このようにして、一つの
パトリシアツリーを上下に分割し、並列処理を行うこと
ができるので、検索時間を高速化することができる。That is, the Patricia tree is vertically divided from an appropriate position, the upper part performs the longest match search in the upper part, and the lower part executes the longest match search in the lower part. At this time, the upper part starts the search from the starting point of the Patricia tree, so the search result for the entry data is set to one, but the lower part is the plurality of subtrees # 1 to # 3.
Since the search is started for each of the subtrees # 1 to # 3, there are a plurality of search results for the entry data. In this way, when the search results for the upper part and the lower part are determined, one of the plurality of search results for the lower part is selected as the final search result based on the search result for the upper part. In this way, one Patricia tree can be divided into upper and lower parts and parallel processing can be performed, so that the search time can be shortened.
【0044】(第四実施例)本発明第四実施例を図8を
参照して説明する。第四実施例は、図8に示すように、
パトリシアツリー接続テーブルTにおけるパトリシアツ
リーの始点から下流に向かう2段目までのノード毎に順
次その着目ビットの値にしたがって複数のエントリーデ
ータの行き先ノードまたは終端点を並行して検索する複
数の処理部P31〜P33が設けられ、パトリシアツリ
ー接続テーブルTにおける3段目以降の複数のサブツリ
ー毎に、そのサブツリーの始点から下流に向かうノード
毎に順次その着目ビットの値にしたがってエントリーデ
ータの行き先ノードまたは終端点をそれぞれ並行して検
索する複数の処理部P41〜P43が設けられ、複数の
処理部P31〜P33の検索結果に基づき処理部P31
〜P33から出力されるエントリーデータをその行き先
ノードに振り分けるあるいは処理部P31〜P33によ
り検索された終端点を最長一致検索結果出力に振り分け
る振り分け部Dが設けられ、処理部P41〜P43は、
この振り分け部Dにより振り分けられたエントリーデー
タについて前記サブツリーの始点から下流に向かうノー
ド毎に順次その着目ビットの値にしたがって終端点を検
索することを特徴とする最長一致検索回路である。(Fourth Embodiment) A fourth embodiment of the present invention will be described with reference to FIG. The fourth embodiment, as shown in FIG.
A plurality of processing units that sequentially search for destination nodes or end points of a plurality of entry data in parallel according to the value of the bit of interest for each node from the start point of the Patricia tree connection table T to the second stage downstream from the Patricia tree. P31 to P33 are provided, and for each of a plurality of subtrees in the Patricia tree connection table T on the third and subsequent stages, each node going downstream from the starting point of the subtree sequentially has a destination node or terminal of the entry data according to the value of the bit of interest. A plurality of processing units P41 to P43 for respectively searching points in parallel are provided, and the processing unit P31 is based on the search results of the plurality of processing units P31 to P33.
A distribution unit D that distributes the entry data output from P33 to the destination node or distributes the end point searched by the processing units P31 to P33 to the longest match search result output is provided, and the processing units P41 to P43
The longest match search circuit is characterized in that, with respect to the entry data distributed by the distribution unit D, the end point is sequentially searched for each node downstream from the start point of the subtree according to the value of the bit of interest.
【0045】また、振り分け部Dにより振り分けられた
エントリーデータを一時蓄積する待ち合わせ部B1〜B
3が設けられ、この待ち合わせ部B1〜B3は、一つの
ノードに対して複数のエントリーデータが蓄積されたと
きには、蓄積されたエントリーデータを一つずつ当該ノ
ードにエントリーする。Further, waiting sections B1 to B for temporarily storing the entry data sorted by the sorting section D
3 is provided, and when a plurality of entry data is accumulated for one node, the waiting units B1 to B3 enter the accumulated entry data into the node one by one.
【0046】第四実施例では、上位1〜2bitは、3
つのエントリーデータをほぼ同時に並列に処理する。そ
の結果が3〜4bitのノードでノードアドレス3、
4、5のいずれかになる場合と、終了する場合があるの
は、第三実施例と同様である。ノードアドレス3等に複
数のデータが競合するので、待ち合わせ部B1〜B3を
配置してある。このような構成のため、3つのエントリ
ーデータを同時に処理でき、高速性が向上する。In the fourth embodiment, the upper 1 to 2 bits are 3
Process one entry data in parallel at almost the same time. If the result is a 3-4 bit node, the node address is 3,
It is the same as in the third embodiment that there is a case where it becomes either 4, 5 or it ends. Since a plurality of pieces of data compete for the node address 3 and the like, waiting sections B1 to B3 are provided. With such a configuration, three entry data can be processed at the same time, and high speed performance is improved.
【0047】すなわち、第四実施例は、複数のパトリシ
アツリーを用いて同時に複数のエントリーデータを並列
処理することにより高速化を図るという発想に基づく構
成であるが、第四実施例では、パトリシアツリーを適当
なところから上下に分割し、上部分は複製を複数用意す
るが、下部分は一つのツリーを共用することにより、メ
モリ量を低く抑えることを特徴とする。すなわち、複数
の上部分で複数のエントリーデータを並列処理し、それ
ぞれの検索結果が出た時点で、エントリーデータを一つ
の下部分のそれぞれの行き先ノードに振り分ける。この
とき、下部分の同じノードに複数のエントリーデータが
ほぼ同時に振り分けられる場合を想定し、振り分け部D
により振り分けられたエントリーデータを一時蓄積する
待ち合わせ部B1〜B3が設けられ、この待ち合わせ部
B1〜B3は、一つのノードに対して複数のエントリー
データが蓄積されたときには、蓄積されたエントリーデ
ータを一つずつ当該ノードにエントリーする。In other words, the fourth embodiment is based on the idea that a plurality of entry data are simultaneously processed in parallel by using a plurality of Patricia trees to increase the speed, but in the fourth embodiment, the Patricia tree is used. Is divided into upper and lower parts from an appropriate place, and the upper part prepares a plurality of replicas, but the lower part is characterized by sharing a single tree to keep the memory amount low. That is, a plurality of entry data are processed in parallel in a plurality of upper parts, and when each search result is obtained, the entry data is distributed to each destination node in one lower part. At this time, assuming that a plurality of entry data are distributed to the same node in the lower part almost at the same time, the distribution unit D
Waiting units B1 to B3 for temporarily storing the entry data sorted by the above are provided, and when the plurality of entry data are stored for one node, the waiting units B1 to B3 store the stored entry data Entry to the relevant node one by one.
【0048】これにより、複数のパトリシアツリーの全
体を用意する場合と比較して低いメモリ量により複数の
エントリーデータを並列処理し、最長一致検索を高速に
行うことができる。As a result, a plurality of entry data can be processed in parallel with a smaller amount of memory as compared with the case of preparing the whole of a plurality of Patricia trees, and the longest match search can be performed at high speed.
【0049】(第五実施例)本実施例の最長一致検索回
路は、情報処理装置としてのコンピュータ装置により実
現することができる。すなわち、コンピュータ装置にイ
ンストールすることにより、そのコンピュータ装置に、
図1に示す第一実施例の最長一致検索回路に相応する機
能として、パトリシアツリーを構成するノードのアドレ
スと、このアドレスに対応するエントリーデータの着目
ビット位置に関する情報と、この着目ビット位置に対応
するエントリーデータの取り得る値に対する行き先ノー
ドまたは終端点の情報とが記録されたパトリシアツリー
接続テーブルTに相応する機能を実現させ、前記着目ビ
ット位置は、パトリシアツリーの始点から下流に向かう
段毎に順次先頭ビットから1ビットずつ下位ビットに移
行し、パトリシアツリー接続テーブルTにおけるパトリ
シアツリーの始点から下流に向かうノード毎に順次その
着目ビットの値にしたがってエントリーデータの行き先
ノードまたは終端点を検索する処理部Pに相応する機能
を実現させるプログラムをコンピュータ装置にインスト
ールすることにより、そのコンピュータ装置を第一実施
例の最長一致検索回路に相応する回路とすることができ
る。(Fifth Embodiment) The longest match search circuit of this embodiment can be realized by a computer device as an information processing device. That is, by installing in a computer device,
As a function corresponding to the longest match search circuit of the first embodiment shown in FIG. 1, the address of the node forming the Patricia tree, the information on the bit position of interest of the entry data corresponding to this address, and the bit position of interest A corresponding function of the Patricia tree connection table T in which the information of the destination node or the end point for the possible value of the entry data is recorded is realized, and the bit position of interest is at each stage from the starting point of the Patricia tree to the downstream side. Processing for sequentially shifting from the first bit to lower bits one by one, and sequentially searching for the destination node or terminal point of the entry data according to the value of the bit of interest for each node that goes downstream from the starting point of the Patricia tree in the Patricia tree connection table T A professional who realizes the function corresponding to department P By installing a ram in the computer apparatus may be a circuit corresponding to the computer device to the longest match search circuit of the first embodiment.
【0050】あるいは、コンピュータ装置にインストー
ルすることにより、そのコンピュータ装置に、図5に示
す第二実施例の最長一致検索回路に相応する機能とし
て、パトリシアツリー接続テーブルTにおけるパトリシ
アツリーの始点から下流に向かうノードの着目ビット毎
にエントリーデータの行き先ノードまたは終端点をそれ
ぞれ並行して検索する処理部P1〜P4に相応する機能
を複数実現させ、この検索する機能として、自己の検索
結果が終端点を示すときにはその検索結果をエントリー
データの最長一致検索結果として出力し、自己の検索結
果が次段のノードのアドレスを示すときには、エントリ
ーデータを着目ビット位置が自己よりも一つ下位の次段
の検索する手段に引き渡す機能を実現させるプログラム
をコンピュータ装置にインストールすることにより、そ
のコンピュータ装置を第二実施例の最長一致検索回路に
相応する回路とすることができる。Alternatively, when installed in a computer device, the computer device has a function corresponding to the longest match search circuit of the second embodiment shown in FIG. 5 from the starting point of the Patricia tree in the Patricia tree connection table T to the downstream side. A plurality of functions corresponding to the processing units P1 to P4 that respectively search the destination node or the end point of the entry data in parallel for each bit of interest of the node to be realized are realized, and as a function of this search, the own search result determines the end point. When it shows, the search result is output as the longest match search result of the entry data, and when its own search result shows the address of the node of the next stage, the entry data is searched for the next stage whose bit position is one lower than the self. Computer program that realizes the function of delivering to the means By installing, it can be a circuit corresponding to the computer device to the longest match search circuit of a second embodiment.
【0051】あるいは、コンピュータ装置にインストー
ルすることにより、そのコンピュータ装置に、図6に示
す第三実施例の最長一致検索回路に相応する機能とし
て、パトリシアツリー接続テーブルTにおけるパトリシ
アツリーの始点から下流に向かうk段目までのノード毎
に順次その着目ビットの値にしたがってエントリーデー
タの行き先ノードまたは終端点を検索する処理部P11
に相応する第一検索機能と、パトリシアツリー接続テー
ブルTにおける(k+1)段目以降の複数のサブツリー
毎に、そのサブツリーの始点から下流に向かうノード毎
に順次その着目ビットの値にしたがってエントリーデー
タの行き先ノードまたは終端点をそれぞれ並行して検索
する複数の処理部P21〜P23に相応する第二検索機
能と、この第二検索機能の複数の検索結果の中から前記
第一検索機能の検索結果に基づきいずれか一つを最終的
な最長一致検索結果として選択する結果処理部RCに相
応する機能とを実現させるプログラムをコンピュータ装
置にインストールすることにより、そのコンピュータ装
置を第三実施例の最長一致検索回路に相応する回路とす
ることができる。Alternatively, when installed in a computer device, the computer device has a function corresponding to the longest match search circuit of the third embodiment shown in FIG. 6 from the starting point of the Patricia tree in the Patricia tree connection table T to the downstream side. The processing unit P11 that sequentially searches the destination node or the terminal point of the entry data according to the value of the bit of interest for each node up to the kth stage
And a plurality of subtrees in the Patricia tree connection table T on and after the (k + 1) th stage in the Patricia tree connection table T. A second search function corresponding to the plurality of processing units P21 to P23 for respectively searching the destination node or the termination point in parallel, and a search result of the first search function from the plurality of search results of the second search function. By installing a program for realizing a function corresponding to the result processing section RC that selects any one of them as a final longest-match search result on the computer, the computer can be searched for the longest-match search of the third embodiment. It can be a circuit corresponding to the circuit.
【0052】あるいは、コンピュータ装置にインストー
ルすることにより、そのコンピュータ装置に、図8に示
す第四実施例の最長一致検索回路に相応する機能とし
て、パトリシアツリー接続テーブルTにおけるパトリシ
アツリーの始点から下流に向かうk段目までのノード毎
に順次その着目ビットの値にしたがって複数のエントリ
ーデータの行き先ノードまたは終端点を並行して検索す
る複数の処理部P31〜P33に相応する第一検索機能
を実現させ、パトリシアツリー接続テーブルTにおける
(k+1)段目以降の複数のサブツリー毎に、そのサブ
ツリーの始点から下流に向かうノード毎に順次その着目
ビットの値にしたがってエントリーデータの行き先ノー
ドまたは終端点をそれぞれ並行して検索する複数の処理
部P41〜P43に相応する第二検索機能を実現させ、
複数の前記第一検索機能の検索結果に基づき前記第一検
索機能から出力されるエントリーデータをその行き先ノ
ードに振り分けるあるいは前記第一検索機能により検索
された終端点を最長一致検索結果出力に振り分ける振り
分け部Dに相応する機能を実現させ、前記第二検索機能
として、この振り分ける機能により振り分けられたエン
トリーデータについて前記サブツリーの始点から下流に
向かうノード毎に順次その着目ビットの値にしたがって
終端点を検索する機能を実現させるプログラムをコンピ
ュータ装置にインストールすることにより、そのコンピ
ュータ装置を第四実施例の最長一致検索回路に相応する
回路とすることができる。Alternatively, when installed in a computer device, the computer device has a function corresponding to the longest match search circuit of the fourth embodiment shown in FIG. 8 from the start point of the Patricia tree in the Patricia tree connection table T to the downstream side. The first search function corresponding to the plurality of processing units P31 to P33 that sequentially searches the destination node or the end point of the plurality of entry data in parallel according to the value of the bit of interest for each node up to the k-th stage to be realized is realized. , For each of a plurality of (k + 1) th and subsequent subtrees in the Patricia tree connection table T, the destination node or end point of the entry data is sequentially paralleled according to the value of the bit of interest for each node going downstream from the start point of the subtree. To a plurality of processing units P41 to P43 to be searched for To realize a second search function of response,
Based on the search results of the plurality of first search functions, the entry data output from the first search function is distributed to its destination nodes, or the terminal point searched by the first search function is distributed to the longest match search result output. A function corresponding to part D is realized, and as the second search function, for the entry data sorted by this sort function, the end point is sequentially searched for each node going downstream from the start point of the subtree according to the value of the bit of interest. By installing a program for realizing the function described above in a computer device, the computer device can be made a circuit corresponding to the longest match search circuit of the fourth embodiment.
【0053】さらに、第四実施例では、コンピュータ装
置にインストールすることにより、そのコンピュータ装
置に、振り分け部Dに相応する機能により振り分けられ
たエントリーデータを一時蓄積する待ち合わせ部B1〜
B3に相応する機能を実現させ、この一時蓄積する機能
として、一つのノードに対して複数のエントリーデータ
が蓄積されたときには、蓄積されたエントリーデータを
一つずつ当該ノードにエントリーする機能を実現させ
る。Furthermore, in the fourth embodiment, by installing in the computer device, the waiting unit B1 to temporarily store the entry data sorted by the function corresponding to the sorting unit D in the computer device.
A function corresponding to B3 is realized, and as a function of temporarily storing this, when a plurality of entry data is stored in one node, a function of entering the stored entry data one by one into the node is realized. .
【0054】本実施例のプログラムは本実施例の記録媒
体に記録されることにより、コンピュータ装置は、この
記録媒体を用いて本実施例のプログラムをインストール
することができる。あるいは、本実施例のプログラムを
保持するサーバからネットワークを介して直接コンピュ
ータ装置に本実施例のプログラムをインストールするこ
ともできる。By recording the program of this embodiment on the recording medium of this embodiment, the computer device can install the program of this embodiment using this recording medium. Alternatively, the program of this embodiment can be directly installed in a computer device from a server holding the program of this embodiment via a network.
【0055】これにより、コンピュータ装置により、大
規模なパトリシアツリーを用いた検索方法を高速かつ経
済的に実現することができる最長一致検索回路を実現す
ることができる。As a result, the computer apparatus can realize the longest match search circuit that can realize the search method using a large-scale Patricia tree quickly and economically.
【0056】[0056]
【発明の効果】以上説明したように、本発明によれば、
大規模なパトリシアツリーを用いた検索方法を高速かつ
経済的に実現することができる。As described above, according to the present invention,
A search method using a large-scale Patricia tree can be realized at high speed and economically.
【図1】第一実施例の最長一致検索回路の構成図。FIG. 1 is a configuration diagram of a longest match search circuit according to a first embodiment.
【図2】本実施例で用いるパトリシアツリーを示す図。FIG. 2 is a diagram showing a Patricia tree used in this embodiment.
【図3】本実施例で用いるパトリシアツリー接続テーブ
ルを示す図。FIG. 3 is a diagram showing a Patricia tree connection table used in this embodiment.
【図4】第一実施例の最長一致検索回路の動作を示すフ
ローチャート。FIG. 4 is a flowchart showing the operation of the longest match search circuit of the first embodiment.
【図5】第二実施例の最長一致検索回路の構成図。FIG. 5 is a configuration diagram of a longest match search circuit according to a second embodiment.
【図6】第三実施例の最長一致検索回路の構成図。FIG. 6 is a configuration diagram of a longest match search circuit according to a third embodiment.
【図7】パトリシアツリーを上下に分割した状態を示す
図。FIG. 7 is a diagram showing a state in which a Patricia tree is vertically divided.
【図8】第四実施例の最長一致検索回路の構成図。FIG. 8 is a configuration diagram of a longest match search circuit according to a fourth embodiment.
【図9】パトリシアツリーの例を示す図。FIG. 9 is a diagram showing an example of a Patricia tree.
【図10】アドレステーブルの例を示す図。FIG. 10 is a diagram showing an example of an address table.
【図11】CAMの構成を示す図。FIG. 11 is a diagram showing a configuration of a CAM.
B1〜B3 待ち合わせ部
D 振り分け部
M テーブル部
T パトリシアツリー接続テーブル
P、P1〜P4、P11、P21〜P23、P31〜P
33、P41〜P43処理部
R、R1〜R3 結果部
RC 結果処理部
#1〜#3 サブツリーB1 to B3 Waiting unit D Sorting unit M Table unit T Patricia tree connection table P, P1 to P4, P11, P21 to P23, P31 to P
33, P41 to P43 processing unit R, R1 to R3 result unit RC result processing unit # 1 to # 3 subtree
───────────────────────────────────────────────────── フロントページの続き (72)発明者 片山 勝 東京都千代田区大手町二丁目3番1号 日 本電信電話株式会社内 (72)発明者 宇賀 雅則 東京都千代田区大手町二丁目3番1号 日 本電信電話株式会社内 Fターム(参考) 5B075 ND02 QM01 QS06 UU01 5K030 KA05 LB05 LD17 ─────────────────────────────────────────────────── ─── Continued front page (72) Inventor Masaru Katayama 2-3-1, Otemachi, Chiyoda-ku, Tokyo Inside Telegraph and Telephone Corporation (72) Inventor Masanori Uga 2-3-1, Otemachi, Chiyoda-ku, Tokyo Inside Telegraph and Telephone Corporation F-term (reference) 5B075 ND02 QM01 QS06 UU01 5K030 KA05 LB05 LD17
Claims (16)
ドレスと、このアドレスに対応するエントリーデータの
着目ビット位置に関する情報と、この着目ビット位置に
対応するエントリーデータの取り得る値に対する行き先
ノードまたは終端点の情報とが記録されたパトリシアツ
リー接続テーブルを備え、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうノード毎に順次その着目ビットの値にしたがっ
てエントリーデータの行き先ノードまたは終端点を検索
する手段を備えたことを特徴とする最長一致検索回路。1. An address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and a destination node or termination point for a possible value of the entry data corresponding to this target bit position. And a Patricia tree connection table in which information is recorded, and the bit position of interest is sequentially shifted from the start point of the Patricia tree to the lower bit by one bit from the start point to the lower bit, and the start point of the Patricia tree in the table is changed. A longest match search circuit comprising means for sequentially searching a destination node or a terminal point of entry data in accordance with the value of the bit of interest for each node going downstream from.
ドレスと、このアドレスに対応するエントリーデータの
着目ビット位置に関する情報と、この着目ビット位置に
対応するエントリーデータの取り得る値に対する行き先
ノードまたは終端点の情報とが記録されたパトリシアツ
リー接続テーブルを備え、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうノードの着目ビット毎にエントリーデータの行
き先ノードまたは終端点をそれぞれ並行して検索する手
段を複数備え、 この検索する手段は、自己の検索結果が終端点を示すと
きにはその検索結果をエントリーデータの最長一致検索
結果として出力し、自己の検索結果が次段のノードのア
ドレスを示すときには、エントリーデータを着目ビット
位置が自己よりも一つ下位の次段の検索する手段に引き
渡す手段を備えたことを特徴とする最長一致検索回路。2. An address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and a destination node or termination point for a possible value of the entry data corresponding to this target bit position. And a Patricia tree connection table in which information is recorded, and the bit position of interest is sequentially shifted from the start point of the Patricia tree to the lower bit by one bit from the start point to the lower bit, and the start point of the Patricia tree in the table is changed. It is equipped with a plurality of means for searching the destination node or the terminal point of the entry data in parallel for each bit of interest from the node going downstream from the node. When the own search result indicates the terminal point, the search result It is output as the longest match search result of the entry data. When the result of its own search indicates the address of the node of the next stage, the longest feature is that it has means for delivering the entry data to the means for searching the next stage whose bit position of interest is one lower than itself. Match search circuit.
ドレスと、このアドレスに対応するエントリーデータの
着目ビット位置に関する情報と、この着目ビット位置に
対応するエントリーデータの取り得る値に対する行き先
ノードまたは終端点の情報とが記録されたパトリシアツ
リー接続テーブルを備え、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうk(kは自然数)段目までのノード毎に順次そ
の着目ビットの値にしたがってエントリーデータの行き
先ノードまたは終端点を検索する第一検索手段と、 前記テーブルにおける(k+1)段目以降の複数のサブ
ツリー毎に、そのサブツリーの始点から下流に向かうノ
ード毎に順次その着目ビットの値にしたがってエントリ
ーデータの行き先ノードまたは終端点をそれぞれ並行し
て検索する複数の第二検索手段と、 この第二検索手段の複数の検索結果の中から前記第一検
索手段の検索結果に基づきいずれか一つを最終的な最長
一致検索結果として選択する手段とを備えたことを特徴
とする最長一致検索回路。3. An address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and a destination node or terminal point for a possible value of the entry data corresponding to this target bit position. And a Patricia tree connection table in which information is recorded, and the bit position of interest is sequentially shifted from the start point of the Patricia tree to the lower bit by one bit from the start point to the lower bit, and the start point of the Patricia tree in the table is changed. First search means for sequentially searching the destination node or the end point of the entry data according to the value of the bit of interest for each of the nodes from k to downstream (k is a natural number), and (k + 1) th stage in the table. For each of the following subtrees, start of that subtree A plurality of second search means for sequentially searching destination nodes or terminal points of the entry data in parallel according to the value of the bit of interest for each node going downstream from the point, and a plurality of search results of the second search means. And a means for selecting any one of them as a final longest-match search result based on the search result of the first search means.
ドレスと、このアドレスに対応するエントリーデータの
着目ビット位置に関する情報と、この着目ビット位置に
対応するエントリーデータの取り得る値に対する行き先
ノードまたは終端点の情報とが記録されたパトリシアツ
リー接続テーブルを備え、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうk段目までのノード毎に順次その着目ビットの
値にしたがって複数のエントリーデータの行き先ノード
または終端点を並行して検索する複数の第三検索手段が
設けられ、 前記テーブルにおける(k+1)段目以降の複数のサブ
ツリー毎に、そのサブツリーの始点から下流に向かうノ
ード毎に順次その着目ビットの値にしたがってエントリ
ーデータの行き先ノードまたは終端点をそれぞれ並行し
て検索する複数の第四検索手段が設けられ、 複数の前記第三検索手段の検索結果に基づき前記第三検
索手段から出力されるエントリーデータをその行き先ノ
ードに振り分けるあるいは前記第三検索手段により検索
された終端点を最長一致検索結果出力に振り分ける手段
が設けられ、 前記第四検索手段は、この振り分ける手段により振り分
けられたエントリーデータについて前記サブツリーの始
点から下流に向かうノード毎に順次その着目ビットの値
にしたがって終端点を検索する手段を備えたことを特徴
とする最長一致検索回路。4. An address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and a destination node or terminal point for a possible value of the entry data corresponding to this target bit position. And a Patricia tree connection table in which information is recorded, and the bit position of interest is sequentially shifted from the start point of the Patricia tree to the lower bit by one bit from the start point to the lower bit, and the start point of the Patricia tree in the table is changed. A plurality of third search means for searching the destination node or the terminal point of the plurality of entry data in parallel according to the value of the bit of interest is provided for each of the nodes from the to the downstream to the k-th stage. For each of a plurality of (k + 1) th and subsequent subtrees, A plurality of fourth search means for sequentially searching destination nodes or end points of the entry data in parallel according to the value of the bit of interest is provided for each node from the start point of the subtree to the downstream side, and the plurality of third search means are provided. Means for allocating the entry data output from the third search means to the destination node based on the search result of (3) or allocating the end point searched by the third search means to the longest match search result output, The longest match search is characterized in that the searching means includes means for sequentially searching the end points of the entry data sorted by the sorting means according to the value of the bit of interest for each node going downstream from the starting point of the subtree. circuit.
たエントリーデータを一時蓄積する手段が設けられ、 この一時蓄積する手段は、一つのノードに対して複数の
エントリーデータが蓄積されたときには、蓄積されたエ
ントリーデータを一つずつ当該ノードにエントリーする
手段を備えた請求項4記載の最長一致検索回路。5. A means for temporarily storing the entry data sorted by the sorting means is provided, and when the plurality of entry data are stored for one node, the stored entries are temporarily stored. The longest match search circuit according to claim 4, further comprising means for entering data into the node one by one.
より、その情報処理装置に、最長一致検索回路に相応す
る機能として、 パトリシアツリーを構成するノードのアドレスと、この
アドレスに対応するエントリーデータの着目ビット位置
に関する情報と、この着目ビット位置に対応するエント
リーデータの取り得る値に対する行き先ノードまたは終
端点の情報とが記録されたパトリシアツリー接続テーブ
ルに相応する機能を実現させ、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうノード毎に順次その着目ビットの値にしたがっ
てエントリーデータの行き先ノードまたは終端点を検索
する機能を実現させることを特徴とするプログラム。6. An address of a node forming a Patricia tree and a bit of interest of entry data corresponding to this address, which is installed in the information processing device, has a function corresponding to the longest match search circuit in the information processing device. A function corresponding to a Patricia tree connection table in which information on a position and information on a destination node or a terminal point for a possible value of entry data corresponding to the focused bit position is recorded is realized, and the focused bit position is a Patricia For each stage from the start point of the tree to the downstream, one bit is sequentially shifted to the lower bit from the start bit, and for each node from the start point of the Patricia tree in the table to the downstream side, the destination node of the entry data is sequentially according to the value of the bit of interest. Or the function to search the end point A program characterized by realizing.
より、その情報処理装置に、最長一致検索回路に相応す
る機能として、 パトリシアツリーを構成するノードのアドレスと、この
アドレスに対応するエントリーデータの着目ビット位置
に関する情報と、この着目ビット位置に対応するエント
リーデータの取り得る値に対する行き先ノードまたは終
端点の情報とが記録されたパトリシアツリー接続テーブ
ルに相応する機能を実現させ、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうノードの着目ビット毎にエントリーデータの行
き先ノードまたは終端点をそれぞれ並行して検索する機
能を複数実現させ、 この検索する機能として、自己の検索結果が終端点を示
すときにはその検索結果をエントリーデータの最長一致
検索結果として出力し、自己の検索結果が次段のノード
のアドレスを示すときには、エントリーデータを着目ビ
ット位置が自己よりも一つ下位の次段の検索する手段に
引き渡す機能を実現させることを特徴とするプログラ
ム。7. When installed in an information processing device, the information processing device has, as a function corresponding to a longest match search circuit, an address of a node forming a Patricia tree and a bit of interest of entry data corresponding to this address. A function corresponding to a Patricia tree connection table in which information on a position and information on a destination node or a terminal point for a possible value of entry data corresponding to the focused bit position is recorded is realized, and the focused bit position is a Patricia For each stage from the start point of the tree to the downstream, the first bit is sequentially shifted to the lower bit by one bit, and the destination node or the end point of the entry data is set for each bit of interest of the node from the start point of the Patricia tree to the downstream side in the table. Multiple functions to search in parallel As a function to perform this search, when the self search result indicates the end point, the search result is output as the longest match search result of the entry data, and when the self search result indicates the address of the next node, the A program that realizes a function of delivering data to a search unit at a next stage whose bit position of interest is one lower than itself.
より、その情報処理装置に、最長一致検索回路に相応す
る機能として、 パトリシアツリーを構成するノードのアドレスと、この
アドレスに対応するエントリーデータの着目ビット位置
に関する情報と、この着目ビット位置に対応するエント
リーデータの取り得る値に対する行き先ノードまたは終
端点の情報とが記録されたパトリシアツリー接続テーブ
ルに相応する機能を実現させ、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうk段目までのノード毎に順次その着目ビットの
値にしたがってエントリーデータの行き先ノードまたは
終端点を検索する第一検索機能と、 前記テーブルにおける(k+1)段目以降の複数のサブ
ツリー毎に、そのサブツリーの始点から下流に向かうノ
ード毎に順次その着目ビットの値にしたがってエントリ
ーデータの行き先ノードまたは終端点をそれぞれ並行し
て検索する複数の第二検索機能と、 この第二検索機能の複数の検索結果の中から前記第一検
索機能の検索結果に基づきいずれか一つを最終的な最長
一致検索結果として選択する機能とを実現させることを
特徴とするプログラム。8. When installed in an information processing device, the information processing device has, as a function corresponding to the longest match search circuit, an address of a node forming a Patricia tree and a bit of interest of entry data corresponding to this address. A function corresponding to a Patricia tree connection table in which information on a position and information on a destination node or a terminal point for a possible value of entry data corresponding to the focused bit position is recorded is realized, and the focused bit position is a Patricia For each stage from the start point of the tree to the downstream, one bit is sequentially shifted from the first bit to the lower bit, and for each node from the start point of the Patricia tree in the table to the k-th stage downstream, according to the value of the bit of interest. The destination node or termination point of the entry data A first search function for searching, and for each of a plurality of subtrees from the (k + 1) th stage onward in the table, a destination node or an end of the entry data is sequentially added to each node going downstream from the start point of the subtree according to the value of the bit of interest. A plurality of second search functions for searching points in parallel, and one of the plurality of search results of the second search function based on the search result of the first search function as a final longest match search. A program that realizes the function of selecting as a result.
より、その情報処理装置に、最長一致検索回路に相応す
る機能として、 パトリシアツリーを構成するノードのアドレスと、この
アドレスに対応するエントリーデータの着目ビット位置
に関する情報と、この着目ビット位置に対応するエント
リーデータの取り得る値に対する行き先ノードまたは終
端点の情報とが記録されたパトリシアツリー接続テーブ
ルに相応する機能を実現させ、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうk段目までのノード毎に順次その着目ビットの
値にしたがって複数のエントリーデータの行き先ノード
または終端点を並行して検索する複数の第三検索機能を
実現させ、 前記テーブルにおける(k+1)段目以降の複数のサブ
ツリー毎に、そのサブツリーの始点から下流に向かうノ
ード毎に順次その着目ビットの値にしたがってエントリ
ーデータの行き先ノードまたは終端点をそれぞれ並行し
て検索する複数の第四検索機能を実現させ、 複数の前記第三検索機能の検索結果に基づき前記第三検
索機能から出力されるエントリーデータをその行き先ノ
ードに振り分けるあるいは前記第三検索機能により検索
された終端点を最長一致検索結果出力に振り分ける機能
を実現させ、 前記第四検索機能として、この振り分ける機能により振
り分けられたエントリーデータについて前記サブツリー
の始点から下流に向かうノード毎に順次その着目ビット
の値にしたがって終端点を検索する機能を実現させるこ
とを特徴とするプログラム。9. When installed in an information processing device, the information processing device has, as a function corresponding to a longest match search circuit, an address of a node forming a Patricia tree and a bit of interest of entry data corresponding to this address. A function corresponding to a Patricia tree connection table in which information on a position and information on a destination node or a terminal point for a possible value of entry data corresponding to the focused bit position is recorded is realized, and the focused bit position is a Patricia For each stage from the start point of the tree to the downstream, one bit is sequentially shifted from the first bit to the lower bit, and for each node from the start point of the Patricia tree in the table to the k-th stage downstream, according to the value of the bit of interest. Destination node or end of multiple entry data A plurality of third search functions for searching end points in parallel are realized, and for each of a plurality of subtrees from the (k + 1) th stage onward in the table, the value of the bit of interest is sequentially calculated for each node going downstream from the start point of the subtree. According to the above, a plurality of fourth search functions for respectively searching the destination nodes or terminal points of the entry data are realized in parallel, and the entry data output from the third search function based on the search results of the plurality of third search functions. To the destination node or to realize the function of allocating the end point searched by the third search function to the output of the longest match search result, and as the fourth search function, the subtree of the entry data distributed by this distribution function. The value of the bit of interest was set sequentially for each node going downstream from the start point of A program characterized by realizing a function to search termination point I.
れたエントリーデータを一時蓄積する機能を実現させ、 この一時蓄積する機能として、一つのノードに対して複
数のエントリーデータが蓄積されたときには、蓄積され
たエントリーデータを一つずつ当該ノードにエントリー
する機能を実現させる請求項9記載のプログラム。10. The function of temporarily storing the entry data distributed by the distribution function is implemented, and when the plurality of entry data is stored for one node as the function of temporarily storing, the stored entries are stored. The program according to claim 9, which realizes a function of entering data one by one into the node.
のプログラムが記録された前記情報処理装置読み取り可
能な記録媒体。11. A recording medium readable by the information processing device, in which the program according to claim 6 is recorded.
アドレスと、このアドレスに対応するエントリーデータ
の着目ビット位置に関する情報と、この着目ビット位置
に対応するエントリーデータの取り得る値に対する行き
先ノードまたは終端点の情報とをパトリシアツリー接続
テーブルとして記録し、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうノード毎に順次その着目ビットの値にしたがっ
てエントリーデータの行き先ノードまたは終端点を検索
することを特徴とする最長一致検索方法。12. An address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and a destination node or terminal point for a possible value of the entry data corresponding to this target bit position. Information is recorded as a Patricia tree connection table, and the bit position of interest is shifted from the starting point of the Patricia tree to the lower bit one bit at a time from the starting point of the Patricia tree to the lower bit. A longest-match search method characterized in that the destination node or terminal point of the entry data is sequentially searched according to the value of the bit of interest for each node heading for.
アドレスと、このアドレスに対応するエントリーデータ
の着目ビット位置に関する情報と、この着目ビット位置
に対応するエントリーデータの取り得る値に対する行き
先ノードまたは終端点の情報とをパトリシアツリー接続
テーブルとして記録し、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうノードの着目ビット毎にエントリーデータの行
き先ノードまたは終端点をそれぞれ並行して検索し、 このときに、検索結果が終端点を示すときにはその検索
結果をエントリーデータの最長一致検索結果として出力
し、検索結果が次段のノードのアドレスを示すときに
は、エントリーデータを着目ビット位置が当該検索より
も一つ下位の検索にかけることを特徴とする最長一致検
索方法。13. An address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and a destination node or terminal point for a possible value of the entry data corresponding to this target bit position. Information is recorded as a Patricia tree connection table, and the bit position of interest is shifted from the starting point of the Patricia tree to the lower bit one bit at a time from the starting point of the Patricia tree to the lower bit. The destination node or the end point of the entry data is searched in parallel for each bit of interest of the node heading toward the node, and when the search result indicates the end point, the search result is output as the longest match search result for the entry data. , The search result is A longest match search method characterized in that, when indicating a dress, the entry data is subjected to a search whose bit position of interest is one level lower than the search.
アドレスと、このアドレスに対応するエントリーデータ
の着目ビット位置に関する情報と、この着目ビット位置
に対応するエントリーデータの取り得る値に対する行き
先ノードまたは終端点の情報とをパトリシアツリー接続
テーブルとして記録し、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうk段目までのノード毎に順次その着目ビットの
値にしたがってエントリーデータの行き先ノードまたは
終端点を第一検索として検索し、 前記テーブルにおける(k+1)段目以降の複数のサブ
ツリー毎に、そのサブツリーの始点から下流に向かうノ
ード毎に順次その着目ビットの値にしたがってエントリ
ーデータの行き先ノードまたは終端点をそれぞれ第二検
索として並行して検索し、 この第二検索による複数の検索結果の中から前記第一検
索による検索結果に基づきいずれか一つを最終的な最長
一致検索結果として選択することを特徴とする最長一致
検索方法。14. An address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and a destination node or terminal point of a possible value of the entry data corresponding to this target bit position. Information is recorded as a Patricia tree connection table, and the bit position of interest is shifted from the starting point of the Patricia tree to the lower bit one bit at a time from the starting point of the Patricia tree to the lower bit. For each node up to the k-th stage toward, the destination node or terminal point of the entry data is sequentially searched as the first search according to the value of the bit of interest, and for each of the plurality of subtrees after the (k + 1) -th stage in the table, From the start of the subtree to the downstream The destination node or terminal point of the entry data is sequentially searched in parallel as a second search for each node according to the value of the bit of interest, and the search result of the first search is selected from the plurality of search results of the second search. A longest-match search method characterized by selecting any one of them as a final longest-match search result based on.
アドレスと、このアドレスに対応するエントリーデータ
の着目ビット位置に関する情報と、この着目ビット位置
に対応するエントリーデータの取り得る値に対する行き
先ノードまたは終端点の情報とをパトリシアツリー接続
テーブルとして記録し、 前記着目ビット位置は、パトリシアツリーの始点から下
流に向かう段毎に順次先頭ビットから1ビットずつ下位
ビットに移行し、 前記テーブルにおけるパトリシアツリーの始点から下流
に向かうk段目までのノード毎に順次その着目ビットの
値にしたがってエントリーデータの行き先ノードまたは
終端点を検索する第三検索を複数のエントリーデータに
ついて並行に行い、 前記テーブルにおける(k+1)段目以降の複数のサブ
ツリー毎に、そのサブツリーの始点から下流に向かうノ
ード毎に順次その着目ビットの値にしたがってエントリ
ーデータの行き先ノードまたは終端点をそれぞれ第四検
索として並行して検索し、 前記第三検索による検索結果に基づき前記第三検索によ
り出力されるエントリーデータをその行き先ノードに振
り分けるあるいは前記第三検索により検索された終端点
を最長一致検索結果出力に振り分け、 前記第四検索では、この振り分けにより振り分けられた
エントリーデータについて前記サブツリーの始点から下
流に向かうノード毎に順次その着目ビットの値にしたが
って終端点を検索することを特徴とする最長一致検索方
法。15. An address of a node forming a Patricia tree, information on a target bit position of entry data corresponding to this address, and a destination node or terminal point of a possible value of the entry data corresponding to this target bit position. Information is recorded as a Patricia tree connection table, and the bit position of interest is shifted from the starting point of the Patricia tree to the lower bit one bit at a time from the starting point of the Patricia tree to the lower bit. For each node up to the k-th stage toward the destination, the third search for searching the destination node or terminal point of the entry data is performed in parallel for a plurality of entry data according to the value of the bit of interest, and the (k + 1) -th stage in the table. For each subsequent subtree , A destination node or an end point of the entry data is sequentially searched in parallel as a fourth search according to the value of the bit of interest sequentially for each node from the start point of the subtree to the downstream side, and based on the search result by the third search, The entry data output by the third search is distributed to the destination node, or the terminal point searched by the third search is distributed to the longest match search result output, and in the fourth search, the entry data distributed by this distribution A longest match search method characterized in that the end point is sequentially searched according to the value of the bit of interest for each node going downstream from the start point of the subtree.
ントリーデータを一時蓄積し、 一つのノードに対して複数のエントリーデータが蓄積さ
れたときには、蓄積されたエントリーデータを一つずつ
当該ノードにエントリーする請求項15記載の最長一致
検索方法。16. The entry data sorted by the sorting is temporarily stored, and when a plurality of entry data is stored for one node, the stored entry data is entered into the node one by one. 15. The longest match search method described in 15.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002024068A JP3691018B2 (en) | 2002-01-31 | 2002-01-31 | Longest match search circuit and method, program, and recording medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002024068A JP3691018B2 (en) | 2002-01-31 | 2002-01-31 | Longest match search circuit and method, program, and recording medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003224581A true JP2003224581A (en) | 2003-08-08 |
| JP3691018B2 JP3691018B2 (en) | 2005-08-31 |
Family
ID=27746612
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002024068A Expired - Fee Related JP3691018B2 (en) | 2002-01-31 | 2002-01-31 | Longest match search circuit and method, program, and recording medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3691018B2 (en) |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008053583A1 (en) * | 2006-10-30 | 2008-05-08 | S.Grants Co., Ltd. | Bit sequence searching method and program |
| WO2008065735A1 (en) * | 2006-11-28 | 2008-06-05 | S.Grants Co., Ltd. | Splitting/connecting method for coupled node tree, and program |
| WO2008090588A1 (en) * | 2007-01-24 | 2008-07-31 | S. Grants Co., Ltd. | Bit string retrieving device, retrieving method, and program |
| WO2008132806A1 (en) | 2007-04-19 | 2008-11-06 | S.Grants Co., Ltd. | Coupled node tree save/restore method, longest consistence/shortest consistence retrieval method, bit retrieval method and memory medium |
| WO2009004796A1 (en) | 2007-07-03 | 2009-01-08 | S.Grants Co., Ltd. | Bit string search method and program |
| WO2009034689A1 (en) * | 2007-09-14 | 2009-03-19 | S.Grants Co., Ltd. | Bit string search device, search method, and program |
| JP2009134744A (en) * | 2009-01-30 | 2009-06-18 | S Grants Co Ltd | Bit string retrieval device |
| WO2009122651A1 (en) * | 2008-04-04 | 2009-10-08 | 株式会社エスグランツ | Bit sequence search device, search method, and program |
| US8073874B2 (en) | 2006-07-07 | 2011-12-06 | S. Grants Co., Ltd. | Bit string searching apparatus, searching method, and program |
| US8150856B2 (en) | 2006-07-07 | 2012-04-03 | S. Grants Co., Ltd. | Bit string searching apparatus, searching method, and program |
| US8214405B2 (en) | 2007-05-18 | 2012-07-03 | S. Grants Co., Ltd. | Longest-match/shortest-match search apparatus, search method, and program |
| WO2012090763A1 (en) * | 2010-12-28 | 2012-07-05 | 株式会社エスグランツ | Code string search device, search method, and program |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH11220483A (en) * | 1998-02-02 | 1999-08-10 | Chokosoku Network Computer Gijutsu Kenkyusho:Kk | Path information retrieval system |
| JP2000332786A (en) * | 1999-05-21 | 2000-11-30 | Nippon Telegr & Teleph Corp <Ntt> | Routing table search method |
| JP2001326679A (en) * | 2000-05-15 | 2001-11-22 | Fujitsu Ltd | Information device, table search device, table search method, and recording medium |
| JP2001357070A (en) * | 2000-06-13 | 2001-12-26 | Nec Corp | Method and device for retrieving information |
-
2002
- 2002-01-31 JP JP2002024068A patent/JP3691018B2/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH11220483A (en) * | 1998-02-02 | 1999-08-10 | Chokosoku Network Computer Gijutsu Kenkyusho:Kk | Path information retrieval system |
| JP2000332786A (en) * | 1999-05-21 | 2000-11-30 | Nippon Telegr & Teleph Corp <Ntt> | Routing table search method |
| JP2001326679A (en) * | 2000-05-15 | 2001-11-22 | Fujitsu Ltd | Information device, table search device, table search method, and recording medium |
| JP2001357070A (en) * | 2000-06-13 | 2001-12-26 | Nec Corp | Method and device for retrieving information |
Cited By (23)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8073874B2 (en) | 2006-07-07 | 2011-12-06 | S. Grants Co., Ltd. | Bit string searching apparatus, searching method, and program |
| US8150856B2 (en) | 2006-07-07 | 2012-04-03 | S. Grants Co., Ltd. | Bit string searching apparatus, searching method, and program |
| WO2008053583A1 (en) * | 2006-10-30 | 2008-05-08 | S.Grants Co., Ltd. | Bit sequence searching method and program |
| WO2008065735A1 (en) * | 2006-11-28 | 2008-06-05 | S.Grants Co., Ltd. | Splitting/connecting method for coupled node tree, and program |
| US8224861B2 (en) | 2006-11-28 | 2012-07-17 | S. Grants Co., Ltd. | Coupled node tree splitting/conjoining method and program |
| WO2008090588A1 (en) * | 2007-01-24 | 2008-07-31 | S. Grants Co., Ltd. | Bit string retrieving device, retrieving method, and program |
| CN101589390B (en) * | 2007-01-24 | 2012-07-04 | 新叶股份有限公司 | Bit sequence retrieval device, retrieval method |
| US8190591B2 (en) | 2007-01-24 | 2012-05-29 | S. Grants Co., Ltd. | Bit string searching apparatus, searching method, and program |
| WO2008132806A1 (en) | 2007-04-19 | 2008-11-06 | S.Grants Co., Ltd. | Coupled node tree save/restore method, longest consistence/shortest consistence retrieval method, bit retrieval method and memory medium |
| US8214405B2 (en) | 2007-05-18 | 2012-07-03 | S. Grants Co., Ltd. | Longest-match/shortest-match search apparatus, search method, and program |
| JP2009015530A (en) * | 2007-07-03 | 2009-01-22 | S Grants Co Ltd | Bit string retrieval method and program |
| US8145665B2 (en) | 2007-07-03 | 2012-03-27 | S. Grants Co., Ltd. | Bit string search apparatus, search method, and program |
| WO2009004796A1 (en) | 2007-07-03 | 2009-01-08 | S.Grants Co., Ltd. | Bit string search method and program |
| CN101689204B (en) * | 2007-07-03 | 2012-07-25 | 新叶股份有限公司 | Bit string search method and program |
| JPWO2009034689A1 (en) * | 2007-09-14 | 2010-12-24 | 株式会社エスグランツ | Bit string search device, search method and program |
| JP2010198632A (en) * | 2007-09-14 | 2010-09-09 | S Grants Co Ltd | Method and program for dividing/coupling coupled node tree |
| JP4527807B2 (en) * | 2007-09-14 | 2010-08-18 | 株式会社エスグランツ | Bit string search device, search method and program |
| WO2009034689A1 (en) * | 2007-09-14 | 2009-03-19 | S.Grants Co., Ltd. | Bit string search device, search method, and program |
| US8250089B2 (en) | 2007-09-14 | 2012-08-21 | S. Grants Co., Ltd. | Bit string search apparatus, search method, and program |
| WO2009122651A1 (en) * | 2008-04-04 | 2009-10-08 | 株式会社エスグランツ | Bit sequence search device, search method, and program |
| JP2009134744A (en) * | 2009-01-30 | 2009-06-18 | S Grants Co Ltd | Bit string retrieval device |
| WO2012090763A1 (en) * | 2010-12-28 | 2012-07-05 | 株式会社エスグランツ | Code string search device, search method, and program |
| JP2012141760A (en) * | 2010-12-28 | 2012-07-26 | S Grants Co Ltd | Code string retrieval device, retrieval method and program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3691018B2 (en) | 2005-08-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP1808987B1 (en) | Longest prefix matching using tree bitmap data structures | |
| US7062499B2 (en) | Enhanced multiway radix tree and related methods | |
| US7526497B2 (en) | Database retrieval apparatus, retrieval method, storage medium, and program | |
| JP2001509978A (en) | Fast Variable Length Best Match Lookup in Switching Devices | |
| US7873041B2 (en) | Method and apparatus for searching forwarding table | |
| JP2003224581A (en) | Longest match search circuit and method, program and recording medium | |
| US20040019737A1 (en) | Multiple-RAM CAM device and method therefor | |
| CN111459938B (en) | Table item processing method, table look-up method and system | |
| CN113343034A (en) | IP searching method, system and storage medium | |
| JPH1040255A (en) | Hash table control device | |
| US6763348B2 (en) | Method and apparatus for searching databases employing a trie search structure | |
| US6788695B1 (en) | System and method capable of carrying out high-speed IP routing by the use of a binary tree comprising a reduced number of nodes | |
| JPH10240741A (en) | How to manage tree structured data | |
| JP2009518916A (en) | Sorting apparatus and method | |
| JP3547625B2 (en) | Data search device and data search method | |
| JPH0696124A (en) | Information retrieval device | |
| JP2005117212A (en) | Data retrieval device | |
| JP3391377B2 (en) | Method and apparatus for storing memory with ID for packet data with ID | |
| JPH09330322A (en) | Data retrieval device | |
| JPH1075242A (en) | Routing system | |
| JPH08101843A (en) | Information retrieval device | |
| JPH064389A (en) | Name server | |
| JP2002189587A (en) | Sorting system and method, and storage medium | |
| JPH0546663A (en) | Key word retrieval system | |
| JPH05165891A (en) | Database data registration / search method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050303 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050315 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050512 |
|
| 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: 20050614 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050614 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090624 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090624 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100624 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100624 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110624 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |