JP4879728B2 - Search device and data processing device - Google Patents

Search device and data processing device Download PDF

Info

Publication number
JP4879728B2
JP4879728B2 JP2006356323A JP2006356323A JP4879728B2 JP 4879728 B2 JP4879728 B2 JP 4879728B2 JP 2006356323 A JP2006356323 A JP 2006356323A JP 2006356323 A JP2006356323 A JP 2006356323A JP 4879728 B2 JP4879728 B2 JP 4879728B2
Authority
JP
Japan
Prior art keywords
search
search processing
processing circuit
memory
stage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006356323A
Other languages
Japanese (ja)
Other versions
JP2008165616A (en
Inventor
潤 水口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2006356323A priority Critical patent/JP4879728B2/en
Publication of JP2008165616A publication Critical patent/JP2008165616A/en
Application granted granted Critical
Publication of JP4879728B2 publication Critical patent/JP4879728B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、検索用データベースの更新時に検索処理を中断することなく、検索の継続が可能な検索装置およびこの検索装置を備えたデータ処理装置に関するものである。   The present invention relates to a search device capable of continuing search without interrupting search processing when a search database is updated, and a data processing device including the search device.

通信分野においては、パケットのルーティングおよびパケット内の悪意あるコードの検出、また、情報分析分野においては、大量のデータの中からのパターン検出など、検索処理は、幅広い分野において多様な場面で利用されている。特に、近時の情報通信分野全般におけるデータ量の増大および処理の高度化に伴い、検索処理には、高速性、多機能性、さらにインテリジェンス性を備えた処理が求められ、これらの処理をオンデマンドでかつ動的に行うことが求められてきている。   Search processing is used in various fields in a wide range of fields, such as packet routing and detection of malicious code in packets in the communication field, and pattern detection from large amounts of data in the information analysis field. ing. In particular, with the recent increase in the amount of data and the sophistication of processing in the entire information communication field, search processing requires processing with high speed, multi-functionality, and intelligence. There is a need to do it on demand and dynamically.

例えば、特許文献1では、半導体メモリを使用して2分探索を実現する半導体集積回路が開示されており、メモリに格納された有効検索対象データの数の減少に応じて、2分探索を開始する半導体メモリ上のアドレスを適切に決定する手段を設けることにより、探索に要する処理サイクル数を減少させ、高速な検索処理を実現している。   For example, Patent Document 1 discloses a semiconductor integrated circuit that realizes a binary search using a semiconductor memory, and starts a binary search in response to a decrease in the number of effective search target data stored in the memory. By providing means for appropriately determining the address on the semiconductor memory, the number of processing cycles required for the search is reduced and high-speed search processing is realized.

また、非特許文献1では、バイナリ検索テーブルを使用したバイナリ検索を例に、テーブルで使用されるデータ構造によっては、検索時にテーブルの更新の実行が困難になることを指摘している。例えば、テーブルにおける項目の追加または削除を行う際には、テーブル全体を並べ直す処理が必要となり、このようなテーブルの更新時には、項目が移動したり変更されたりしているので、テーブルを使った検索の実行が困難になる。そして、その回避方法として、2つの方法を提案している。すなわち、第1の方法は、検索処理が少ない期間まで更新処理を延期し、テーブルの更新処理を行っている間は検索を停止する方法である。また、第2の方法は、2つのテーブルを用意し、一方のテーブルを検索用に使い、他方を更新用としてバックグランドでテーブルの更新を行う。そして、テーブルの更新が完了したら2つのテーブルを交換する方法である。   In Non-Patent Document 1, it is pointed out that execution of updating a table at the time of searching becomes difficult depending on the data structure used in the table, taking a binary search using a binary search table as an example. For example, when adding or deleting items in a table, it is necessary to rearrange the entire table. When updating such a table, items are moved or changed. Performing a search becomes difficult. And two methods are proposed as the avoidance method. That is, the first method is a method in which the update process is postponed until a period when the search process is small, and the search is stopped while the table update process is being performed. In the second method, two tables are prepared, one table is used for search, and the other is used for update, and the table is updated in the background. Then, when the table update is completed, the two tables are exchanged.

特開2000−250737号公報JP 2000-250737 A Rich Seifert著、間宮あきら訳「LANスイッチング徹底解説」日経BP社発行、2001年8月6日、P83−84By Rich Seifert, translated by Akira Mamiya, "LAN switching thorough commentary", published by Nikkei Business Publications, August 6, 2001, P83-84

しかしながら、特許文献1に記載の従来技術によれば、検索用データベースのエントリ更新時において、検索データの入力を一旦停止する必要がある。そのため、エントリ更新時には、ノン・ストップな検索処理を実現できないという問題があった。   However, according to the prior art described in Patent Document 1, it is necessary to temporarily stop the input of search data when updating the search database entry. Therefore, there has been a problem that non-stop search processing cannot be realized at the time of entry update.

また、非特許文献1に記載の従来技術によれば、テーブルの更新処理を行う際に検索処理を停止する必要がある(上記第1の方法を参照)。そのため、突然、検索パフォーマンスが低下するという問題があった。また、2つのテーブルを用意する上記第2の方法では、テーブルにて使用されるデータ構造が2分探索木のようなツリー構造である場合に、検索処理中にテーブルを交換すると、それまで旧テーブルのツリー構造に基づいて検索を行った検索中のデータは、突然、新テーブルのツリー構造に適用されることになり、誤った検索結果が返ってくる。このように、検索中に、旧テーブル情報で検索中のデータを新テーブル情報では引き継げないという問題があった。   Further, according to the prior art described in Non-Patent Document 1, it is necessary to stop the search process when performing the table update process (see the first method). Therefore, there was a problem that the search performance suddenly deteriorated. In the second method of preparing two tables, if the data structure used in the table is a tree structure like a binary search tree, if the tables are exchanged during the search process, Data that is being searched based on the tree structure of the table is suddenly applied to the tree structure of the new table, and an incorrect search result is returned. In this way, during the search, there is a problem that the data being searched with the old table information cannot be transferred with the new table information.

本発明は、上記に鑑みてなされたものであって、検索用データベースのエントリ更新時においても検索処理を停止することなく検索処理の継続が可能な検索装置およびデータ処理装置を得ることを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to provide a search device and a data processing device capable of continuing a search process without stopping the search process even when an entry of a search database is updated. To do.

上述した課題を解決し、目的を達成するために、本発明にかかる検索処理装置は、検索キーを入力としメモリ内に格納された検索用データベースを検索して検索結果を出力する検索装置であって、前記検索キーが入力される前段の検索処理回路と、この前段の検索処理回路の後段に設けられ、前記前段の検索処理回路の検索処理結果に基づいて、順次、検索処理を行う1または複数の後段の検索処理回路と、前記前段の検索処理回路が検索を行うための前記検索用データベースの一部が格納され、前記前段の検索処理回路に対応して設けられた前段の運用メモリと、この前段の運用メモリと対になって設けられ、前記検索用データベースの更新時まで待機を行う前段の待機メモリと、前記検索用データベースの残部が全体として格納されるように、前記各後段の検索処理回路が検索を行うためのデータがそれぞれ格納され、前記各後段の検索処理回路にそれぞれ対応して設けられた後段の運用メモリと、前記各後段の運用メモリと対になって設けられ、前記検索用データベースの更新時まで待機を行う後段の待機メモリと、前記検索用データベースの更新時に、更新後の検索用データベースを書き込むことにより前記前段および前記各後段の待機メモリの内容を更新するメモリ更新回路と、前記メモリ更新回路からの更新通知に基づいて、前記前段の検索処理回路が検索をするメモリを前記前段の運用メモリから前記前段の待機メモリへと切り替える前段の選択回路と、前記メモリ更新回路からの更新通知に基づいて、前記各後段の検索処理回路が検索をするメモリを前記各後段の運用メモリからそれと対になる前記各後段の待機メモリへと切り替える後段の選択回路と、を備え、前記前段の検索処理回路が検索処理に要する検索処理時間は、前記各後段の検索処理回路が検索処理に要する検索処理時間よりも長いことを特徴とする。   In order to solve the above-described problems and achieve the object, a search processing apparatus according to the present invention is a search apparatus that searches a search database stored in a memory using a search key as an input and outputs a search result. The search processing circuit of the preceding stage where the search key is input and the subsequent stage of the search processing circuit of the preceding stage, and sequentially performing the search processing based on the search processing result of the search processing circuit of the preceding stage 1 or A plurality of subsequent search processing circuits, a part of the search database for searching by the previous search processing circuit, and a previous operation memory provided corresponding to the previous search processing circuit; The standby memory provided in a pair with the operation memory of the preceding stage and waiting until the search database is updated and the remainder of the search database are stored as a whole. Each of the subsequent-stage search processing circuits stores data to be searched, and the subsequent-stage operation memory provided corresponding to each of the subsequent-stage search processing circuits, and the respective subsequent-stage operation memories. And a standby memory in a subsequent stage that waits until the search database is updated, and a standby memory in the previous stage and each subsequent stage by writing the updated search database when the search database is updated. A memory update circuit that updates the contents of the memory, and a memory that is searched by the search processing circuit in the previous stage based on an update notification from the memory update circuit, from the previous operation memory to the previous standby memory. Based on the update notification from the selection circuit and the memory update circuit, the memory to be searched by the search processing circuit in each subsequent stage is set as the memory in each subsequent stage. A post-stage selection circuit that switches from the main memory to each of the subsequent standby memories, and the search processing time required for the search process of the pre-stage search processing circuit is searched by each of the post-stage search processing circuits. It is characterized by being longer than the search processing time required for processing.

本発明によれば、前段の検索処理回路が検索処理に要する検索処理時間を、後段の検索処理回路が検索処理に要する検索処理時間よりも長くするように構成したので、検索用データベースの更新通知に基づいて、前段の検索処理回路が検索するメモリを前段の運用メモリから前段の待機メモリへと切り替え、さらに、前段の検索処理回路から検索途中のデータが後段の検索処理回路へ入力されない時間を利用して、後段の検索処理回路が検索するメモリを後段の運用メモリから後段の待機メモリへと切り替えることにより、検索動作中であっても検索動作を停止せずに、検索用データベースの更新をすることができる。   According to the present invention, the search processing circuit required for the search processing in the preceding stage is configured to be longer than the search processing time required for the search processing in the subsequent search processing circuit. Based on the above, the memory to be searched by the search processing circuit in the previous stage is switched from the operation memory in the previous stage to the standby memory in the previous stage, and the time during which data being searched from the search processing circuit in the previous stage is not input to the search processing circuit in the subsequent stage By switching the memory searched by the subsequent search processing circuit from the subsequent operation memory to the subsequent standby memory, the search database can be updated without stopping the search operation even during the search operation. can do.

以下に、本発明にかかる検索装置およびデータ処理装置の実施の形態を図面に基づいて詳細に説明する。なお、以下に示す実施の形態によりこの発明が限定されるものではない。   Embodiments of a search device and a data processing device according to the present invention will be described below in detail with reference to the drawings. The present invention is not limited to the embodiments described below.

実施の形態1.
図1は、本発明にかかる検索装置の実施の形態1を利用したネットワーク構成を示す図である。なお、本実施の形態では、データ処理装置としてのルータと、ルータに実装される検索装置を例として説明しているが、本発明の適用分野は通信分野に限定されるものではない。
Embodiment 1 FIG.
FIG. 1 is a diagram showing a network configuration using a first embodiment of a search device according to the present invention. In this embodiment, a router as a data processing device and a search device mounted on the router are described as examples. However, the application field of the present invention is not limited to the communication field.

図1に示すように、本実施の形態のネットワークは、ルータ1、PC(Personal Computer)端末2、インターネット3、サーバー群4、アクセスポイント5、無線端末6、イントラネット7、制御PC8、制御リンク9、およびリンク10から構成されている。ルータ1は、インターネット3、イントラネット7、およびサーバー群4とそれぞれリンク10により接続されており、ネットワーク間のパケットの転送などを行う。アクセスポイント5は、リンク10を介してインターネット3、またはイントラネット7に接続されている。PC端末2はリンク10を介して、また、無線端末6はアクセスポイント5を介して、それぞれ端末間の相互通信を行う。また、制御PC8は制御リンク9を介してルータ1に接続されており、ルータ1に対してデータベース更新用のデータ送信などを行う。   As shown in FIG. 1, the network of this embodiment includes a router 1, a PC (Personal Computer) terminal 2, the Internet 3, a server group 4, an access point 5, a wireless terminal 6, an intranet 7, a control PC 8, and a control link 9. , And a link 10. The router 1 is connected to the Internet 3, the intranet 7, and the server group 4 through links 10, and transfers packets between networks. The access point 5 is connected to the Internet 3 or the intranet 7 via a link 10. The PC terminal 2 performs mutual communication between the terminals via the link 10 and the wireless terminal 6 via the access point 5. The control PC 8 is connected to the router 1 via the control link 9 and transmits data for updating the database to the router 1.

図2は、図1で示したルータ1の機能構成例を示す図である。図2に示すように、ルータ1は、送受信ユニット11、転送ユニット12、デバイス13、外部メモリ14、およびコントローラ15を含んで構成される。送受信ユニット11と転送ユニット12とは転送経路21で、また、転送ユニット12とデバイス13とは検索経路22で接続されており、デバイス13、外部メモリ14、およびコントローラ15は、それぞれ外部バス接続線24を介して外部バス23に接続されている。   FIG. 2 is a diagram illustrating a functional configuration example of the router 1 illustrated in FIG. 1. As shown in FIG. 2, the router 1 includes a transmission / reception unit 11, a transfer unit 12, a device 13, an external memory 14, and a controller 15. The transmission / reception unit 11 and the transfer unit 12 are connected by a transfer path 21, and the transfer unit 12 and the device 13 are connected by a search path 22, and the device 13, the external memory 14, and the controller 15 are each connected to an external bus connection line. 24 is connected to the external bus 23.

次に、各構成要素の機能について述べる。送受信ユニット11は、インターネット3、サーバー群4、およびイントラネット7にそれぞれリンク10を介して接続されている。図3は、Ethernet(登録商標)フレームのフォーマットを示す図である。送受信ユニット11は、リンク10から受信した図3に示すEthernet(登録商標)フレーム25からMAC(Media Access Control)ヘッダ26とFCS(FRAMe Check Sequence)28を取り除いたIPv4(Internet Protocol Version 4)パケット27を転送ユニット12に転送し、また、転送ユニット12から送られたIPv4パケット27に、MACヘッダ26とFCS28を付加してリンク10に送信する。   Next, the function of each component will be described. The transmission / reception unit 11 is connected to the Internet 3, the server group 4, and the intranet 7 via links 10. FIG. 3 is a diagram showing a format of an Ethernet (registered trademark) frame. The transmission / reception unit 11 receives an IPv4 (Internet Protocol Version 4) packet 27 obtained by removing a MAC (Media Access Control) header 26 and an FCS (FRAMe Check Sequence) 28 from the Ethernet (registered trademark) frame 25 shown in FIG. Is transferred to the transfer unit 12, and the MAC header 26 and FCS 28 are added to the IPv4 packet 27 sent from the transfer unit 12 and transmitted to the link 10.

転送ユニット12は、受信したフレームから、そのフレームの転送に必要なルーティング情報を得るための検索処理に必要なデータ(以下、検索キーという)を抽出し、検索経路22を介してデバイス13へ検索キーを送る。また、デバイス13から検索経路22を介して検索結果(ルーティング情報)を受け取り、その検索結果に基づき、上記の受信したフレームを、転送経路21を介して送受信ユニット11へ転送する。   The transfer unit 12 extracts data (hereinafter referred to as a search key) necessary for search processing for obtaining routing information necessary for transfer of the frame from the received frame, and searches the device 13 via the search path 22. Send the key. Also, a search result (routing information) is received from the device 13 via the search path 22, and the received frame is transferred to the transmission / reception unit 11 via the transfer path 21 based on the search result.

本実施の形態においては、転送ユニット12で抽出され、検索キーが抽出されるヘッダ情報には、ネットワーク層のヘッダに含まれる宛先・送信元アドレス、プロトコル、トータル長、識別子、フラグ、およびフラグメントオフセットと、トランスポート層のヘッダに含まれる宛先・送信元ポート番号、およびシーケンス番号(但し、TCPの場合のみ)と、が含まれる。以下、図3〜6を用いて検索キーについて説明する。   In the present embodiment, the header information extracted by the transfer unit 12 and from which the search key is extracted includes the destination / source address, protocol, total length, identifier, flag, and fragment offset included in the network layer header. And a destination / source port number and a sequence number (only in the case of TCP) included in the header of the transport layer. Hereinafter, the search key will be described with reference to FIGS.

なお、以下の例では、ネットワーク層で使用するプロトコルをIPv4とし、また、トランスポート層で使用するプロトコルをTCP(Transmission Control Protocol)またはUDP(User Datagram Protocol)として説明するが、これに限定されることなく、例えば、ネットワーク層で使用するプロトコルをIPv6(Internet Protocol Version 6)とし、また、トランスポート層で使用するプロトコルをRDP(Remote Desktop Protocol)としてもよい。   In the following example, the protocol used in the network layer is assumed to be IPv4, and the protocol used in the transport layer is assumed to be TCP (Transmission Control Protocol) or UDP (User Datagram Protocol), but is not limited thereto. For example, the protocol used in the network layer may be IPv6 (Internet Protocol Version 6), and the protocol used in the transport layer may be RDP (Remote Desktop Protocol).

図3に示すように、IPv4ヘッダ29、TCPヘッダ30、およびUDPヘッダ31は、Ethernet(登録商標)フレーム25にカプセル化されている。   As shown in FIG. 3, the IPv4 header 29, the TCP header 30, and the UDP header 31 are encapsulated in an Ethernet (registered trademark) frame 25.

図4は、ネットワーク層のヘッダであるIPv4ヘッダのフォーマットを示す図である。IPv4ヘッダの先頭から3バイト目にTOS(Type of Service)フィールド32、4バイト目にトータル長(Total Length)33、5バイト目に識別子(Identification)34、7バイト目のうち上位3ビットがフラグ(Flag)35であり、7バイト目の下位5ビットと8バイト目がフラグメントオフセット(Fragment Offset)36、10バイト目にプロトコル(Protocol)37、13バイト目に送信元IPアドレス(Source Address)38、17バイト目に宛先IPアドレス(Destination Address)39が位置している。   FIG. 4 is a diagram showing a format of an IPv4 header which is a header of the network layer. The TOS (Type of Service) field 32 in the third byte from the beginning of the IPv4 header, the total length 33 in the fourth byte, the identifier 34 in the fifth byte, and the upper three bits in the seventh byte are flags (Flag) 35, the lower 5 bits of the 7th byte and the 8th byte are a fragment offset (Fragment Offset) 36, the protocol (Protocol) 37 in the 10th byte, the source IP address (Source Address) 38 in the 13th byte, A destination IP address (Destination Address) 39 is located at the 17th byte.

図5は、トランスポート層のヘッダであるTCPヘッダのフォーマットを示す図である。TCPヘッダの先頭から1バイト目に送信元ポート番号(Source Port)40、3バイト目に宛先ポート番号(Destination Port)41、5バイト目にシーケンス番号(Sequence Number)42、9バイト目に確認応答番号(Acknowledgement Number)43が位置している。   FIG. 5 is a diagram illustrating a format of a TCP header that is a header of the transport layer. Source port number 40 at the first byte from the beginning of the TCP header, destination port number 41 at the third byte, sequence number 42 at the fifth byte, and confirmation response at the ninth byte A number (Acknowledgement Number) 43 is located.

図6は、トランスポート層のヘッダであるUDPヘッダのフォーマットを示す図である。UDPヘッダの1バイト目に送信元ポート番号(Source Port)44、3バイト目に宛先ポート番号(Destination Port)45が位置している。   FIG. 6 is a diagram illustrating a format of a UDP header that is a header of the transport layer. A source port number (Source Port) 44 is located in the first byte of the UDP header, and a destination port number (Destination Port) 45 is located in the third byte.

なお、本実施の形態では、パケットのトレーラーとしてEthernet(登録商標)フレームを用いた場合について説明したが、これに限定されるものではない。例えば、ATM(Asynchronous Transfer Mode)またはFDDI(Fiber-Distributed Data Interface)などを用いた場合にも同様に実施できる。   In this embodiment, the case where an Ethernet (registered trademark) frame is used as a packet trailer has been described. However, the present invention is not limited to this. For example, the present invention can be similarly implemented when ATM (Asynchronous Transfer Mode) or FDDI (Fiber-Distributed Data Interface) is used.

また、上記の検索キーの項目は一例であり、ルーティング情報を検索できる情報ではあれば、これに限らない。検索方法およびプロトコルによっては、上記の検索キー情報の項目の一部を用いない場合もあり、また、上記以外の項目(例えば、フローを識別するフィールドであるVLAN(Virtual Local Area Network)ID等)が含まれることもある。   Moreover, the item of said search key is an example, and if it is the information which can search routing information, it will not restrict to this. Depending on the search method and protocol, some of the search key information items may not be used, and items other than the above (for example, a VLAN (Virtual Local Area Network) ID that is a field for identifying a flow). May be included.

デバイス13は、外部メモリ14に記憶されたデータベースを外部バス23および外部バス接続線24を介して取得し、検索経路22から送出された検索キーをもとに、データベースに対して検索処理を行い、検索結果としてルーティング情報を得る。そして、デバイス13は、検索結果を、検索経路22を介して転送ユニット12に通知する。   The device 13 acquires the database stored in the external memory 14 via the external bus 23 and the external bus connection line 24, and performs a search process on the database based on the search key sent from the search path 22. Then, routing information is obtained as a search result. Then, the device 13 notifies the transfer unit 12 of the search result via the search path 22.

外部メモリ14は、制御PC8から制御リンク9を介して送られたデータベースを記憶している。データベースは、検索キーを用いて、ルーティング情報を検索するためのもので、検索キーとルーティング情報の対応が含まれているものとする。   The external memory 14 stores a database sent from the control PC 8 via the control link 9. The database is used to search routing information using a search key, and includes a correspondence between the search key and routing information.

コントローラ15は、制御リンク9を介して制御PC8から送られるルータ1の外部からのデータを、ルータ1内の外部バス23で用いるデータフォーマットに変換する。   The controller 15 converts data from the outside of the router 1 sent from the control PC 8 via the control link 9 into a data format used by the external bus 23 in the router 1.

図7は、図2におけるデバイス13の内部構成を示す図であり、デバイス13は本実施の形態の検索装置である。図7に示すように、本実施の形態のデバイス13は、検索機能を有する前段の検索処理回路である検索処理回路51と、検索機能を有する後段の検索処理回路である検索処理回路52および検索処理回路53と、運用面にある内蔵RAM57、内蔵RAM58、内蔵RAM59、および内蔵RAM60と、待機面にある内蔵RAM61、内蔵RAM62、内蔵RAM63、および内蔵RAM64と、これらの内蔵RAM群に接続され、検索用データベースの更新要求に応じて待機面にある内蔵RAM群の内容の更新を行うRAM更新回路65と、内蔵RAM58および内蔵RAM62と接続され接続先の内蔵RAMの選択を行うRAM選択回路54と、内蔵RAM59および内蔵RAM63と接続され接続先の内蔵RAMの選択を行うRAM選択回路55と、内蔵RAM60および内蔵RAM64と接続され接続先の内蔵RAMの選択を行うRAM選択回路56と、RAM更新回路65からの更新通知を検索処理回路51、RAM選択回路54、RAM選択回路55、およびRAM選択回路56に通知する通知線66と、を含んで構成される。また、検索処理回路51は内蔵RAM57および内蔵RAM61と、検索処理回路52はRAM選択回路54と、検索処理回路53はRAM選択回路55およびRAM選択回路56と、それぞれ接続されている。次に、各構成要素の詳細について述べる。   FIG. 7 is a diagram showing an internal configuration of the device 13 in FIG. 2, and the device 13 is a search device according to the present embodiment. As illustrated in FIG. 7, the device 13 according to the present embodiment includes a search processing circuit 51 that is a search processing circuit in the preceding stage having a search function, a search processing circuit 52 that is a search processing circuit in the subsequent stage having a search function, and a search. The processing circuit 53 is connected to the internal RAM 57, the internal RAM 58, the internal RAM 59, and the internal RAM 60 on the operation side, the internal RAM 61, the internal RAM 62, the internal RAM 63, and the internal RAM 64 on the standby side, and these internal RAM groups. A RAM update circuit 65 that updates the contents of the internal RAM group on the standby surface in response to a search database update request, and a RAM selection circuit 54 that is connected to the internal RAM 58 and the internal RAM 62 and selects the internal RAM to be connected. A RAM that is connected to the built-in RAM 59 and the built-in RAM 63 and selects a built-in RAM as a connection destination A selection circuit 55, a RAM selection circuit 56 that is connected to the built-in RAM 60 and the built-in RAM 64 and selects a built-in RAM as a connection destination, an update notification from the RAM update circuit 65, a search processing circuit 51, a RAM selection circuit 54, a RAM selection circuit 55 and a notification line 66 for notifying the RAM selection circuit 56. The search processing circuit 51 is connected to the internal RAM 57 and the internal RAM 61, the search processing circuit 52 is connected to the RAM selection circuit 54, and the search processing circuit 53 is connected to the RAM selection circuit 55 and the RAM selection circuit 56, respectively. Next, details of each component will be described.

運用面にある内蔵RAM57、内蔵RAM58、内蔵RAM59、および内蔵RAM60には、検索用データベースが分割して格納されており、これらの内蔵RAM群にアクセスすることにより検索処理が行われる。待機面にある内蔵RAM57、内蔵RAM58、内蔵RAM59、および内蔵RAM60は、検索用データベースの更新時にその内容が更新され、更新後の検索用データベースが格納される。   A search database is divided and stored in the internal RAM 57, the internal RAM 58, the internal RAM 59, and the internal RAM 60 on the operation side, and search processing is performed by accessing these internal RAM groups. The contents of the internal RAM 57, the internal RAM 58, the internal RAM 59, and the internal RAM 60 on the standby surface are updated when the search database is updated, and the updated search database is stored.

図8は、検索処理回路51の内部構成を示す図である。図8に示すように、検索処理回路51は、検索経路22から入力された検索キーの出力先を2つの読み込みアドレス生成部から選択する選択回路77と、選択回路77の一方の出力先であると共に、選択回路77から出力された検索キーまたはラッチ71からの出力をもとに、内蔵RAM57における読み込み先のアドレスを生成し、読み込み先のアドレスを内蔵RAM57へ送出する読み込みアドレス生成部71と、内蔵RAM57における読み込み先のアドレスのデータを受信し、検索キーと読み込み先のアドレスのデータとの比較を行う読み込みデータ受信部72と、再度、内蔵RAM57へアクセスするときに、読み込みデータ受信部72にて得られた受信データを一時待ち合わせ、この受信データを読み込みアドレス生成部71へ送るラッチ73と、を含んでいる。   FIG. 8 is a diagram showing an internal configuration of the search processing circuit 51. As shown in FIG. 8, the search processing circuit 51 is a selection circuit 77 that selects an output destination of a search key input from the search path 22 from two read address generation units, and one output destination of the selection circuit 77. A read address generation unit 71 that generates a read destination address in the internal RAM 57 based on the search key output from the selection circuit 77 or the output from the latch 71, and sends the read destination address to the internal RAM 57; The read data receiving unit 72 that receives the data of the read destination address in the internal RAM 57 and compares the search key with the data of the read destination address, and the read data receiving unit 72 when accessing the internal RAM 57 again. The reception data obtained in this way is temporarily waited, and this reception data is read to the address generation unit 71. It includes a latch 73, the that.

さらに、図8に示すように、検索処理回路51は、選択回路77の他方の出力先である読み込みアドレス生成部74と、読み込みアドレス生成部74に接続された読み込みデータ受信部75およびラッチ76と、読み込みデータ受信部72および読み込みデータ受信部75からの検索処理結果が入力され、それを後段の検索処理回路52へ出力する多重化回路78と、を含んでいる。   Further, as shown in FIG. 8, the search processing circuit 51 includes a read address generation unit 74 that is the other output destination of the selection circuit 77, a read data reception unit 75 and a latch 76 connected to the read address generation unit 74. And a multiplexing circuit 78 that receives search processing results from the read data receiving unit 72 and the read data receiving unit 75 and outputs the result to the search processing circuit 52 in the subsequent stage.

次に、読み込みアドレス生成部74、読み込みデータ受信部75およびラッチ76について説明する。図7に示すように、いま、内蔵RAM57は運用面にあり、内蔵RAM61は待機面にある。ここで、運用面とは、検索処理回路からの読み込み先のアドレスを受け付け、該当するアドレスのデータを出力する内蔵RAMを指し、待機面とは、検索処理回路からの読み込み先のアドレスが入力されていない内蔵RAMのことを示す。したがって、内蔵RAM61が待機面から運用面になると、選択回路77は検索キーの出力先として読み込みアドレス生成部74を選択し、読み込みアドレス生成部74、読み込みデータ受信部75およびラッチ76の各処理により内蔵RAM61に格納された検索用データベースの検索が行われる。この検索処理は、上述の、読み込みアドレス生成部71、読み込みデータ受信部72およびラッチ73に基づいた検索処理と同様である。選択処理回路77は、通知線66に接続されており、通知線を介して得られたRAM更新回路からの更新通知に応じて、読み込みアドレス生成部の選択を行う。このように本実施の形態においては、検索処理回路51は、読み込みアドレス生成部71、読み込みデータ受信部72、およびラッチ73を有する検索処理回路と、読み込みアドレス生成部74、読み込みデータ受信部75、およびラッチ76を有する検索処理回路との、2系統の検索処理回路を備えている。   Next, the read address generating unit 74, the read data receiving unit 75, and the latch 76 will be described. As shown in FIG. 7, the built-in RAM 57 is now in operation and the built-in RAM 61 is in standby. Here, the operation side refers to a built-in RAM that receives the address of the reading destination from the search processing circuit and outputs the data of the corresponding address, and the standby side is input with the address of the reading destination from the search processing circuit. This indicates that the internal RAM is not. Therefore, when the built-in RAM 61 changes from the standby side to the operational side, the selection circuit 77 selects the read address generation unit 74 as the output destination of the search key, and the read address generation unit 74, the read data reception unit 75, and the latch 76 perform the respective processes. The search database stored in the internal RAM 61 is searched. This search process is the same as the search process based on the read address generation unit 71, the read data reception unit 72, and the latch 73 described above. The selection processing circuit 77 is connected to the notification line 66, and selects a read address generation unit in accordance with an update notification from the RAM update circuit obtained via the notification line. As described above, in the present embodiment, the search processing circuit 51 includes the read address generation unit 71, the read data reception unit 72, and the latch 73, the read address generation unit 74, the read data reception unit 75, And a search processing circuit having a latch 76 and two search processing circuits.

図9は、検索処理回路52内部の回路構成を示す図である。図9に示すように、検索処理回路52は、検索処理回路51の検索処理結果が入力され、この入力データをもとに内蔵RAMにおける読み込み先のアドレスを生成し、この読み込み先のアドレスをRAM選択回路54へ送出する読み込みアドレス送信部81と、RAM選択回路54から送られてきた読み込み先のアドレスのデータを受信し、検索キーと読み込み先のアドレスのデータとの比較を行い、検索処理結果を検索処理回路53へ出力する読み込みデータ受信部82と、を含んで構成されている。RAM選択回路54は、運用面にある内蔵RAMを選択するので、図7に示す例では、内蔵RAM58にアクセスして読み込み先のアドレスのデータを取得する。   FIG. 9 is a diagram showing a circuit configuration inside the search processing circuit 52. As shown in FIG. 9, the search processing circuit 52 receives the search processing result of the search processing circuit 51, generates a read destination address in the built-in RAM based on the input data, and stores the read destination address in the RAM. The read address transmission unit 81 to be transmitted to the selection circuit 54 and the data of the read destination address sent from the RAM selection circuit 54 are received, the search key is compared with the data of the read destination address, and the search processing result And a read data receiving unit 82 that outputs the data to the search processing circuit 53. Since the RAM selection circuit 54 selects an internal RAM in terms of operation, in the example shown in FIG. 7, the internal RAM 58 is accessed to acquire data at a read destination address.

図10は、検索処理回路53内部の回路構成を示す図である。図10に示すように、検索処理回路53は、検索処理回路52の検索処理結果が入力され、この入力データをもとに内蔵RAMにおける読み込み先のアドレスを生成する読み込みアドレス送信部83と、この読み込みアドレス送信部83から送出された読み込み先のアドレスを、RAM選択回路55またはRAM選択回路56へ送出する選択回路85と、RAM選択回路55またはRAM選択回路56から送られてきたデータを多重化して出力する多重化回路86と、多重化回路86から出力された読み込み先のアドレスのデータを受信し、検索処理結果を検索経路22へ出力する読み込みデータ受信部84と、を含んで構成されている。RAM選択回路55およびRAM選択回路56は、それぞれ運用面にある内蔵RAMを選択するので、図7に示す例では、それぞれ内蔵RAM59および内蔵RAM60にアクセスして読み込み先のアドレスのデータを取得する。   FIG. 10 is a diagram showing a circuit configuration inside the search processing circuit 53. As shown in FIG. 10, the search processing circuit 53 receives the search processing result of the search processing circuit 52, and based on this input data, generates a read destination address in the built-in RAM, A selection circuit 85 for sending the read destination address sent from the read address transmission unit 83 to the RAM selection circuit 55 or the RAM selection circuit 56 and the data sent from the RAM selection circuit 55 or the RAM selection circuit 56 are multiplexed. And a multiplexing circuit 86 for outputting and a reading data receiving unit 84 for receiving the data of the reading destination address outputted from the multiplexing circuit 86 and outputting the retrieval processing result to the retrieval path 22. Yes. Since the RAM selection circuit 55 and the RAM selection circuit 56 select the built-in RAM on the operation side, respectively, in the example shown in FIG. 7, the internal RAM 59 and the internal RAM 60 are accessed to acquire the data of the read destination address.

RAM更新回路65は、検索用データベースの更新時に、外部バス23を経由して送られてきたエントリデータを、待機面となっている内蔵RAM群へ書き込む回路である。図7では、待機面は内蔵RAM61、内蔵RAM62、内蔵RAM63、および内蔵RAM64となっている。さらに、RAM更新回路65は、通知線66を介して検索処理回路51、RAM選択回路54、RAM選択回路55、およびRAM選択回路56へエントリ変更を通知する。   The RAM update circuit 65 is a circuit that writes entry data sent via the external bus 23 to the internal RAM group serving as a standby surface when the search database is updated. In FIG. 7, the standby surfaces are the internal RAM 61, the internal RAM 62, the internal RAM 63, and the internal RAM 64. Further, the RAM update circuit 65 notifies the search processing circuit 51, the RAM selection circuit 54, the RAM selection circuit 55, and the RAM selection circuit 56 of the entry change via the notification line 66.

なお、本実施の形態においては、図7に記載されているように、2ポートの入出力を備えた内蔵RAMを使用したが、これに限らず、他の入出力の形態を備えた内蔵RAMを使用することもできる。   In this embodiment, as shown in FIG. 7, the built-in RAM having two-port input / output is used. However, the present invention is not limited to this, and the built-in RAM having other input / output modes is used. Can also be used.

次に、検索用データベースのデータ構造と、この検索用データベースを、運用面となっている内蔵RAM57、内蔵RAM58、内蔵RAM59、および内蔵RAM60にどのように格納するのかについて説明する。本実施の形態における検索用データベースのデータ構造は、例えば、2分探索木のツリー構造である。図11は、本実施の形態で使用する検索用データベースのデータ構造の一例を示すと共に、エントリデータによって構成されたツリーが内蔵RAM内部でどのように構成されるのかを示す図である。図11に示すように、2分探索の起点となる深さ0におけるエントリデータから深さ4におけるエントリデータまで示されている。なお、エントリデータは黒丸で、エントリデータ間の関係はそれらを相互に接続する直線で示されている。内蔵RAM57では、深さ0から深さ2までのツリー情報が登録され、内蔵RAM58では、深さ3のツリー情報が、内蔵RAM59では、深さ4のツリー情報の内の左半分が、内蔵RAM60では、深さ4のツリー情報の内の右半分が、それぞれ登録されている。   Next, the data structure of the search database and how the search database is stored in the built-in RAM 57, built-in RAM 58, built-in RAM 59, and built-in RAM 60, which are operational aspects, will be described. The data structure of the search database in the present embodiment is, for example, a tree structure of a binary search tree. FIG. 11 is a diagram showing an example of the data structure of the search database used in the present embodiment and how the tree constituted by the entry data is constructed in the built-in RAM. As shown in FIG. 11, the entry data at the depth 0 to the entry data at the depth 4 which are the starting points of the binary search are shown. The entry data is indicated by black circles, and the relationship between the entry data is indicated by a straight line connecting them. In the built-in RAM 57, tree information from depth 0 to depth 2 is registered. In the built-in RAM 58, tree information at depth 3 is stored. In the built-in RAM 59, the left half of the tree information at depth 4 is stored in the built-in RAM 60. Then, the right half of the tree information of depth 4 is registered.

このように、本実施の形態においては、一つの大きなRAMにツリーのデータ構造全体を記憶するのではなく、複数個の小さなRAMにツリーの階層毎に分けて記憶する。特に、前段のRAMには、ツリー構造の起点を含むツリー構造の上段のデータ(すなわち、深さの浅いデータ)を格納し、後段のRAMには、ツリー構造の下段のデータ(すなわち、深さの深いデータ)を順次格納し、後段のRAMに格納するデータの段数を1段とすることにより、前段のRAMに格納するデータの段数である3段より少なくしている。このような構造により、例えば、ツリー最深部のエントリデータのみを変更する場合には、変更データを保持する内蔵RAM(内蔵RAM59および内蔵RAM60)のみを書き換えるだけでよいため、エントリ変更を検索処理に高速に反映することができる。   Thus, in the present embodiment, the entire data structure of the tree is not stored in one large RAM, but is stored in a plurality of small RAMs divided into tree hierarchies. In particular, the upper RAM stores the upper data of the tree structure including the starting point of the tree structure (that is, data having a shallow depth), and the lower RAM stores the lower data (that is, the depth) of the tree structure. Data) are sequentially stored, and the number of data stages stored in the subsequent RAM is reduced to one, thereby reducing the number of data stages stored in the previous RAM from three. With such a structure, for example, when only the entry data at the deepest part of the tree is changed, it is only necessary to rewrite the internal RAM (the internal RAM 59 and the internal RAM 60) that holds the change data. It can be reflected at high speed.

なお、図9に示すように、検索処理回路52の内部構成は、この検索処理回路52が検索のためにアクセスする内蔵RAM58に格納されたデータの構造(深さ3のツリー情報)に対応して、内蔵RAM58に一回アクセスして検索処理結果を出力するような内部構成となっている。また、検索処理回路53の内部構成も同様であり、検索処理回路53はそれぞれ内蔵RAM59または内蔵RAM56に一回アクセスして検索処理結果を出力するような内部構成となっている。一方、検索処理回路51は、深さ0から深さ2までのデータに対して深さごとに繰り返しアクセスして検索できるように、ラッチ73、74を備え、ラッチ73、74にて検索途中のデータが次にメモリにアクセスするためのタイミングを調整し、ループ処理を行う。   As shown in FIG. 9, the internal configuration of the search processing circuit 52 corresponds to the structure of data (depth 3 tree information) stored in the internal RAM 58 that the search processing circuit 52 accesses for search. Thus, the internal RAM 58 is accessed once and the search processing result is output. The internal configuration of the search processing circuit 53 is the same, and the search processing circuit 53 has an internal configuration in which the internal RAM 59 or the internal RAM 56 is accessed once and the search processing result is output. On the other hand, the search processing circuit 51 is provided with latches 73 and 74 so that data from depth 0 to depth 2 can be repeatedly accessed and searched for each depth. The timing for the next access of data to the memory is adjusted, and loop processing is performed.

なお、本実施の形態においては、検索用データベースのデータ構造として2分探索木を使用しているが、これに限らず、他のデータ構造を使用した実施の形態を構成することができる。   In the present embodiment, the binary search tree is used as the data structure of the search database. However, the present invention is not limited to this, and embodiments using other data structures can be configured.

次に、本実施の形態の動作について説明する。ここで、内蔵RAM57、内蔵RAM58、内蔵RAM59、および内蔵RAM60には、任意のエントリによる検索用データベースが構築されているものとする。   Next, the operation of the present embodiment will be described. Here, it is assumed that a search database with arbitrary entries is constructed in the internal RAM 57, the internal RAM 58, the internal RAM 59, and the internal RAM 60.

まず、検索用データベースの更新時以外における、検索処理回路51、検索処理回路52、および検索処理回路53の動作について、図7〜図10を参照して説明する。まず、デバイス13には、検索経路22を介して検索キーが入力され、この検索キーは検索処理回路51に入力される。   First, operations of the search processing circuit 51, the search processing circuit 52, and the search processing circuit 53 at times other than when the search database is updated will be described with reference to FIGS. First, a search key is input to the device 13 via the search path 22, and this search key is input to the search processing circuit 51.

検索処理回路51に入力された検索キーは、選択回路77により、運用面にある内蔵RAM57にアクセス可能な読み込みアドレス生成部71に送られる。ここで、運用面と待機面との選択情報は、RAM更新回路65から通知線66を介して選択回路77に通知されている。読み込みアドレス生成部71は検索キーの入力を受けて、内蔵RAM57における読み込み先のアドレスを生成し、この読み込み先のアドレスを内蔵RAM57に送る。そして、読み込みデータ受信部72にて、内蔵RAM57から送られてきた読み込み先のアドレスのデータを取得する。読み込みデータ受信部72では、検索キーと取得された読み込み先のアドレスのデータとを比較し、検索キーに相当する検索結果が得られない場合には、さらに内蔵RAM57にアクセスして検索処理を継続する。すなわち、ラッチ73で読み込みデータ受信部72から得られたデータを待ち合わせ、次に、ラッチ73から出力された読み込み先のアドレスのデータをもとに、読み込みアドレス生成部71にて、次の読み込み先のアドレスを生成し、内蔵RAM57へ再度生成した読み込み先のアドレスを送る。そして、内蔵RAM57から送られてきた読み込み先のアドレスのデータを読み込みデータ受信部72にて取得する。このような動作を検索キーと検索対象データベースの構造(RAMに格納されているデータの段数等)に応じて複数回繰り返した後、読み込み先のアドレスのデータを検索処理結果として検索処理回路52へ出力する。図11に示すように、内蔵RAM57には、深さ2までのツリー構造のエントリデータが格納されていることから、検索処理回路51は、一般に、読み込みデータ受信部72にて取得されたデータから読み込み先のアドレスを生成し該当アドレスのデータを読み込む、という操作を2回行う。   The search key input to the search processing circuit 51 is sent by the selection circuit 77 to the read address generation unit 71 that can access the built-in RAM 57 on the operation side. Here, the selection information between the operation side and the standby side is notified from the RAM update circuit 65 to the selection circuit 77 via the notification line 66. The read address generation unit 71 receives the input of the search key, generates a read destination address in the internal RAM 57, and sends this read destination address to the internal RAM 57. Then, the read data receiving unit 72 acquires the data of the read destination address sent from the built-in RAM 57. The read data receiving unit 72 compares the search key with the acquired data at the read destination address, and if no search result corresponding to the search key is obtained, the internal RAM 57 is further accessed to continue the search process. To do. That is, the latch 73 waits for the data obtained from the read data receiving unit 72, and then the read address generation unit 71 determines the next read destination based on the data of the read destination address output from the latch 73. And the read destination address generated again is sent to the built-in RAM 57. Then, the read data receiving unit 72 acquires the data of the read destination address sent from the built-in RAM 57. Such an operation is repeated a plurality of times according to the structure of the search key and the database to be searched (the number of data stages stored in the RAM, etc.), and the data at the read destination address is sent to the search processing circuit 52 as the search processing result. Output. As shown in FIG. 11, since the internal RAM 57 stores entry data having a tree structure up to a depth of 2, the search processing circuit 51 generally uses the data acquired by the read data receiving unit 72. An operation of generating a reading destination address and reading data at the corresponding address is performed twice.

図12−1は、図8における選択回路77、読み込みアドレス生成部71、読み込みデータ受信部72、および多重化回路78での処理のタイミングを示すタイミングチャートである。図12−1においては、各ユニットの処理遅延、および内蔵RAMからのリードタイムを1クロックとした場合を示している。ツリーの深さ2までの検索をおこない、ループしたデータと、入力されてくるデータとの衝突を防ぐためには、検索キーを8クロック毎に入力することになる。すなわち、検索処理回路51は、検索キーの入力から多重化回路78にて検索処理結果を得るまでに8クロックを要する。なお、図12−1では、深さ0におけるアドレスの生成、そのアドレスのデータの取得過程は含まれておらず、2分探索木の探索の起点である深さ0におけるエントリデータと検索キーとの比較はアドレスの生成なしに行うことを仮定している。深さ0におけるアドレスの生成、そのアドレスのデータの取得過程を含めてもよいが、その分、検索処理時間が長くなる。   12A is a timing chart illustrating processing timings in the selection circuit 77, the read address generation unit 71, the read data reception unit 72, and the multiplexing circuit 78 in FIG. FIG. 12A shows a case where the processing delay of each unit and the read time from the built-in RAM are set to one clock. In order to search up to a tree depth of 2 and prevent collision between looped data and input data, a search key is input every 8 clocks. That is, the search processing circuit 51 takes 8 clocks from the input of the search key until the multiplexing circuit 78 obtains the search processing result. In FIG. 12A, the generation of the address at the depth 0 and the acquisition process of the data of the address are not included, and the entry data and the search key at the depth 0, which are the starting points of the search of the binary search tree, It is assumed that the comparison is performed without generating an address. The generation of the address at the depth 0 and the acquisition process of the data of the address may be included, but the search processing time is increased accordingly.

次に、検索処理回路51から出力された検索処理結果は、検索処理回路52へ入力される。検索キーに相当する検索結果が既に得られている場合には、この検索処理結果は検索処理回路53へそのまま送られるが、検索処理の途中である場合には、検索処理回路52による検索処理が行われる。図9に示すように、読み込みアドレス送信部81は検索処理回路51からの出力を受けて、内蔵RAMにおける読み込み先のアドレスを生成し、この読み込み先のアドレスをRAM選択回路54へ送る。RAM選択回路54は、運用面にある内蔵RAM58を選択し、検索処理回路52にて生成された読み込み先のアドレスを内蔵RAM58へ送る。そして、内蔵RAM58から送られてきた読み込み先のアドレスのデータを読み込みデータ受信部82にて取得する。この取得されたデータは、図11における深さ3のエントリデータである。読み込みデータ受信部82にて取得された読み込み先のアドレスのデータは検索キーと比較される。そして、検索処理結果は、検索処理回路53へ送られる。   Next, the search processing result output from the search processing circuit 51 is input to the search processing circuit 52. If a search result corresponding to the search key has already been obtained, the search processing result is sent to the search processing circuit 53 as it is, but if the search process is in the middle, the search processing by the search processing circuit 52 is performed. Done. As shown in FIG. 9, the read address transmission unit 81 receives the output from the search processing circuit 51, generates a read destination address in the built-in RAM, and sends this read destination address to the RAM selection circuit 54. The RAM selection circuit 54 selects the built-in RAM 58 on the operation side, and sends the read destination address generated by the search processing circuit 52 to the built-in RAM 58. Then, the read data receiving unit 82 acquires the data of the read destination address sent from the built-in RAM 58. This acquired data is the entry data of depth 3 in FIG. The data of the read destination address acquired by the read data receiving unit 82 is compared with the search key. Then, the search processing result is sent to the search processing circuit 53.

図12−2は、図9における読み込みアドレス送信部81および読み込みデータ受信部82での処理のタイミングを示すタイミングチャートである。図12−2においては、図12−1と同様に、各ユニットの処理遅延、および内蔵RAMからのリードタイムを1クロックとしている。図12−2に示すように、検索処理回路52における検索処理時間は、読み込みアドレス送信部81にて深さ2での検索処理結果を受けてから読み込みデータ送信部82にて深さ3での検索処理結果を受けるまでの3クロックであり、検索処理回路51のように、検索途中の結果をループせずに、1回のリード処理で検索を終了する。   FIG. 12-2 is a timing chart illustrating processing timings in the read address transmitting unit 81 and the read data receiving unit 82 in FIG. In FIG. 12-2, similarly to FIG. 12-1, the processing delay of each unit and the read time from the built-in RAM are one clock. As shown in FIG. 12B, the search processing time in the search processing circuit 52 is the time at which the read data transmission unit 82 receives the search processing result at the depth 2 and the read data transmission unit 82 at the depth 3. It takes 3 clocks until the search processing result is received. Like the search processing circuit 51, the search is finished in one read process without looping the search result.

次に、検索処理回路52から出力された検索処理結果は、検索処理回路53へ入力される。検索キーに相当する検索結果が既に得られている場合には、この検索処理結果は検索経路22を介して出力される。検索処理の途中である場合には、検索処理回路53による検索処理が行われる。図10に示すように、読み込みアドレス送信部83は検索処理回路52からの出力を受けて、内蔵RAMにおける読み込み先のアドレスを生成し、この読み込み先のアドレスを選択回路85へ送る。選択回路85は、読み込み先のアドレスに応じてRAM選択回路55またはRAM選択回路56を選択し、読み込み先のアドレスを送出する。続いて、多重化回路86は、RAM選択回路55またはRAM選択回路56から送られてきた読み込み先のアドレスのデータを、読み込みデータ受信部84へ送り出す処理を行う。読み込みデータ受信部84にて取得されたデータは、検索処理結果として検索経路22を介して出力される。ここで、選択回路85がRAM選択回路55を選択した場合には、RAM選択回路55は運用面にある内蔵RAM59にアクセスし、図11に示す深さ4のツリーの左半分を検索する。また、選択回路85がRAM選択回路56を選択した場合には、RAM選択回路56は運用面にある内蔵RAM60にアクセスし、図11に示す深さ4のツリーの右半分を検索する。   Next, the search processing result output from the search processing circuit 52 is input to the search processing circuit 53. If a search result corresponding to the search key has already been obtained, this search processing result is output via the search path 22. When the search process is in progress, the search process by the search processing circuit 53 is performed. As shown in FIG. 10, the read address transmission unit 83 receives an output from the search processing circuit 52, generates a read destination address in the built-in RAM, and sends this read destination address to the selection circuit 85. The selection circuit 85 selects the RAM selection circuit 55 or the RAM selection circuit 56 according to the read destination address and sends the read destination address. Subsequently, the multiplexing circuit 86 performs a process of sending the data at the read destination address sent from the RAM selection circuit 55 or the RAM selection circuit 56 to the read data receiving unit 84. The data acquired by the read data receiving unit 84 is output via the search path 22 as a search processing result. Here, when the selection circuit 85 selects the RAM selection circuit 55, the RAM selection circuit 55 accesses the built-in RAM 59 on the operation side and searches the left half of the tree of depth 4 shown in FIG. When the selection circuit 85 selects the RAM selection circuit 56, the RAM selection circuit 56 accesses the built-in RAM 60 on the operation side and searches the right half of the tree of depth 4 shown in FIG.

図12−3は、図10における読み込みアドレス送信部83、選択回路85、検索回路からRAMへの経路におけるRAM選択回路55またはRAM選択回路56、RAMから検索回路への経路におけるRAM選択回路55またはRAM選択回路56、多重化回路86、および読み込みデータ受信84での処理のタイミングを示すタイミングチャートである。図12−3においては、図12−1と同様に、各ユニットの処理遅延、および内蔵RAMからのリードタイムを1クロックとしている。図12−3に示すように、検索処理回路53における検索処理時間は、読み込みアドレス生成部83にて深さ3での検索処理結果を受けてから読み込みデータ送信部84にて深さ4での検索処理結果を受けるまでの7クロックであり、検索処理回路51のように、検索途中の結果をループせずに、1回のリード処理で検索を終了する。また、読み込みアドレス生成部83には、深さ3での検索処理結果が8クロックごとに入力されている。これは、検索処理回路53には、前段からの検索処理結果が8クロックごとにパイプライン的に入力されるからである。   12-3 illustrates the read address transmission unit 83, the selection circuit 85, the RAM selection circuit 55 or the RAM selection circuit 56 in the path from the search circuit to the RAM, and the RAM selection circuit 55 in the path from the RAM to the search circuit in FIG. 7 is a timing chart showing processing timings in a RAM selection circuit 56, a multiplexing circuit 86, and a read data reception 84. 12C, as in FIG. 12A, the processing delay of each unit and the read time from the built-in RAM are set to one clock. As shown in FIG. 12-3, the search processing time in the search processing circuit 53 is the time at which the read data generation unit 83 receives the search processing result at the depth 3 and the read data transmission unit 84 at the depth 4. It takes 7 clocks until the search processing result is received, and the search is completed in one read process without looping the result in the middle of the search as in the search processing circuit 51. In addition, the retrieval processing result at depth 3 is input to the read address generation unit 83 every 8 clocks. This is because the search processing result from the previous stage is input to the search processing circuit 53 in a pipeline manner every 8 clocks.

次に、検索動作中における検索用データベースの更新方法について説明する。検索用データベースの更新時には、制御PC8からエントリが変更された新データベースのデータが制御リンク9を介してルータ1に送られる。コントローラ15は、制御PC8から送られてきた新データベースのデータを、制御リンク9上でのデータフォーマットから外部バス23上でのデータフォーマットに変換する。続いて、データフォーマットが変換された新データベースは、外部バス接続線24を介して外部メモリ14へ送られ、保持される。   Next, a method for updating the search database during the search operation will be described. When the search database is updated, data of the new database whose entry has been changed is sent from the control PC 8 to the router 1 via the control link 9. The controller 15 converts the data in the new database sent from the control PC 8 from the data format on the control link 9 to the data format on the external bus 23. Subsequently, the new database whose data format has been converted is sent to the external memory 14 via the external bus connection line 24 and held therein.

次に、制御PC8からルータ1内のデバイス13に検索用データベースの更新指示が送られると、外部バス接続線24を介してRAM更新回路65に対して更新指示が送られる。RAM更新回路65は、更新指示を受けて、待機面となっている内蔵RAM61、内蔵RAM62、内蔵RAM63、および内蔵RAM64に対して、外部メモリ14に保持されている新データベースを書き込み、新データベースの書き込みが終了すると、検索処理回路51、RAM選択回路54、RAM選択回路55、およびRAM選択回路56に通知線66を介して運用面の変更を指示する。   Next, when a search database update instruction is sent from the control PC 8 to the device 13 in the router 1, an update instruction is sent to the RAM update circuit 65 via the external bus connection line 24. In response to the update instruction, the RAM update circuit 65 writes the new database held in the external memory 14 to the built-in RAM 61, built-in RAM 62, built-in RAM 63, and built-in RAM 64 serving as a standby surface. When the writing is completed, the search processing circuit 51, the RAM selection circuit 54, the RAM selection circuit 55, and the RAM selection circuit 56 are instructed to change the operation side via the notification line 66.

運用面の変更が起きると、まず、検索処理回路51が検索に使用していた内蔵RAM57を内蔵RAM61へ変更するため、選択回路77において検索キーが入力されていない時間に、検索経路22から入力される検索キーの出力先を、読み込みアドレス生成部71から読み込みアドレス生成部74へ変更する。このように、検索処理回路51では、選択回路77により選択される2系統の検索処理回路を利用して、検索に使用する内蔵RAMの切り替えが行われる。   When the operational change occurs, first, the internal RAM 57 used for the search by the search processing circuit 51 is changed to the internal RAM 61, so that the search circuit 22 inputs the search key 22 at a time when the search key is not input. The search key output destination is changed from the read address generation unit 71 to the read address generation unit 74. As described above, the search processing circuit 51 uses the two search processing circuits selected by the selection circuit 77 to switch the built-in RAM used for the search.

なお、検索キーが1クロック分以上のビット幅を持つ場合、選択回路77による内蔵RAMの変更のタイミングは、検索キーが途中で切れて読み込みアドレス生成部71、または読み込みアドレス生成部74に送られないように、一続きの検索キーから次の検索キーへと検索キーの入力が途切れる間となる。   When the search key has a bit width of one clock or more, the timing of changing the internal RAM by the selection circuit 77 is sent to the read address generation unit 71 or the read address generation unit 74 because the search key is cut off halfway. As a result, the input of the search key is interrupted from one search key to the next search key.

次に、検索処理回路52では、図12−2に示すように、8クロックごとに深さ2での検索処理結果が入力されるので、検索処理回路51にて検索処理を行う内蔵RAMを切り替え後、新データベースによる検索処理結果が検索処理回路52に入力されるまでの間(7クロックの間)に、RAM選択回路54において読み込み先のアドレスの出力先を内蔵RAM58から内蔵RAM62へ変更し、新データベースによる検索をおこなう。このとき、内蔵RAMの切り替えによるデータベースの更新は、検索処理回路51と検索処理回路52の処理能力の速度差、言い換えると、単位時間あたりの検索処理回数の差、を利用して行っている。つまり、検索処理回路51では、検索途中の結果をループし同じ内蔵RAMにリードすることにより検索を行うのに対し、検索処理回路52では、検索処理の途中結果をループせずに、1回のリード処理で検索を終了しているため、検索処理回路52の検索処理能力の速度は、検索処理回路51の検索処理能力の速度を上回る。このような検索処理能力の速度差が存在すれば、前段の検索処理回路51から次のデータが入力されるまでの8クロックの間に、後段の検索処理回路52では検索処理を行うと共に、内蔵RAMの運用面と待機面との切り替えを行うことができる。図12−2に示すように、検索処理回路52における内蔵RAMの切り替えは、検索処理回路52が内蔵RAM58にアクセスして検索を行っている時間を除いて可能となっている。なお、図12−2では、メモリの切り替えが可能なメモリ切替可能時間を斜線で示している。   Next, in the search processing circuit 52, as shown in FIG. 12-2, the search processing result at depth 2 is input every 8 clocks, so the internal RAM for performing the search processing in the search processing circuit 51 is switched. Thereafter, until the search processing result by the new database is input to the search processing circuit 52 (for 7 clocks), the RAM selection circuit 54 changes the output destination of the read destination address from the internal RAM 58 to the internal RAM 62. Search using the new database. At this time, the update of the database by switching the built-in RAM is performed using the speed difference between the processing capabilities of the search processing circuit 51 and the search processing circuit 52, in other words, the difference in the number of search processes per unit time. In other words, the search processing circuit 51 performs a search by looping a result in the middle of a search and reading it to the same built-in RAM, whereas the search processing circuit 52 does not loop the result in the middle of a search process once. Since the search is finished in the read process, the speed of the search processing capability of the search processing circuit 52 exceeds the speed of the search processing capability of the search processing circuit 51. If there is such a speed difference in the search processing capability, the search processing circuit 52 in the subsequent stage performs the search process during the 8 clocks until the next data is input from the search processing circuit 51 in the previous stage, and is built in. Switching between the RAM operation side and standby side can be performed. As shown in FIG. 12B, switching of the internal RAM in the search processing circuit 52 is possible except for the time during which the search processing circuit 52 accesses the internal RAM 58 and performs a search. In FIG. 12-2, the memory switchable time during which the memory can be switched is indicated by hatching.

同様に、検索処理回路53では、検索処理回路51、検索処理回路52と順番に内蔵RAMを切り替え後、新データベースによる検索結果が検索処理回路53に入力されるまでの間(7クロックの間)に、RAM選択回路55およびRAM選択回路56において、読み込み先のアドレスの出力先を内蔵RAM59および内蔵RAM60から内蔵RAM63および内蔵RAM64へ変更し、次の更新指示があるまで、新データベースによる検索処理を行い続ける。このときも同様に、内蔵RAMの切り替えによるデータベースの更新は、検索処理回路51と検索処理回路53の処理能力の速度差を利用して行っている。すなわち、検索処理回路51では、検索途中の結果をループし同じ内蔵RAMにリードすることにより検索を行うのに対し、検索処理回路53では、検索処理の途中結果をループせずに、1回のリード処理で検索を終了しているため、検索処理回路53の検索処理能力の速度は、検索処理回路51の検索処理能力の速度を上回る。図12−3に示すように、検索処理回路53における内蔵RAMの切り替えは、検索処理回路53が内蔵RAM59または内蔵RAM60にアクセスして検索を行っている時間を除いて可能となっている。図12−3では、メモリの切り替えが可能なメモリ切替可能時間を斜線で示している。   Similarly, in the search processing circuit 53, after the built-in RAM is sequentially switched to the search processing circuit 51 and the search processing circuit 52, the search result by the new database is input to the search processing circuit 53 (for 7 clocks). In addition, the RAM selection circuit 55 and the RAM selection circuit 56 change the output destination of the read destination address from the built-in RAM 59 and the built-in RAM 60 to the built-in RAM 63 and the built-in RAM 64, and search processing by the new database is performed until the next update instruction is issued. Continue to do. Similarly, at this time, the update of the database by switching the built-in RAM is performed using the speed difference between the processing capabilities of the search processing circuit 51 and the search processing circuit 53. That is, the search processing circuit 51 performs a search by looping a result in the middle of a search and reading it to the same built-in RAM, whereas the search processing circuit 53 does not loop the result in the middle of a search process once. Since the search is completed in the read process, the speed of the search processing capability of the search processing circuit 53 exceeds the speed of the search processing capability of the search processing circuit 51. As shown in FIG. 12C, switching of the internal RAM in the search processing circuit 53 is possible except for the time during which the search processing circuit 53 accesses the internal RAM 59 or the internal RAM 60 and performs a search. In FIG. 12C, the memory switchable time during which the memory can be switched is indicated by hatching.

本実施の形態によれば、前段と後段の検索処理回路の処理能力の速度差を利用し、前段の検索処理回路を上回る処理速度を有する後段の検索処理回路により、検索途中のデータが前段の検索処理回路から後段の検索処理回路へ入力されない時間を利用して新しいエントリ情報を有するメモリへ切り替えることにより、検索動作中であっても検索動作を停止せずに検索用データベースのエントリを更新することができる。   According to the present embodiment, by utilizing the speed difference between the processing capabilities of the search processing circuit of the preceding stage and the subsequent process, the search process circuit of the subsequent stage having a processing speed higher than that of the search process circuit of the previous stage allows the data being searched to be By switching to a memory having new entry information using a time not input from the search processing circuit to the subsequent search processing circuit, the search database entry is updated without stopping the search operation even during the search operation. be able to.

また、本実施の形態においては、検索用データベースのツリー構造を深さ毎に区切って複数個の内蔵RAM内に保持しているため、例えば、ツリー最深部のエントリデータのみを変更する場合には、その最深部のデータを保持する内蔵RAMのみを更新すればよく、エントリ更新を検索処理に高速に反映することができる。図13は、検索用データベースのツリーの最深部のみにエントリ更新がある場合を示す図であり、深さ4におけるエントリデータが更新される場合を示している。前述のように、この場合には深さ4におけるエントリデータを保持する内蔵RAM59および内蔵RAM60の内容を更新するだけでよいので、更新されたエントリを待機面にある内蔵RAM63および内蔵RAM64に書き込み、RAM選択回路55およびRAM選択回路56により、これらの待機面にある内蔵RAMを運用面に変更すればよい。なお、検索用データベースのデータ構造に基づいて内蔵RAMの一部のみを更新するなどの判断は、外部の制御PC8を介して行う。   In this embodiment, the tree structure of the search database is divided into depths and stored in a plurality of built-in RAMs. For example, when only the entry data at the deepest part of the tree is changed. Only the internal RAM that holds the deepest data needs to be updated, and the entry update can be reflected in the search process at high speed. FIG. 13 is a diagram illustrating a case where entry update is performed only in the deepest part of the tree of the search database, and illustrates a case where entry data at depth 4 is updated. As described above, in this case, it is only necessary to update the contents of the internal RAM 59 and the internal RAM 60 that hold the entry data at the depth 4, so that the updated entries are written to the internal RAM 63 and the internal RAM 64 on the standby surface. The RAM selection circuit 55 and the RAM selection circuit 56 may change the built-in RAM on the standby side to the operation side. Note that the determination to update only a part of the built-in RAM based on the data structure of the search database is made via the external control PC 8.

また、本実施の形態においては、後段の検索処理回路の個数を2個とする例を示したが、これは図11に示すデータ構造を例に説明を行ったからであり、検索用データベースの構造と量に応じて、後段の検索処理回路を、適宜、任意個数設定することができ、また、これに応じて、内蔵RAMおよびRAM選択回路も適宜設定することができる。   In the present embodiment, an example in which the number of subsequent search processing circuits is two has been described. This is because the data structure shown in FIG. 11 has been described as an example, and the structure of the search database. Depending on the amount, the number of subsequent search processing circuits can be set as appropriate, and the built-in RAM and RAM selection circuit can also be set accordingly.

また、本実施の形態においては、後段の検索処理回路である検索処理回路52および検索処理回路53がそれぞれ運用面にある内蔵RAMにアクセスして検索を行う回数を1回としたが、これに限定されず、前段の検索処理回路である検索処理回路51が運用面にある内蔵RAMにアクセスして検索を行う回数よりも少なければ、任意の回数としてもよい。すなわち、この条件を満たせば、本実施の形態の効果を得ることができる。なお、この場合には、後段の検索処理回路の内部構造、後段の検索処理回路が検索のためにアクセスする内蔵RAMに格納されているデータ構造等は、アクセスの回数に依存して適宜設定される。   In the present embodiment, the search processing circuit 52 and the search processing circuit 53, which are the subsequent search processing circuits, each access the internal RAM on the operation side and perform a search, but the number of times of the search is one. The number of times is not limited, and the number of times may be arbitrary as long as the number of times the search processing circuit 51 as the search processing circuit in the previous stage accesses the built-in RAM on the operation side and performs the search. That is, if this condition is satisfied, the effect of the present embodiment can be obtained. In this case, the internal structure of the subsequent search processing circuit, the data structure stored in the internal RAM accessed by the subsequent search processing circuit for searching, and the like are appropriately set depending on the number of accesses. The

実施の形態2.
本発明にかかる検索装置およびデータ処理装置の実施の形態2について説明する。本実施の形態を利用したネットワーク構成例は、例えば、図1に示す実施の形態1におけるネットワーク構成と同様である。
Embodiment 2.
A second embodiment of the search device and data processing device according to the present invention will be described. A network configuration example using this embodiment is the same as the network configuration in the first embodiment shown in FIG.

図14は、本実施の形態にかかるデータ処理装置としてのルータ1の内部構成を示す図である。図14に示すルータ1の内部構成と、図2に示す実施の形態1におけるルータ1の内部構成との違いは、図2におけるデバイス13が、図14ではデバイス73で置き換えられている点である。図14におけるその他の構成は、図2における構成と同様である。そのため、図14においては、図2と同一の構成物には同一の符号を付して、その詳細な説明を省略する。次に、図2との違いである検索装置としてのデバイス73の内部構成について述べる。   FIG. 14 is a diagram illustrating an internal configuration of the router 1 as the data processing apparatus according to the present embodiment. The difference between the internal configuration of the router 1 shown in FIG. 14 and the internal configuration of the router 1 in the first embodiment shown in FIG. 2 is that the device 13 in FIG. 2 is replaced with a device 73 in FIG. . Other configurations in FIG. 14 are the same as those in FIG. Therefore, in FIG. 14, the same components as those in FIG. 2 are denoted by the same reference numerals, and detailed description thereof is omitted. Next, the internal configuration of the device 73 as a search device, which is different from FIG. 2, will be described.

図15は、図14におけるデバイス73の内部構成を示す図である。図15に示すように、デバイス73は、RAM更新回路112と、検索キー分離回路101と、前段の検索処理回路である検索処理回路102および検索処理回路103と、検索処理回路102および検索処理回路103からの出力が多重化される検索キー多重化回路104と、後段の検索処理回路である検索処理回路105と、同じく後段の検索処理回路であると共に、検索処理回路105からの検索処理結果が入力される検索処理回路106と、RAM選択回路107、RAM選択回路108、およびRAM選択回路109と、運用面にある、内蔵RAM57および内蔵RAM121、内蔵RAM58および内蔵RAM122、内蔵RAM59および内蔵RAM123、ならびに内蔵RAM60および内蔵RAM124と、待機面にある、内蔵RAM61および内蔵RAM131、内蔵RAM62および内蔵RAM132、内蔵RAM63および内蔵RAM133、ならびに内蔵RAM64および内蔵RAM134と、RAM更新回路112から検索処理回路102および検索処理回路103に接続された通知線112と、を含んで構成される。次に、各構成要素の内部構成および動作について述べる。   FIG. 15 is a diagram showing an internal configuration of the device 73 in FIG. As shown in FIG. 15, the device 73 includes a RAM update circuit 112, a search key separation circuit 101, a search processing circuit 102 and a search processing circuit 103, which are search processing circuits in the previous stage, and a search processing circuit 102 and a search processing circuit. The search key multiplexing circuit 104 in which the output from 103 is multiplexed, the search processing circuit 105 that is the subsequent search processing circuit, and the search processing circuit that is also the subsequent stage, and the search processing result from the search processing circuit 105 is Input search processing circuit 106, RAM selection circuit 107, RAM selection circuit 108, RAM selection circuit 109, internal RAM 57 and internal RAM 121, internal RAM 58 and internal RAM 122, internal RAM 59 and internal RAM 123, and Built-in RAM 60 and built-in RAM 124, on standby Built-in RAM 61 and built-in RAM 131, built-in RAM 62 and built-in RAM 132, built-in RAM 63 and built-in RAM 133, built-in RAM 64 and built-in RAM 134, and notification line 112 connected from RAM update circuit 112 to search processing circuit 102 and search processing circuit 103 Consists of including. Next, the internal configuration and operation of each component will be described.

なお、本実施の形態においては、以下に説明するように、同時に2つの異なる検索キーを扱う例について述べるが、検索キーの個数は2つに限定されることはなく、同時に3つ以上の異なる検索キーを扱う実施の形態を実現することができる。   In the present embodiment, as described below, an example in which two different search keys are handled at the same time will be described. However, the number of search keys is not limited to two, and at least three different search keys can be simultaneously used. An embodiment that handles a search key can be realized.

検索キー分離回路101には検索経路22から検索キーが入力される。検索キー分離回路101は、後述する検索キーを2つに分離し、分離した検索キーの一方を検索処理回路102へ、他方を検索処理回路103へ送り出す回路である。このため、検索処理回路102および検索処理回路103は、検索キー分離回路101の後段に並列して設けられている。   A search key is input from the search path 22 to the search key separation circuit 101. The search key separation circuit 101 is a circuit that separates a search key described later into two, and sends one of the separated search keys to the search processing circuit 102 and the other to the search processing circuit 103. For this reason, the search processing circuit 102 and the search processing circuit 103 are provided in parallel to the subsequent stage of the search key separation circuit 101.

図16は、検索経路22から検索キー分離回路101へ入力される検索キーのフォーマットの一例を示す図であり、検索キー600は検索キー601および検索キー602含んで構成されている。検索キー分離回路101は、検索キー610を検索キー601と検索キー602とに分離する。   FIG. 16 is a diagram illustrating an example of a format of a search key input from the search path 22 to the search key separation circuit 101. The search key 600 includes a search key 601 and a search key 602. The search key separation circuit 101 separates the search key 610 into a search key 601 and a search key 602.

なお、本実施の形態においては、検索キー601を検索処理回路102へ、検索キー602を検索処理回路103へ送るという前提で説明を続けるが、この前提は本発明を限定するものではなく、検索キーの送り先を相互に入れ替えてもよい。   In the present embodiment, the description is continued on the assumption that the search key 601 is sent to the search processing circuit 102 and the search key 602 is sent to the search processing circuit 103. However, this assumption does not limit the present invention. Key destinations may be interchanged.

図17は、検索処理回路102内部の回路構成を示す図である。図17に示すように、検索キー分離回路101から入力された検索キー601は、選択回路130にて読み込みアドレス生成部71へ送り出される。このとき、読み込みアドレス生成部71は運用面にある内蔵RAM57へ接続され、一方、読み込みアドレス生成部74は待機面にある内蔵RAM61へ接続されている。読み込みアドレス生成部71では、入力された検索キー601をもとに、内蔵RAM57における読み込み先のアドレスを生成して、内蔵RAM57へ読み込み先のアドレスを送り、内蔵RAM57から送られてきた読み込み先のアドレスのデータを読み込みデータ受信部72にて取得する。   FIG. 17 is a diagram showing a circuit configuration inside the search processing circuit 102. As shown in FIG. 17, the search key 601 input from the search key separation circuit 101 is sent to the read address generation unit 71 by the selection circuit 130. At this time, the read address generation unit 71 is connected to the internal RAM 57 on the operation side, while the read address generation unit 74 is connected to the internal RAM 61 on the standby side. The read address generation unit 71 generates a read destination address in the internal RAM 57 based on the input search key 601, sends the read destination address to the internal RAM 57, and reads the read destination address sent from the internal RAM 57. The address data is read and acquired by the data receiving unit 72.

