JP2939584B1 - Search circuit - Google Patents

Search circuit

Info

Publication number
JP2939584B1
JP2939584B1 JP16043398A JP16043398A JP2939584B1 JP 2939584 B1 JP2939584 B1 JP 2939584B1 JP 16043398 A JP16043398 A JP 16043398A JP 16043398 A JP16043398 A JP 16043398A JP 2939584 B1 JP2939584 B1 JP 2939584B1
Authority
JP
Japan
Prior art keywords
data
search
block
unit
register
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 - Lifetime
Application number
JP16043398A
Other languages
Japanese (ja)
Other versions
JPH11353322A (en
Inventor
康之 梅崎
Original Assignee
株式会社超高速ネットワーク・コンピュータ技術研究所
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 株式会社超高速ネットワーク・コンピュータ技術研究所 filed Critical 株式会社超高速ネットワーク・コンピュータ技術研究所
Priority to JP16043398A priority Critical patent/JP2939584B1/en
Application granted granted Critical
Publication of JP2939584B1 publication Critical patent/JP2939584B1/en
Publication of JPH11353322A publication Critical patent/JPH11353322A/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

【要約】 【課題】 検索データを構成する各単位データをレジス
タの各ブロックに格納し、かつ単位データのブロックへ
の格納順序が各検索データ毎に異なる場合、格納した検
索データをもとに検索テーブルの被検索データを高速で
検索する。 【解決手段】 レジスタ11の各ブロックの各単位デー
タを共通に入力するセレクタ31〜34と、各セレクタ
に入力される各単位データが検索テーブル12の各ブロ
ックに対応するようにセレクタを制御する選択回路35
と、入力される検索データに関連づけてレジスタの各ブ
ロックの指定情報が記憶されるレジスタ36とを備え、
選択回路35は検索データがレジスタ11の各ブロック
に格納される毎にレジスタ36の指定情報を入力して各
セレクタを切替制御し、レジスタの各ブロックと検索テ
ーブルの各ブロックとを1対1で対応づける。
Abstract: PROBLEM TO BE SOLVED: To store each unit data constituting search data in each block of a register and to search based on the stored search data when the storage order of the unit data in each block is different for each search data. Search the searched data in the table at high speed. SOLUTION: Selectors 31 to 34 for commonly inputting each unit data of each block of a register 11 and selection for controlling the selector so that each unit data input to each selector corresponds to each block of a search table 12. Circuit 35
And a register 36 for storing designation information of each block of the register in association with the input search data,
Each time the search data is stored in each block of the register 11, the selection circuit 35 controls the switching of each selector by inputting the designation information of the register 36, and makes a one-to-one correspondence between each block of the register and each block of the search table. Correspond.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ゲートウェイ装置
に設けられ受信したフレーム情報に基づきフレームの転
送宛先を検索する検索回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a search circuit provided in a gateway device for searching a transfer destination of a frame based on received frame information.

【0002】[0002]

【従来の技術】一般に、ルーター・スイッチ等のゲート
ウェイ装置では、フレームを受信すると受信したフレー
ム情報からこのフレームを転送する宛先を決定するため
に、連想メモリ(CAM)を利用してその転送宛先の検
索を行う。
2. Description of the Related Art Generally, in a gateway device such as a router / switch, when a frame is received, in order to determine a destination to which the frame is to be transferred from received frame information, a content addressable memory (CAM) is used to determine the destination of the transfer. Perform a search.

【0003】図3はこのような検索回路の要部構成を示
すブロック図であり、11は受信フレームの転送宛先を
検索するための検索データaを保持するレジスタ、12
は検索テーブル、13は予め検索テーブルに登録された
データとレジスタ11の検索データとの一致比較を行
い、その結果をフラグまたはデータとして出力するソフ
トインタフェースである。
FIG. 3 is a block diagram showing a main configuration of such a search circuit. Reference numeral 11 denotes a register for holding search data a for searching a transfer destination of a received frame;
Is a search table, and 13 is a software interface for comparing the data registered in the search table in advance with the search data in the register 11 and outputting the result as a flag or data.

【0004】次に以上のように構成された検索回路の動
作について説明する。ゲートウェイ装置においてフレー
ムを受信すると、その受信フレームに含まれる宛先情報
は例えば32ビットの検索データaとしてレジスタ11
に格納されるが、この場合その32ビットの検索データ
aは、それぞれ8ビットづつに分割された単位データと
して各ブロックA,B,C,Dに各個に格納される。こ
こで、検索テーブル12には、各エントリe1〜enに
対応してそれぞれ32ビットの転送宛先情報が格納され
ている。また、1つのエントリeの32ビットの転送宛
先情報は、各ブロックE,F,G,Hに8ビットづつ分
割されて格納されている。
Next, the operation of the search circuit configured as described above will be described. When a frame is received by the gateway device, destination information included in the received frame is stored in the register 11 as search data a of 32 bits, for example.
In this case, the 32-bit search data a is stored in each of the blocks A, B, C, and D as unit data divided into 8-bit units. Here, the search table 12 stores 32-bit transfer destination information corresponding to each of the entries e1 to en. Also, the 32-bit transfer destination information of one entry e is stored in each of the blocks E, F, G, and H, divided into eight bits.

【0005】この場合、ソフトインタフェース13は、
レジスタ11のブロックAのデータについては検索テー
ブル12の各エントリe1〜enのブロックEのデータ
と比較する。また、レジスタ11のブロックBのデータ
については検索テーブル12の各エントリe1〜enの
ブロックFのデータと比較する。さらに、レジスタ11
のブロックCのデータについては検索テーブル12の各
エントリe1〜enのブロックGのデータと比較する。
さらにまた、レジスタ11のブロックDのデータについ
ては検索テーブル12の各エントリe1〜enのブロッ
クHのデータと比較する。
In this case, the soft interface 13
The data of the block A of the register 11 is compared with the data of the block E of each of the entries e1 to en of the search table 12. The data of the block B of the register 11 is compared with the data of the block F of each entry e1 to en of the search table 12. Further, register 11
Is compared with the data of the block G of each of the entries e1 to en of the search table 12.
Further, the data of the block D of the register 11 is compared with the data of the block H of each entry e1 to en of the search table 12.

【0006】このような比較の結果、レジスタ11の各
ブロックA〜Dの各データに全て一致した各ブロックE
〜Hを有する検索テーブル12のエントリeをエントリ
データとして求め、そのエントリデータが受信フレーム
の転送宛先として決定される。また、レジスタ11の各
ブロックA〜Dの各データに各ブロックE〜Hのデータ
が一致しない場合(部分的に一致しない場合も含む)
は、不一致情報を装置内部の図示しない上位装置に送出
して転送宛先決定が不可であることを通知する。
As a result of such a comparison, each block E that matches all the data of each block A to D of the register 11
The entry e of the search table 12 having .about.H is obtained as entry data, and the entry data is determined as the transfer destination of the received frame. When the data of each of the blocks E to H does not match the data of each of the blocks A to D of the register 11 (including the case where the data does not partially match).
Sends the mismatch information to a higher-level device (not shown) inside the device to notify that the transfer destination cannot be determined.

【0007】[0007]

【発明が解決しようとする課題】このような従来の検索
回路は、レジスタ11の各ブロックA〜Dに格納される
1つの検索データaの単位データの入力順序が図4
(a)に示すように、各ブロックへの格納順、即ち
「A,B,C,D」の順に固定されていれば、ソフトイ
ンタフェース13等からなる検索回路14は、複数の検
索データを連続入力した場合でも、この検索データから
検索テーブル12のデータを容易に検索することができ
る。しかし、レジスタ11の各ブロックA〜Dに格納さ
れる一連の検索データの中に、図4(b)の符号、
、にそれぞれ示すように、単位データが各ブロック
に対しそれぞれ、「B,C,D,A」順、または「C,
B,D,A」順、または「A,D,C,B」順で格納さ
れるような入力配列の検索データが混じっている場合
は、検索回路14はこの部分に対応する検索データは検
索テーブル12から検索することはできない。
In such a conventional search circuit, the input order of unit data of one search data a stored in each of the blocks A to D of the register 11 is as shown in FIG.
As shown in (a), if the storage order in each block, that is, the order of “A, B, C, D” is fixed, the search circuit 14 including the software interface 13 etc. Even when input, the data of the search table 12 can be easily searched from the search data. However, in the series of search data stored in each of the blocks A to D of the register 11, the code shown in FIG.
, The unit data is assigned to each block in the order of “B, C, D, A” or “C,
When input sequence search data stored in the order of “B, D, A” or “A, D, C, B” is mixed, the search circuit 14 searches for search data corresponding to this portion. Table 12 cannot be searched.

【0008】このため、図4(c)に示すようにソフト
ウェアから構成されるフォーマット変換部15を設け、
このフォーマット変換部15により図4(b)の検索デ
ータa’中の符号〜で示す配列のデータをフォーマ
ット変換して図4(a)に示す検索データaのような配
列にして検索回路14に渡すことにより、検索回路14
はこのフォーマット変換された検索データaから検索テ
ーブル12内のデータを容易に検索することができる。
したがって、複数の検索データを連続的に入力した場合
でも、この検索データから変換テーブル12のデータを
容易に検索することができる。
For this purpose, as shown in FIG. 4C, a format conversion unit 15 composed of software is provided.
The format conversion unit 15 converts the format of the data of the array indicated by the symbol in the search data a ′ in FIG. 4B into an array like the search data a shown in FIG. By passing, the search circuit 14
Can easily search the data in the search table 12 from the format-converted search data a.
Therefore, even when a plurality of search data are continuously input, the data of the conversion table 12 can be easily searched from the search data.

【0009】しかしながら、フォーマット変換部15を
用いた上記構成は、ソフトウェアの実行によりフォーマ
ット変換を行うものであるため、フォーマット変換に要
する時間がかかり、したがって高速で検索動作を行うこ
とができないという課題があった。したがって本発明
は、検索データに基づいて検索テーブルの被検索データ
を検索する場合に高速で検索することを目的とする。
However, the above-described configuration using the format conversion unit 15 performs format conversion by executing software, so that it takes a long time for format conversion, and therefore, there is a problem that a high-speed search operation cannot be performed. there were. Therefore, an object of the present invention is to perform a high-speed search when searching for data to be searched for in a search table based on search data.

【0010】[0010]

【課題を解決するための手段】このような課題を解決す
るために本発明は、複数のブロックを有し、入力された
複数の単位データからなる1つの検索データが各単位デ
ータ毎に各個に各ブロックに格納される第1の記憶部
と、複数のブロックを有し、検索データにより検索され
る複数の単位データからなる被検索データが各単位デー
タ毎に各個に各ブロックに格納される検索テーブルとを
備え、第1の記憶部の検索データと検索テーブルの複数
の被検索データとを各ブロック毎に各個に比較して被検
索データの検索を行う検索回路において、第1の記憶部
と検索テーブルとの間に、検索データの各単位データが
第1の記憶部の各ブロックに格納される毎に第1の記憶
部の各ブロックを検索テーブルの各ブロックに対応づけ
て指定するブロック指定部を設けたものである。また、
ブロック指定部は、第1の記憶部の各ブロックの各単位
データを共通に入力する複数のセレクタと、各セレクタ
に入力される各単位データが検索テーブルの各ブロック
に対応するようにセレクタを制御する選択回路と、入力
される検索データに関連づけて第1の記憶部の各ブロッ
クの指定情報が記憶される第2の記憶部とを備え、選択
回路は検索データの各単位データが第1の記憶部の各ブ
ロックに格納される毎に第2の記憶部の指定情報を入力
して各セレクタを切替制御するものである。また、検索
回路は、ネットワークに接続されネットワークから受信
したフレームをそのフレームに含まれる宛先にしたがっ
て転送宛先に転送するゲートウェイ装置に設けられ、上
記宛先を検索データとし、この検索データから検索テー
ブルの被検索データを検索し、検索された被検索データ
に基づいて上記フレームの転送宛先を決定するものであ
る。
SUMMARY OF THE INVENTION In order to solve such a problem, the present invention has a plurality of blocks, and one search data composed of a plurality of input unit data is provided for each unit data. A first storage unit stored in each block, and a search having a plurality of blocks, wherein search target data including a plurality of unit data searched by the search data is stored in each block for each unit data. A search circuit for comparing the search data in the first storage unit and the plurality of data to be searched in the search table for each block and searching for the data to be searched. A block for designating each block of the first storage unit in association with each block of the search table each time each unit data of the search data is stored in each block of the first storage unit between the search table and the search table It is provided with a tough. Also,
The block designator controls a plurality of selectors for commonly inputting each unit data of each block of the first storage unit, and controls the selectors so that each unit data input to each selector corresponds to each block of the search table. And a second storage unit in which the designation information of each block of the first storage unit is stored in association with the input search data, and the selection circuit stores each unit data of the search data in the first storage unit. Each time the data is stored in each block of the storage unit, the designation information of the second storage unit is input to switch and control each selector. The search circuit is provided in a gateway device connected to the network and configured to transfer a frame received from the network to a transfer destination according to a destination included in the frame. The destination is used as search data. The search data is searched, and the transfer destination of the frame is determined based on the searched data.

【0011】[0011]

【発明の実施の形態】以下、本発明を図面に基づいて詳
細に説明する。図1は、本発明に係る検索回路の要部構
成を示すブロック図であり、本検索回路は、ゲートウェ
イ装置内に配置され、フレームを受信すると受信したフ
レームに含まれる宛先情報からこのフレームの転送宛先
を決定するために転送宛先の検索を行う回路である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a main part of a search circuit according to the present invention. The search circuit is arranged in a gateway device, and when a frame is received, the frame is transferred from destination information included in the received frame. This is a circuit for searching for a transfer destination in order to determine a destination.

【0012】図1において、本検索回路は、受信フレー
ムの転送宛先を検索するための検索データaを保持する
レジスタ11と、前記転送宛先データ(即ち、被検索デ
ータ)が登録される検索テーブル12と、レジスタ11
の検索データと検索テーブル12のデータとを比較照合
するデータ比較部21とからなる。
In FIG. 1, the search circuit includes a register 11 for holding search data a for searching for a transfer destination of a received frame, and a search table 12 in which the transfer destination data (ie, data to be searched) is registered. And register 11
And a data comparison unit 21 for comparing and collating the search data with the data in the search table 12.

【0013】以上のように構成された検索回路は、図示
しないネットワークからのフレームを受信すると、その
受信フレームに含まれる宛先情報が例えば32ビットの
検索データaとしてレジスタ11に格納される。この場
合その32ビットの検索データaは、それぞれ8ビット
づつに分割された単位データとしてレジスタ11の各ブ
ロックA,B,C,Dに各個に格納される。また、検索
テーブル12には、各エントリe1〜enに対応してそ
れぞれ32ビットの転送宛先情報が格納されている。ま
た、1つのエントリeの32ビットの転送宛先情報は、
各ブロックE,F,G,Hに8ビットづつ分割されて格
納されている。
When the search circuit configured as described above receives a frame from a network (not shown), the destination information included in the received frame is stored in the register 11 as, for example, 32-bit search data a. In this case, the 32-bit search data a is stored in each of the blocks A, B, C, and D of the register 11 as unit data divided into 8-bit units. The search table 12 stores 32-bit transfer destination information corresponding to each of the entries e1 to en. The 32-bit transfer destination information of one entry e is:
Each of the blocks E, F, G, and H is divided into eight bits and stored.

【0014】ここで、データ比較部21は、検索データ
aがレジスタ11に格納されると、レジスタ11の各ブ
ロックA,B,C,Dの各格納データを、検索データa
のレジスタ11への格納時に出力される検索ポイント指
定情報bに同期して、検索テーブル12の対応するブロ
ックのデータと各個に比較照合を行う。即ち、一例とし
て、検索ポイント指定情報bを入力した時に、このとき
後述する選択回路の選択信号の内容が、レジスタ11の
ブロックA,B,C,Dのデータと検索テーブル12の
ブロックH,E,F,Gのデータとの比較指示を示して
いる場合は、レジスタ11のブロックAのデータを検索
テーブル12の各エントリe1〜enのブロックHのデ
ータとそれぞれ一致比較する。また、レジスタ11のブ
ロックBのデータを検索テーブル12の各エントリe1
〜enのブロックEのデータとそれぞれ一致比較する。
さらに、レジスタ11のブロックCのデータを検索テー
ブル12の各エントリe1〜enのブロックFのデータ
とそれぞれ一致比較する。さらにまた、レジスタ11の
ブロックDのデータを検索テーブル12の各エントリe
1〜enのブロックGのデータとそれぞれ一致比較す
る。
Here, when the search data a is stored in the register 11, the data comparison section 21 converts the data stored in each of the blocks A, B, C, and D of the register 11 into the search data a.
In synchronization with the search point designation information b output when the data is stored in the register 11, the data is compared with the corresponding block data of the search table 12 for each block. That is, as an example, when the search point designation information b is input, the contents of the selection signal of the selection circuit described later are the data of the blocks A, B, C, and D of the register 11 and the blocks H and E of the search table 12 at this time. , F, and G, the data of the block A of the register 11 is compared with the data of the block H of each of the entries e1 to en of the search table 12, respectively. The data of the block B of the register 11 is stored in each entry e1 of the search table 12.
Enen is compared with the data of the block E.
Further, the data of the block C of the register 11 is compared with the data of the block F of each of the entries e1 to en of the search table 12 for matching. Furthermore, the data of the block D of the register 11 is stored in each entry e of the search table 12.
The data is compared with the data of the blocks G of 1 to en.

【0015】このような比較の結果、レジスタ11の各
ブロックA〜Dの各データに全て一致した各ブロックE
〜Hを有する検索テーブル12のエントリeのデータが
受信フレームの転送宛先として決定される。このよう
に、レジスタ11の各ブロックの検索データを入力する
と、その検索データの格納に同期して指示される検索ポ
イント指定情報bに基づいて、検索テーブル12内の比
較対象となるブロックを選択し、双方のデータの一致比
較を行うデータ比較部21を設けたことにより、検索テ
ーブル12のデータ検索動作を高速で行うことができ
る。
As a result of such a comparison, each block E corresponding to each data of each block A to D of the register 11
The data of the entry e of the search table 12 having .about.H is determined as the transfer destination of the received frame. As described above, when the search data of each block of the register 11 is input, a block to be compared in the search table 12 is selected based on the search point designation information b instructed in synchronization with the storage of the search data. By providing the data comparison unit 21 for comparing the coincidence of both data, the data search operation of the search table 12 can be performed at high speed.

【0016】図2は上記データ比較部21の具体的な構
成を示すブロック図である。データ比較部21は、レジ
スタ11の各ブロックと検索テーブル12の各ブロック
とを関連づけて指定するブロック指定部と、データ比較
回路とからなる、前記ブロック指定部は、図2に示すよ
うに、セレクタ31〜34と、各セレクタ31〜34を
選択信号dにより各個に選択する選択回路35と、選択
回路35に選択情報を出力するレジスタ36とから構成
される。ここで、各セレクタ31〜34の入力側にはレ
ジスタ11の各ブロックA,B,C,Dの各データが共
通に出力される。また、レジスタ36には予めソフトウ
ェアの設定により、複数の設定データcが複数の検索デ
ータに対応して記憶される。
FIG. 2 is a block diagram showing a specific configuration of the data comparing section 21. The data comparing unit 21 includes a block specifying unit that specifies each block of the register 11 and each block of the search table 12 in association with each other, and a data comparing circuit. The block specifying unit includes a selector as shown in FIG. The selector circuit 31 includes a selection circuit 35 for selecting each of the selectors 31 to 34 by a selection signal d, and a register 36 for outputting selection information to the selection circuit 35. Here, the data of the blocks A, B, C, and D of the register 11 are commonly output to the input sides of the selectors 31 to 34. In the register 36, a plurality of setting data c are stored in advance in correspondence with a plurality of search data by software setting.

【0017】次に、図2に示すデータ比較部21の動作
を具体的に説明する。選択回路35は、検索データaの
レジスタ11への格納時に図示しない出力部から出力さ
れる検索ポイント指定情報bを入力すると、レジスタ3
6に記憶されている設定データcを入力してその設定デ
ータcに応じた選択信号dを各セレクタ31〜34に出
力する。即ち、一例として、その設定データcがレジス
タ11のブロックA,B,C,Dのデータと検索テーブ
ル12のブロックH,E,F,Gのデータとのそれぞれ
の比較指示を示している場合は、レジスタ11のブロッ
クAと検索テーブル12のブロックHの各データが比較
されるようにセレクタ34を制御する。また、レジスタ
11のブロックBと検索テーブル12のブロックEの各
データとが比較されるようにセレクタ31を制御する。
さらに、レジスタ11のブロックCと検索テーブル12
のブロックFの各データとが比較されるようにセレクタ
32を制御する。さらにまた、レジスタ11のブロック
Dと検索テーブル12のブロックGの各データとが比較
されるようにセレクタ33を制御する。
Next, the operation of the data comparing section 21 shown in FIG. 2 will be specifically described. When the selection circuit 35 receives the search point designation information b output from an output unit (not shown) when the search data a is stored in the register 11, the selection circuit 35
6, and outputs a selection signal d corresponding to the setting data c to each of the selectors 31-34. That is, as an example, when the setting data c indicates a comparison instruction between the data of the blocks A, B, C, and D of the register 11 and the data of the blocks H, E, F, and G of the search table 12, , The selector 34 is controlled so that each data of the block A of the register 11 and the data of the block H of the search table 12 are compared. Further, the selector 31 is controlled so that each data of the block B of the register 11 and each data of the block E of the search table 12 are compared.
Further, the block C of the register 11 and the search table 12
The selector 32 is controlled so that each data of the block F is compared with each other. Furthermore, the selector 33 is controlled so that each data of the block D of the register 11 and each data of the block G of the search table 12 are compared.

【0018】データ比較部21の図示省略したデータ比
較回路では、レジスタ11の各ブロックのデータを検索
テーブル12の指定されたブロックのデータと各エント
リe1〜en毎に比較する。そして、比較の結果、レジ
スタ11の各ブロックA〜Dの各データに全て一致した
各ブロックE〜Hを有する検索テーブル12のエントリ
eをエントリデータとして求め、そのエントリデータが
受信フレームの転送宛先として決定される。また、レジ
スタ11の各ブロックA〜Dの各データに各ブロックE
〜Hのデータが一致しない場合(部分的に一致しない場
合も含む)は、不一致情報を装置内部の図示しない上位
装置に送出して転送宛先決定が不可であることを通知す
る。
In a data comparing circuit (not shown) of the data comparing section 21, data of each block of the register 11 is compared with data of a designated block of the search table 12 for each of the entries e1 to en. As a result of the comparison, an entry e of the search table 12 having each of the blocks E to H that matches all the data of each of the blocks A to D of the register 11 is obtained as entry data, and the entry data is used as a transfer destination of the received frame. It is determined. Each data of each block A to D of the register 11 is added to each block E.
If the data of .about.H do not match (including the case where the data does not partially match), the mismatch information is sent to a higher-level device (not shown) inside the device to notify that the transfer destination cannot be determined.

【0019】こうして1つ目の検索データaの全てのブ
ロックA〜Dについての比較照合が行われた後、2つ目
の検索データがレジスタ11に格納され、検索ポイント
指示情報bが出力されると、選択回路35はレジスタ3
6に記憶されているその2つ目の検索データに対応する
設定データcを入力して選択信号dとして各セレクタ3
1〜34に出力する。すると、今度はその選択信号によ
り例えば、レジスタ11のブロックA,B,C,Dのデ
ータと検索テーブル12のブロックG,H,E,Fのデ
ータとがそれぞれ比較されるように、各セレクタ31〜
34が制御される。
After the comparison and collation of all the blocks A to D of the first search data a are performed, the second search data is stored in the register 11, and the search point instruction information b is output. And the selection circuit 35
6, the setting data c corresponding to the second search data is input to each selector 3 as a selection signal d.
Output to 1-34. Then, this selector 31 compares the data of the blocks A, B, C, and D of the register 11 with the data of the blocks G, H, E, and F of the search table 12, respectively. ~
34 is controlled.

【0020】そして、レジスタ11の各ブロックのデー
タと検索テーブル12の指定されたブロックのデータと
の一致比較が同様にデータ比較回路により行われ、受信
フレームの転送宛先決定または転送宛先決定不可が同様
に判定される。その後、3つ目の検索データがレジスタ
11に格納されると、同様のセレクタ制御、及び転送宛
先判定などの処理が行われる。
Then, the data comparison circuit compares the data of each block of the register 11 with the data of the designated block of the search table 12 in the same manner, and determines whether the transfer destination of the received frame or the transfer destination cannot be determined. Is determined. After that, when the third search data is stored in the register 11, the same selector control, transfer destination determination, and other processing are performed.

【0021】このように、レジスタ36に複数の検索デ
ータ分に対応する複数の設定データcを予め登録し、検
索データがレジスタ11に格納されると、選択回路35
はその検索データの格納に基づき出力される検索ポイン
ト指定情報bに同期してレジスタ36の設定データcを
選択信号dとして各セレクタ31〜34に出力して各セ
レクタ31〜34の切替を行い、各セレクタ31〜34
によりレジスタ11の各ブロックのデータを検索テーブ
ル12の各ブロックの何れかのデータと比較照合させる
ように構成したことにより、複数の検索データが連続し
て到来し、かつ検索データを構成する単位データのレジ
スタ11への格納順序(入力順序)が各検索データ毎に
異なる場合であっても、レジスタ11に格納した各検索
データから検索テーブル12の被検索データを高速で検
索することが可能になる。
As described above, a plurality of setting data c corresponding to a plurality of search data are registered in the register 36 in advance, and when the search data is stored in the register 11, the selection circuit 35
Outputs the setting data c of the register 36 as the selection signal d to the selectors 31 to 34 in synchronization with the search point designation information b output based on the storage of the search data, and switches the selectors 31 to 34. Each selector 31-34
Is configured to compare and collate the data of each block of the register 11 with any data of each block of the search table 12, so that a plurality of search data arrives continuously and the unit data constituting the search data Even if the storage order (input order) of the search data stored in the register 11 differs for each search data, the search target data of the search table 12 can be searched at high speed from each search data stored in the register 11. .

【0022】なお、本実施の形態では、1つのブロック
に格納される単位データを8ビットとし、8ビット単位
でそれぞれセレクタを設けているが、こうした8ビット
単位であるバイト単位の他に、ワード単位でそれぞれ1
つのブロック及びセレクタを設けるようにしても良い。
さらに、1ビット単位、または4ビット単位のビット単
位毎にそれぞれ1つのブロック及びセレクタを設けるよ
うにしても良い。また、セレクタ31〜34は、通常の
論理回路、即ちアンド回路やオア回路などのゲート回路
によっても簡単に構成することができる。また、本検索
回路を、ネットワークに接続されネットワークから受信
したフレームをそのフレームに含まれる宛先にしたがっ
て転送宛先に転送するゲートウェイ装置に設けるように
したので、ゲートウェイ装置ではフレームの転送宛先を
高速で決定することができる。なお、本検索回路はゲー
トウェイ装置以外の装置に適用しても同様の効果を奏す
る。
In this embodiment, the unit data stored in one block is 8 bits, and the selectors are provided in units of 8 bits. 1 for each unit
One block and a selector may be provided.
Furthermore, one block and one selector may be provided for each bit unit of 1 bit unit or 4 bit unit. Further, the selectors 31 to 34 can be easily configured by a normal logic circuit, that is, a gate circuit such as an AND circuit or an OR circuit. Further, since the present search circuit is provided in the gateway device connected to the network and transferring the frame received from the network to the transfer destination according to the destination included in the frame, the gateway device determines the transfer destination of the frame at high speed. can do. It should be noted that the same effect can be obtained when the present search circuit is applied to a device other than the gateway device.

【0023】[0023]

【発明の効果】以上説明したように本発明によれば、複
数のブロックを有し、入力された複数の単位データから
なる1つの検索データが各単位データ毎に各個に各ブロ
ックに格納される第1の記憶部と、複数のブロックを有
し、検索データにより検索される複数の単位データから
なる被検索データが各単位データ毎に各個に各ブロック
に格納される検索テーブルとを備え、第1の記憶部の検
索データと検索テーブルの複数の被検索データとを各ブ
ロック毎に各個に比較して被検索データの検索を行う検
索回路において、第1の記憶部と検索テーブルとの間
に、ブロック指定部を設け、ブロック指定部は検索デー
タの各単位データが第1の記憶部の各ブロックに格納さ
れる毎に第1の記憶部の各ブロックを検索テーブルの各
ブロックに対応づけて指定するようにしたので、複数の
検索データが連続して到来し、かつ検索データを構成す
る単位データの第1の記憶部の格納順序が各検索データ
毎に異なる場合であっても、第1の記憶部に格納した各
検索データから検索テーブルの被検索データを高速で検
索することが可能になる。また、ブロック指定部は、第
1の記憶部の各ブロックの各単位データを共通に入力す
る複数のセレクタと、各セレクタに入力される各単位デ
ータが検索テーブルの各ブロックに対応するようにセレ
クタを制御する選択回路と、入力される検索データに関
連づけて第1の記憶部の各ブロックの指定情報が記憶さ
れる第2の記憶部とから構成するようにしたので、簡単
かつ経済的な構成により、第1の記憶部の各ブロックを
検索テーブルの各ブロックに対応づけることが可能にな
る。また、検索回路を、ネットワークに接続されネット
ワークから受信したフレームをそのフレームに含まれる
宛先にしたがって転送宛先に転送するゲートウェイ装置
に適用するようにしたので、ゲートウェイ装置ではフレ
ームの転送宛先を高速で決定することができる。
As described above, according to the present invention, one search data having a plurality of blocks and including a plurality of input unit data is stored in each block for each unit data. A first storage unit, a search table having a plurality of blocks, and a search table in which search target data including a plurality of unit data searched by the search data is stored in each block for each unit data; In a search circuit for comparing the search data in the first storage unit and the plurality of data to be searched in the search table for each block and searching for the data to be searched, a search circuit is provided between the first storage unit and the search table. , A block designating unit is provided, and the block designating unit associates each block of the first storage unit with each block of the search table each time each unit data of the search data is stored in each block of the first storage unit. Even if a plurality of pieces of search data arrive continuously and the storage order of the unit data constituting the search data in the first storage unit differs for each search data, the first It is possible to search the search target data of the search table at high speed from each search data stored in the storage unit. Further, the block designating unit includes a plurality of selectors for commonly inputting each unit data of each block of the first storage unit, and a selector so that each unit data input to each selector corresponds to each block of the search table. And a second storage unit in which the designation information of each block of the first storage unit is stored in association with the input search data, so that a simple and economical configuration is provided. Thus, each block in the first storage unit can be associated with each block in the search table. Further, since the search circuit is applied to a gateway device connected to the network and transferring a frame received from the network to a transfer destination according to a destination included in the frame, the gateway device determines a frame transfer destination at high speed. can do.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明に係る検索回路を模式的に示す図であ
る。
FIG. 1 is a diagram schematically showing a search circuit according to the present invention.

【図2】 上記検索回路の要部構成を示すブロック図で
ある。
FIG. 2 is a block diagram illustrating a main configuration of the search circuit.

【図3】 従来の検索回路を模式的に示す図である。FIG. 3 is a diagram schematically showing a conventional search circuit.

【図4】 従来の検索回路の検索動作の状況を示す図で
ある。
FIG. 4 is a diagram showing a state of a search operation of a conventional search circuit.

【符号の説明】[Explanation of symbols]

11…レジスタ(第1の記憶部)、12…検索テーブ
ル、21…データ比較部、31〜34…セレクタ、35
…選択回路、36…レジスタ(第2の記憶部)、A,
B,C,D,E,F,G,H…ブロック、a…検索デー
タ、b…検索ポイント指定情報、c…設定データ、d…
選択信号。
11 register (first storage unit), 12 search table, 21 data comparison unit, 31-34 selector, 35
... Selection circuit, 36 ... Register (second storage unit), A,
B, C, D, E, F, G, H ... block, a ... search data, b ... search point designation information, c ... setting data, d ...
Select signal.

フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 17/30 G11C 15/04 631 H04L 12/28 H04L 12/46 H04L 12/56 JICSTファイル(JOIS)Continuation of the front page (58) Field surveyed (Int.Cl. 6 , DB name) G06F 17/30 G11C 15/04 631 H04L 12/28 H04L 12/46 H04L 12/56 JICST file (JOIS)

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のブロックを有し、入力された複数
の単位データからなる1つの検索データが各単位データ
毎に各個に各ブロックに格納される第1の記憶部と、複
数のブロックを有し、前記検索データにより検索される
複数の単位データからなる被検索データが各単位データ
毎に各個に各ブロックに格納される検索テーブルとを備
え、前記第1の記憶部の検索データと前記検索テーブル
の複数の被検索データとを各ブロック毎に各個に比較し
て被検索データの検索を行う検索回路において、 前記第1の記憶部と前記検索テーブルとの間に、前記検
索データの各単位データが第1の記憶部の各ブロックに
格納される毎に第1の記憶部の各ブロックを検索テーブ
ルの各ブロックに対応づけて指定するブロック指定部を
備えたことを特徴とする検索回路。
A first storage unit having a plurality of blocks, wherein one search data including a plurality of input unit data is stored in each block for each unit data; A search table in which search target data including a plurality of unit data searched by the search data is stored in each block for each unit data, and the search data in the first storage unit and In a search circuit for searching for data to be searched by comparing a plurality of pieces of data to be searched for in a search table with each block for each block, each of the search data is provided between the first storage unit and the search table. A block designating unit for designating each block of the first storage unit in association with each block of the search table each time unit data is stored in each block of the first storage unit; Search circuit.
【請求項2】 請求項1において、 前記ブロック指定部は、第1の記憶部の各ブロックの各
単位データを共通に入力する複数のセレクタと、前記各
セレクタに入力される各単位データが検索テーブルの各
ブロックに対応するようにセレクタを制御する選択回路
と、入力される検索データに関連づけて第1の記憶部の
各ブロックの指定情報が記憶される第2の記憶部とを備
え、前記選択回路は前記検索データの各単位データが第
1の記憶部の各ブロックに格納される毎に第2の記憶部
の指定情報を入力して各セレクタを切替制御することを
特徴とする検索回路。
2. The block specifying unit according to claim 1, wherein the block specifying unit searches for a plurality of selectors commonly inputting each unit data of each block of the first storage unit and each unit data input to each of the selectors. A selection circuit that controls a selector so as to correspond to each block of the table; and a second storage unit that stores designation information of each block in the first storage unit in association with input search data, A selector circuit for inputting specification information of a second storage unit and controlling switching of each selector each time each unit data of the search data is stored in each block of the first storage unit; .
【請求項3】 請求項1において、 前記検索回路は、ネットワークに接続されネットワーク
から受信したフレームを前記フレームに含まれる宛先に
したがって転送宛先に転送するゲートウェイ装置に設け
られ、前記宛先を前記検索データとし、この検索データ
から前記検索テーブルの被検索データを検索し、検索さ
れた被検索データに基づいて前記フレームの転送宛先を
決定することを特徴とする検索回路。
3. The search device according to claim 1, wherein the search circuit is provided in a gateway device connected to a network and configured to transfer a frame received from the network to a transfer destination in accordance with a destination included in the frame. A search circuit that searches the searched data for the searched data in the search table, and determines a transfer destination of the frame based on the searched searched data.
JP16043398A 1998-06-09 1998-06-09 Search circuit Expired - Lifetime JP2939584B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16043398A JP2939584B1 (en) 1998-06-09 1998-06-09 Search circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16043398A JP2939584B1 (en) 1998-06-09 1998-06-09 Search circuit

Publications (2)

Publication Number Publication Date
JP2939584B1 true JP2939584B1 (en) 1999-08-25
JPH11353322A JPH11353322A (en) 1999-12-24

Family

ID=15714837

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16043398A Expired - Lifetime JP2939584B1 (en) 1998-06-09 1998-06-09 Search circuit

Country Status (1)

Country Link
JP (1) JP2939584B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9240237B2 (en) 2013-03-13 2016-01-19 Nagase & Co., Ltd. Semiconductor device and method of writing/reading entry address into/from semiconductor device

Also Published As

Publication number Publication date
JPH11353322A (en) 1999-12-24

Similar Documents

Publication Publication Date Title
JP3191737B2 (en) Network system with router, improved router and associative memory used in the router
JP4742167B2 (en) Method for performing a table lookup operation using a table index that exceeds the CAM key size
US8194672B2 (en) Network switch with mutually coupled look-up engine and network processor
US7302519B2 (en) Distributed content addressable memory
EP0203990B1 (en) Self-routing packets with stage address identifying fields
US6198741B1 (en) Network interface apparatus for transmitting a data packet
JPH09307581A (en) Bridge
CA2011934A1 (en) Method and apparatus for source routing bridging
US20080133494A1 (en) Method and apparatus for searching forwarding table
US6987683B2 (en) Magnitude comparator based content addressable memory for search and sorting
US4285049A (en) Apparatus and method for selecting finite success states by indexing
JPH0644135A (en) Information processor
US20020172065A1 (en) Associative memory apparatus and routing apparatus
JP2939584B1 (en) Search circuit
US6675291B1 (en) Hardware device for parallel processing of any instruction within a set of instructions
JP3123462B2 (en) Connection number conversion device and method, and recording medium storing program for executing the method
CA2064957A1 (en) Method and apparatus for performing pattern search functions
US7047400B2 (en) Single array banked branch target buffer
JPH10222535A (en) Data retrieving circuit
JP2004265528A (en) Associative memory
JPH0832613A (en) Retrieval device for route selection information
JPH1188427A (en) Routing table retrieving device
JP3547625B2 (en) Data search device and data search method
JPS63257030A (en) Character string retrieving circuit
JPH04138555A (en) Parallel type digital signal processor