JP3454884B2 - Memory and its application device - Google Patents

Memory and its application device

Info

Publication number
JP3454884B2
JP3454884B2 JP28943193A JP28943193A JP3454884B2 JP 3454884 B2 JP3454884 B2 JP 3454884B2 JP 28943193 A JP28943193 A JP 28943193A JP 28943193 A JP28943193 A JP 28943193A JP 3454884 B2 JP3454884 B2 JP 3454884B2
Authority
JP
Japan
Prior art keywords
data
register
database
length
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP28943193A
Other languages
Japanese (ja)
Other versions
JPH07143156A (en
Inventor
尚哉 池田
謙 渡部
素直 澤田
博道 榎本
義人 左古
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP28943193A priority Critical patent/JP3454884B2/en
Publication of JPH07143156A publication Critical patent/JPH07143156A/en
Application granted granted Critical
Publication of JP3454884B2 publication Critical patent/JP3454884B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、主として、ローカルエ
リアネットワーク(以下、LANと称する)に接続され
た情報処理装置、ネットワーク間を接続する通信制御装
置等の応用に好適なメモリに関し、特に、メモリ内のデ
ータとLANからの受信データを比較し、その一致を高
速に判定する、一種の連想メモリ(Content A
ddressable Memory:以下、「CA
M」と称す)に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention mainly relates to a memory suitable for application to an information processing device connected to a local area network (hereinafter referred to as LAN), a communication control device connecting the networks, A kind of associative memory (Content A) that compares the data in the memory with the data received from the LAN and judges the coincidence at high speed.
addressable Memory: "CA
"M").

【0002】[0002]

【従来の技術】複数のネットワーク間、特に、LAN同
士を接続して、パケットデータの中継を行う装置として
は、国際標準化機構(ISO;Internation
alOrganization for Standa
rd)で定められた、開放型システム相互接続(OS
I;Open System Interconnec
tion)参照モデルにおける、データリンク層(特
に、メディアアクセス副層)において接続を行う「ブリ
ッジ」、さらにその上位層であるネットワーク層におい
て接続を行う「ルータ」等の装置が知られている。
2. Description of the Related Art An apparatus for relaying packet data by connecting a plurality of networks, particularly LANs, with each other, is the International Standards Organization (ISO).
alOrganization for Standard
rd), open system interconnection (OS)
I; Open System Interconnec
device such as a "bridge" that connects in the data link layer (particularly, the media access sublayer) and a "router" that connects in the network layer that is an upper layer thereof.

【0003】このブリッジ、ルータと称される通信制御
装置では、予め装置側が備える、フィルタリング情報に
基づき、ネットワークを介して受信される受信パケット
データを中継処理すべきか、あるいは、廃棄処理すべき
かを判定する必要がある。
In this communication control device called bridge or router, it is determined whether the received packet data received via the network should be relayed or discarded based on the filtering information provided in advance on the device side. There is a need to.

【0004】この判定処理では、一般的に、受信パケッ
トデータに含まれるアドレスフィールドで示されるアド
レスにもとづいて、受信データを中継すべきか否かを判
定するものである。以下に、LANで使用されるアドレ
スについて簡単に説明する。
In this judgment processing, it is generally judged whether or not the received data should be relayed, based on the address indicated by the address field included in the received packet data. The addresses used in the LAN will be briefly described below.

【0005】LANで使用されるアドレスとしては、装
置に物理的に固有の、即ち、装置製造時点で定められる
MAC(Media Access Control)
アドレス(48ビット)や、前記装置が接続するネット
ワークの番号、ネットワーク上の前記装置の番号を示し
たネットワークアドレス等がある。
The address used in the LAN is a MAC (Media Access Control) that is physically unique to the device, that is, defined at the time of manufacturing the device.
There are an address (48 bits), a network number to which the device is connected, a network address indicating the number of the device on the network, and the like.

【0006】LAN上を伝送する、送受信データには、
少なくとも、送信の宛先および送信元のMACアドレス
を含み、さらに、上位プロトコルによっては、送信の宛
先と送信元のインターネットワークアドレスを含むのが
一般的である。
The transmission / reception data transmitted on the LAN includes
At least, it includes the MAC address of the transmission destination and the transmission source, and further, depending on the upper layer protocol, it generally includes the transmission destination and the internetwork address of the transmission source.

【0007】インターネットワークアドレスとしては、
例えば、TCP/IPプロトコルにおけるIPアドレス
(32ビット)が良く知られており、以下の説明ではI
Pアドレスを用いる。
As an internetwork address,
For example, an IP address (32 bits) in the TCP / IP protocol is well known, and in the description below, I
Use P address.

【0008】ネットワークに接続される端末装置、ある
いは、ルータと称される通信接続装置が、LANから自
局宛の受信があったか否かを認識するためには、前記M
ACアドレスを使用する。すなわち、LAN上のパケッ
トデータの宛先を示す宛先MACアドレスが、自局に割
り当てられているMACアドレスと一致すれば、当該パ
ケットデータを受信する。
In order for a terminal device connected to a network or a communication connection device called a router to recognize whether or not there is a reception addressed to itself from the LAN, the M
Use AC address. That is, if the destination MAC address indicating the destination of the packet data on the LAN matches the MAC address assigned to the local station, the packet data is received.

【0009】一方、前記ブリッジと称される通信接続装
置では、LAN上で伝送される全てのパケットデータを
受信し、パケット中の宛先MACアドレスが同一LAN
中に接続された機器のMACアドレスであれば、当該パ
ケットを他のネットワークに中継することなく廃棄(フ
ィルタリングと称する)する。
On the other hand, the communication connection device called the bridge receives all packet data transmitted on the LAN, and the destination MAC address in the packet is the same LAN.
If it is the MAC address of the connected device, the packet is discarded (called filtering) without being relayed to another network.

【0010】ところで、従来、ブリッジにおけるMAC
アドレスのフィルタリングの機能を高速に実現するため
に、例えば、「Advanced Micro Dev
ice社:Am99C10A」に代表される、連想メモ
リ(CAM)が使用されていた。かかる従来のCAMで
は、前記MACアドレスのデータ長である48ビットを
1単位とするワードデータを、M個(Mは、自然数)登
録可能な構成となっており、入力された、MACアドレ
スのデータである48ビットデータと、登録されている
複数個(最大M個)のMACアドレスのデータとを比較
器で同時に比較し、一致するデータの存在の有無と、一
致したデータのCAM内での登録位置、すなわちCAM
内におけるアドレスを出力することが可能であった。
By the way, conventionally, the MAC in the bridge
In order to realize the address filtering function at high speed, for example, "Advanced Micro Dev
The associative memory (CAM) represented by "ICE: Am99C10A" was used. In such a conventional CAM, M word data (M is a natural number) in which 48 bits, which is the data length of the MAC address, is set as one unit can be registered, and the input MAC address data is input. Comparing the 48-bit data, which is the above, with the data of a plurality of registered MAC addresses (maximum M) at the same time, the presence or absence of the matching data and the registration of the matching data in the CAM. Position, ie CAM
It was possible to output the address within.

【0011】従来のCAMを使用して構成したブリッジ
が備える、MACアドレスのフィルタリング機能を、図
2を参照して説明する。
The MAC address filtering function provided in the conventional CAM bridge will be described with reference to FIG.

【0012】図2は、2つのLANをブリッジで接続し
て構成したLAN間接続システムとブリッジ装置の内部
構成の説明図である。
FIG. 2 is an explanatory diagram of the internal configuration of a LAN connection system and a bridge device which are configured by connecting two LANs by a bridge.

【0013】図2において、100は、ブリッジ、10
1は、プロセッサ(例えば、CPU、ROM、RAM等
にて実現できる)、102は、主記憶(例えば、RAM
等にて実現できる)、103および104は、LANイ
ンタフェース回路(例えば、各種CMOS、トランジス
タ等にて実現できる)、105は、中継用の送受信バッ
ファメモリ(例えば、RAM等にて実現できる)、10
6および107は、フィルタリングテーブル(例えば、
CPU、ROM、CAM等にて実現できる)である。
In FIG. 2, 100 is a bridge and 10 is a bridge.
1 is a processor (which can be realized by, for example, a CPU, ROM, RAM, etc.), and 102 is a main memory (for example, RAM)
Etc.), 103 and 104 are LAN interface circuits (for example, can be realized by various CMOSs, transistors, etc.), 105 is a transmission / reception buffer memory for relay (can be realized by RAM, etc.), 10
6 and 107 are filtering tables (eg,
It can be realized by CPU, ROM, CAM, etc.).

【0014】120は第一のLANであり、121、1
22、123に示す端末装置とブリッジ100のLAN
インタフェース回路103が接続されている。また、1
30は第二のLANであり、131、132、133に
示す端末装置とブリッジ100のLANインタフェース
回路104が接続されている。103、104は、例え
ば、各種CMOS、トランジスタ等にて実現できる。
Reference numeral 120 is a first LAN, and 121, 1
LAN of the bridge device 100 and the terminal devices shown at 22 and 123
The interface circuit 103 is connected. Also, 1
Reference numeral 30 denotes a second LAN, to which the terminal devices indicated by 131, 132, 133 and the LAN interface circuit 104 of the bridge 100 are connected. 103 and 104 can be realized by various CMOSs, transistors, and the like, for example.

【0015】なお、以下の説明を判り易くするため、前
記端末およびLANインタフェース回路のMACアドレ
スは、図2における番号であるとする。すなわち、例え
ば、端末121のMACアドレスは121、LANイン
タフェース回路103のMACアドレスは103である
とする。
In order to make the following description easy to understand, it is assumed that the MAC addresses of the terminal and the LAN interface circuit are the numbers in FIG. That is, for example, the MAC address of the terminal 121 is 121 and the MAC address of the LAN interface circuit 103 is 103.

【0016】図2において、LANインタフェース回路
103中のフィルタリングテーブル106には、同一L
AN内に接続されているMACアドレスが登録される。
すなわち、フィルタリングテーブル106にはMACア
ドレスとして121、122、123が登録されている
ものとする。
In FIG. 2, the same L is stored in the filtering table 106 in the LAN interface circuit 103.
The MAC address connected to the AN is registered.
That is, it is assumed that 121, 122, and 123 are registered as MAC addresses in the filtering table 106.

【0017】かかるフィルタリングテーブル106を構
成するメモリとして、前述のAm99C10Aに代表さ
れるCAMを使用すれば、受信デ−タのMACアドレス
とCAM中に登録されている複数のMACアドレスとを
高速に比較し、一致するMACアドレスがCAM中に存
在すれば、同一LAN内のMACアドレス宛のデータで
あり、ブリッジによってデータの中継を行う必要がない
ので、当該受信データを廃棄すれば良く、また、一致す
るMACアドレスがCAM中に存在しなければ、ブリッ
ジによってデータを中継するために、当該受信データ
を、中継用の送受信バッファメモリ105に格納する。
また、LANインタフェース回路103中のフィルタリ
ングテーブル107も同様な構成にしておけばよい。
If a CAM typified by Am99C10A described above is used as a memory constituting the filtering table 106, the MAC address of the received data and a plurality of MAC addresses registered in the CAM can be compared at high speed. However, if a matching MAC address exists in the CAM, it is data addressed to the MAC address in the same LAN, and there is no need to relay the data by the bridge. Therefore, the received data can be discarded. If the MAC address to be used does not exist in the CAM, the received data is stored in the relay transmission / reception buffer memory 105 in order to relay the data by the bridge.
Further, the filtering table 107 in the LAN interface circuit 103 may have a similar configuration.

【0018】具体的なブリッジによるデータの中継の一
例として、端末装置123が、第二のLAN130に接
続されている端末装置133宛に、データを送信した場
合について述べる。
As an example of data relay by a concrete bridge, a case where the terminal device 123 transmits data to the terminal device 133 connected to the second LAN 130 will be described.

【0019】まず、送信デ−タは、LAN120を介し
て、ブリッジ100のLANインタフェース回路103
に送られる。送信データの宛先MACアドレスは、同一
LAN内に存在しない、すなわち、フィルタリングテー
ブル106には登録されていないため、ブリッジ100
は、プロセッサ101による制御によって、受信データ
を中継用の送受信バッファメモリ105に格納した後、
LANインタフェース回路104から、第二のLAN1
30に送信する。そして、最終的に、送信データは、端
末装置133に到達する。
First, transmission data is transmitted through the LAN 120 to the LAN interface circuit 103 of the bridge 100.
Sent to. Since the destination MAC address of the transmission data does not exist in the same LAN, that is, it is not registered in the filtering table 106, the bridge 100
Is stored in the transmission / reception buffer memory 105 for relay under the control of the processor 101,
From the LAN interface circuit 104 to the second LAN1
Send to 30. Then, finally, the transmission data reaches the terminal device 133.

【0020】また、ブリッジによって送信データがフィ
ルタリングされる場合の一例として、端末装置121
が、第一のLAN120に接続されている端末装置12
2宛に、データを送信した場合について述べる。送信デ
−タは、第一のLAN120を経由して、端末装置12
2に対して送られるとともに、ブリッジ100を備える
LANインタフェース回路103にも送られる。
Further, as an example in which the transmission data is filtered by the bridge, the terminal device 121
Is the terminal device 12 connected to the first LAN 120.
A case where data is transmitted to 2 will be described. The transmission data is sent to the terminal device 12 via the first LAN 120.
2 to the LAN interface circuit 103 including the bridge 100.

【0021】かかる送信データの宛先MACアドレス
は、同一LAN内に存在し、フィルタリングテーブル1
06に登録されており、LANインタフェース回路10
3によって廃棄処理される。この結果、送信データが第
二のLANに中継されない。
The destination MAC address of such transmission data exists in the same LAN, and the filtering table 1
06, and the LAN interface circuit 10
3 is discarded. As a result, the transmission data is not relayed to the second LAN.

【0022】以上のように、ブリッジによるMACアド
レスのフィルタリング機能を実現するために、従来のC
AMでは、一個のMACアドレスを複数登録されたMA
Cアドレス中から高速に検出する手段として使用されて
いる。
As described above, in order to realize the MAC address filtering function by the bridge, the conventional C
In AM, MA that has registered one MAC address
It is used as a means to detect at high speed from the C address.

【0023】[0023]

【発明が解決しようとする課題】従来の連想メモリは、
1個の入力データ(前述の例では、受信パケットの宛先
MACアドレス)と連想メモリ中に予め設定された複数
個のデータ(前述の例では、同一LAN中の端末のMA
Cアドレス)とを複数個の比較器を使用して同時に比較
処理することにより、データ検索を行うことが可能であ
った。このため、前述のブリッジのフィルタリング処理
の手段として使用されていた。
The conventional associative memory is
One input data (in the above example, the destination MAC address of the received packet) and a plurality of data set in advance in the associative memory (in the above example, the MAs of the terminals in the same LAN).
It was possible to perform a data search by simultaneously performing a comparison process of (C address) and a plurality of comparators. Therefore, it has been used as a means for the above-mentioned bridge filtering process.

【0024】しかしながら、近年、データリンク層の上
位層である、ネットワーク層でネットワークを接続する
ルータでは、ネットワーク接続におけるセキュリティを
保証するため、多種のフィルタリング機能が要求される
ようになり、従来の連想メモリでは対応できない場合が
生じてきた。
However, in recent years, routers that connect networks at the network layer, which is an upper layer of the data link layer, are required to have various filtering functions in order to guarantee security in the network connection. There are some cases where memory cannot handle it.

【0025】具体的には、特定のIPアドレス(例え
ば、会社の人事部門)を有する送信データは、無制限に
中継せずに、ルータが廃棄する機能や、逆に、特定のI
Pアドレス(例えば、会社の営業部門)を有する送信デ
ータのみを中継し、他のIPアドレスを有するデータ
は、ルータが廃棄する機能等が求められるようになって
きた。
Specifically, the transmission data having a specific IP address (for example, the personnel department of a company) is not relayed indefinitely but the function of the router discarding it, or conversely, the specific I
There has been a demand for a function of relaying only transmission data having a P address (for example, a sales department of a company) and discarding data having another IP address by a router.

【0026】例えば、16進数表現で、「7FFF00
00(h)」(hは、16進表現を示す)から、「7F
FF00FF(h)」までのIPアドレスを有する端末
装置からの送信データを、ルータが受信した場合には、
ルータは受信したデータを中継せずに、廃棄する機能を
実現する場合を想定する。
For example, in hexadecimal notation, "7FFF00
00 (h) ”(h indicates hexadecimal notation) to“ 7F
When the router receives the transmission data from the terminal device having the IP address up to “FF00FF (h)”,
It is assumed that the router implements the function of discarding the received data without relaying it.

【0027】この場合、従来のCAMを使用して構成し
た検索データベース手段での処理を行なうことを考える
と、フィルタリングするIPアドレスとして、「7FF
F0000(h)」から「7FFF00FF(h)」ま
での、256個のアドレスを、個々に、CAMに登録す
る必要がある。したがって、ルータとしてのIPアドレ
スフィルタリングの機能は、フィルタリング可能なIP
アドレスの個数上の制限をうけたままの不十分な機能で
満足するか、あるいは、経済性を無視して大規模にCA
Mを使用する必要がある。
In this case, considering that the processing is performed by the search database means configured using the conventional CAM, the IP address to be filtered is "7FF.
It is necessary to individually register 256 addresses from “F0000 (h)” to “7FFF00FF (h)” in the CAM. Therefore, the function of IP address filtering as a router is
Satisfaction with insufficient functions while keeping the number of addresses limited, or CA on a large scale ignoring economics
It is necessary to use M.

【0028】本例のように、1つのアドレスのパターン
のみを処理するのであれば、ルータが備えるプロセッサ
(図2の、101に相当する)が行う演算処理によっ
て、フィルタリングすることは可能であるが、フィルタ
リングすべきIPアドレスのビットパターンが複数種類
(例えば、上記IPフィルタリングに加え、「7FF8
0000(h)」から「7FF8000F(h)」まで
のIPアドレスについても廃棄する等の複数条件が設定
されることも考えられる)存在すれば、ルータが備える
プロセッサは、フィルタリングの条件を順番に処理する
必要があるため、中継処理速度の低下という性能面での
問題が発生することになる。
If only a pattern of one address is processed as in this example, it is possible to perform filtering by the arithmetic processing performed by the processor (corresponding to 101 in FIG. 2) included in the router. , A plurality of IP address bit patterns to be filtered (for example, in addition to the above IP filtering, "7FF8
If there are multiple conditions such as discarding IP addresses from "0000 (h)" to "7FF8000F (h)", the processor of the router processes the filtering conditions in order if they exist. Therefore, there is a performance problem that the relay processing speed decreases.

【0029】また、前記ブリッジにおいても、MACア
ドレスを使用して、前述のIPアドレスフィルタリング
機能のような、一種のセキュリテイのためのフィルタリ
ング機能が求められるようになってきている。
Also in the bridge, there is a demand for a kind of filtering function for security, such as the above-mentioned IP address filtering function, using the MAC address.

【0030】例えば、MACアドレスには、装置製造者
を表すビットフィールド等が存在するため、これを使用
したフィルタリングとして、特定の製造者フィールドデ
ータ、すなわち、特定のメーカ製の端末からの送信パケ
ットは、他のLANに中継しないように、ブリッジが廃
棄処理を行うといった機能である。
For example, since the MAC address has a bit field or the like representing the device manufacturer, as filtering using this, a specific manufacturer field data, that is, a transmission packet from a terminal of a specific manufacturer is transmitted. The function is that the bridge performs a discarding process so as not to relay to another LAN.

【0031】さらに、近年では、ブリッジ機能とルータ
機能を兼ね備えた通信装置が出現してきた。このような
通信装置では、フィルタリング機能を実現するために、
MACアドレス(48ビット)とIPアドレス(32ビ
ット)の両方を処理対象とする必要がある。
Further, in recent years, a communication device having both a bridge function and a router function has appeared. In such a communication device, in order to realize the filtering function,
Both the MAC address (48 bits) and the IP address (32 bits) need to be processed.

【0032】本発明の目的は、以上述べたような、IP
アドレスあるいはMACアドレスの可変長のビットパタ
ーン指定、すなわち、ビットマスク指定によってフィル
タリング機能を高速に実現するためのメモリ手段を提供
することにある。
The object of the present invention is to provide the IP as described above.
It is to provide a memory means for realizing a filtering function at high speed by designating a variable-length bit pattern of an address or a MAC address, that is, designating a bit mask.

【0033】さらに、本発明の目的は、MACアドレス
(通常、48ビット)とIPアドレス(通常、32ビッ
ト)のように、長さの異なる、ネットワークアドレスを
有するデータが混在している場合でも、アドレスデータ
の登録、登録されているアドレスデータの検索を高速に
行い、かつ、経済的なメモリ手段を提供することにあ
る。
Further, an object of the present invention is to provide a mixture of data having network addresses having different lengths such as a MAC address (usually 48 bits) and an IP address (usually 32 bits). It is to provide an economical memory means for registering address data, searching registered address data at high speed.

【0034】[0034]

【課題を解決するための手段】前述の課題を解決し、上
記目的を達成するために、以下の手段が考えられる。
[Means for Solving the Problems] In order to solve the above problems and achieve the above object, the following means can be considered.

【0035】すなわち、Lビット(Lは、1以上の整
数)のデータを受け付け、保持するための入力データレ
ジスタと、Xビット(Xは、L以上の整数)のデータを
受け付け、保持するための、M個(Mは、1以上の整
数)のデータベースレジスタと、前記入力データレジス
タおよびデータベースレジスタへのデータの書き込みを
行うデータ書き込み手段と、前記入力データレジスタに
保持されるデータと前記データベースレジスタに保持さ
れるデータの内容を、各ビットごとに一致するか否かを
判定し、L個の比較結果が全て一致すると判定された場
合に、全ビット一致の旨の判定結果を出力する、M個の
データベースレジスタ比較手段と、該データベースレジ
スタ比較手段による、M個の判定結果のうち少なくとも
1以上が、全ビット一致の旨を示していた場合に、デー
タ一致の旨の情報を出力する、データ一致検出手段とを
少なくとも具備させる。
That is, an input data register for receiving and holding L-bit (L is an integer of 1 or more) data and an X-bit (X is an integer of L or more) data for receiving and holding. , M (M is an integer greater than or equal to 1) database registers, data writing means for writing data to the input data register and the database register, and data held in the input data register and the database register. It is determined whether or not the contents of the held data are matched for each bit, and if all L comparison results are determined to match, a determination result indicating that all bits match is output. Database register comparing means, and at least one or more of the M determination results by the database register comparing means are all bit-one. When showed the fact, and outputs the information to the effect that the data match, to at least and a data match detecting means.

【0036】そして、前記データベースレジスタが保持
するデータを、前記データベースレジスタ比較手段によ
る判定対象にすべき(有効)か、すべきでないか(無
効)を、ビット単位で指定可能なデータベースマスクレ
ジスタを、前記データベースレジスタ毎に備え、前記デ
ータ書き込み手段は、該手段を介して、前記データベー
スマスクレジスタへ、前記ビット単位での有効、無効の
指定が可能であり、さらに、 前記データベースレジス
タに保持されたデータのうち、前記データベースマスク
レジスタが「有効」と指定したビットに対応するデータ
に関してのみ、データベースレジスタ比較手段による判
定対象とするよう制御信号を生成するビットマスク制御
手段とを備えるメモリである。
Then, a database mask register capable of designating, in bit units, whether the data held by the database register is to be judged by the database register comparison means (valid) or not (invalid), The data writing means is provided for each of the database registers, and it is possible to specify validity or invalidity in the bit unit to the database mask register via the means, and further, the data held in the database register. Among these, the memory is provided with a bit mask control means for generating a control signal so that the database register comparison means makes the determination target only for the data corresponding to the bit designated by the database mask register as "valid".

【0037】また、前述の目的を達成するために、以下
の手段も考えられる。
In order to achieve the above-mentioned object, the following means can be considered.

【0038】すなわち、Lビット(Lは、1以上の整
数)のデータを受け付け、保持するための入力データレ
ジスタと、Xビット(Xは、L以上の整数)のデータを
受け付け、保持するための、M個(Mは1以上の整数)
のデータベースレジスタと、前記入力データレジスタお
よびデータベースレジスタへのデータの書き込みを行う
データ書き込み手段と、前記入力データレジスタに保持
されるデータと前記データベースレジスタに保持される
データの内容を、各ビットごとに一致するか否かを判定
し、L個の比較結果が全て一致すると判定された場合
に、全ビット一致の旨の判定結果を出力する、M個のデ
ータベースレジスタ比較手段と、該データベースレジス
タ比較手段による、M個の判定結果のうち少なくとも1
以上が、全ビット一致の旨を示していた場合に、データ
一致の旨の情報を出力する、データ一致検出手段とを少
なくとも具備させる。
That is, an input data register for receiving and holding L-bit (L is an integer of 1 or more) data, and an input data register for receiving and holding X-bit (X is an integer of L or more) data. , M (M is an integer of 1 or more)
Database register, data writing means for writing data to the input data register and the database register, and the contents of the data held in the input data register and the data held in the database register for each bit. It is determined whether or not they match, and when all L comparison results are determined to match, the M database register comparing means and the database register comparing means for outputting the determination result indicating that all the bits match. At least 1 of the M determination results by
When the above indicates that all bits match, at least data matching detection means for outputting information indicating data matching is provided.

【0039】そして、前記入力データレジスタの保持す
るLビットのデータうち、前記データベースレジスタ比
較手段による判定対象にすべきデータ部を示す、第1有
効データ長(長さNaビット:Naは、0以上、L以下
の整数)を設定可能な、有効入力データ長レジスタと、
前記データベースレジスタの保持するLビットのデータ
のうち、前記データベースレジスタ比較手段による判定
対象にすべきデータ部を示す、第2有効データ長(長さ
Nbビット:Nbは、0以上、L以下の整数)を設定可
能な、各データベースレジスタに設けられた、有効デー
タベース長レジスタと、前記第1有効データ長(Naビ
ット)と前記各第2有効データ長(Nbビット)との内
容の「一致」あるいは「不一致」を比較判定する、M個
の有効データ長比較手段とを備え、 前記データ書き込
み手段は、該手段を介して、前記有効入力データ長レジ
スタおよび前記有効データベース長レジスタへ、前記第
1有効データ長および前記各第2有効データ長の書き込
みが可能であり、さらに、有効データ長制御手段を備え
る。そして、該有効データ長制御手段は、前記有効デー
タ長比較手段が、「一致」と判定した場合には、当該判
定の対象となった第2有効データ長を設定してある有効
データベース長レジスタに対応する、前記データベース
レジスタ比較手段の判定結果を、前記データ一致検出手
段の入力とし、「不一致」と判定した場合には、当該判
定の対象となった第2有効データ長を設定してある有効
データベース長レジスタに対応する、前記データベース
レジスタ比較手段の判定結果を、前記データ一致検出手
段の入力としないメモリである。
Of the L-bit data held by the input data register, the first effective data length (length Na bit: Na is 0 or more) indicating the data portion to be judged by the database register comparing means. , L or less), a valid input data length register,
A second effective data length (length Nb bit: Nb is an integer of 0 or more and L or less) indicating a data part to be determined by the database register comparing means among the L-bit data held by the database register. ), Which is provided in each database register, and the contents of the effective database length register and the first effective data length (Na bits) and the respective second effective data lengths (Nb bits) are “matched” or M number of valid data length comparing means for comparing and judging "mismatch", and the data writing means, via the means, to the valid input data length register and the valid database length register, the first valid data. The data length and each of the second valid data lengths can be written, and further, the valid data length control means is provided. Then, when the valid data length comparison means determines “match”, the valid data length control means stores the valid data length register in which the second valid data length, which is the target of the determination, is set. When the corresponding determination result of the database register comparison means is input to the data coincidence detection means and it is determined as “mismatch”, the second valid data length which is the target of the determination is set to be valid. It is a memory which does not use the judgment result of the database register comparing means corresponding to the database length register as an input to the data coincidence detecting means.

【0040】[0040]

【作用】予め検索すべきデータベース(例えば、前述の
フィルタリングデータベース)の構成要素を、データベ
ースレジスタに設定する。この際、データベースの各構
成要素となるデータには、ある「範囲」(例えば、前述
のIPアドレスのフィルタリングの範囲)を指定するも
のとする。この「範囲」を、データのビット位置で指定
し、この指定した値を、マスクデータと称し、データベ
ースマスクレジスタに、予め設定する。
The constituent elements of the database (for example, the above-mentioned filtering database) to be searched in advance are set in the database register. At this time, a certain “range” (for example, the range of the above-mentioned IP address filtering) is designated for the data as the constituent elements of the database. This "range" is designated by the bit position of the data, and the designated value is called mask data and is preset in the database mask register.

【0041】本発明では前述のように、各データベース
マスクレジスタは、各データベースレジスタごとに設け
ているため、マスクデータは、データベースの各構成要
素毎に異なっても良いことになる。
In the present invention, as described above, since each database mask register is provided for each database register, the mask data may be different for each constituent element of the database.

【0042】次に、入力データレジスタに検索対象とな
るデータを書き込む。本発明においては、入力データレ
ジスタの内容と各データベースレジスタの内容を、ビッ
ト毎に比較するとともに、対応する各データベースマス
クレジスタに設定されたマスクデータの内容により、ビ
ットマスク制御手段が、前記「範囲」を示すビット位置
については比較対象外として、ビット毎の比較結果の一
致、不一致にかかわらず、一致したビットとしてデータ
ベースレジスタ比較手段を制御する。これにより、デー
タベースの各構成要素毎に可変長のビットパターン指
定、すなわち、ビットマスク指定によって、データ検索
が可能となる。
Next, the data to be searched is written in the input data register. In the present invention, the contents of the input data register and the contents of each database register are compared on a bit-by-bit basis, and the bit mask control means determines the "range" based on the contents of the mask data set in each corresponding database mask register. The bit position indicating “” is excluded from the comparison target, and the database register comparison means is controlled as the matched bit regardless of whether the comparison result for each bit is coincident or not. As a result, a data search can be performed by designating a variable-length bit pattern, that is, a bit mask, for each component of the database.

【0043】また、以下のような作用もある。There is also the following action.

【0044】まず、予め検索すべきデータベース(例え
ば、前述のフィルタリングデータベース)の構成要素を
データベースレジスタに設定するとともに、各データベ
ースの構成要素が、何ビットまで有効であるかという情
報Nbを、有効デ−タベース長レジスタに設定する。本
発明では前述のように、各有効デ−タベース長レジスタ
は、各データベースレジスタごとに設けているため、デ
ータベースの各構成要素毎に、有効データ長は異なって
も良いことになる。
First, the components of the database to be searched (for example, the above-mentioned filtering database) are set in the database register in advance, and the information Nb indicating how many bits each component of the database is valid is set as the valid data. -Set the database length register. In the present invention, as described above, since each valid database length register is provided for each database register, the valid data length may differ for each constituent element of the database.

【0045】次に、検索対象のデータおよびその有効デ
ータ長Naを、入力データレジスタおよび有効入力デ−
タ長レジスタに書き込んでおく。本発明においては、入
力データレジスタの内容と各データベースレジスタの内
容をビット毎に比較することによって、ワード単位での
一致、あるいは、不一致を判定するとともに、有効入力
デ−タ長レジスタの内容Naと有効デ−タベース長レジ
スタの内容Nbの一致をも判定し、有効データ長が一致
(Na=Nb)しないデータベースレジスタについて
は、入力データレジスタの内容とワード単位で一致した
としても「不一致」と判定して、有効デ−タ長制御手段
が、前記デ−タ一致検出手段の入力信号の制御を行う。
これにより、異なるデータ長のデータを扱うことも可能
となる。
Next, the data to be searched and its effective data length Na are input to the input data register and the effective input data.
Write to the data length register. In the present invention, by comparing the contents of the input data register and the contents of each database register bit by bit, it is determined whether or not they match in word units, and the contents Na of the effective input data length register Even if the contents Nb of the valid database length register are judged to match, if the data register does not match the valid data length (Na = Nb), it is judged to be "mismatch" even if it matches the contents of the input data register in word units. Then, the effective data length control means controls the input signal of the data coincidence detection means.
This makes it possible to handle data having different data lengths.

【0046】[0046]

【実施例】本発明によるCAMの一実施例を図1および
図3を参照して以下に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of a CAM according to the present invention will be described below with reference to FIGS.

【0047】図1は本発明にかかるメモリ装置(CA
M)の一実施例の構成図である。
FIG. 1 shows a memory device (CA) according to the present invention.
It is a block diagram of one example of M).

【0048】図1において、1は、本発明の一実施例の
CAM、2は、CAM1の1エントリ分のデータ判定回
路セルである。ここで1エントリとは、データベースの
構成要素1データ分に対応した判定処理の機構をいう。
In FIG. 1, 1 is a CAM of one embodiment of the present invention, and 2 is a data decision circuit cell for one entry of CAM 1. Here, one entry means a determination processing mechanism corresponding to one data element of the database.

【0049】3は、データ書き込み手段である外部イン
タフェ−ス回路(本実施例においては、外部からCAM
内部のレジスタをリード、ライト可能なインタフェース
回路とする)であり、バスドライバ回路等で実現可能で
ある。
Reference numeral 3 denotes an external interface circuit which is a data writing means (in the present embodiment, a CAM is externally supplied).
The internal register is a readable and writable interface circuit), and can be realized by a bus driver circuit or the like.

【0050】4は、入力データレジスタであり、フリッ
プフロップ回路等の電子デバイスにて実現可能である。
5は、入力データと一致するデータが、CAM内に存在
するか否かを最終的に判断する一致検出回路であり、各
種論理回路等の電子デバイスにて実現可能である。
Reference numeral 4 is an input data register, which can be realized by an electronic device such as a flip-flop circuit.
Reference numeral 5 is a match detection circuit that finally determines whether or not the data that matches the input data exists in the CAM, and can be realized by an electronic device such as various logic circuits.

【0051】データ判定回路セル2は、CAM1内に複
数個(M個:Mは1以上の整数)備えられている。各デ
ータ判定回路セル2は、データベースレジスタ21と、
データベースマスクレジスタ22と、前記入力データレ
ジスタに保持されるデータと前記データベースレジスタ
に保持されるデータの内容を、各ビットごとに一致する
か否かを判定し、L個(入力データレジスタをLビット
とする。Lは、1以上の整数である)の比較結果が全て
一致すると判定された場合に、全ビット一致の旨の判定
結果を出力する手段であるデータベースレジスタ比較手
段、および、前記データベースレジスタに保持されたデ
ータのうち、前記データベースマスクレジスタが「有効
(前記データベースレジスタが保持するデータを、前記
データベースレジスタ比較手段による判定対象にする場
合)」と指定したビットに対応するデータに関しての
み、データベースレジスタ比較手段による判定対象とす
るよう制御信号を生成する手段であるビットマスク制御
手段の機能を実現するビットマスク機能付き比較回路2
3を有して構成される。
A plurality of data decision circuit cells 2 (M pieces: M is an integer of 1 or more) are provided in the CAM 1. Each data determination circuit cell 2 includes a database register 21 and
It is determined whether or not the contents of the data held in the database mask register 22, the input data register and the data held in the database register match for each bit, and L pieces (the input data register has L bits L is an integer greater than or equal to 1), and when it is determined that all the comparison results match, a database register comparison unit that outputs a determination result indicating that all bits match, and the database register Among the data held in the database, only the data corresponding to the bit designated by the database mask register as "valid (when the data held by the database register is to be judged by the database register comparing means)" is stored in the database. Generate a control signal so that it can be judged by the register comparison means. Bitmask function comparator circuit 2 for realizing the functions of the bit mask controller is a means for
It is configured with 3.

【0052】図3は、CAM1の1エントリ分のデータ
判定回路セル2内部の動作例を説明するための説明図で
ある。以下、CAM1の1エントリ分のデータ判定回路
セル2の動作について説明する。
FIG. 3 is an explanatory diagram for explaining an operation example inside the data determination circuit cell 2 for one entry of the CAM 1. The operation of the data determination circuit cell 2 for one entry of the CAM 1 will be described below.

【0053】図3において、31は、1エントリ分の前
記データベースレジスタ21の内容、32は、前記入力
データレジスタ4の内容、33は、データベースレジス
タの内容31と入力データレジスタの内容32の各ビッ
トの単純な(マスク処理を伴わない)比較結果、34
は、1エントリ分の前記データベースマスクレジスタ2
2の内容である。さらに、35は前述の単純な比較結果
33に対して前記データベースマスクレジスタの内容3
4に従ってマスク処理を施した結果である。36は、マ
スク処理後の比較結果35の全ビットが一致しているか
否かを示すフラグ情報であり、換言すれば、入力データ
とデータベースレジスタの内容31が、マスク処理を施
して比較処理を行った結果、ワード単位で一致したか否
かを示すフラグである。
In FIG. 3, 31 is the contents of the database register 21 for one entry, 32 is the contents of the input data register 4, 33 is each bit of the contents 31 of the database register and the contents 32 of the input data register. Simple comparison result (without masking) of 34,
Is the database mask register 2 for one entry
It is the content of 2. Further, 35 is the content 3 of the database mask register with respect to the above-mentioned simple comparison result 33.
4 is the result of performing the masking process according to 4. Reference numeral 36 is flag information indicating whether or not all bits of the comparison result 35 after the mask processing match with each other. In other words, the input data and the contents 31 of the database register perform the comparison processing by performing the mask processing. As a result, it is a flag indicating whether or not there is a match in word units.

【0054】本実施例では、1エントリ分、すなわち、
1ワード分のデータベースレジスタのデータ長Xと、入
力データレジスタおよび1エントリ分のデータベースマ
スクレジスタのデータ長Lをともに、48ビットとして
いる。
In this embodiment, one entry, that is,
The data length X of the database register for one word and the data length L of the input data register and the database mask register for one entry are both 48 bits.

【0055】従って(X−L)は、「0ビット」であり存
在しないものとする。
Therefore, it is assumed that (XL) is "0 bit" and does not exist.

【0056】データベースレジスタには、予め、比較対
象となるデータベースの構成要素を設定しておく。
In the database register, the constituent elements of the database to be compared are set in advance.

【0057】図3では、例えば、16進数表現で「34
5678900001(h)」(hは、16進数を表現
する)を、上位48ビット(=L)の部分に設定してい
るものとする。図3では、最上位ビットを、bit0と
し、最下位ビットを、bit47とする。また、説明の
簡単化のために、図3では途中のビット4からビット4
5までは省略する。
In FIG. 3, for example, "34
It is assumed that "5678900001 (h)" (h represents a hexadecimal number) is set in the upper 48 bits (= L). In FIG. 3, the most significant bit is bit0 and the least significant bit is bit47. Further, in order to simplify the description, in FIG.
Up to 5 is omitted.

【0058】これに対し、入力データレジスタ4に、検
索対象のデータとして、例えば、「745678900
001(h)」を与え、データベースレジスタの各ビッ
ト毎に比較したとする。比較結果が一致しているビット
については、「1」、不一致のビットについては「0」
とすると、単純な比較結果33では、ビット1だけが
「0」で、他のビットは、すべて「1」となる。
On the other hand, in the input data register 4, as data to be searched, for example, "745678900"
"001 (h)" is given, and comparison is made for each bit of the database register. "1" if the comparison result matches, and "0" if the comparison result does not match.
Then, in the simple comparison result 33, only bit 1 is “0” and all other bits are “1”.

【0059】さらに、予め、データベースマスクレジス
タの内容34として、ビット1とビット2だけは比較対
象としない、すなわち、マスクし、他のビットは比較対
象とするマスクデータを与えているものとする。マスク
するビットを「1」、マスクしないビットを「0」とし
て表現すれば、データベースマスクレジスタの内容34
は、「600000000000(h)」が設定された
値である。
Further, as the contents 34 of the database mask register, it is assumed that only bit 1 and bit 2 are not to be compared, that is, masked, and the other bits are given mask data to be compared. If the bit to be masked is represented as "1" and the bit not to be masked is represented as "0", the contents of the database mask register 34
Is a value for which "600000000 (h)" is set.

【0060】次に、このデータベースマスクレジスタの
内容34にしたがって、単純な比較結果33のうち、マ
スク指定されたビット位置の比較結果は無視し、他のビ
ット位置、すなわち、マスク指定されていないビット位
置での比較結果のみを、ワード単位の一致判定の対象と
する。このビット単位のマスク動作を行うために、本実
施例では、マスク指定されたビット位置の比較結果は、
単純な比較結果33におけるビット内容(0または1)
に無関係に、一致しているものとし、「1」とする。し
たがって、ワード単位の一致を判断するにはマスク処理
後の比較結果35について、全ビットが「1」か否かを
判定すれば良い。
Next, according to the contents 34 of the database mask register, of the simple comparison result 33, the comparison result of the bit position for which the mask is designated is ignored, and another bit position, that is, the bit for which the mask is not designated is designated. Only the comparison result at the position is subjected to the word-unit match determination. In order to perform the mask operation for each bit, in the present embodiment, the comparison result of the bit positions for which the mask is designated is
Bit content (0 or 1) in simple comparison result 33
Regardless of, it is assumed that they match and is set to "1". Therefore, in order to determine the match in word units, it is sufficient to determine whether or not all the bits are “1” in the comparison result 35 after the mask processing.

【0061】本実施例では、単純な比較結果33で不一
致と判断したビット「1」がマスクされるため、マスク
処理後の比較結果35の内容は、「FFFFFFFFF
FFF(h)」、すなわち、全ビットが「1」となり、
フラグ情報36は、ワード単位での一致を表す「1」と
なる。
In the present embodiment, since the bit "1" which is judged as a mismatch by the simple comparison result 33 is masked, the content of the comparison result 35 after the mask processing is "FFFFFFFFF".
FFF (h) ”, that is, all bits are“ 1 ”,
The flag information 36 is “1” indicating the match in word units.

【0062】次に図3の処理を行う回路の一例を、図4
を参照して説明する。
Next, an example of a circuit for performing the processing of FIG. 3 will be described with reference to FIG.
Will be described with reference to.

【0063】図4は、前記1エントリ分のデータ判定回
路セル2の構成例である。図4において、210は、1
エントリ分のデータベースレジスタ21の、1ビット分
である。図4においては、図3におけるデータベースレ
ジスタの内容31のbit0を保持するための、1ビッ
ト分のレジスタであるとする。レジスタ1ビット分は、
具体的には、フリップフロップ回路で構成できる。
FIG. 4 shows an example of the structure of the data decision circuit cell 2 for one entry. In FIG. 4, 210 is 1
One bit of the database register 21 for an entry. In FIG. 4, it is assumed that it is a 1-bit register for holding bit 0 of the content 31 of the database register in FIG. One bit of register is
Specifically, it can be configured by a flip-flop circuit.

【0064】同様に、220は、図3における1エント
リ分のデータベースマスクレジスタ22の内容34のb
it0を保持するための1ビット分のレジスタであると
し、400は、入力データレジスタ4の内容32のbi
t0を保持するための1ビット分のレジスタであるとす
る。また、230は、前述のビット単位のマスク動作、
すなわち、ビットマスク機能付きの、図1における比較
回路23の1ビット分であるとする。ビットマスク機能
付き比較回路23は、本実施例ではL=48ビット分必
要であり、各々の入力としても、データベースレジスタ
21、データベースマスクレジスタ22、入力データレ
ジスタ4の、各bit1からbit47までの組合せと
なるが、bit0の比較処理のみを説明することで自明
となるため図4では説明を省略する。
Similarly, 220 is the b of the contents 34 of the database mask register 22 for one entry in FIG.
Assume that the register is a 1-bit register for holding it0, and 400 is the bi of the contents 32 of the input data register 4.
It is assumed that the register is a 1-bit register for holding t0. Reference numeral 230 denotes the above-mentioned bit-wise mask operation,
That is, it is assumed that it is one bit of the comparison circuit 23 in FIG. 1 having a bit mask function. In the present embodiment, the comparison circuit 23 with a bit mask function requires L = 48 bits, and the combination of the database register 21, the database mask register 22, and the input data register 4 from bit 1 to bit 47 is also used as each input. However, since it is obvious that only the comparison processing of bit0 is described, the description thereof will be omitted in FIG.

【0065】図4において、1ビット分のビットマスク
機能付き比較回路230は、まず、1ビット分のデータ
ベースレジスタ210と、1ビット分の入力データ40
0との一致を判定するために両方が”1”であれば出力
を”1”とし、他の場合は”0”を出力するAND回路
231と、両方が”0”であれば出力を”1”とし、他
の場合は”0”を出力するNOR回路232とを設けて
構成し、AND回路231の出力と、NOR回路232
の出力のいずれか、あるいは、両方が”1”であれば出
力を”1”とし、両方が”0”であれば出力を”0”と
する、OR回路233を、さらに設けた構成とする。
In FIG. 4, the comparison circuit 230 with a bit mask function for 1 bit first has a database register 210 for 1 bit and an input data 40 for 1 bit.
To determine a match with 0, if both are "1", the output is set to "1". In other cases, the AND circuit 231 outputs "0", and if both are "0", the output is set to "1". And a NOR circuit 232 that outputs "0" in the other cases, is provided to configure the output of the AND circuit 231 and the NOR circuit 232.
An OR circuit 233 is further provided in which the output is set to "1" when either or both of the outputs are "1" and the output is set to "0" when both are "0". .

【0066】さらに、1ビット分のデータベースマスク
レジスタ220が”マスクする”、すなわち、”1”の
とき、OR回路233の出力に無関係に「一致」を示す
ために、OR回路233の出力と、1ビット分のデータ
ベースマスクレジスタ220の出力を、OR回路234
に入力する構成にする。このOR回路234の出力が、
1ビット分のマスク機能付き処理の比較結果となる。
Further, when the 1-bit database mask register 220 is “masked”, that is, “1”, the output of the OR circuit 233 is shown to indicate “match” regardless of the output of the OR circuit 233. The output of the database mask register 220 for 1 bit is compared with the OR circuit 234.
Input to. The output of this OR circuit 234 is
This is the comparison result of the processing with the mask function for 1 bit.

【0067】さらに、図3で示したマスク処理後の比較
結果の全ビット一致をフラグ化するために、各ビットの
OR回路234の出力を、AND回路235に入力する
構成にする。該AND回路235の出力が、図3で示し
た1エントリ分のフラグ情報36に相当する。
Further, in order to flag all bit matches of the comparison result after the mask processing shown in FIG. 3, the output of the OR circuit 234 for each bit is input to the AND circuit 235. The output of the AND circuit 235 corresponds to the flag information 36 for one entry shown in FIG.

【0068】次に、図1における一致検出回路5の動作
と、本発明にかかるCAMを使用した、入力データの検
索結果の処理例について説明する。
Next, the operation of the coincidence detection circuit 5 in FIG. 1 and an example of processing the search result of the input data using the CAM according to the present invention will be described.

【0069】CAM1は、1エントリ分のデータ判定回
路セルをM個備えている。例えば、M=256であれ
ば、256個のフラグ情報36が、CAM1中に存在
し、その中に、1個でも全ビット一致を示す”1”のフ
ラグが有れば、入力データレジスタに設定したデータ
(例えば、MACアドレス)が、予め、CAM中に登録
したビットマスクパターン付きの256個のデータベー
ス(例えば、MACアドレス)中に、一致するデータパ
ターンを持つことが判る。逆に、256個のフラグ情報
36が全て、全ビット一致を示さない”0”のフラグに
なれば、入力データレジスタに設定した値(例えば、M
ACアドレス)が、予め、CAM中に登録したビットマ
スクパターン付きの256個のデータベース(例えば、
MACアドレス)中に、一致するデータパターンを持た
ないことが判る。
The CAM 1 has M data decision circuit cells for one entry. For example, if M = 256, 256 pieces of flag information 36 are present in CAM1, and if even one of them has a "1" flag indicating all bit matches, it is set in the input data register. It is understood that the obtained data (for example, MAC address) has a matching data pattern in 256 databases (for example, MAC address) with bit mask patterns registered in the CAM in advance. On the contrary, if all the 256 pieces of flag information 36 are "0" flags that do not indicate all bit matches, the value set in the input data register (for example, M
AC address) is a database of 256 databases with bit mask patterns registered in advance in the CAM (for example,
It can be seen that there is no matching data pattern in the MAC address).

【0070】したがって、入力データがCAM内のマス
ク付きのデータベース中に存在するか否かの検索結果だ
けであれば、図1における一致検出回路5は、前記M個
(例えば、256個)のフラグ情報36のうち、少なく
とも1個以上のフラグが全ビット一致を示す”1”であ
るか、あるいは、すべてのフラグ情報36が全ビット一
致を示さない”0”であるかを判別する回路、すなわ
ち、OR回路にて容易に構成することが可能である。
Therefore, if only the search result indicating whether the input data exists in the masked database in the CAM, the match detection circuit 5 in FIG. 1 determines the M (for example, 256) flags. A circuit that determines whether at least one flag of the information 36 is "1" indicating all-bits matching or all flag information 36 is "0" indicating no all-bits matching, that is, , OR circuit.

【0071】さらに、一致検出回路5には、判定結果で
あるOR回路の出力を保持するレジスタを備えた構成と
し、図1に示すように、外部インタフェ−ス回路3に接
続することにより、CAM外部(例えば、前述のルー
タ、ブリッジのプロセッサ等)から、CAMの検索結果
を把握することが可能になる。
Further, the coincidence detection circuit 5 is provided with a register for holding the output of the OR circuit which is the judgment result, and is connected to the external interface circuit 3 as shown in FIG. It becomes possible to grasp the search result of the CAM from the outside (for example, the above-mentioned router, the processor of the bridge, etc.).

【0072】以上が、本発明のデータベースの各構成要
素毎に検索の範囲指定を実現するためのビットマスク機
能を、各エントリに付加したCAMの動作説明であり、
各レジスタ長を48ビットとすることで、例えば、MA
Cアドレス用のフィルタリングテーブルに適用可能であ
る。以上説明したCAMを、IPアドレス用のフィルタ
リングテーブルに適用するには、各レジスタ長を32ビ
ットで構成するか、あるいは、48ビットのレジスタの
下位16ビット、すなわち、ビット32からビット47
までをマスクして使用すれば良い。
The above is the description of the operation of the CAM in which the bit mask function for realizing the search range designation for each component of the database of the present invention is added to each entry.
By setting each register length to 48 bits, for example, MA
It is applicable to the filtering table for C address. To apply the CAM described above to a filtering table for IP addresses, each register length is configured with 32 bits, or the lower 16 bits of a 48-bit register, that is, bits 32 to 47.
You can mask up to use.

【0073】また、CAMの応用システムによっては、
入力データレジスタの内容が、CAM内のマスク付きの
データベース中のどの構成要素(すなわち、エントリ)
で、ワード単位の一致と判定されたかを把握することが
必要となることも考えられる。
Depending on the CAM application system,
The contents of the input data register are the components (ie, entries) in the masked database in the CAM.
Therefore, it may be necessary to grasp whether or not it is determined that the word unit matches.

【0074】例えば、前述のセキュリティ機能を実現す
るブリッジにおいて、廃棄すべきMACアドレスのパタ
ーン(例えば、端末装置の製造者番号)が、複数パター
ン存在するとして、各パターン毎に廃棄したパケット数
を統計情報として計数するような場合である。このよう
な応用に対して、本発明は、ビットマスク機能を伴う比
較処理により、入力データレジスタの内容とワード単位
で一致すると判定したデータベースレジスタのエントリ
の番号(M個のエントリに対して、「0」から「M−
1」まで)を、外部から読めるように構成すれば良いこ
とになる。
For example, assuming that there are a plurality of patterns of MAC addresses to be discarded (for example, the manufacturer number of the terminal device) in the bridge that realizes the above-mentioned security function, the number of discarded packets is statistic for each pattern. This is a case where information is counted. For such an application, the present invention uses the comparison process with the bit mask function to determine the entry number of the database register that is determined to match the contents of the input data register on a word-by-word basis (for M entries, " 0 ”to“ M-
1 ”) can be read externally.

【0075】例えば、図1の一致検出回路5において、
前記1エントリ分のデータ判定回路セル2の判定結果の
全エントリ分(すなわち、M個分)を保持するレジスタ
(これを、「エントリインデックスレジスタ」と称す)
を設け、CAMの外部から該エントリのインデックスレ
ジスタをリード可能とすればよい。
For example, in the coincidence detection circuit 5 of FIG.
A register that holds all entries (that is, M entries) of the determination result of the data determination circuit cell 2 for one entry (this is referred to as "entry index register").
Is provided so that the index register of the entry can be read from outside the CAM.

【0076】また、かかるエントリインデックスレジス
タの内容としては、前記1エントリ分のデータ判定回路
セル2の判定結果をそのまま保持するのでなく、一致を
検出したエントリ番号(M個のエントリに対して、
「0」から「M−1」まで)をコード化して、読み込む
ようにしても良い。例えば、M=256の場合、第5番
目のエントリ番号のデータベースレジスタが、入力レジ
スタのデータとマスク処理結果として一致した場合に
は、該エントリインデックスレジスタの内容としては、
05hとするようなことが考えられる。このように、C
AM内の入力データと一致したデータベースレジスタの
エントリ番号を、外部から得ることが可能となれば、デ
ータベースのうちの、どの要素(データ)と一致したか
を容易に把握可能となる。
Further, as the contents of the entry index register, the determination result of the data determination circuit cell 2 for one entry is not held as it is, but the entry number (M number of entries, for which the match is detected,
"0" to "M-1") may be coded and read. For example, in the case of M = 256, if the database register of the fifth entry number matches the data of the input register as the mask processing result, the contents of the entry index register are as follows:
It may be set to 05h. Thus, C
If the entry number of the database register that matches the input data in the AM can be obtained from the outside, which element (data) in the database can be easily grasped.

【0077】さらに、本発明の応用システムによって
は、検索すべき入力データと一致したデータベースの構
成要素(すなわち、データベースレジスタに、予め設定
されたデータ)毎に、一致判定処理後に行うべき処理が
異なる場合がある。
Further, depending on the application system of the present invention, the processing to be performed after the matching determination processing differs for each constituent element of the database (that is, data preset in the database register) that matches the input data to be searched. There are cases.

【0078】本発明では、データ検索後に応用システム
側が行うべき動作の判別を補助するための機能を実現す
ることも可能であり、その実施例について図8を参照し
て説明する。
In the present invention, it is possible to realize a function for assisting the discrimination of the operation to be performed by the application system side after the data retrieval. An embodiment will be described with reference to FIG.

【0079】図8は前述の図3と同様に、入力データレ
ジスタの内容32と1エントリ分のデータベースレジス
タの内容31について、同じエントリのデータベースマ
スクレジスタの内容34にしたがって、ビットマスク処
理を伴う比較処理を行う際の動作例を説明図である。
Similar to FIG. 3 described above, FIG. 8 compares the contents 32 of the input data register and the contents 31 of the database register for one entry with bit mask processing according to the contents 34 of the database mask register of the same entry. It is explanatory drawing which shows the operation example at the time of performing a process.

【0080】図8に示した実施例では、データベースレ
ジスタの1ワードを構成するビット数Xを52ビットと
し、入力データレジスタの1ワードおよびデータベース
マスクレジスタの1ワードを構成するビット数Lを48
ビットとした点が、図3との相違点であり、他の構成お
よびレジスタ内容は、図3と同様であるものとする。
In the embodiment shown in FIG. 8, the number of bits X forming one word of the database register is 52 bits, and the number of bits L forming one word of the input data register and one word of the database mask register is 48.
The difference from FIG. 3 is that the bits are used, and other configurations and register contents are the same as those in FIG.

【0081】図8において、予めデータベースレジスタ
内の下位(X−L)ビット(本実施例では、4ビット)
については、上位Lビット分のデータと入力データレジ
スタの内容32とのビットマスク処理を伴う比較処理の
結果が一致であった場合、すなわち、全ビット一致を示
すフラグ情報36の内容が「1」となった場合のCAM
の外部装置、例えば、CAMに備えたプロセッサの動作
情報を、記述しておくこととする。なお、このデータベ
ースレジスタ内の下位(X−L)ビットを、「動作情報
フィールド」と称することにする。
In FIG. 8, the lower (XL) bits (4 bits in this embodiment) in the database register are stored in advance.
Regarding the above, when the result of the comparison process involving the bit mask process between the data of the upper L bits and the content 32 of the input data register is a match, that is, the content of the flag information 36 indicating all bit matches is “1”. CAM when
The external device, for example, the operation information of the processor provided in the CAM will be described. The lower (XL) bits in this database register will be referred to as the "motion information field".

【0082】以下、例えば本発明の応用システムが、ブ
リッジ装置であり、受信パケットの宛先MACアドレス
を検索する場合について説明する。該ブリッジ装置では
受信パケットのMACアドレスによって、該受信パケッ
トを中継したり廃棄する他、中継はするものの統計情報
として記録したり、ネットワーク管理者に対してアラー
ムメッセージを表示したり、ブリッジに備えている警告
手段の一例である、ブザーを鳴らして警告しなければな
らないとする。
A case where the application system of the present invention is a bridge device and the destination MAC address of a received packet is searched will be described below. The bridge device relays or discards the received packet according to the MAC address of the received packet, records it as statistical information although it relays it, displays an alarm message to the network administrator, and prepares for the bridge. Suppose that you have to sound a buzzer, which is an example of the warning means.

【0083】このような場合、前述のデータベースレジ
スタの動作情報フィールドに、予め動作情報として、例
えば、MACアドレスを含むパケットをフィルタリン
グ、すなわち、廃棄の場合は”1”、オペレータに対し
てアラームメッセージを表示する場合は”2”など(そ
の他、データの中継等の各種の動作を行うべき旨の情報
を、予め設定しておくことが考えられる)意味付けした
データを設定しておけば、CAMの検索結果として入力
データレジスタの内容と一致した場合に、当該エントリ
のデータベースレジスタの動作情報フィールドを読み出
すことによって、CAM外部のプロセッサが行うべき動
作を高速に処理することができる。
In such a case, in the operation information field of the database register described above, a packet including the MAC address as the operation information in advance is filtered, that is, "1" in the case of discarding, and an alarm message to the operator. If you want to display it, you can set "2" (or other information that various operations such as data relay should be performed in advance) and set meaningful data. When the search result matches the content of the input data register, the operation information field of the database register of the entry is read, whereby the operation to be performed by the processor outside the CAM can be processed at high speed.

【0084】次に、本発明を使用した応用システムの一
例を図5を参照して説明する。
Next, an example of an application system using the present invention will be described with reference to FIG.

【0085】図5は、本発明を使用したルータで接続さ
れた、ネットワークの一例である。
FIG. 5 is an example of a network connected by routers using the present invention.

【0086】図5において、500は、ルータ、501
は、プロセッサ、502は、主記憶、503、504
は、LANインタフェース回路、505は、データ中継
用の送受信バッファメモリである。主記憶502、デー
タ中継用の送受信バッファメモリ505は、メモリLS
I等の電子デバイスにて実現できる。また、LANイン
タフェース回路503、504は、LANの物理層制御
およびMAC層制御を行う、通常市販されてい、通信用
LSIで実現可能である。
In FIG. 5, reference numeral 500 denotes a router 501.
Is a processor, 502 is a main memory, 503, 504
Is a LAN interface circuit, and 505 is a transmission / reception buffer memory for data relay. The main memory 502 and the transmission / reception buffer memory 505 for data relay are the memory LS.
It can be realized by an electronic device such as I. Further, the LAN interface circuits 503 and 504 are usually commercially available for controlling the physical layer and the MAC layer of the LAN, and can be realized by a communication LSI.

【0087】506は、本発明にかかるCAMである。
但し説明を簡単にするために、本実施例では、入力デー
タレジスタ長であるLは、IPアドレスと同じ、32ビ
ットとし、データベースレジスタ長であるXは、36ビ
ットとする。
Reference numeral 506 is a CAM according to the present invention.
However, in order to simplify the description, in this embodiment, the input data register length L is 32 bits, which is the same as the IP address, and the database register length X is 36 bits.

【0088】CAM506は、プロセッサ501がアク
セスできるように、ルータ500の内部バスを介して接
続されているものとする。
The CAM 506 is assumed to be connected via the internal bus of the router 500 so that the processor 501 can access it.

【0089】LANインタフェース回路503には、ネ
ットワークAが接続され、LANインタフェース回路5
04には、ネットワークBが接続されているものとす
る。
The network A is connected to the LAN interface circuit 503, and the LAN interface circuit 5 is connected.
It is assumed that network B is connected to 04.

【0090】さらに、ネットワ−クAには、端末a1と
ルータr1、ルータr2が接続されているものとし、さ
らにまた、ルータr1にはネットワ−クC、ルータr2
にはネットワークDが接続されているものとする。
Further, it is assumed that the terminal a1 and the routers r1 and r2 are connected to the network A, and the network r and the router r2 are connected to the router r1.
It is assumed that the network D is connected to.

【0091】また、ネットワークCには、端末c1と端
末c2が接続されており、ネットワークDには端末d1
と端末d2が接続されているものとする。一方、ネット
ワ−クBには、端末b1、端末b2、端末b3が接続さ
れているものとする。
Further, the terminal c1 and the terminal c2 are connected to the network C, and the terminal d1 is connected to the network D.
And the terminal d2 are connected. On the other hand, it is assumed that the network B is connected to the terminals b1, b2, and b3.

【0092】本実施例におけるルータ500は、LAN
インタフェース回路503が受信したパケットデータの
うち、ネットワークA上のホスト(すなわち、端末また
はルータ)が発信元であるパケットのみネットワークB
に対して中継対象とし、他のネットワーク上のホストが
発信元であるパケットは、廃棄するようにフィルタリン
グするという、一種のセキュリティ機能が必要とされて
いるものとする。なお、パケットの発信元とは、TCP
/IPプロトコルでは、IPパケットにおけるIPヘッ
ダフィールドの発信元(ソース)IPアドレスのことで
ある。
The router 500 in this embodiment is a LAN
Of the packet data received by the interface circuit 503, only packets originating from a host (that is, a terminal or a router) on the network A are network B.
On the other hand, it is assumed that a kind of security function of filtering packets to be relayed and originating from a host on another network is required. The packet source is TCP
In the / IP protocol, it is the source IP address of the IP header field in the IP packet.

【0093】図5においては、ネットワークA上のホス
トは、端末a1とルータr1、ルータr2だけであり、
ルータ500は、これらホストが送信するパケットのみ
をネットワークBへの中継対象とし、ルータr1、ルー
タr2がネットワークC、ネットワークDからネットワ
ークAに中継することによって、LANインタフェース
回路503が受信したパケットについては、ネットワー
クBに対する中継対象とはせずに廃棄するものとする。
In FIG. 5, the hosts on the network A are only the terminal a1, the router r1, and the router r2.
The router 500 relays only the packets transmitted by these hosts to the network B, and the routers r1 and r2 relay the packets from the network C and the network D to the network A. , And is discarded without being relayed to the network B.

【0094】本実施例においては、各ネットワークアド
レス、すなわち、IPアドレスは、上位16ビットがネ
ットワークを示す番号、下位16ビットがホストを示す
番号であるものとする。図5において、例えば、ネット
ワークAのIPアドレスを「8F000000
(h)」、ネットワークBのIPアドレスを「8800
0000(h)」、ネットワークCのIPアドレスを
「8F100000(h)」、ネットワークDのIPア
ドレスを「8F200000(h)」とする。
In the present embodiment, each network address, that is, the IP address, has the upper 16 bits indicating the network and the lower 16 bits indicating the host. In FIG. 5, for example, the IP address of network A is “8F000000
(H) ”, the IP address of network B is“ 8800
0000 (h) ”, the IP address of the network C is“ 8F100000 (h) ”, and the IP address of the network D is“ 8F200000 (h) ”.

【0095】また、端末のIPアドレスについては、例
えば、端末a1のIPアドレスを「8F000001
(h)」、端末b1のIPアドレスを「8800000
18h)」、端末b2のIPアドレスを「880000
02(h)」、端末b3のIPアドレスを「88000
003(h)」、端末c1のIPアドレスを「8F10
0001(h)」、端末c2のIPアドレスを「8F1
00002(h)」、端末d1のIPアドレスを「8F
200001(h)」、端末d2のIPアドレスを「8
F200002(h)」とする。
Regarding the IP address of the terminal, for example, the IP address of the terminal a1 is "8F000001".
(H) ”, the IP address of the terminal b1 is“ 8800000 ”
18h) ", and the IP address of the terminal b2 is" 880000 ".
02 (h) ”and the IP address of the terminal b3 is“ 88000 ”.
003 (h) ”, and the IP address of the terminal c1 is“ 8F10 ”.
0001 (h) ”and the IP address of the terminal c2 is“ 8F1 ”
0000 (h) ", and the IP address of the terminal d1 is" 8F
200001 (h) ”, and the IP address of the terminal d2 is“ 8
F20002 (h) ".

【0096】ルータ500においては、ネットワークA
上のホストの可能性のあるIPアドレス、すなわち、
「8F000000(h)」から「8F00FFFF
(h)」までのIPアドレスが、LANインタフェース
回路503の受信パケットの発信元であれば、該パケッ
トをネットワークBに中継する必要がある。このため
に、予め、CAM506の1個のエントリ、例えば、第
1番目のエントリに対し、データベースレジスタの上位
32ビットに、「8F000000(h)」、データベ
ースマスクレジスタに「0000FFFF(h)」を設
定し、デ−タベースレジスタの下位4ビット(X−Lビ
ット)、すなわち、動作情報フィールドに、前述の動作
情報として「中継」を表す値(例えば”0h”)を設定
しておく。
In the router 500, the network A
The possible IP address of the above host, ie
From "8F000000 (h)" to "8F00FFFF
If the IP address up to (h) ”is the source of the received packet of the LAN interface circuit 503, the packet needs to be relayed to the network B. Therefore, in advance, for one entry of the CAM 506, for example, for the first entry, “8F000000 (h)” is set in the upper 32 bits of the database register and “0000FFFF (h)” is set in the database mask register. However, a value (for example, "0h") representing "relay" is set as the above-mentioned operation information in the lower 4 bits (XL bits) of the database register, that is, in the operation information field.

【0097】また、逆に、ネットワークC上のホストか
ら発信されたパケットを廃棄するためには、予めCAM
506の別のエントリ、例えば、第2番目のエントリに
対し、データベースレジスタの上位32ビットに、「8
F100000(h)」、データベースマスクレジスタ
に「0000FFFF(h)」を設定し、データベース
レジスタの下位4ビット(X−Lビット)、すなわち、
動作情報フィールドに、前述の動作情報として「廃棄」
を表す値(例えば”1h”)を設定しておく。
On the contrary, in order to discard the packet transmitted from the host on the network C, the CAM is previously set.
For another entry of 506, for example, the second entry, in the upper 32 bits of the database register, “8
"F100000 (h)", "0000FFFF (h)" is set in the database mask register, and the lower 4 bits (X-L bits) of the database register, that is,
"Discard" in the operation information field as the operation information described above.
A value (for example, “1h”) that represents is set.

【0098】同様に、ネットワークD上のホストからの
送信パケットを廃棄するためには、予めCAM506の
別のエントリ、例えば、第3番目のエントリに対し、デ
−タベースレジスタの上位32ビットに「8F2000
00(h)」、データベースマスクレジスタに「000
0FFFF(h)」を設定し、データベースレジスタの
下位4ビット(X−Lビット)、すなわち、動作情報フ
ィールドに、前述の動作情報として「廃棄」を表す値、
(例えば”1h”)を設定しておく。
Similarly, in order to discard the transmission packet from the host on the network D, "8F2000" is set in the upper 32 bits of the data base register in advance for another entry of the CAM 506, for example, the third entry.
00 (h) ”,“ 000 ”in the database mask register
0FFFF (h) "is set, and the lower 4 bits (X-L bits) of the database register, that is, the value indicating" discard "as the operation information in the operation information field,
(For example, "1h") is set.

【0099】今、端末a1から端末b2あてに、IPパ
ケットが送信されたとすると、該パケットは、LANイ
ンタフェース回路503を経由してデータ中継用の送受
信バッファメモリ505に格納される。
Now, assuming that an IP packet is transmitted from the terminal a1 to the terminal b2, the packet is stored in the transmission / reception buffer memory 505 for data relay via the LAN interface circuit 503.

【0100】プロセッサ501は、該パケットの発信元
IPアドレス、すなわち、「8F000001(h)」
を、CAM506の入力データレジスタに設定する。本
発明にかかるCAMは、入力データレジスタの内容と全
エントリのデ−タベースレジスタの上位32ビットの内
容についてビットマスク機能を伴う比較処理を行う。
The processor 501 determines the source IP address of the packet, that is, "8F000001 (h)".
Are set in the input data register of the CAM 506. The CAM according to the present invention compares the contents of the input data register and the contents of the upper 32 bits of the data base register of all entries with a bit mask function.

【0101】この場合には、第1番目のエントリにおい
て、両者の相違点がマスクすべきビット位置のみである
から、ワード単位で一致すると判別される。プロセッサ
501は、CAMの検索結果、すなわち、入力データレ
ジスタに設定されたデータと一致するエントリの番号、
すなわち、「1番」を知ることにより、該当する動作情
報として「中継」を表す値”0h”を得る。したがっ
て、プロセッサ501は、該IPパケットを中継すべき
と判断し、中継処理を行う。
In this case, in the first entry, since the only difference between the two is the bit position to be masked, it is determined that they match in word units. The processor 501 finds the CAM search result, that is, the entry number that matches the data set in the input data register,
That is, by knowing "No. 1", the value "0h" representing "relay" is obtained as the corresponding operation information. Therefore, the processor 501 determines that the IP packet should be relayed and performs the relay process.

【0102】また、端末c1から端末b2あてに、IP
パケットが送信されたとすると、該パケットは、LAN
インタフェース回路503を経由して、中継用送受信バ
ッファメモリ505に格納される。
Further, the IP address is transmitted from the terminal c1 to the terminal b2.
If a packet is sent, it
It is stored in the relay transmission / reception buffer memory 505 via the interface circuit 503.

【0103】プロセッサ501は、該パケットの発信元
IPアドレス、すなわち、「8F100001(h)」
を、CAM506の入力データレジスタに設定する。
The processor 501 sends the source IP address of the packet, that is, "8F100001 (h)".
Are set in the input data register of the CAM 506.

【0104】本発明にかかるCAMは、入力データレジ
スタの内容と全エントリのデ−タベースレジスタの上位
32ビットの内容について、ビットマスク機能を伴う比
較処理を行う。この場合には、第2番目のエントリにお
いて、両者の相違点がマスクすべきビット位置のみであ
るから、ワード単位で一致すると判別される。したがっ
て、プロセッサ501は、CAMの検索結果、すなわ
ち、入力データレジスタに設定されたデータと一致する
エントリの番号、すなわち、2番を知ることにより、該
当する動作情報として「廃棄」を表す値”1h”を得る
ことできる。したがって、プロセッサ501は、当該I
Pパケットを中継せず、廃棄すべきと判断し、廃棄処理
を行う。
The CAM according to the present invention compares the contents of the input data register and the contents of the upper 32 bits of the data base register of all entries with a bit mask function. In this case, in the second entry, since the only difference between the two is the bit position to be masked, it is determined that they match in word units. Therefore, the processor 501 knows the search result of the CAM, that is, the number of the entry that matches the data set in the input data register, that is, the number 2, and the value "1h" representing "discard" as the corresponding operation information. You can get Therefore, the processor 501
The P packet is not relayed, it is determined that it should be discarded, and the discard process is performed.

【0105】以上述べたように、本発明にかかるCAM
を使用したルータでは、ネットワークのセキュリティ機
能としてのIPアドレスのフィルタリングを高速に行う
ことが可能となる。
As described above, the CAM according to the present invention
With the router using, the IP address filtering as a network security function can be performed at high speed.

【0106】次に、本発明の第二の目的であるMACア
ドレス(48ビット)とIPアドレス(32ビット)の
ように、データ長の異なるデータが混在する場合におい
て、データ検索、一致判定機能を実現するための実施例
について説明する。
Next, in the case where data having different data lengths are mixed such as the MAC address (48 bits) and the IP address (32 bits), which is the second object of the present invention, the data search and match determination functions are performed. An example for realizing this will be described.

【0107】近年、ブリッジとルータの両方の機能を有
する、ブルータと称される装置が提案されてきている。
ブルータは、特定のネットワーク層プロトコル(例え
ば、TCP/IPプロトコル等)に対しては、ルータと
して動作し、他の種類のネットワーク層プロトコル(例
えば、OSIのCLNPプロトコル等)に対しては、ブ
リッジとして動作する装置である。
In recent years, a device called a bruta has been proposed which has both a bridge function and a router function.
Brutor acts as a router for certain network layer protocols (eg, TCP / IP protocol) and as a bridge for other types of network layer protocols (eg, OSI's CLNP protocol). It is a device that operates.

【0108】1種類のCAMで、長さの異なるデータを
検索する、簡単な方法としては、前述の実施例や、従来
知られているCAMのように、データベースレジスタの
データ長が固定長のデータ判定回路セルを有して構成さ
れたメモリ装置を使用して、複数の固定データ長(例え
ば、CAMのデータ長L=48と、L=32)のブロッ
クを、単にLSI等の1チップの半導体回路として集積
するという方法が考えられる。これは、技術的には、デ
ータ長の異なる複数個のCAMを使用することと同様で
あり、前述の実施例から容易に実現可能であるため説明
を省略する。
As a simple method for retrieving data of different lengths with one type of CAM, data of which the data length of the database register is a fixed length, as in the above-mentioned embodiment and conventionally known CAM, is used. By using a memory device configured to have a determination circuit cell, a block having a plurality of fixed data lengths (for example, CAM data lengths L = 48 and L = 32) is simply used as a one-chip semiconductor such as an LSI. A method of integrating as a circuit is considered. This is technically the same as using a plurality of CAMs having different data lengths, and can be easily realized from the above-described embodiment, so the description thereof will be omitted.

【0109】以下に、CAMのデータ長Lを、各エント
リごとに、可変にすることを可能とした実施例につい
て、図6および図7を参照して説明する。
An embodiment in which the CAM data length L can be made variable for each entry will be described below with reference to FIGS. 6 and 7.

【0110】なお、図6において、図1と同番号の構成
要素は、図1で説明した構成要素と同じ機能を有するも
のとし説明を省略する。また、本実施例においては前述
の実施例と同様に、X=L=48ビットとする。
In FIG. 6, the constituent elements having the same numbers as those in FIG. 1 have the same functions as the constituent elements described in FIG. Further, in this embodiment, X = L = 48 bits is set as in the above-described embodiments.

【0111】図6において、10は、有効入力データ長
レジスタであり、外部インタフェ−ス回路3を介して、
外部から設定可能な構成とする。
In FIG. 6, reference numeral 10 is a valid input data length register, and through the external interface circuit 3,
The configuration can be set from the outside.

【0112】有効入力データ長レジスタ10は、Ya個
のフリップフロップで構成するYaビットのレジスタで
あるとし、本実施例では、例えばYa=8ビットとす
る。
The valid input data length register 10 is assumed to be a Ya-bit register composed of Ya flip-flops, and in this embodiment, for example, Ya = 8 bits.

【0113】この8ビットの有効入力データ長レジスタ
10には、入力データレジスタ4に設定する入力データ
のうち、有効なビット数(Na)を設定する。
In the 8-bit effective input data length register 10, the effective number of bits (Na) of the input data set in the input data register 4 is set.

【0114】ここで、有効なビット数とは、レジスタ中
の実際にデータとして意味のあるビット数のことであ
る。例えば、検索対象の入力デ−タが、IPアドレス、
すなわち、32ビットのデータの場合、入力デ−タレジ
スタが48ビットで構成されているため、CAMへの入
力データとしては、48ビット分のデータを設定せざる
を得ないが、有効入力データ長レジスタ10には、48
ビットの入力データのうち意味のあるデータのビット数
として、Na=32、すなわち、16進数表現の20
(h)を設定する。
Here, the effective number of bits is the number of bits actually meaningful as data in the register. For example, if the input data to be searched is an IP address,
That is, in the case of 32-bit data, since the input data register is composed of 48 bits, it is unavoidable to set 48-bit data as the input data to the CAM, but the effective input data length register 48 for 10
As the number of bits of meaningful data in the bit input data, Na = 32, that is, 20 in hexadecimal notation.
Set (h).

【0115】また、図6において、データ判定回路セル
2は、CAM1内に複数個(例えばM個)備えており、
各データ判定回路セル2は、データベースレジスタ21
と、有効データベース長レジスタ24と、有効データ長
判定機能付き比較回路25を備えている。
Further, in FIG. 6, a plurality of (for example, M) data decision circuit cells 2 are provided in the CAM 1,
Each data judgment circuit cell 2 has a database register 21.
And a valid database length register 24 and a comparison circuit 25 with a valid data length determination function.

【0116】有効データベース長レジスタ24は、Yb
個のフリップフロップで構成するYbビットのレジスタ
であるとし、本実施例では、例えばYb=8ビットとす
る。
The effective database length register 24 stores Yb
It is assumed that the register is a Yb-bit register composed of a plurality of flip-flops, and in the present embodiment, for example, Yb = 8 bits.

【0117】この8ビットの有効データベース長レジス
タ24には、各エントリのデータベースレジスタに設定
されているデータの有効なビット数(Nb)を設定す
る。
In this 8-bit effective database length register 24, the effective number of bits (Nb) of the data set in the database register of each entry is set.

【0118】例えば、データベースレジスタに、MAC
アドレスが設定されている場合は、Nbとして、48、
すなわち、16進数表現の30(h)、IPアドレスが
設定されている場合は、Nbとして32、すなわち、1
6進数表現の20(h)を有効データベース長レジスタ
24に設定する。
For example, in the database register, MAC
If the address is set, Nb is 48,
That is, 30 (h) in hexadecimal notation, 32 is set as Nb when an IP address is set, that is, 1
Hexadecimal expression 20 (h) is set in the effective database length register 24.

【0119】また、有効データ長判定機能付き比較回路
25は、図1に示したビットマスク機能付き比較回路2
3と同様に、AND回路、OR回路等の論理素子で実現
可能な回路であり、Na=Nbの有効データ長を有する
データベースレジスタ21と、入力データレジスタ4の
内容とを、ビット単位で比較し、全ビット一致、すな
わ、ワード単位で一致するか否かを判別する回路であ
り、具体的な比較処理内容の説明は、図7を参照して行
う。
Further, the comparison circuit 25 with the effective data length judgment function is the comparison circuit 2 with the bit mask function shown in FIG.
Similarly to 3, a database register 21 having a valid data length of Na = Nb, which is a circuit that can be realized by a logical element such as an AND circuit and an OR circuit, and the contents of the input data register 4 are compared in bit units. , All-bits match, that is, a circuit for determining whether or not matches are made in word units, and a concrete description of the comparison process will be given with reference to FIG. 7.

【0120】図7は、CAM1の1エントリ分のデータ
判定回路セル2内部の動作例の説明図である。以下、C
AM1の1エントリ分のデータ判定回路セル2内部の動
作について説明する。
FIG. 7 is an explanatory diagram of an operation example inside the data determination circuit cell 2 for one entry of the CAM 1. Below, C
The operation inside the data determination circuit cell 2 for one entry of AM1 will be described.

【0121】図7において、310は、1エントリ分の
データベースレジスタ21の内容、320は、入力デー
タレジスタ4の内容である。ここで、本実施例における
有効データ長判定機能付き比較回路25を簡単に構成す
るために、便宜的に、本エントリの有効データベース長
レジスタ24の内容を、データベースレジスタ21の直
後に連結して構成し、ビット48からビット55に配置
して、データベースレジスタの内容310としては、5
6ビットで表す。
In FIG. 7, 310 is the contents of the database register 21 for one entry, and 320 is the contents of the input data register 4. Here, in order to simply configure the comparison circuit 25 with a valid data length determination function in the present embodiment, for convenience, the contents of the valid database length register 24 of this entry are connected immediately after the database register 21. Then, by arranging from bit 48 to bit 55, the content 310 of the database register is 5
Expressed in 6 bits.

【0122】同様に、入力データ長レジスタ10の内容
を、前記入力データレジスタ21の直後に連結して構成
し、ビット48からビット55に配置して、入力データ
レジスタの内容320としては、56ビットで表す。
Similarly, the contents of the input data length register 10 are concatenated immediately after the input data register 21 and arranged from bit 48 to bit 55, and the contents 320 of the input data register are 56 bits. It is represented by.

【0123】したがって、有効データ長判定機能付き比
較回路は、56ビットのビット比較処理を行うことによ
って、有効データ長の一致(Na=Nb)も判別するこ
とが可能である。この56ビットのビット単位での比較
処理結果の内容を、330に示すこととし、さらに、5
6ビットの比較処理結果が、全てのビットで一致である
か否かを示すフラグ情報を、340に示す。
Therefore, the comparator circuit with a valid data length determination function can determine the valid data length match (Na = Nb) by performing a 56-bit bit comparison process. The contents of the comparison processing result in units of 56 bits are shown in 330.
340 indicates flag information indicating whether or not the result of the 6-bit comparison process is a match for all the bits.

【0124】今、検索対象の入力データが32ビットの
IPアドレスであるとし、本エントリのデータベースレ
ジスタには、予め48ビットのMACアドレスが設定さ
れているとする。本エントリの有効データベース長Nb
は30(h)、有効入力データ長Naはを20(h)と
なる。この場合、データベースレジスタの内容310
と、入力データレジスタの内容320を単純に比較する
と、bit51の位置で不一致が生じ、ビット単位の比
較結果330のbit51は、不一致を示す値”0”と
なる。したがって、全ビット一致のフラグ情報340は
不一致を示す値”0”となる。
It is assumed that the input data to be searched is a 32-bit IP address and a 48-bit MAC address is set in advance in the database register of this entry. Effective database length Nb of this entry
Is 30 (h) and the effective input data length Na is 20 (h). In this case, the contents of the database register 310
When the contents 320 of the input data register are simply compared with each other, a mismatch occurs at the position of the bit 51, and the bit 51 of the bit-by-bit comparison result 330 has the value “0” indicating the mismatch. Therefore, the flag information 340 indicating that all bits match has a value “0” indicating a mismatch.

【0125】以上のように、有効データ長を考慮した比
較を行うことにより、異なるデータ長を有するデータが
混在しても検索可能な、可変長データに対応可能なCA
Mを実現することができる。これにより、前述のブルー
タのような応用では高速処理という性能面での効果だけ
ではなく、MACアドレスとIPアドレスを1種類のC
AMで検索することが可能となり、装置コストの低減と
いう経済的な効果もある。
As described above, by performing the comparison in consideration of the effective data length, it is possible to search even if the data having different data lengths are mixed, and the CA that can handle the variable length data.
M can be realized. As a result, in applications such as the above-mentioned bruta, not only the performance effect of high-speed processing but also the MAC address and IP address of one type of C
Since it is possible to search by AM, there is also an economical effect of reducing the device cost.

【0126】また、図6および図7を参照して説明した
実施例においては、データベースレジスタ長Xと、入力
データレジスタ長Lを、ともに48ビットとしたが、前
述の実施例のように、データベースレジスタに(X−
L)ビットの動作情報フィールドを設けてもよい。
In the embodiment described with reference to FIGS. 6 and 7, both the database register length X and the input data register length L are 48 bits. In the register (X-
An L) bit motion information field may be provided.

【0127】また、さらに、他の実施例としては、本発
明の第一の目的と第二の目的を同時に実現する構成、す
なわち、固定長の入力データレジスタ、および、全ての
データベースレジスタに対して、各々有効データ長を示
すレジスタを設け、かつ、データベースレジスタ毎にビ
ットマスク機能付きの比較処理を行うレジスタ、およ
び、比較器を有する構成としても良い。
Furthermore, as another embodiment, a configuration for simultaneously realizing the first and second objects of the present invention, that is, for fixed-length input data registers and all database registers Alternatively, a register may be provided that indicates the effective data length, and a register that performs a comparison process with a bit mask function for each database register and a comparator may be provided.

【0128】以上述べてきたように、本発明の実施例お
よびその組合せの実施例によれば、CAMを高機能化す
るだけではなく、その応用範囲も広がる。特に、本発明
によれば、一種類のCAMであっても、その適用範囲を
広げ、汎用化することができるため、1チップのメモリ
LSIとして量産化が可能となるという産業上の効果も
期待できる。かかる量産化は、関連産業の活発化に寄与
し、産業の発達たる特許法の究極的な法目的を実効あら
しめることになる。
As described above, according to the embodiments of the present invention and the combination thereof, not only the CAM is made highly functional, but also its application range is expanded. In particular, according to the present invention, even if one kind of CAM is used, its application range can be widened and can be generalized, so that an industrial effect that a mass production as a one-chip memory LSI is possible is expected. it can. Such mass production contributes to the activation of related industries, and effectively presents the ultimate legal purpose of the patent law, which is the development of industry.

【0129】逆に、以上説明した本発明のCAM(図
1、図6における、「1」にて示した部分)を、1チッ
プの半導体集積回路で構成することにより、高性能、高
機能な通信制御装置の小型化を可能とする効果も生じ
る。
On the contrary, by configuring the CAM of the present invention described above (portion indicated by "1" in FIGS. 1 and 6) by a one-chip semiconductor integrated circuit, high performance and high functionality can be achieved. There is an effect that the communication control device can be downsized.

【0130】[0130]

【発明の効果】本発明にかかるメモリは、登録されたデ
ータを検索対象にし、与えられたデータが検索対象内に
存在するか否かを、ビット単位で高速に検出することを
可能とし、また、ルータ、ブリッジ等に使用することに
より、IPアドレス、MACアドレスの可変長のビット
パターン指定、すなわち、ビットマスク指定による、高
速なフィルタリング機能を実現することが可能となる。
The memory according to the present invention makes it possible to detect registered data as a search target, and whether or not given data exists in the search target at high speed in bit units. , A router, a bridge, etc., it is possible to realize a high-speed filtering function by designating a variable-length bit pattern of an IP address or a MAC address, that is, by designating a bit mask.

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

【図1】本発明にかかる実施例の構成図である。FIG. 1 is a configuration diagram of an embodiment according to the present invention.

【図2】従来のブリッジ装置によるネットワークの構成
例の説明図である。
FIG. 2 is an explanatory diagram of a configuration example of a network using a conventional bridge device.

【図3】本発明によるデータ判定回路セルの動作の説明
図である。
FIG. 3 is an explanatory diagram of the operation of the data determination circuit cell according to the present invention.

【図4】1エントリ分のデ−タ判定回路セルの構成図で
ある。
FIG. 4 is a configuration diagram of a data determination circuit cell for one entry.

【図5】本発明にかかるメモリを使用したルータ装置に
よるネットワークの構成例の説明図である。
FIG. 5 is an explanatory diagram of a configuration example of a network using a router device that uses a memory according to the present invention.

【図6】本発明にかかる、他の実施例の構成図である。FIG. 6 is a configuration diagram of another embodiment according to the present invention.

【図7】可変長データに対応した、本発明にかかるメモ
リのデータ判定回路セルの動作の説明図である。
FIG. 7 is an explanatory diagram of the operation of the data determination circuit cell of the memory according to the present invention, which corresponds to variable length data.

【図8】動作情報フィールドを使用したデ−タ判定回路
セルの動作の説明図である。
FIG. 8 is an explanatory diagram of the operation of the data determination circuit cell using the operation information field.

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

1…連想メモリ、2…CAMの1エントリ分の、データ
判定回路セル、3…外部インタフェース回路、4…入力
データレジスタ、5…一致検出回路、10…入力データ
長レジスタ、21…データベースレジスタ、22…デー
タベースマスクレジスタ、23…ビットマスク機能付き
比較回路、24…有効データベース長レジスタ、25…
有効データ長判定機能付き比較回路、100…ブリッ
ジ、230…比較回路の1ビット分の、ビットマスク機
能付き比較回路、500…ルータ
DESCRIPTION OF SYMBOLS 1 ... Associative memory, 2 ... Data determination circuit cell for 1 entry of CAM, 3 ... External interface circuit, 4 ... Input data register, 5 ... Match detection circuit, 10 ... Input data length register, 21 ... Database register, 22 ... database mask register, 23 ... comparison circuit with bit mask function, 24 ... effective database length register, 25 ...
Comparison circuit with effective data length determination function, 100 ... Bridge, 230 ... Comparison circuit with bit mask function for 1 bit of comparison circuit, 500 ... Router

───────────────────────────────────────────────────── フロントページの続き (72)発明者 澤田 素直 神奈川県横浜市戸塚区吉田町292番地 株式会社 日立製作所 マイクロエレク トロニクス機器開発研究所内 (72)発明者 榎本 博道 神奈川県海老名市下今泉810番地 株式 会社 日立製作所 オフィスシステム事 業部内 (72)発明者 左古 義人 神奈川県海老名市下今泉810番地 株式 会社 日立製作所 オフィスシステム事 業部内 (56)参考文献 特開 平3−12896(JP,A) 特開 平1−220293(JP,A) 特開 平4−21997(JP,A) 特開 平5−153125(JP,A) (58)調査した分野(Int.Cl.7,DB名) H04L 12/46 100 G11C 15/04 601 G11C 15/04 631 H04L 12/56 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inoue Shunada Sawada 292 Yoshida-cho, Totsuka-ku, Yokohama-shi, Kanagawa Hitachi, Ltd. Microelectronics Equipment Development Laboratory (72) Inventor Hirono Enomoto 810 Shimoimazumi, Ebina-shi, Kanagawa Hitachi, Ltd. Office System Business Department (72) Inventor Yoshito Sako 810 Shimoimaizumi, Ebina City, Kanagawa Prefecture Hitachi System Office System Business Department (56) Reference JP 3-12896 (JP, A) JP-A 1-220293 (JP, A) JP-A 4-21997 (JP, A) JP-A 5-153125 (JP, A) (58) Fields investigated (Int.Cl. 7 , DB name) H04L 12/46 100 G11C 15/04 601 G11C 15/04 631 H04L 12/56

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数の第1のデータを予め保持し、外部か
ら入力される第2のデータと前記複数の第1のデータと
が一致するか否かを判定するメモリ装置において、 Lビット(Lは、1以上の整数)の長さを持ち、前記第
2のデータを保持する入力データレジスタと、 Xビット(Xは、L以上の整数)の長さを持ち、前記複
数の第1のデータのそれぞれを保持するM個(Mは1以
上の整数)のデータベースレジスタと 記入力データレジスタに保持される前記第2のデータ
と前記データベースレジスタに保持される前記第1のデ
ータとが一致するか否かをビット毎に判定し、全てのビ
ットが一致した場合に、全ビット一致の旨の判定結果を
出力するM個のデータベースレジスタ比較手段と、 該M個のデータベースレジスタ比較手段によるM個の判
定結果のうち少なくとも1以上が全ビット一致示して
いた場合に、データ一致の旨の情報を出力するデータ一
致検出手段と、 前記入力データレジスタの保持する前記第2のデータの
ち前記データベースレジスタ比較手段による判定対象
にすべきデータ部を示す第1有効データ長(長さNaビ
ット:Naは、0以上、L以下の整数)が設定される
効入力データ長レジスタと、前記データベースレジスタ毎に設けられ、 前記データベ
ースレジスタの保持する前記第1のデータのうち、前記
データベースレジスタ比較手段による判定対象にすべき
データ部を示す第2有効データ長(長さNbビット:N
bは、0以上、以下の整数)が設定されるM個の有効
データベース長レジスタと、 前記第1有効データ長(Naビット)と各々の前記2有
効データ長(Nbビット)とが一致するか不一致かを判
定するM個の有効データ長比較手段とを備え、前記データベースレジスタ比較手段は、 前記有効データ長比較手段が一致すると判定した場合、
前記入力データレジスタに保持された前記第2のデータ
のうちの前記第1有効データ長(Naビット)のデータ
と、前記データベースレジスタに保持された前記第1の
データのうちの 前記第2有効データ長(Nbビット)の
データの全てのビットが一致するか不一致かの判定結果
を前記データ一致検出手段に出力し、 前記有効データ長比較手段が不一致と判定した場合、前
記第2のデータと前記第1のデータとがビット毎に一致
するか否かに関わらず不一致の旨の判定結果を前記デー
タ一致検出手段に出力すること を特徴とするメモリ装
置。
1. A plurality of first data is held in advance and is stored externally.
Second data input from the above and the plurality of first data
In the memory device for determining whether or not match, L has a length of L bits (L is an integer of 1 or more),
An input data register for holding the data of 2 and a length of X bits (X is an integer greater than or equal to L),
And database registers of M (M is an integer of 1 or more) for holding a respective first data number, the first said and said second data held in the entering force data register is held in the database register De 1
Data for each bit and determine whether all
If the Tsu bets are matched, and M database registers comparing means you output a determination result indicating that all bits match, at least one or more of the M decision result that by the said M pieces of database registers comparing means If but it had shown all bits match, and Lud over data coincidence detecting means to output the information to the effect that the data match, Chi cormorants <br/> of the second data held in the input data register before serial first effective data length shows the data unit to be in the determination target by the database register comparison means (length Na bit: Na is 0 or more, L an integer) Yes <br/> effective input data length is set a register, provided for each of the database register, among the first data held in the database register, the second effective shows the data unit to be in the determination target by the database register comparison means Over data length (length Nb bit: N
b is 0 or more, and M usable database length register that X an integer) is set, the first valid data length (Na bits) and each of the two valid data length (Nb bits) and matches Determine if it is a mismatch
M valid data length comparing means for determining, and the database register comparing means determines that the valid data length comparing means match,
The second data held in the input data register
Of the first effective data length (Na bits) of the
And the first database held in the database register
Of the second effective data length (Nb bits) of the data
Judgment result whether all bits of data match or do not match
Is output to the data match detection means, and the valid data length comparison means determines that there is no match,
The second data and the first data match bit by bit.
Whether or not to execute
A memory device characterized in that the data is output to the coincidence detection means .
【請求項2】通信回線と接続され、前記通信回線に対し
てパケットデータを送受信するインタフェース回路と、
前記インタフェース回路により送受信されるパケットデ
ータを格納するバッファメモリと、複数の第1のアドレ
スデータを予め保持し、前記バッファメモリに格納され
たパケットデータに含まれる第2のアドレスデータと前
記複数の第1のアドレスデータとが一致するか判定する
CAM(Content Addressable M
emory)と、前記CAMの判定結果に応じて前記バ
ッファメモリに格納されたパケットデータを、前記パケ
ットデータを受信した通信回線とは異なる通信回線に中
継または廃棄するプロセッサとを有する通信装置であっ
て、 前記CAMは、 Lビット(Lは1以上の整数)の長さを持ち、前記第2
のアドレスデータを保持する入力データレジスタと、 Xビット(XはL以上の整数)の長さを持ち、前記第1
のアドレスデータを保持するM個(Mは1以上の整数)
のデータベースレジスタと、 前記入力データレジスタの保持するLビットのデータの
うち、有効なデータ部を示す第1有効データ長(長さN
aビット:Naは0以上L以下の整数)が設定される有
効入力データ長レジスタと、 前記データベースレジスタ毎に、前記データベースレジ
スタの保持するXビットのデータのうち、有効なデータ
部を示す第2有効データ長(長さNbビット:Nbは0
以上X以下の整数)が設定されるM個の有効データベー
ス長レジスタと、 前記第1有効データ長(Naビット)と各々の前記2有
効データ長(Nbビッ ト)とが一致するか不一致かを判
定するM個の有効データ長比較手段と、 前記データベースレジスタ毎に、前記入力データレジス
タに保持された前記第2のアドレスデータのうちの前記
第1有効データ長(Naビット)のデータと、前記デー
タベースレジスタに保持された前記第1のアドレスデー
タのうちの前記第2有効データ長(Nbビット)のデー
タとが一致するか否かをビット毎に判定し、前記有効デ
ータ長比較手段が一致すると判定した場合には、前記判
定した結果を出力し、前記有効データ長比較手段が不一
致と判定した場合には、前記第2のアドレスデータと前
記第1のアドレスデータとが一致するか否かに関わらず
不一致の旨の判定結果を出力するM個のデータベースレ
ジスタ比較手段と、 前記M個のデータベースレジスタ比較手段から出力され
るM個の判定結果のうち少なくとも1以上が全ビット一
致する場合にはデータ一致の旨の情報を出力するデータ
一致検出手段と、を有することを特徴とする通信装置。
2. A communication line connected to the communication line
Interface circuit for transmitting and receiving packet data
Packet data transmitted and received by the interface circuit
Buffer memory for storing data and a plurality of first addresses
Data is stored in advance in the buffer memory.
The second address data included in the packet data and the previous
It is determined whether the plurality of first address data matches.
CAM (Content Addressable M
memory) and the result of the CAM determination.
Packet data stored in the buffer memory.
On a communication line different from the communication line that received the
A communication device that has a processor to
The CAM has a length of L bits (L is an integer of 1 or more), and the second
An input data register for holding the address data of X, having a length of X bits (X is an integer greater than or equal to L),
Address data of M (M is an integer of 1 or more)
Database register and L-bit data held in the input data register
Of these, the first valid data length (length N) indicating the valid data part
a bit: Na is an integer from 0 to L inclusive) is set
The effective input data length register and the database register for each database register.
Valid data among the X-bit data held by the
Second effective data length indicating a part (length Nb bit: Nb is 0
M or more valid databases that are set to an integer from X to X
Length register, the first valid data length (Na bits) and each of the two
Effective data length (Nb-bit) and the match or mismatch or Han
M effective data length comparing means to be defined, and the input data register for each database register.
Of the second address data stored in the data
Data of the first effective data length (Na bits) and the data
The first address data stored in the database register.
Data of the second effective data length (Nb bits) of the data
Data for each bit and determine whether the valid data
If the data length comparison means determines that they match, the above
The determined result is output and the valid data length comparison means is
If it is determined that there is a match, the second address data and the previous
Regardless of whether or not it matches the first address data
M database records that output the determination result of the mismatch
Output from the register comparing means and the M database register comparing means.
At least one or more of the M judgment results
Data that outputs information indicating that the data matches if there is a match
A communication device comprising: a coincidence detection unit.
【請求項3】通信回線と接続され、前記通信回線に対し
てデータを送受信するインタフェース回路と、前記イン
タフェース回路により送受信されるデータを格納するバ
ッファメモリと、複数の第1のデータを予め保持し、前
記バッファメモリに格納されたデータに含まれる第2の
データと前記複数の第1のデータとが一致するか判定す
るCAM(Content Addressable
Memory)と、前記CAMの判定結果に応じて前記
バッファメモリに格納されたデータを処理するプロセッ
サとを有する情報処理装置であって、 前記CAMは、 Lビット(Lは1以上の整数)の長さを持ち、前記第2
のデータを保持する入力データレジスタと、 Xビット(XはLより大きい整数)の長さを持ち、前記
複数の第1のデータのそれぞれを保持するM個(Mは1
以上の整数)のデータベースレジスタと、 前記データベースレジスタ毎に、前記データベースレジ
スタに保持される前記第1のデータを判定対象にすべき
か否かをビット単位で指定するマスク情報が設定される
M個のデータベースマスクレジスタと、 前記データベースマスクレジスタ毎に、前記データベー
スレジスタに保持される前記第1のデータのうち、前記
マスク情報により判定対象にすべきと指定された各ビッ
トを指示する制御信号を生成するビットマスク制御手段
と、 前記データベースレジスタ毎に、前記データベースレジ
スタに保持される前記第1のデータのうちの前記制御信
号により指示された各ビットに対応するデータと、前記
入力データレジスタに保持された前記第2のデータのう
ちの前記指示された各ビットに対応するデータとが一致
するか否かをビット毎に判定し、全てのビットが一致す
るか否かの判定結果を出力するM個のデータベースレジ
スタ比較手段と、 前記M個のデータベースレジスタ比較手段から出力され
るM個の判定結果のうち少なくとも1以上が全ビット一
致を示す場合にデータ一致の旨の情報を出力するデータ
一致検出手段とを少なくとも備え、 各々の前記データベースレジスタのうちの下位(X−
L)ビットの領域には、予め前記プロセッサの動作を指
定する動作情報が設定されており、 前記プロセッサは、前記CAMにおいて前記入力データ
レジスタに保持された前記第2のデータと何れかの前記
データベースレジスタに保持される前記第1のデータと
が一致すると判定されると、前記何れかのデータベース
レジスタの前記下位(X−L)ビットの領域に設定され
た前記動作を読み出し、前記動作情報により指定された
動作を実行することを特徴とする情報処理装置。
3. A communication line connected to the communication line
Interface circuit for transmitting and receiving data by
Interface that stores the data sent and received by the interface circuit.
Buffer memory and a plurality of first data in advance,
The second data included in the data stored in the buffer memory
It is determined whether the data and the plurality of first data match each other.
CAM (Content Addressable)
Memory) and the CAM according to the determination result of the CAM.
A processor that processes the data stored in the buffer memory.
The CAM has a length of L bits (L is an integer of 1 or more), and
An input data register for holding the data of X, and having a length of X bits (X is an integer larger than L),
M pieces (M is 1) holding each of the plurality of first data
Database register of the above integer) and the database register for each database register.
The first data held in the star should be the judgment target
Mask information that specifies whether or not to set in bit units is set
M database mask registers, and the database mask register for each database mask register.
Of the first data stored in the register
Each bit specified by the mask information to be judged
Bit mask control means for generating a control signal for instructing
And the database register for each database register.
The control signal of the first data stored in the
Data corresponding to each bit indicated by the
The second data stored in the input data register
The data corresponding to each of the indicated bits
It is determined for each bit whether or not to match, and all bits match.
M database registers that output the determination result of whether or not
Output from the star comparison means and the M database register comparison means.
At least one or more of the M judgment results
Data that outputs information indicating that the data match if there is a match
At least a match detection means, and the lower (X-
In the L) bit area, the operation of the processor is specified in advance.
Operation information to be set is set, the processor is configured to input the input data in the CAM.
The second data stored in the register and any one of the above
The first data held in the database register and
Is determined to match, any one of the above databases
It is set in the area of the lower (XL) bits of the register.
The operation specified by the operation information is read out.
An information processing device, characterized by executing an operation.
【請求項4】複数の第1のデータを予め保持し、外部か
ら入力される第2のデータと前記複数の第1のデータと
が一致するか否かを判定するメモリ装置において、 前記第2のデータを保持する入力データ保持部と、 前記複数の第1のデータのそれぞれを保持する複数のデ
ータベース部と、 前記データベース部毎に、前記データベース部に保持さ
れる前記第1のデータのうちの有効なデータ長が設定さ
れる複数の有効データ長保持部と、 前記データベース部毎に、前記データベース部に保持さ
れる前記第1のデータのうちの前記有効データ長保持部
に設定された前記有効データ長のデータと前記 第2のデ
ータとが一致するか否かをビット毎に判定し、全てのビ
ットが一致するか否かの判定結果を出力する複数の比較
部と、 前記複数の比較部のそれぞれから出力される判定結果を
入力し、何れかの前記データベース部が前記第2のデー
タと一致する前記第1のデータを保持しているか否かの
情報を出力する一致検出部とを少なくとも有することを
特徴とするメモリ装置。
4. A plurality of first data is held in advance and is stored externally.
Second data input from the above and the plurality of first data
In the memory device for determining whether or not the two match, the input data holding unit holding the second data and the plurality of data holding each of the plurality of first data.
The database part and each of the database parts are stored in the database part.
The valid data length of the first data
A plurality of effective data length holding units that are stored in the database unit for each database unit.
The valid data length holding unit of the first data to be stored
Wherein said effective data length of the data set in the second de
Data for each bit and determine whether all
Multiple comparisons that output the result of determining whether or not the
Section and the judgment results output from each of the plurality of comparison sections.
Input, and one of the database sections
Whether to hold the first data that matches the data
It has at least a match detection unit that outputs information.
Characteristic memory device.
【請求項5】請求項4記載のメモリ装置において、 前記データベース部毎に、前記データベース部に保持さ
れる前記第1のデータを判定対象にすべきか否かをビッ
ト単位で指定するマスク情報が設定される複数のマスク
情報保持部と、 前記マスク情報保持部毎に、前記データベース部に保持
される前記第1のデータのうち、前記マスク情報により
判定対象にすべきと指定された各ビットを指示する制御
信号を生成する複数のビットマスク制御部とを更に有
し、 各々の前記比較部は、前記データベース部に保持される
前記第1のデータのうちの前記有効データ長のデータの
うち、更に前記制御信号により指示された各ビットに対
応するデータと、前記第2のデータのうちの前記指示さ
れた各ビットに対応するデータとが一致するか否かをビ
ット毎に判定することを特徴とするメモリ装置。
5. The memory device according to claim 4, wherein each database unit is stored in the database unit.
Whether or not the first data to be judged is to be judged.
Multiple masks with mask information specified in units
The information holding unit and the mask information holding unit holds the database unit.
Of the first data that is
Control to instruct each bit that should be judged
It also has a plurality of bit mask control units for generating signals.
However , each of the comparison units is stored in the database unit.
Of the data of the effective data length of the first data
Among them, each bit designated by the control signal is paired.
The corresponding data and the instruction of the second data
Whether the data corresponding to each bit
A memory device characterized by making a determination for each set.
【請求項6】請求項1およびのいずれか記載のメモリ
装置において、1チップの半導体集積回路で構成されて
いることを特徴とするメモリ装置
6. The memory according to claim 1 or 4.
The device consists of a single-chip semiconductor integrated circuit
Memory device characterized by there
【請求項7】通信回線と接続され、前記通信回線に対し
てパケットデータを送受信するインタフェース回路と、
前記インタフェース回路により送受信されるパケットデ
ータを格納するバッファメモリと、複数の第1のアドレ
スデータを予め保持し、前記バッファメモリに格納され
たパケットデータに含まれる第2のアドレスデータと前
記複数の第1のアドレスデータとが一致するか判定する
CAM(Conten t Addressable M
emory)と、前記CAMの判定結果に応じて前記バ
ッファメモリに格納されたパケットデータを処理するプ
ロセッサとを有する通信装置であって、 前記CAMは、 前記第2のアドレスデータを保持する入力データ保持部
と、 前記複数の第1のアドレスデータのそれぞれを保持する
複数のデータベース部と、 前記データベース部毎に、前記データベース部に保持さ
れる前記第1のアドレスデータのうちの有効なデータ長
が設定される複数の有効データ長保持部と、 前記データベース部毎に、前記データベース部に保持さ
れる前記第1のアドレスデータのうちの前記有効データ
長保持部に設定された前記有効データ長のデータと前記
第2のアドレスデータとが一致するか否かをビット毎に
判定し、全てのビットが一致するか否かの判定結果を出
力する複数の比較部と、 前記複数の比較部のそれぞれから出力される判定結果を
入力し、何れかの前記データベース部が前記第2のアド
レスデータと一致するデータを保持しているか否かの情
報を出力する一致検出部とを少なくとも有することを特
徴とする通信装置。
7. A communication line connected to the communication line
Interface circuit for transmitting and receiving packet data
Packet data transmitted and received by the interface circuit
Buffer memory for storing data and a plurality of first addresses
Data is stored in advance in the buffer memory.
The second address data included in the packet data and the previous
It is determined whether the plurality of first address data matches.
CAM (Content t Addressable M
memory) and the result of the CAM determination.
Process the packet data stored in the buffer memory.
A communication device having a processor, wherein the CAM is an input data holding unit that holds the second address data.
And holds each of the plurality of first address data
A plurality of database units and, for each of the database units, stored in the database unit.
Valid data length of the first address data to be stored
And a plurality of effective data length holding units for which each of the database units is stored.
The valid data of the first address data
The data of the valid data length set in the length holding unit and the data
For each bit, determine whether the second address data matches
Judgment and output the judgment result of whether all bits match.
The plurality of comparing units that apply the force and the determination results output from each of the plurality of comparing units.
And any one of the database parts is input to the second add
Information about whether or not data that matches the
It has at least a coincidence detection unit that outputs information.
Communication device to collect.
JP28943193A 1993-11-18 1993-11-18 Memory and its application device Expired - Lifetime JP3454884B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28943193A JP3454884B2 (en) 1993-11-18 1993-11-18 Memory and its application device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28943193A JP3454884B2 (en) 1993-11-18 1993-11-18 Memory and its application device

Publications (2)

Publication Number Publication Date
JPH07143156A JPH07143156A (en) 1995-06-02
JP3454884B2 true JP3454884B2 (en) 2003-10-06

Family

ID=17743162

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28943193A Expired - Lifetime JP3454884B2 (en) 1993-11-18 1993-11-18 Memory and its application device

Country Status (1)

Country Link
JP (1) JP3454884B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3485765B2 (en) * 1997-09-26 2004-01-13 日本電信電話株式会社 Method for detecting inclusion relation of IP address entry
JP3186681B2 (en) 1997-12-25 2001-07-11 日本電気株式会社 Route search circuit and communication control device
GB0524126D0 (en) * 2005-11-26 2006-01-04 Cogniscience Ltd Data transmission method

Also Published As

Publication number Publication date
JPH07143156A (en) 1995-06-02

Similar Documents

Publication Publication Date Title
US7167474B2 (en) Network relaying apparatus and network relaying method capable of high-speed routing and packet transfer
JP3712131B2 (en) Network connection device
EP1683311B1 (en) Dynamic unknown l2 flooding control with mac limits
EP1336915B1 (en) Method and apparatus for flexible frame processing and classification engine
US20070223474A1 (en) Method and apparatus for filtering packet data in a network device
US8599859B2 (en) Iterative parsing and classification
JP2002314571A (en) Classification and tagging rules for switching nodes
JP3186681B2 (en) Route search circuit and communication control device
EP1636969A1 (en) System and method for modifying data transferred from a source to a destination
JP3454884B2 (en) Memory and its application device
US20040190506A1 (en) Method and apparatus for performing complex pattern matching in a data stream within a computer network
JPH0624368B2 (en) Bridge method with learning function
TWI730894B (en) Apparatuses and methods for routing packets between a time-sensitive networking (tsn) network and a non-tsn network by virtual local area network (vlan) tag manipulation
Cisco Configuring Source-Route Bridging
Cisco Configuring Source-Route Bridging
Cisco Configuring Source-Route Bridging
Cisco Configuring Source-Route Bridging
US6944162B1 (en) Tuple-based lookup scheme for packet switching node
US6798778B1 (en) Communication packet processor with a look-up engine and content-addressable memory for updating context information for a core processor
JPH0697965A (en) Relay control system for router
EP4113951A1 (en) Frame data processing
JPH0832608A (en) Network repeater
US20020122419A1 (en) Communication packet processor with a look-up engine and content-addressable memory for modifying selectors to retrieve context information for a core processor
JPH09233110A (en) Multi-port bridge with virtual lan function
JP2002374289A (en) Retrieval system and method for registering retrieval condition to cam used therefor, and program thereof

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070725

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080725

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20080725

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090725

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090725

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100725

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100725

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110725

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110725

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120725

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130725

Year of fee payment: 10

EXPY Cancellation because of completion of term