読み込みデータ受信部72では、取得された読み込み先のアドレスのデータと検索キー601とを比較し、検索キー601に相当する検索結果が得られない場合には、さらに内蔵RAM57にアクセスして検索処理を継続する。すなわち、ラッチ73で読み込みデータ受信部72からのデータを待ち合わせ、次に、ラッチ73から出力された読み込み先のアドレスのデータをもとに、読み込みアドレス生成部71にて、次の読み込み先のアドレスを生成し、内蔵RAM57へ再度生成した読み込み先のアドレスを送る。そして、内蔵RAM57から送られてきた読み込み先のアドレスのデータを読み込みデータ受信部72にて取得する。このような動作を任意回数繰り返した後、読み込み先のアドレスのデータを多重化回路131へ渡して多重化し、通知線111を介して送られてきた検索対象となる内蔵RAMを指定する指定情報(この場合は、内蔵RAM57を指定する指定情報)を付加して、後段の検索キー多重化回路104へ出力する。   The read data receiving unit 72 compares the data of the acquired read destination address with the search key 601, and if a search result corresponding to the search key 601 cannot be obtained, the internal RAM 57 is further accessed to perform the search process. Continue. That is, the latch 73 waits for data from the read data receiving unit 72, and then, based on the data of the read destination address output from the latch 73, the read address generating unit 71 uses the next read destination address. Is sent to the built-in RAM 57 again. Then, the read data receiving unit 72 acquires the data of the read destination address sent from the built-in RAM 57. After repeating this operation an arbitrary number of times, the data at the address to be read is passed to the multiplexing circuit 131, multiplexed, and designated information (indicated by the internal RAM to be searched that is sent via the notification line 111) ( In this case, designation information for designating the internal RAM 57 is added and output to the search key multiplexing circuit 104 in the subsequent stage.

検索キー多重化回路104は、検索処理回路102および検索処理回路103から送られてきた検索処理結果を検索処理回路105へ送り出す処理を行う。ここで、検索処理回路103による検索処理も検索処理回路102と同様に行われるが、検索処理回路103が検索対象とする運用面の内蔵RAMは、内蔵RAM121である。   The search key multiplexing circuit 104 performs processing for sending the search processing results sent from the search processing circuit 102 and the search processing circuit 103 to the search processing circuit 105. Here, the search processing by the search processing circuit 103 is also performed in the same manner as the search processing circuit 102, but the internal RAM on the operational side targeted by the search processing circuit 103 is the internal RAM 121.

図18は、検索処理回路105内部の回路構成を示す図である。図18に示すように、検索キー多重化回路104から出力された検索処理結果は、検索処理回路105へ入力され、検索途中である場合には、読み込みアドレス送信部141にて読み込み先のアドレスを生成し、検索処理回路102および検索処理回路103で付加された検索対象となる内蔵RAMを指定する指定情報と共に、生成された読み込み先のアドレスをRAM選択回路107へ送る。そして、RAM選択回路107から送られてきた読み込み先のアドレスのデータを読み込みデータ受信部142にて取得し、得られた検索処理結果を検索処理回路106へ出力する。   FIG. 18 is a diagram showing a circuit configuration inside the search processing circuit 105. As shown in FIG. 18, the search processing result output from the search key multiplexing circuit 104 is input to the search processing circuit 105, and when the search is in progress, the read address transmission unit 141 sets the read destination address. The generated read destination address is sent to the RAM selection circuit 107 together with the designation information for designating the internal RAM to be searched that is generated and added by the search processing circuit 102 and the search processing circuit 103. Then, the data at the reading destination sent from the RAM selection circuit 107 is acquired by the reading data receiving unit 142, and the obtained search processing result is output to the search processing circuit 106.

RAM選択回路107では、検索処理回路105から送られてきた検索対象となる内蔵RAMを指定する指定情報をもとに、検索キー601による検索中のデータ(読み込み先のアドレス)に対しては内蔵RAM58を、検索キー602による検索中のデータ(読み込み先のアドレス)に対しては内蔵RAM122をそれぞれ選択し、各検索中のデータをそれぞれ選択された内蔵RAMへ送り、各内蔵RAMから該当アドレスのデータを読み出し、その結果を検索処理回路105へ出力する。   The RAM selection circuit 107 has built-in data that is being searched for by the search key 601 (read destination address) based on the designation information designating the built-in RAM to be searched sent from the search processing circuit 105. The RAM 58 selects the built-in RAM 122 for the data (reading destination address) being searched by the search key 602, and sends the data being searched to the selected built-in RAM. Data is read and the result is output to the search processing circuit 105.

図19は、検索処理回路106内部の回路構成を示す図である。図19に示すように、検索処理回路105から出力された検索処理結果は、検索処理回路106へ入力され、検索処理結果が検索途中である場合には、読み込みアドレス送信部151にて読み込み先のアドレスを生成し、検索対象となる内蔵RAMを指定する指定情報と共にこの読み込み先のアドレスを選択回路153へ送る。選択回路153では、読み込み先のアドレスに応じてRAM選択回路108またはRAM選択回路109を選択する。例えば、RAM選択回路108が選択された場合には、RAM選択回路108は運用面となっている内蔵RAMを選択し、さらに、検索対象となる内蔵RAMを指定する指定情報に基づいて、読み込み先のアドレスを内蔵RAM59または内蔵RAM123へ送る。検索キー601による検索中のデータ(読み込み先のアドレス)に対しては内蔵RAM59が、検索キー602による検索中のデータ(読み込み先のアドレス)に対しては内蔵RAM123が選択される。同様に、RAM選択回路109が選択された場合には、RAM選択回路109は運用面となっている内蔵RAMを選択し、さらに、検索対象となる内蔵RAMを指定する指定情報に基づいて、読み込み先のアドレスを内蔵RAM60または内蔵RAM124へ送る。検索キー601による検索中のデータ(読み込み先のアドレス)に対しては内蔵RAM60が、検索キー602による検索中のデータ(読み込み先のアドレス)に対しては内蔵RAM124が選択される。続いて、読み込み先のアドレスのデータはRAM選択回路108またはRAM選択回路109を経て多重化回路154へ送られ、さらに、多重化回路154から読み込みデータ受信部152へ送られる。読み込みデータ受信部152にて取得されたデータは、検索処理結果として検索経路22を介してデバイス73から出力される。   FIG. 19 is a diagram showing a circuit configuration inside the search processing circuit 106. As shown in FIG. 19, the search processing result output from the search processing circuit 105 is input to the search processing circuit 106, and when the search processing result is in the middle of the search, the read address transmission unit 151 reads the read destination. An address is generated, and this reading destination address is sent to the selection circuit 153 together with designation information for designating the internal RAM to be searched. The selection circuit 153 selects the RAM selection circuit 108 or the RAM selection circuit 109 according to the read destination address. For example, when the RAM selection circuit 108 is selected, the RAM selection circuit 108 selects an internal RAM that is an operational surface, and further reads a read destination based on designation information that designates the internal RAM to be searched. Are sent to the internal RAM 59 or the internal RAM 123. The built-in RAM 59 is selected for the data being searched by the search key 601 (reading address), and the built-in RAM 123 is selected for the data being searched by the search key 602 (reading address). Similarly, when the RAM selection circuit 109 is selected, the RAM selection circuit 109 selects an internal RAM that is in operation, and further reads based on designation information that designates the internal RAM to be searched. The previous address is sent to the internal RAM 60 or the internal RAM 124. The built-in RAM 60 is selected for the data being searched by the search key 601 (reading address), and the built-in RAM 124 is selected for the data being searched by the search key 602 (reading address). Subsequently, the data at the read destination address is sent to the multiplexing circuit 154 via the RAM selection circuit 108 or the RAM selection circuit 109, and further sent from the multiplexing circuit 154 to the read data receiving unit 152. The data acquired by the read data receiving unit 152 is output from the device 73 via the search path 22 as a search processing result.

RAM更新回路112は、検索用データベースの更新時に、外部バス23を経由して送られてきたエントリデータを、待機面となっている内蔵RAM群へ書き込む回路である。図15では、待機面を、内蔵RAM61、内蔵RAM62、内蔵RAM63、内蔵RAM64、内蔵RAM132、内蔵RAM132、内蔵RAM133、および内蔵RAM134としている。さらに、RAM更新回路112は、エントリデータの更新指示を、通知線111を使って検索処理回路102および検索処理回路103へ通知する。   The RAM update circuit 112 is a circuit that writes entry data sent via the external bus 23 to the internal RAM group serving as a standby surface when the search database is updated. In FIG. 15, the standby surfaces are an internal RAM 61, an internal RAM 62, an internal RAM 63, an internal RAM 64, an internal RAM 132, an internal RAM 132, an internal RAM 133, and an internal RAM 134. Further, the RAM update circuit 112 notifies the search processing circuit 102 and the search processing circuit 103 of an entry data update instruction using the notification line 111.

図20は、エントリデータによって構成されたツリーが各内蔵RAMの内部でどのように構成されるかを示した図である。図20に示すように、本実施の形態ではテーブル201とテーブル202からなる2つのテーブルを使用している。テーブル201では、内蔵RAM57に深さ0から深さ2までのツリー情報が登録されており、内蔵RAM58に深さ3のツリー情報が、内蔵RAM59に深さ4のツリー情報の左半分が、内蔵RAM60に深さ4のツリー情報の右半分が登録されている。テーブル202では、内蔵RAM121に深さ0から深さ2までのツリー情報が登録されており、内蔵RAM122に深さ3のツリー情報が、内蔵RAM123に深さ4のツリー情報の左半分が、内蔵RAM124に深さ4のツリー情報の右半分が登録されている。   FIG. 20 is a diagram showing how a tree configured by entry data is configured in each internal RAM. As shown in FIG. 20, in this embodiment, two tables including a table 201 and a table 202 are used. In the table 201, tree information from depth 0 to depth 2 is registered in the built-in RAM 57, the tree information of depth 3 is stored in the built-in RAM 58, and the left half of the tree information of depth 4 is stored in the built-in RAM 59. The right half of the tree information of depth 4 is registered in the RAM 60. In the table 202, tree information from depth 0 to depth 2 is registered in the internal RAM 121, the tree information of depth 3 is stored in the internal RAM 122, and the left half of the tree information of depth 4 is stored in the internal RAM 123. The right half of the tree information having a depth of 4 is registered in the RAM 124.

本実施の形態における検索動作中の検索用データベースの更新方法は、実施の形態1と同様である。すなわち、本実施の形態においても、前段の検索処理回路では、検索途中の結果をループし、そのため、毎クロック検索結果が出力されない。一方、後段の検索処理回路では、内蔵RAMへ1回のリード処理で検索が終了する。そして、前段と後段の検索処理回路の処理能力の速度差を利用し、後段の検索処理回路に入力する検索途中のデータが毎クロックではないことを利用して、その間隙に後段の検索処理回路がアクセスする内蔵RAMの切り替えを行い、データベースの更新を行う。   The search database update method during the search operation in the present embodiment is the same as that in the first embodiment. That is, also in the present embodiment, the search processing circuit in the previous stage loops the result in the middle of the search, and therefore the search result for each clock is not output. On the other hand, in the search processing circuit at the subsequent stage, the search is completed by one read process to the built-in RAM. Then, using the speed difference between the processing capabilities of the search processing circuit of the preceding stage and the subsequent stage, and utilizing the fact that the data being searched to be input to the search processing circuit of the subsequent stage is not every clock, the search processing circuit of the subsequent stage is inserted in the gap. The built-in RAM to be accessed is switched, and the database is updated.

本実施の形態によれば、検索動作中であっても検索処理を停止せずに、検索用データベースのエントリの更新ができる。また、検索用データベースのツリー構造を深さ毎に区切って内蔵RAM内に保持しているため、例えば、ツリー最深部のエントリデータのみを変更する場合においては、その最深部のデータを保持する内蔵RAMのみを更新すればよく、エントリ更新を検索処理に高速に反映することができる。また、本実施の形態では、入力される検索キーが2つの分離可能な検索キーを含むことから、前段の検索処理回路が検索対象とする内蔵RAMを同じ内容のデータが保持された2つの内蔵RAMとし、後段の検索処理回路が検索対象とする内蔵RAMを同じ内容のデータが保持された2つの内蔵RAMとすることで、分離された2つの検索キーに対する検索処理を、前段および後段における2つの内蔵RAMに分散して行っている。このように、2つの異なる検索キーに対して、実施の形態1で使用するテーブル検索処理機能に加えて、もう一つのテーブル検索処理機能を付加して並列度を上げることで、検索処理速度を上げつつ、高速なエントリ更新機能を実現できる。   According to the present embodiment, the search database entry can be updated without stopping the search process even during the search operation. In addition, since the tree structure of the search database is stored in the built-in RAM divided by depth, for example, when only the entry data at the deepest part of the tree is changed, the built-in data that holds the deepest part of the data is stored. Only the RAM needs to be updated, and the entry update can be reflected in the search process at high speed. Further, in this embodiment, since the input search key includes two separable search keys, the two internal memories holding the same data are stored in the internal RAM targeted for the search processing circuit in the previous stage. By using the RAM and the built-in RAM to be searched by the subsequent-stage search processing circuit are two built-in RAMs that hold the same data, the search processing for the two separated search keys can be performed in the first and second stages. It is distributed over one built-in RAM. In this way, by adding another table search processing function to the two different search keys in addition to the table search processing function used in the first embodiment, the search processing speed can be increased. It is possible to realize a high-speed entry update function.

また、後段に配置された内蔵RAMに使用されていないものがあるときに、それを他の検索テーブル用に割り当てることにより、資源を有効利用して検索処理の高速化を実現することができる。   Further, when there is an unused internal RAM arranged in the subsequent stage, it is allocated to another search table, so that the search processing can be speeded up by effectively using resources.

以上のように、本発明にかかる検索装置はデータ検索を行うデータ処理において有用であり、特に、検索処理を中断させずに検索用のデータベースの更新を行う情報通信システムに適している。   As described above, the search device according to the present invention is useful in data processing that performs data search, and is particularly suitable for an information communication system that updates a search database without interrupting search processing.

本発明の実施の形態1を利用したネットワーク構成を示す図である。It is a figure which shows the network structure using Embodiment 1 of this invention. 実施の形態1のルータの機能構成例を示す図である。3 is a diagram illustrating a functional configuration example of a router according to the first embodiment; FIG. Ethernet(登録商標)フレームフォーマットを示す図である。It is a figure which shows an Ethernet (trademark) frame format. IPv4ヘッダのフォーマットを示す図である。It is a figure which shows the format of an IPv4 header. TCPヘッダのフォーマットを示す図である。It is a figure which shows the format of a TCP header. UDPヘッダのフォーマットを示す図である。It is a figure which shows the format of a UDP header. 図2におけるデバイスの内部構成を示す図である。It is a figure which shows the internal structure of the device in FIG. 検索処理回路の内部構成を示す図である。It is a figure which shows the internal structure of a search processing circuit. 検索処理回路内部の回路構成を示す図である。It is a figure which shows the circuit structure inside a search processing circuit. 検索処理回路内部の回路構成を示す図である。It is a figure which shows the circuit structure inside a search processing circuit. 実施の形態1で使用する検索用データベースのデータ構造の一例を示すと共に、エントリデータによって構成されたツリーが内蔵RAM内部でどのように構成されるのかを示す図である。It is a figure which shows an example of the data structure of the database for a search used in Embodiment 1, and how the tree comprised by entry data is comprised in internal RAM. 図8における各ユニットでの処理のタイミングを示すタイミングチャートである。It is a timing chart which shows the timing of the process in each unit in FIG. 図9における各ユニットでの処理のタイミングを示すタイミングチャートである。It is a timing chart which shows the timing of the process in each unit in FIG. 図10における各ユニットでの処理のタイミングを示すタイミングチャートである。It is a timing chart which shows the timing of the process in each unit in FIG. 検索用データベースのツリーの最深部のみにエントリ更新がある場合を示す図である。It is a figure which shows the case where there is entry update only in the deepest part of the tree of the database for search. 実施の形態2のルータの機能構成例を示す図である。6 is a diagram illustrating a functional configuration example of a router according to a second embodiment. FIG. 図14におけるデバイスの内部構成を示す図である。It is a figure which shows the internal structure of the device in FIG. 検索経路から検索キー分離回路へ入力される検索キーのフォーマットの一例を示す図である。It is a figure which shows an example of the format of the search key input into a search key separation circuit from a search path | route. 実施の形態2における検索処理回路内部の回路構成を示す図であるFIG. 10 is a diagram illustrating a circuit configuration inside a search processing circuit according to a second embodiment. 実施の形態2における検索処理回路内部の回路構成を示す図である。FIG. 10 is a diagram illustrating a circuit configuration inside a search processing circuit according to a second embodiment. 実施の形態2における検索処理回路内部の回路構成を示す図である。FIG. 10 is a diagram illustrating a circuit configuration inside a search processing circuit according to a second embodiment. 実施の形態2で使用する検索用データベースのデータ構造の一例を示すと共に、エントリデータによって構成されたツリーが内蔵RAM内部でどのように構成されるのかを示す図である。It is a figure which shows an example of the data structure of the database for search used in Embodiment 2, and how the tree comprised by entry data is comprised in internal RAM.

符号の説明Explanation of symbols

1 ルータ
2 PC端末
3 インターネット
4 サーバー群
5 アクセスポイント
6 無線端末
7 イントラネット
8 制御PC
9 制御リンク
10 リンク
11 送受信ユニット
12 転送ユニット
13 デバイス
14 外部メモリ
15 コントローラ
22 検索経路
23 外部バス
24 外部バス接続線
25 Ethernet(登録商標)フレーム
26 MACヘッダ
27 IPv4パケット
28 FCS
29 IPv4ヘッダ
30 TCPヘッダ
31 UDPヘッダ
32 TOSフィールド
33 トータル長
34 識別子
35 フラグ
36 フラグメントオフセット
37 プロトコル
38 送信元IPアドレス
39 宛先IPアドレス
40 送信元ポート番号
41 宛先ポート番号
42 シーケンス番号
43 確認応答番号
44 送信元ポート番号
45 宛先ポート番号
51、52、53 検索処理回路
57、58、59、60、61、62、63、64 内蔵RAM
54、55、56 RAM選択回路
65 RAM更新回路
66 通知線
67 待機面
68 運用面
71、74 読み込みアドレス生成部
72、75、82、84 読み込みデータ受信部
73、76 ラッチ
77、85 選択回路
78、86 多重化回路
81、83 読み込みアドレス送信部
1 router 2 PC terminal 3 internet 4 server group 5 access point 6 wireless terminal 7 intranet 8 control PC
DESCRIPTION OF SYMBOLS 9 Control link 10 Link 11 Transmission / reception unit 12 Transfer unit 13 Device 14 External memory 15 Controller 22 Search path 23 External bus 24 External bus connection line 25 Ethernet (trademark) frame 26 MAC header 27 IPv4 packet 28 FCS
29 IPv4 header 30 TCP header 31 UDP header 32 TOS field 33 Total length 34 Identifier 35 Flag 36 Fragment offset 37 Protocol 38 Source IP address 39 Destination IP address 40 Source port number 41 Destination port number 42 Sequence number 43 Confirmation response number 44 Source port number 45 Destination port number 51, 52, 53 Search processing circuit 57, 58, 59, 60, 61, 62, 63, 64 Built-in RAM
54, 55, 56 RAM selection circuit 65 RAM update circuit 66 Notification line 67 Standby surface 68 Operation surface 71, 74 Read address generation unit 72, 75, 82, 84 Read data reception unit 73, 76 Latch 77, 85 Selection circuit 78, 86 Multiplexing circuit 81, 83 Read address transmitter

Claims (10)

検索キーを入力としメモリ内に格納された検索用データベースを検索して検索結果を出力する検索装置であって、
前記検索キーが入力される前段の検索処理回路と、
この前段の検索処理回路の後段に設けられ、前記前段の検索処理回路の検索処理結果に基づいて、順次、検索処理を行う1または複数の後段の検索処理回路と、
前記前段の検索処理回路が検索を行うための前記検索用データベースの一部が格納され、前記前段の検索処理回路に対応して設けられた前段の運用メモリと、
この前段の運用メモリと対になって設けられ、前記検索用データベースの更新時まで、待機を行う前段の待機メモリと、
前記検索用データベースの残部が全体として格納されるように、前記各後段の検索処理回路が検索を行うためのデータがそれぞれ格納され、前記各後段の検索処理回路にそれぞれ対応して設けられた後段の運用メモリと、
前記各後段の運用メモリと対になって設けられ、前記検索用データベースの更新時まで、待機を行う後段の待機メモリと、
前記検索用データベースの更新時に、更新後の検索用データベースを書き込むことにより前記前段および前記各後段の待機メモリの内容を更新するメモリ更新回路と、
前記メモリ更新回路からの更新通知に基づいて、前記前段の検索処理回路が検索をするメモリを前記前段の運用メモリから前記前段の待機メモリへと切り替える前段の選択回路と、
前記メモリ更新回路からの更新通知に基づいて、前記各後段の検索処理回路が検索をするメモリを前記各後段の運用メモリからそれと対になる前記各後段の待機メモリへと切り替える後段の選択回路と、
を備え、
前記前段の検索処理回路が検索処理に要する検索処理時間は、前記各後段の検索処理回路が検索処理に要する検索処理時間よりも長いことを特徴とする検索装置。
A search device for inputting a search key and searching a search database stored in a memory and outputting a search result,
A search processing circuit in a previous stage where the search key is input;
One or a plurality of subsequent search processing circuits which are provided in the subsequent stage of the search processing circuit of the preceding stage and sequentially perform the search process based on the search processing result of the search processing circuit of the previous stage;
A part of the search database for the search processing circuit of the previous stage to store is stored, and an operation memory of the previous stage provided corresponding to the search processing circuit of the previous stage,
The standby memory provided in a pair with the previous operation memory, the standby memory of the previous stage for waiting until the update of the search database,
Data for the search processing circuit in each subsequent stage to search is stored so that the remainder of the search database is stored as a whole, and the subsequent stage provided corresponding to the search processing circuit in the subsequent stage, respectively. Operating memory,
A standby memory provided in a pair with each of the subsequent operation memories, which waits until the search database is updated;
A memory update circuit that updates the contents of the standby memory in the previous stage and the subsequent stage by writing the updated search database when the search database is updated;
Based on the update notification from the memory update circuit, the selection circuit in the previous stage that switches the memory to be searched by the search processing circuit in the previous stage from the operation memory in the previous stage to the standby memory in the previous stage;
A subsequent-stage selection circuit that switches a memory to be searched by each subsequent-stage search processing circuit from each subsequent-stage operation memory to each subsequent-stage standby memory based on an update notification from the memory update circuit; ,
With
A search apparatus characterized in that a search processing time required for the search processing by the search processing circuit in the preceding stage is longer than a search processing time required for the search processing circuit in each subsequent stage.
前記前段の検索処理回路は、前記前段の運用メモリに対して複数回アクセスすることにより検索処理を行い、前記各後段の検索処理回路は、対応する前記各後段の運用メモリに対して、前記前段の検索処理回路のアクセス回数よりも少ない回数アクセスすることにより検索処理を行うことを特徴とする請求項1に記載の検索装置。   The search processing circuit at the preceding stage performs a search process by accessing the operation memory at the preceding stage a plurality of times, and the search processing circuit at each subsequent stage performs the above-described search operation circuit with respect to the corresponding operation memory at the subsequent stage. The search apparatus according to claim 1, wherein the search processing is performed by accessing the number of times less than the number of accesses of the search processing circuit. 前記各後段の選択回路による前記各後段の運用メモリから前記各後段の待機メモリへのメモリの切り替えは、前記前段の検索処理回路からの検索処理結果が前記各後段の検索処理回路へ入力されるまでの時間のうち、前記各後段の検索処理回路が前記各後段の運用メモリへアクセスしている時間を除いた時間を利用して行われることを特徴とする請求項2に記載の検索装置。   The memory switching from the subsequent operation memory to the subsequent standby memory by the subsequent selection circuit is performed by inputting the search processing result from the previous search processing circuit to the subsequent search processing circuit. 3. The search device according to claim 2, wherein the search processing circuit is performed by using a time excluding a time during which each subsequent-stage search processing circuit is accessing the subsequent-stage operation memory. 前記前段の検索処理回路には、少なくとも所定の時間間隔を隔てて検索キーが入力され、前記所定の時間間隔は、前記前段の検索処理回路に既に入力した検索キーに対する検索途中のデータと次に入力する検索キーとが前記前段の検索処理回路の内部で衝突しないように間隔を隔てるものであることを特徴とする請求項2または3に記載の検索装置。   A search key is input to the search processing circuit in the previous stage at least at a predetermined time interval, and the predetermined time interval is the next to the data being searched for the search key already input to the search processing circuit in the previous stage. The search device according to claim 2 or 3, wherein an input search key is spaced from the search key so as not to collide with the search processing circuit in the preceding stage. 前記後段の運用メモリはその格納データが分割して割り当てられた複数のメモリから構成され、前記後段の待機メモリは前記後段の運用メモリと同数のメモリから構成され、前記後段の運用メモリを構成する各メモリと前記後段の待機メモリを構成する各メモリとが対をなしていることを特徴とする請求項1〜4のいずれか1つに記載の検索装置。   The latter-stage operation memory is composed of a plurality of memories to which the stored data is divided and allocated, and the latter-stage standby memory is composed of the same number of memories as the latter-stage operation memory, and constitutes the latter-stage operation memory. 5. The search device according to claim 1, wherein each memory and each memory constituting the standby memory in the subsequent stage form a pair. 前記前段の選択回路は、前記前段の検索処理装置の内部に設けられていることを特徴とする請求項1〜5のいずれか1つに記載の検索装置。   The search device according to claim 1, wherein the selection circuit at the preceding stage is provided inside the search processing device at the preceding stage. 前記前段の検索処理回路は、前記前段の運用メモリにアクセス可能な第1の内部検索処理回路と、前記前段の待機メモリにアクセス可能な第2の内部検索処理回路と、を備え、前記検索用データベースの更新通知に基づいて、前記検索キーの送り先を前記第1の内部検索処理回路から前記第2の検索処理回路へと切り替えることにより、前記前段の検索処理回路が検索をするメモリを前記前段の運用メモリから前記前段の待機メモリへと切り替えることを特徴とする請求項1〜6のいずれか1つに記載の検索装置。   The search processing circuit in the previous stage includes a first internal search processing circuit that can access the operation memory in the previous stage, and a second internal search processing circuit that can access the standby memory in the previous stage, and By switching the search key destination from the first internal search processing circuit to the second search processing circuit based on the database update notification, the memory to be searched by the search processing circuit in the previous stage is changed to the previous stage. The search device according to claim 1, wherein the operation memory is switched to the standby memory in the preceding stage. 前記検索用データベースのデータ構造はツリー構造であり、前記前段の運用メモリは、前記ツリー構造の起点を含む前記ツリー構造の上段のデータを格納し、前記各後段の運用メモリは、前記前段の運用メモリが格納するデータ以外の、前記ツリー構造の下段のデータを格納し、前記前段の運用メモリが格納する前記上段のデータの段数は、前記後段の運用メモリが格納する前記下段のデータの段数よりも多いことを特徴とする請求項1〜7のいずれか1つに記載の検索装置。   The data structure of the search database is a tree structure, the previous operation memory stores the upper data of the tree structure including the starting point of the tree structure, and each subsequent operation memory stores the previous operation memory. Stores the lower data of the tree structure other than the data stored in the memory, and the number of the upper data stored in the previous operation memory is greater than the number of the lower data stored in the subsequent operation memory. The search device according to any one of claims 1 to 7, wherein there are a large number of the search devices. 相互に異なる複数の検索キーを含んで構成される前記入力される検索キーに対して、前記入力される検索キーをその構成要素である複数の検索キーに分離する検索キー分離回路を備え、前記前段の運用メモリおよび前記前段の待機メモリは、それぞれ、同一の検索用データが格納された前記分離される検索キーの個数と同数のメモリから構成され、前記各後段の運用メモリおよび前記各後段の待機メモリは、それぞれ、同一の検索用データが格納された前記分離される検索キーの個数と同数のメモリから構成され、前記前段の検索処理回路は、前記検索キー分離回路により分離された複数の検索キーに対する検索を、前記前段の運用メモリを構成する複数のメモリに分散して並列に行い、前記分離された各検索キーに対する検索処理結果に検索対象となるメモリを識別する識別情報を付加し、前記各後段の検索処理回路は、前記前段の検索処理回路からの検索処理結果に対して、前記検索処理結果に付加された前記識別情報に基づいて、前記各後段の運用メモリを構成するメモリから検索対象となるメモリを選択して検索を行うことを特徴とする請求項1〜8のいずれか1つに記載の検索装置。   A search key separating circuit that separates the input search key into a plurality of search keys that are constituent elements of the input search key configured to include a plurality of different search keys; The upstream operation memory and the standby memory of the previous stage are configured by the same number of memories as the number of the separated search keys storing the same search data, respectively. Each of the standby memories is composed of the same number of memories as the number of the search keys to be separated in which the same search data is stored, and the search processing circuit in the previous stage includes a plurality of the search keys separated by the search key separation circuit. The search for the search key is performed in a distributed manner in a plurality of memories constituting the previous stage operation memory, and the search processing result for each of the separated search keys is detected. Identification information for identifying a target memory is added, and each subsequent search processing circuit is based on the identification information added to the search processing result with respect to the search processing result from the previous search processing circuit. The search device according to claim 1, wherein the search is performed by selecting a memory to be searched from a memory constituting each of the subsequent operation memories. 請求項1〜9のいずれか1つに記載の検索装置を備えたデータ処理装置。   A data processing device comprising the search device according to claim 1.
JP2006356323A 2006-12-28 2006-12-28 Search device and data processing device Expired - Fee Related JP4879728B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006356323A JP4879728B2 (en) 2006-12-28 2006-12-28 Search device and data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006356323A JP4879728B2 (en) 2006-12-28 2006-12-28 Search device and data processing device

Publications (2)

Publication Number Publication Date
JP2008165616A JP2008165616A (en) 2008-07-17
JP4879728B2 true JP4879728B2 (en) 2012-02-22

Family

ID=39694995

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006356323A Expired - Fee Related JP4879728B2 (en) 2006-12-28 2006-12-28 Search device and data processing device

Country Status (1)

Country Link
JP (1) JP4879728B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6422677B2 (en) * 2014-06-04 2018-11-14 株式会社ギデオン Network relay device, DDoS protection method and load distribution method using the same

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10190744A (en) * 1996-12-26 1998-07-21 Toshiba Corp Information storage device
JP2002157158A (en) * 2000-11-20 2002-05-31 Hitachi Ltd Data management method for database system
JP2003022209A (en) * 2001-07-05 2003-01-24 Nri & Ncc Co Ltd Distributed server system
JP4219607B2 (en) * 2002-04-03 2009-02-04 三菱電機株式会社 Data search apparatus and server update method

Also Published As

Publication number Publication date
JP2008165616A (en) 2008-07-17

Similar Documents

Publication Publication Date Title
KR102162730B1 (en) Technologies for distributed routing table lookup
EP2544417B1 (en) Communication system, path control apparatus, packet forwarding apparatus and path control method
US6683885B1 (en) Network relaying apparatus and network relaying method
US6654701B2 (en) Method and apparatus for measuring protocol performance in a data communication network
US6650642B1 (en) Network relaying apparatus and network relaying method capable of high-speed routing and packet transfer
US7218632B1 (en) Packet processing engine architecture
US10778721B1 (en) Hash-based ACL lookup offload
JP6426879B2 (en) Data packet transfer
JP4974078B2 (en) Data processing device
CN108768866B (en) Cross-card forwarding method and device for multicast message, network equipment and readable storage medium
CN106470158B (en) Message forwarding method and device
JP3627697B2 (en) Packet destination search system
Pontarelli et al. Parallel d-pipeline: A cuckoo hashing implementation for increased throughput
JP2006313949A (en) Packet transfer apparatus
JP6574054B2 (en) Packet forwarding
WO2013006154A1 (en) Traffic forwarding in a point multi-point link aggregation using a link selector data table
US6658003B1 (en) Network relaying apparatus and network relaying method capable of high-speed flow detection
US7702882B2 (en) Apparatus and method for performing high-speed lookups in a routing table
JP4879728B2 (en) Search device and data processing device
JPWO2014125636A1 (en) Communication device or packet transfer method
WO2015154393A1 (en) Method and apparatus for processing service node ability, service classifier and service controller
JP3949696B2 (en) Protocol acceleration device
US20050044261A1 (en) Method of operating a network switch
WO2015131617A1 (en) Flow table processing method, device, openflow controller and openflow switch
JP5374290B2 (en) Network relay device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090911

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111031

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: 20111129

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111130

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20141209

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees