JP5848185B2 - Frame search processing apparatus and method - Google Patents
Frame search processing apparatus and method Download PDFInfo
- Publication number
- JP5848185B2 JP5848185B2 JP2012096289A JP2012096289A JP5848185B2 JP 5848185 B2 JP5848185 B2 JP 5848185B2 JP 2012096289 A JP2012096289 A JP 2012096289A JP 2012096289 A JP2012096289 A JP 2012096289A JP 5848185 B2 JP5848185 B2 JP 5848185B2
- Authority
- JP
- Japan
- Prior art keywords
- entry
- information
- read
- frame
- search
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
本発明は、フレーム転送技術に関し、特に入力フレームに応じたフレーム処理を決めるための検索処理を行うフレーム検索処理技術に関する。 The present invention relates to a frame transfer technique, and more particularly to a frame search processing technique for performing a search process for determining frame processing according to an input frame.
一般に、ルータやスイッチ、ブリッジなどのフレーム検索処理装置では、フレームの転送やフィルタリング、優先制御などを行う場合、入力フレームに応じたフレーム処理を決めるための検索処理を行う。
この検索処理では、入力フレームから、検索に必要な情報、例えば、VLAN IDやMACアドレスやIPアドレス等のヘッダ情報、入力したポートの番号、フレーム長、などの情報を、フレーム情報として抽出し、検索テーブルの各エントリに予め指定されている検索条件と比較して、当該入力フレームに適合する検索条件を持ったエントリを見つける処理が実行される。
In general, frame search processing devices such as routers, switches, and bridges perform search processing for determining frame processing according to input frames when performing frame transfer, filtering, priority control, and the like.
In this search process, information necessary for the search, for example, header information such as VLAN ID, MAC address and IP address, input port number, frame length, and the like is extracted from the input frame as frame information. A process for finding an entry having a search condition that matches the input frame is executed in comparison with the search condition specified in advance for each entry in the search table.
フレーム検索処理装置は、入力フレームが入力された場合、まず、上記の検索処理を実行することによって、入力フレームから抽出したフレーム情報に適合する検索条件を持ったエントリを見つけ、このエントリに応じた検索結果、例えば、フレームを出力するポート番号、廃棄の有無、優先制御を行うときの優先度、フレームのヘッダ情報を書き換えるときの書き換え後の値などからなる検索結果を得る。 When an input frame is input, the frame search processing device first executes the above search processing to find an entry having a search condition that matches the frame information extracted from the input frame, and responds to this entry. A search result, for example, a search result including a port number for outputting a frame, presence / absence of discard, priority when performing priority control, a value after rewriting when rewriting header information of a frame, and the like is obtained.
その後、フレーム検索処理装置は、得られた検索結果に基づいたフレーム処理を前記フレームに施す。このフレーム処理としては、例えば、検索結果のポート番号に対応したポートからフレームを出力する、検索結果が廃棄を示す場合にフレームを出力せず廃棄する、検索結果の優先度に応じたキューにフレームを蓄積する、フレームのヘッダ情報を検索結果の書換値に書き換える、などの処理がある。 Thereafter, the frame search processing device performs frame processing based on the obtained search result on the frame. As this frame processing, for example, a frame is output from the port corresponding to the port number of the search result, and when the search result indicates discard, the frame is discarded without outputting, and the frame is queued according to the priority of the search result. Are stored, and the frame header information is rewritten to the rewritten value of the search result.
このような検索処理を行うため、フレーム検索処理装置は、エントリ毎の検索条件を記憶する検索テーブルを備える。また、フレーム情報と検索テーブルに記憶された各検索条件とを比較し、適合の有無を判定する比較回路を備える。
上記の検索処理では、クロックサイクル毎に、検索テーブルから検索条件を表すエントリ情報を読み出し、これら検索条件をフレーム情報と比較する。検索テーブル内の全てのエントリについて上記比較を実施することにより、入力フレームに適合する検索条件を持ったエントリを検索テーブルから探し出す。
In order to perform such search processing, the frame search processing device includes a search table that stores search conditions for each entry. In addition, a comparison circuit is provided that compares the frame information with each search condition stored in the search table and determines whether or not there is a match.
In the above search processing, entry information representing the search condition is read from the search table every clock cycle, and these search conditions are compared with the frame information. By performing the above comparison for all entries in the search table, an entry having a search condition that matches the input frame is searched from the search table.
従来、このようなフレーム検索処理装置において、フレーム検索処理装置へのフレーム入力間隔よりも、1個のフレームに対する検索処理の所要時間の方が長い場合、つまり、エントリ数が多い場合や高速でフレームが入力される場合には、比較回路を並列化した構成を採用するという技術が提案されている(例えば、非特許文献1など参照)。
この技術では、例えば8個の比較回路を備え、8個のフレーム情報に対する検索処理が並列に実施されている。
Conventionally, in such a frame search processing device, when the time required for the search processing for one frame is longer than the frame input interval to the frame search processing device, that is, when the number of entries is large or the frame speed is high. Has been proposed (see, for example, Non-Patent Document 1).
In this technique, for example, eight comparison circuits are provided, and search processing for eight pieces of frame information is performed in parallel.
これにより、1個の入力フレームに対する検索処理を開始してから完了するまでの時間に、7個のフレームを入力したとしても、これらのフレーム全てに対して検索処理を完遂できることになる。
また、1個の比較回路が検索処理を行う場合と比較して、並列化されたP個の比較回路が同時に検索処理を行う場合、検索テーブルからエントリ情報を読み出す回数が1/Pに削減されるため、消費電力を低減する効果を有する。
As a result, even if seven frames are input during the time from the start of search processing for one input frame to completion, the search processing can be completed for all of these frames.
In addition, when P paralleled parallel comparison circuits perform search processing simultaneously with the case where one comparison circuit performs search processing, the number of times of reading entry information from the search table is reduced to 1 / P. Therefore, it has the effect of reducing power consumption.
しかしながら、このような従来技術では、入力フレームに応じたフレーム処理を決めるための検索処理において、フレーム単位で並列処理を行うものとなっているため、検索テーブルからエントリ情報を読み出すときに消費される電力は、エントリ情報のビット数に比例して増大するという問題があった。 However, in such a conventional technique, in the search processing for determining the frame processing according to the input frame, parallel processing is performed in units of frames, and therefore, it is consumed when reading entry information from the search table. There is a problem that power increases in proportion to the number of bits of entry information.
例えば、検索条件が単純な場合、例えばVLAN IDに対する条件のみの場合には、前記検索条件を表すエントリ情報のビット数も小さいため、検索テーブルからエントリ情報を読み出したときの消費電力は小さい。
しかしながら、高度な検索処理を行う場合、例えばレイヤ2からレイヤ4までの各種ヘッダ情報を組み合わせた検索条件でフィルタリングを行うような場合、前記検索条件を表すエントリ情報のビット数が増大する。
For example, when the search condition is simple, for example, only the condition for the VLAN ID, the number of bits of entry information representing the search condition is small, so that the power consumption when reading the entry information from the search table is small.
However, when performing advanced search processing, for example, when filtering is performed using search conditions that combine various header information from
例えば、検索条件がVLAN IDのみの場合、エントリ情報は12ビット程度であるが、検索条件としてVLAN IDに加えて宛先IPアドレスと宛先TCPポート番号とを組み合わせた場合、エントリ情報は60ビットとなる。
したがって、従来技術によれば、エントリ情報のビット数に比例して、検索テーブルからエントリ情報を読み出すときに消費される電力が増大するため、高度な検索処理を行う場合には、消費電力が大幅に増大することになる。
For example, when the search condition is only the VLAN ID, the entry information is about 12 bits. However, when the destination IP address and the destination TCP port number are combined in addition to the VLAN ID as the search condition, the entry information is 60 bits. .
Therefore, according to the prior art, the power consumed when reading the entry information from the search table increases in proportion to the number of bits of the entry information. Will increase.
本発明はこのような課題を解決するためのものであり、エントリ情報のビット数が増大した場合でも消費電力の増加を抑制できるフレーム検索処理技術を提供することを目的としている。 An object of the present invention is to provide a frame search processing technique that can suppress an increase in power consumption even when the number of bits of entry information is increased.
このような目的を達成するために、本発明にかかるフレーム検索処理装置は、入力フレームに対して実行すべきフレーム処理を特定するためのフレーム情報を、前記入力フレームから抽出するフレーム情報抽出部と、前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理部とを備え、前記検索処理部は、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶する第1検索テーブルと、前記エントリごとに、当該エントリと対応する前記検索条件のうち前記第1エントリ情報以外の部分からなる第2エントリ情報を記憶する第2検索テーブルと、前記エントリごとに、前記第1検索テーブルから読み出された前記第1エントリ情報および前記第2検索テーブルから読み出された前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較回路と、前記各エントリから巡回的に前記第1エントリ情報を読み出して前記比較回路へ出力するための第1読出信号を前記第1検索テーブルへ出力する第1読出回路と、前記各エントリから巡回的に前記第2エントリ情報を読み出して前記比較回路へ出力するための第2読出信号を前記第2検索テーブルへ出力する第2読出回路とを有し、前記比較回路は、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、前記第2読出回路は、前記比較回路から出力された前記読出判定結果が読み出しありを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行い、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わないようにしたものである。
また、本発明にかかる他のフレーム検索処理装置は、入力フレームに対して実行すべきフレーム処理を特定するためのフレーム情報を、前記入力フレームから抽出するフレーム情報抽出部と、前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理部とを備え、前記検索処理部は、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶するとともに、当該検索条件のうち当該第1エントリ情報以外の部分からなる第2エントリ情報に関する第2エントリ番号を、当該第1エントリ情報に付加して記憶する第1検索テーブルと、前記エントリごとに前記第2エントリ情報を記憶する第2検索テーブルと、前記エントリごとに、前記第1エントリ情報および前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較回路と、前記第1検索テーブルから前記各エントリの第1エントリ情報を巡回的に読み出して、当該第1エントリ情報に付加されている前記第2エントリ番号を分離し、当該第2エントリ番号を分離した第1エントリ情報を前記比較回路へ出力する第1読出回路と、前記第1読出回路で分離した前記第2エントリ番号に基づいて、当該前記第2エントリ番号に対応するエントリからの第2エントリ情報の読み出しを指示する第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力する第2読出回路とを有し、前記比較回路は、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1読出回路から出力された前記第1エントリ情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、前記第2読出回路は、前記比較回路から出力された前記読出判定結果が読み出しありを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行い、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わないようにしたものである。
また、本発明にかかるさらに他のフレーム検索処理装置は、入力フレームに対して実行すべきフレーム処理を特定するためのフレーム情報を、前記入力フレームから抽出するフレーム情報抽出部と、前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理部とを備え、前記検索処理部は、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶する第1検索テーブルと、前記エントリごとに、当該エントリと対応する前記検索条件のうち前記第1エントリ情報以外の部分からなる第2エントリ情報を記憶する第2検索テーブルと、前記エントリごとに、前記第1エントリ情報および前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較回路と、前記各エントリから巡回的に、複数の前記第1エントリ情報を並列的に読み出して前記各比較回路へ分配するための第1読出信号を前記第1検索テーブルへ出力する第1読出回路と、前記各エントリから巡回的に前記第2エントリ情報を読み出して前記比較回路へ出力するための第2読出信号を前記第2検索テーブルへ出力する第2読出回路とを有し、前記比較回路は、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1検索テーブルから分配された前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、前記第2読出回路は、前記比較回路から出力された前記読出判定結果のうち読み出しありを示す読出判定結果について、当該読出判定結果を得た前記第1エントリ情報と対応する前記第2エントリ情報を示す第2エントリ番号をキューへ順次蓄積し、当該キューから順次読み出した前記第2エントリ番号に基づいて、当該第2のエントリ番号に対応するエントリからの前記第2エントリ情報の読み出しを指示する前記第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力し、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わないようにしたものである。
In order to achieve such an object, a frame search processing device according to the present invention includes a frame information extraction unit that extracts frame information for specifying frame processing to be executed on an input frame from the input frame. The frame information extracted by the frame information extraction unit is sequentially compared with a search condition registered in advance for each entry, thereby searching for a matching entry that matches the input frame and corresponding to the obtained matching entry. A search processing unit that outputs the search result as processing information indicating the content of the frame processing to be executed on the input frame, and the search processing unit is configured to search the search corresponding to the entry for each entry. A first search table for storing first entry information comprising a part of a condition, and for each entry, the entry A second search table that stores second entry information that includes portions other than the first entry information in the corresponding search conditions, and the first entry information read from the first search table for each entry A comparison circuit for comparing the second entry information read from the second search table with the frame information to determine whether the entry is a matching entry that matches the input frame; A first read circuit that cyclically reads the first entry information from an entry and outputs the first read signal for output to the comparison circuit to the first search table; and the second read circuit cyclically from each entry. A second readout circuit for outputting a second readout signal for reading out entry information and outputting it to the comparison circuit to the second search table; The comparison circuit compares the first entry information with the frame information first when comparing the first entry information and the second entry information of the entry with the frame information. There wherein determining whether to comply with the frame information, and outputs a first adaptation determination result obtained by the determination to the second readout circuit as read judgment result indicating reading necessity of the second entry information, the When the first conformity determination result indicates conformity, the second entry information is compared with the frame information to determine whether or not the second entry information is compatible with the frame information. If the obtained second conformity determination result indicates conformity, the entry number of the entry, a part of the first entry information, or one of the second entry information Are output as the search result corresponding to the matching entry, and the second readout circuit reads from the second search table when the readout determination result output from the comparison circuit indicates that there is a readout. The second entry information is read, and when the reading determination result indicates no reading, the second entry information is not read from the second search table.
Another frame search processing device according to the present invention includes a frame information extraction unit that extracts frame information for specifying frame processing to be executed on an input frame from the input frame, and the frame information extraction unit. By sequentially comparing the frame information extracted in
Still another frame search processing device according to the present invention includes a frame information extraction unit that extracts frame information for specifying frame processing to be executed on an input frame from the input frame, and the frame information extraction The frame information extracted in the section is sequentially compared with a search condition registered in advance for each entry, thereby searching for a matching entry that matches the input frame, and a search result corresponding to the obtained matching entry is obtained. A search processing unit that outputs processing information indicating the content of frame processing to be performed on the input frame, and the search processing unit includes, for each entry, a part of the search condition corresponding to the entry. A first search table for storing first entry information, and for each entry, the search corresponding to the entry. A second search table that stores second entry information including a part other than the first entry information in the condition, and the first entry information and the second entry information are compared with the frame information for each entry. Thus, a comparison circuit that determines whether or not the entry is a matching entry that matches the input frame, and a plurality of the first entry information are read out in parallel from each entry in parallel to each comparison circuit. A first readout circuit for outputting a first readout signal for distribution to the first search table; and a second readout signal for cyclically reading out the second entry information from each entry and outputting it to the comparison circuit. And a second readout circuit that outputs the second entry to the second search table, wherein the comparison circuit includes the first entry information and the second entry of the entry. When comparing the frame information with the frame information, first, the first entry information distributed from the first search table is compared with the frame information to determine whether the first entry information matches the frame information. And the first conformity determination result obtained by the determination is output to the second reading circuit as a read determination result indicating whether the second entry information needs to be read, and the first conformity determination result indicates conformity. In this case, the second entry information is compared with the frame information to determine whether the second entry information is compatible with the frame information, and the second conformity determination result obtained by the determination is compatible. Indicates the entry number of the entry, a part of the first entry information, or a part of the second entry information. The second readout circuit outputs a retrieval result, and the second readout circuit corresponds to the first entry information that has obtained the readout judgment result for the readout judgment result indicating the presence of readout among the readout judgment results output from the comparison circuit. The second entry information indicating the second entry information is sequentially accumulated in a queue, and the second entry information from the entry corresponding to the second entry number is based on the second entry number sequentially read from the queue. The second read signal for instructing reading is generated, and the second read signal is output to the second search table. When the read determination result indicates no read, the second read signal is read from the second search table. The second entry information is not read out.
また、上記フレーム検索処理装置の一構成例は、前記比較回路を複数備えるとともに、これら比較回路のうち前記適合エントリの検索中である比較回路以外のいずれか1つに対して、前記フレーム情報抽出部で得られた前記フレーム情報を振り分けるフレーム情報振分回路をさらに備えるものである。 In addition, a configuration example of the frame search processing device includes a plurality of the comparison circuits, and the frame information extraction is performed for any one of the comparison circuits other than the comparison circuit for which the matching entry is being searched. A frame information distribution circuit for distributing the frame information obtained by the unit.
また、上記フレーム検索処理装置の一構成例は、前記第1読出回路が、前記第1エントリ情報を読み出す際、前記各エントリから巡回的に、複数の前記第1エントリ情報を並列的に読み出して前記各比較回路へ分配するための第1読出信号を前記第1検索テーブルへ出力し、前記比較回路は、前記エントリの前記第1エントリ情報を前記フレーム情報と比較する際、前記第1検索テーブルから分配された前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、前記第2読出回路は、前記比較回路から出力された前記読出判定結果のうち読み出しありを示す読出判定結果について、当該読出判定結果を得た前記第1エントリ情報と対応する前記第2エントリ情報を示す第2エントリ番号をキューへ順次蓄積し、当該キューから順次読み出した前記第2エントリ番号に基づいて、当該第2のエントリ番号に対応するエントリからの前記第2エントリ情報の読み出しを指示する前記第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力するようにしたものである。 Also, in one configuration example of the frame search processing device, when the first reading circuit reads the first entry information, a plurality of the first entry information is read in parallel from each entry in parallel. A first read signal for distribution to each of the comparison circuits is output to the first search table, and the comparison circuit compares the first entry information of the entry with the frame information when the first search table is compared. By comparing the first entry information distributed from the frame information with the frame information, it is determined whether or not the first entry information is compatible with the frame information, and the first conformity determination result obtained by the determination is A read determination result indicating whether or not the second entry information needs to be read is output to the second read circuit, and the second read circuit outputs the read determination result output from the comparison circuit. Among the read determination results indicating the presence of reading, the second entry number indicating the second entry information corresponding to the first entry information obtained from the read determination result is sequentially accumulated in a queue, and the read sequentially from the queue Based on the second entry number, the second read signal for instructing reading of the second entry information from the entry corresponding to the second entry number is generated, and the second read signal is generated in the second search table. Is output .
また、本発明にかかるフレーム検索処理方法は、フレーム情報抽出部が、入力フレームに対して実行すべきフレーム処理を特定するためのフレーム情報を、前記入力フレームから抽出するフレーム情報抽出ステップと、検索処理部が、前記フレーム情報抽出ステップで抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理ステップとを備え、前記検索処理ステップは、第1検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶するステップと、第2検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件のうち前記第1エントリ情報以外の部分からなる第2エントリ情報を記憶するステップと、比較回路が、前記エントリごとに、前記第1検索テーブルから読み出された前記第1エントリ情報および前記第2検索テーブルから読み出された前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較ステップと、第1読出回路が、前記各エントリから巡回的に前記第1エントリ情報を読み出して前記比較回路へ出力するための第1読出信号を前記第1検索テーブルへ出力する第1読出ステップと、第2読出回路が、前記各エントリから巡回的に前記第2エントリ情報を読み出して前記比較回路へ出力するための第2読出信号を前記第2検索テーブルへ出力する第2読出ステップとを有し、前記比較ステップは、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、前記第2読出ステップは、前記比較回路から出力された前記読出判定結果が読み出しありを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行い、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わないようにしたものである。
また、本発明にかかる他のフレーム検索処理方法は、フレーム情報抽出部が、入力フレームに対して実行すべきフレーム処理を特定するためのフレーム情報を、前記入力フレームから抽出するフレーム情報抽出ステップと、検索処理部が、前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理ステップとを備え、前記検索処理ステップは、第1検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶するとともに、当該検索条件のうち当該第1エントリ情報以外の部分からなる第2エントリ情報に関する第2エントリ番号を、当該第1エントリ情報に付加して記憶するステップと、第2検索テーブルが、前記エントリごとに前記第2エントリ情報を記憶するステップと、比較回路が、前記エントリごとに、前記第1エントリ情報および前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較ステップと、第1読出回路が、前記第1検索テーブルから前記各エントリの第1エントリ情報を巡回的に読み出して、当該第1エントリ情報に付加されている前記第2エントリ番号を分離し、当該第2エントリ番号を分離した第1エントリ情報を前記比較回路へ出力する第1読出ステップと、第2読出回路が、前記第1読出回路で分離した前記第2エントリ番号に基づいて、当該前記第2エントリ番号に対応するエントリからの第2エントリ情報の読み出しを指示する第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力する第2読出ステップとを有し、前記比較ステップは、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1読出回路から出力された前記第1エントリ情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、前記第2読出ステップは、前記比較回路から出力された前記読出判定結果が読み出しありを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行い、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わないようにしたものである。
また、本発明にかかるさらに他のフレーム検索処理方法は、フレーム情報抽出部が、入力フレームに対して実行すべきフレーム処理を特定するためのフレーム情報を、前記入力フレームから抽出するフレーム情報抽出ステップと、検索処理部が、前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理ステップとを備え、前記検索処理ステップは、第1検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶するステップと、第2検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件のうち前記第1エントリ情報以外の部分からなる第2エントリ情報を記憶するステップと、比較回路が、前記エントリごとに、前記第1エントリ情報および前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較ステップと、第1読出回路が、前記各エントリから巡回的に、複数の前記第1エントリ情報を並列的に読み出して前記各比較回路へ分配するための第1読出信号を前記第1検索テーブルへ出力する第1読出ステップと、第2読出回路が、前記各エントリから巡回的に前記第2エントリ情報を読み出して前記比較回路へ出力するための第2読出信号を前記第2検索テーブルへ出力する第2読出ステップとを有し、前記比較ステップは、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1検索テーブルから分配された前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、前記第2読出ステップは、前記比較回路から出力された前記読出判定結果のうち読み出しありを示す読出判定結果について、当該読出判定結果を得た前記第1エントリ情報と対応する前記第2エントリ情報を示す第2エントリ番号をキューへ順次蓄積し、当該キューから順次読み出した前記第2エントリ番号に基づいて、当該第2のエントリ番号に対応するエントリからの前記第2エントリ情報の読み出しを指示する前記第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力し、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わないようにしたものである。
The frame search processing method according to the present invention includes a frame information extraction step in which a frame information extraction unit extracts frame information for specifying frame processing to be executed on an input frame from the input frame, and a search. The processing unit searches the matching entry that matches the input frame by sequentially comparing the frame information extracted in the frame information extraction step with a search condition registered in advance for each entry, and the obtained matching A search processing step for outputting a search result corresponding to the entry as processing information indicating the content of the frame processing to be executed on the input frame, wherein the search processing step includes a first search table for each entry. The first entry information consisting of a part of the search condition corresponding to the entry is stored in A step of storing, for each entry, second entry information comprising a portion other than the first entry information in the search condition corresponding to the entry; Each time the first entry information read from the first search table and the second entry information read from the second search table are compared with the frame information, the entry is A comparison step for determining whether the entry is compatible with the frame; and a first readout signal for the first readout circuit to cyclically read out the first entry information from each entry and output the first entry information to the comparison circuit. A first reading step for outputting to the first search table and a second reading circuit cyclically start the second entry from each entry. A second reading step for outputting to the second search table a second reading signal for reading out information to be output to the comparison circuit, and the comparing step includes the first entry information of the entry and the second entry table. when comparing the second entry information and the frame information, by first comparing the first entry information and the frame information, the first entry information is determined whether or not compatible with said frame information, by the determination the obtained first adaptation judgment result is outputted to the second readout circuit as read judgment result indicating reading necessity of the second entry information, when said first matching determination result indicates fit, the second By comparing the entry information with the frame information, it is determined whether the second entry information is compatible with the frame information, and the second appropriate information obtained by the determination is determined. If the match determination result indicates a match, the entry number of the entry, a part of the first entry information, or a part of the second entry information is output as the search result corresponding to the match entry, The second reading step reads the second entry information from the second search table when the read determination result output from the comparison circuit indicates that there is a read, and the read determination result is read In the case of “none”, the second entry information is not read from the second search table.
According to another frame search processing method of the present invention, the frame information extraction unit extracts frame information for specifying frame processing to be executed for the input frame from the input frame. The search processing unit searches for a matching entry that matches the input frame by sequentially comparing the frame information extracted by the frame information extraction unit with a search condition registered in advance for each entry. A search processing step for outputting a search result corresponding to the matching entry as processing information indicating the content of the frame processing to be executed on the input frame, wherein the search processing step includes the first search table, For each entry, first entry information including a part of the search condition corresponding to the entry is stored. Both the step of adding the second entry number related to the second entry information comprising the portion other than the first entry information in the search condition to the first entry information and storing the second entry number, and the second search table includes the entry Storing the second entry information for each entry and a comparison circuit comparing the first entry information and the second entry information with the frame information for each entry, so that the entry becomes the input frame. A comparison step for determining whether or not the matching entry matches, and a first reading circuit cyclically reads out the first entry information of each entry from the first search table and adds the first entry information to the first entry information. The second entry number is separated, and the first entry information separated from the second entry number is sent to the comparison circuit. A first reading step and a second reading circuit reading out the second entry information from the entry corresponding to the second entry number based on the second entry number separated by the first reading circuit. A second reading step for generating a second reading signal to instruct and outputting the second reading signal to the second search table, wherein the comparing step includes the first entry information of the entry and the second reading step. When comparing the entry information with the frame information, first, it is determined whether or not the first entry information matches the frame information by comparing with the first entry information output from the first readout circuit; The first conformity determination result obtained by the determination is output to the second readout circuit as a read determination result indicating whether the second entry information needs to be read, and the first conformity determination is performed. If the result indicates conformity, the second entry information is compared with the frame information to determine whether the second entry information is compatible with the frame information, and the second obtained by the determination When the conformity determination result indicates conformity, the entry number of the entry, a part of the first entry information, or a part of the second entry information is output as the search result corresponding to the conforming entry, The second reading step reads the second entry information from the second search table when the read determination result output from the comparison circuit indicates that there is a read, and the read determination result is read In the case of “none”, the second entry information is not read from the second search table.
According to still another frame search processing method of the present invention, a frame information extraction step in which a frame information extraction unit extracts, from the input frame, frame information for specifying frame processing to be executed on the input frame. The search processing unit sequentially searches the matching information that matches the input frame by comparing the frame information extracted by the frame information extraction unit with a search condition registered in advance for each entry. A search processing step for outputting a search result corresponding to the matched entry as processing information indicating the content of the frame processing to be executed on the input frame, the search processing step comprising: a first search table; For each entry, first entry information including a part of the search condition corresponding to the entry is recorded. A second search table storing, for each entry, second entry information consisting of portions other than the first entry information in the search condition corresponding to the entry, and a comparison circuit, For each entry, a comparison step for comparing the first entry information and the second entry information with the frame information to determine whether the entry is a conforming entry compatible with the input frame, and a first reading A first reading step in which a circuit cyclically reads a plurality of first entry information from each entry in parallel and outputs a first read signal for distribution to each comparison circuit to the first search table. And a second readout circuit cyclically reads out the second entry information from each entry and outputs the second entry information to the comparison circuit. A second read step for outputting a read signal to the second search table, and the comparing step first compares the first entry information and the second entry information of the entry with the frame information. By comparing the first entry information distributed from the first search table with the frame information, it is determined whether or not the first entry information is compatible with the frame information, and the first match obtained by the determination is determined. The determination result is output to the second reading circuit as a reading determination result indicating whether or not the second entry information needs to be read. When the first conformity determination result indicates conformity, the second entry information is converted into the frame information. To determine whether the second entry information is compatible with the frame information, and the second determination result obtained by the determination is compatible. The entry number of the entry, a part of the first entry information, or a part of the second entry information is output as the search result corresponding to the matching entry, and the second reading step Is a second entry number indicating the second entry information corresponding to the first entry information obtained from the read determination result for the read determination result indicating the presence of reading out of the read determination results output from the comparison circuit Are sequentially stored in the queue, and based on the second entry number sequentially read from the queue, the second read signal for instructing the reading of the second entry information from the entry corresponding to the second entry number Generating and outputting the second read signal to the second search table, and when the read determination result indicates no read, the second search signal is output. It is obtained so as not read the second entry information from Buru.
本発明によれば、第1エントリ情報とフレーム情報との比較の結果、残りのエントリ情報である第2エントリ情報を読み出す必要があるか否かが判断され、読み出しが必要な場合に限って、第2エントリ情報が読み出されることになる。このため、一部のエントリ情報(第1エントリ情報)のみを読み出すエントリと、全てのエントリ情報(第1エントリ情報+第2エントリ情報)を読み出すエントリの2通りの場合が生じる。 According to the present invention, as a result of the comparison between the first entry information and the frame information, it is determined whether it is necessary to read the second entry information, which is the remaining entry information, and only when the reading is necessary, The second entry information is read out. For this reason, there are two cases: an entry that reads only a part of entry information (first entry information) and an entry that reads all entry information (first entry information + second entry information).
したがって、全エントリについて全てのエントリ情報を読み出す必要がなくなるため、読み出すエントリ情報のビット数を削減することができる。このため、入力フレームに応じたフレーム処理を決めるための検索処理に用いる検索条件として、例えばVLAN IDに加えて宛先IPアドレスと宛先TCPポート番号とを組み合わせた場合など、エントリ情報のビット数が増大した場合でも、読み出すエントリ情報のビット数の増大を抑制することができ、結果としてフレーム検索処理に要する消費電力の増加を抑制することが可能となる。 Accordingly, since it is not necessary to read out all entry information for all entries, the number of bits of entry information to be read can be reduced. For this reason, the number of bits of entry information increases, for example, when the destination IP address and the destination TCP port number are combined in addition to the VLAN ID as a search condition used for the search processing for determining the frame processing according to the input frame. Even in this case, an increase in the number of bits of entry information to be read can be suppressed, and as a result, an increase in power consumption required for the frame search process can be suppressed.
次に、本発明の実施の形態について図面を参照して説明する。
[第1の実施の形態]
まず、図1を参照して、本発明の第1の実施の形態にかかるフレーム検索処理装置10について説明する。図1は、第1の実施の形態にかかるフレーム検索処理装置の構成を示すブロック図である。
Next, embodiments of the present invention will be described with reference to the drawings.
[First Embodiment]
First, with reference to FIG. 1, a frame
このフレーム検索処理装置10には、主な機能部として、フレーム情報抽出部11、検索処理部12、フレームバッファ13、およびフレーム合成部14が設けられている。
The frame
フレーム情報抽出部11は、入力フレームFINに対して実行すべきフレーム処理を特定するためのフレーム情報FDを、前記入力フレームFINから抽出する機能を有している。
検索処理部12は、フレーム情報抽出部11で抽出したフレーム情報FDを、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームFINと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果SRを、前記入力フレームFINに対して実行すべきフレーム処理の内容を示す処理情報として出力する機能を有している。
The frame
The
フレームバッファ13は、前記入力フレームFINのフレーム情報FDに対する検索処理部12での検索処理により検索結果SRが得られるまで、当該入力フレームFINのデータを蓄積する機能を有している。
フレーム合成部14は、検索処理部12で得られた検索結果SRに基づいて、フレームバッファ13から出力された入力フレームFINのデータを書き換えて、出力フレームFOUTとして出力する機能を有している。
The
The
なお、図1では、検索処理部12で得られた検索結果SRに基づいて、入力フレームFINの書き換えを行う場合を例として説明したが、必ずしも入力フレームFINのデータの書き換えを伴わなくともよい。フレーム検索処理装置10において、入力フレームFINに関する廃棄の有無の検索や送信先の検索などのフレーム処理を行う場合は、フレーム合成部14を具備しない構成となる。
In FIG. 1, the case where the input frame FIN is rewritten based on the search result SR obtained by the
例えば、フレーム廃棄の有無を検索結果SRとして得る場合、つまり、フレームのフィルタリングを行う装置である場合、フレーム検索処理装置10は、検索結果SRがフレーム廃棄なしのときに、フレームバッファ13から前記入力フレームFINのデータを出力して装置外へと出力する。また、検索結果SRがフレーム廃棄ありのときに、フレームバッファ13から前記入力フレームFINのデータを空読みする、フレームバッファ13からのデータ読み出し位置を前記入力フレームFINの次に蓄積された入力フレームFINのデータ先頭位置に移動するなど、前記入力フレームFINの次に蓄積された入力フレームFINを出力する準備を行う。
For example, in the case where the presence / absence of frame discard is obtained as the search result SR, that is, in the case of a device that performs frame filtering, the frame
また、送信先(出力ポート番号)を検索結果SRとして得る場合、つまり、複数ポートを持つフレーム転送装置である場合、フレーム検索処理装置10は、フレームバッファ13から前記入力フレームFINのデータを出力し、検索結果SRである出力ポート番号が示すポートから、装置外へと出力する。なお、入力フレームFINと検索結果SRとの同期が取れる場合には、必ずしもフレーム検索処理装置10にフレームバッファ13を備える必要はなく、次段の外部装置でフレームバッファ13の機能を実現すればよい。
When the transmission destination (output port number) is obtained as the search result SR, that is, when the frame transfer device has a plurality of ports, the frame
次に、図2を参照して、検索処理部12の詳細な構成について説明する。
図2は、第1の実施の形態にかかるフレーム検索処理装置の検索処理部の構成を示すブロック図である。
この検索処理部12には、主な回路部として、フレーム情報振分回路21、第1検索テーブル22A、第2検索テーブル22B、第1読出回路23A、第2読出回路23B、N個の比較回路3n(n=1〜N;Nは2以上の自然数)、および検索結果合流回路24が設けられている。
Next, a detailed configuration of the
FIG. 2 is a block diagram illustrating a configuration of a search processing unit of the frame search processing apparatus according to the first embodiment.
The
フレーム情報振分回路21は、専用の信号処理回路からなり、フレーム情報抽出部11で得られたフレーム情報FDを、比較回路3nのうち適合エントリの検索中である比較回路以外のいずれか1つの比較回路3nに対して、フレーム情報FDnとして振り分ける機能を有している。なお、本実施の形態では、比較回路3nが複数並列的に設けられている場合を例として説明するが、これに限定されるものではなく、比較回路3nが1つの場合にも、同様に適用でき、この場合、フレーム情報振分回路21を省くことができる。
The frame
第1検索テーブル22Aは、半導体メモリなどの記憶装置からなり、エントリごとに、当該エントリと対応する検索条件の一部からなる第1エントリ情報を記憶する機能を有している。
第2検索テーブル22Bは、半導体メモリなどの記憶装置からなり、エントリごとに、当該エントリと対応する前記検索条件のうち第1エントリ情報以外の部分からなる第2エントリ情報を記憶する機能を有している。
The first search table 22A includes a storage device such as a semiconductor memory, and has a function of storing first entry information including a part of search conditions corresponding to the entry for each entry.
The second search table 22B includes a storage device such as a semiconductor memory, and has a function of storing, for each entry, second entry information including a portion other than the first entry information in the search condition corresponding to the entry. ing.
第1読出回路23Aは、専用の信号処理回路からなり、第1検索テーブル22Aの各エントリから巡回的に第1エントリ情報EDAを読み出して、各比較回路3nへ出力するための第1読出信号RAを第1検索テーブル22Aへ出力する機能を有している。
第2読出回路23Bは、専用の信号処理回路からなり、第2検索テーブル22Bの各エントリから巡回的に第2エントリ情報EDBを読み出して、各比較回路3nへ出力するための第2読出信号を第2検索テーブル22Bへ出力する機能を有している。
検索結果合流回路24は、各比較回路3n(n=1〜N)から検索結果SRnを入力し、これらを検索結果SRとしてフレーム合成部14に対して順次出力する。
The
The
The search
各比較回路3nは、専用の信号処理回路からなり、エントリごとに、第1検索テーブル22Aから読み出された第1エントリ情報EDAおよび第2検索テーブル22Bから読み出された第2エントリ情報EDBを、フレーム情報振分回路21からのフレーム情報FDnと比較することにより、当該エントリが入力フレームFINと適合する適合エントリか否かを判定する機能を有している。
Each
これに加えて、これら比較回路3nは、対象となるエントリの第1エントリ情報EDAおよび第2エントリ情報EDBをフレーム情報FDnと比較する際、まず第1エントリ情報EDAをフレーム情報FDnと比較することにより、第1エントリ情報EDAがフレーム情報FDnと適合するか否か判定する機能と、第2エントリ情報EDBの読出要否を示す読出判定結果RJとして第2読出回路23Bへ出力する機能と、当該判定により得られた第1適合判定結果が適合を示す場合には、第2エントリ情報EDBをフレーム情報FDnと比較することにより、第2エントリ情報EDBがフレーム情報FDnと適合するか否か判定する機能と、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、第1エントリ情報EDAの一部、または第2エントリ情報EDBの一部を、適合エントリと対応する検索結果SRnとして出力する機能とを有している。
In addition, when comparing the first entry information EDA and the second entry information EDB of the target entry with the frame information FDn, the
さらに、第2読出回路23Bは、比較回路3nから出力された読出判定結果RJが読み出しあり(読出要)を示す場合に、第2検索テーブル22Bからの第2エントリ情報EDBの読み出しを行う機能と、読出判定結果RJが読み出しなし(読出不要)を示す場合には、第2検索テーブル22Bからの第2エントリ情報EDBの読み出しを行わない機能とを有している。
Further, the
比較回路3nの個数Nについては、必ずしも2個以上でなくともよいが、N=1の場合はフレーム情報振分回路21を具備しない構成となる。検索処理部12がフレーム情報FDを入力してから、前記フレーム情報FDに対応した検索結果SRを得るまでの時間Ts内に、入力されるフレーム情報FDの最大個数Nmaxとした場合、NをNmax以上とすることにより、フレーム情報FDに対して検索結果SRを得ることを保証できる。
The number N of the
なお、NがNmaxより小さい場合、検索処理部12がフレーム情報FDを高いレート、すなわち単位時間Tcあたりに入力されるフレーム情報FDの数がN/Tcより大きくなるレートで入力したとき、全ての比較回路3nが既入力のフレーム情報FDnに対する検索処理を行っている状況が発生する可能性がある。このような状況では、検索処理部12が入力したフレーム情報FDに対する検索結果SRを得られないため、フレーム情報FDを抽出した入力フレームFINには、本来の検索結果SRを適用できなくなる。
When N is smaller than Nmax, when the
第1検索テーブル22Aと第2検索テーブル22Bの各々は、Ne個(Neは1以上の自然数)のエントリi(i=1〜Ne)を有する。第1検索テーブル22Aは各エントリiに第1エントリ情報EDA[i]を記憶する。また、第2検索テーブル22Bは各エントリiに第2エントリ情報EDB[i]を記憶する。 Each of the first search table 22A and the second search table 22B has Ne (N is a natural number of 1 or more) entries i (i = 1 to Ne). The first search table 22A stores first entry information EDA [i] in each entry i. The second search table 22B stores second entry information EDB [i] in each entry i.
第1検索テーブル22Aのエントリiに記憶された第1エントリ情報EDA[i]と、第2検索テーブル22Bのうち第1エントリ情報EDA[i]と同一エントリ番号のエントリiに記憶された第2エントリ情報EDB[i]とのセットが、前述した従来技術におけるエントリ情報に相当する。つまり、前記第1エントリ情報EDA[i]が表現する第1検索条件[i]とフレーム情報FDが適合し、かつ、前記第2エントリ情報EDB[i]が表現する第2検索条件[i]と前記フレーム情報FDが適合した場合に、入力フレームFINに適合する検索条件を持つエントリiを見つけたことになる。 The first entry information EDA [i] stored in the entry i of the first search table 22A and the second entry stored in the entry i having the same entry number as the first entry information EDA [i] in the second search table 22B. The set with the entry information EDB [i] corresponds to the entry information in the prior art described above. That is, the first search condition [i] expressed by the first entry information EDA [i] matches the frame information FD, and the second search condition [i] expressed by the second entry information EDB [i]. When the frame information FD matches, the entry i having a search condition that matches the input frame FIN is found.
第1検索テーブル22Aは、第1読出回路23Aから第1読出信号RAを入力し、この第1読出信号RAが示すタイミングで、第1読出信号RAが示すアドレス、すなわちエントリiから、記憶している第1エントリ情報EDA[i]を読み出す機能を有している。
第2検索テーブル22Bは、第2読出回路23Bから第2読出信号RBを入力し、この第2読出信号RBが示すタイミングで、第2読出信号RBが示すアドレス、すなわちエントリiから、記憶している第2エントリ情報EDB[i]を読み出す機能を有している。
The first search table 22A receives the first read signal RA from the
The second search table 22B receives the second read signal RB from the
フレーム情報振分回路21は、フレーム情報抽出部11からフレーム情報FDを入力し、所定の比較回路選択方法に基づいて、前記フレーム情報FDの出力先である比較回路3nを決定し、前記比較回路3nに対して前記フレーム情報FDをフレーム情報FDnとして出力する機能を有している。
The frame
前記比較回路選択方法の例は、前記各比較回路3nが検索処理中であるか否かを判定し、前記検索処理を行っていない比較回路3nの1つを選択することである。この比較回路選択方法を簡単な回路で実現する例として、フレーム情報を入力したとき前回入力時に選択した比較回路3nの番号nを+1した番号の比較回路3(n+1)を選択する方法がある。この比較回路選択方法において、前回入力時に選択した比較回路3nの番号nがNの場合は、番号1の比較回路31を選択して、巡回的に比較回路3nを選択することになる。
An example of the comparison circuit selection method is to determine whether or not each
前記比較回路選択の他の例は、前記フレーム情報振分回路21が前記各比較回路3nの検索完了有無を判定する方法である。すなわち、フレーム情報振分回路21が、各比較回路3nについて前回フレーム情報FDを入力した時点からの経過時間を測り、前記計測時間が検索完了までに要する一定時間に達した時点で、前記比較回路3nが検索完了となったと判定し、前記検索完了となっている比較回路3nの1つを選択することである。
Another example of the comparison circuit selection is a method in which the frame
比較回路3nは、フレーム情報振分回路21からのフレーム情報FDn(n=1〜N)の入力に応じて、前記フレーム情報FDnに適合する検索条件を持ったエントリを検索するための検索処理を実行する。
この検索処理において、比較回路3nは、入力されたフレーム情報FDnと、第1読出回路23Aが第1検索テーブル22Aのエントリi(i=1〜Ne)から読み出した第1エントリ情報EDA[i]とに基づいて、前記フレーム情報FDnが、前記第1エントリ情報EDA[i]が表す検索条件に適合するか否かを判定するための第1適合判定を行って、回路内部信号として第1適合判定結果CJAn[i](図示せず)を得る。
The
In this search process, the
さらに、前記比較回路3nは、得られた前記第1適合判定結果CJAn[i]に基づいて、第2検索テーブル22Bのエントリi(i=1〜Ne)から第2エントリ情報EDB[i]を読み出すか否かを判定するための第2検索テーブル読出判定を行い、得られた読出判定結果RJn[i]を第2読出回路23Bに出力する。
Further, the
本例では、第1適合判定結果CJAn[i]が適合を示す場合に、第2検索テーブル22Bから第2エントリ情報EDB[i]を読み出す(第2検索テーブル読出あり)と判定し、前記第1適合判定結果CJAn[i]が不適合を示す場合に、第2検索テーブル22Bから第2エントリ情報EDB[i]を読み出さない(第2検索テーブル読出なし)と判定する。
すなわち、本例では、第1適合判定とは別に第2検索テーブル読出判定を行う必要はなく、また、第1適合判定結果CJAn[i]を用いて読出判定結果RJn[i]を得ることができる。
In this example, when the first conformity determination result CJAn [i] indicates conformity, it is determined that the second entry information EDB [i] is read from the second search table 22B (the second search table is read), and the first When the one conformity determination result CJAn [i] indicates nonconformity, it is determined that the second entry information EDB [i] is not read from the second search table 22B (the second search table is not read).
That is, in this example, it is not necessary to perform the second search table read determination separately from the first suitability determination, and the read determination result RJn [i] can be obtained using the first match determination result CJAn [i]. it can.
ここで、前記比較回路3nがフレーム情報FDnと第1エントリ情報EDA[i]とに基づいて、第2読出回路23Bに第2検索テーブル読出ありを示す読出判定結果RJn[i]を出力した場合、第2読出回路23Bは、第2検索テーブル22Bから第2エントリ情報EDB[i]を読み出して、前記第2エントリ情報EDB[i]を前記比較回路3nに入力する。
Here, when the
このとき、前記比較回路3nは、前記フレーム情報FDnと、前記第2エントリ情報EDB[i]とに基づいて、前記フレーム情報FDnが前記第2エントリ情報EDB[i]に適合するか否かの第2適合判定を行って、回路内部信号として第2適合判定結果CJB[i](図示せず)を得る。
At this time, the
これにより、比較回路3nのうち、前記フレーム情報FDnと前記第1エントリ情報EDA[i]とを比較する第1部分比較回路が検索処理中であっても、第2検索テーブル22Bの読み出しを行わない期間は、例えばクロック供給や電力供給を停止させて、前記比較回路3nのうち、前記フレーム情報FDnと前記第2エントリ情報EDB[i]とを比較する第2部分比較回路の動作を停止させることができるため、消費電力を削減することが可能となる。
Thereby, even when the first partial comparison circuit that compares the frame information FDn and the first entry information EDA [i] in the
前記比較回路3nは、前記第1適合判定結果CJAn[i]と前記第2適合判定結果CJB[i]に基づいて、エントリiの検索条件が前記フレーム情報FDnに適合するか否かを判定する統合適合判定を行う。
The
統合適合判定の例としては、前記第1適合判定結果CJAn[i]が適合ありを示し、かつ、前記第2適合判定結果CJB[i]が適合ありを示す場合に、統合適合判定において適合すると判定し、それ以外の場合、つまり、第1適合判定結果CJAn[i]が適合なしを示す場合や、第1適合判定結果CJAn[i]が適合ありを示すが、第2適合判定結果CJB[i]が適合なしを示す場合は、統合適合判定において不適合と判定する。なお、この例では、第1適合判定結果CJAn[i]が不適合の場合には、読出判定結果RJn[i]は読み出しなしとなり、第2適合判定は不要である。 As an example of the integrated suitability determination, when the first suitability determination result CJAn [i] indicates that there is a conformity and the second conformance determination result CJB [i] indicates that there is a conformance, In other cases, that is, when the first conformity determination result CJAn [i] indicates no conformity, or when the first conformity determination result CJAn [i] indicates conformity, the second conformity determination result CJB [ When i] indicates that there is no conformity, it is determined as nonconformity in the integrated conformity determination. In this example, when the first conformity determination result CJAn [i] is nonconforming, the read determination result RJn [i] is not read, and the second conformity determination is unnecessary.
また、統合適合判定の別の例としては、前記第1適合判定結果CJAn[i]が適合ありを示し、または、前記第2適合判定結果CJB[i]が適合ありを示す場合に、エントリiの検索条件が前記フレーム情報FDnに適合すると判定し、それ以外の場合、つまり、第1適合判定結果CJAn[i]が不適合かつ第2適合判定結果CJB[i]が不適合の場合は、統合適合判定において不適合と判定する。なお、この例では、第1適合判定結果CJAn[i]が適合ありを示す場合、読出判定結果RJn[i]は読み出しなしとなり、第2適合判定は不要である。 As another example of the integrated suitability determination, when the first suitability determination result CJAn [i] indicates that there is a conformity, or when the second conformance determination result CJB [i] indicates that there is a conformance, the entry i In other cases, that is, when the first conformity determination result CJAn [i] is incompatible and the second conformity determination result CJB [i] is incompatible, the integrated conformity is determined. Judged as nonconforming. In this example, when the first conformity determination result CJAn [i] indicates conformity, the read determination result RJn [i] is not read, and the second conformity determination is not necessary.
この際、第1適合判定結果CJAが不適合の場合に、統合判定結果が不適合となるとは限らない。ただし、一般的には、第1適合判定結果CJAが不適合の場合は統合判定結果を不適合とする。つまり、第1エントリ情報EDA[i]が表す第1検索条件と第2エントリ情報EDB[i]が表す第2検索条件のANDを統合適合判定の条件とする検索が一般的である。その理由は、「第1検索条件OR第2検索条件」の検索は、第1検索条件のみのエントリと第2検索条件のみのエントリという2つのエントリに分けることで実現可能である。同じ検索結果SRが設定された複数のエントリは、前記エントリの検索条件のORを検索条件とする1つのエントリと等価であるが、「第1検索条件AND第2検索条件」の検索は、第1検索条件OR第2検索条件の検索では実現困難であるためである。 At this time, when the first conformity determination result CJA is nonconforming, the integrated determination result does not necessarily become nonconforming. However, generally, when the first conformity determination result CJA is nonconforming, the integrated determination result is regarded as nonconforming. That is, a search is generally performed using an AND of the first search condition represented by the first entry information EDA [i] and the second search condition represented by the second entry information EDB [i] as a condition of the integrated suitability determination. The reason is that the search of “first search condition OR second search condition” can be realized by dividing the search into two entries, that is, the entry of only the first search condition and the entry of only the second search condition. A plurality of entries having the same search result SR is equivalent to one entry using the OR of the search conditions of the entry as a search condition. However, the search for “first search condition AND second search condition” This is because it is difficult to realize the search by one search condition OR second search condition.
また、前記統合適合判定により適合と判断されたエントリが見つかった時点、あるいは、全てのエントリについてフレーム情報FDnの判定を終えた時点で、比較回路3nは検索を終了し、検索結果SRnを出力する。すなわち、エントリiに対する統合適合判定において適合ありとなった時点で、前記フレーム情報FDnに対して前記エントリiの他に統合適合判定を行っていないエントリが残っていたとしても、前記エントリiを検索結果SRnとして採用し、前記残りのエントリに対する処理、例えば第1エントリ情報EDAや第2エントリ情報EDBの読み出し、その適合判定、統合適合判定などの処理を行わないようにすることが可能である。
Further, when the entry determined to be compatible by the integrated compatibility determination is found or when the frame information FDn has been determined for all the entries, the
また、エントリiに対する統合適合判定において不適合となった場合は、統合適合判定が行われていないエントリに対する処理、例えば第1エントリ情報EDAや第2エントリ情報EDBの読み出し、その適合判定、統合適合判定などの処理を継続する。
さらに、前記処理の継続によって、検索テーブルの全エントリについて統合適合判定を行った場合は、最後のエントリに対する統合適合判定結果が不適合であったとしても、処理を終了する。
Further, when the integrated suitability determination for the entry i becomes nonconforming, processing for the entry for which the integrated suitability determination has not been performed, for example, reading of the first entry information EDA and the second entry information EDB, the conformity determination, the integrated conformance determination. Continue the process.
Further, when the integrated suitability determination is performed for all the entries in the search table by continuing the processing, the processing is ended even if the integrated suitability determination result for the last entry is nonconforming.
この際、前記最後のエントリに対する統合適合判定結果が不適合の場合は予め設定された全エントリに不適合となった場合の検索結果SRnを採用する。フレーム情報FDnに対する検索中に、あるエントリで第1適合判定結果CJAが不適合であっても、残りのエントリの中に適合となるエントリが見つかる可能性がある。このため、第1適合判定結果CJAが不適合となったからといって、検索を終了することはない。 At this time, when the integrated conformity determination result with respect to the last entry is nonconforming, the search result SRn in the case where all the preset entries are unconforming is adopted. During the search for the frame information FDn, even if the first suitability determination result CJA is non-conforming in a certain entry, it may be possible to find a conforming entry among the remaining entries. For this reason, the search is not terminated just because the first conformity determination result CJA is nonconforming.
なお、第1エントリ情報EDAまたは第2エントリ情報EDBにエントリの適用優先度を含み、統合適合判定により適合とされたエントリのなかで前記エントリの適用優先度が最も高いエントリを見つける例では、統合適合判定により適合とされたエントリが1個見つかった時点で検索を終了するのではなく、全エントリについて統合適合判定を終えるか、上限の適用優先度、すなわち適用優先度に設定可能な範囲の値のうち最も適用優先度が高い値を持つ適用優先度を持つエントリが見つかった場合にのみ、検索を終了する。 In the example in which the entry entry priority is included in the first entry information EDA or the second entry information EDB, and the entry having the highest entry priority is found among the entries determined to be compatible by the integrated suitability determination, The search is not terminated when one entry is found to be matched by the match determination, but the integrated match determination is completed for all entries, or the upper limit application priority, that is, a value within a range that can be set as the application priority. The search is terminated only when an entry having an application priority having the highest application priority is found.
前記比較回路3nは、前記統合適合判定によって得られた結果、例えば前記判定において適合したエントリの番号iや前記エントリの第2エントリ情報EDB[i]に含まれる結果を示す情報;通過/廃棄を示す情報や送出先を示すポート番号などを、検索結果SRnとして、検索結果合流回路24に対して出力する。
なお、前記適用優先度とは、検索テーブル中に適合と判定されるエントリが複数存在する場合に、それらのエントリのうち、どのエントリの検索結果SRnを採用するかを決めるために用いられる、各エントリに指定された値である。例えば、適合と判定されるエントリのなかで適用優先度の値が最も小さいエントリを採用する。
The
The application priority is used to determine which entry's search result SRn is to be adopted when there are a plurality of entries determined to be suitable in the search table. The value specified for the entry. For example, an entry having the smallest application priority value among entries determined to be suitable is adopted.
この際、エントリ毎に適用優先度の値を設定するのではなく、前記エントリの番号を適用優先度として使用することも可能であり、この場合は、適合と判定されるエントリのなかで検索テーブルの最上位に位置するエントリが採用される。また、エントリ毎に適用優先度の値を設定することによって、エントリ番号に制約されず同様の検索が可能となるので、エントリの追加のためにエントリ間に空きエントリを作るためのエントリ移動処理が不要となる。 At this time, instead of setting the application priority value for each entry, it is also possible to use the entry number as the application priority. In this case, the search table among the entries determined to be compatible. The entry located at the top of the is adopted. In addition, by setting an application priority value for each entry, the same search can be performed without being restricted by the entry number. Therefore, an entry moving process for creating an empty entry between entries for adding an entry is performed. It becomes unnecessary.
比較回路3nは、エントリiについて、第1エントリ情報EDA[i]が第1検索テーブル22Aから読み出された後に得られる第1適合判定結果CJAn[i]と、その後の第2エントリ情報EDB[i]が第2検索テーブル22Bから読み出された後に得られる第2適合判定結果CJB[i]に基づいて、前記統合適合判定を行う。
第2適合判定結果CJB[i]を得る前に、次のエントリ(i+1)に対する第1適合判定を行って、第1適合判定結果CJAn[i+1]を得る場合は、エントリiに対する第1適合判定結果CJAn[i]とともにエントリ(i+1)に対する第1適合判定結果CJAn[i+1]を、統合適合判定を行うまで一時的に保持しておく。
For the entry i, the
Before obtaining the second conformity determination result CJB [i], when the first conformity determination is performed for the next entry (i + 1) to obtain the first conformity determination result CJAn [i + 1], the first conformity determination for the entry i The first match determination result CJAn [i + 1] for the entry (i + 1) together with the result CJAn [i] is temporarily held until the integrated match determination is performed.
つまり、第1適合判定結果CJAn[i]を、第2適合判定結果CJBn[i]を得て統合適合判定を行うまで保持する必要があるが、前記保持期間中に得た次エントリ以後の第1適合判定結果CJAnも合わせて保持する。これにより、エントリの更新間隔を、第1適合判定結果CJAn[i]を得てから第2適合判定結果CJBn[i]を得るまでの時間以上とする必要がなくなり、検索処理速度を向上できる。 That is, the first conformity determination result CJAn [i] needs to be retained until the second conformity determination result CJBn [i] is obtained and the integrated conformity determination is performed. 1 Conformity determination result CJAn is also held. As a result, it is not necessary to set the entry update interval longer than the time from when the first conformity determination result CJAn [i] is obtained until the second conformity determination result CJBn [i] is obtained, and the search processing speed can be improved.
上記の全てのエントリi(i=1〜Ne)についてフレーム情報FDn(n=1〜N)との判定を終えた時点を知る判定終了特定方法の例として、フレーム情報FDnを比較回路3nが入力した時点からの経過時間を前記比較回路3nが測っておき、前記経過時間が予め定められた時間Tsに達したタイミングを用いる方法がある。この判定終了特定方法は、各エントリの処理時間が固定値でありエントリ数も固定値であることから、全エントリを検索するのにかかる時間も固定値となることを利用した方法である。また別の判定終了特定方法として、フレーム情報FDを比較回路3n(n=1〜N)が入力した時点からの統合適合判定の回数を計数し、その回数がN(全エントリ数)に達したタイミングを用いることもできる。
The
検索結果合流回路24は、各比較回路3n(n=1〜N)から検索結果SRnを入力し、これらを検索結果SRとしてフレーム合成部14に対して出力する。
The search
第1読出回路23Aは、クロックに基づき時間の経過に合わせてエントリi(i=1〜Ne)を変えながら、エントリiを読み出すための第1読出信号RAを第1検索テーブル22Aに対して出力することにより、第1検索テーブル22Aが記憶する第1エントリ情報EDA[i]を次々と読み出す。これにより、第1エントリ情報EDA[i]は各比較回路3n(n=1〜N)に分配される。
The
第1エントリ情報EDAの読み出し方法の例として、第1検索テーブル22Aを第1テーブルメモリによって構成し、前記第1テーブルメモリの各アドレスa1(a1=0〜Ne−1)に第1エントリ情報EDA[a1+1]を記憶し、前記読み出すアドレスa1を時間の経過に合わせて、0〜Ne−1まで順番に変える方法がある。なお、この方法において、アドレスa1が最後のエントリNe−1のアドレスに達したときは0に戻すことにより、巡回的に第1エントリ情報EDAを読み出すことになる。 As an example of a method of reading the first entry information EDA, the first search table 22A is constituted by a first table memory, and the first entry information EDA is assigned to each address a1 (a1 = 0 to Ne-1) of the first table memory. There is a method of storing [a1 + 1] and sequentially changing the read address a1 from 0 to Ne-1 as time passes. In this method, when the address a1 reaches the address of the last entry Ne-1, the first entry information EDA is read cyclically by returning to 0.
ここで、各比較回路3n(n=1〜N)が出力する検索処理中であるか否かを示す検索状態SSnを、第1読出回路23Aが入力して、全ての比較回路3nが検索処理を行っていない期間中の、前記読み出しを行わないことにより、第1検索テーブル22Aの読み出しが不要な期間の消費電力を削減できる。
Here, the
また上記の方法を、テーブルメモリの全領域ではなく、その一部領域を第1検索テーブル22Aとして使用する場合にも適用可能である。この場合は、アドレスa1を0〜Ne−1の範囲で+1ずつ増加させるのではなく、読み出す対象となるエントリiを+1ずつ増加させて(i=Neの次はi=1とする)、アドレスa1をA0+(i−1)*A1で演算して求める。この場合、A0は第1検索テーブル22Aに割り当てられたメモリ領域の下限値、A1は1個の第1エントリ情報EDAを記憶するために必要なメモリ量に相当するアドレス増分を指す。なお、前記アドレスa1を先頭としてアドレスa1+A0の直前までの領域に記憶されたデータを、第1エントリ情報EDA[i]とする。 The above method can also be applied to the case where a part of the table memory is used as the first search table 22A instead of the entire area of the table memory. In this case, the address a1 is not incremented by +1 in the range of 0 to Ne-1, but the entry i to be read is incremented by +1 (i = 1 next to i = Ne), and the address a1 is calculated by A0 + (i−1) * A1. In this case, A0 indicates the lower limit value of the memory area allocated to the first search table 22A, and A1 indicates an address increment corresponding to the memory amount necessary to store one piece of first entry information EDA. Note that the data stored in the area from the address a1 to immediately before the address a1 + A0 is referred to as first entry information EDA [i].
第2読出回路23Bは、第1読出回路23Aと同様に、クロックに基づき時間の経過に合わせてエントリi(i=1〜Ne)を変えながら、前記エントリを読み出すための第2読出信号RBを第2検索テーブル22Bに対して出力することにより、第2検索テーブル22Bが記憶する第2エントリ情報EDB[i]を次々と読み出す。これにより、前記第2エントリ情報EDB[i]は各比較回路3n(n=1〜N)に分配される。ただし、第1エントリ情報EDA[i]の読み出しから予め定められた一定の時間差Tdの後に、第2エントリ情報EDB[i]の読み出しを行う。
Similarly to the
また、前記第2エントリ情報EDB[i]の読み出しを行うのは、少なくとも1個の比較回路3nから第2検索テーブル読出ありを示す読出判定結果RJn[i]を入力した場合に限る。なお、検索処理を行っていない比較回路3nは、第2検索テーブル読出なしを示す読出判定結果RJn[i]を出力することで、比較回路3nが検索処理中であるか否かを区別せずに、各読出判定結果RJn[i](n=1〜N)のみに基づいて、第2エントリ情報EDB[i]の読み出し実施の有無を判定することができる。
The second entry information EDB [i] is read only when the read determination result RJn [i] indicating that the second search table is read is input from at least one
上記の時間差Tdは、(a)第1読出回路23Aが第1エントリ情報EDA[i](i=1〜Ne)の読み出しを開始してから比較回路3n(n=1〜N)に前記第1エントリ情報EDA[i]が入力されるまでの時間(=第1検索テーブル22Aの読み出しに要する時間+第1エントリ情報EDAを各比較回路3nに分配するのに要する時間)、(b)比較回路3n(n=1〜N)が第1エントリ情報EDA[i]を入力してから読出判定結果RJn[i]を第2読出回路23Bに出力するまでの時間(=第2検索テーブル読出判定に要する時間)、(c)第2読出回路23Bが全ての比較回路3n(n=1〜N)から読出判定結果RJn[i]を入力してから第2エントリ情報EDB[i]の読み出しを行うと判定して第2エントリ情報EDB[i](i=1〜Ne)の読み出しを開始するまでの時間(=第2検索テーブル22Bの読み出し有無を判断するのに要する時間)、の和となる。
The time difference Td is as follows. (A) The
第2読出回路23Bは、第1読出回路23Aがエントリiの第1エントリ情報EDA[i]を読み出す時点からTdの遅延をおいて、各比較回路3n(n=1〜N)からの読出判定結果RJn[i]の中に第2検索テーブル読出ありを示すものが含まれる場合に、前記エントリiの第2エントリ情報EDB[i]を読み出す。
The
この読み出し方法の例として、第2検索テーブル22Bを第2テーブルメモリによって構成し、前記第2テーブルメモリの各アドレスa2(a2=0〜Ne−1)に第2エントリ情報EDB[a2+1]を記憶し、前記読み出すアドレスa2を、時間Tdだけ以前に第1検索テーブル22Aからの読み出しのために生成された第1読出回路23Aの読み出しアドレスa1とする。さらに、前記第2テーブルメモリからの読出実施の有無を示す信号である読出制御信号として、読出判定結果RJn[i]を示す信号に対する論理演算、すなわち、少なくとも1個の読出判定結果RJが第2検索テーブル読出ありを示すとき読出制御信号が読出ありを示す値とする演算の結果を用いる。
As an example of this reading method, the second search table 22B is constituted by a second table memory, and the second entry information EDB [a2 + 1] is stored in each address a2 (a2 = 0 to Ne-1) of the second table memory. The read address a2 is set as the read address a1 of the
次に、図3を参照して、本実施の形態にかかる第1読出回路23Aおよび第2読出回路23Bについて説明する。図3は、第1の実施の形態にかかる検索処理部の要部を示すブロック図である。
Next, the
図3に示すように、第1読出回路23Aは、第1読出アドレス生成部41Aと第1読出有効生成部42Aを有している。
第1読出アドレス生成部41Aは、クロックに合わせて、1サイクル前に出力の第1読出アドレスRAA値である第1読出アドレスRAA[i−1]を+1した値を、第1読出アドレスRAA[i]として出力する機能を有している。これにより、エントリiの第1読出アドレスRAA[i]の値はi−1となる。ただし、フレーム検索処理装置10の動作開始時と、第1読出アドレスRAA値がNeとなった場合は0を出力する。
As shown in FIG. 3, the
The first read
第1読出有効生成部42Aは、1個以上の検索状態SSnが検索処理中を示すとき、有効を示す第1読出有効信号REA[i]を出力する機能を有している。なお、全て検索停止を示す場合は無効を示す第1読出有効信号REA[i]を出力する。
第1読出回路23Aが出力する第1読出信号RA[i]は、第1読出有効信号REA[i]と第1読出アドレスRAA[i]とを有している。
The first read
The first read signal RA [i] output from the
第1検索テーブル22Aは、第1読出信号RA[i]を入力することによって、前記入力から一定時間の後に、第1読出有効信号REA[i]が有効を示すときの第1読出アドレスRAA[i]が示す、第1テーブルメモリM1(第1検索テーブル22A用のメモリ)のアドレスに記憶された第1エントリ情報EDA[i]が、各比較回路3nに出力される。
また、第1読出アドレスRAA[i]は、第1検索テーブル22Aの他に、第2読出回路23Bに出力され、第2テーブルメモリM2(第2検索テーブル22B用のメモリ)から第2エントリ情報EDB[i]を読み出すために用いられる。
By inputting the first read signal RA [i], the first search table 22A receives the first read address RAA [when the first read valid signal REA [i] indicates valid after a predetermined time from the input. The first entry information EDA [i] stored at the address of the first table memory M1 (memory for the first search table 22A) indicated by i] is output to each
The first read address RAA [i] is output to the
第2読出回路23Bは、第2読出アドレス生成部41Bと第2読出有効生成部42Bを有している。
第2読出有効生成部42Bは、各比較回路3n(n=1〜N)から読出判定結果RJn[i]を入力し、1個以上の読出判定結果RJn[i]が読出ありを示すとき、有効を示す第2読出有効信号REB[i]を出力する機能を有している。なお、全て読出なしを示す場合は、無効を示す第2読出有効信号REB[i]を出力する。すなわち、n=1〜Nについて、読出判定結果RJn[i]の論理和が第2読出有効信号REB[i]となる。
The
The second read
第2読出アドレス生成部41Bは、第1読出アドレスRAA[i]を入力し、この第1読出アドレスRAA[i]を時間Tdだけ遅延させて前記値を第2読出アドレスRAB[i]として出力する機能を有している。第1読出アドレスRAA[i]はクロック毎に+1ずつ増加する信号であるため第1読出アドレスRAA[i]をシフトレジスタによってTd分遅延させて第2読出アドレスRAB[i]を生成しなくとも、カウンタを用いて生成することも可能である。
The second
なお、第1テーブルメモリと第2テーブルメモリは各々、同じアドレスに同じエントリのエントリ情報を記憶しているものとする。すなわち、第1テーブルメモリのアドレスaにエントリiの第1エントリ情報EDA[i]が記憶されている場合は、第2テーブルメモリのアドレスaにエントリiの第2エントリ情報EDB[i]が記憶されている。第1読出アドレスRAA[i]の入力から時間Tdだけ遅延させて出力することで、エントリiの第2エントリ情報EDB[i]を読み出しの有効・無効を示す第2読出有効信号REB[i]を出力するのと同じタイミングで、前記エントリiの第2エントリ情報EDB[i]が第2テーブルメモリに記憶されているアドレスである第2読出アドレスRAB[i]を出力することができる。 Note that the first table memory and the second table memory each store entry information of the same entry at the same address. That is, when the first entry information EDA [i] of the entry i is stored at the address a of the first table memory, the second entry information EDB [i] of the entry i is stored at the address a of the second table memory. Has been. The second read valid signal REB [i] indicating the validity / invalidity of reading the second entry information EDB [i] of the entry i by delaying the time Td from the input of the first read address RAA [i] and outputting it. The second read address RAB [i], which is the address stored in the second table memory, can be output at the same timing as when the second entry information EDB [i] of the entry i is output.
[第1の実施の形態の動作]
次に、図4を参照して、本実施の形態にかかる検索処理部12の動作について説明する。図4は、第1の実施の形態にかかる検索処理部の動作を示すタイムチャートであり、比較回路3nの個数Nが2の場合を例として、検索処理部12内の各信号について時間の経過(左から右)に伴う変化が示されている。
[Operation of First Embodiment]
Next, the operation of the
検索状態SSn(n=1,2)の各信号は、Hレベル:検索処理中/Lレベル:検索停止中を表す信号であり、比較回路3nにフレーム情報FDn(n=1,2)が入力された時点でHレベル:検索処理中となり、1個のフレーム情報FDに対して全エントリ(16個)をテーブルから読み出した後(処理開始から16サイクル経過後)にLレベル:検索処理停止となる。
Each signal in the search state SSn (n = 1, 2) is a signal indicating H level: search processing being in progress / L level: search is being stopped, and frame information FDn (n = 1, 2) is input to the
第1読出有効信号REA[i]の信号は、Hレベル:有効/Lレベル:無効を表す信号であり、検索状態SS1と検索状態SS2の各信号の論理和となる。つまり、各比較回路3nのうち1個以上が検索処理中である期間は第1読出有効信号REA[i]が有効を示すため、第1テーブルメモリの第1読出アドレスRAA[i]の位置に記憶された、第1エントリ情報EDA[i]が読み出されることになる。
The signal of the first read valid signal REA [i] is a signal representing H level: valid / L level: invalid, and is the logical sum of the signals in the search state SS1 and the search state SS2. That is, the first read valid signal REA [i] is valid during a period when one or more of the
第1読出アドレスRAA[i]の信号は、0〜15の範囲で繰り返しクロック毎に+1ずつ増加する。ただし、値が15の次は0となる。図4の第1読出アドレスRAA[i]を表す各箱内の数字はエントリ番号i(1〜16)を表しており、エントリ番号iの前記信号値はi−1である。つまり、第1テーブルメモリのアドレスi−1に第1エントリ情報EDA[i]を記憶しておき、クロックサイクル毎に、エントリ番号をインクリメントして、前記エントリ番号に対応する第1エントリ情報EDAを第1テーブルメモリから読み出す。 The signal of the first read address RAA [i] repeatedly increases by +1 for each clock in the range of 0-15. However, the value after 15 is 0. The number in each box representing the first read address RAA [i] in FIG. 4 represents the entry number i (1 to 16), and the signal value of the entry number i is i-1. That is, the first entry information EDA [i] is stored in the address i-1 of the first table memory, the entry number is incremented every clock cycle, and the first entry information EDA corresponding to the entry number is stored. Read from the first table memory.
なお、第1エントリ情報EDA[i]を読み出すための信号である、第1読出有効信号REA[i]と第1読出アドレスRAA[i]は、第1テーブルメモリに同時に入力される例を示しているが、同時入力ではないメモリ(例えば第1読出有効信号REA[i]を第1読出アドレスRAA[i]より所定のサイクルだけ先に入力する必要があるメモリ)を第1テーブルメモリとして使用することも可能であり、この場合は、第1読出回路23Aは、メモリによって規定された信号入力方法に従って、第1読出有効信号REA[i]や第1読出アドレスRAA[i]を生成することになる。
The first read valid signal REA [i] and the first read address RAA [i], which are signals for reading the first entry information EDA [i], are input to the first table memory at the same time. However, a memory that is not simultaneously input (for example, a memory in which the first read enable signal REA [i] needs to be input a predetermined cycle before the first read address RAA [i]) is used as the first table memory. In this case, the
また、第1読出有効信号REA[i]と第1読出アドレスRAA[i]によって読み出すのではなく、コマンドを用いてアクセスするメモリの場合、第1読出回路23Aは、第1読出有効信号REA[i]が有効を示す場合に、第1読出アドレスRAA[i]の位置に記憶されたデータを読み出すための第1読出コマンド[i]を生成することとなる。
In the case of a memory that is accessed by using a command instead of reading by the first read valid signal REA [i] and the first read address RAA [i], the
第1エントリ情報EDA[i]は、第1読出有効信号REA[i]が有効時の第1読出アドレスRAA[i]の入力から2サイクル後に第1検索テーブル22Aから読み出されたデータである。なお、前記2サイクルの遅延は、前記第1テーブルメモリが入力したアドレス等の信号をラッチすることで生じる1クロックの遅延と、メモリ内のセルに記憶されているデータを出力する前にラッチするために生じる1クロックの遅延を合わせた値である。 The first entry information EDA [i] is data read from the first search table 22A two cycles after the input of the first read address RAA [i] when the first read valid signal REA [i] is valid. . The two-cycle delay is latched before outputting the data stored in the cells in the memory and the one-clock delay generated by latching the signal such as the address input to the first table memory. Therefore, it is a value obtained by adding a delay of 1 clock generated for the purpose.
第1テーブルメモリの種類やメモリと前記第1読出回路23A等が別部品によって構成される装置の場合は、前記よりも大きい遅延となる可能性がある。また、固定遅延ではなくメモリの状況、例えば外部からの前記メモリへのアクセスの有無などの状況によって前記遅延量が変動する構成も可能である。なお、図4の第1エントリ情報EDA[i]を表す各箱内の数字はエントリ番号i(1〜16)を表している。
In the case of a device in which the type of the first table memory, the memory, and the
読出判定結果RJn[i](n=1,2)の各信号は、Hレベル:読出あり/Lレベル:読出なしを表す信号である。
各比較回路3n(n=1,2)は、第1エントリ情報EDA[i]の入力から1サイクル後に読出判定結果RJn[i]を出力する。この1サイクルの遅延は、比較回路3nが読出判定結果RJn[i]をラッチして出力することによって生じる。なお、読出判定結果RJnが第1エントリ情報EDA[i]とフレーム情報FDnの複雑な演算を必要とする場合は、1サイクルより大きい遅延となる場合もある。
Each signal of the read determination result RJn [i] (n = 1, 2) is a signal indicating H level: read / L level: no read.
Each
図4では、読出判定結果RJ1[i]は、エントリ番号が5と12に対応するタイミングで、読出ありを示す場合が示されている。つまり、比較回路31は、第2エントリ情報EDB[5],第2エントリ情報EDB[12]を読み出すという読出判定結果RJ1を得たことになる。なお、本例では、第1適合判定結果CJAn[i]と読出判定結果RJn[i]は同値であり、フレーム情報FD1が第1エントリ情報EDA[5],第1エントリ情報EDA[12]に適合したことにもなる。
FIG. 4 shows a case where the read determination result RJ1 [i] indicates that there is a read at the timing corresponding to the
同様に、図4では、読出判定結果RJ2[i]は、エントリ番号が7と10に対応するタイミングで、読出ありを示す場合が示されている。つまり、比較回路32は、第2エントリ情報EDB[7],第2エントリ情報EDB[10]を読み出すという読出判定結果RJ2を得たことになる。
Similarly, FIG. 4 shows a case where the reading determination result RJ2 [i] indicates reading at the timing corresponding to the
第2読出有効信号REB[i]の信号は、Hレベル:有効/Lレベル:無効を表す信号であり、読出判定結果RJn[i]の論理和が第2読出有効信号REB[i]となっている。本例では、第2検索テーブル22Bのエントリ5,7,10,12に対して有効を示し、前記エントリ番号の第2エントリ情報EDB[5],第2エントリ情報EDB[7],第2エントリ情報EDB[10],第2エントリ情報EDB[12]が読み出されることになる。
The signal of the second read valid signal REB [i] is a signal representing H level: valid / L level: invalid, and the logical sum of the read determination results RJn [i] becomes the second read valid signal REB [i]. ing. In this example, validity is shown for the
また、第2読出有効信号REB[i]は、エントリiに対する第1読出有効信号REA[i]を時間差Td分、ここではクロック3サイクル分だけ遅延させた値からなる。前記Tdは、第1読出アドレスRAA[i]と第1読出有効信号REA[i]を第1検索テーブル22Aが入力してから第1エントリ情報EDA[i]を出力するまでの2サイクル分の遅延と、比較回路3nが前記第1エントリ情報EDA[i]を入力してから前記入力に基づいて読出判定結果RJn[i]を出力するまでの1サイクル分の遅延と、第2読出有効生成部42Bが各比較回路3nから読出判定結果RJn[i]を入力してから前記に基づいて第2読出有効信号REB[i]を出力するまでの遅延(ただし、本例では単純な論理和の演算であるため遅延なし)と、の合計である。
The second read valid signal REB [i] has a value obtained by delaying the first read valid signal REA [i] for the entry i by a time difference Td, here, by three clock cycles. The Td corresponds to two cycles from when the first search table 22A inputs the first read address RAA [i] and the first read valid signal REA [i] until the first entry information EDA [i] is output. A delay, a delay of one cycle from the input of the first entry information EDA [i] by the
なお、前記Tdはクロック3サイクル分の固定値であるが、第1読出アドレスRAA[i]と第1読出有効信号REA[i]を第1検索テーブル22Aが入力してから第1エントリ情報EDA[i]を出力するまでの遅延量が、2サイクルより大きい場合や前記遅延量が変動する場合もある。また、比較回路3nが前記第1エントリ情報EDA[i]を入力してから前記入力に基づいて読出判定結果RJn[i]を出力するまでの遅延が、1サイクルより大きい場合もある。
The Td is a fixed value for three clock cycles, but the first entry information EDA after the first search table 22A inputs the first read address RAA [i] and the first read valid signal REA [i]. The delay amount until [i] is output may be larger than two cycles or the delay amount may vary. In addition, a delay from when the
第2読出アドレスRAB[i]は、第1読出アドレス[i]をTd=3サイクルだけ遅延した信号であり、第2読出アドレスRAB[i]と同時に第2読出有効信号REB[i]が第2検索テーブル22Bに入力される。なお、図4の第2読出アドレスRAB[i]を表す各箱内の数字はエントリ番号i(1〜16)を表しており、第1読出アドレスRAA[i]と同じく、エントリ番号iの前記信号値はi−1となる。 The second read address RAB [i] is a signal obtained by delaying the first read address [i] by Td = 3 cycles. At the same time as the second read address RAB [i], the second read valid signal REB [i] 2 is input to the search table 22B. The numbers in the boxes representing the second read address RAB [i] in FIG. 4 represent the entry number i (1 to 16), and the entry number i is the same as the first read address RAA [i]. The signal value is i-1.
なお、Tdがクロック3サイクル分ではない場合は、第2読出アドレスRAB[i]を第2読出有効信号REB[i] と同時に第2検索テーブル22Bに入力するために、第1読出アドレス[i]を前記Td分だけ遅延させた信号とする。
また、Tdが変動し第2読出アドレス生成部41Bが前記変動に合わせて遅延できないのであれば、第1読出アドレス生成部41Aが第2読出アドレス生成部41Bに出力する第1読出アドレスRAA[i]を前記Tdの変動に合わせて遅延させる構成や、図11に示されている別の実施の形態での構成のように、エントリ番号iを、比較回路3nを介して第1読出回路23Aから第2読出回路23Bに受け渡す構成も可能である。
If Td is not equal to three clock cycles, the second read address RAB [i] is input to the second search table 22B simultaneously with the second read valid signal REB [i], so that the first read address [i ] Is a signal delayed by Td.
Further, if Td varies and the second read
また、図4では、第2エントリ情報EDB[i]を読み出すための信号である第2読出有効信号REB[i]と、第2読出アドレスRAB[i]とが、第2テーブルメモリに同時に入力される例が示されているが、同時入力ではないメモリ、例えば、第2読出有効信号REB[i]を第2読出アドレスRAB[i]より所定のサイクルだけ先に入力する必要があるメモリを第2テーブルメモリとして使用することも可能である。この場合は、第2読出回路23Bは、メモリによって規定された信号入力方法に従って、第2読出有効信号REB[i]や第2読出アドレスRAB[i]を生成することになる。
In FIG. 4, the second read valid signal REB [i] and the second read address RAB [i], which are signals for reading the second entry information EDB [i], are simultaneously input to the second table memory. In this example, a memory that is not simultaneously input, for example, a memory that needs to input the second read enable signal REB [i] a predetermined cycle before the second read address RAB [i]. It can also be used as a second table memory. In this case, the
また、第2エントリ情報EDB[i]について、第2読出有効信号REB[i]と第2読出アドレスRAB[i]によって読み出すのではなく、コマンドを用いてアクセスが行われるメモリの場合、第2読出回路23Bは、第2読出有効信号REB[i]が有効を示す場合に、第2読出アドレスRAB[i]の位置に記憶されたデータを読み出すための第2読出コマンド[i]を生成することとなる。
Further, the second entry information EDB [i] is not read by the second read enable signal REB [i] and the second read address RAB [i], but in the case of a memory that is accessed using a command, the second entry information EDB [i] The
図4において、第2エントリ情報EDB[i]は、第2読出有効信号REB[i]が有効時の第2読出アドレスRAB[i]の入力から2サイクル後に第2検索テーブル22Bから読み出されている。
この2サイクルの遅延は、前記第2テーブルメモリが入力したアドレス等の信号をラッチすることで生じる1クロックの遅延と、メモリ内のセルに記憶されているデータを出力する前にラッチするために生じる1クロックの遅延を合わせた値である。第2テーブルメモリの種類やメモリと前記第2読出回路23B等が別部品によって構成される装置の場合は、前記よりも大きい遅延となる可能性がある。
In FIG. 4, the second entry information EDB [i] is read from the second search table 22B after two cycles from the input of the second read address RAB [i] when the second read valid signal REB [i] is valid. ing.
This two-cycle delay is caused by a one-clock delay caused by latching a signal such as an address input to the second table memory, and a latch before outputting data stored in a cell in the memory. It is a value that combines the delay of one clock that occurs. In the case of a device in which the type of the second table memory, the memory, and the
なお、図4の第2エントリ情報EDB[i]を表す各箱内の数字はエントリ番号i(1〜16)を表しており、第2読出有効信号REB[i]が有効を示したエントリ5,7,10,12について、出力されている。
The numbers in each box representing the second entry information EDB [i] in FIG. 4 represent the entry numbers i (1 to 16), and the
[第1の実施の形態の効果]
このように、本実施の形態では、比較回路3nが、エントリiの第1エントリ情報EDA[i]および第2エントリ情報EDB[i]をフレーム情報FDnと比較する際、まず前記第1エントリ情報EDA[i]を前記フレーム情報FDnと比較することにより、前記第1エントリ情報EDA[i]が前記フレーム情報FDnと適合するか否か判定して、前記第2エントリ情報EDB[i]の読出要否を示す読出判定結果RJnとして前記第2読出回路23Bへ出力し、当該判定により得られた第1適合判定結果CJAn[i]が適合を示す場合には、前記第2エントリ情報EDB[i]を前記フレーム情報FDnと比較することにより、前記第2エントリ情報EDB[i]が前記フレーム情報FDnと適合するか否か判定し、当該判定により得られた第2適合判定結果CJB[i]が適合を示す場合には、当該エントリiのエントリ番号、前記第1エントリ情報EDA[i]の一部、または前記第2エントリ情報EDB[i]の一部を、適合エントリと対応する検索結果SRnとするようにしたものである。
[Effect of the first embodiment]
Thus, in the present embodiment, when the
また、第2読出回路23Bが、前記比較回路3nから出力された前記読出判定結果RJnが読み出しありを示す場合には、前記第2検索テーブル22Bからの前記第2エントリ情報EDB[i]の読み出しを行い、前記読出判定結果RJnが読み出しなしを示す場合には、前記第2検索テーブル22Bからの前記第2エントリ情報EDB[i]の読み出しを行わないようにしたものである。
Further, when the
これにより、第1エントリ情報EDA[i]とフレーム情報FDnとの比較の結果、残りのエントリ情報である第2エントリ情報EDB[i]を読み出す必要があるか否かが判断され、前記読み出しが必要な場合に限って、第2エントリ情報EDBが読み出されることになる。このため、一部のエントリ情報(第1エントリ情報EDA)のみを読み出すエントリと、全てのエントリ情報(第1エントリ情報EDA+第2エントリ情報EDB)を読み出すエントリの2通りの場合が生じる。 Thereby, as a result of the comparison between the first entry information EDA [i] and the frame information FDn, it is determined whether or not the second entry information EDB [i], which is the remaining entry information, needs to be read. Only when necessary, the second entry information EDB is read out. For this reason, there are two cases: an entry that reads only a part of entry information (first entry information EDA) and an entry that reads all entry information (first entry information EDA + second entry information EDB).
したがって、従来構成では、全エントリについて全てのエントリ情報を読み出していたのに対し、本実施の形態では、読み出すエントリ情報のビット数を削減することができる。このため、入力フレームFINに応じたフレーム処理を決めるための検索処理に用いる検索条件として、例えばVLAN IDに加えて宛先IPアドレスと宛先TCPポート番号とを組み合わせた場合など、エントリ情報のビット数が増大した場合でも、読み出すエントリ情報のビット数の増大を抑制することができ、結果としてフレーム検索処理に要する消費電力の増加を抑制することが可能となる。 Therefore, in the conventional configuration, all entry information is read for all entries, whereas in this embodiment, the number of bits of entry information to be read can be reduced. For this reason, as a search condition used for search processing for determining frame processing according to the input frame FIN, for example, when the destination IP address and the destination TCP port number are combined in addition to the VLAN ID, the number of bits of the entry information is Even if it increases, it is possible to suppress an increase in the number of bits of entry information to be read, and as a result, it is possible to suppress an increase in power consumption required for frame search processing.
[第1の実施の形態の動作例]
次に、本実施の形態にかかるフレーム検索処理装置10の動作例について説明する。
ここでは、フレーム情報抽出部11から入力されるフレーム情報FDとして、フレーム検索処理装置10が入力した入力フレームFINのIPヘッダ内に格納されている送信元IPアドレスと宛先IPアドレスを含む場合を例として取り上げて説明する。
[Operation Example of First Embodiment]
Next, an operation example of the frame
Here, as an example, the frame information FD input from the frame
フレーム情報FDには、必ずしも送信元IPアドレスと宛先IPアドレスが含まれている必要はない。また、他のヘッダ情報、例えばMACアドレス、VLAN ID、VLAN優先度、フレームタイプ、IP上位層のプロトコル番号、フレーム長やパケット長、TCPやUDPのポート番号、IPヘッダ内のToS(Type of Service)値などの情報の一部が含まれていてもよい。また、フレームを入力したポート番号や、フレームに対する別の検索結果など、ヘッダ情報以外が、フレーム情報FDに含まれていてもよい。
上記フレーム情報FDに対する検索を行う場合の、第1エントリ情報EDAと第2エントリ情報EDBの例を、以下に説明する。
The frame information FD does not necessarily include the source IP address and the destination IP address. Other header information such as MAC address, VLAN ID, VLAN priority, frame type, IP upper layer protocol number, frame length or packet length, TCP or UDP port number, ToS (Type of Service in IP header) ) A part of information such as a value may be included. Further, the frame information FD may include information other than the header information such as the port number to which the frame is input and another search result for the frame.
An example of the first entry information EDA and the second entry information EDB when searching for the frame information FD will be described below.
[ケース1]
第1エントリ情報EDA=エントリ有効フラグ・フレーム種別;IPv4かIPv6かを示すフラグ
第2エントリ情報EDB=エントリに適合するための送信元IPアドレスと宛先IPアドレス
[Case 1]
First entry information EDA = entry valid flag / frame type; flag indicating IPv4 or IPv6 second entry information EDB = source IP address and destination IP address for conforming to entry
通常、検索テーブルの全てのエントリが使用されるのではなく、装置の通信状態に応じて、使用されるエントリの数が増減する。このような場合、使用中のエントリと未使用のエントリの各エントリ番号は不規則となるため、エントリ番号によって使用中か未使用かを判断するのではなく、検索条件にエントリ有効を加え、適合の判定はエントリが有効(=使用中のエントリ)である場合に限るようにする。 Normally, not all entries in the search table are used, but the number of entries used increases or decreases depending on the communication state of the apparatus. In such a case, each entry number of the entry in use and the entry that is not used becomes irregular. Therefore, instead of judging whether the entry is in use or not in use, the entry condition is added to the search condition, and the entry is matched. This determination is made only when the entry is valid (= entry in use).
また、装置がIPv4とIPv6の両方に対応することが要求される場合があるが、このような場合、検索テーブルの各エントリには、IPv4あるいはIPv6のいずれか一方に対する検索条件を記述することになる。検索対象となるフレーム(IPパケット)は、IPv4もしくはIPv6のいずれか一方であるため、IPv6のフレームでは、IPv4用のエントリが適合することはなく、逆に、IPv4のフレームでは、IPv6用のエントリが適合することはない。 In some cases, the device is required to support both IPv4 and IPv6. In such a case, each entry of the search table describes a search condition for either IPv4 or IPv6. Become. Since the frame (IP packet) to be searched is either IPv4 or IPv6, the IPv4 entry does not match in the IPv6 frame. Conversely, in the IPv4 frame, the IPv6 entry Will not fit.
本実施の形態では、第1エントリ情報EDAに、エントリ有効であるか否かを示すエントリ有効フラグを含むようにすることで、エントリが有効な場合に限って、第2エントリ情報EDBを読み出す。つまり、第2検索テーブル読出判定において、前記エントリ有効フラグが有効を示す場合に第2検索テーブル読出ありと判定する。これにより、無効なエントリ(=未使用のエントリ)の第2エントリ情報EDBは、第2検索テーブル22Bから読み出されないので、無効なエントリが多いほど、読み出されるエントリ情報のビット数を削減することができる。 In the present embodiment, the first entry information EDA includes the entry validity flag indicating whether or not the entry is valid, so that the second entry information EDB is read only when the entry is valid. That is, in the second search table read determination, when the entry valid flag indicates valid, it is determined that the second search table is read. Thereby, the second entry information EDB of the invalid entry (= unused entry) is not read from the second search table 22B. Therefore, the more invalid entries, the smaller the number of bits of the read entry information. Can do.
さらに、第1エントリ情報EDAに、IPv4フレームを対象としたエントリであるかIPv6フレームを対象としたエントリであるか否かを示すフレーム種別を含むようにすることで、前記エントリのフレーム種別と検索対象フレームのフレーム種別が一致する場合に限って、第2検索テーブル読出ありと判定し、第2エントリ情報EDBを読み出す。これにより、IPv4のフレームを検索する場合には、IPv6用の第2エントリ情報EDBは検索テーブルから読み出されない。同様に、IPv6のフレームを検索する場合には、IPv4用の第2エントリ情報EDBは検索テーブルから読み出されない。 Furthermore, the first entry information EDA includes a frame type indicating whether the entry is for an IPv4 frame or an entry for an IPv6 frame. Only when the frame types of the target frames match, it is determined that the second search table has been read, and the second entry information EDB is read. Accordingly, when searching for an IPv4 frame, the second entry information EDB for IPv6 is not read from the search table. Similarly, when searching for an IPv6 frame, the IPv4 second entry information EDB is not read from the search table.
例えば、1/2のエントリが未使用エントリであり、1/4がIPv4用のエントリ、残り1/4がIPv6用のエントリであり、IPv4のフレームとIPv6のフレームの割合が同じである場合、従来構成であれば、1エントリあたりの読み出しビット数が260ビット(=エントリ有効フラグ1ビット+フレーム種別1ビット+送信元IPアドレス128ビット+宛先IPアドレス128ビット)であったところが、本例により、82ビット(=エントリ有効フラグ1ビット+フレーム種別1ビット+(送信元IPアドレス32ビット+宛先IPアドレス32ビット)/4+(送信元IPアドレス128ビット+宛先IPアドレス128ビット)/4)に削減できる。
For example, when 1/2 entry is an unused entry, 1/4 is an entry for IPv4, the remaining 1/4 is an entry for IPv6, and the ratio of the IPv4 frame to the IPv6 frame is the same. In the conventional configuration, the number of read bits per entry is 260 bits (= entry
[ケース2]
第1エントリ情報EDA=エントリ適用優先度
第2エントリ情報EDB=エントリに適合するための送信元IPアドレスと宛先IPアドレスと各アドレスのマスク長
[Case 2]
First entry information EDA = entry application priority second entry information EDB = source IP address, destination IP address and mask length of each address for conforming to entry
各エントリに適用優先度を指定して、検索条件が適合と判定されたエントリが複数存在していた場合は、それらのエントリのうち適用優先度が最も高いエントリを採用する、という検索処理を行う装置がある。
例えば、宛先IPアドレスがある範囲(IPx〜IPy)にあるフレームについては廃棄するが、例外的に、前記範囲内にある特定の宛先IPアドレス(IPz)のフレームについては通過させたい、といった場合である。この場合、前者に対するエントリの適用優先度よりも、後者に対するエントリの適用優先度を高くすることで前記が可能となる。
When there is a plurality of entries for which the search conditions are determined to be appropriate, specifying an application priority for each entry, a search process is performed in which the entry with the highest application priority is adopted among those entries. There is a device.
For example, a frame in which a destination IP address is in a certain range (IPx to IPy) is discarded, but exceptionally, a frame having a specific destination IP address (IPz) in the range is desired to pass. is there. In this case, the above can be achieved by making the entry application priority for the latter higher than the entry application priority for the former.
適用優先度を指定できない装置で、これと同じ検索結果SRを得るためには、宛先IPアドレスがIPxから(IPz−1)の範囲にあるフレームを廃棄するエントリ、宛先IPアドレスが(IPz+1)からIPyの範囲にあるフレームを廃棄するエントリ、宛先IPアドレスがIPzのフレームを通過させるエントリのうち、少なくとも3個のエントリが必要となる。 In order to obtain the same search result SR with an apparatus for which the application priority cannot be specified, an entry for discarding a frame whose destination IP address is in the range of IPx to (IPz-1), and the destination IP address from (IPz + 1) At least three entries are required among an entry for discarding a frame in the IPy range and an entry for allowing a frame having a destination IP address of IPz to pass.
適用優先度を付加した検索条件に対して検索を行う方法は、最初に適合判定したエントリの適用優先度とエントリ番号を比較回路3nが一時記憶しておき、その後に適合判定したエントリが見つかった場合には、そのエントリの適用優先度と、一時記憶していた適用優先度とを比較し、前者の方が高い場合は、一時記憶していたエントリ番号と適用優先度を前者のエントリ番号と適用優先度に更新し、全エントリについて適合判定を終えるか上限の適用優先度を持つエントリを見つけるまで、これを繰り返す。
In the method of performing a search with respect to a search condition to which application priority is added, the application priority and entry number of the entry determined to be compatible first are temporarily stored in the
ここで、第1エントリ情報EDAをエントリの適用優先度とし、検索開始から適合と判定されたエントリが見つかっていない場合、または、一時記憶している適用優先度よりも、第1エントリ情報EDAが示す適用優先度の方が高い場合に限って、第2エントリ情報EDBを読み出す。つまり、第2検索テーブル読出判定において、前記のように検索開始から適合と判定されたエントリが見つかっていないか一時記憶している適用優先度よりも、第1エントリ情報EDAが示す適用優先度の方が高いときに第2検索テーブル読出ありと判定する。これにより、適用優先度が既に見つけたエントリよりも低いエントリについては、第2検索テーブル22Bから第2エントリ情報EDBを読み出されなくなる。 Here, the first entry information EDA is set as the application priority of the entry, and when the entry determined to be suitable from the start of search is not found, or the first entry information EDA exceeds the temporarily stored application priority. The second entry information EDB is read only when the application priority shown is higher. That is, in the second search table read determination, the application priority indicated by the first entry information EDA is higher than the application priority that is temporarily stored as to whether an entry determined to be suitable from the start of search is found as described above. When it is higher, it is determined that the second search table is read. As a result, the second entry information EDB is not read from the second search table 22B for entries whose application priority is lower than the already found entry.
例えば、各エントリの適用優先度がランダムで適合と判定されるエントリが任意の1個である場合、平均的にはエントリ数の1/2を検索した時点で適合と判定されるエントリが見つかり、その後に検索したエントリの1/2が適合と判定されるエントリよりも適用優先度が高いエントリであるため、全エントリの25%について、第2エントリ情報EDBの読み出しが行われない。 For example, when the application priority of each entry is random and the number of entries that are determined to be suitable is one, an entry that is determined to be compatible is found on average when 1/2 of the number of entries is searched, Since 1/2 of the retrieved entries are entries having higher application priority than the entry determined to be compatible, the second entry information EDB is not read for 25% of all entries.
したがって、従来構成であれば、1エントリあたりの読み出しビット数が82ビット(=適用優先度8ビット+送信元IPアドレス32ビット+宛先IPアドレス32ビット+送信元IPアドレスのマスク長5ビット+宛先IPアドレスのマスク長5ビット)となる。
これに対して、本例によれば、1個のフレームを検索するときの1エントリあたりの検索テーブルからの平均読み出しビット数は、63.5ビット(=適用優先度8ビット+(送信元IPアドレス32ビット+宛先IPアドレス32ビット+送信元IPアドレスのマスク長5ビット+宛先IPアドレスのマスク長5ビット)*0.75)に削減できる。すなわち、1個のフレームを検索するとき検索テーブルから読み出されるビット数の平均値は、63.5bit*Ne(Neはエントリ数)となる。
Therefore, in the conventional configuration, the number of read bits per entry is 82 bits (=
On the other hand, according to this example, the average number of read bits from the search table per entry when searching for one frame is 63.5 bits (=
[ケース3]
第1エントリ情報EDA=第2エントリ情報EDBから算出されたハッシュ値
第2エントリ情報EDB=エントリに適合するための送信元IPアドレスと宛先IPアドレス
[Case 3]
First entry information EDA = Hash value calculated from second entry information EDB Second entry information EDB = Source IP address and destination IP address for conforming to entry
ハッシュ法を利用した検索手法があるが、この検索手法の一般的な実装では、エントリ情報に対して所定のハッシュ演算を施してエントリ情報のハッシュ値を得て、前記ハッシュ値に応じて決められた検索テーブルのエントリに、前記エントリ情報を記憶しておく。そして、フレーム情報FDの入力時に、前記フレーム情報FDに前記ハッシュ演算を施して得たフレーム情報FDのハッシュ値を用いて、適合可能性のある検索テーブルのエントリを限定し、前記限定されたエントリについてのみ、フレーム情報FDとエントリ情報とを用いた適合判定を行う。 There is a search method using a hash method, but in a general implementation of this search method, a predetermined hash operation is performed on the entry information to obtain a hash value of the entry information, which is determined according to the hash value. The entry information is stored in the search table entry. At the time of inputting the frame information FD, the hash value of the frame information FD obtained by performing the hash operation on the frame information FD is used to limit the search table entries that can be matched, and the limited entry Only for, conformity determination is performed using the frame information FD and entry information.
しかし、このような検索手法では、エントリ情報のハッシュ値が格納できるエントリを限定するため、ハッシュ値が衝突する(同一ハッシュ値で異なるエントリ情報がある)場合に格納できるエントリがなくなる可能性があるという問題があった。 However, in such a search method, the entries that can store the hash value of the entry information are limited. Therefore, if the hash values collide (they have different entry information with the same hash value), there is a possibility that there are no entries that can be stored. There was a problem.
本実施の形態によれば、第2エントリ情報EDBをエントリに適合するための送信元IPアドレスと宛先IPアドレスとし、第1エントリ情報EDAを前記第2エントリ情報EDBに所定のハッシュ演算を施して得た第2エントリ情報EDBのハッシュ値とする。フレーム情報FDを入力したとき、前記フレーム情報FDに前記所定のハッシュ演算を施してフレーム情報FDのハッシュ値を求めた後に検索を開始する。 According to the present embodiment, the second entry information EDB is used as a transmission source IP address and a destination IP address for matching the entry, and the first entry information EDA is subjected to a predetermined hash operation on the second entry information EDB. The hash value of the obtained second entry information EDB is used. When the frame information FD is input, the frame information FD is subjected to the predetermined hash calculation to obtain a hash value of the frame information FD, and then the search is started.
比較回路3nは、第1検索テーブル22Aから読み出された第1エントリ情報EDAである第2エントリ情報EDBのハッシュ値と、前記フレーム情報FDのハッシュ値が一致するか否かの適合判定を行う。さらに、前記適合判定結果が適合(ハッシュ値が一致)の場合に限って、第2エントリ情報EDBを読み出す。つまり、第2検索テーブル読出判定において、フレーム情報FDのハッシュ値と第2エントリ情報EDBのハッシュ値が一致する場合に、第2検索テーブル読出ありと判定する。これにより、一般的はハッシュ法の実装と同様に、ハッシュ値に基づいて検索テーブルからの読み出しを限定できる。さらに、一般的はハッシュ法の実装の課題が解消され、エントリ情報のハッシュ値によって格納できるエントリが限定されない。
The
例えば、エントリ数が256でありハッシュ値のビット数が8の場合、各エントリのハッシュ値(ランダム)とフレーム情報FDのハッシュ値(ランダム)が一致する確率は1/2^8であり、256個の各エントリでの前記発生は各々独立事象であるため、平均1回の第2検索テーブル22Bの読み出しが発生する。したがって、1エントリあたりの読み出しビット数は8.25ビット(=ハッシュ値8ビット+(送信元IPアドレス32ビット+宛先IPアドレス32ビット)*1/256)となり、全エントリについて送信元IPアドレスと宛先IPアドレスを読み出した場合の1エントリあたりの読み出しビット数である64ビットよりも削減することができる。
For example, when the number of entries is 256 and the number of bits of the hash value is 8, the probability that the hash value (random) of each entry matches the hash value (random) of the frame information FD is 1/2 ^ 8. Since the occurrence of each entry is an independent event, reading of the second search table 22B occurs once on average. Therefore, the number of read bits per entry is 8.25 bits (=
なお、エントリ情報である送信元IPアドレスと宛先IPアドレスを表すビット列のうち、予め定められた部分ビット列、例えば送信元IPアドレスの下位側8ビットが、エントリ間で異なる場合が多いという特徴を持っている場合は、前記部分ビット列を第1エントリ情報EDAとし、残りのビット列、前記例では送信元IPアドレスの上位側24ビットと宛先IPアドレスを第2エントリ情報EDBとする。 Of the bit strings representing the source IP address and destination IP address that are entry information, a predetermined partial bit string, for example, the lower 8 bits of the source IP address, is often different between entries. The partial bit string is the first entry information EDA, and the remaining bit string, in the example, the upper 24 bits of the source IP address and the destination IP address are the second entry information EDB.
これにより、第1エントリ情報EDAとしてハッシュ値を用いた場合と同様に、検索テーブルからの読み出しを限定できる効果が得られる。さらに、この方法では、ハッシュ値の演算が不要であり、かつ、ハッシュ値を記憶するためのメモリが不要であるため、1エントリあたりの読み出しビット数の削減に加えて、ハッシュ値の演算やハッシュ値を記憶するためのメモリの回路規模を削減できる。 As a result, as in the case where a hash value is used as the first entry information EDA, an effect that reading from the search table can be limited is obtained. Furthermore, since this method does not require a hash value calculation and does not require a memory for storing the hash value, in addition to reducing the number of read bits per entry, the hash value calculation and hash The circuit scale of the memory for storing values can be reduced.
上記の例では、1エントリあたりの読み出しビット数は8.22ビット(=送信元IPアドレスの下位側8ビット+(送信元IPアドレスの上位側24ビット+宛先IPアドレス32ビット)*1/256)となり、第1検索テーブル22Aのメモリ量と第2検索テーブル22Bのメモリ量の合計は16384ビット(=(送信元IPアドレスの下位側8ビット+送信元IPアドレスの上位側24ビット+宛先IPアドレス32ビット)*256)であるのに対して、ハッシュ値を用いた場合のメモリは前記に加えてハッシュ値を記憶する分、つまり、2048ビット(ハッシュ値8ビット*256)が必要であるため、11%程度のメモリ量を削減できる効果がある。
In the above example, the number of read bits per entry is 8.22 bits (= the lower 8 bits of the source IP address + (the upper 24 bits of the source IP address + the 32 bits of the destination IP address) * 1/256 The total memory amount of the first search table 22A and the memory amount of the second search table 22B is 16384 bits (= (the lower 8 bits of the source IP address + the upper 24 bits of the source IP address + the destination IP) Address is 32 bits) * 256), but in the case of using a hash value, in addition to the above, the memory needs to store the hash value, that is, 2048 bits (hash
なお、上記の例では、第2エントリ情報EDBの例として送信元IPアドレスと宛先IPアドレスを取り上げたが、前記以外の適用も可能である。第2エントリ情報EDBとしては、IPアドレスにMACアドレスやVLAN IDなどを組み合わせや、TCP/UDPのポート番号などであってもよい。また、ハッシュ値を第2エントリ情報EDBのビット列全体に対するハッシュ演算によって得るのではなく、第2エントリ情報EDBを表す全ビット列のうち一致判定の対象となる部分ビット列に対するハッシュ演算の結果であってもよい。 In the above example, the source IP address and the destination IP address are taken up as an example of the second entry information EDB, but other applications are possible. The second entry information EDB may be a combination of an IP address with a MAC address or VLAN ID, or a TCP / UDP port number. In addition, the hash value is not obtained by the hash operation on the entire bit string of the second entry information EDB, but may be the result of the hash operation on the partial bit string to be matched among all the bit strings representing the second entry information EDB. Good.
また、全ビットがマスクの対象となりうる場合は、第1エントリ情報EDAに有効フラグを加えておき、前記フラグによって第1エントリ情報EDAのハッシュ値が無効を示す場合には、必ず第2エントリ情報EDBを第2検索テーブル22Bから読み出すようにする。これにより、ハッシュ値によって検索テーブルからの読み出しを限定できないような検索条件(ハッシュ演算の対象となる第2エントリ情報EDBのビット列の少なくとも一部のビット値がマスクされる検索条件)が指定されたエントリについては、前記ハッシュ値に基づく読み出し限定を解除することができる。 If all bits can be masked, a valid flag is added to the first entry information EDA, and if the hash value of the first entry information EDA indicates invalidity, the second entry information is always included. The EDB is read from the second search table 22B. As a result, a search condition in which reading from the search table cannot be limited by the hash value (a search condition in which at least a part of the bit values of the bit string of the second entry information EDB to be hashed is masked) is specified. For the entry, the read limitation based on the hash value can be released.
したがって、ハッシュ値によって検索テーブルからの読み出しを限定できるエントリと限定できないエントリが混在する検索テーブルに対しても、前者のエントリに対して1エントリあたりの読み出しビット数を削減できる。
例えば、宛先IPアドレスと送信元IPアドレスの両方に基づいて適合判定するエントリに加えて、宛先IPアドレスのみに基づいて適合判定する一部のエントリが含まれる検索処理である。
Therefore, the number of read bits per entry can be reduced with respect to the former entry, even for a search table in which entries that can be read from the search table are limited by hash values and entries that cannot be limited.
For example, the search processing includes a part of entries that are determined to be compatible based only on the destination IP address in addition to the entries that are determined to be compatible based on both the destination IP address and the source IP address.
この場合、ハッシュ演算の対象を宛先IPアドレスと送信元IPアドレスを合わせたビット列として前記ハッシュ値を第1エントリ情報EDAとして採用する。さらに、宛先IPアドレスのみに基づいて適合判定するエントリ、すなわち、送信元IPアドレスがマスクされたエントリのみに、無効を示す有効フラグの値を指定する。このときの第1エントリ情報EDAに含まれるハッシュ値は任意の値でよい。さらに、第2エントリ情報EDBに、適合と判定するための宛先IPアドレスと送信元IPアドレスを指定する。すなわち、宛先IPアドレスのみに基づいて適合判定するエントリでは宛先IPアドレスのみを指定する。 In this case, the hash value is adopted as the first entry information EDA with the hash calculation target as a bit string combining the destination IP address and the source IP address. Furthermore, the value of the validity flag indicating invalidity is specified only for the entry that is determined to be compatible based only on the destination IP address, that is, the entry whose source IP address is masked. The hash value included in the first entry information EDA at this time may be an arbitrary value. Further, a destination IP address and a source IP address for determining conformity are designated in the second entry information EDB. That is, only the destination IP address is specified in the entry for determining the conformity based only on the destination IP address.
これにより、宛先IPアドレスと送信元IPアドレスの両方に基づいて適合判定するエントリに対しては、フレーム情報FDの宛先IPアドレスと送信元IPアドレスとから求めたハッシュ値と第1エントリ情報EDAのハッシュ値が一致した場合にのみ、第2エントリ情報EDBが検索テーブルから読み出されるとともに、宛先IPアドレスのみに基づいて適合判定するエントリに対しては、前記ハッシュ値の一致不一致によらず、第2エントリ情報EDBが検索テーブルから読み出される。
したがって、ハッシュ値を算出可能な検索条件を持ったエントリと、前記が不可能なエントリが混在している場合にも、前者のエントリに対して1エントリあたりの読み出しビット数を削減できる。
As a result, for entries for which conformity is determined based on both the destination IP address and the source IP address, the hash value obtained from the destination IP address and source IP address of the frame information FD and the first entry information EDA Only when the hash values match, the second entry information EDB is read from the search table, and the second entry information EDB is determined for the entry whose conformity is determined based only on the destination IP address, regardless of whether the hash values match or not. Entry information EDB is read from the search table.
Therefore, even when an entry having a search condition capable of calculating a hash value and an entry incapable of the above are mixed, the number of read bits per entry can be reduced with respect to the former entry.
[ケース4]
第1エントリ情報EDA=エントリに適合するための宛先IPアドレスとそのマスク長と第2エントリ情報EDBの読出フラグ、
第2エントリ情報EDB=エントリに適合するための送信元IPアドレスとそのマスク長
[Case 4]
First entry information EDA = destination IP address for conforming to the entry, its mask length, read flag of the second entry information EDB,
Second entry information EDB = source IP address and mask length for conforming to entry
宛先IPアドレスのみに対する条件により適合と判定するエントリと、宛先IPアドレスと送信元IPアドレスの両方に対する条件により適合と判定するエントリの、両方がある検索を行う装置がある。例えば、ルータ装置の経路テーブルは、通常は、宛先IPアドレスのみを条件として適合判定するエントリによって占められているが、ソースルーティングを行う場合には、宛先IPアドレスと送信元IPアドレスの両方を条件として適合判定を行うエントリが加わる。
このような場合に、全エントリについて、宛先IPアドレスと送信元IPアドレスの両方を検索テーブルから読み出す装置では、宛先IPアドレスのみを条件とするエントリが多数を占める場合に、無駄な送信元IPアドレスの読み出しが問題となる。
There is a device that performs a search that includes both an entry that is determined to be suitable based on a condition for only the destination IP address and an entry that is determined to be compatible based on a condition for both the destination IP address and the source IP address. For example, the route table of the router device is normally occupied by entries that are determined to be compatible only with the destination IP address as a condition. However, when performing source routing, both the destination IP address and the source IP address are specified as conditions. As a result, an entry for determining conformity is added.
In such a case, in an apparatus that reads both the destination IP address and the source IP address from the search table for all entries, if there are a large number of entries conditioned only on the destination IP address, the source IP address is wasted Reading becomes a problem.
本実施の形態によれば、第1エントリ情報EDAを、エントリに適合するための宛先IPアドレスとそのマスク長、すなわち、IPアドレスを表すビット列のうち一致判定対象とならない;判定がマスクされる最下位ビットからのビット数と、第2エントリ情報EDBの読出フラグ、すなわち、第2エントリ情報EDBを読み出すか否かを表すフラグとし、第2エントリ情報EDBを、エントリに適合するための送信元IPアドレスとそのマスク長、とする。 According to the present embodiment, the first entry information EDA is not a match determination target among the destination IP address for matching the entry and its mask length, that is, the bit string representing the IP address; The number of bits from the lower bits and a read flag of the second entry information EDB, that is, a flag indicating whether or not to read the second entry information EDB, and the source IP for adapting the second entry information EDB to the entry Address and its mask length.
つまり、第2検索テーブル読出判定において、フレーム情報FDと、第1エントリ情報EDAによって表された宛先IPアドレスに対する条件を満たし、かつ、第2エントリ情報EDBの読出フラグが読み出しありを示す場合に限って、第2エントリ情報EDBを読み出す。
これにより、宛先IPアドレスと送信元IPアドレスの両方を検索テーブルから読み出す必要があるエントリについてのみ、送信元IPアドレスを第2検索テーブル22Bから読み出すこととなるため、無駄な送信元IPアドレスの読み出しが発生しない。
That is, in the second search table read determination, only when the condition for the destination IP address represented by the frame information FD and the first entry information EDA is satisfied, and the read flag of the second entry information EDB indicates that there is a read. Then, the second entry information EDB is read.
As a result, only the entry for which both the destination IP address and the source IP address need to be read from the search table is read from the second search table 22B, so that the useless source IP address is read. Does not occur.
例えば、全エントリのうち1/2のエントリが宛先IPアドレスのみを条件とするエントリで残りのエントリが宛先IPアドレスに加えて送信元IPアドレスも条件とするエントリの場合、従来構成であれば、1エントリあたりの読み出しビット数は74ビット(=送信元IPアドレス32ビット+宛先IPアドレス32ビット+送信元IPアドレスのマスク長5ビット+宛先IPアドレスのマスク長5ビット、送信元IPアドレスを検索条件に加えない場合は送信元IPアドレスのマスク長を32とする)となる。
For example, if half of all entries are entries that require only the destination IP address and the remaining entries are conditions that also include the source IP address in addition to the destination IP address, The number of read bits per entry is 74 bits (=
本例によれば、56.5ビット(=宛先IPアドレス32ビット+宛先IPアドレスのマスク長5ビット+第2エントリ情報EDBの読出フラグ1ビット+(送信元IPアドレス32ビット+送信元IPアドレスのマスク長5ビット)/2)に削減できる。
According to this example, 56.5 bits (=
なお、上記の例では、第1エントリ情報EDAと第2エントリ情報EDBの例として宛先IPアドレスと送信元IPアドレスを取り上げたが、前記以外への適用も可能である。
例えばVLAN IDのみを検索条件とするエントリと、VLAN IDに加えて送信元MACアドレスも検索条件となるエントリが混在する検索テーブルの場合、第1エントリ情報EDAとしてVLAN IDを指定し第2エントリ情報EDBとして送信元MACアドレスを指定することになる。
In the above example, the destination IP address and the source IP address are taken up as examples of the first entry information EDA and the second entry information EDB, but application to other than the above is also possible.
For example, in the case of a search table in which an entry having only a VLAN ID as a search condition and an entry having a search source MAC address in addition to the VLAN ID as a search condition are mixed, the VLAN ID is designated as the first entry information EDA and the second entry information The source MAC address is designated as EDB.
このように、全てのエントリに共通の検索条件を表すエントリ情報(前記例ではVLAN ID)を第1エントリ情報EDAとし、一部のエントリについて付加された検索条件を表すエントリ情報(前記例では送信元MACアドレス)を第2エントリ情報EDBとすることで、検索処理に第2エントリ情報EDBを必要としないエントリについては第2エントリ情報EDBを検索テーブルから読み出さないので、1エントリあたりの読み出しビット数を削減できる。 In this way, entry information representing search conditions common to all entries (VLAN ID in the above example) is the first entry information EDA, and entry information representing search conditions added to some entries (sent in the above example) By setting the original MAC address) as the second entry information EDB, the second entry information EDB is not read from the search table for entries that do not require the second entry information EDB for the search process, so the number of read bits per entry Can be reduced.
[ケース5]
第1エントリ情報EDA=エントリに適合するためのIPアドレスとエントリ情報種別;宛先・送信元を識別するフラグ
第2エントリ情報EDB=エントリに適合するためのIPアドレス(第1エントリ情報EDAに指定されなかった方のIPアドレス;宛先ならば送信元で送信元ならば宛先)
[Case 5]
1st entry information EDA = IP address and entry information type for conforming to entry; flag for identifying destination / source 2nd entry information EDB = IP address for conforming to entry (specified in first entry information EDA IP address of the one that did not exist; if the destination, the source, if the source, the destination
多数の端末から少数のサーバへのフレームを特定するためのエントリが検索テーブルに複数含まれる場合であれば、サーバのIPアドレスを表す宛先IPアドレスはエントリ間で同一になるのに対して、端末のIPアドレスを表す送信元IPアドレスはエントリ間で異なる。一方、逆向きのフレームを特定するエントリであれば、宛先IPアドレスはエントリ間で異なる一方で、送信元IPアドレスは同一となる。 If a plurality of entries for specifying frames from a large number of terminals to a small number of servers are included in the search table, the destination IP address representing the IP address of the server is the same between the entries. The source IP address representing the IP address differs between entries. On the other hand, in the case of an entry specifying a frame in the reverse direction, the destination IP address is different between entries, while the source IP address is the same.
このように、複数のヘッダ情報に対する条件を含むエントリ情報を記憶する検索テーブルでは、そのエントリを限定しやすい、すなわち他のエントリと異なっているヘッダ情報と、そうでないヘッダ情報の両方を含み、かつ、エントリによってそのエントリを限定しやすいヘッダ情報が変わる。前記の例では、送信元IPアドレスであるか宛先IPアドレスであるかがエントリによって違う。 Thus, in the search table that stores entry information including conditions for a plurality of header information, it is easy to limit the entry, that is, includes both header information that is different from other entries and header information that is not, and Depending on the entry, header information that makes it easy to limit the entry changes. In the above example, the entry IP address is different from the entry IP address or the destination IP address.
本実施の形態によれば、第1エントリ情報EDAとして、そのエントリを限定しやすい(他のエントリと異なっている)ヘッダ情報に関する値を指定することによって、第2エントリ情報EDBを読み出す機会を減らすことができる。なお、エントリによって前記ヘッダ情報が異なるので、第1エントリ情報EDAに指定したヘッダ情報の種別を表すエントリ情報種別を加える。 According to the present embodiment, the first entry information EDA is designated with a value related to header information that is easy to limit the entry (different from other entries), thereby reducing the chance of reading the second entry information EDB. be able to. Since the header information differs depending on the entry, an entry information type indicating the type of header information specified in the first entry information EDA is added.
例として、4台のサーバと32台の端末があり、各サーバから各端末へのフレームを特定する128個(=4*32)のエントリと、各端末から各サーバへのフレームを特定する128個(=32*4)のエントリの合計256個のエントリを検索テーブルに記憶する場合、従来構成であれば、1エントリあたりの読み出しビット数は64ビット(=送信元IPアドレス32ビット+宛先IPアドレス32ビット)であった。
As an example, there are 4 servers and 32 terminals, 128 (= 4 * 32) entries that specify frames from each server to each terminal, and 128 that specify frames from each terminal to each server. When a total of 256 entries (= 32 * 4) are stored in the search table, the number of read bits per entry is 64 bits (=
本例によれば、エントリ毎に読み出される第1エントリ情報EDA、すなわち、端末側IPアドレス32ビット+エントリ情報種別1ビットに、第1エントリ情報EDAに適合する確率、すなわち端末側IPアドレスが一致する確率である4(サーバの台数分)/256エントリで読み出される、第2エントリ情報EDB(サーバ側IPアドレス32ビット)を加えた、33.5ビット(=第1エントリ情報EDA33ビット+第2エントリ情報EDB32ビット*4/256)となる。
According to this example, the first entry information EDA read for each entry, that is, the terminal-
なお上記では、第1エントリ情報EDAとして、そのエントリを限定しやすい(他のエントリと異なっている)ヘッダ情報に関する値を指定したが、第1エントリ情報EDAのビット数を削減するために、前記ヘッダ情報に関する値に対して所定のハッシュ演算を施して得たハッシュ値を用いることも可能である。 In the above description, a value related to header information that is easy to limit the entry (different from other entries) is specified as the first entry information EDA, but in order to reduce the number of bits of the first entry information EDA, It is also possible to use a hash value obtained by performing a predetermined hash operation on a value related to header information.
[第2の実施の形態]
次に、図5を参照して、本発明の第2の実施の形態にかかるフレーム検索処理装置10について説明する。図5は、第2の実施の形態にかかる検索処理部の要部を示すブロック図である。
第1の実施の形態では、図3に示したように、第1検索テーブル22A用の第1テーブルメモリと第2検索テーブル22B用の第2テーブルメモリの2個のテーブルメモリM1,M2を使用する場合を例として説明した。本実施の形態では、1個の共通テーブルメモリM0に、第1検索テーブル22Aと第2検索テーブル22Bの両方を実現する場合について説明する。
[Second Embodiment]
Next, with reference to FIG. 5, a frame
In the first embodiment, as shown in FIG. 3, two table memories M1 and M2 of the first table memory for the first search table 22A and the second table memory for the second search table 22B are used. The case where it does is demonstrated as an example. In the present embodiment, a case where both the first search table 22A and the second search table 22B are realized in one common table memory M0 will be described.
本実施の形態において、第1読出回路23Aは、クロックに基づき時間の経過に合わせてエントリi(i=1〜Ne)を変えながら、第1検索テーブル22Aが記憶する第1エントリ情報EDA[i]を次々と読み出し、各比較回路3n(n=1〜N)に分配する。具体的には、前記共通テーブルメモリの各アドレスa(a=0〜Ne−1)に第1エントリ情報EDA[a+1]を記憶する。さらに、前記読み出すアドレスaを時間の経過に合わせて、0〜Ne−1まで順番に変える。なお前記方法において、アドレスaが最後のエントリNe−1に達したときは0に戻るものとする。
In the present embodiment, the
ここで、第1エントリ情報EDA[i]の読み出しから、第2エントリ情報EDB[i]の読み出しまでの時間差Td内に、読み進むエントリの数をCdとすると、前記共通テーブルメモリの各アドレスaには、第1エントリ情報EDA[a+1]を記憶しておくとともに、第2エントリ情報EDB[a+1−Cd]を記憶しておく。なお、a+1−Cdの値が負の場合は第2エントリ情報EDB[Ne+a+1−Cd]を記憶する。 Here, if the number of entries to be read is Cd within the time difference Td from the reading of the first entry information EDA [i] to the reading of the second entry information EDB [i], each address a of the common table memory Stores the first entry information EDA [a + 1] and the second entry information EDB [a + 1−Cd]. When the value of a + 1−Cd is negative, the second entry information EDB [Ne + a + 1−Cd] is stored.
また、第1読出回路23Aによって、アドレスaに記憶された第1エントリ情報EDA[a+1]が読み出されると同時に、第2エントリ情報EDB[a+1−Cd]が共通テーブルメモリから読み出される。
つまり、時間Td前に第1検索テーブル22Aから読み出された第1エントリ情報EDA[a+1−Cd]と同じエントリで第2検索テーブル22Bから読み出された第2エントリ情報EDB[a+1−Cd]が、エントリ(a+1)の第1エントリ情報EDA[a+1]と合わせて読み出されることになる。
Further, the first entry information EDA [a + 1] stored in the address a is read by the
That is, the second entry information EDB [a + 1−Cd] read from the second search table 22B with the same entry as the first entry information EDA [a + 1−Cd] read from the first search table 22A before the time Td. Are read together with the first entry information EDA [a + 1] of the entry (a + 1).
ただし、前記共通テーブルメモリとして、第2エントリ情報EDB[i](i=1〜Ne)に対する読出実施の有無を示す信号である読出制御信号を入力可能なメモリを用いる。また、前記読出制御信号として、全ての比較回路3n(n=1〜N)からの読出判定結果RJn[i]を示す信号に対する論理演算の結果、すなわち、少なくとも1個の読出判定結果RJが第2検索テーブル読出ありを示すとき読出制御信号が読出ありを示す値とする演算の結果を用いる。
However, as the common table memory, a memory capable of inputting a read control signal that is a signal indicating whether or not the second entry information EDB [i] (i = 1 to Ne) is read is used. Further, as the read control signal, the result of the logical operation on the signals indicating the read determination results RJn [i] from all the
つまり、エントリ(a+1)の第1エントリ情報EDA[a+1]とエントリ(a+1−Cd)の第2エントリ情報EDB[a+1−Cd]とを共通テーブルメモリから読み出すために、共通テーブルメモリに読み出しアドレスaを入力するが、これと併せて、エントリ(a+1−Cd)に対する読出判定結果RJn[a+1−Cd]のなかに第2検索テーブル読出ありを示す場合に、エントリ(a+1−Cd)の第2エントリ情報EDB[a+1−Cd]を読み出すための読出制御信号を共通テーブルメモリに入力することになる。 That is, in order to read the first entry information EDA [a + 1] of the entry (a + 1) and the second entry information EDB [a + 1−Cd] of the entry (a + 1−Cd) from the common table memory, the read address a In addition to this, when the second search table read is indicated in the read determination result RJn [a + 1-Cd] for the entry (a + 1-Cd), the second entry of the entry (a + 1-Cd) A read control signal for reading the information EDB [a + 1−Cd] is input to the common table memory.
図5の構成例と、前述した図3の構成例との主な差異は、第1検索テーブル22Aと第2検索テーブル22Bが1個の検索テーブル用の共通テーブルメモリM0に収容されている点である。また、前記に伴って、図3に記載されていた第2読出アドレスRAB[i]と前記信号を生成する第2読出アドレス生成部41Bが不要となって削除されている。
The main difference between the configuration example of FIG. 5 and the configuration example of FIG. 3 described above is that the first search table 22A and the second search table 22B are accommodated in a common table memory M0 for one search table. It is. As a result, the second read address RAB [i] and the second read
また、図3の構成例では、第1読出アドレスRAA[i]を遅延させて前記第2読出アドレスRAB[i]を生成していたが、図5の構成例では、前記第2読出アドレスRAB[i]が不要となることに伴って、第1読出回路23Aから第2読出回路23Bへの信号である第1読出アドレスRAA[i]が削除されている。
In the configuration example of FIG. 3, the first read address RAA [i] is delayed to generate the second read address RAB [i]. However, in the configuration example of FIG. 5, the second read address RAB [i] is generated. As [i] becomes unnecessary, the first read address RAA [i], which is a signal from the
共通テーブルメモリの読出アドレス[i]が指すワードには、エントリ番号がiの第1エントリ情報EDA[i]とともに、エントリ番号がI’=i−Cd(i≦CdのときはI’=Ne−Cd+i)の第2エントリ情報EDB[I’]を格納する。前記Cdは時間Td内に共通テーブルメモリから読み出されるエントリの数である。このCdは、固定値でありTdがクロック3サイクル分の時間であり、1サイクル毎に1エントリが共通テーブルメモリから読み出される場合にはCd=3となる。 The word indicated by the read address [i] of the common table memory includes the first entry information EDA [i] with the entry number i and the entry number I ′ = i−Cd (I ′ = Ne when i ≦ Cd). -Cd + i) second entry information EDB [I '] is stored. Cd is the number of entries read from the common table memory within time Td. Cd is a fixed value, Td is a time corresponding to three clock cycles, and Cd = 3 when one entry is read from the common table memory every cycle.
なお、図4の説明で示した、第1読出アドレスRAA[i]と第1読出有効信号REA[i]を、第1検索テーブル22Aが入力してから、第1エントリ情報EDA[i]を出力するまでの、検索テーブル読出にかかる遅延量が変動する場合は、各比較回路3n内あるいは第2読出回路23B内において、前記検索テーブル読出にかかる遅延量の変動を吸収することによって、第1読出信号RA[i]を共通テーブルメモリに入力する時点から第2読出信号RBを前記共通テーブルメモリに入力するまでの時間差を固定値とする必要がある。
本実施の形態において、上記以外の構成については、第1の実施の形態と同様であり、ここでの説明は省略する。
The first entry information EDA [i] is input after the first search table 22A inputs the first read address RAA [i] and the first read enable signal REA [i] shown in the description of FIG. When the delay amount required for reading the search table varies until the output, the first delay time is absorbed in each
In the present embodiment, configurations other than those described above are the same as those in the first embodiment, and a description thereof is omitted here.
[第2の実施の形態の動作]
次に、図6を参照して、本実施の形態にかかる検索処理部12の動作について説明する。図6は、第2の実施の形態にかかる検索処理部の動作を示すタイムチャートであり、比較回路3nの個数Nが2の場合を例として、検索処理部12内の各信号について時間の経過(左から右)に伴う変化が示されている。
[Operation of Second Embodiment]
Next, the operation of the
図6には、図4の第1読出アドレスRAA[i]と第2読出アドレスRAB[i]がなく、図4の第1読出アドレスRAA[i]が読出アドレスRAD[i]に代わっている。 6 does not have the first read address RAA [i] and the second read address RAB [i] in FIG. 4, and the first read address RAA [i] in FIG. 4 is replaced with the read address RAD [i]. .
図6において、第1読出有効信号REA[i]が有効時、第1読出アドレスRAA[i]=i−1の入力から2サイクル後に第1検索テーブル22Aから第1エントリ情報EDA[i]が読み出される。また、第2読出有効信号REB[i]が有効時、その時点から2サイクル後に第2エントリ情報EDB[i]が出力される。
読出アドレスRAD[i]=i−1のワードには、第1エントリ情報EDA[i]と第2エントリ情報EDB[i−Cd](Cd=3)が格納されているので、読出アドレスaのワードから第2エントリ情報EDB[a−2]が読み出される。
In FIG. 6, when the first read valid signal REA [i] is valid, the first entry information EDA [i] is obtained from the first search table 22A after two cycles from the input of the first read address RAA [i] = i-1. Read out. When the second read valid signal REB [i] is valid, the second entry information EDB [i] is output two cycles after that point.
Since the first entry information EDA [i] and the second entry information EDB [i-Cd] (Cd = 3) are stored in the word of the read address RAD [i] = i−1, the read address a Second entry information EDB [a-2] is read from the word.
前記2サイクルの遅延は、前記共通テーブルメモリが入力したアドレス等の信号をラッチすることで生じる1クロックの遅延と、メモリ内のセルに記憶されているデータを出力する前にラッチするために生じる1クロックの遅延を合わせた値である。
本実施の形態において、上記以外の動作については、第1の実施の形態と同様であり、ここでの説明は省略する。
The two-cycle delay is caused by a one-clock delay caused by latching a signal such as an address input to the common table memory and a latch before outputting data stored in a cell in the memory. This value is a sum of delays of one clock.
In this embodiment, operations other than those described above are the same as those in the first embodiment, and a description thereof is omitted here.
[第2の実施の形態の効果]
このように、本実施の形態は、前記第1検索テーブル22Aおよび前記第2検索テーブル22Bを含み、エントリiに対応する前記第1エントリ情報および前記第2検索テーブル22Bの前記第2エントリ情報をそれぞれEDA[i]およびEDB[i]とし、EDA[i]の読み出しからEDB[i]の読み出しまでの期間に読み進むエントリ数をCdとした場合、エントリiに対応するアドレスに、EDA[i]とEDB[i−Cd]とを記憶する1つの共通テーブルメモリM0を備え、前記第1読出回路23Aが、前記共通テーブルメモリM0内の前記各エントリから巡回的にEDA[i]とEDB[i−Cd]とを読み出して前記比較回路3nへ出力するための共通読出信号RAを前記共通テーブルメモリM0へ出力し、前記第2読出回路23Bが、前記比較回路3nから出力された前記読出判定結果RJが読み出しありを示す場合に、前記第2検索テーブル22Bからの読出有効を示す前記第2読出信号RBを前記共通テーブルメモリM0へ出力し、前記共通テーブルメモリM0が、前記第1読出回路23Aからの前記共通読出信号RAに応じて、当該共通読出信号RAと対応するアドレスからEDA[i]を読み出して出力するとともに、前記第2読出信号RBが前記第2検索テーブル22Bからの読出有効を示す場合にのみ、前記アドレスからEDB[i−Cd]を読み出して出力するようにしたものである。
[Effect of the second embodiment]
Thus, the present embodiment includes the first search table 22A and the second search table 22B, and the first entry information corresponding to the entry i and the second entry information of the second search table 22B are If EDA [i] and EDB [i] are respectively set, and the number of entries read during the period from reading EDA [i] to reading EDB [i] is Cd, EDA [i ] And EDB [i-Cd] are stored in the common table memory M0, and the
これにより、前記第1検索テーブル22Aおよび前記第2検索テーブル22Bごとに、第1テーブルメモリM1および第2テーブルメモリM2を用いる場合と比較し、これらのテーブルメモリの各々に備わっていたアドレスデコーダ回路、すなわち、アドレスを入力したとき前記アドレスに対応するメモリセルを選択するための信号を生成する回路に代わって、1個の共通テーブルメモリM0のアドレスデコーダ回路で済ませることができるため、回路規模を削減することができる。 Thereby, each of the first search table 22A and the second search table 22B is compared with the case where the first table memory M1 and the second table memory M2 are used, and the address decoder circuit provided in each of these table memories. That is, when an address is input, instead of a circuit that generates a signal for selecting a memory cell corresponding to the address, the address decoder circuit of one common table memory M0 can be used. Can be reduced.
[第3の実施の形態]
次に、図7を参照して、本発明の第3の実施の形態にかかるフレーム検索処理装置10について説明する。図7は、第3の実施の形態にかかる検索処理部の構成を示すブロック図である。
第1の実施の形態では、第1読出回路23Aからの第1読出アドレスRAAに基づいて、第2読出回路23Bで、第2読出アドレスRABを生成する場合を例として説明した。本実施の形態では、第1エントリ情報EDA内に格納されている、当該第1エントリ情報EDAと対応する第2エントリ情報EDBを示す前記第2検索テーブル22B上の第2エントリ番号に基づいて、第2読出回路23Bで、第2読出アドレスRABを生成する場合について説明する。
[Third Embodiment]
Next, a frame
In the first embodiment, the case where the second read address RAB is generated by the
本実施の形態において、検索処理部12には、主な回路部として、フレーム情報振分回路21、第1検索テーブル22A、第2検索テーブル22B、第1読出回路23A、第2読出回路23B、N個の比較回路3n(n=1〜N;Nは2以上の自然数)、および検索結果合流回路24が設けられている。
In the present embodiment, the
第1検索テーブル22Aは、Ne個(Neは1以上の自然数)のエントリi(i=1〜Ne)を有し、各エントリiに第1エントリ情報EDA[i]を記憶する。
第2検索テーブル22Bは、Ne’個(Ne’は1以上の自然数)のエントリj(j=1〜Ne’)を有し、各エントリjに第2エントリ情報EDB[j]を記憶する。
The first search table 22A has Ne (N is a natural number of 1 or more) entries i (i = 1 to Ne), and the first entry information EDA [i] is stored in each entry i.
The second search table 22B has Ne ′ (Ne ′ is a natural number of 1 or more) entries j (j = 1 to Ne ′), and stores second entry information EDB [j] in each entry j.
第1検索テーブル22Aは、第1読出回路23Aから第1読出信号RAを入力し、前記信号が示すアドレスから前記信号が示すタイミングで、記憶している第1エントリ情報EDA[i]を読み出す。
同様に、第2検索テーブル22Bは、第2読出回路23Bから第2読出信号RBを入力し、前記信号が示すアドレスから前記信号が示すタイミングで、記憶している第2エントリ情報EDB[i]を読み出す。
The first search table 22A receives the first read signal RA from the
Similarly, the second search table 22B receives the second read signal RB from the
第1の実施の形態では、第1検索テーブル22Aのエントリiに記憶された第1エントリ情報EDA[i]と、エントリ番号iが同じ第2検索テーブル22Bのエントリiに記憶された第2エントリ情報EDB[i]とのセットが、従来技術におけるエントリ情報に相当していたが、本実施の形態では、第1検索テーブル22Aに記憶された第1エントリ情報EDA[i]の中に、セットとなるべき第2検索テーブル22Bのエントリ番号が含まれる。 In the first embodiment, the second entry stored in the entry i of the second search table 22B having the same entry number i as the first entry information EDA [i] stored in the entry i of the first search table 22A. Although the set with the information EDB [i] corresponds to the entry information in the prior art, in the present embodiment, the set is included in the first entry information EDA [i] stored in the first search table 22A. The entry number of the second search table 22B to be included is included.
つまり、前記第1エントリ情報EDA[i]が表現する第1検索条件とフレーム情報FDとが適合し、かつ、前記第1エントリ情報EDA[i]に第2検索テーブル22Bのエントリ番号である第2のエントリ番号ENB[i]が含まれるとき、第2エントリ情報EDB[第2のエントリ番号ENB[i]]が表現する第2検索条件と前記フレーム情報FDが適合した場合に、フレームに適合する検索条件を持つエントリを見つけたことになる。
したがって、従来の検索テーブルにおける、エントリiのエントリ情報を、第1検索テーブル22Aの第1エントリ情報EDA[i](第2のエントリ番号ENB[i]を除く)と第2検索テーブル22Bの第2エントリ情報EDB[第2のエントリ番号ENB[i]]とに分割したことになる。
That is, the first search condition expressed by the first entry information EDA [i] matches the frame information FD, and the first entry information EDA [i] is the entry number of the second search table 22B. When the second entry number ENB [i] is included, and the second search condition expressed by the second entry information EDB [second entry number ENB [i]] matches the frame information FD, the frame conforms to the frame. An entry having a search condition to be found is found.
Therefore, the entry information of entry i in the conventional search table is the first entry information EDA [i] (excluding the second entry number ENB [i]) in the first search table 22A and the second entry in the second search table 22B. This is divided into 2-entry information EDB [second entry number ENB [i]].
フレーム情報振分回路21からフレーム情報FDn(n=1〜N)を入力した比較回路3nは、前記フレーム情報FDnを入力した時点で検索を開始し、前記フレーム情報FDnと、第1読出回路23Aが第1検索テーブル22Aから読み出したエントリi(i=1〜Ne)の第1エントリ情報EDA[i]とに基づいて、前記フレーム情報FDnが前記第1エントリ情報EDA[i]が表す検索条件に適合するか否かの第1適合判定を行って、第1適合判定結果CJAn[i]を得る。なお、前記第1エントリ情報EDA[i]には、第2のエントリ番号ENB[i]が指定されているとする。
The
さらに、前記比較回路3nは、第2検索テーブル22Bから前記第2のエントリ番号ENB[i]の第2エントリ情報EDB[第2のエントリ番号ENB[i]]を読み出すか否かの第2検索テーブル読出判定を、前記第1適合判定結果CJAに基づいて行うとともに、第2読出回路23Bに前記読出判定結果RJn[i]を出力する。
Further, the
本実施の形態では、第1適合判定結果CJAn[i]が適合を示す場合に、第2検索テーブル22Bから第2エントリ情報EDB[第2のエントリ番号ENB[i]]を読み出す(第2検索テーブル読出あり)と判定し、前記第1適合判定結果CJAn[i]が不適合を示す場合に、第2検索テーブル22Bから第2エントリ情報EDB[第2のエントリ番号ENB[i]]を読み出さない(第2検索テーブル読出なし)と判定する。すなわち、本例では、第1適合判定とは別に第2検索テーブル読出判定を行う必要はなく、第1適合判定結果CJAn[i]を用いて読出判定結果RJn[i]を得ることができる。 In the present embodiment, when the first conformity determination result CJAn [i] indicates conformity, the second entry information EDB [second entry number ENB [i]] is read from the second retrieval table 22B (second retrieval If the first conformity determination result CJAn [i] indicates nonconformity, the second entry information EDB [second entry number ENB [i]] is not read from the second search table 22B. It is determined that the second search table is not read. That is, in this example, it is not necessary to perform the second search table read determination separately from the first suitability determination, and the read determination result RJn [i] can be obtained using the first suitability determination result CJAn [i].
ここで、前記比較回路3nがフレーム情報FDnと第1エントリ情報EDA[i]とに基づいて、第2読出回路23Bに第2検索テーブル読出ありを示す読出判定結果RJn[i]を出力した場合、第2読出回路23Bは第2検索テーブル22Bから第2エントリ情報EDB[第2のエントリ番号ENB[i]]を読み出して、前記比較回路3nに入力する。このとき、前記比較回路3nは、前記フレーム情報FDと、前記第2エントリ情報EDB[第2のエントリ番号ENB[i]]とに基づいて、前記フレーム情報FDnが前記第2エントリ情報EDB[第2のエントリ番号ENB[i]]に適合するか否かの第2適合判定を行って、第2適合判定結果CJB[i]を得る。
Here, when the
前記比較回路3nは、前記第1適合判定結果CJAn[i]と前記第2適合判定結果CJB[i]に基づいて、エントリiの検索条件が前記フレーム情報FDnに適合するか否かを判定する統合適合判定を行う。また、前記統合適合判定により適合と判断されたエントリが見つかった時点、あるいは、全てのエントリについてフレーム情報FDnとの判定を終えた時点で、前記比較回路3nは検索を終了し、検索結果SRnを出力する。
The
なお、第1エントリ情報EDAまたは第2エントリ情報EDBにエントリの適用優先度を含み、統合適合判定により適合とされたエントリのなかで前記エントリの適用優先度が最も高いエントリを見つける例では、統合適合判定により適合とされたエントリが1個見つかった時点で検索を終了するのではなく、全エントリについて統合適合判定を終えるか、上限の適用優先度を持つエントリが見つかった場合にのみ、検索を終了する。 In the example in which the entry entry priority is included in the first entry information EDA or the second entry information EDB, and the entry having the highest entry priority is found among the entries determined to be compatible by the integrated suitability determination, The search is not terminated when one entry that is determined to be conforming by the conformity determination is found, but only when the integrated conformance determination is completed for all entries or when an entry having an upper limit application priority is found. finish.
前記比較回路3nは、前記統合適合判定によって得られた結果(例えば前記判定において適合したエントリの番号iや前記エントリの第2エントリ情報EDB[i]に含まれる結果を示す情報;通過/廃棄を示す情報や送出先を示すポート番号など)を、検索結果SRnとして、検索結果合流回路24に対して出力する。
The
前記比較回路3nは、エントリiについて、第1エントリ情報EDA[i]が第1検索テーブル22Aから読み出された後に得られる第1適合判定結果CJAn[i]と、その後の第2エントリ情報EDB[i]が第2検索テーブル22Bから読み出された後に得られる第2適合判定結果CJB[i]に基づいて、前記統合適合判定を行う。
第2適合判定結果CJB[i]を得る前に、次のエントリ(i+1)に対する第1適合判定を行って、第1適合判定結果CJAn[i+1]を得る場合は、エントリiに対する第1適合判定結果CJAn[i]とともにエントリ(i+1)に対する第1適合判定結果CJAn[i+1]を、統合適合判定を行うまで一時的に保持しておく。
The
Before obtaining the second conformity determination result CJB [i], when the first conformity determination is performed for the next entry (i + 1) to obtain the first conformity determination result CJAn [i + 1], the first conformity determination for the entry i The first match determination result CJAn [i + 1] for the entry (i + 1) together with the result CJAn [i] is temporarily held until the integrated match determination is performed.
つまり、第1適合判定結果CJAn[i]を、第2適合判定結果CJB[i]を得て統合適合判定を行うまで保持する必要があるが、前記保持期間中に得た次エントリ以後の第1適合判定結果CJAも合わせて保持する。
これにより、エントリの更新間隔を、第1適合判定結果CJAn[i]を得てから第2適合判定結果CJB[i]を得るまでの時間以上とする必要がなくなり、検索処理速度を向上できる。
That is, the first conformity determination result CJAn [i] needs to be retained until the second conformity determination result CJB [i] is obtained and the integrated conformity determination is performed, but the first entry after the next entry obtained during the retention period is required. 1 Conformity determination result CJA is also held.
As a result, it is not necessary to set the entry update interval longer than the time from when the first conformity determination result CJAn [i] is obtained until the second conformity determination result CJB [i] is obtained, and the search processing speed can be improved.
上記の全てのエントリについてフレーム情報との判定を終えた時点を知る判定終了特定方法の例として、フレーム情報FDn(n=1〜N)を比較回路3nが入力した時点からの経過時間を前記比較回路3nが測っておき、前記経過時間が予め定められた時間Tsに達したタイミングを用いる方法がある。この判定終了特定方法は、各エントリの処理時間が固定値でありエントリ数も固定値であることから、全エントリを検索するのにかかる時間も固定値となることを利用した方法である。また別の方法として、フレーム情報FDn(n=1〜N)を比較回路3nが入力した時点からの統合適合判定の回数を計数し、その回数がN(全エントリ数)に達したタイミングを用いることもできる。
As an example of the determination end specifying method for knowing the time point when the determination with the frame information for all the above entries is completed, the time elapsed since the
第1読出回路23Aは、時間の経過に合わせてエントリi(i=1〜Ne)を変えながら、第1検索テーブル22Aが記憶する第1エントリ情報EDA[i]を次々と読み出し、第2のエントリ番号ENB[i]を除く前記第1エントリ情報EDA[i]を、各比較回路3n(n=1〜N)に分配する。また、前記第2のエントリ番号ENB[i]を、第2読出回路23Bに対して出力する。
The
第1エントリ情報EDAの読み出し方法の例として、第1検索テーブル22Aを第1テーブルメモリによって構成し、前記第1テーブルメモリの各アドレスa1(a1=0〜Ne−1)に第1エントリ情報EDA[a1+1]を記憶し、前記読み出すアドレスa1を時間の経過に合わせて、0〜Ne−1まで順番に変える方法がある。なお、この方法において、アドレスa1が最後のエントリNe−1に達したときは0に戻るものとする。ここで、各比較回路3n(n=1〜N)が出力する検索処理中であるか否かを示す検索状態SSnを、第1読出回路23Aが入力して、全ての比較回路3nが検索処理を行っていない期間中の、前記読み出しを行わないことにより、第1検索テーブル22Aの読み出しが不要な期間の消費電力を削減できる。
As an example of a method of reading the first entry information EDA, the first search table 22A is constituted by a first table memory, and the first entry information EDA is assigned to each address a1 (a1 = 0 to Ne-1) of the first table memory. There is a method of storing [a1 + 1] and sequentially changing the read address a1 from 0 to Ne-1 as time passes. In this method, it is assumed that the address a1 returns to 0 when it reaches the last entry Ne-1. Here, the
第2読出回路23Bは、第1読出回路23Aから第2のエントリ番号ENB[i](i=1〜Ne)を入力する毎に、第2検索テーブル22Bが記憶する第2エントリ情報EDB[第2のエントリ番号ENB[i]]を読み出し、各比較回路3n(n=1〜N)に分配する。ただし、第1エントリ情報EDA[i]の読み出しから予め定められた一定の時間差Tdの後に、第2エントリ情報EDB[[第2のエントリ番号ENB[i]]の読み出しを行う。
Each time the
また、前記第2エントリ情報EDB[第2のエントリ番号ENB[i]]の読み出しを行うのは、少なくとも1個の比較回路3nから第2検索テーブル読出ありを示す読出判定結果RJn[i]を入力した場合に限る。なお、検索処理を行っていない比較回路3nは、第2検索テーブル読出なしを示す読出判定結果RJn[i]を出力することで、比較回路3nが検索処理中であるか否かを区別する必要なく、各読出判定結果RJn[i](n=1〜N)に基づいて、第2エントリ情報EDB[第2のエントリ番号ENB[i]]の読み出し実施の有無を判定することができる。
The second entry information EDB [second entry number ENB [i]] is read from the read determination result RJn [i] indicating that the second search table is read from at least one
上記の時間差Tdは、(a)第1読出回路23Aが第1エントリ情報EDA[i](i=1〜Ne)の読み出しを開始してから比較回路3n(n=1〜N)に前記第1エントリ情報EDA[i]が入力されるまでの時間(=第1検索テーブル22Aの読み出しに要する時間+第1エントリ情報EDAを各比較回路3nに分配するのに要する時間)、(b)比較回路3n(n=1〜N)が第1エントリ情報EDA[i]を入力してから読出判定結果RJn[i]を第2読出回路23Bに出力するまでの時間(=第2検索テーブル読出判定に要する時間)、(c)第2読出回路23Bが全ての比較回路3n(n=1〜N)から読出判定結果RJn[i]を入力してから第2エントリ情報EDB[第2のエントリ番号ENB[i]]の読み出しを行うと判定して第2エントリ情報EDB[第2のエントリ番号ENB[i]]の読み出しを開始するまでの時間(=第2検索テーブル22Bの読み出し有無を判断するのに要する時間)、の和となる。
The time difference Td is as follows. (A) The
第2読出回路23Bは、第1読出回路23Aがエントリiの第1エントリ情報EDA[i]を読み出す時点からTdの遅延をおいて、各比較回路3n(n=1〜N)からの読出判定結果RJn[i]の中に第2検索テーブル読出ありを示すものが含まれる場合に、前記エントリiの第2エントリ情報EDB[第2のエントリ番号ENB[i]]を読み出す。
The
この読み出し方法の例として、第2検索テーブル22Bを第2テーブルメモリによって構成し、前記第2テーブルメモリの各アドレスa2(a2=0〜Ne’−1)に第2エントリ情報EDB[a2+1]を記憶し、前記読み出すアドレスa2を、第2のエントリ番号ENB[i]とする。さらに、前記第2テーブルメモリからの読出実施の有無を示す信号である読出制御信号として、読出判定結果RJn[i]を示す信号に対する論理演算(少なくとも1個の読出判定結果RJが第2検索テーブル読出ありを示すとき読出制御信号が読出ありを示す値とする演算)の結果を用いる。 As an example of this reading method, the second search table 22B is constituted by a second table memory, and the second entry information EDB [a2 + 1] is stored in each address a2 (a2 = 0 to Ne′−1) of the second table memory. The address a2 that is stored and read out is the second entry number ENB [i]. Further, as a read control signal that indicates whether or not reading from the second table memory is performed, a logical operation (at least one read determination result RJ is a second search table) for a signal indicating the read determination result RJn [i]. The result of an operation in which the read control signal is set to a value indicating read when the read is indicated is used.
次に、図8を参照して、本実施の形態にかかる第1読出回路23Aおよび第2読出回路23Bについて説明する。図8は、第3の実施の形態にかかる検索処理部の要部を示すブロック図である。
Next, the
図8に示すように、第1読出回路23Aは、第1読出アドレス生成部41A、第1読出有効生成部42A、および第2のエントリ番号分離部43Aを有している。
このうち、第1読出アドレス生成部41Aおよび第1読出有効生成部42Aは、前述した図3と同一であり、各々、クロックに合わせて、第1読出アドレスRAA[i]および第1読出有効信号REA[i]を生成して、第1検索テーブル22Aに出力し、第1エントリ情報EDA[i]を読み出す機能を有している。
As shown in FIG. 8, the
Among these, the first read
また、第2のエントリ番号分離部43Aは、前記第1検索テーブル22Aから読み出した第1エントリ情報EDA[i]を入力し、前記第1エントリ情報EDA[i]に含まれる第2のエントリRNB番号[i]を分離して第2読出回路23Bに出力する機能と、前記第1エントリ情報EDA[i]から前記第2のエントリ番号ENB[i]を分離した残りの部分を、第1エントリ情報EDA[i]として各比較回路3n(n=1〜N)に分配する機能とを有している。なお、前記第1検索テーブル22Aが出力した第1エントリ情報EDA[i]を第1読出回路23Aと各比較回路3nに分配する簡易的な構成であってもよい。
Further, the second entry
第2読出回路23Bは、第2読出アドレス生成部41Bと第2読出有効生成部42Bを有している。
このうち、第2読出有効生成部42Bは、図3と同一であり、各比較回路3n(n=1〜N)から読出判定結果RJn[i]を入力し、1個以上の読出判定結果RJn[i]が読出ありを示すとき、有効を示す第2読出有効信号REB[i]を出力する機能を有している。
また、第2読出アドレス生成部41Bは、第2のエントリ番号ENB[i]を入力し、前記番号を基に第2読出アドレスRAB[i]を生成して出力する機能を有している。
The
Among these, the second read
The second read
第2検索テーブル22Bは、各エントリjに第2エントリ情報EDB[j]を格納するが、前記エントリ番号jから、前記第2エントリ情報EDB[j]が記憶された、第2検索テーブル22Bの実態である第2テーブルメモリM2のアドレスを、簡単な演算によって生成することができる。
前記演算の例は、第2テーブルメモリのアドレス=j−1であり、前記例では、エントリ番号jの第2エントリ情報EDB[j]は、第2テーブルメモリのアドレス=j−1にあるワードに記憶される。なお、他の演算方法によってエントリ番号からアドレスを生成する方法であってもよい。前記例では、エントリ番号=第2のエントリ番号ENB[i]のとき、第2読出アドレス生成部41Bが第2検索テーブル22Bに出力する第2読出アドレスRAB[i]=第2のエントリ番号ENB[i]−1となる。
The second search table 22B stores the second entry information EDB [j] in each entry j. The second search table 22B stores the second entry information EDB [j] from the entry number j. The actual address of the second table memory M2 can be generated by a simple calculation.
The example of the calculation is the address of the second table memory = j−1. In the example, the second entry information EDB [j] of the entry number j is the word at the address of the second table memory = j−1. Is remembered. A method of generating an address from the entry number by another calculation method may be used. In the above example, when entry number = second entry number ENB [i], second read address RAB [i] = second entry number ENB output by second read
第1読出有効信号REA[i]と第1読出アドレスRAA[i]を第1検索テーブル22Aが入力してから時間Tdの経過後に、第2読出有効信号REB[i]が第2検索テーブル22Bに入力される。前記Tdは、第1読出アドレスRAA[i]と第1読出有効信号REA[i]を第1検索テーブル22Aが入力してから第1エントリ情報EDA[i]を出力するまでの遅延と、第2のエントリ番号分離部43Aが第1エントリ情報EDA[i]を入力してから各比較回路3nに第2のエントリ番号ENB[i]を除く前記第1エントリ情報EDA[i]を分配するまでの遅延と、比較回路3nが前記第1エントリ情報EDA[i]を入力してから前記入力に基づいて読出判定結果RJn[i]を出力するまでの遅延、第2読出有効生成部42Bが各比較回路3nから読出判定結果RJn[i]を入力してから前記に基づいて第2読出有効信号REB[i]を出力するまでの遅延と、の合計である。
After the first search table 22A inputs the first read valid signal REA [i] and the first read address RAA [i], the second read valid signal REB [i] is changed to the second search table 22B after the time Td has elapsed. Is input. The Td includes a delay from when the first search table 22A inputs the first read address RAA [i] and the first read valid signal REA [i] until the first entry information EDA [i] is output, Until the second
一方、第2読出アドレスRAB[i]を第2読出有効信号REB[i]と同時に入力することが求められる第2テーブルメモリの場合、第1読出有効信号REA[i]と第1読出アドレスRAA[i]を第1検索テーブル22Aが入力してから第2読出アドレスRAB[i]が第2検索テーブル22Bに入力されるまでの時間はTdとなる必要がある。このTdは、第1読出アドレスRAA[i]と第1読出有効信号REA[i]を第1検索テーブル22Aが入力してから第1エントリ情報EDA[i]を出力するまでの遅延と、第2のエントリ番号分離部43Aが前記第1エントリ情報EDA[i]を入力してから第2のエントリ番号ENB[i]を抽出して出力するまでの遅延と、第2読出アドレス生成部41Bが前記第2のエントリ番号ENB[i]を入力してから第2読出アドレスRAB[i]を出力するまでの遅延と、の合計である。
On the other hand, in the case of the second table memory in which the second read address RAB [i] is required to be input simultaneously with the second read valid signal REB [i], the first read valid signal REA [i] and the first read address RAA. The time from when [i] is input to the first search table 22A to when the second read address RAB [i] is input to the second search table 22B needs to be Td. The Td includes a delay from when the first search table 22A inputs the first read address RAA [i] and the first read valid signal REA [i] to when the first entry information EDA [i] is output, The second entry
[第3の実施の形態の動作]
次に、図9を参照して、本実施の形態にかかる検索処理部12の動作について説明する。図9は、第3の実施の形態にかかる検索処理部の動作を示すタイムチャートであり、比較回路3nの個数Nが2の場合を例として、検索処理部12内の各信号について時間の経過(左から右)に伴う変化が示されている。
[Operation of Third Embodiment]
Next, the operation of the
図9において、検索状態SSn(n=1,2)、第1読出有効信号REA[i]、第1読出アドレスRAA[i]、第1エントリ情報EDA[i]、読出判定結果RJn[i](n=1,2)の各信号、および第2読出有効信号REB[i]の各信号は、前述した図4と同一であり、ここでの説明は省略する。 In FIG. 9, the search state SSn (n = 1, 2), the first read valid signal REA [i], the first read address RAA [i], the first entry information EDA [i], the read determination result RJn [i] Each signal of (n = 1, 2) and each signal of the second read valid signal REB [i] are the same as those in FIG. 4 described above, and a description thereof is omitted here.
第2のエントリ番号ENB[i]は、第1検索テーブル22Aから読み出された第1エントリ情報EDA[i]に含まれる第2のエントリ番号ENB[i]を第2のエントリ番号分離部43Aが抽出して出力した信号であり、第1検索テーブル22Aへの第1読出有効信号REA[i]が有効時の第1読出アドレスRAA[i]の入力から2サイクル後に出力される。図9の例では、第1エントリ情報EDA[i]に、第2のエントリ番号ENB[i−1]の値が含まれている。
The second entry number ENB [i] is obtained by replacing the second entry number ENB [i] included in the first entry information EDA [i] read from the first search table 22A with the second entry
前記2サイクルの遅延は、前記第1テーブルメモリが入力したアドレス等の信号をラッチすることで生じる1クロックの遅延と、メモリ内のセルに記憶されているデータを出力する前にラッチするために生じる1クロックの遅延とを合わせた値であり、第1テーブルメモリの種類やメモリと前記第1読出回路23A等が別部品によって構成される装置の場合は、前記よりも大きい遅延となる可能性がある。また固定遅延ではなくメモリの状況(例えば外部からの前記メモリへのアクセスの有無など)によって前記遅延量が変動する構成も可能である。
The two-cycle delay is caused by a one-clock delay caused by latching a signal such as an address input to the first table memory and a latch before outputting data stored in a cell in the memory. This value is a combination of the generated delay of one clock, and in the case of a device in which the type of the first table memory and the memory and the
第2のエントリ番号分離部43Aが第1エントリ情報EDA[i]を入力してから、第2のエントリ番号ENB[i]を抽出して出力するまでの遅延は、本例ではクロック0サイクル分としている。これは、第1エントリ情報EDA[i]の予め定められたビット列を第2のエントリ番号ENB[i]として取り出す簡易な処理であるため、遅延なしと見なせる。
なお、図9の信号を表す各箱内の数字は信号値である第2のエントリ番号ENBi(1〜8;第2検索テーブル22Bのエントリ数=8)を表し、前記箱内の−の記号は第2エントリ情報EDBなし、すなわち第1エントリ情報EDAのみで判定可能なエントリであったことを意味する。
The delay from the input of the first entry information EDA [i] by the second entry
9 represents the second entry number ENBi (1 to 8; the number of entries in the second search table 22B = 8) which is a signal value, and the symbol “−” in the box represents the signal in FIG. Means that there is no second entry information EDB, that is, the entry can be determined only by the first entry information EDA.
また、図9の第1エントリ情報EDA[4],[9]に含まれる第2のエントリ番号ENB[4],[9]の値がともに5となっているように、第1検索テーブル22Aの各々異なるエントリから読み出されている第1エントリ情報EDAの各々に含まれた第2のエントリ番号ENBの値が、同じ値をとることも可能であり、第1検索テーブル22Aのエントリが異なっていても、第2検索テーブル22Bの同じエントリを参照することができる。すなわち、検索条件の一部が一致している複数のエントリがある場合に、そのエントリ情報を第2検索テーブル22Bに格納することで検索条件の縮約が可能となる。 Further, the first search table 22A is such that the values of the second entry numbers ENB [4] and [9] included in the first entry information EDA [4] and [9] in FIG. The values of the second entry numbers ENB included in the first entry information EDA read from the different entries can be the same, and the entries of the first search table 22A are different. Even in this case, the same entry in the second search table 22B can be referred to. In other words, when there are a plurality of entries in which a part of the search conditions match, the search conditions can be reduced by storing the entry information in the second search table 22B.
これらによって、第2検索テーブル22Bを、第1検索テーブル22Aのエントリ数よりも少ないエントリ数とすることが可能である。本例では、第1検索テーブル22Aのエントリ数=16に対して第2検索テーブル22Bのエントリ数=8としている。したがって、第2検索テーブル22Bのための第2テーブルメモリのメモリ量を削減することができる。 Thus, the number of entries in the second search table 22B can be made smaller than the number of entries in the first search table 22A. In this example, the number of entries in the second search table 22B = 8 with respect to the number of entries = 16 in the first search table 22A. Therefore, the memory amount of the second table memory for the second search table 22B can be reduced.
第2読出アドレスRAB[i]は、第2のエントリ番号ENB[i]に対応する第2テーブルメモリのアドレスであり、第2読出有効信号REB[i]が第2検索テーブル22Bに入力されるのと同時に、第2検索テーブル22Bに出力される。第2読出アドレスRAB[i]を前記第2読出有効信号REB[i]と同時に第2検索テーブル22Bに入力するために、第2読出アドレス生成部41Bは、第2のエントリ番号ENB[i]の入力から第2読出アドレスRAB[i]を出力するまでの遅延をクロック1サイクル分としている。
The second read address RAB [i] is an address of the second table memory corresponding to the second entry number ENB [i], and the second read valid signal REB [i] is input to the second search table 22B. At the same time, it is output to the second search table 22B. In order to input the second read address RAB [i] to the second search table 22B simultaneously with the second read valid signal REB [i], the second read
つまり、第1読出アドレスRAA[i]と第1読出有効信号REA[i]を第1検索テーブル22Aが入力してから、第1エントリ情報EDA[i]を出力するまでの遅延2サイクル、第2のエントリ番号分離部43Aが前記第1エントリ情報EDA[i]を入力してから第2のエントリ番号ENB[i]を抽出して出力するまでの遅延0サイクル、第2読出アドレス生成部41Bが前記第2のエントリ番号ENB[i]を入力してから第2読出アドレスRAB[i]を出力するまでの遅延1サイクル、の合計が、本例のTdの値3サイクルとなる。
In other words, the first read address RAA [i] and the first read valid signal REA [i] are input by the first search table 22A until the first entry information EDA [i] is output, the second cycle. 2 entry
なお、図9では、第2エントリ情報EDB[i]を読み出すための信号である、第2読出有効信号REB[i]と第2読出アドレスRAB[i]は、第2テーブルメモリに同時に入力される例を示している。しかし、同時入力ではないメモリ、例えば第2読出有効信号REB[i]を第2読出アドレスRAB[i]より所定のサイクルだけ先に入力する必要があるメモリ)を第2テーブルメモリとして使用することも可能であり、この場合は、第2読出回路23Bは、メモリによって規定された信号入力方法に従って、第2読出有効信号REB[i]や第2読出アドレスRAB[i]を生成することになる。
In FIG. 9, the second read valid signal REB [i] and the second read address RAB [i], which are signals for reading the second entry information EDB [i], are simultaneously input to the second table memory. An example is shown. However, a memory that is not simultaneously input, for example, a memory in which the second read enable signal REB [i] needs to be input a predetermined cycle before the second read address RAB [i] is used as the second table memory. In this case, the
また、第2読出有効信号REB[i]と第2読出アドレスRAB[i]によって読み出すのではなく、コマンドを用いてアクセスが行われるメモリの場合、第2読出回路23Bは、第2読出有効信号REB[i]が有効を示す場合に、第2読出アドレスRAB[i]の位置に記憶されたデータを読み出すための第2読出コマンド[i]を生成することとなる。
第2エントリ情報EDB[第2のエントリ番号ENB[i]]は、第2読出有効信号REB[i]が有効時の第2読出アドレスRAB[i]の入力から2サイクル後に第2検索テーブル22Bから読み出されたデータである、第2エントリ情報EDB[i]が出力さ
れる。
In the case of a memory that is accessed by using a command instead of reading by the second read valid signal REB [i] and the second read address RAB [i], the
The second entry information EDB [second entry number ENB [i]] is stored in the second search table 22B after two cycles from the input of the second read address RAB [i] when the second read valid signal REB [i] is valid. The second entry information EDB [i], which is the data read from, is output.
なお、前記2サイクルの遅延は、前記第2テーブルメモリが入力したアドレス等の信号をラッチすることで生じる1クロックの遅延と、メモリ内のセルに記憶されているデータを出力する前にラッチするために生じる1クロックの遅延を合わせた値である。第2テーブルメモリの種類やメモリと前記第2読出回路23B等が別部品によって構成される装置の場合は、前記よりも大きい遅延となる可能性がある。なお、図9の信号を表す各箱内の数字はエントリ番号i(1〜16)を表しており、第2読出有効信号REB[i]が有効を示したエントリ1=5,7,10,12について、出力されている。
The two-cycle delay is latched before outputting the data stored in the cells in the memory and the one-clock delay generated by latching the signal such as the address input to the second table memory. Therefore, it is a value obtained by adding a delay of 1 clock generated for the purpose. In the case of a device in which the type of the second table memory, the memory, and the
[第3の実施の形態の効果]
このように、本実施の形態は、前記第1エントリ情報EDAが、当該第1エントリ情報EDAと対応する前記第2エントリ情報EDBのエントリ番号を示す第2エントリ番号ENBを含み、前記第1読出回路23Aが、前記第1検索テーブル22Aから読み出された前記第1エントリ情報EDAから前記第2エントリ番号ENBを分離し、前記第2エントリ番号ENBを除いた前記第1エントリ情報EDAを前記比較回路3nへ出力するとともに、分離した前記第2エントリ番号ENBを前記第2読出回路23Bへ出力し、前記比較回路3nが、前記第1検索テーブル22Aに代えて、前記第1読出回路23Aから前記第2エントリ番号ENBを除いた前記第1エントリ情報EDAを入力し、前記第2読出回路23Bは、前記第1読出回路23Aからの前記第2エントリ番号ENBに基づき、前記第2読出信号RBを生成して前記第2検索テーブル22Bへ出力するようにしたものである。
[Effect of the third embodiment]
Thus, in the present embodiment, the first entry information EDA includes the second entry number ENB indicating the entry number of the second entry information EDB corresponding to the first entry information EDA, and the first read information The
これにより、第2エントリ情報EDBが不要であって、第1エントリ情報EDAのみで適合判定できるエントリがあるとき、前記エントリについては第2検索テーブル22Bのエントリを用意しなくとも済む。したがって、第2検索テーブル22Bのエントリ数は、第1検索テーブル22Aのエントリ数よりも少ないエントリ数で実現できるため、前記第2検索テーブル22Bの回路規模(メモリ量)を削減することができる。 Thereby, when the second entry information EDB is not necessary and there is an entry that can be determined to be compatible only with the first entry information EDA, it is not necessary to prepare an entry in the second search table 22B for the entry. Accordingly, since the number of entries in the second search table 22B can be realized with a smaller number of entries than the number of entries in the first search table 22A, the circuit scale (memory amount) of the second search table 22B can be reduced.
[第3の実施の形態の動作例]
次に、本実施の形態にかかるフレーム検索処理装置10の動作例について説明する。
ここでは、フレーム情報抽出部11から入力されるフレーム情報FDとして、フレーム検索処理装置10が入力した入力フレームFINのIPヘッダ内に格納されている送信元IPアドレスと宛先IPアドレスを含む場合を例として取り上げて説明する。
上記フレーム情報FDに対する検索を行う場合の、第1エントリ情報EDAと第2エントリ情報EDBの例を、以下に説明する。
[Operation Example of Third Embodiment]
Next, an operation example of the frame
Here, as an example, the frame information FD input from the frame
An example of the first entry information EDA and the second entry information EDB when searching for the frame information FD will be described below.
[ケース1]
第1エントリ情報EDA=エントリに適合するための宛先IPアドレスとそのマスク長と第2エントリ情報EDBの読出フラグと第2のエントリ番号ENB
第2エントリ情報EDB=エントリに適合するための送信元IPアドレスとそのマスク長
[Case 1]
First entry information EDA = Destination IP address for conforming to entry, its mask length, read flag of second entry information EDB, and second entry number ENB
Second entry information EDB = source IP address and mask length for conforming to entry
第1の実施の形態の[ケース4]に示したように、宛先IPアドレスのみに対する条件により適合と判定するエントリと、宛先IPアドレスと送信元IPアドレスの両方に対する条件により適合と判定するエントリの、両方がある検索を行う装置がある。例えば、宛先IPアドレスだけを見て廃棄判定するエントリと、宛先IPアドレスと送信元IPアドレスの両方を見て廃棄判定するエントリが混在するような検索テーブルの場合である。 As shown in [Case 4] of the first embodiment, an entry that is determined to be compatible based on a condition for only the destination IP address and an entry that is determined to be compatible based on a condition for both the destination IP address and the source IP address , There are devices that do both searches. For example, in the case of a search table in which entries that are discarded only by looking at the destination IP address and entries that are discarded by looking at both the destination IP address and the source IP address are mixed.
このように、全てのエントリに共通の検索条件を表すエントリ情報(前記例では宛先IPアドレスとそのマスク長)と、一部のエントリのみに追加される検索条件を表すエントリ情報(前記例では送信元IPアドレスとそのマスク長)とがある場合に、前者のエントリ情報を第1エントリ情報EDAとし、後者のエントリ情報を第2エントリ情報EDBとすることによって、後者のエントリ情報を必要としないエントリに対する適合判定を行うとき、検索テーブルから後者のエントリ情報を読み出さないので、検索テーブルの読み出しビット数を削減することができ、第1の実施の形態の[ケース4]と同様の効果が得られる。 Thus, entry information indicating search conditions common to all entries (destination IP address and its mask length in the above example) and entry information indicating search conditions added to only a part of the entries (transmitted in the above example) If the former entry information is the first entry information EDA and the latter entry information is the second entry information EDB, the entry information that does not require the latter entry information. Since the latter entry information is not read from the search table when the conformity determination is performed for, the number of read bits of the search table can be reduced, and the same effect as [Case 4] of the first embodiment can be obtained. .
さらに、第2エントリ情報EDBを記憶する第2検索テーブル22Bのエントリ数を、第1エントリ情報EDAを記憶する第1検索テーブル22Aのエントリ数より少なくなることが期待できるので、第2検索テーブル22Bに必要なメモリの量を、第1の実施の形態の[ケース4]のように、第1検索テーブル22Aと第2検索テーブル22Bのエントリ数が同数である場合と比較して、削減することができる。 Further, since the number of entries in the second search table 22B storing the second entry information EDB can be expected to be smaller than the number of entries in the first search table 22A storing the first entry information EDA, the second search table 22B The amount of memory necessary for the first search table 22A and the second search table 22B is reduced as compared to the case where the number of entries is the same as in [Case 4] of the first embodiment. Can do.
例えば、全エントリ(256エントリ)のうち1/2のエントリが宛先IPアドレスのみを条件とするエントリで残りのエントリが宛先IPアドレスに加えて送信元IPアドレスも条件とするエントリの場合、第1の実施の形態の検索処理部12であれば、1エントリあたりの平均読み出しビット数は、56.5ビット(=宛先IPアドレス32ビット+宛先IPアドレスのマスク長5ビット+第2エントリ情報EDBの読出フラグ1ビット+(送信元IPアドレス32ビット+送信元IPアドレスのマスク長5ビット)/2)となり、メモリ量は、19200ビット(=(送信元IPアドレス32ビット+宛先IPアドレス32ビット+送信元IPアドレスのマスク長5ビット+宛先IPアドレスのマスク長5ビット+第2エントリ情報EDBの読出フラグ1ビット)*256)となる。
For example, if half of all entries (256 entries) are entries that require only the destination IP address and the remaining entries are entries that also use the source IP address as a condition, the first entry In the
一方、本例では、1エントリあたりの平均読み出しビット数は、64.5ビット(=宛先IPアドレス32ビット+宛先IPアドレスのマスク長5ビット+第2エントリ情報EDBの読出フラグ1ビット+第2のエントリ番号7ビット+(送信元IPアドレス32ビット+送信元IPアドレスのマスク長5ビット)/2)となり、メモリ量は、16256ビット(=(送信元IPアドレス32ビット+送信元IPアドレスのマスク長5ビット+第2エントリ情報EDBの読出フラグ1ビット+第2のエントリ番号7ビット)*256+(送信元IPアドレス32ビット+送信元IPアドレスのマスク長5ビット)*256/2)となる。
On the other hand, in this example, the average number of read bits per entry is 64.5 bits (=
このように、第1の実施の形態の[ケース4]よりも第2のエントリ番号ENBのビット数分だけ、本例の1エントリあたりの平均読み出しビット数の方が大きくなるが、第2検索テーブル22Bのエントリ数の削減によって、検索テーブルのメモリ量を削減することができる。前記効果は、第2エントリ情報EDBを必要としないエントリ数の割合が大きいほど顕著になる。 Thus, the average number of read bits per entry in this example is larger by the number of bits of the second entry number ENB than in [Case 4] of the first embodiment, but the second search is performed. By reducing the number of entries in the table 22B, the memory amount of the search table can be reduced. The effect becomes more prominent as the ratio of the number of entries that do not require the second entry information EDB is larger.
[ケース2]
第1エントリ情報EDA=第2エントリ情報EDBから算出されたハッシュ値・エントリ情報種別・第2のエントリ番号ENB、
第2−1のエントリ情報=エントリに適合するための送信元IPv4アドレスと宛先IPv4アドレス、
第2−2のエントリ情報=エントリに適合するための送信元IPv6アドレスと宛先IPv6アドレス
[Case 2]
First entry information EDA = Hash value calculated from second entry information EDB, entry information type, second entry number ENB,
2-1 entry information = source IPv4 address and destination IPv4 address to match the entry,
2-2 entry information = source IPv6 address and destination IPv6 address to match the entry
第1の実施の形態の[ケース3]に示したように、第1エントリ情報EDAとして検索条件を表すビット列のハッシュ値を用いることで、検索テーブルからの読み出しビット数を削減することができる。例えば、IPv6の宛先IPアドレス(128ビット)や送信元IPアドレス(128ビット)のように、ビット数が多いフレーム情報FDと検索条件に対してハッシュ演算を施し、前記ハッシュ化によって短縮されたビット列間の一致比較を行い、前記比較で一致したときのみハッシュ化前のビット列を検索テーブルから読み出して適合判定を行う。 As shown in [Case 3] of the first embodiment, the number of bits read from the search table can be reduced by using the hash value of the bit string representing the search condition as the first entry information EDA. For example, a bit string shortened by hashing by performing a hash operation on frame information FD having a large number of bits and a search condition such as a destination IP address (128 bits) and a source IP address (128 bits) of IPv6 A match comparison is performed, and a bit string before hashing is read from the search table only when a match is found in the comparison, and conformance is determined.
前記検索条件のハッシュ化されたビット列を第1エントリ情報EDAとして第1検索テーブル22Aに記憶し、ハッシュ化前のビット列を第2エントリ情報EDBとして第2検索テーブル22Bに記憶する。IPv4のフレームとIPv6のフレームの両方に対して検索処理を行う装置では、検索条件であるIPv4のIPアドレスとIPv6のIPアドレスのどちらか一方が、第2検索テーブル22Bのエントリに記憶される。 The hashed bit string of the search condition is stored in the first search table 22A as the first entry information EDA, and the bit string before hashing is stored in the second search table 22B as the second entry information EDB. In an apparatus that performs a search process for both an IPv4 frame and an IPv6 frame, either an IPv4 IP address or an IPv6 IP address, which is a search condition, is stored in an entry of the second search table 22B.
このとき、IPv6のIPアドレスが128ビットであるのに対してIPv4のIPアドレスが32ビットであるため、第2検索テーブル22Bの各エントリがビット数が大きいIPv6のIPアドレスを格納できるようにしておき、IPv4のIPアドレスを格納するときは、IPv6のIPアドレスを格納する領域の一部を使用し残りの領域を空けておくことになる。
このように、ビット数の異なる検索条件の一方をエントリに格納する場合には、ビット数の短い方の検索条件を格納したエントリには使用されない記憶領域が発生することになるため、検索テーブルの使用されない記憶領域によって検索テーブル用メモリの規模が必要以上に大きくなる。
At this time, since the IPv6 IP address is 128 bits, the IPv4 IP address is 32 bits, so that each entry of the second search table 22B can store an IPv6 IP address having a large number of bits. When storing the IPv4 IP address, a part of the area for storing the IPv6 IP address is used, and the remaining area is reserved.
As described above, when one of the search conditions having different bit numbers is stored in the entry, a storage area that is not used for the entry storing the search condition having the shorter bit number is generated. The storage area not used increases the size of the search table memory more than necessary.
そこで、本例では、上記のハッシュ値の利用と併せて、第1の実施の形態の[ケース5]に示したように、第1エントリ情報EDAにエントリ情報種別(本例ではIPv4かIPv6かを示す値)を加えるとともに、IPv4用の第2−1の検索テーブルとIPv6用の第2−2の検索テーブルを設ける。
各エントリの検索条件はIPv4かIPv6かのどちらか一方であるため、前記第2−1の検索テーブルの使用されているエントリ数と前記第2−2の検索テーブルの使用されているエントリ数とを合わせた数が、前記第1検索テーブル22Aの使用されたエントリ数となる。
Therefore, in this example, together with the use of the hash value, as shown in [Case 5] of the first embodiment, the entry information type (IPv4 or IPv6 in this example) is added to the first entry information EDA. And a 2-1 search table for IPv4 and a 2-2 search table for IPv6.
Since the search condition of each entry is either IPv4 or IPv6, the number of entries used in the 2-1 search table and the number of entries used in the 2-2 search table Is the number of entries used in the first search table 22A.
さらに、第1エントリ情報EDAに第2のエントリ番号ENBを加え、前記エントリ情報種別がIPv4を示す場合には、前記第2のエントリ番号ENBを前記エントリの検索条件であるIPv4のIPアドレスを格納している第2−1の検索テーブルのエントリ番号として使用する。同様に、前記エントリ情報種別がIPv6を示す場合には、前記第2のエントリ番号ENBを前記エントリの検索条件であるIPv6のIPアドレスを格納している第2−2の検索テーブルのエントリ番号として使用する。 Further, when the second entry number ENB is added to the first entry information EDA and the entry information type indicates IPv4, the IP address of IPv4 which is the search condition for the entry is stored in the second entry number ENB. This is used as the entry number of the 2-1 search table. Similarly, when the entry information type indicates IPv6, the second entry number ENB is used as the entry number of the 2-2 search table that stores the IPv6 IP address that is the search condition for the entry. use.
上記において、各比較回路3nは、第2−1の検索テーブルあるいは第2−2の検索テーブルから、前記第2エントリ情報EDB[第2のエントリ番号ENB[i]]を読み出すか否かの第2検索テーブル読出判定を、第1適合判定結果CJAに基づいて得る。
前記第1適合判定とは、フレーム情報FDが、第1エントリ情報EDA[i]に含まれるエントリ情報種別[i]に適合し(上記例ではフレームがIPv4の場合に前記エントリ情報種別がIPv4を示すか、あるいは、フレームがIPv6の場合に前記エントリ情報種別がIPv6を示す)、かつ、第2エントリ情報EDBから算出されたハッシュ値がフレーム情報FDから算出されたハッシュ値と一致する(上記例ではフレーム情報FDに含まれる送信元IPアドレスと宛先IPアドレスのビット列に対して所定のハッシュ演算(例えばSRC8など)を施したフレーム情報FDのハッシュ値と第1エントリ情報EDA[i]に含まれるハッシュ値が一致する)場合に適合と判定するものである。
In the above, each
In the first conformity determination, the frame information FD conforms to the entry information type [i] included in the first entry information EDA [i] (in the above example, when the frame is IPv4, the entry information type is IPv4). Or the entry information type indicates IPv6 when the frame is IPv6), and the hash value calculated from the second entry information EDB matches the hash value calculated from the frame information FD (the above example) Is included in the hash value of the frame information FD obtained by performing a predetermined hash operation (for example, SRC8) on the bit string of the source IP address and the destination IP address included in the frame information FD and the first entry information EDA [i]. If the hash values match), it is determined as conforming.
また、第2検索テーブル読出判定は、前記第1適合判定において適合と判定されたとき、第2検索テーブル22Bから第2エントリ情報EDBを読み出すと判定する。さらに、前記比較回路3nは、第2読出回路23Bに対して前記読出判定結果RJn[i]を出力する。
また、第1読出回路23Aは、前記第1エントリ情報EDA[i]に含まれる第2のエントリ番号ENB[i]と、前記エントリ情報種別[i]を、第2読出回路23Bに対して出力する。
Further, in the second search table read determination, when it is determined that the first match determination is appropriate, it is determined that the second entry information EDB is read from the second search table 22B. Further, the
The
前記第2読出回路23Bは、少なくとも1個の比較回路3nからの読出判定結果RJn[i]が第2エントリ情報EDBの読み出しありを示す場合に、前記エントリ情報種別[i]に応じて、第2エントリ情報EDBを読み出す検索テーブルを、第2−1の検索テーブルと第2−2の検索テーブルから選択し、前記選択した検索テーブルの、前記第2のエントリ番号ENB[i]が示すエントリから、第2エントリ情報EDB[第2のエントリ番号ENB[i]]を読み出して、前記比較回路3nに入力する。
When the read determination result RJn [i] from at least one
このように、本例では、ビット数の異なる検索条件(IPv4とIPv6の各IPアドレス)の一方をエントリに格納する場合に、各々異なる検索テーブル(第2−1の検索テーブルと第2−2の検索テーブル)に分けて記憶するため、1個の検索テーブルのエントリに格納する場合に生じていた使用されない記憶領域が発生しないため、検索テーブル用メモリの規模を抑制することができる。 In this way, in this example, when one of the search conditions (IPv4 and IPv6 IP addresses) having different numbers of bits is stored in the entry, each of the different search tables (2-1 search table and 2-2) is stored. Storage table), the storage area which is not used when storing in one search table entry does not occur, and the scale of the search table memory can be suppressed.
例えば、全エントリ(256エントリ)のうち1/2のエントリがIPv4を条件とするエントリで残りのエントリがIPv6を条件とするエントリである場合、第1の実施の形態の検索処理部12であれば、メモリ量は、67840ビット(=(送信元IPアドレス128ビット+宛先IPアドレス128ビット+ハッシュ値8ビット+エントリ情報種別1ビット)*256)となる。一方、本例では、メモリ量は、45056ビット(=(送信元IPv6アドレス128ビット+宛先IPv6アドレス128ビット+ハッシュ値8ビット+エントリ情報種別1ビット+第2のエントリ番号7ビット)*128+(送信元IPv4アドレス32ビット+宛先IPv4アドレス32ビット+ハッシュ値8ビット+エントリ情報種別1ビット+第2のエントリ番号7ビット)*128)となる。
For example, if 1/2 of all entries (256 entries) are entries that require IPv4 and the remaining entries are entries that require IPv6, the
なお、上記の検索テーブル構成の他にも、第2−1の検索テーブルを、IPv4の宛先・送信元IPアドレスが格納できる容量を持つエントリとし、IPv6時には宛先・送信元IPアドレスのうち下位32ビット(IPv4のIPアドレス長と同じビット数)を前記第2−1の検索テーブルに格納し、第2−2の検索テーブルには、IPv6のIPアドレスの上位96bit分を格納する構成も可能である。 In addition to the above search table configuration, the 2-1 search table is an entry having a capacity capable of storing an IPv4 destination / source IP address. It is also possible to store the bits (the same number of bits as the IPv4 IP address length) in the 2-1 search table and store the upper 96 bits of the IPv6 IP address in the 2-2 search table. is there.
この場合は、第1の実施の形態と同様に第1検索テーブル22Aのエントリ番号を使って前記第2−1の検索テーブルのエントリを読み出すとともに、エントリ情報種別がIPv6の場合に限って、第1エントリ情報EDAに含まれる第2のエントリ番号ENBが示す、第2−2の検索テーブルのエントリを読み出す。
これにより、検索テーブルのビット数削減とともに、全エントリをIPv4用として使用することもできるので、全エントリ(256エントリ)のうち1/2のエントリがIPv4を条件とするIPv4専用のエントリで残りのエントリがIPv6を条件とするIPv6専用のエントリである場合と比較して、IPv4用のエントリに対するエントリ数の制限が緩和され、最大2倍のエントリ数まで設定可能となる。
In this case, as in the first embodiment, the entry of the 2-1 search table is read using the entry number of the first search table 22A, and only when the entry information type is IPv6. The entry in the 2-2 search table indicated by the second entry number ENB included in the one entry information EDA is read.
As a result, the number of bits in the search table can be reduced, and all entries can be used for IPv4. Therefore, half of all entries (256 entries) are IPv4-only entries with IPv4 as the remaining entries. Compared to the case where the entry is an IPv6-only entry with IPv6 as a condition, the restriction on the number of entries for the entry for IPv4 is relaxed, and the entry number can be set up to twice the maximum.
[第4の実施の形態]
次に、図10を参照して、本発明の第4の実施の形態にかかるフレーム検索処理装置10について説明する。図10は、第4の実施の形態にかかる検索処理部の構成を示すブロック図である。
第1の実施の形態では、第1検索テーブル22Aから比較回路3nに対して第1エントリ情報EDAを出力する場合を例として説明した。本実施の形態では、第1読出回路23Aから比較回路3nに対して第1エントリ番号ENAを出力する場合について説明する。
[Fourth Embodiment]
Next, a frame
In the first embodiment, the case where the first entry information EDA is output from the first search table 22A to the
本実施の形態において、検索処理部12には、主な回路部として、フレーム情報振分回路21、第1検索テーブル22A、第2検索テーブル22B、第1読出回路23A、第2読出回路23B、N個の比較回路3n(n=1〜N;Nは2以上の自然数)、および検索結果合流回路24が設けられている。
In the present embodiment, the
第1検索テーブル22Aは、Ne個(Neは1以上の自然数)のエントリi(i=1〜Ne)を有し、各エントリiに第1エントリ情報EDA[i]を記憶する。
第2検索テーブル22Bは、Ne個のエントリj(j=1〜Ne)を有し、各エントリjに第2エントリ情報EDB[j]を記憶する。
The first search table 22A has Ne (N is a natural number of 1 or more) entries i (i = 1 to Ne), and the first entry information EDA [i] is stored in each entry i.
The second search table 22B has Ne entries j (j = 1 to Ne), and stores second entry information EDB [j] in each entry j.
第1検索テーブル22Aは、第1読出回路23Aから第1読出信号RAを入力し、前記信号が示すアドレスから前記信号が示すタイミングで、記憶している第1エントリ情報EDA[i]を読み出す。
同様に、第2検索テーブル22Bは、第2読出回路23Bから第2読出信号RBを入力し、前記信号が示すアドレスから前記信号が示すタイミングで、記憶している第2エントリ情報EDB[i]を読み出す。
The first search table 22A receives the first read signal RA from the
Similarly, the second search table 22B receives the second read signal RB from the
第1の実施の形態では、第1検索テーブル22Aから第1エントリ情報EDAを1個ずつエントリ番号に従った順番で読み出していた。したがって、1個のフレームに対する検索処理に要する時間は、第1検索テーブル22Aから全てのエントリを読み出すのに必要な時間に依存する。 In the first embodiment, the first entry information EDA is read from the first search table 22A one by one in the order according to the entry number. Therefore, the time required for the search processing for one frame depends on the time required to read all entries from the first search table 22A.
例えば、第1検索テーブル22Aが256個のエントリを持ち、検索処理部12の駆動に利用されるクロックの1サイクル毎に、前記1個のエントリを読み出す装置では、前記検索処理に要する時間は、第1検索テーブル22Aから全てのエントリを読み出すのに必要な時間=256サイクルに、第1エントリ情報EDA[i]の読み出しから第2エントリ情報EDB[i]の読み出しまでに要する予め定められた一定の時間差Td(例:3サイクル)と統合適合判定の時間(例:1サイクル)を合わせた、4サイクル程度の時間を加えた値(例:260サイクル)となる。
For example, in a device in which the first search table 22A has 256 entries and reads out the one entry for each cycle of the clock used to drive the
つまり、各フレームに対する検索は、エントリ単位でのパイプライン処理によって1エントリあたり1サイクルで処理可能でありエントリ数と同数のサイクルの時間を要する。しかし、次のフレームに対する検索を開始するためには、前記パイプラインが空になるまでの時間、つまり、最後のエントリがパイプラインを抜けるまでの時間(=時間Td+統合適合判定に要する時間)を加えておく必要がある。この加算時間は、4サイクル程度となる。このように、検索処理に要する時間のうち、第1検索テーブル22Aから全てのエントリを読み出すのに必要な時間が大部分を占める。 That is, the search for each frame can be processed in one cycle per entry by pipeline processing in units of entries, and requires the same number of cycles as the number of entries. However, in order to start the search for the next frame, the time until the pipeline is emptied, that is, the time until the last entry exits the pipeline (= time Td + time required for integrated conformity determination) It is necessary to add. This addition time is about 4 cycles. Thus, the time required to read all entries from the first search table 22A accounts for most of the time required for the search process.
なお、上記Tdは、第1読出アドレスRAA[i]と第1読出有効信号REA[i]を第1検索テーブル22Aが入力してから第1エントリ情報EDA[i]を出力するまでの2サイクル分の遅延と、比較回路3nが前記第1エントリ情報EDA[i]を入力してから前記入力に基づいて読出判定結果RJn[i]を出力するまでの1サイクル分の遅延と、第2読出有効生成部42Bが各比較回路3nから読出判定結果RJn[i]を入力してから前記に基づいて第2読出有効信号REB[i]を出力するまでの遅延(本例では単純な論理和の演算であるため遅延なし)と、の合計である。
The Td is two cycles from when the first search table 22A inputs the first read address RAA [i] and the first read valid signal REA [i] to when the first entry information EDA [i] is output. A delay for one cycle, a delay for one cycle from when the
第1検索テーブル22Aへの第1読出有効信号REA[i]が有効時の第1読出アドレスRAA[i]の入力から2サイクル後に出力されるのは、前記第1検索テーブル22A用のメモリに入力したアドレス等の信号をラッチすることで生じる1クロックの遅延と、メモリ内のセルに記憶されているデータを出力する前にラッチするために生じる1クロックの遅延があるためである。 What is output two cycles after the input of the first read address RAA [i] when the first read valid signal REA [i] to the first search table 22A is valid is the memory for the first search table 22A. This is because there is a one-clock delay caused by latching a signal such as an input address and a one-clock delay caused by latching before data stored in a cell in the memory is output.
したがって、第1の実施の形態によれば、検索テーブルのエントリ数の増大に応じて検索処理時間が長くなるが、性能(=単位時間に検索できるフレームの個数)を維持するためには、比較回路3nの並列度を増大させる(nを大きくする)必要がある。すなわち、検索テーブルのエントリ数増大によって、検索テーブルとして用いられるメモリの規模が増大するのみならず、比較回路3nの回路規模が増大するという問題が発生する。
Therefore, according to the first embodiment, the search processing time increases as the number of entries in the search table increases. However, in order to maintain performance (= the number of frames that can be searched per unit time), comparison is required. It is necessary to increase the parallelism of the
そこで、本実施の形態では、第1読出回路23Aは、Nr個(Nrは1以上の自然数、Ne=Nr*Nlの関係がありNlは1以上の自然数)の第1エントリ情報EDA[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr、第1エントリ番号kは0以上かつNl未満の整数)を第1検索テーブル22Aから並列して同時に読み出して、前記Nr個の第1エントリ情報EDAを各比較回路3nに分配するようにしたものである。また、前記読み出し毎に、第1検索テーブル読出制御変数の値を+1し、最大値(Nl−1)に達した時点で0に戻るようにしたものである。
Therefore, in the present embodiment, the
これにより、前記第1検索テーブル22Aからの読み出しは、Nr個ずつ第1エントリ情報EDAをエントリ番号に従った順番で行われるため、第1検索テーブル22Aから全てのエントリを読み出すのに必要な時間は、第1の実施の形態で必要な時間の1/Nrとなる。ただし、前記には後述する第1検索テーブル22Aの読出停止を示す信号が入力されている期間は含まれていない。 As a result, the reading from the first search table 22A is performed in order according to the entry number of the first entry information EDA for each Nr, so the time required to read all the entries from the first search table 22A Is 1 / Nr of the time required in the first embodiment. However, the above does not include a period during which a signal indicating a read stop of the first search table 22A described later is input.
なお、第1読出回路23Aは、各比較回路3n(n=1〜N)が出力する検索中であるか否かを示す検索状態SSnを入力し、何れか1個の比較回路3nの検索状態SSnが検索中である場合に、第1検索テーブル22Aの読み出しを行う。
さらに、全ての比較回路3nについて、その検索状態SSnが検索停止中であることを示す場合は、第1検索テーブル22Aの読み出しを行わない。これにより、第1検索テーブル22Aの読み出しが不要な期間の消費電力を削減できる。
Note that the
Further, for all the
フレーム情報振分回路21は、フレーム情報抽出部11からフレーム情報FDを入力し、所定の比較回路選択方法に基づいて、前記フレーム情報FDの出力先である比較回路3nを決定し、前記比較回路3nに対して前記フレーム情報FDをフレーム情報FDnとして出力する機能を有している。
The frame
比較回路選択方法の例は、各比較回路3nが検索処理中であるか否かを判定し、前記検索処理を行っていない比較回路3nの1つを選択することである。この比較回路選択方法を簡単な回路で実現する例として、フレーム情報FDを入力したとき前回入力時に選択した比較回路3nの番号nを+1した番号の比較回路3(n+1)を選択する方法がある。この比較回路選択方法において、前回入力時に選択した比較回路3nの番号nがNの場合は、番号1の比較回路31を選択して、巡回的に比較回路3nを選択することになる。
An example of the comparison circuit selection method is to determine whether or not each
比較回路3nは、フレーム情報振分回路21からのフレーム情報FDn(n=1〜N)の入力に応じて、前記フレーム情報FDnに適合する検索条件を持ったエントリを検索するための検索処理を実行する。
この検索処理において、比較回路3nは、入力されたフレーム情報FDnと、第1読出回路23Aが第1検索テーブル22Aのエントリi(i=1〜Nr)から読み出した第1エントリ情報EDA[i]とに基づいて、前記フレーム情報FDnが、前記各第1エントリ情報EDA[i]が表す検索条件に適合するか否かを判定するための第1適合判定を行って、回路内部信号として第1適合判定結果CJAn[i](図示せず)を得る。
The
In this search process, the
また、比較回路3nは、得られた前記第1適合判定結果CJAn[i]に基づいて、第2検索テーブル22Bのエントリi(i=1〜Nr)から、第2エントリ情報EDB[i]を読み出すか否かを判定するための第2検索テーブル読出判定を行い、得られた読出判定結果RJn[i]を第2読出回路23Bに出力する。
Further, the
さらに、比較回路3nは、第1適合判定結果CJAn[i]を得た後、第2エントリ情報EDB[i]とフレーム情報FDnに基づいて第2適合判定結果CJB[i]を得て、前記第1適合判定結果CJAn[i]と前記第2適合判定結果CJB[i]に基づいて、エントリiが前記フレーム情報FDnに適合するか否かを示す統合適合判定を行う。
このため、比較回路3nは、統合適合判定を行うまでの期間、前記第1適合判定結果CJAn[i]を一時的に保持しておく必要がある。なお、前記期間中に得られる別のエントリの第1適合判定結果CJAについても同様に保持しておく必要がある。
Further, after obtaining the first conformity determination result CJAn [i], the
For this reason, the
第2読出回路23Bは、各比較回路3nから各々Nr個の読出判定結果RJn[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)を入力する。ここで、Nr個のエントリ番号i=Nr*k+1,Nr*k+2,…,Nr*k+Nrの各々について、少なくとも1個の比較回路3nから第2検索テーブル読出ありを示す読出判定結果RJn[i]を入力したとき、前記エントリ番号であるiを第2読出回路23Bが持つ、後述の第2読出待ちキュー44Bに蓄積する。したがって、第2読出待ちキュー44Bには、第2検索テーブル22Bから読み出す必要があるエントリの番号が前記番号順に蓄積されることになる。
The
なお、第2読出待ちキュー44Bに前記エントリ番号の蓄積を行うことによって前記キューが所定の個数Ns以上のエントリ番号を蓄積した場合は、下記に示す前記キューからのエントリ番号の取出しによって蓄積可能な状態になるまで、前記キューへの蓄積を一時的に停止する。さらに、第1読出回路23Aに対して、第1検索テーブル22Aから第1エントリ情報EDAの読み出しを停止させるための、第1読出停止信号RSAを出力し、前記信号を受けて、第1読出回路23Aは第1エントリ情報EDAの読み出しを行わない。
When the queue stores the entry numbers of the predetermined number Ns or more by accumulating the entry numbers in the second
これにより、第2検索テーブル読出待ちエントリキューのオーバーフローを防止する。この際、第1検索テーブル22Aに対する判定速度(1クロックあたりに判定するエントリ数=Nr)は第2検索テーブル22Bに対する判定速度(1クロックあたりに判定できるエントリ数=1)よりも大きい。
このため、第2読出待ちキュー44Bが前記オーバーフロー防止のための処理を行わないと、第1検索テーブル22Aに対する判定で第2検索テーブル読出となるエントリ数が第2検索テーブル22Bに対する判定速度を超える状況が発生したとき、第2読出待ちキュー44Bの蓄積が増大して、前記キューに蓄積可能な最大数を超えた(オーバーフローの発生)時点で、第2検索テーブル22Bに対する判定ができないエントリが発生するなどの問題が生じる。
This prevents overflow of the second search table read waiting entry queue. At this time, the determination speed for the first search table 22A (number of entries determined per clock = Nr) is higher than the determination speed for the second search table 22B (number of entries that can be determined per clock = 1).
For this reason, if the second
前記第1検索テーブル読出の一時停止によって、第1検索テーブル22Aから全てのエントリを読み出すための時間が増大するため、前記第1検索テーブル22Aからの読み出しを一時停止した時間だけ、各比較回路3nの検索処理開始から終了までの時間が増加することになる。
例えば、Ne=256, Nr=8としたとき、前記一時停止がないと第1検索テーブル22Aの全エントリを読み出すために要する時間は、1クロックにつきNr個のエントリを読み出すので、32サイクル(=Ne/Nr)となるが、一時停止が最大となるケースである全エントリが第2検索テーブル22Bの読出ありとなった場合は、1クロックにつき1個のエントリとなってしまうため、256サイクルとなる。
Since the time for reading all the entries from the first search table 22A increases due to the suspension of the reading of the first search table, each
For example, when Ne = 256 and Nr = 8, if there is no temporary stop, the time required to read all entries in the first search table 22A is 32 cycles (== Ne / Nr), but when all the entries, which are the cases where the pause is maximum, are read out of the second search table 22B, one entry is generated per clock. Become.
したがって、各比較回路3nの検索処理に要する時間は一定値ではなく、比較回路3nに入力されたフレーム情報FDや、第1エントリ情報EDAおよび第2エントリ情報EDBの設定に応じて変化する。このため、比較回路3nの検索処理に要する時間が大きくなることで、全比較回路3nが検索処理中のときフレーム情報FDが装置に入力される可能性が生じる場合は、前記フレーム情報FDの検索処理部12への入力を、前記入力可能となるまで、すなわち、1個以上の比較回路3nで検索処理が終了するまで、一時的に停止させる。
Accordingly, the time required for the search processing of each
また、第2読出回路23Bは、前記第2読出待ちキュー44Bに蓄積されているエントリ番号jを1個ずつ取り出して、第2検索テーブル22Bから第2エントリ情報EDB[j]を読み出し、前記第2エントリ情報EDB[j]を、そのエントリ番号jとともに、各比較回路3n(n=1〜N)に分配する。
The
前記キューから取り出されるエントリ番号は、FIFO機能に従って最も以前に蓄積されたものから取り出されるため、蓄積された順、すなわち、第2検索テーブル22Bから読み出す必要があるエントリをエントリ番号順に並べたときの順で、取り出されることになる。なお、第2読出待ちキュー44Bが空のとき、すなわち、エントリ番号が蓄積されていない状態のときは、第2読出回路23Bは第2検索テーブル22Bからの読み出しを行わない。
Since the entry numbers taken out from the queue are taken out from the most recently stored according to the FIFO function, the entries in order of storage, that is, the entries that need to be read from the second search table 22B are arranged in the order of the entry numbers. It will be taken out in order. When the second
前記比較回路3nは、前記フレーム情報FDnと、前記第2エントリ情報EDB[j]とに基づいて、前記フレーム情報FDnが前記第2エントリ情報EDB[j]に適合するか否かの第2適合判定を行って、第2適合判定結果CJB[j]を得る。
さらに、前記比較回路3nは、エントリjについて、第1エントリ情報EDA[j]が第1検索テーブル22Aから読み出された後に得られる第1適合判定結果CJAn[j]と、その後の第2エントリ情報EDB[j]が第2検索テーブル22Bから読み出された後に得られる第2適合判定結果CJB[j]に基づいて、統合適合判定を行う。前記統合適合判定により適合と判断されたエントリが見つかった時点、あるいは、全てのエントリについてフレーム情報FDnとの判定を終えた時点で、前記比較回路3nは検索を終了し、検索結果SRnを出力する。
Based on the frame information FDn and the second entry information EDB [j], the
Further, the
なお、第1エントリ情報EDAまたは第2エントリ情報EDBにエントリの適用優先度を含み、統合適合判定により適合とされたエントリのなかで前記エントリの適用優先度が最も高いエントリを見つける例では、統合適合判定により適合とされたエントリが1個見つかった時点で検索を終了するのではなく、全エントリについて統合適合判定を終えるか、上限の適用優先度を持つエントリが見つかった場合にのみ、検索を終了する。
前記比較回路3nは、前記統合適合判定によって得られた結果(例えば前記判定において適合したエントリの番号iや前記エントリの第2エントリ情報EDB[i]に含まれる結果を示す情報;通過/廃棄を示す情報や送出先を示すポート番号など)を、検索結果SRnとして、検索結果合流回路24に対して出力する。
In the example in which the entry entry priority is included in the first entry information EDA or the second entry information EDB, and the entry having the highest entry priority is found among the entries determined to be compatible by the integrated suitability determination, The search is not terminated when one entry that is determined to be conforming by the conformity determination is found, but only when the integrated conformance determination is completed for all entries or when an entry having an upper limit application priority is found. finish.
The
また、各比較回路3nが第1エントリ情報EDA[i]を得てから第2エントリ情報EDB[i]を得るまでの時間が一定時間Tdである第1の実施の形態や第2の実施の形態とは異なり、本例では、第2読出回路23B内の第2読出待ちキュー44Bの状態によって、前記時間は変動する。
第1の実施の形態や第2の実施の形態では、比較回路3nが第1エントリ情報EDAを得てから時間Tdを経過した時点で第2検索テーブル22Bから入力した第2エントリ情報EDBは、同一エントリ番号に対応することが保証されているので、第2エントリ情報EDBを入力したとき前記エントリ番号が入力される必要はない。
In addition, the first embodiment and the second embodiment in which the time from when each
In the first embodiment and the second embodiment, the second entry information EDB input from the second search table 22B when the time Td has elapsed since the
しかし、本例では、第1エントリ情報EDAを得てから一定時間を経過したとき入力した第2エントリ情報EDBが同一エントリ番号に対応することが保証されないため、第2エントリ情報EDBと併せて前記エントリ番号を入力する。
各比較回路3nは、適合を示す第1適合判定結果CJAn[i]を得るとともに第2検索テーブル読出ありを示す読出判定結果RJn[i]を得たときのエントリ番号i(第2適合判定待ちエントリ番号)を一時的に保持しておく。
However, in this example, since it is not guaranteed that the second entry information EDB input when a certain time has passed since the first entry information EDA has been obtained corresponds to the same entry number, the second entry information EDB is combined with the second entry information EDB. Enter the entry number.
Each
そして、第2エントリ情報EDB[j]と併せて入力された前記エントリ番号jと、前記保持したエントリ番号iとが一致した場合に、フレーム情報FDnが前記第2エントリ情報EDB[j]に適合するか否かの第2適合判定を行って、第2適合判定結果CJB[j]を得る。
また、第2適合判定結果CJB[j]を得る前に、前記エントリj以降のエントリi’についても第1適合判定を行ってエントリ番号i’を一時的に保持しておくことにより検索処理速度を向上させることができるため、第2適合判定待ちエントリ番号をキューに保持する。
Then, when the entry number j input together with the second entry information EDB [j] matches the stored entry number i, the frame information FDn matches the second entry information EDB [j]. The second suitability determination as to whether or not to perform is performed to obtain a second suitability determination result CJB [j].
In addition, before obtaining the second match determination result CJB [j], the first match determination is also performed for the entry i ′ subsequent to the entry j, and the entry number i ′ is temporarily held to thereby store the search processing speed. Therefore, the second matching determination waiting entry number is held in the queue.
各比較回路3nが全てのエントリについてフレーム情報FDnとの判定を終えた時点を知る判定終了特定方法の例として、フレーム情報FDnを比較回路3nが入力し検索を開始したときの第1エントリ番号ENAを保持しておき、第1検索テーブル22Aの各エントリの読み出しが一巡して第1エントリ番号ENAが前記保持していた値に達したタイミングを用いる方法がある。
As an example of a determination completion specifying method for knowing when each
次に、図11を参照して、本実施の形態にかかる第1読出回路23Aおよび第2読出回路23Bについて説明する。図11は、第4の実施の形態にかかる検索処理部の要部を示すブロック図である。
Next, the
第1読出回路23Aは、クロックに合わせて、1サイクル前に出力した第1エントリ番号kを+1する更新を行い、第1読出アドレスRAA[k]として出力する機能を有している。ただし、装置の動作開始時と、第1エントリ番号kがNlとなった場合は0を出力する。また、第1読出停止信号RSAが停止を示すときは、前記第1エントリ番号kの更新を行わない。
The
また、第1読出回路23Aは、前記第1エントリ番号k(ただし、第1読出停止信号RSAが停止を示すときは、第1検索テーブル22Aのエントリ番号の範囲外の値である所定の無効値)を、所定の時間(第1検索テーブル22Aが第1エントリ情報EDA[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)を出力するまでの時間)だけ、遅延させて出力する。これにより、各比較回路3nに第1エントリ情報EDA[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)と同時に、第1エントリ番号kが入力される。また、第1読出停止信号RSAによって、第1検索テーブル22Aから読み出しが停止中であることを、所定の無効値を示す前記第1エントリ番号kによって各比較回路3nに通知する。
Further, the
また、第1読出回路23Aは、各比較回路3n(n=1〜N)から、前記比較回路3nが検索中であるか検索停止中であるかを示す検索状態SSnを入力し、1個以上の比較回路3nに対応する前記検索状態SSnが検索中を示しており、かつ、第1読出停止信号RSAが停止を示していない期間に、有効を示す第1読出有効信号REA[k]を出力する。また、前記以外の期間は無効を示す第1読出有効信号REA[k]を出力する。
なお、全比較回路3n(n=1〜N)から検索停止を示す検索状態SSnを入力している期間、または、第1読出停止信号RSAが停止を示す期間は、無効を示す第1読出有効信号REA[k]を出力する。
Further, the
It should be noted that during the period when the search state SSn indicating the search stop is input from all the
第1検索テーブル22Aは、第1テーブルメモリM1によって実現されており、前記メモリの各アドレスk(k=0〜Nl)に位置する各ワードには、Nr個の第1エントリ情報EDA[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)が記憶される。
第1検索テーブル22Aは、第1読出アドレスRAA[k]と第1読出有効信号REA[k]を第1読出回路23Aから入力し、前記第1読出有効信号REA[k]が有効を示すとき、前記第1テーブルメモリから前記第1読出アドレスRAA[k]が示す位置に記憶されているNr個の第1エントリ情報EDA[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)を読み出して、各比較回路3n(n=1〜N)に分配する。また、前記第1読出有効信号REA[k]が無効を示すときは前記読み出しと分配を行わない。
The first search table 22A is realized by the first table memory M1, and Nr pieces of first entry information EDA [i] are included in each word located at each address k (k = 0 to Nl) of the memory. (I = Nr * k + 1, Nr * k + 2,..., Nr * k + Nr) is stored.
The first search table 22A receives the first read address RAA [k] and the first read valid signal REA [k] from the
比較回路3nは、フレーム情報振分回路21から入力されたフレーム情報FDnを保持し、前記保持しているフレーム情報FDnと、クロックサイクル毎に入力されたNr個の第1エントリ情報EDA[i]の各々が表す検索条件が適合するか否かの第1適合判定を行って、クロックサイクル毎にNr個の第1適合判定結果CJAn[i]を得る。さらに、第2検索テーブル22BからNr個の第2エントリ情報EDB[i]の各々について読み出すか否かの第2検索テーブル読出判定を行って、クロックサイクル毎に第2読出回路23Bに前記Nr個の読出判定結果RJn[i]を出力する。
The
また、比較回路3nは、第1読出回路23Aから第1エントリ番号kを入力し、前記入力時点から所定の時間だけ、すなわち読出判定結果RJn[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)を出力するまでの時間だけ、遅延させて前記値を第2読出回路23Bへ出力する。これにより、読出判定結果RJn[i]と対応する第1エントリ番号kが同時に出力されることになる。
なお、第1エントリ番号kが所定の無効値を示す場合は、前記と同時に入力された第1エントリ情報EDA[i]を用いた第1適合判定や第2検索テーブル読出判定を行わない。これは、前記第1エントリ情報EDA[i]は第1検索テーブル22Aから読み出された値ではなく無効であるためである。
Further, the
When the first entry number k indicates a predetermined invalid value, the first suitability determination and the second search table read determination using the first entry information EDA [i] input at the same time are not performed. This is because the first entry information EDA [i] is not a value read from the first search table 22A but is invalid.
第2読出回路23Bは、第2読出有効生成部42Bと、第2読出待ちキュー44Bと、第2読出信号生成部から構成される。
第2読出有効生成部42Bは、クロックサイクル毎に、比較回路3n(n=1〜N)の各々から、Nr個の読出判定結果RJn[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)を入力する。前記各比較回路3nから入力された各エントリiの読出判定結果RJn[i]に1個以上の読出ありを示す結果が含まれる場合に、有効を示す第2読出有効信号REB[i]を出力し、全て読出なしを示す場合は無効を示す第2読出有効信号REB[i]を出力する。これにより、クロックサイクル毎に、Nr個のエントリi(i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)について前記第2読出有効信号REB[i]が出力されることになる。
The
The second read
第2読出待ちキュー44Bは、任意の1個の比較回路3nが出力した第1エントリ番号kをクロックサイクル毎に入力する。なお、全比較回路3nは、同時に同じ値の第1エントリ番号kを入力し同じ時間だけ遅延させて出力するので、同時に同じ値の第1エントリ番号kを出力しており、どの比較回路3nが出力した第1エントリ番号kを採用してもよい。
The second
さらに、第2読出待ちキュー44Bは、第2読出有効生成部42Bから、クロックサイクル毎にNr個のエントリi(i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)について前記第2読出有効信号REB[i]を入力する。この際、有効を示す前記第2読出有効信号REB[i]を受けた場合に、前記入力した第1エントリ番号kを基に前記エントリ番号iを生成して、前記生成した番号をキュー(FIFO)に蓄積する。また、エントリ番号iは、例えば入力されたNr個の第2読出有効信号REB[i]のうち3番目が有効を示しているときは、エントリ番号iをNr*k+3という演算によって生成できる。なお、無効を示す第2読出有効信号REB[i’]のエントリ番号i’は蓄積しない。
Furthermore, the second
また、第2読出待ちキュー44Bは、前記キューに所定の個数Ns以上のエントリ番号が蓄積されている期間については、停止を示す第1読出停止信号RSAを出力する。また、クロックに合わせて、前記キューに蓄積されているエントリ番号を取出して第2のエントリ番号jとして出力する。この際、前記キューが空(蓄積なし)の場合は、エントリ番号の無効値(エントリ番号の範囲外の値である所定の無効値;例えば0)を出力する。
なお、有効を示す第2読出有効信号REB[i]のエントリ番号iを前記キューに入力するのではなく、Nr個の第2読出有効信号REB[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)のうち1個以上が有効を示しているとき、第1エントリ番号kと、Nr個の第2読出有効信号REB[i]を表すビット列を前記キューに入力する方法によっても、上記と同じ機能を実現可能である。
In addition, the second
The entry number i of the second read valid signal REB [i] indicating validity is not input to the queue, but Nr second read valid signals REB [i] (i = Nr * k + 1, Nr * k + 2). ,..., Nr * k + Nr) indicates that the first entry number k and the bit string representing the Nr second read valid signals REB [i] are input to the queue when one or more of them are valid. Also, the same function as described above can be realized.
第2読出信号生成部は、第2読出待ちキュー44Bから第2のエントリ番号jを入力し、前記エントリ番号の値が有効な範囲にある場合に、前記第2のエントリ番号jを基に、第2読出アドレスRAB[j]を生成して出力する。また、前記第2のエントリ番号ENBjの値が所定の無効値である場合に無効を示し、前記以外の場合に有効を示す、第2読出有効信号REB[j]を生成して出力する。また、前記第2のエントリ番号jを入力時点から所定の時間(第2検索テーブル22Bが第2エントリ情報EDB[j]を出力するまでの時間)だけ遅延させて前記値を出力する。これにより、各比較回路3nに第2エントリ情報EDB[j]と対応する第2のエントリ番号jが同時に入力されることになる。
The second read signal generation unit inputs the second entry number j from the second
第2検索テーブル22Bは、各エントリjに第2エントリ情報EDB[j]を格納するが、前記エントリ番号jから、前記第2エントリ情報EDB[j]が記憶された、第2検索テーブル22Bの実態である第2テーブルメモリのアドレスを、簡単な演算によって生成することができる。前記演算の例は、第2テーブルメモリのアドレス=j−1であり、前記例では、エントリ番号jの第2エントリ情報EDB[j]は、第2テーブルメモリのアドレス=j−1にあるワードに記憶される。
なお、他の演算方法によってエントリ番号からアドレスを生成する方法であってもよい。前記例では、エントリ番号=第2のエントリ番号ENB[i]のとき、第2読出アドレス生成部41Bが第2検索テーブル22Bに出力する第2読出アドレスRAB[i]=第2のエントリ番号ENB[i]−1となる。
The second search table 22B stores the second entry information EDB [j] in each entry j. The second search table 22B stores the second entry information EDB [j] from the entry number j. The actual address of the second table memory can be generated by a simple calculation. The example of the calculation is the address of the second table memory = j−1. In the example, the second entry information EDB [j] of the entry number j is the word at the address of the second table memory = j−1. Is remembered.
A method of generating an address from the entry number by another calculation method may be used. In the above example, when entry number = second entry number ENB [i], second read address RAB [i] = second entry number ENB output by second read
第1エントリ番号kとNr個の第1エントリ情報EDA[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)が同時に各比較回路3nに入力される理由は、同時に入力されたエントリ番号kとエントリ情報[i]とが対応している、つまり、入力されたNr個のエントリ情報がどのエントリのものかを知るために、前記エントリ情報と同時に入力されたエントリ番号を用いることができる。
したがって、第1エントリ番号kとNr個の第1エントリ情報EDA[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)が同時に入力する方法以外にも、第1エントリ番号kの入力とNr個の第1エントリ情報EDA[i]の入力を固定の時間差とする方法によっても、前記エントリ番号とエントリ情報の対応づけが可能である。
The reason why the first entry number k and Nr pieces of first entry information EDA [i] (i = Nr * k + 1, Nr * k + 2,..., Nr * k + Nr) are simultaneously input to each
Therefore, in addition to the method in which the first entry number k and Nr pieces of first entry information EDA [i] (i = Nr * k + 1, Nr * k + 2,..., Nr * k + Nr) are input simultaneously, the first entry number k The entry number can be associated with the entry information by a method in which the input of Nr and the input of the Nr pieces of first entry information EDA [i] are set to a fixed time difference.
また、各比較回路3nから第1エントリ番号kとNr個の読出判定結果RJn[i](i=Nr*k+1,Nr*k+2,…,Nr*k+Nr)が同時に第2読出回路23Bに入力される理由や、第2のエントリ番号jと第2エントリ情報EDB[j]が同時に各比較回路3nに入力される理由についても前記と同様であり、入力されたエントリ番号とエントリ情報や読出判定の結果とを同時入力という方法によって対応づけている。
本実施の形態において、上記以外の構成については、第1の実施の形態と同様であり、ここでの説明は省略する。
Further, the first entry number k and Nr read determination results RJn [i] (i = Nr * k + 1, Nr * k + 2,..., Nr * k + Nr) are simultaneously input to the
In the present embodiment, configurations other than those described above are the same as those in the first embodiment, and a description thereof is omitted here.
[第4の実施の形態の動作]
次に、図12および図13を参照して、本実施の形態にかかる検索処理部12の動作について説明する。図12は、第4の実施の形態にかかる検索処理部の動作を示すタイムチャートである。図13は、第4の実施の形態にかかる検索処理部の動作を示すタイムチャート(続き)である。これら図12および図13では、比較回路3nの個数が2の場合であって、エントリ数Nrが2の場合を例として、検索処理部12内の各信号について時間の経過(左から右)に伴う変化が示されている。
[Operation of Fourth Embodiment]
Next, the operation of the
図12および図13において、検索状態SSn(n=1,2)の各信号は、Hレベル:検索処理中/Lレベル:検索停止中を表す信号であり、比較回路3nにフレーム情報FDn(n=1,2)が入力された時点でHレベル:検索処理中となり、1個のフレーム情報FDnに対して全エントリ(Ne=16)をテーブルから読み出した後(Nr=2であるため最短でNe/Nr=8のクロック経過後)にLレベル:検索処理停止となる。 In FIG. 12 and FIG. 13, each signal in the search state SSn (n = 1, 2) is a signal indicating H level: search processing in progress / L level: search stop in progress, and frame information FDn (n = 1, 2) is input at the H level: search processing is in progress, and all entries (Ne = 16) are read from the table for one frame information FDn (Nr = 2 because it is the shortest). L level: after the clock of Ne / Nr = 8): The search process is stopped.
第1読出有効信号REA[k]の信号は、Hレベル:有効・Lレベル:無効を表す信号であり、検索状態SS1と検索状態SS2の各信号の論理和に、第1読出停止信号RSAの論理積を行った信号となる。つまり、検索状態SS1または検索状態SS2が検索処理中(1個以上の比較回路3nが検索中)で、かつ、第1読出停止信号RSAが読出ありのとき、読出有効となる第1テーブルメモリの第1読出アドレスRAA[k]の位置に記憶された、2個(Nr=2)の第1エントリ情報EDA[i](i=2*k+1,2*k+2)が並列して同時に読み出されることになる。
The signal of the first read valid signal REA [k] is a signal representing H level: valid / L level: invalid, and the logical sum of the signals of the search state SS1 and the search state SS2 includes the first read stop signal RSA. This is a signal obtained by performing a logical product. That is, when the search state SS1 or the search state SS2 is being searched (one or
第1読出アドレスRAA[k]の信号は、0〜7(Nl=Ne/Nr=16/2=8, k=0〜Nl−1)の範囲で繰り返しクロック毎に+1ずつ増加する。ただし、値が7の次は0となる。図12および図13の第1読出アドレスRAA[k]を表す各箱内の数字はエントリ番号k(0〜7)を表しており、エントリ番号kの前記信号値はkであり、エントリ番号kと第1読出アドレスRAA[k]は同じ値となる。
つまり、第1テーブルメモリのアドレスkに、第1エントリ情報EDA[2*k+1]と第1エントリ情報EDA[2*k+2]を記憶しておき、クロックサイクル毎に、エントリ番号をインクリメントさせて、前記エントリkに対応する2個の第1エントリ情報EDAを第1テーブルメモリから並列して同時に読み出す。
The signal of the first read address RAA [k] increases by +1 for each repeated clock within a range of 0 to 7 (Nl = Ne / Nr = 16/2 = 8, k = 0 to Nl−1). However, the value after 7 is 0. The numbers in each box representing the first read address RAA [k] in FIGS. 12 and 13 represent the entry number k (0 to 7), the signal value of the entry number k is k, and the entry number k. And the first read address RAA [k] have the same value.
That is, the first entry information EDA [2 * k + 1] and the first entry information EDA [2 * k + 2] are stored at the address k of the first table memory, and the entry number is incremented every clock cycle. Two pieces of first entry information EDA corresponding to the entry k are simultaneously read in parallel from the first table memory.
なお、第1エントリ情報EDA[i]を読み出すための信号である、第1読出有効信号REA[k]と第1読出アドレスRAA[k]は、第1テーブルメモリに同時に入力される例を示しているが、同時入力ではないメモリ、例えば第1読出有効信号REA[k]を第1読出アドレスRAA[k]より所定のサイクルだけ先に入力する必要があるメモリを、第1テーブルメモリとして使用することも可能である。この場合は、第1読出回路23Aは、メモリによって規定された信号入力方法に従って、第1読出有効信号REA[k]や第1読出アドレスRAA[k]を生成することになる。
It should be noted that the first read valid signal REA [k] and the first read address RAA [k], which are signals for reading the first entry information EDA [i], are input to the first table memory at the same time. However, a memory that is not simultaneously input, for example, a memory that needs to input the first read enable signal REA [k] for a predetermined cycle before the first read address RAA [k] is used as the first table memory. It is also possible to do. In this case, the
また、第1読出有効信号REA[k]と第1読出アドレスRAA[k]によって読み出すのではなく、コマンドを用いてアクセスするメモリの場合は、第1読出回路23Aは、第1読出有効信号REA[k]が有効を示す場合に、第1読出アドレスRAA[k]の位置に記憶されたデータを読み出すための第1読出コマンド[k]を生成することとなる。
In the case of a memory that is accessed by using a command instead of reading by the first read valid signal REA [k] and the first read address RAA [k], the
第1エントリ情報EDA[i]は、第1読出有効信号REA[k]が有効時の第1読出アドレスRAA[k]の入力から2サイクル後に第1検索テーブル22Aから読み出されたデータである、2個の第1エントリ情報EDA[i](i=2*k+1,2*k+2)が出力される。図12および図13の第1エントリ情報EDA[i]を表す各箱内の数字はエントリ番号i(1〜16)を表している。 The first entry information EDA [i] is data read from the first search table 22A two cycles after the input of the first read address RAA [k] when the first read valid signal REA [k] is valid. Two pieces of first entry information EDA [i] (i = 2 * k + 1, 2 * k + 2) are output. The numbers in each box representing the first entry information EDA [i] in FIGS. 12 and 13 represent the entry numbers i (1 to 16).
なお、前記2サイクルの遅延は、前記第1テーブルメモリが入力したアドレス等の信号をラッチすることで生じる1クロックの遅延と、メモリ内のセルに記憶されているデータを出力する前にラッチするために生じる1クロックの遅延を合わせた値である。第1テーブルメモリの種類やメモリと前記第1読出回路23A等が別部品によって構成される装置の場合は、前記よりも大きい遅延となる可能性がある。
The two-cycle delay is latched before outputting the data stored in the cells in the memory and the one-clock delay generated by latching the signal such as the address input to the first table memory. Therefore, it is a value obtained by adding a delay of 1 clock generated for the purpose. In the case of a device in which the type of the first table memory, the memory, and the
また、固定遅延ではなくメモリの状況、例えば外部からの前記メモリへのアクセスの有無などによって、前記遅延量が変動する構成も可能である。この場合、前記の構成では、前記遅延の変動に応じて第1エントリ番号kを各比較回路3nに入力する必要があるため、前記遅延の変動を知りえない第1読出回路23Aから第1エントリ番号kを入力するのではなく、第1検索テーブル22Aから第1エントリ番号kを入力する。
In addition, a configuration in which the delay amount varies depending on the state of the memory instead of a fixed delay, for example, whether or not the memory is accessed from the outside. In this case, in the above configuration, since the first entry number k needs to be input to each
読出判定結果RJn[i](n=1,2)の各信号は、読出有無を表す信号であり、図12および図13の箱が示された期間が、読出ありを示している。また、前記各箱内の数字はエントリ番号i(1〜16)を表している。
各比較回路3n(n=1,2)は、第1エントリ情報EDA[i]の入力から1サイクル後に読出判定結果RJn[i]を出力する。前記1サイクルの遅延は、比較回路3nで読出判定結果RJn[i]をラッチして出力することによって生じる。なお、第2検索テーブル読出判定nが、第1エントリ情報EDA[i]とフレーム情報FDnの複雑な演算を必要とする場合は、1サイクルより大きい遅延となる場合もある。
Each signal of the read determination result RJn [i] (n = 1, 2) is a signal indicating the presence / absence of reading, and the period in which the boxes in FIGS. 12 and 13 are shown indicates that there is reading. The numbers in the boxes represent entry numbers i (1 to 16).
Each
ここで、図12および図13において、読出判定結果RJ1[i]は、エントリ番号iが7,10,11,13について、読出ありを示す場合が図示されている。つまり、比較回路31は、第2エントリ情報EDB[7],[10],[11],[13]を読み出すという第2検索テーブル読出判定を得たことになる。
同様に、読出判定結果RJ2[i]は、エントリ番号iが8,9,12,4について読出ありを示す場合が図示されている。つまり、比較回路32は、第2エントリ情報EDB[8],[9],[12],[4]を読み出すという第2検索テーブル読出判定を得たことになる。
Here, in FIG. 12 and FIG. 13, the read determination result RJ1 [i] illustrates the case where the read number is indicated for the entry numbers i of 7, 10, 11, and 13. That is, the
Similarly, the read determination result RJ2 [i] shows the case where the entry number i indicates that there is a read for 8, 9, 12, and 4. That is, the
第2読出待ちキュー44Bは、上記の読出判定結果RJn[i]が有効となったエントリ番号である、7,8,9,10,11,12,13,4をキューに入力して蓄積し、クロック1サイクルにつき1個のエントリ番号を取り出して出力する。なお、クロック1サイクルにつき、最大2個(Nl=2)のエントリ番号をキューに入力する可能性がある。このため、キューのオーバーフローが生じないよう、キューに蓄積したエントリ番号の個数が3個以上のとき、すなわち、第1読出停止信号RSAを出力するためのキューの閾値を3と設定した場合、第1読出停止信号RSAによって、第1検索テーブル22Aからの第1エントリ情報EDAの読み出しを停止させる。
The second
前記停止中は、第1エントリ情報EDAが各比較回路3nに入力されないため、結果として、前記キューへのエントリ番号の入力が停止する。なお、停止を示す第1読出停止信号RSAを出力しても、キューへのエントリ番号の入力が停止するまでには一定の遅延があるため、前記閾値を超えて前記遅延時間内にキューへの入力があった場合にもオーバーフローを生じない最大蓄積量をキューに設ける必要がある。
Since the first entry information EDA is not input to each
第2読出待ちキュー44Bには、図13に示すように、時刻T1に、まず前記キューにエントリ番号7とエントリ番号8が同時に入力されるが、前記キューが空の状態であるためエントリ番号7については前記キューに蓄積されることなく、第2読出信号生成部に出力され、第2読出信号生成部から第2読出アドレスRAB[7]として第2検索テーブル22Bに出力される。前記エントリ番号8についてはキューに蓄積される。次のクロックサイクルでは、前記キューにエントリ番号9とエントリ番号10が同時に入力されるが、前記キューにエントリ番号8が蓄積中であるため、前記エントリ番号9,10は前記キューに蓄積される。また、前記キューに蓄積中であったエントリ番号8については前記キューから出力され、第2読出信号生成部から第2読出アドレスRAB[8]として第2検索テーブル22Bに出力される。
As shown in FIG. 13, at the time T1, the
時刻T2のクロックサイクルでは、前記キューにエントリ番号11とエントリ番号12が同時に入力されるが、前記キューにエントリ番号9,10が蓄積中であるため、前記エントリ番号11,12は前記キューに蓄積される。また、前記キューに蓄積中であったエントリ番号9については前記キューから出力され、第2読出信号生成部から第2読出アドレスRAB[9]として第2検索テーブル22Bに出力される。ここで、キューに蓄積されたエントリ番号は10,11,12の3個となって第1読出停止信号RSAを出力する閾値に達するので、第1読出停止信号RSAが読出停止を示す値(L)に変化している。
In the clock cycle at time T2,
時刻T3のクロックサイクルでは、前記キューにエントリ番号13が入力されるが、前記キューにエントリ番号10,11,12が蓄積中であるため、前記エントリ番号13は前記キューに蓄積される。また、前記キューに蓄積中であったエントリ番号10については前記キューから出力され、第2読出信号生成部から第2読出アドレスRAB[10]として第2検索テーブル22Bに出力される。ここで、キューに蓄積されたエントリ番号は11,12,13の3個であるため、第1読出停止信号RSAを出力する閾値に達しているので、前クロックサイクルから引き続き、第1読出停止信号RSAが読出停止を示す値(L)を維持する。
In the clock cycle at time T3, the
時刻T4のクロックサイクルでは、入力がなく、前記キューに蓄積中であったエントリ番号11については前記キューから出力され、第2読出信号生成部から第2読出アドレスRAB[11]として第2検索テーブル22Bに出力される。ここで、キューに蓄積されたエントリ番号は11,12の2個となって第1読出停止信号RSAを出力する閾値未満となるため、第1読出停止信号RSAが読出ありを示す値(H)に変化している。
In the clock cycle at time T4, there is no input, and the
時刻T5のクロックサイクルも同様に入力がなく、前記キューに蓄積中であったエントリ番号12については前記キューから出力され、第2読出信号生成部から第2読出アドレスRAB[12]として第2検索テーブル22Bに出力される。
時刻T6のクロックサイクルも同様に入力がなく、前記キューに蓄積中であったエントリ番号13については前記キューから出力され、第2読出信号生成部から第2読出アドレスRAB[13]として第2検索テーブル22Bに出力される。なお、第1読出停止信号RSAによって読出停止となっていないならば、エントリ番号4の入力があるタイミングであるが、3サイクル前に第1読出停止信号RSAが読出停止を出力したことによって、第1エントリ情報EDA[3],[4]以後の読出が2サイクル分遅れている。
Similarly, the clock cycle at time T5 has no input, and the
Similarly, the clock cycle at time T6 is not input, and the
時刻T7のクロックサイクルも同様に入力がなく、前記キューも空となったため、第2読出有効信号REBは無効となる。
時刻T8のエントリ番号4が、第1検索テーブル読出停止によって2サイクル分遅れて入力される。前記キューが空の状態であるためエントリ番号4については前記キューに蓄積されることなく、第2読出信号生成部に出力され、第2読出信号生成部から第2読出アドレスRAB[4]として第2検索テーブル22Bに出力される。
Similarly, there is no input at the clock cycle at time T7, and the queue is also emptied, so the second read valid signal REB is invalidated.
第2エントリ情報EDB[i]は、第2読出有効信号REB[i]が有効時の第2読出アドレスRAB[i]の入力から2サイクル後に第2検索テーブル22Bから読み出されたデータである、第2エントリ情報EDB[i]が出力される。なお、前記2サイクルの遅延は、前記第2テーブルメモリが入力したアドレス等の信号をラッチすることで生じる1クロックの遅延と、メモリ内のセルに記憶されているデータを出力する前にラッチするために生じる1クロックの遅延を合わせた値であり、第2テーブルメモリの種類やメモリと前記第2読出回路23B等が別部品によって構成される装置の場合は、前記よりも大きい遅延となる可能性がある。なお、図12および図13の第2エントリ情報EDB[i]を表す各箱内の数字はエントリ番号i(1〜16)を表しており、第2読出有効信号REB[i]が有効を示したエントリ7,8,9,10,11,12,13,4について、出力されている。
The second entry information EDB [i] is data read from the second search table 22B after two cycles from the input of the second read address RAB [i] when the second read valid signal REB [i] is valid. Second entry information EDB [i] is output. The two-cycle delay is latched before outputting the data stored in the cells in the memory and the one-clock delay generated by latching the signal such as the address input to the second table memory. This is a value that combines the delay of one clock generated for this purpose, and in the case of a device in which the type of the second table memory and the memory and the
[第4の実施の形態の効果]
このように、本実施の形態は、前記第1検索テーブル22Aが、アドレスごとに、複数のエントリと対応するNr個の第1エントリ情報EDAを記憶し、前記比較回路3mが、前記第1検索テーブル22Aから並列して同時に読み出されたNr個の第1エントリ情報EDAを前記フレーム情報FDと比較し、これら第1エントリ情報EDAごとに得られたNr個の前記読出判定結果RJnを前記第2読出回路23Bへ出力し、前記第2読出回路23Bが、前記比較回路3mから出力されたNr個の前記読出判定結果RJnのいずれかが読み出しありを示す場合には、当該読出判定結果RJnを得た前記第1エントリ情報EDAと対応する前記第2エントリ情報EDBを示す第2エントリ番号ENBを第2読出待ちキュー44Bへ順次蓄積し、前記第2読出待ちキュー44Bに蓄積されている前記第2エントリ番号ENBを順次読み出して、前記第2検索テーブル22Bの当該第2エントリ番号のエントリから前記第2エントリ情報EDBを読み出して前記比較回路3nへ出力するための第2読出信号RBを前記第2検索テーブル22Bへ出力するようにしたものである。
[Effect of the fourth embodiment]
Thus, in the present embodiment, the first search table 22A stores Nr pieces of first entry information EDA corresponding to a plurality of entries for each address, and the comparison circuit 3m uses the first search table. The Nr pieces of first entry information EDA read simultaneously in parallel from the table 22A are compared with the frame information FD, and the Nr pieces of read determination results RJn obtained for each of the first entry information EDA are compared with the first information. 2 When the
これにより、第1の実施の形態では、第1検索テーブル22Aから第1エントリ情報EDAを1個ずつ読み出していたのに対して、本例ではNr個の第1エントリ情報EDAを一度に読み出すので、第1検索テーブル22Aから全てのエントリを読み出すのに必要な時間を、第1の実施の形態での構成と比較して1/Nrに短縮することができる。 Thereby, in the first embodiment, the first entry information EDA is read one by one from the first search table 22A, whereas in this example, Nr pieces of first entry information EDA are read at a time. The time required to read all entries from the first search table 22A can be shortened to 1 / Nr as compared with the configuration in the first embodiment.
第2検索テーブル22Bの読み出しが多数生じることで、第2検索テーブル読出待ちエントリキューが満杯となり、第1読出停止信号RSAによって第1検索テーブル22Aの読み出しを中断することになった場合、本例での第1検索テーブル22Aから全てのエントリを読み出すのに必要な時間は増大する。しかし、第1エントリ情報EDAが示す検索条件にフレーム情報FDが適合する可能性を低く抑えることで、例えば第1の実施の形態で述べたケース3のように、第1エントリ情報EDAにハッシュを用いて前記ハッシュ値のビット数を増やすことで、第2検索テーブル22Bの読み出し回数を削減できるため、前記時間増大を抑制可能である。
If the second search table 22B is read many times, the second search table read waiting entry queue becomes full, and reading of the first search table 22A is interrupted by the first read stop signal RSA. The time required to read all the entries from the first search table 22A at 1 is increased. However, by suppressing the possibility that the frame information FD matches the search condition indicated by the first entry information EDA, for example, as in the
[実施の形態の拡張]
以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解しうる様々な変更をすることができる。また、各実施形態については、矛盾しない範囲で任意に組み合わせて実施することができる。
[Extended embodiment]
The present invention has been described above with reference to the embodiments, but the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. In addition, each embodiment can be implemented in any combination within a consistent range.
10…フレーム検索処理装置、11…フレーム情報抽出部、12…検索処理部、13…フレームバッファ、14…フレーム合成部、21…フレーム情報振分回路、22A…第1検索テーブル、22B…第2検索テーブル、23A…第1読出回路、23B…第2読出回路、24…検索結果合流回路、31,32,3n,3N…比較回路、41A…第1読出有効生成部、41B…第2読出有効生成部、42A…第1読出アドレス生成部、42B…第2読出アドレス生成部、43A…第2エントリ番号分離部、44B…第2読出待ちキュー、M1…第1テーブルメモリ、M2…第2テーブルメモリ、M0…共通テーブルメモリ、FIN…入力フレーム、FD,FD1,FD2,FDn,FDN…フレーム情報、SS,SS1,SS2,SSn,SSN…検索状態、SR,SR1,SR2,SRn,SRN…検索結果、FOUT…出力フレーム、RA…第1読出信号、RAA…第1読出アドレス、REA…第1読出有効信号、RB…第2読出信号、RAB…第2読出アドレス、REB…第2読出有効信号、RAD…読出アドレス、EDA…第1エントリ情報、EDB…第2エントリ情報、ENA…第1エントリ番号、ENB…第2エントリ番号、RJ,RJn…読出判定結果、RSA…第1読出停止信号。
DESCRIPTION OF
Claims (8)
前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理部とを備え、
前記検索処理部は、
前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶する第1検索テーブルと、
前記エントリごとに、当該エントリと対応する前記検索条件のうち前記第1エントリ情報以外の部分からなる第2エントリ情報を記憶する第2検索テーブルと、
前記エントリごとに、前記第1検索テーブルから読み出された前記第1エントリ情報および前記第2検索テーブルから読み出された前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較回路と、
前記各エントリから巡回的に前記第1エントリ情報を読み出して前記比較回路へ出力するための第1読出信号を前記第1検索テーブルへ出力する第1読出回路と、
前記各エントリから巡回的に前記第2エントリ情報を読み出して前記比較回路へ出力するための第2読出信号を前記第2検索テーブルへ出力する第2読出回路とを有し、
前記比較回路は、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、
前記第2読出回路は、前記比較回路から出力された前記読出判定結果が読み出しありを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行い、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わない
ことを特徴とするフレーム検索処理装置。 A frame information extraction unit for extracting frame information for specifying frame processing to be performed on the input frame from the input frame;
The frame information extracted by the frame information extraction unit is sequentially compared with search conditions registered in advance for each entry to search for a matching entry that matches the input frame, and corresponds to the obtained matching entry. A search processing unit that outputs search results as processing information indicating the contents of frame processing to be performed on the input frame,
The search processing unit
For each entry, a first search table that stores first entry information comprising a part of the search condition corresponding to the entry;
A second search table that stores, for each entry, second entry information consisting of portions other than the first entry information in the search conditions corresponding to the entry;
For each entry, by comparing the first entry information read from the first search table and the second entry information read from the second search table with the frame information, the entry becomes A comparison circuit for determining whether or not the matching entry matches the input frame;
A first reading circuit that cyclically reads the first entry information from each entry and outputs the first reading signal to the comparison circuit for output to the comparison circuit;
A second read circuit for outputting a second read signal for cyclically reading the second entry information from each entry and outputting it to the comparison circuit to the second search table;
When the comparison circuit compares the first entry information and the second entry information of the entry with the frame information, the comparison circuit first compares the first entry information with the frame information, so that the first entry information is wherein determining whether to comply with the frame information, and outputs to the second readout circuit a first adaptation determination result obtained by the determination as read judgment result indicating reading necessity of the second entry information, the first If the result of the conformity determination indicates conformity, the second entry information is compared with the frame information to determine whether the second entry information is compatible with the frame information, and is obtained by the determination. When the second conformity determination result indicates conformity, the entry number of the entry, a part of the first entry information, or a part of the second entry information It is output as the search result corresponding to the fit entry,
The second read circuit reads the second entry information from the second search table when the read determination result output from the comparison circuit indicates that there is a read, and the read determination result is read. The frame search processing device characterized by not reading the second entry information from the second search table when indicating no.
前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理部とを備え、 The frame information extracted by the frame information extraction unit is sequentially compared with search conditions registered in advance for each entry to search for a matching entry that matches the input frame, and corresponds to the obtained matching entry. A search processing unit that outputs search results as processing information indicating the contents of frame processing to be performed on the input frame,
前記検索処理部は、 The search processing unit
前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶するとともに、当該検索条件のうち当該第1エントリ情報以外の部分からなる第2エントリ情報に関する第2エントリ番号を、当該第1エントリ情報に付加して記憶する第1検索テーブルと、 For each entry, first entry information including a part of the search condition corresponding to the entry is stored, and a second entry relating to second entry information including a part other than the first entry information in the search condition A first search table for storing a number in addition to the first entry information;
前記エントリごとに前記第2エントリ情報を記憶する第2検索テーブルと、 A second search table for storing the second entry information for each entry;
前記エントリごとに、前記第1エントリ情報および前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較回路と、 A comparison circuit that determines, for each entry, whether the entry is a matching entry that matches the input frame by comparing the first entry information and the second entry information with the frame information;
前記第1検索テーブルから前記各エントリの第1エントリ情報を巡回的に読み出して、当該第1エントリ情報に付加されている前記第2エントリ番号を分離し、当該第2エントリ番号を分離した第1エントリ情報を前記比較回路へ出力する第1読出回路と、 The first entry information of each entry is read cyclically from the first search table, the second entry number added to the first entry information is separated, and the second entry number is separated. A first readout circuit for outputting entry information to the comparison circuit;
前記第1読出回路で分離した前記第2エントリ番号に基づいて、当該前記第2エントリ番号に対応するエントリからの第2エントリ情報の読み出しを指示する第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力する第2読出回路とを有し、 Based on the second entry number separated by the first read circuit, a second read signal is generated to instruct reading of second entry information from an entry corresponding to the second entry number, and the second read number is generated. A second readout circuit for outputting a signal to the second search table;
前記比較回路は、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1読出回路から出力された前記第1エントリ情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、 When comparing the first entry information and the second entry information of the entry with the frame information, the comparison circuit first compares the first entry information output from the first readout circuit with the first entry information and the second entry information. It is determined whether or not the first entry information is compatible with the frame information, and the first determination result obtained by the determination is used as a read determination result indicating whether or not the second entry information needs to be read to the second reading circuit. If the first conformity determination result indicates conformity, the second entry information is compared with the frame information to determine whether the second entry information conforms to the frame information; When the second conformity determination result obtained by the determination indicates conformity, the entry number of the entry, a part of the first entry information, or the second entry Some information is output as the search result corresponding to the fit entry,
前記第2読出回路は、前記比較回路から出力された前記読出判定結果が読み出しありを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行い、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わない The second read circuit reads the second entry information from the second search table when the read determination result output from the comparison circuit indicates that there is a read, and the read determination result is read. When indicating none, the second entry information is not read from the second search table.
ことを特徴とするフレーム検索処理装置。 A frame search processing device characterized by that.
前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理部とを備え、 The frame information extracted by the frame information extraction unit is sequentially compared with search conditions registered in advance for each entry to search for a matching entry that matches the input frame, and corresponds to the obtained matching entry. A search processing unit that outputs search results as processing information indicating the contents of frame processing to be performed on the input frame,
前記検索処理部は、 The search processing unit
前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶する第1検索テーブルと、 For each entry, a first search table that stores first entry information comprising a part of the search condition corresponding to the entry;
前記エントリごとに、当該エントリと対応する前記検索条件のうち前記第1エントリ情報以外の部分からなる第2エントリ情報を記憶する第2検索テーブルと、 A second search table that stores, for each entry, second entry information consisting of portions other than the first entry information in the search conditions corresponding to the entry;
前記エントリごとに、前記第1エントリ情報および前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較回路と、 A comparison circuit that determines, for each entry, whether the entry is a matching entry that matches the input frame by comparing the first entry information and the second entry information with the frame information;
前記各エントリから巡回的に、複数の前記第1エントリ情報を並列的に読み出して前記各比較回路へ分配するための第1読出信号を前記第1検索テーブルへ出力する第1読出回路と、 A first read circuit that cyclically reads a plurality of the first entry information from each entry and outputs a first read signal for distributing the first entry information to the comparison circuits to the first search table;
前記各エントリから巡回的に前記第2エントリ情報を読み出して前記比較回路へ出力するための第2読出信号を前記第2検索テーブルへ出力する第2読出回路とを有し、 A second read circuit for outputting a second read signal for cyclically reading the second entry information from each entry and outputting it to the comparison circuit to the second search table;
前記比較回路は、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1検索テーブルから分配された前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、 When comparing the first entry information and the second entry information of the entry with the frame information, the comparison circuit first compares the first entry information distributed from the first search table with the frame information. Thus, it is determined whether or not the first entry information is compatible with the frame information, and the first conformity determination result obtained by the determination is used as a read determination result indicating whether or not the second entry information needs to be read. 2 When output to the reading circuit and the first conformity determination result indicates conformity, whether the second entry information conforms to the frame information by comparing the second entry information with the frame information. If the second conformity determination result obtained by the determination indicates conformity, the entry number of the entry, a part of the first entry information Or outputs a portion of the second entry information, as the search result corresponding to the fit entry,
前記第2読出回路は、前記比較回路から出力された前記読出判定結果のうち読み出しありを示す読出判定結果について、当該読出判定結果を得た前記第1エントリ情報と対応する前記第2エントリ情報を示す第2エントリ番号をキューへ順次蓄積し、当該キューから順次読み出した前記第2エントリ番号に基づいて、当該第2のエントリ番号に対応するエントリからの前記第2エントリ情報の読み出しを指示する前記第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力し、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わない The second read circuit outputs the second entry information corresponding to the first entry information obtained from the read determination result for the read determination result indicating that there is a read out of the read determination results output from the comparison circuit. The second entry number shown is sequentially accumulated in a queue, and the second entry information is instructed to be read from the entry corresponding to the second entry number based on the second entry number read sequentially from the queue A second read signal is generated, and the second read signal is output to the second search table. When the read determination result indicates no read, the second entry information is read from the second search table. Do not
ことを特徴とするフレーム検索処理装置。 A frame search processing device characterized by that.
前記比較回路を複数備えるとともに、これら比較回路のうち前記適合エントリの検索中である比較回路以外のいずれか1つに対して、前記フレーム情報抽出部で得られた前記フレーム情報を振り分けるフレーム情報振分回路をさらに備えることを特徴とするフレーム検索処理装置。 In the frame search processing device according to any one of claims 1 to 3 ,
A plurality of the comparison circuits are provided, and frame information distribution for distributing the frame information obtained by the frame information extraction unit to any one of the comparison circuits other than the comparison circuit for which the matching entry is being searched for. A frame search processing device further comprising a branch circuit.
前記第1読出回路は、前記第1エントリ情報を読み出す際、前記各エントリから巡回的に、複数の前記第1エントリ情報を並列的に読み出して前記各比較回路へ分配するための第1読出信号を前記第1検索テーブルへ出力し、 When reading the first entry information, the first reading circuit cyclically reads the first entry information from each entry in parallel and distributes the first entry information to the comparison circuits. To the first search table,
前記比較回路は、前記エントリの前記第1エントリ情報を前記フレーム情報と比較する際、前記第1検索テーブルから分配された前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、 The comparison circuit compares the first entry information distributed from the first search table with the frame information when comparing the first entry information of the entry with the frame information. It is determined whether or not the information is compatible with the frame information, and a first conformity determination result obtained by the determination is output to the second reading circuit as a read determination result indicating whether the second entry information is to be read,
前記第2読出回路は、前記比較回路から出力された前記読出判定結果のうち読み出しありを示す読出判定結果について、当該読出判定結果を得た前記第1エントリ情報と対応する前記第2エントリ情報を示す第2エントリ番号をキューへ順次蓄積し、当該キューから順次読み出した前記第2エントリ番号に基づいて、当該第2のエントリ番号に対応するエントリからの前記第2エントリ情報の読み出しを指示する前記第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力する The second read circuit outputs the second entry information corresponding to the first entry information obtained from the read determination result for the read determination result indicating that there is a read out of the read determination results output from the comparison circuit. The second entry number shown is sequentially accumulated in a queue, and the second entry information is instructed to be read from the entry corresponding to the second entry number based on the second entry number read sequentially from the queue Generate a second read signal and output the second read signal to the second search table
ことを特徴とするフレーム検索処理装置。 A frame search processing device characterized by that.
検索処理部が、前記フレーム情報抽出ステップで抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理ステップとを備え、
前記検索処理ステップは、
第1検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶するステップと、
第2検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件のうち前記第1エントリ情報以外の部分からなる第2エントリ情報を記憶するステップと、
比較回路が、前記エントリごとに、前記第1検索テーブルから読み出された前記第1エントリ情報および前記第2検索テーブルから読み出された前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較ステップと、
第1読出回路が、前記各エントリから巡回的に前記第1エントリ情報を読み出して前記比較回路へ出力するための第1読出信号を前記第1検索テーブルへ出力する第1読出ステップと、
第2読出回路が、前記各エントリから巡回的に前記第2エントリ情報を読み出して前記比較回路へ出力するための第2読出信号を前記第2検索テーブルへ出力する第2読出ステップとを有し、
前記比較ステップは、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、
前記第2読出ステップは、前記比較回路から出力された前記読出判定結果が読み出しありを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行い、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わない
ことを特徴とするフレーム検索処理方法。 A frame information extraction step for extracting, from the input frame, frame information for identifying frame processing to be executed by the frame information extraction unit for the input frame;
A search processing unit searches the matching entry that matches the input frame by sequentially comparing the frame information extracted in the frame information extraction step with a search condition registered in advance for each entry. A search processing step for outputting a search result corresponding to the matching entry as processing information indicating the content of the frame processing to be performed on the input frame,
The search processing step includes:
A first search table storing, for each entry, first entry information including a part of the search condition corresponding to the entry;
A second search table storing, for each entry, second entry information including a portion other than the first entry information in the search condition corresponding to the entry;
A comparison circuit compares, for each entry, the first entry information read from the first search table and the second entry information read from the second search table with the frame information. A comparison step for determining whether the entry is a matching entry that matches the input frame;
A first reading step in which a first reading circuit outputs, to the first search table, a first reading signal for cyclically reading the first entry information from each entry and outputting it to the comparison circuit;
A second reading step in which the second reading circuit outputs a second reading signal for cyclically reading the second entry information from each entry and outputting the information to the comparison circuit to the second search table; ,
In the comparing step, when the first entry information and the second entry information of the entry are compared with the frame information, the first entry information is first compared with the frame information so that the first entry information is wherein determining whether to comply with the frame information, and outputs to the second readout circuit a first adaptation determination result obtained by the determination as read judgment result indicating reading necessity of the second entry information, the first If the result of the conformity determination indicates conformity, the second entry information is compared with the frame information to determine whether the second entry information is compatible with the frame information, and is obtained by the determination. If the second conformity determination result indicates conformity, the entry number of the entry, a part of the first entry information, or the second entry information The section is output as the search result corresponding to the fit entry,
The second reading step reads the second entry information from the second search table when the read determination result output from the comparison circuit indicates that there is a read, and the read determination result is read A frame search processing method characterized by not reading the second entry information from the second search table when indicating no.
検索処理部が、前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理ステップとを備え、 The search processing unit searches for a matching entry that matches the input frame by sequentially comparing the frame information extracted by the frame information extraction unit with a search condition registered in advance for each entry. A search processing step for outputting a search result corresponding to the matching entry as processing information indicating the content of the frame processing to be performed on the input frame,
前記検索処理ステップは、 The search processing step includes:
第1検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶するとともに、当該検索条件のうち当該第1エントリ情報以外の部分からなる第2エントリ情報に関する第2エントリ番号を、当該第1エントリ情報に付加して記憶するステップと、 The first search table stores, for each entry, first entry information including a part of the search condition corresponding to the entry, and a second search element including a part other than the first entry information. Adding a second entry number related to the entry information to the first entry information and storing the second entry number;
第2検索テーブルが、前記エントリごとに前記第2エントリ情報を記憶するステップと、 A second search table storing the second entry information for each entry;
比較回路が、前記エントリごとに、前記第1エントリ情報および前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較ステップと、 A comparison step in which a comparison circuit determines, for each entry, whether the entry is a matching entry that matches the input frame by comparing the first entry information and the second entry information with the frame information. When,
第1読出回路が、前記第1検索テーブルから前記各エントリの第1エントリ情報を巡回的に読み出して、当該第1エントリ情報に付加されている前記第2エントリ番号を分離し、当該第2エントリ番号を分離した第1エントリ情報を前記比較回路へ出力する第1読出ステップと、 The first reading circuit cyclically reads the first entry information of each entry from the first search table, separates the second entry number added to the first entry information, and the second entry A first reading step of outputting first entry information with separated numbers to the comparison circuit;
第2読出回路が、前記第1読出回路で分離した前記第2エントリ番号に基づいて、当該前記第2エントリ番号に対応するエントリからの第2エントリ情報の読み出しを指示する第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力する第2読出ステップとを有し、 Based on the second entry number separated by the first read circuit, the second read circuit generates a second read signal instructing reading of the second entry information from the entry corresponding to the second entry number And a second reading step for outputting the second reading signal to the second search table,
前記比較ステップは、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1読出回路から出力された前記第1エントリ情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、 In the comparison step, when comparing the first entry information and the second entry information of the entry with the frame information, the comparison step first compares the first entry information output from the first readout circuit with the first entry information. It is determined whether or not the first entry information is compatible with the frame information, and the first determination result obtained by the determination is used as a read determination result indicating whether or not the second entry information needs to be read to the second reading circuit. If the first conformity determination result indicates conformity, the second entry information is compared with the frame information to determine whether the second entry information conforms to the frame information; When the second conformity determination result obtained by the determination indicates conformity, the entry number of the entry, a part of the first entry information, or the second entry Some birds information, and output as the search result corresponding to the fit entry,
前記第2読出ステップは、前記比較回路から出力された前記読出判定結果が読み出しありを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行い、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わない The second reading step reads the second entry information from the second search table when the read determination result output from the comparison circuit indicates that there is a read, and the read determination result is read When indicating none, the second entry information is not read from the second search table.
ことを特徴とするフレーム検索処理方法。 A frame search processing method characterized by the above.
検索処理部が、前記フレーム情報抽出部で抽出した前記フレーム情報を、予めエントリごとに登録されている検索条件と順次比較することにより、前記入力フレームと適合する適合エントリを検索し、得られた適合エントリと対応する検索結果を、前記入力フレームに対して実行すべきフレーム処理の内容を示す処理情報として出力する検索処理ステップとを備え、 The search processing unit searches for a matching entry that matches the input frame by sequentially comparing the frame information extracted by the frame information extraction unit with a search condition registered in advance for each entry. A search processing step for outputting a search result corresponding to the matching entry as processing information indicating the content of the frame processing to be performed on the input frame,
前記検索処理ステップは、 The search processing step includes:
第1検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件の一部からなる第1エントリ情報を記憶するステップと、 A first search table storing, for each entry, first entry information including a part of the search condition corresponding to the entry;
第2検索テーブルが、前記エントリごとに、当該エントリと対応する前記検索条件のうち前記第1エントリ情報以外の部分からなる第2エントリ情報を記憶するステップと、 A second search table storing, for each entry, second entry information including a portion other than the first entry information in the search condition corresponding to the entry;
比較回路が、前記エントリごとに、前記第1エントリ情報および前記第2エントリ情報を、前記フレーム情報と比較することにより、当該エントリが前記入力フレームと適合する適合エントリか否かを判定する比較ステップと、 A comparison step in which a comparison circuit determines, for each entry, whether the entry is a matching entry that matches the input frame by comparing the first entry information and the second entry information with the frame information. When,
第1読出回路が、前記各エントリから巡回的に、複数の前記第1エントリ情報を並列的に読み出して前記各比較回路へ分配するための第1読出信号を前記第1検索テーブルへ出力する第1読出ステップと、 A first read circuit cyclically reads a plurality of the first entry information from each entry in parallel and outputs a first read signal for distribution to each comparison circuit to the first search table. One reading step;
第2読出回路が、前記各エントリから巡回的に前記第2エントリ情報を読み出して前記比較回路へ出力するための第2読出信号を前記第2検索テーブルへ出力する第2読出ステップとを有し、 A second reading step in which the second reading circuit outputs a second reading signal for cyclically reading the second entry information from each entry and outputting the information to the comparison circuit to the second search table; ,
前記比較ステップは、前記エントリの前記第1エントリ情報および前記第2エントリ情報を前記フレーム情報と比較する際、まず前記第1検索テーブルから分配された前記第1エントリ情報を前記フレーム情報と比較することにより、前記第1エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第1適合判定結果を前記第2エントリ情報の読出要否を示す読出判定結果として前記第2読出回路へ出力し、当該第1適合判定結果が適合を示す場合には、前記第2エントリ情報を前記フレーム情報と比較することにより、前記第2エントリ情報が前記フレーム情報と適合するか否か判定し、当該判定により得られた第2適合判定結果が適合を示す場合には、当該エントリのエントリ番号、前記第1エントリ情報の一部、または前記第2エントリ情報の一部を、前記適合エントリと対応する前記検索結果として出力し、 The comparing step compares the first entry information distributed from the first search table with the frame information when comparing the first entry information and the second entry information of the entry with the frame information. Thus, it is determined whether or not the first entry information is compatible with the frame information, and the first conformity determination result obtained by the determination is used as a read determination result indicating whether or not the second entry information needs to be read. 2 When output to the reading circuit and the first conformity determination result indicates conformity, whether the second entry information conforms to the frame information by comparing the second entry information with the frame information. If the second conformity determination result obtained by the determination indicates conformity, the entry number of the entry, the first entry information Part or a portion of the second entry information, and output as the search result corresponding to the fit entry,
前記第2読出ステップは、前記比較回路から出力された前記読出判定結果のうち読み出しありを示す読出判定結果について、当該読出判定結果を得た前記第1エントリ情報と対応する前記第2エントリ情報を示す第2エントリ番号をキューへ順次蓄積し、当該キューから順次読み出した前記第2エントリ番号に基づいて、当該第2のエントリ番号に対応するエントリからの前記第2エントリ情報の読み出しを指示する前記第2読出信号を生成し、当該第2読出信号を前記第2検索テーブルへ出力し、前記読出判定結果が読み出しなしを示す場合には、前記第2検索テーブルからの前記第2エントリ情報の読み出しを行わない In the second reading step, the second entry information corresponding to the first entry information from which the read determination result is obtained for the read determination result indicating that there is a read out of the read determination results output from the comparison circuit. The second entry number shown is sequentially accumulated in a queue, and the second entry information is instructed to be read from the entry corresponding to the second entry number based on the second entry number read sequentially from the queue A second read signal is generated, and the second read signal is output to the second search table. When the read determination result indicates no read, the second entry information is read from the second search table. Do not
ことを特徴とするフレーム検索処理方法。 A frame search processing method characterized by the above.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012096289A JP5848185B2 (en) | 2012-04-20 | 2012-04-20 | Frame search processing apparatus and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2012096289A JP5848185B2 (en) | 2012-04-20 | 2012-04-20 | Frame search processing apparatus and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2013225739A JP2013225739A (en) | 2013-10-31 |
| JP5848185B2 true JP5848185B2 (en) | 2016-01-27 |
Family
ID=49595538
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2012096289A Expired - Fee Related JP5848185B2 (en) | 2012-04-20 | 2012-04-20 | Frame search processing apparatus and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5848185B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3208741B2 (en) | 1992-10-23 | 2001-09-17 | 松山 家昌 | Hemodiafiltration equipment |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6319740B2 (en) * | 2014-03-25 | 2018-05-09 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Method for speeding up data compression, computer for speeding up data compression, and computer program therefor |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004336427A (en) * | 2003-05-08 | 2004-11-25 | Mitsubishi Electric Corp | Search circuit and packet transfer device |
| JP4263718B2 (en) * | 2005-12-16 | 2009-05-13 | 日本電信電話株式会社 | Communication processing apparatus and communication processing method |
| JP4971396B2 (en) * | 2009-09-03 | 2012-07-11 | 日本電信電話株式会社 | Communication processing circuit and communication processing method |
-
2012
- 2012-04-20 JP JP2012096289A patent/JP5848185B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3208741B2 (en) | 1992-10-23 | 2001-09-17 | 松山 家昌 | Hemodiafiltration equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2013225739A (en) | 2013-10-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7606236B2 (en) | Forwarding information base lookup method | |
| US8295286B2 (en) | Apparatus and method using hashing for efficiently implementing an IP lookup solution in hardware | |
| US7017021B2 (en) | High-speed message forwarding lookups for arbitrary length strings using pipelined memories | |
| CN113242186B (en) | Method and apparatus for using multiple linked memory lists | |
| CN102307149B (en) | IP (internet protocol) lookup method and device and route updating method and device | |
| TWI491206B (en) | Search for serial memory | |
| JP4890613B2 (en) | Packet switch device | |
| RU2012145865A (en) | HETEROGENEOUS INTERCONNECTED NETWORK WITH PERFORMANCE AND TRAFFIC | |
| JP2017011423A (en) | System and method for data processing | |
| US8072974B1 (en) | Method and apparatus for improving packet processing performance using multiple contexts | |
| JP7241194B2 (en) | MEMORY MANAGEMENT METHOD AND APPARATUS | |
| CN111131408B (en) | FPGA-based network protocol stack architecture design method | |
| TW201716984A (en) | System and method for enabling high read rates to data element lists | |
| JP5848185B2 (en) | Frame search processing apparatus and method | |
| Le et al. | Scalable tree-based architectures for IPv4/v6 lookup using prefix partitioning | |
| JP5624579B2 (en) | On-chip router | |
| CN118041786A (en) | Method and system for network on chip arbitration | |
| EP1508225B1 (en) | Method for data storage in external and on-chip memory in a packet switch | |
| Le et al. | Memory-efficient and scalable virtual routers using FPGA | |
| US20100054272A1 (en) | Storage device capable of accommodating high-speed network using large-capacity low-speed memory | |
| JP5847887B2 (en) | On-chip router and multi-core system using the same | |
| US10389626B2 (en) | Transfer device | |
| CN101645852B (en) | Equipment and method for classifying network packet | |
| CN109347747B (en) | Data processing method and device | |
| CN119011470A (en) | Route searching method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140829 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150619 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150707 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150828 |
|
| 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: 20151124 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151126 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5848185 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |