JP3623082B2 - Associative memory module - Google Patents
Associative memory module Download PDFInfo
- Publication number
- JP3623082B2 JP3623082B2 JP27952597A JP27952597A JP3623082B2 JP 3623082 B2 JP3623082 B2 JP 3623082B2 JP 27952597 A JP27952597 A JP 27952597A JP 27952597 A JP27952597 A JP 27952597A JP 3623082 B2 JP3623082 B2 JP 3623082B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- associative
- associative memory
- search
- priority order
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C15/00—Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores
- G11C15/04—Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores using semiconductor elements
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C15/00—Digital stores in which information comprising one or more characteristic parts is written into the store and in which information is read-out by searching for one or more of these characteristic parts, i.e. associative or content-addressed stores
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、入力データの一部のビット列を検索キーとし、連想メモリモジュールに内蔵されているデータ記憶手段に予め格納されている複数のデータ群からなるデータテーブルの中から、上記検索キーと一致する項目を含むデータ群を検索し、その内容または格納位置を読み出す機能を持ち、しかも、上記検索キーが複数のデータ群と同時に一致しているときに、検索キーのビット列が最も長いものと一致しているデータ群を取り出す連想メモリモジュールに関する。
【0002】
【従来の技術】
複数の入出力ポートを持つIPルーティング処理装置(ルータ)を用いて、IPルーティング処理を行うには、入力ポートに到着したパケットのヘッダ情報から、32ビットの「相手IPアドレス」を検出し、この検出された相手IPアドレスに適合する出力ポートに、上記到着したパケットを送出する必要があり、つまり、到着したパケットを送出すべき出力ポートを決定する必要がある。この場合、上記「相手IPアドレス」を検索キーとし、ルータ内に存在するルーティングテーブル中の項目を検索し、上記検索キーと一致した上記項目に登録されている出力ポートを選択することによって、上記到着したパケットを送出すべき出力ポートを決定する。
【0003】
この出力ポートを決定する処理として、ベストマッチ方式が採用されている。このベストマッチ処理は、まず、ルーティングテーブル内のIPアドレスを、そのIPアドレス毎に1対1対応で、別途用意されているネットマスク情報によって、「相手IPアドレス」の一部のビットをマッチングの対象から除外するマスク処理を行った後、このマスク処理されたデータを検索キーとして、被検索データと比較処理し、複数の候補とマッチすると、マスクの長さ(マスクのビット幅)が最も長いデータ(マッチング対象から除外したビット幅が最も短いデータ)を最優先候補として採用する処理である。
【0004】
マスクデータ上、「1」の立っているビットが比較対象であるとした場合、たとえば、マスクデータが「11111111 11111111 11111111 00000000」である32ビット幅のデータ(比較対照が24ビットであるデータ)と、マスクデータが「11111111 11111111 00000000 00000000」である32ビット幅のデータ(比較対照が16ビットであるデータ)とに、検索キーがマッチした場合、比較対象が24ビットである前者のデータを選択する。
【0005】
このベストマッチ処理は、ルーティング処理の主要部分であるにもかかわらず、従来は、CPUを使用してソフトウェアでベストマッチ処理を実行しているので、ルータ自身のスループットの向上が阻止されるという問題がある。
【0006】
【発明が解決しようとする課題】
一方、内容を高速に比較するハードウェアとして、連想メモリ(CAM)が従来知られている。この従来の連想メモリは、入力データに対して一律にマスク処理を行い、内容を検索するのみであり、上記ベストマッチ処理を行うために格納されている各IPアドレス毎に、個別にマスク処理を行うものではない。
ところで、ベストマッチ処理に用いるマスクデータは、一般に、複数のIPアドレスに対して同一であることが、通信の規約上、多いので、従来の連想メモリを複数用い、上記ベストマッチ処理を実行することが考えられる。
【0007】
つまり、まず、マスクデータが同一である「相手IPアドレス」を有する被検索データを、同一の連想メモリに格納する。この場合、各連想メモリがそれぞれ有するマスクデータ格納レジスタには、上記同一のマスクデータをセットしておく。実際に検索処理を行う場合、まず、入力データ(検索データ)を各連想メモリに同時に与え、各連想メモリ毎のマスク処理と検索とを一斉に実行する。次に、それぞれの検索結果を、別途設けたプライオリティ・エンコーダに送り、連想メモリが出力した複数の検索結果のうちで、ビット幅が最も長いマスクデータを持つ検索結果を最終的に採用する。このようにすることによって、ベストマッチ処理を実現することができる。
【0008】
しかし、上記のように従来の連想メモリを複数用いてベストマッチ処理を実行する場合、格納すべき被検索データの件数を予め想定することができないので、ベストマッチ処理を実行する回路を構成するときに、各マスクデータに対して用意すべき連想メモリの容量を予測することができない。
【0009】
すなわち、同一のマスクデータを持つ被検索データ(検索すべき相手IPデータ)の件数は、マスクデータ毎にバラツキがあることが予想され、したがって、各マスクデータに対して同一容量の連想メモリを用意すると、容量に過不足が生じ、用意した連想メモリ全体の容量を有効に使用できない可能性があるという問題がある。
【0010】
本発明は、ハードウェアでベストマッチ処理を行うことによる高速性と、用意した連想メモリ全体の容量を有効に使用することができる柔軟性とを有する連想メモリモジュールを提供することを目的とするものである。
【0011】
【課題を解決するための手段】
本発明は、外部から与えられたマスクデータによって、入力データにマスク処理を施し、上記マスク処理によってマスクされたビット列を検索キーとして取り出し、予め格納してある複数個の被検索データから、上記検索キーとマッチする被検索データを検索する複数の連想メモリと、上記複数の連想メモリのそれぞれが出力した複数個の検索結果から、予め設定された優先順序に従って、1つの検索結果を選び出すプライオリティ・エンコーダとを有する連想メモリモジュールにおいて、上記プライオリティ・エンコーダにおけるデータ選択の上記優先順序を外部から任意に設定可能な優先順序設定手段と、上記入力データを上記複数の連想メモリのそれぞれに同時に与え、上記複数の連想メモリのそれぞれに同時に検索を実行させる同時検索実行手段とを有し、上記同時に実行して得られた複数の検索結果から、上記設定された優先順序に従って、上記プライオリティ・エンコーダが、1つの検索結果を選び出し、上記優先順序設定手段は、上記連想メモリモジュール内にN個の連想メモリが存在する場合、上記プライオリティ・エンコーダによる選択優先順序が定められているN種類以下のグループを設け、上記複数の連想メモリのそれぞれが上記グループのうちのどのグループに属するかを示すグループ登録用レジスタを有し、上記グループ登録用レジスタの値を変更することのみによって、上記複数の連想メモリのうちの所定の連想メモリを、上記N種類以下のグループのうちの所望のグループに登録する手段を持つ連想メモリモジュールである。
【0012】
【発明の実施の形態および実施例】
図1(1)は、本発明の一実施例である連想メモリモジュール100を示す回路図である。
【0013】
連想メモリモジュール100は、4つの連想メモリ(CAM)100a、100b、100c、100dと、グループ登録用レジスタ115とを有する。
【0014】
連想メモリ100a、100b、100c、100dのそれぞれは、入力データ117に対して一律にマスク処理を行う回路を内蔵し、マスクデータを格納するマスクレジスタRa、Rb、Rc、Rdをそれぞれ内蔵している。ここで、連想メモリ100a、100b、100c、100dは、32ビットを1ワードとした場合、nワードの容量を有する。また、各マスクレジスタRa、Rb、Rc、Rdの容量もそれぞれ32ビットである。
【0015】
被検索データとマスクデータとは1対1で対応され、互いに同一のマスクデータを有する被検索データ同士が1つのグループにグループ化され、各グループ単位で、互いに異なる連想メモリに被検索データが格納される。また、上記マスクデータは、それぞれ対応する連想メモリに内蔵されているマスクレジスタにセットされる。
【0016】
連想メモリ100a、100b、100c、100dのそれぞれに設けられているマスクレジスタRa、Rb、Rc、Rdのそれぞれには、図1(2)に示す値が格納されているとする。そして、マスクレジスタRa〜Rdが格納しているマスクデータが互いに同じであれば、それらを1つのグループにまとめ、したがって、図1(2)に示す状態では、4つのマスクレジスタが、「Ra」、「Rb、Rc」、「Rd」という3つのグループに分けられる。図1(1)において、同じグループに属するマスクレジスタには、互いに同じ模様を付して表示してある。
【0017】
連想メモリモジュール100は、最大4種類のマスクデータを有する被検索データを格納することができ、連想メモリ100a〜100dは、検索の結果一致した被検索データが存在していることを示すヒットフラグと、上記検索の結果一致した被検索データとを出力する。一致した被検索データが存在する場合、ヒットフラグが「1」になり、一致した被検索データが存在しない場合、ヒットフラグが「0」になる。そして、連想メモリ100a〜100dがそれぞれ出力した信号は、全てプライオリティ・エンコーダ106に入力される。
【0018】
プライオリティ・エンコーダ106は、複数のヒットフラグが「1」になった場合、どれを最終的に出力にするかを定める優先順序に従って、「1」になった複数のヒットフラグの中から、1つのヒットフラグを選択し、この選択されたヒットフラグに対応する被検索データを選択するものである。上記優先順序は、グループ登録用レジスタ115の値によって決定される。
【0019】
グループ登録用レジスタ115は、4つの連想メモリ100a、100b、100c、100dのそれぞれがどのグループに属するのかを示すものであり、4本のレジスタC0、C1、C2、C3を有し、レジスタC0、C1、C2、C3はそれぞれ4ビットで構成され、上記4ビットは、図1中、左から、連想メモリ100a、100b、100c、100dにそれぞれ対応している。
【0020】
たとえば、図1に示す実施例において、レジスタC0が「0110」であるから、連想メモリ100bと100cとの2つの連想メモリが、グループC0に属し、レジスタC1が「1000」であるから、連想メモリ100aがグループC1に属し、レジスタC2が「0000」であるから、グループC2に属する連像メモリは存在せず、レジスタC3が「0001」であるから、連想メモリ100dがグループC3に属する。
【0021】
そして、同一のグループに属する連想メモリのそれぞれは、互いに同一のマスクデータを持ち、つまり、上記同一のグループに属する連想メモリのマスクレジスタには、互いに同じマスクデータがセットされる。この場合、レジスタC0、C1、C2、C3の順に、優先度が高いグループであるとし、その順に、ビット幅が長いマスクデータを持つ被検索データを、対応する連想メモリに格納する。上記実施例では、図1(2)に示すように、連想メモリ100bと100cとの優先度が最も高く、連想メモリ100aの優先度が次に高く、連想メモリ100dの優先度が最後に高い。
【0022】
ここで、同一グループに属する連想メモリの優先度は、図1に示すグループ登録用レジスタ115中、より左側に位置するもの程、高いとする。したがって、上記実施例では、連想メモリ100bの優先度が、連想メモリ100cの優先度よりも高い。
【0023】
プライオリティ・エンコーダ106は、上記規則に従って、入力データに関する優先度を一意に決定することができる。
【0024】
つまり、連想メモリモジュール100は、外部から与えられたマスクデータによって、入力データにマスク処理を施し、上記マスク処理によってマスクされたビット列を検索キーとして取り出し、連想メモリ100a〜100dに予め格納してある複数個の被検索データから、上記検索キーとマッチする被検索データを検索する複数の連想メモリ100a〜100dが設けられ、複数の連想メモリ100a〜100dのそれぞれが出力した複数個の検索結果から、予め設定された優先順序に従って、1つの検索結果を選び出すプライオリティ・エンコーダ106が設けられた連想メモリモジュールであり、優先順序設定手段と同時検索実行手段とを有するものである。また、上記優先順序設定手段は、プライオリティ・エンコーダ106におけるデータ選択の上記優先順序を外部から任意に設定可能な手段であり、同時検索実行手段は、上記入力データを複数の連想メモリ100a〜100dのそれぞれに同時に与え、複数の連想メモリ100a〜100dのそれぞれに同時に検索を実行させる手段である。
【0025】
次に、上記実施例の動作について説明する。
【0026】
図1に示す実施例では、入力データ117を4つの連想メモリ100a、100b、100c、100dに同時に加え、その入力データを検索し、この検索の結果、検索キーと一致する被検索データが、連想メモリ100a、100b、100cに存在するとする。すなわち、ヒットフラグ107、109、111、113が、それぞれ、「1」、「1」、「1」、「0」になったとすると、上記4つの連想メモリ100a、100b、100c、100dのうちで、連想メモリ100bの優先度が一番高いことが、グループ登録用レジスタ115の設定内容から分かる。つまり、レジスタC0、C1、C2、C3の順に、優先度が高く、また、図1に示すグループ登録用レジスタ115中、より左側に位置するもの程、優先度が高いので、連想メモリ100bの優先度が一番高いことになる。
【0027】
したがって、プライオリティ・エンコーダ106は、最終結果として、連想メモリ100bの値110を出力データ119として出力し、さらに、連想メモリモジュール100の全体として一致データが存在していることを知らせるヒットフラグ118を「1」にして外部に知らせる。上記実施例によれば、上記ベストマッチ処理を実現することができる。
【0028】
また、上記実施例によれば、グループ登録用レジスタ115の設定に応じて、4つの連想メモリ100a、100b、100c、100dを、いかようにもグループ分けすることができる。たとえば、マスクの種類が3種類であり、それぞれの被検索データの件数がn以下であった場合、3つの連想メモリ、たとえば連想メモリ100a、100b、100cによって対応できる。すなわち、被検索データが新たに追加され、所定のマスクデータのグループ(たとえば連想メモリ100a)のみに対応するマスクデータが、1つの連想メモリに格納することができる被検索データの件数であるn件を越えた場合、n+1件以降の被検索データに対応するマスクデータを、連想メモリ100dに格納し(つまり、連想メモリ100dのマスクレジスタRdに、連想メモリ100aに書き込まれているマスクデータと同一のマスクデータを書き込み)、さらに、連想メモリ100aが属するグループに、連想メモリ100dが属するように、対応するグループ登録用レジスタ115の値を書き換えればよい。
【0029】
このように、所定のグループに属する1つの連想メモリに格納される被検索データの数が多くなったときに、上記被検索データに対応するマスクデータを、上記1つの連想メモリとは別の連想メモリに格納し、上記所定のグループに、上記別の連想メモリが属するように、対応するグループ登録用レジスタ115の値を書き換えればよい。このようにすることによって、既に登録されている被検索データ等を一切変更することなく、n件の新たな被検索データの格納領域を新たに作ることができる。
【0030】
また、図1に示す実施例において、グループ登録用レジスタ115を構成するレジスタの数を、グループの総数(=連想メモリの数)と同じにし、上記各レジスタのビット幅を連想メモリの数と同じに設定したので、グループ登録用レジスタ115の総ビット数は、連想メモリの個数の2乗になる。たとえば、図1に示す実施例では、グループ登録用レジスタ115の総ビット数は、4×4=16ビットになる。このようにしてあるのは、プライオリティ・エンコーダの論理を簡単化するためにとった方策である。ところで、各連想メモリがどのグループに属するのかを表現できればよいので、そのグループの番号をエンコードし、2進数で表現するようにしてもよい。たとえば、図1に示す実施例では、4つのグループが存在し、それぞれのグループ番号を、「00」、「01」、「10」、「11」のように設定すれば、グループの番号を2ビットで表現することができる。このようにすると、4×2=8ビットによって、プライオリティ・エンコーダにおける被検索データの優先順位を制御することができる。
【0031】
また、グループ化を行わず、各連想メモリに一意の順番をつけることによって、プライオリティ・エンコーダの優先順位を制御するようにしてもよい。この場合、連想メモリの総数を2進数で表したビット数を、各連想メモリ毎に対応させて持てばよく、レジスタの総ビット数は、グループの番号をエンコードする上記の場合と同様である。これによって、プライオリティ・エンコーダの論理が、グループの番号をエンコードする上記場合よりも一般に簡単になる。しかし、各連想メモリに一意の順番をつけるようにすると、既に使用している連想メモリよりも、新たに追加した連想メモリの優先順位を上げたいときに、他の連想メモリの優先順序を1番づつ前後にずらす必要が生じ、このために、対応するレジスタの値を書き換える必要が生ずる場合がある。これに比べ、連想メモリモジュール100のようにグループ登録用レジスタ115を用いれば、既に存在する同一グループに新たな連想メモリを追加する場合は、既に設定してある他のレジスタの値を変更する必要がない。
【0032】
図2は、本発明の他の実施例である連想メモリモジュール群200を示す回路図であり、大規模なベストマッチ処理を行う回路構成を示す図である。
【0033】
連想メモリモジュール群200は、連想メモリモジュール200a、200b、200cと、プライオリティ・エンコーダ211と、グループ登録用レジスタ215とを有する。
【0034】
連想メモリモジュール200a、200b、200cは、それぞれ連想メモリモジュール100と同様の連想メモリモジュールである。
【0035】
プライオリティ・エンコーダ211、グループ登録用レジスタ215のそれぞれの機能は、図1に示すプライオリティ・エンコーダ106、グループ登録用レジスタ115の機能と同様である。
【0036】
つまり、連想メモリモジュール群200は、外部から別途与えられたマスクデータによって、入力データにマスク処理を施し、上記マスク処理によってマスクされたビット列を検索キーとして取り出し、予め格納してある複数個の被検索データから、上記検索キーとマッチする被検索データを検索する複数の連想メモリと、上記複数の連想メモリのそれぞれが出力した複数個の検索結果から、予め設定された優先順序に従って、1つの検索結果を選び出す第1のプライオリティ・エンコーダとを有し、上記第1のプライオリティ・エンコーダにおけるデータ選択の上記優先順序を外部から任意に設定可能な第1の優先順序設定手段と、上記入力データを上記複数の連想メモリのそれぞれに同時に与え、上記複数の連想メモリのそれぞれに同時に検索を実行させる同時検索実行手段とを有する複数の連想メモリモジュールと、上記複数の連想メモリモジュールのそれぞれから出力された複数個の検索結果から、予め設定された優先順序に従って、1つの検索結果を選び出す第2のプライオリティ・エンコーダと、上記第2のプライオリティ・エンコーダにおけるデータ選択の上記優先順序を外部から任意に設定可能な第2の優先順序設定手段とを有し、上記複数の連想メモリモジュールが階層的に構成されている連想メモリモジュール群である。
【0037】
連想メモリモジュール群200において、入力データ(検索キー)217は、連想メモリモジュール200a、200b、200cのそれぞれに同時に送られ、並列に検索処理され、全体の検索結果212が得られる。図2に示すように、連想メモリモジュール200a、200b、200cを階層的に構成すると(つまり、複数の連想メモリモジュール100を階層的に構成すると)、1つの連想メモリモジュールのみを使用する場合に比べて、検索時間をあまり犠牲にすることなく大規模化を容易に図ることができる。つまり、連想メモリモジュール群200における連想メモリモジュール200a、200b、200cは、同時に検索処理を行うので、1つの連想メモリモジュールのみの処理と、その時間は同じであり、プライオリティ・エンコーダ211の処理時間のみが余分にかかるのみである。
【0038】
連想メモリモジュール群200によれば、連想メモリモジュールを階層的に用いることによって、より大規模なマストマッチ処理を行うハードウェアを容易に実現することができる。
【0039】
また、被検索データ1件あたりのデータ量が多い場合は、検索結果212をアドレスとみなし、外部に別途設けた半導体メモリ213のアドレス端子に上記アドレスを加え、最終結果214を得るようにすればよい。
【0040】
このようにすれば、連想メモリモジュール200a、200b、200cに搭載する連想メモリ自体の容量を削減することができる。つまり、被検索データに含まれている情報(出力ポートを特定する情報、装置のセッティングに必要な各種パラメータ等の情報)を連想メモリ100a〜100dに格納するようにすると、その分だけ、連想メモリ100a〜100dに格納する(エントリーする)ことができる被検索データの数が少なくなるが、被検索データに含まれている情報(出力ポートを特定する情報、装置のセッティングに必要な各種パラメータ等の情報)を、連想メモリ100a〜100dに格納せずに、連想メモリモジュール群200の外部に設けた半導体メモリ213に格納し、半導体メモリ213から最終結果214を出力するようにすれば、連想メモリモジュール200a、200b、200cに搭載する連想メモリ自体に格納する1つの被検索データの容量を削減することができる。
【0041】
つまり、複数の被検索データを格納し、連想メモリモジュール群200の出力信号をアドレスとみなし、上記格納された複数の被検索データのうちで、上記アドレスに応じた上記被検索データを最終結果として出力する外部メモリを有するようにすればよい。
【0042】
また、連想メモリモジュール群200において、グループ登録用レジスタ215を用いているので、既に存在する同一グループに新たな連想メモリを追加する場合、既に設定してある他のレジスタの値を変更する必要がない。
【0043】
また、上記各実施例は、インターネットプロトコル(IP)のためのルーティング処理等で用いられるベストマッチ処理を高速に行う用途に適する。
【0044】
【発明の効果】
本発明によれば、入力データを一律にしかマスク処理ができない従来型の連想メモリを複数用いた場合、ベストマッチ処理を高速に行うハードウェアを構成することができ、また、単純構成した場合にマスクデータ毎に発生する連想メモリ容量の過不足を阻止することができるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の一実施例である連想メモリモジュール100を示す回路図である。
【図2】本発明の他の実施例である連想メモリモジュール群200を示す回路図であり、大規模なベストマッチ処理を行う回路構成を示す図である。
【符号の説明】
100…連想メモリモジュール、
100a、100b、100c、100d…連想メモリ、
Ra、Rb、Rc、Rd…マスクレジスタ、
106…プライオリティ・エンコーダ、
115…グループ登録用レジスタ、
117…入力データ、
118…出力データ、
200…連想メモリモジュール群、
200a、200b、200c…連想メモリモジュール、
211…プライオリティ・エンコーダ、
215…グループ登録用レジスタ、
213…半導体メモリ、
217…入力データ、
214…出力データ。[0001]
BACKGROUND OF THE INVENTION
The present invention uses a partial bit string of input data as a search key, and matches the search key from a data table consisting of a plurality of data groups stored in advance in data storage means built in the associative memory module. This function has a function to search a data group including items to be read and to read out the contents or storage position, and when the search key coincides with a plurality of data groups at the same time, the search key bit string is the longest. The present invention relates to an associative memory module for extracting a data group.
[0002]
[Prior art]
In order to perform IP routing processing using an IP routing processing device (router) having a plurality of input / output ports, a 32-bit “partner IP address” is detected from the header information of a packet arriving at an input port, and this It is necessary to send the arrived packet to an output port that matches the detected partner IP address, that is, to determine an output port to which the arrived packet is to be sent. In this case, the above-mentioned "partner IP address" is used as a search key, and an item in the routing table existing in the router is searched, and by selecting an output port registered in the item that matches the search key, Determine the output port to which the arriving packet should be sent.
[0003]
As a process for determining the output port, the best match method is adopted. In this best match processing, first, IP addresses in the routing table are matched one-to-one for each IP address, and some bits of the “partner IP address” are matched using separately prepared netmask information. After performing mask processing to be excluded from the target, the masked data is compared with data to be searched using the masked data as a search key, and when a plurality of candidates are matched, the mask length (bit width of the mask) is the longest. This is a process of adopting data (data with the shortest bit width excluded from the matching target) as the highest priority candidate.
[0004]
If the bit with “1” on the mask data is to be compared, for example, the data of the mask data is “11111111 11111111 11111111 00000000” and the data is 32 bits wide (data for comparison is 24 bits) When the search key matches the 32-bit width data (data whose comparison reference is 16 bits) whose mask data is “11111111 11111111 00000000 00000000”, the former data whose comparison target is 24 bits is selected. .
[0005]
Although this best match process is the main part of the routing process, conventionally, the best match process is executed by software using a CPU, so that an improvement in the throughput of the router itself is prevented. There is.
[0006]
[Problems to be solved by the invention]
On the other hand, associative memory (CAM) is conventionally known as hardware for comparing contents at high speed. This conventional associative memory performs a mask process uniformly on input data and only searches the contents, and performs a mask process individually for each IP address stored for performing the best match process. Not something to do.
By the way, the mask data used for the best match process is generally the same for a plurality of IP addresses because of communication rules. Therefore, the best match process is executed using a plurality of conventional associative memories. Can be considered.
[0007]
That is, first, the search target data having the “partner IP address” having the same mask data is stored in the same associative memory. In this case, the same mask data is set in the mask data storage register of each associative memory. When the search process is actually performed, first, input data (search data) is simultaneously given to each associative memory, and the mask process and the search for each associative memory are executed simultaneously. Next, each search result is sent to a separately provided priority encoder, and the search result having the mask data with the longest bit width among the plurality of search results output from the associative memory is finally adopted. In this way, the best match process can be realized.
[0008]
However, when the best match process is executed using a plurality of conventional associative memories as described above, the number of data to be searched to be stored cannot be assumed in advance, so when configuring a circuit that executes the best match process In addition, the capacity of the associative memory to be prepared for each mask data cannot be predicted.
[0009]
That is, the number of data to be searched having the same mask data (partner IP data to be searched) is expected to vary from mask data to mask data. Therefore, an associative memory having the same capacity is prepared for each mask data. As a result, there is a problem that the capacity may be excessive or insufficient, and the capacity of the prepared associative memory may not be used effectively.
[0010]
An object of the present invention is to provide an associative memory module having high speed by performing the best match processing by hardware and flexibility capable of effectively using the capacity of the prepared associative memory. It is.
[0011]
[Means for Solving the Problems]
The present invention performs mask processing on input data with mask data given from the outside, takes out the bit string masked by the mask processing as a search key, and retrieves the search from a plurality of search target data stored in advance. A plurality of associative memories that search for searched data that matches the key, and a priority encoder that selects one search result from a plurality of search results output from each of the plurality of associative memories according to a preset priority order A priority order setting means capable of arbitrarily setting the priority order of data selection in the priority encoder from the outside, and simultaneously providing the input data to each of the plurality of associative memories, Simultaneously let each of the associative memories perform a search simultaneously The priority encoder selects one search result from the plurality of search results obtained by the simultaneous execution according to the set priority order, and the priority order setting means includes: When there are N associative memories in the associative memory module, N or less types of groups in which selection priority order by the priority encoder is determined are provided, and each of the plurality of associative memories is included in the group. It has a group registration register indicating which group it belongs to, and only by changing the value of the group registration register, a predetermined associative memory among the plurality of associative memories This is an associative memory module having means for registering in a desired group.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1A is a circuit diagram showing an associative memory module 100 according to an embodiment of the present invention.
[0013]
The associative memory module 100 includes four associative memories (CAM) 100a, 100b, 100c, and 100d, and a
[0014]
Each of the
[0015]
The searched data and the mask data are in one-to-one correspondence, and the searched data having the same mask data are grouped into one group, and the searched data is stored in different associative memories for each group. Is done. The mask data is set in a mask register built in the corresponding content addressable memory.
[0016]
It is assumed that the values shown in FIG. 1B are stored in the mask registers Ra, Rb, Rc, and Rd provided in the
[0017]
The associative memory module 100 can store search target data having a maximum of four types of mask data, and the
[0018]
When the plurality of hit flags become “1”, the
[0019]
The
[0020]
For example, in the embodiment shown in FIG. 1, since the register C0 is “0110”, the two
[0021]
The associative memories belonging to the same group have the same mask data, that is, the same mask data is set in the mask registers of the associative memories belonging to the same group. In this case, it is assumed that the groups have the highest priority in the order of the registers C0, C1, C2, and C3, and the search target data having mask data with a long bit width is stored in the corresponding associative memory in that order. In the above embodiment, as shown in FIG. 1B, the
[0022]
Here, it is assumed that the priorities of the associative memories belonging to the same group are higher as they are located on the left side in the
[0023]
The
[0024]
That is, the associative memory module 100 performs mask processing on input data with mask data given from the outside, takes out the bit string masked by the mask processing as a search key, and stores it in the
[0025]
Next, the operation of the above embodiment will be described.
[0026]
In the embodiment shown in FIG. 1, input data 117 is simultaneously added to the four
[0027]
Therefore, as a final result, the
[0028]
Further, according to the above embodiment, the four
[0029]
In this way, when the number of data to be searched stored in one associative memory belonging to a predetermined group increases, mask data corresponding to the data to be searched is associated with another associative memory from the one associative memory. What is necessary is just to rewrite the value of the corresponding group registration register |
[0030]
In the embodiment shown in FIG. 1, the number of registers constituting the
[0031]
Further, the priority order of the priority encoder may be controlled by assigning a unique order to each associative memory without grouping. In this case, the number of bits representing the total number of associative memories in binary may be provided corresponding to each associative memory, and the total number of bits in the register is the same as in the above case of encoding the group number. This makes the priority encoder logic generally easier than in the above case of encoding group numbers. However, if a unique order is assigned to each associative memory, the priority order of the other associative memories is set to the highest priority when it is desired to raise the priority of the newly added associative memories over the already used associative memories. It may be necessary to shift the position back and forth one by one, which may cause the corresponding register value to be rewritten. On the other hand, if the
[0032]
FIG. 2 is a circuit diagram showing an associative memory module group 200 according to another embodiment of the present invention, and shows a circuit configuration for performing a large-scale best match process.
[0033]
The associative memory module group 200 includes
[0034]
The
[0035]
The functions of the
[0036]
That is, the associative memory module group 200 performs mask processing on input data using mask data separately provided from the outside, takes out a bit string masked by the mask processing as a search key, and stores a plurality of pre-stored objects. One search according to a preset priority order from a plurality of associative memories that search for searched data that matches the search key from the search data, and a plurality of search results output from each of the plurality of associative memories. A first priority encoder for selecting a result, first priority order setting means capable of arbitrarily setting the priority order of data selection in the first priority encoder from the outside, and the input data as the above Given to each of the plurality of associative memories at the same time, A plurality of associative memory modules having simultaneous search execution means for executing a search, and a plurality of search results output from each of the plurality of associative memory modules, one search result according to a preset priority order A second priority encoder to be selected; and second priority order setting means capable of arbitrarily setting the priority order of data selection in the second priority encoder from the outside. This is a group of associative memory modules configured hierarchically.
[0037]
In the associative memory module group 200, input data (search key) 217 is simultaneously sent to each of the
[0038]
According to the associative memory module group 200, hardware that performs a larger-scale mast matching process can be easily realized by using the associative memory modules in a hierarchical manner.
[0039]
In addition, when the amount of data to be searched is large, the
[0040]
In this way, it is possible to reduce the capacity of the associative memory itself mounted in the
[0041]
That is, a plurality of data to be searched are stored, an output signal of the associative memory module group 200 is regarded as an address, and the data to be searched corresponding to the address among the plurality of stored data to be searched is used as a final result. An external memory for output may be provided.
[0042]
Further, since the
[0043]
Further, each of the above-described embodiments is suitable for a purpose of performing the best match process used in the routing process for the Internet protocol (IP) at a high speed.
[0044]
【The invention's effect】
According to the present invention, when a plurality of conventional associative memories that can only mask input data uniformly are used, hardware that performs best match processing at high speed can be configured. There is an effect that it is possible to prevent an excess or deficiency of the associative memory capacity generated for each mask data.
[Brief description of the drawings]
FIG. 1 is a circuit diagram showing an associative memory module 100 according to an embodiment of the present invention.
FIG. 2 is a circuit diagram showing an associative memory module group 200 according to another embodiment of the present invention, showing a circuit configuration for performing a large-scale best match process;
[Explanation of symbols]
100 ... associative memory module,
100a, 100b, 100c, 100d ... associative memory,
Ra, Rb, Rc, Rd ... mask registers,
106: Priority encoder,
115 ... Group registration register,
117 ... input data,
118 ... Output data,
200 ... associative memory module group,
200a, 200b, 200c ... associative memory module,
211 ... Priority encoder,
215 ... Group registration register,
213: Semiconductor memory,
217 ... input data,
214 ... Output data.
Claims (3)
上記プライオリティ・エンコーダにおけるデータ選択の上記優先順序を外部から任意に設定可能な優先順序設定手段と;
上記入力データを上記複数の連想メモリのそれぞれに同時に与え、上記複数の連想メモリのそれぞれに同時に検索を実行させる同時検索実行手段と;
を有し、上記同時に実行して得られた複数の検索結果から、上記設定された優先順序に従って、上記プライオリティ・エンコーダが、1つの検索結果を選び出し、上記優先順序設定手段は、上記連想メモリモジュール内にN個の連想メモリが存在する場合、上記プライオリティ・エンコーダによる選択優先順序が定められているN種類以下のグループを設け、上記複数の連想メモリのそれぞれが上記グループのうちのどのグループに属するかを示すグループ登録用レジスタを有し、上記グループ登録用レジスタの値を変更することのみによって、上記複数の連想メモリのうちの所定の連想メモリを、上記N種類以下のグループのうちの所望のグループに登録する手段を持つことを特徴とする連想メモリモジュール。 The input data is masked with mask data given from the outside, the bit string masked by the mask processing is extracted as a search key, and matches the search key from a plurality of pre-stored data to be searched. An associative memory comprising: a plurality of associative memories for retrieving data to be searched; and a priority encoder for selecting one search result from a plurality of search results output from each of the plurality of associative memories according to a preset priority order. In the memory module,
Priority order setting means capable of arbitrarily setting the priority order of data selection in the priority encoder from the outside;
Simultaneous search execution means for simultaneously applying the input data to each of the plurality of associative memories and causing each of the plurality of associative memories to execute a search simultaneously;
And the priority encoder selects one search result from the plurality of search results obtained by the simultaneous execution according to the set priority order , and the priority order setting means includes the associative memory module If there are N associative memories, N or less types of groups in which the priority order of selection by the priority encoder is determined are provided, and each of the plurality of associative memories belongs to any of the groups A group registration register indicating whether or not a predetermined associative memory of the plurality of associative memories is changed to a desired one of the N or less groups by changing the value of the group registration register. An associative memory module having means for registering in a group.
上記複数の連想メモリモジュールのそれぞれから出力された複数個の検索結果から、予め設定された優先順序に従って、1つの検索結果を選び出す第2のプライオリティ・エンコーダと;
上記第2のプライオリティ・エンコーダにおけるデータ選択の上記優先順序を外部から任意に設定可能な第2の優先順序設定手段と;
を有し、上記複数の連想メモリモジュールが階層的に構成されていることを特徴とする連想メモリモジュール群。The input data is masked with mask data given from the outside, the bit string masked by the mask processing is extracted as a search key, and matches the search key from a plurality of pre-stored data to be searched. A plurality of associative memories for retrieving data to be searched; a first priority encoder for selecting one search result from a plurality of search results output by each of the plurality of associative memories according to a preset priority order; In the associative memory module, the first priority order setting means capable of arbitrarily setting the priority order of data selection in the first priority encoder from the outside, and the input data to each of the plurality of associative memories Given simultaneously, search in each of the multiple associative memories at the same time A plurality of associative memory modules and a simultaneous retrieval execution means that;
A second priority encoder that selects one search result from a plurality of search results output from each of the plurality of associative memory modules according to a preset priority order;
Second priority order setting means capable of arbitrarily setting the priority order of data selection in the second priority encoder from the outside;
A group of associative memory modules, wherein the plurality of associative memory modules are hierarchically configured.
上記複数の被検索データを格納し、上記連想メモリモジュール群の出力信号をアドレスとみなし、上記格納された複数の被検索データのうちで、上記アドレスに応じた上記被検索データを最終結果として出力する外部メモリを有することを特徴とする連想メモリモジュール群。In claim 2 ,
The plurality of data to be searched are stored, the output signal of the associative memory module group is regarded as an address, and the data to be searched corresponding to the address is output as a final result among the plurality of stored data to be searched An associative memory module group, comprising: an external memory that performs processing.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP27952597A JP3623082B2 (en) | 1997-09-26 | 1997-09-26 | Associative memory module |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP27952597A JP3623082B2 (en) | 1997-09-26 | 1997-09-26 | Associative memory module |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH11102589A JPH11102589A (en) | 1999-04-13 |
| JP3623082B2 true JP3623082B2 (en) | 2005-02-23 |
Family
ID=17612243
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP27952597A Expired - Fee Related JP3623082B2 (en) | 1997-09-26 | 1997-09-26 | Associative memory module |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3623082B2 (en) |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6748484B1 (en) * | 1999-08-11 | 2004-06-08 | Intel Corporation | Match resolution circuit for an associative memory |
| US6757779B1 (en) | 1999-09-23 | 2004-06-29 | Netlogic Microsystems, Inc. | Content addressable memory with selectable mask write mode |
| US6799243B1 (en) | 2000-06-14 | 2004-09-28 | Netlogic Microsystems, Inc. | Method and apparatus for detecting a match in an intra-row configurable cam system |
| US6542391B2 (en) | 2000-06-08 | 2003-04-01 | Netlogic Microsystems, Inc. | Content addressable memory with configurable class-based storage partition |
| US6934795B2 (en) | 1999-09-23 | 2005-08-23 | Netlogic Microsystems, Inc. | Content addressable memory with programmable word width and programmable priority |
| US6751701B1 (en) | 2000-06-14 | 2004-06-15 | Netlogic Microsystems, Inc. | Method and apparatus for detecting a multiple match in an intra-row configurable CAM system |
| US6795892B1 (en) | 2000-06-14 | 2004-09-21 | Netlogic Microsystems, Inc. | Method and apparatus for determining a match address in an intra-row configurable cam device |
| US6944709B2 (en) | 1999-09-23 | 2005-09-13 | Netlogic Microsystems, Inc. | Content addressable memory with block-programmable mask write mode, word width and priority |
| US6910097B1 (en) | 2001-04-09 | 2005-06-21 | Netlogic Microsystems, Inc. | Classless interdomain routing using binary content addressable memory |
| JP3965283B2 (en) | 2001-07-02 | 2007-08-29 | 株式会社日立製作所 | Packet transfer device with multiple types of packet control functions |
| JP5650441B2 (en) * | 2010-06-07 | 2015-01-07 | キヤノン株式会社 | Arithmetic device, cache device, control method thereof, and computer program |
| FR3022372B1 (en) * | 2014-06-13 | 2016-06-24 | Bull Sas | SEARCH FOR ELEMENT CORRESPONDENCE IN A LIST |
-
1997
- 1997-09-26 JP JP27952597A patent/JP3623082B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH11102589A (en) | 1999-04-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5920886A (en) | Accelerated hierarchical address filtering and translation using binary and ternary CAMs | |
| US6665297B1 (en) | Network routing table | |
| CN111937360B (en) | Longest prefix matching | |
| US10496680B2 (en) | High-performance bloom filter array | |
| US7437354B2 (en) | Architecture for network search engines with fixed latency, high capacity, and high throughput | |
| US5386413A (en) | Fast multilevel hierarchical routing table lookup using content addressable memory | |
| US6728732B1 (en) | Data structure using a tree bitmap and method for rapid classification of data in a database | |
| US7908431B2 (en) | Method of performing table lookup operation with table index that exceeds cam key size | |
| CN102377664B (en) | TCAM (ternary content addressable memory)-based range matching device and method | |
| US6996662B2 (en) | Content addressable memory array having flexible priority support | |
| JP3623082B2 (en) | Associative memory module | |
| US20040255045A1 (en) | IP address lookup method and hardware architecture using hashing | |
| US20040254909A1 (en) | Programming routes and access control lists in comparison tree data structures and their use such as in performing lookup operations | |
| US20070192303A1 (en) | Method and Apparatus for Longest Prefix Matching in Processing a Forwarding Information Database | |
| US20090307175A1 (en) | Parallel pattern matching on multiple input streams in a data processing system | |
| CN107154899A (en) | A kind of system that IP routes are searched with suffix index | |
| EP3276501B1 (en) | Traffic classification method and device, and storage medium | |
| US20050083937A1 (en) | IP address lookup method using pipeline binary tree, hardware architecture, and recording medium | |
| US6987683B2 (en) | Magnitude comparator based content addressable memory for search and sorting | |
| US6574701B2 (en) | Technique for updating a content addressable memory | |
| US11683039B1 (en) | TCAM-based not logic | |
| US20040044868A1 (en) | Method and apparatus for high-speed longest prefix match of keys in a memory | |
| US6532516B1 (en) | Technique for updating a content addressable memory | |
| US8599853B2 (en) | System and method for an exact match search using pointer based pipelined multibit trie traversal technique | |
| CA2064957A1 (en) | Method and apparatus for performing pattern search functions |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040604 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040702 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040823 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20041119 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20041122 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071203 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081203 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091203 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |