JP3645293B2 - Associative memory - Google Patents
Associative memory Download PDFInfo
- Publication number
- JP3645293B2 JP3645293B2 JP25836894A JP25836894A JP3645293B2 JP 3645293 B2 JP3645293 B2 JP 3645293B2 JP 25836894 A JP25836894 A JP 25836894A JP 25836894 A JP25836894 A JP 25836894A JP 3645293 B2 JP3645293 B2 JP 3645293B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- memory word
- memory
- group
- search
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 230000000873 masking effect Effects 0.000 claims description 4
- 238000000926 separation method Methods 0.000 description 32
- 238000010586 diagram Methods 0.000 description 24
- 238000000034 method Methods 0.000 description 16
- 238000001514 detection method Methods 0.000 description 10
- 238000013500 data storage Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 7
- 230000004913 activation Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000000547 structure data Methods 0.000 description 3
- 239000000470 constituent Substances 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【0001】
【産業上の利用分野】
本発明は、各データをそれぞれ記憶する複数のメモリワードを備えるとともに、各メモリワードの記憶されたデータと入力された検索データとの一致不一致を検索する機能を備えた連想メモリ(Associative Memory,内容アドレス式メモリ;Content Addressable Memory)に関する。
【0002】
【従来の技術】
近年、上記のような検索機能を備えた連想メモリが提案されている。ここでは、先ず最初に、連想メモリの構造、機能について説明し、次いで連想メモリの適用分野の例について説明する。
図11は従来の連想メモリの一例を表わした回路ブロック図である。
【0003】
この連想メモリ10には、互いに図の横方向に並ぶ複数のメモリセルからなるメモリワード11a,11b,…,11nが多数備えられている。またこの連想メモリ10は、検索データが入力されラッチされる検索レジスタ12を備え、検索レジスタ12にラッチされた検索データの全部もしくは所定の一部のビットパターンと、各メモリワード11a,11b,…,11nに記憶されたデータのうち、上記ビットパターンと対応する部分のビットパターンとの一致不一致が比較され、各メモリワード11a,11b,…,11nのそれぞれに対応して備えられた一致線14a,14b,…,14nのうちビットパターンが一致したメモリワード11a,11b,…,11nに対応する一致線14a,14b,…,14nに論理‘1’の一致信号が出力され、それ以外の一致線14a,14b,…,14nに論理‘0’の不一致信号が出力される。
【0004】
ここでは各フラグ線14a,14b,…,14nにそれぞれ‘0’,‘1’,‘0’,‘0’,‘1’,…,‘0’の信号が出力されたものとする。この信号はプライオリティエンコーダ15に入力され、このプライオリティエンコーダ15からは論理‘1’の一致信号が出力された一致線(ここでは一致線14bと一致線14eの2本)のうちの優先度の最も高い最優先一致線に対応するアドレス信号ADが出力される。ここでは、添字のアルファベットが若いほど優先順位が高いものとし、従ってここでは一致線14bが最優先一致線となる。このプライオリティエンコーダ15から出力された、最優先一致線14bに対応するアドレス信号ADは、必要に応じて、アドレスデコーダ16に入力される。アドレスデコーダ16ではこの入力されたアドレス信号ADをデコードして各メモリワード11a,11b,…,11nのそれぞれに対応して備えられたワード線17a,17b,…,17nのうちの入力されたアドレス信号ADに対応するいずれか1本のワード線(ここではワード線17b)にアクセス信号(ここでは論理‘1’の信号)を出力する。これによりアクセス信号の出力されたワード線17bに対応するメモリワード11bに記憶されているデータが出力レジスタ18に読み出される。
【0005】
上記のように連想メモリ10は、検索データを用いて多数のメモリワード11a,11b,…,11nに記憶された内容(データ)を検索し、一致するデータが記憶されたメモリワードのアドレスを得てそのメモリワードに記憶されたデータ全体を読出すことができるメモリである。
図12は、連想メモリ中の1つのメモリワードを表わした詳細回路図である。
【0006】
このメモリワード11は、同一構成のn個のメモリセル11−1,11−2,…,11−nから構成されている。各メモリセル11−1,11−2,…,11−nには、互いの出力が互いの入力に接続された、第1インバータ20−1,20−2,…,20−nと第2のインバータ21−1,21−2,…,21−nが備えられており、これらのインバータ20−1,21−1;20−2,21−2;…;20−n,21−nにより各メモリセル11−1,11−2,…,11−nに論理‘1’もしくは論理‘0’の1ビットの情報が記憶される。
【0007】
また各メモリセル11−1,11−2,…,11−nにおいて、第1インバータ20−1,20−2,…,20−nの出力はNチャンネルトランジスタ22−1,22−2,…,22−nを介してビット線23−1,23−2,…,23−nと接続されており、このトランジスタ22−1,22−2,…,22−nのゲートはワード線24に接続されている。また第2のインバータ21−1,21−2,…,21−nの出力はNチャンネルトランジスタ25−1,25−2,…,25−nを介してビットバー線26−1,26−2,…,26−nと接続されており、このトランジスタ25−1,25−2,…,25−nのゲートもワード線24に接続されている。さらに各メモリセル11−1,11−2,…,11−nは、ビット線23−1,23−2,…,23−nとビットバー線26−1,26−2,…,26−nとの間をつなぐように互いにシリーズに接続された2つのNチャンネルトランジスタ27−1,28−1;27−2,28−2;…;27−n,28−nが配置されており、これら各2つのトランジスタ27−1,28−1;27−2,28−2;…;27−n,28−nのうちの一方のトランジスタ27−1,27−2,…,27−nのゲートは第1のインバータ20−1,20−2,…,20−nの出力、他方のトランジスタ28−1,28−2,…,28−nのゲートは第2のインバータ21−1,21−2,…,21−nの出力と接続されている。
【0008】
また一致線14には、各メモリセル11−1,11−2,…,11−nに対応して1つずつトランジスタ36−1,36−2,…,36−nが備えられており、それらのトランジスタ36−1,36−2,…,36−nは互いにシリーズに接続され、それらのトランジスタ36−1,36−2,…,36−nの各ゲートは、各2つのトランジスタ27−1,28−1;27−2,28−2;…;27−n,28−nの中点と接続されている。
【0009】
またこの一致線14にはもう1つのトランジスタ36−0がシリーズに接続されており、一致線14の図12の左端はこのトランジスタ36−0を介して接地されている。またこのトランジスタ36−0のゲートは制御線30に接続されている。
一致線14の、図12の右端にはセンス用インバータ31が配置され、このインバータ31の出力からは一致線14がさらに延び、図11に示すプライオリティエンコーダ15に接続されている。
【0010】
またこのインバータ31の入力と電源VDDとの間には2つのPチャンネルトランジスタ32,33が配置されており、これら2つのトランジスタ32,33のうちの一方のトランジスタ32のゲートは制御線30と接続され、他方のトランジスタ33のゲートはインバータ31の出力と接続されている。
このような構造のメモリワード及びその周辺回路を備えた連想メモリにおいて、一致検索は以下のようにして行なわれる。
【0011】
メモリセル11−1には、論理‘1’の情報が記憶されているものとする。即ちこの場合第1のインバータ20−1の出力側が論理‘1’、第2のインバータ21−1の出力側が論理‘0’の状態にある。
このメモリセル11−1に対して論理‘1’の検索が行なわれるものとする。即ち、ビット線23−1が論理‘1’、ビットバー線26−1が論理‘0’とされる。ワード線24は論理‘0’のままの状態に保持されている。この場合トランジスタ27−1のゲートには論理‘1’の電圧が印加され、ビット線23−1の論理‘1’の信号がトランジスタ36−1のゲートに印加され、これによりトランジスタ36−1が‘オン’状態となる。即ちメモリセル11−1に記憶されたビット情報とビット線23−1、ビットバー線26−1を経由して入力された検索データ中のビット情報が一致する場合に、対応するトランジスタ36−1が‘オン’状態となる。
【0012】
また、メモリセル11−2には論理‘0’の情報が記憶されているものとする。この場合第1のインバータ20−2の出力側が論理‘0’、第2のインバータ21−2の出力側が論理‘1’の状態にある。
このメモリセル11−2に対してやはり論理‘1’の検索が行なわれるものとする。即ち、ビット線23−2が論理‘1’、ビットバー線26−2が論理‘0’とされる。この場合、トランジスタ28−2を経由して論理‘0’の状態にあるビットバー線26−2の信号がトランジスタ36−2のゲートに印加され、したがってこのトランジスタ36−2は‘オフ’状態にととどまることになる。即ち不一致の場合、一致線14にプリチャージされていた電荷はディスチャージされない。
【0013】
また、マスクをかけたビットについては、メモリセル11−nに示すように、ビット線23−n、ビットバー線26−nの双方とも論理‘1’とされる。この場合このメモリセル11−nに論理‘1’の情報が記憶されているか論理‘0’の情報が記憶されているかに応じてトランジスタ27−nもしくはトランジスタ28−5のいずれかが‘オン’状態となり、これによりいずれの場合もトランジスタ36−5が‘オン’状態になる。すなわちそのメモリセルについては、記憶された情報と検索の情報とが一致しているものとみなされる。
【0014】
検索にあたっては制御線30が先ず論理‘0’となり、トランジスタ32が‘オン’状態となってインバータ31の入力側の一致線14がプリチャージされ、その後制御線30が論理‘1’となり、トランジスタ32が‘オフ’状態となってプリチャージが停止するとともにトランジスタ36−0が‘オン’状態となる。
【0015】
このとき、メモリセルに記憶された情報と入力された検索の情報がこのメモリワード11を構成する全てのメモリセルにわたって一致している(上述したようにマスクされたビットは一致とみなす)場合、トランジスタ36−1,36−2,…,36−nの全てが‘オン’状態となり一致線14にプリチャージされた電荷がディスチャージされ、インバータ31から論理‘1’の信号が出力される。
【0016】
尚、図12に示す連想メモリのメモリ構造は一例に過ぎず、種々の構造のものが提案されている(例えば特願平5−216424号参照)。
【0017】
【発明が解決しようとする課題】
連想メモリを、検索が必要とされる種々の用途に応用する場合、1つのメモリワードに記憶されたデータのうちの一部の内容で検索し、一致したメモリワードの別の部分のデータを出力させたいということがよくある。このとき検索データと一致するデータを記憶するメモリワードが存在しなかった場合には、この検索データと、出力させたい部分に相当する付随データを合わせて新たに登録したい場合がある。ところが、従来の連想メモリでは検索動作と登録すなわち書き込み動作は全く別々に行われる。このため検索の結果、不一致が検出された後、検索データと付随データを合わせてから連想メモリに書き込みを行わねばならず、一度検索のために与えた検索データを登録データの一部として再び与えねばならないといった非効率が生じてしまう。
【0018】
本発明は、上記事情に鑑み、検索の結果不一致が検出され未登録であることが判明したデータの新規登録を、効率的かつ高速に実現することができる連想メモリを提供することを目的とする。
【0019】
【課題を解決するための手段】
上記目的を達成する本発明の第1の連想メモリは、
各データをそれぞれ記憶するメモリワードと、該メモリワードに対応して備えられた、入力された検索データの全部もしくは一部のビットパターンと前記メモリワードに記憶されたデータのうち前記ビットパターンと対応する全部もしくは一部のビットパターンとの一致不一致を検出する一致検出回路とを備えた連想メモリにおいて、
前記一致検出回路のいずれからも、一致が検出されたことを示す一致信号が出力されなかった場合に、前記メモリワードのうち検索の対象とされる有効データが記憶されておらずしたがって上書きが許容される空き状態にあるメモリワードの1つを選択し、該選択されたメモリワードに、前記検索データを記憶させる検索データ書き込み回路と、
前記選択されたメモリワードの一部のビットをマスクすることにより、マスクされていないビット位置を、前記検索データに関連した付随データを書き込むための付随データ書き込み領域として指定する付随データ書き込み領域指定回路と、
前記付随データ書き込み領域に、前記付随データを記憶させる付随データ書き込み回路とを備えたことを特徴とするものである。
【0020】
ここで、上記本発明の第1の連想メモリは、
前記メモリワードに対応して備えられた、該メモリワードが、前記有効データが記憶された記憶状態にあるメモリワードであるか、あるいは前記空き状態にあるメモリワードであるかを示すフラグが記憶されるフラグレジスタと、
前記一致検出回路のいずれからも前記一致信号が出力されなかった場合に、前記選択されたメモリワードに対応する前記フラグレジスタに、前記記憶状態を示すフラグを記憶させるフラグ変更回路と
を備えたものであってもよい。
【0021】
また、上記目的を達成する本発明の第2の連想メモリは、
複数の格納データの集合からなる1つのデータ群を構成する複数のデータを、各データ毎に記憶する複数のメモリワードからなるメモリワード群を複数備え、検索データが入力される毎に、入力された検索データの全部もしくは所定の一部のビットパターンと前記メモリワードに記憶されたデータのうち前記ビットパターンと対応する全部もしくは一部のビットパターンとの一致比較を行い、1回もしくは複数回からなる一致検索全てにおいて入力された検索データの全部もしくは各所定の一部のビットパターンと同一の前記メモリワード群内に記憶されたデータのうち前記ビットパターンと対応する全部もしくは一部との一致が検出されたことをもって、前記所定回数入力された検索データに対応するデータ群の存在を検出する連想メモリにおいて、
前記メモリワード群それぞれに対応して備えられた、対応するメモリワード群が、検索の対象とされる有効データ群が記憶された記憶状態にあるメモリワード群であるか、あるいは前記有効データ群が記憶されておらず、したがって上書きが許容される空き状態にあるメモリワード群であるかを示すフラグが記憶されるフラグレジスタと、
前記所定回数の一致検索の間、1回の検索毎に、入力された検索データを、前記空き状態にあるメモリワード群の中から選択されたメモリワード群内のいずれかのメモリワードに書き込む検索データ書き込み回路と、
前記検索データが書き込まれた前記空き状態のメモリワード群内のいずれかのメモリワードを指定するメモリワード指定回路と、
前記所定回数の一致検索の結果、該所定回数入力された検索データに対応するデータ群が検出されなかった場合に、前記メモリワード指定回路によって指定されたメモリワードに、前記検索データに関連した付随データを書き込む付随データ書き込み回路と、
前記所定回数の一致検索の結果、該所定回数入力された検索データに対応するデータ群が検出されなかった場合に、前記選択されたメモリワード群に対応する前記フラグレジスタに、前記記憶状態を示すフラグを記憶させるフラグ変更回路と
を備えたことを特徴とするものである。
【0022】
ここで、上記本発明の第2の連想メモリは、
前記メモリワード指定回路によって指定されたメモリワードの一部のビットをマスクすることにより、マスクされていないビット位置を、前記検索データに関連した付随データを書き込むための付随データ書き込み領域として指定する付随データ書き込み領域指定回路を備え、
前記付随データ書き込み回路が、前記付随データ書き込み領域に、前記付随データを記憶させるものであってもよい。
【0023】
あるいは、上記本発明の第2の連想メモリにおいて、上記メモリワード指定回路は、
前記検索データが書き込まれた前記空き状態のメモリワード群を指定するメモリワード群指定回路と、
前記メモリワード群指定回路によって指定されたメモリワード群内でのメモリワードの位置を相対的に指定するメモリワード群内メモリワード位置指定回路とを備えることが好ましい。
【0024】
また、本発明の第3の連想メモりは、
複数の格納データの集合からなる1つのデータ群を構成する複数のデータを、各データ毎に記憶する複数のメモリワードからなるメモリワード群を複数備え、入力された検索データ群の全部もしくは一部のビットパターンと前記メモリワード群に記憶された群のうち前記ビットパターンと対応する全部もしくは一部のビットパターンとの一致不一致を検出する連想メモリにおいて、
前記メモリワード群の1つを指定するメモリワード群指定回路と、
前記メモリワード群指定回路によって指定されたメモリワード群内でのメモリワードの位置を相対的に指定するメモリワード群内メモリワード位置指定回路と、
前記指定されたメモリワード位置に対応するメモリワードに対して、データの書き込み、読み出しを行うメモリワード書き込み読み出し回路とを備えたことを特徴とする。
【0025】
【作用】
上記本発明の第1の連想メモリは、検索によって一致検出が行われなかったことを受けて検索データをそのまま格納してしまうものであるため、従来のように、一致が検出されなかったので新たにデータを登録する場合、残りの付随データの部分だけを書き込めばよく、処理の効率が向上する。
【0026】
ここで、特公昭61−31558号公報に、本発明と関連した技術が提案されているため、そこに提案された技術と本発明との相違を説明する。
連想メモリを構成する多数のメモリワードは、常に全てのメモリワードに検索の対象となるデータが記憶されている訳ではなく、それらのメモリワードの一部は有効なデータが記憶されていない空きの状態にあったり、その空きの状態にあるメモリワードに新たに有効データを書き込んだりすることがある。この場合、このメモリワードが空きの状態にあるか否かを外部で管理しておくのは煩雑であることから、上記の文献には、各メモリワードに対応してそのメモリワードに有効なデータが記憶されているかそれともそのメモリワードが空きの状態にあるかを示すフラグを各メモリワードに対応させて記憶しておき、新たな有効データを書き込む場合に連想メモリ自体で空きの状態にあるメモリワードを見つけてそのメモリワードに有効データを書き込むという技術が提案されている。
【0027】
そこに提案された技術は、空き状態にあるメモリワードを外部で管理する必要をなくすためのものであって、未登録のデータの登録においては、やはり、検索動作の後、再び検索データをメモリワードへ与える必要がある。この点において、上記の提案された技術と比べ、本発明は大きく異なる。
本発明の第2の連想メモリは、データ群を記憶しておくメモリワード群を有し、検索データを入力して検索を行うという動作を所定回数行って対応するデータ群の存在を検出する連想メモリに関するものである。
【0028】
このような連想メモリにおいて、例えば90個の検索対象データと10個の出力対象データ(付随データ)との合わせて100個のデータからなるデータ群を格納しておいて、検索データを入力して検索を行うという動作を90回繰り返して所望のデータ群の存在を検出し、所望のデータ群の付随データを10回出力する場合を考える。このとき、所望のデータ群が存在しなかったので新たにデータ群を登録する場合、従来の連想メモリを用いると、検索の後、100回データを書き込んではじめて新たな有効データ群が登録されることになる。
【0029】
これに比較し、本発明の第2の連想メモリでは、1回の検索毎に、検索データが、空き状態にあるメモリワード群に書き込まれるため、90回の検索を行った結果、所望のデータ群が存在しなかった場合、検索データは既に書き込まれているため、付随データのみを10回書き込むだけでデータ群の登録が行える。このためデータ書き込みの手間が大幅に低減され処理の高速化が図られることになる。
【0030】
また、本発明の第3の連想メモリは、特定のメモリワードを、メモリワード群のアドレスとそのメモリワード群内の相対アドレスとに分けて指定するものであるため、群構造をなすデータを取扱う場合に、各メモリワードの絶対アドレスを管理しておいてその絶対アドレスを指定するという煩雑な処理が回避される。
【0031】
【実施例】
以下、本発明の実施例について説明する。
図1は、本発明の第1の連想メモリの一実施例の特徴部分を示す回路図である。前述した従来例で参照した図面における構成要素に対応する構成要素には、それらの図面に付した番号と同一の番号を付して示す。
【0032】
この図1では、メモリワード11や一致線14の構成は略示されている。各メモリワード11に対応して各フラグレジスタ51が備えられており、このフラグレジスタ51には、対応するメモリワード11に、検索の対象となる有効ワードが記憶されている場合に’0’、検索の対象から除外され、したがって上書きを許容する無効のデータが記憶されている場合(ここではこれを、対応するメモリワード11が「空き状態」に有る、と称する)に’1’の空きフラグが記憶される。ここでは、各フラグレジスタ51には、図示のように、’0’,’0’,…,’1’が格納されているものとする。各フラグレジスタ51のQ出力は、対応して備えられた各複数選択分離回路52に入力される。この選択分離回路52は互いに直列的に接続されており、その接続により、この図の上方ほど優先度が高くなっており、’1’が格納されたフラグレジスタ51のうち、優先度の最も高いフラグレジスタ51に対応する複数選択分離回路52のみから信号’1’が出力される。ここでは、図1の一番下に図示されたフラグレジスタ51が最も優先度が高く、したがってそれに対応する一番下に図示された複数選択分離回路52から’1’が出力されているものとする。
【0033】
図2は、複数選択分離回路52の回路例を示した図である。
図2(A)に示す複数選択分離回路52は、図示のように接続された、一方の入力が反転されるアンドゲート521と、オアゲート522から構成されている。また、図示の一番上の複数選択分離回路52を構成するオアゲート522の一方の入力はグラウンドGNDに接地されている。
【0034】
この構成の複数選択分離回路52では図示の上方ほど高い優先度を有しており、複数のフラグレジスタ51に空きフラグ‘1’が格納されている場合に、それら複数のフラグレジスタ51のうち最も高い優先度を有するフラグレジスタ51に対応する複数選択分離回路52のアンドゲート521から‘1’が出力される。
【0035】
また、図2(B)に示す複数選択分離回路52’は、図示のようにインバータ523、Nチャンネルトランジスタ524,Pチャンネルトランジスタ526、排他論理和(エクスクルーシブオア)ゲート525から構成されている。また各複数選択分離回路52’を構成するPチャンネルトランジスタ526の一端は電源VDDに接続され、図示の一番上の複数選択分離回路52’を構成する排他論理和ゲート525の一方の入力はグラウンドGNDに接地されている。
【0036】
この図2(B)に示す複数選択分離回路52’も、図2(A)に示す複数選択分離回路52と同様に、図示の上方ほど高い優先度を有しており、複数のフラグレジスタ51に空きフラグ‘1’が格納されている場合に、それら複数のフラグレジスタ51のうち最も高い優先度を有するフラグレジスタ51に対応する複数選択分離回路52’の排他論理和ゲート525から‘1’が出力される。
【0037】
尚、この図2(A)もしくは図2(B)に示す複数選択分離回路の後段にエンコーダを接続すれば、図11に示すプライオリティエンコーダ15が構成される。
上記のようにして、図1の1番下に図示されたフラグレジスタ51が、空きフラグ‘1’が格納された第2のフラグレジスタ51の中の最優先のものであった場合、それに対応する複数選択分離回路52から‘1’が出力され、対応するアンドゲート67に入力される。またこのアンドゲート67の入力にはワード線活性化タイミング信号線68も接続されている。
【0038】
ここで、ビット線ドライブ回路70によりビット線23−1,…,23−n、およびビットバー線26−1,…,26−nに検索データをのせて検索を行なう。その結果、その検索データと図示の最上段のメモリワード11に記憶されたデータとが一致したものとすると、最上段の一致線14が’1’となり、フラグレジスタ51の出力は’0’であるためアンドゲート53の出力が’1’となる。ここではアンドゲート53の出力から延びる線も一致線140と称する。全てのメモリワード11に対応する一致線140は全体一致検出回路71に延び、さらに、さらにその一致線140は、従来の場合の一致線14に代わり、図11に示すプライオリティエンコーダ15に延びている。フラグレジスタ51に空きフラグ’1’が格納されている場合は、そのフラグレジスタ51に対応するメモリワード11で一致が生じても、一致線14の’1’信号はアンドゲート53でストップされ、そのアンドゲート53の出力側の一致線140は’0’のままにとどまる。すなわち、そのメモリワード11は検索には寄与しないことになる。
【0039】
全体一致検出回路71では、各一致線140から入力された信号のオア演算を行い、これにより、1つでも一致があったか、もしくは全てのメモリワード11にわたって不一致であったかが検出され、追記制御回路72に入力される。
追記制御回路72では、先ず、いずれかのメモリワード11で一致が生じたか否かにはかかわりなく、ビット線23−1,…,23−n、ビットバー線26−1,…,26−nに 検索データをのせて検索しているときに、ワード線活性化タイミング信号線68に信号’1’をのせる。すると、’1’の信号を出力している、図示の1番下の複数選択分離回路52に対応するアンドゲート67の出力が’1’となり、対応するワード線24が’1’となって、図示の1番下のメモリワード11に検索データが書き込まれる。この検索データが書き込まれるタイミングは、検索と同時であり、したがってその検索において一致が生じたか否かとは無関係である。
【0040】
図3は、ビット線ドライブ回路70の1ビット分の回路例を示した図である。ここに示す部分回路70_1には、ビット、ビットバーのペアに対応して配置された2つのORゲート93_1,94_1が備えられており、これら2つのORゲート93_1,94_1には、検索マスクデータ線98_1および書き込みマスクデータ線99_1が共通に接続されている。また、ORゲート93_1にはビットデータ線97_1が直接接続され、ビットデータ線97_1に印加されたデータがそのままORゲート93_1に入力される。一方、ORゲート94_1には、インバータ95_1を介して、ビットデータ線97_1に印加されたデータが反転されて入力される。2つのORゲート93_1、94_1の出力はそれぞれビット線ドライバ91_1、92_1に入力され、ビット線ドライバ信号線96に論理“1”パルスが与えられたときに、ORゲート93_1、94_1の出力が、ビット線ドライバ91_1、92_1を介してビット線23_1およびビットバー線26_1に与えられる。
【0041】
検索を行う場合に、検索の対象としないビットすなわちマスクするビットに対して、検索マスクデータ線98_1に論理“1”の信号を与えたうえで、ビット線ドライブ信号線96に論理“1”のパルスを与えると、ビット線23、ビットバー線26がともに論理“1”となり、対応するビットに対するマスク検索が実現される。このとき、図1の1番下のメモリワード11のマスク検索されたビットには書き込みは行われない。
【0042】
以上のようなビット線ドライブ回路70の動作によって、検索と同時に、検索データが図1の一番下のメモリワード11に書き込まれる。
その後、上述のように、全体一致検出回路71においていずれかのメモリワード11で一致が生じたか、あるいは全てのメモリワード11にわたって不一致であったかが検出されて追記制御回路72に入力される。追記制御回路72ではいずれかのメモリワード11で一致が生じていたときはその後は何も行なわない。すなわち、図示の一番下のメモリワード11には検索データが上書きされたものの、それに対応するフラグレジスタ51には依然として空きフラグ’1’が格納されており、一番下のメモリワード11は依然として検索に寄与しない空き状態にとどまることになる。
【0043】
一方、検索の対象となるビットすなわちマスクしないビットに対しては、検索マスクデータ線98_1に論理“0”の信号を与え、ビットデータ線97_1に検索データをのせたうえで、ビット線ドライブ信号線96に論理“1”のパルスを与える。こうすることによって、ビット線に検索データ、ビットバー線に検索データを反転したデータが与えられ、マスクしない検索が行われるとともに、図1の1番下のメモリワード11の当該ビットに書き込みが行われる。
【0044】
一方、全体一致検出回路71において全てのメモリワード11にわたって不一致であったこと、すなわちデータの未登録が検出され、データを登録する場合は以下のような動作になる。
検索のときと同様に、図1の1番下のメモリワード11に対応するワード線24を活性化し、データの書き込みを行う。このときビット線ドライブ回路70において、検索時にマスクされず検索データが書き込まれたビットに対しては、図3に示す書き込みマスクデータ線99_1に論理“1”の信号を与え、付随データを書き込みたいビットに対しては、その書き込みマスクデータ線99_1に論理“0”の信号を与える。さらにビットデータ線97_1に付随データをのせたうえで、ビット線ドライブ信号線96に論理“1”のパルスを与えることによって、検索時に書き込まれた検索データを保持したまま、付随データのみを書き込むことができる。
【0045】
また、このとき追記制御回路72は、フラグレジスタ51に接続された空きフラグデータ線66に論理’0’の信号を与え、その状態で空きフラグクロック信号線65に’1’のクロックパルスを与える。すると図1の1番下のメモリワード11のワード線24は’1’となっており、その’1’の信号が信号線60を経由して一番下のアンドゲート61に入力されているため、空きフラグクロック信号線65に与えられたクロックパルスはそのアンドゲート61を通過し、一番下のフラグレジスタ51に入力される。これにより、一番下のフラグレジスタ51に対応するメモリワード11に検索の対象となる有効なデータが格納されていることを表す’0’が格納される。
【0046】
複数選択分離回路52では、図示の1番下のフラグレジスタ51に’0’が格納されたことに伴い、そのフラグレジスタ51以外の、空きフラグ’1’が格納されているフラグレジスタ51中から最も優先度の高いものが検出されることになる。
なお、上記の説明においては、検索データが書き込まれたビット以外のビットに対してのみ付随データが書き込まれることになるが、検索マスクデータ線98_1と書き込みマスクデータ線99_1の信号を適切に制御することによって、多様なデータ登録の方法が実現できることは言うまでもない。
【0047】
次に、本発明の第2の連想メモリの実施例について説明するが、本発明の第2の連想メモリの思想が好適に適用される、データ群を格納しておいてデータ群の検索を行なう連想メモリ自体が未だ公知ではないため(特願平5−248121号参照)、ここでは先ずそのベースとなる連想メモリ自体について説明し、次いで、本発明の第2の連想メモリの実施例について説明する。
【0048】
図4は、群構造を成すデータの一例を示した図である。
この図4には、それぞれ属性I,II,III,IVが付された4つのデータがセットとなって1つのデータ群を構成しているデータ構造が示されている。データ群および属性の概念を明確にするために一例を挙げると、例えば各群番号1,2,3,4,…毎の各データ群は各個人に属するデータであり、属性Iはその人の氏名,属性IIはその人の生年月日、属性IIIは住所、……等を示している。
【0049】
このように各属性I,II,III,IVが付された複数のデータからなるデータ群を連想メモリに格納しておいて検索を行う場合に、例えば群番号1のデータを検索する場合を例に説明すると、データ‘A’の検索とデータ‘B’の検索をこの順に行って一致するデータ群の残りのデータ‘C’,‘D’を読み出すことだけではなく、例えばデータ‘A’の検索とデータ‘D’の検索を行って残りのデータ‘B’,‘C’を読み出したい場合や、データ‘B’の検索を先に行い、次にデータ‘A’の検索を行いたい場合があり、それら多様な検索を行なうことのできる連想メモリが考えられている。
【0050】
尚、ここでは、後の説明の都合上、群番号nとn+1は、有効なデータ群が記録されていない空き状態にあるものとする。
図5は、図4に示すような群構造のデータを取り扱うのに好適な連想メモリの一例を示すブロック図である。
各メモリワード11_1,11_2,…から延びる各一致線14_1,14_2,…,は、各アンドゲート20_1,20_2,…の一方の入力端子に接続されている。また各アンドゲート20_1,20_2,…の他方の入力端子には各オアゲート21_2,21_3,…の出力端子が接続されており、各オアゲート21_2,21_3,…の一方の入力端子は、初回検索制御線22に接続されている。
【0051】
各アンドゲート20_1,20_2,…の出力端子は各第1のフラグレジスタ23_1,23_2,…のデータ入力端子に接続され、各第1のフラグレジスタ23_1,23_2,…の出力端子は各第2のフラグレジスタ24_1,24_2,…の入力端子に接続されている。各第2のフラグレジスタ24_1,24_2,…の出力端子は、図11に示すプライオリティエンコーダ15(図5では図示省略)に接続されるとともに、各第1のスイッチ33_1,33_2,…を介して、図4に示す各データ群を格納する各メモリワード群毎に備えられたデータ線32_1,32_2,…に接続されている。
【0052】
第1のフラグレジスタ23_1,23_2,…と第2のフラグレジスタ24_1,24_2,…には、ともに、一致結果ラッチ制御線25に出力される一致結果ラッチ信号S1が入力され、その一致結果ラッチ信号S1により、各データ入力端子から入力された入力データがラッチされるが、第1のフラグレジスタ23_1,23_2,…には、一致結果ラッチ信号S1の立ち上がりaの時点における入力データがラッチされ、第2のフラグレジスタ24_1,24_2,…には、一致結果ラッチ信号S1の立ち下がりbの時点−の入力データがラッチされる。
【0053】
各メモリワード11_1,11_2,…は、属性を格納する属性格納部11_1_1,11_2_1,…とデータを格納するデータ格納部11_1_2,11_2_2,…とで構成されており、各メモリワード11_1,11_2,…には、互いに対応する属性とデータとのペアからなる格納データがそれぞれ格納されている。ここでは、図示のように、各メモリワード11_1,11_2,11_3,11_4には、それぞれ、図4に示す群番号1に属する、属性I,データ‘A’、属性II,データ‘B’、属性III,データ‘C’、属性IV,データ‘D’が格納されている。また各メモリワード11_5,11_6,…には、それぞれ、図4に示す群番号2に属する、属性I,データ‘C’、属性II,データ‘F’、……が格納されている。また検索にあたっては、属性とデータとのペアからなる参照データREF_DATAが入力される。
【0054】
各メモリワード11_1,11_2には、そこに記憶された格納データ(属性及びデータの双方)が、入力された参照データ(属性及びデータの双方)と一致しているときに一致信号が出力される従来の一致線14_1,14_2,…のほか、属性のみの一致不一致の信号が出力される属性一致線30_1,30_2,…が備えられている。尚、属性のみの一致も、属性及びデータの双方の一致も、従来の一致検出回路と同様に構成され、従来の一致検出回路は連想メモリの分野において極めて一般的な技術であるため、ここでの図示および説明は省略する。
【0055】
各メモリワード11_1,11_2に対応して第3のフラグレジスタ31_1,31_2,…が備えられており、各属性一致線30_1,30_2,…は対応する第3のフラグレジスタ31_1,31_2,…のデータ入力端子に延びている。また、この実施例の連想メモリには、前述したように図4に示す各データ群に属する各データが格納されたメモリワードからなるメモリワード群それぞれについて1本ずつデータ線32_1,32_2,…が備えられており、またデータ線32_1,32_2,…と各第2のフラグレジスタ31_1,31_2,…の出力端子との間には各第1のスイッチ33_1,33_2,…が備えられている。これらの第1のスイッチ33_1,33_2,…は具体的にはトランジスタ等を用いて構成される。後述する他のスイッチについても同様である。各第1のスイッチ33_1,33_2,…は、対応する各第3のフラグレジスタ31_1,31_2,…に論理‘1’の信号がラッチされているときに導通され、論理‘0’の信号がラッチされているときには遮断される。各第3のフラグレジスタ31_1,31_2,…は、一致結果ラッチ制御線25に出力される一致結果ラッチ信号S1の立ち下がりbのタイミングで、対応する属性一致線30_1,30_2,…の信号をラッチする。
【0056】
またデータ線32_1,32_2,…と各オアゲート21_1,21_2,…の入力端子との間に各第2のスイッチ34_1,34_2,…が備えられており、これら各第2のスイッチ34_1,34_2,…は、対応する属性一致線30_1,30_2,…の信号により、その信号が一致を表わす論理‘1’のときに導通状態、不一致を表わす論理‘0’の時に遮断状態となるように制御される。
【0057】
以上のように構成された連想メモリにおいて、一致検索は以下のようにして行われる。
各検索データを単独で検索する際は、参照データREF_DATAを入力して検索を行う際に、初回検索制御線22に初回検索タイミング信号S2を出力する。ここでは、参照データREF_DATAとして属性IIおよびデータ‘B’を入力したものとすると、属性IIおよびデータ‘B’が格納されたワードメモリ11_2に対応する一致線14_2に論理‘1’の一致信号が出力されてアンドゲート20_2に入力され、また、これとともに初回検索タイミング信号S2がオアゲート21_2を経由してアンドゲート20_2に入力されるため、アンドゲート20_2から論理‘1’の信号が出力される。またこのとき、他の一致線14_1;14_3,14_4,…には論理‘0’の信号が出力されるため、それに対応する他のアンドゲート20_1;20_3,20_4,…からは論理‘0’の信号が出力される。
【0058】
アンドゲート20_2から出力された論理‘1’の信号は、一致結果ラッチ制御線25に出力された一致結果ラッチ信号S1の立ち上がりaのタイミングで第1のフラグレジスタ23_2にラッチされ、それに引き続くの一致結果ラッチ信号S1の立ち下がりbのタイミングで第2のフラグレジスタ24_2にラッチされる。
【0059】
また第1のフラグレジスタ23_2および第2のフラグレジスタ24_2に論理‘1’の信号がラッチされる各タイミングで、他の第1フラグレジスタ23_1;23_3,23_4,…、および他の第2のフラグレジスタ24_1;24_3,;24_4,…には論理‘0’の信号がラッチされる。
このようにして各第2のフラグレジスタ24_1,24_2,24_3,…にラッチされた論理‘0’,‘1’,‘0’,…の信号が図9に示すプライオリティエンコーダ15に入力され、ワードメモリ11_2のアドレス信号ADが得られる。
【0060】
次に複数回の連続したデータ検索を行なう場合について説明する。複数回の連続した検索を行う場合における第1回目の検索については、上述の単独のデータ検索の動作と同じであるが、この第1回目のデータ検索では、上記の動作に加えて、第2回目のデータ検索の準備として、以下の動作が行なわれる。
上記の第1回目のデータ検索の際、属性の一致を受けてメモリワード11_2に対応する属性一致線30_2に論理‘1’の信号が出力され、これにより、対応する第3のフラグレジスタ31_2にも論理‘1’の信号がラッチされ、対応する第1のスイッチ33_2がオンし、対応する第2のフラグレジスタ24_2に格納された、属性及びデータ双方の一致を表わす論理‘1’の信号がデータ線32_1に出力される。またこれとともに、対応する第2のスイッチ34_2もオンするが、第1回目の検索においてはこれは無用の動作である。
【0061】
次に、属性IVとデータ‘D’からなる参照データREF_DATAを入力して検索を行うものとする。このときは、初回検索制御線22は論理‘0’に保持されている。このとき、属性の一致を受けてメモリワード11_4に対応する属性一致線30_4に論理‘1’の信号が出力され、これにより対応する第2のスイッチ34_4がオンし、データ線32_1に出力されていた、メモリワード11_2に対応する第2のフラグレジスタ24_2の論理‘1’の信号がオアゲート21_4を経由してアンドゲート20_4に入力される。このため、メモリワード11_4で属性IVとデータ‘D’の双方の一致が検出されて一致線14_4に論理‘1’の一致信号が出力されると、一致結果ラッチ制御線25に出力される一致結果ラッチ信号S1により、対応する第1および第2のフラグレジスタ23_4,24_4に論理‘1’の信号がラッチされる。またこのとき、属性一致線30_4に出力された論理‘1’の信号が、対応する第3のフラグレジスタ31_4にラッチされ、対応する第1のスイッチ33_4がオンし、第2のフラグレジスタ24_4の論理‘1’の信号がデータ線32_1に出力される。またこの2回目の検索では、メモリワード11_2に対応する属性一致線30_2には属性の不一致を表わす論理‘0が出力されるため、対応する第3のフラグレジスタ31_2には‘0’が格納され、メモリワード11_2に対応する第1のスイッチ33_2はオフする。
【0062】
これにより、メモリワード11_4に対応する第2のフラグレジスタ24_4の論理‘1’の信号がプライオリティエンコーダ15(図11参照)に入力され、メモリワード11_4のアドレスが得られることになるが、メモリワード11_4には属性IVが格納されていることは予め分かっており、同一群内の、例えば属性IIIのデータを読み出したいときは、得られたアドレスから1を引いてメモリワード11_3のアドレスを求め、そのアドレスをアドレスデコーダ16に入力してメモリワード11_3の内容を読み出せばよい。 尚、2回目の検索時に、属性IVとデータ‘D’とからなる参照データに代わり、例えば属性IVとデータ‘B’とからなる参照データで検索が行われた場合、メモリワード11_4については、属性は一致するため第2のスイッチ34_4がオンし、データ線32_1に出力されている論理‘1’の信号が取り込まれるが、データが異なるため一致線14_4には不一致を表わす論理‘0’が出力され、第1及び第2のフラグレジスタ23_4,24_4には一致が検出されなかったことを示す論理‘0’がラッチされる。また、データ‘B’が一致するメモリワード11_2については属性が一致せず、したがって属性及びデータの双方も一致しない。
【0063】
以上のようにして、図5に示す実施例では、同一の群内においては、互いに離れたメモリワードに記憶されたデータであっても、もしくはデータの順序を逆にして検索した場合であっても、検索を行うことができる。
ここで、上記実施例におけるデータ線32_1,32_2,…,は、1つの群に属するデータの数が予め定まっているものとしてその長さが固定されたものであるが、このように固定長のデータ線を備えると、1つの群に属するデータの数の最大を見積もり、最大のデータ数に対応した長さのデータ線を備える必要がある。これではその最大よりも少ない数のデータによりデータ群が構成される場合に無駄なメモリワードが発生することになる。そこで、1つの群に属するデータの数に合せてデータ線を可変長とすることが好ましい。
【0064】
図6は、可変長のデータ線を実現する一つの方式を示した模式図である。
データ線32が複数のメモリワード11_1,11_2,11_3,…に亘って延び、そのデータ線32には、最上端のメモリワード11_1を除く他のメモリワード11_2,11_3,…それぞれに対応する各スイッチ40_2,40_3,40_4,…が互いにシリーズに配置されている。これらの各スイッチ40_2,40_3,40_4,…は、対応するメモリワード11_2,11_3,11_4,…と、その直ぐ上段に隣接するメモリワード11_1;11_2,11_3,…との間に配置されている。それらのスイッチ40_2,40_3,40_4,…のうちの1つおきのスイッチ40_2,40_4,40_6,…は第1制御線41に出力される第1のスイッチ制御信号によりオンし、3つおきのスイッチ40_3,40_7,…は第2制御線42に出力される第2のスイッチ制御信号によりオンし、残りのスイッチのうち7つおきのスイッチ40_5,…は第3制御線43に出力される第3のスイッチ制御信号によりオンされる。
【0065】
1つのデータ群を構成するデータの数が2の場合は、第1制御線41に第1のスイッチ制御信号を出力することにより1つおきのスイッチ40_2,40_4,40_6,…をオンさせる。これにより各2つのメモリワード11_1;11_2;11_3,11_4;11_5,11_6;…毎に切断されたデータ線が形成される。また、1つのデータ群を構成するデータの数が4の場合は、第1制御線41に第1のスイッチ制御信号を出力するとともに第2制御線42に第2のスイッチ制御信号を出力する。すると、各4つのメモリワード11_1,11_2;11_3,11_4;11_5,11_6,…毎に切断されたデータ線が形成される。同様にして、1つのデータ群を構成するデータの数が8の場合は、第1制御線41、第2制御線42にそれぞれ第1および第2のスイッチ制御信号を出力するとともに、第3制御線43に第3のスイッチ制御信号を出力する。これにより各8つのメモリワード11_1,…,11_8;11_9…毎に切断されたデータ線が形成される。
【0066】
この方式によれば、1つのデータ群を構成するデータの数が2の倍数の場合はメモリワードに空きは生じないが、2の倍数以外の、例えば3,5,9等の場合空きのメモリワードが生じてしまうことになる。この空きのメモリワードが生じないように多数のスイッチ40_2,40_3,…を任意にオン,オフできるように構成すると、制御線の本数が多数本となり、またそれらの制御線にスイッチ制御信号を出力する制御回路が複雑となる。したがって、図6に示す方式は、データ線の長さを任意に制御するには不向きである。
【0067】
図7は、可変のデータ線を実現するもう一つの方式を示した模式図である。
多数のメモリワードに亘ってデータ線32が延び、そのデータ線32に互いにシリーズに接続された、最上端のメモリワードを除く他のメモリワードそれぞれに対応する各スイッチ40_2,40_3,40_4,…が備えられている点は図6の場合と同じである。各メモリワードには、各属性格納部11_1_1,11_2_1,11_3_1,…が備えられており、それら属性格納部11_1_1,11_2_1,11_3_1,…には、図示の各属性I,II,III,IVがそれぞれ格納されている。この例は、属性格納部11_1_1,11_2_1,11_3_1,…に格納された属性が属性Iかそれ以外の属性II,III,IVかに応じて、属性Iの場合は対応するスイッチをオフのままとし、それ以外の属性II,III,IVの場合は対応するスイッチをオンするように構成したものである。このように構成すると、1つのデータ群を構成するデータの数がいくつであっても、また、データ数の異なるデータ群が混在していても、各データ群の先頭に属性Iのデータを配置することにより、自動的に過不足ない数のメモリワード毎に切断されたデータ線が形成されることになる。
【0068】
図8は、属性がIかそれ以外かを判定する属性判定回路の一例を示す回路図である。
ここでは属性Iに‘000’が割り当てられており、属性格納部11_i_1に格納された属性が属性I(‘000’)の場合オアゲートから‘0’が出力され、したがってトランジスタ40で構成されたスイッチ40’はオフ状態となり、そのトランジスタ40’の両側のデータ線が電気的に切断される。属性格納部11_i_1に格納された属性が属性I以外の属性の場合はオアゲートから‘1’が出力され、トランジスタ40はオン状態となり、そのトランジスタの両側のデータ線が接続される。
【0069】
このように、図5に示す連想メモリにおいて、1つのデータ群を構成するデータの数に応じてデータ線32_1,32_2,…の長さを調整することもできる。もちろん、属性データを利用するのではなく、専用の制御線によってスイッチを制御することによりデータ線の長さを調整してもよい。
次に、図5に示す連想メモリに本発明の技術思想を適用した、本発明の第2の連想メモリの一実施例について説明する。
【0070】
図9は、本発明の第2の連想メモリの一実施例の特徴部分を示す回路図である。図1に示す本発明の第1の連想メモリの各構成要素に対応する構成要素には、図1に付した番号と対応する番号を付して示し、相違点を中心に説明する。
この図9には、図4に示すデータ群のうち、群番号nのデータ群を格納するメモリワード群、すなわち、空き状態にあるメモリワード群のうち、最優先のメモリワード群が示されている。
【0071】
この図9に示す連想メモリには、図1に示す連想メモリと同様に、各メモリワード…,11 1 n,11 2 n,…,11 1 n+1,…に対応してフラグレジスタ…,51 1 n,51 2 n,…,51 1 n+1,…が備えられている。これらのフラグレジスタ…,51 1 n,51 2 n,…,51 1 n+1,…は、後述するようにして、各メモリワード群毎に一括して制御されるが、有効なフラグレジスタは、各メモリワード群毎の先頭のフラグレジスタである。
【0072】
また、各メモリワード…,11 1 n,11 2 n,…,11 1 n+1,…は、属性を格納する属性格納部…,11 1 1 n,11 2 1 n,…,11 1 1 n+1,…と、データを格納するデータ格納部…,11 1 2 n,11 2 2 n,…,11 1 2 n+1,…とで構成されている。ただし、図9では、図示の都合上、属性格納部11 1 1 n,11 2 1 n,…,11 1 1 n+1,…とデータ格納部11 1 2 n,11 2 2 n,…,11 1 2 n+1,…は互いに離れた位置に図示されている。
【0073】
ここでは、群番号n、群番号n+1に対応する各メモリワード群は空き状態にあり、したがってそれらのメモリワード群に対応するフラグレジスタ51 1 n,51 2 n,51 3 n,51 4 n,51 1 n+1,…には、空き状態を示す論理‘1’のフラグが格納されている。
第1のトランジスタ…,81 1 n,81 2 n,…,81 1 n+1,…は対応する属性格納部…,11 1 1 n,11 2 1 n,…,11 1 1 n+1,…から延びる制御線によりそのオン/オフが制御されるトランジスタであり、属性Iが格納された属性格納部…,11 1 1 n,11 1 1 n+1,…のみがオン状態となる。したがって群番号nに対応する第1の可変長データ線83 nには、フラグレジスタ51 1 nに格納された、空き状態を表わす論理‘1’(‘H’レベル)の信号が出力され、その信号がその群番号nに対応するメモリワード群内の4つの複数選択分離回路52 1 n,52 2 n,52 3 n,52 4 nに入力される。またその第1の可変長データ線83−nの信号は、その論理が反転されて、その群番号nに対応するメモリワード群内の4つのアンドゲート53 1 n,53 2 n,53 3 n,53 4 nに入力される。
【0074】
群番号n+1に対応するメモリワード群についても同様であり、フラグレジスタ51 1 n+1に格納された論理‘1’の信号が第1のトランジスタ81 1 n+1、第1の可変長データ線83 n+1を経由して、4つの複数分離選択回路52 1 n+1,…および論理が反転されて、4つのアンドゲート53
1 n+1,…に入力される。
【0075】
図4に示すように、群番号1,2,…,n−1に対応するメモリワード群には有効なデータ群が格納されている場合、群番号nに対応するメモリワード群に備えられた4つの複数分離選択回路52 1 n,52 2 n,52 3 n,52 4 nのうち最上段の複数分離選択回路52 1 nから最優先であることを示す論理‘1’(‘H’レベル)の信号が出力される。複数分離選択回路…,52 1 n,52 2 n,52 1 n+1,…の出力側には、第2のトランジスタ…,82 1 n,82 2 n,82 1 n+1,…が備えられている。この第2のトランジスタ…,82 1 n,82 2 n,82 1 n+1,…は、第1のトランジスタ…,81 1 n,81 2 n,…,81 1 n+1,…と同様に、属性格納部…,11 1 1 n,11 2 1 n,…,11 1 1 n+1,…に属性Iが格納されている場合のみオン状態となるトランジスタであり、複数分離選択回路52 1 nから出力された論理‘1’の信号は、第2のトランジスタ82 1 nを通って第2の可変長データ線84 nに出力される。ここでは群番号nに対応するメモリワード群が最優先のメモリワード群であり、したがって群番号n+1に対応するメモリワード群の複数分離選択回路52 1 n+1の出力は論理‘0’であって、群番号n+1に対応するメモリワード群の第2の可変長データ線84 n+1には複数分離選択回路52 1 n+1の出力である論理‘0’の信号が供給される。
【0076】
また各属性格納部…,11 1 1 n,11 2 1 n,…,11 1 1 n+1,…からは、検索時に属性の一致を受けて論理‘1’(‘H’レベル)の信号が出力される属性一致線…,30 1 n,30 2 n,30 1 n+1,…が延び、対応するアンドゲート…,53 1 n,53 2 n,53 1 n+1,…の入力端子に接続されている。また、各データ格納部…,11 1 2 n,11 2 2 n,…,11 1 2 n+1,…からは、検索時にデータの一致を受けて論理‘1’(‘H’レベル)の信号が出力されるデータ一致線…,14 1 n,14 2 n,14 1 n+1,…が延び、属性一致線…,30 1 n,30 2 n,30 1 n+1,…と同様に、対応するアンドゲート…,53 1 n,53 2 n,53 1 n+1,…の入力端子に接続されている。
【0077】
ここで、属性II,データ‘B’の検索データを入力してデータ検索を行なったとし、属性格納部11 2 1 nに属性IIが格納されているメモリワード11 2 nのデータ格納部11 2 2 nにたまたまデータ‘B’が格納されていたとすると、属性の一致を受けて属性一致線30 2 nが‘H’レベルとなり、またデータの一致を受けてデータ一致線14 2 nも‘H’レベルとなるが、第1の可変長データ線83 nが、空き状態を表わす‘H’レベルにあるため、アンドゲート53 2 nからは一致を表わす‘H’レベルの信号は出力されない。すなわち、空き状態にあるメモリワード群は、検索には参加しない。
【0078】
この検索を行なっているときに、いずれかのメモリワード群で一致が検出されたか否かとは無関係に、追記制御回路72(図1参照)から、ワード線活性化タイミング信号線68に‘1’の信号が出力される。すると、図9の上から2番目のメモリワード11 2 nに対応するアンドゲート67 2 nの入力が全て‘1’となりアンドゲート67 2 nの出力側に延びるワード線24 2 nが‘1’となり、メモリワード11 2 nに検索データが書き込まれる。この検索データが書き込まれたタイミングは、検索と同時であり、したがってその検索において一致が生じたか否かとは無関係である。
【0079】
以上のような検索と検索データの書き込みが所定回数行なわれた後、最終的に所望のデータ群が検出されたか否かの情報が追記制御回路72(図1参照)に入力される。追記制御回路72では、いずれかのメモリワード群において所望のデータ群が検出された場合はその後は何も行なわない。すなわち、図9に示す群番号nに対応するメモリワード群には検索の都度検索データが書き込まれたものの、そのメモリワード群に対応するフラグレジスタ51 1 n,51 2 n,,51 3 n,51 4 nには依然として空きフラグ‘1’が格納されており、群番号nに対応するメモリワード群は、依然として検索には寄与しない空き状態にとどまることになる。
【0080】
一方、全体一致検出回路71において、全てのメモリワード群にわたって所望のデータ群が存在せず、すなわちデータ群の未登録が検出され、データ群を登録する場合は、以下のような動作になる。
上記のように検索対象となった属性に対応するメモリワードには検索データが検索と同時に書き込まれている。したがって、データ群の登録としては、付随データのみを書き込めばよいことになる。
【0081】
ここでは、属性IIIに対応するメモリワードに付随データを書き込むものとする。このとき、検索と同様にして属性IIIと付随データをペアにして入力する。各属性格納部…,11 1 1 n,11 2 1 n,…,11 1 1 n+1,…に対しては、検索と同様の動作によって、属性IIIとの一致を検出すると図9のメモリワード11 3 nに対応する属性一致線30 3 nに論理“1”の信号が出力される。このとき、追記制御回路72(図1参照)から、ワード活性化タイミング信号線68に論理“1”の信号が出力され、図9の上から3番目のメモリワード11 3 nに対応するアンドゲート67 3 nを介してワード線24 3 nが“1”となり、さらにこのとき格納すべき付随データがデータ格納部…,11 1 2 n,11 2 2 n,…,11 1 2 n+1,…に対応するビット線に与えられており、ビットバー線には付随データの反転信号が与えられているため、メモリワード11 3 nに付随データが書き込まれる。
【0082】
上記の付随データの書き込みは、複数分離回路…,52 1 n,52 2 n,…,52 1 n+1,…によって指定された、空き状態にある群番号nに対応するメモリワード群の中で、属性IIIとの一致によって指定されるメモリワード11 3 2 nに対して行われる。同様にして、他の属性データが格納されているメモリワードにも、付随データを書き込むことができる。
【0083】
上記のようにして、群番号nに対応するメモリワード群に、検索データおよび付随データが書き込まれることになる。その後追記制御回路72(図1参照)はフラグレジスタ…,51 1 n,51 2 n,…,51 1 n+1,…に接続された空きフラグデータ線66に論理‘0’の信号を与え、その状態で空きフラグクロック信号線65に‘1’のクロックパルスを与える。すると、図示の群番号nに対応するメモリワード群に延びる第2の可変長データ線84 nに論理‘1’の信号が出力されていることから、空きフラグクロック信号線65に与えられた‘1’のクロックパルスは、4つのアンドゲート61 1 n,61 2 n,61 3 n,61 4 nをそれぞれ通過して4つのフラグレジスタ51 1 n,51 2 n,51 3 n,51 4 nに入力され、それら4つのフラグレジスタ51 1 n,51 2 n,51 3 n,51 4 nに、有効なデータ群が記録されていることを示す論理‘0’のフラグが格納される。
【0084】
複数選択分離回路…,52 1 n,52 2 n,…,52 1 n+1,…では、群番号nに対応するフラグレジスタ51 1 n,51 2 n,51 3 n,51 4 nに‘0’が格納されたことに伴い、その群番号nに対応するメモリワード群以外の、空きフラグ‘1’が格納されているフラグレジスタに対応するメモリワード群の中から最も優先度の高いメモリワード群(ここに示す例では群番号n+1に対応するメモリワード群)が検出されることになる。
【0085】
なお、上記の説明においては、検索データの格納されるメモリワードと付随データが格納されるメモリワードを別々のものとして説明しているが、本発明の第2の連想メモリにおいても、本発明の第1の連想メモリと同様、検索時および書き込み時のマスク制御を行うことによって、同一のメモリワードの中に、検索データと付随データの両方を格納することもできる。
【0086】
また、図9に示す実施例では、検索データを書き込むべきメモリワードを複数分離回路と属性一致線の出力を用いて決定しているが、本発明は、図9の実施例に限定されず、例えば、複数分離回路52の出力をエンコーダに入力してプライオリティエンコーダを構成し、さらにその出力に、属性に対応したメモリワード群内での相対的アドレスを足し合わせたものをアドレスとして、アドレスデコーダ16(図11参照)に入力することによって書き込むべきメモリワードを決定してもよく、種々の方式を含むものである。
【0087】
本発明の第2の連想メモリの実施例において、メモリワード群を複数選択分離回路によって選択し、さらに属性の一致検出によって、メモリワード群内の1つのメモリワードを選択的に活性化する方法を示したが、この概念を、図4で示したような群構造のデータを格納する際に、適用すると非常に有効である。
図10は、図4に示したデータ構造をもつ各データと、各データを格納するメモリワードの絶対アドレスを示した図である。ここで、上記のように、検索の結果一致が検出されなかったことを受けて、最優先の空き状態にある群番号nに対応するメモリワード群に、属性IIIに対応する付随データを登録する場合には、属性IIIに対応するデータを書き込むことを指定するために、属性IIIによる一致比較を行えば良く現在最優先の空き状態にあるメモリワード群の群番号を外部が知る必要は全くない。
【0088】
一方、これと同じ付随データの書き込みを、絶対アドレスでメモリワードを指定して行うためには、現在最優先の空き状態にあるメモリワード群の群番号がnであることを知ることが必要であり、これを知った上で求められる絶対アドレス4n−2を指定しなければならず、処理が複雑になる。
上記のように、図4または図10のようなデータ構造のデータ群を扱う場合、アドレス管理は絶対アドレスで行うよりも、メモリワード群の群番号と、メモリワード群内でのメモリワードの位置によって相対的に行う方が望ましい。
【0089】
上記のような群構造をなすデータのアドレス管理は、本発明の第2の連想メモリの実施例に限定されず、群構造をなすデータをもつ連想メモリに対して、広く有効である。
【0090】
【発明の効果】
以上説明したように、本発明の連想メモリは、検索と同時に検索データを格納してしまうものであるため、未登録データの追記のためには付随データのみを書き込めばよく、追記が効率的かつ高速に行われる。
【図面の簡単な説明】
【図1】本発明の第1の連想メモリの一実施例の特徴部分を示す回路図である。
【図2】複数選択分離回路の回路図である。
【図3】ビット線ドライブ回路の1ビット分の回路例を示した図である。
【図4】群構造のデータの一例を示す図である。
【図5】群構造のデータを取り扱うのに適した連想メモリの一例を示すブロック図である。
【図6】可変長のデータ線を実現する一つの方式を示した模式図である。
【図7】可変のデータ線を実現するもう一つの方式を示した模式図である。
【図8】属性がIかそれ以外かを判定する属性判定回路の一例の回路図である。
【図9】本発明の第2の連想メモリの一実施例の特徴部分を示す回路図である。
【図10】群構造のデータと絶対アドレスの対応を示す図である。
【図11】従来の連想メモリの一例を表わした回路ブロック図である。
【図12】連想メモリ中の1つのメモリワードを表わした詳細回路図である。
【符号の説明】
11,11_1 n,11_2 n,…,11_1 n+1 メモリワード
11_1_1 n,11_2_1 n,…,11_1 1 n+1
属性格納部
11_1_2 n,11_2_2 n,…,11_1 2 n+1
データ格納部
14 一致線
14_1 n,14_2 n,…,14_1 n+1 データ一致線
30_1 n,30_2 n,…,30_1 n+1 属性一致線
51,51_1 n,51_2 n,…,51_1 n+1 フラグレジスタ
52,52_1 n,52_2 n,…,52_1 n+1
複数選択分離回路[0001]
[Industrial application fields]
The present invention includes a plurality of memory words for storing each data, and an associative memory having a function of searching for a match / mismatch between the stored data of each memory word and input search data. Addressable memory).
[0002]
[Prior art]
In recent years, an associative memory having a search function as described above has been proposed. Here, first, the structure and function of the associative memory will be described, and then examples of application fields of the associative memory will be described.
FIG. 11 is a circuit block diagram showing an example of a conventional associative memory.
[0003]
The
[0004]
Here, it is assumed that signals of “0”, “1”, “0”, “0”, “1”,..., “0” are output to the
[0005]
As described above, the
FIG. 12 is a detailed circuit diagram showing one memory word in the associative memory.
[0006]
This
[0007]
In each of the memory cells 11-1, 11-2,..., 11-n, the outputs of the first inverters 20-1, 20-2,. , 22-n are connected to bit lines 23-1, 23-2,..., 23-n, and the gates of the transistors 22-1, 22-2,. It is connected. Also, the outputs of the second inverters 21-1, 21-2,..., 21-n are sent to bit bar lines 26-1, 26-2 via N-channel transistors 25-1, 25-2,. ,..., 26-n, and the gates of the transistors 25-1, 25-2,. Further, each of the memory cells 11-1, 11-2,..., 11-n includes bit lines 23-1, 23-2,..., 23-n and bit bar lines 26-1, 26-2,. n-channel transistors 27-1, 28-1; 27-2, 28-2;...; 27-n, 28-n connected to each other in series so as to connect to n, Each of these two transistors 27-1, 28-1; 27-2, 28-2;..., 27-n, 28-n, one of the transistors 27-1, 27-2,. The gates are the outputs of the first inverters 20-1, 20-2,..., 20-n, and the gates of the other transistors 28-1, 28-2,. ,..., 21-n are connected to the outputs.
[0008]
The
[0009]
Further, another transistor 36-0 is connected to the
A
[0010]
The input of this
In an associative memory including a memory word having such a structure and its peripheral circuits, a match search is performed as follows.
[0011]
It is assumed that information of logic “1” is stored in the memory cell 11-1. That is, in this case, the output side of the first inverter 20-1 is in the logic "1" state, and the output side of the second inverter 21-1 is in the logic "0" state.
It is assumed that a logic “1” search is performed on the memory cell 11-1. That is, the bit line 23-1 is set to logic “1” and the bit bar line 26-1 is set to logic “0”. The
[0012]
In addition, it is assumed that logic “0” information is stored in the memory cell 11-2. In this case, the output side of the first inverter 20-2 is in a logic '0' state, and the output side of the second inverter 21-2 is in a logic '1' state.
It is assumed that the logic “1” is searched for the memory cell 11-2. That is, the bit line 23-2 is set to logic "1", and the bit bar line 26-2 is set to logic "0". In this case, the signal of the bit bar line 26-2 in the logic “0” state is applied to the gate of the transistor 36-2 via the transistor 28-2, so that the transistor 36-2 is in the “off” state. Will stay. That is, in the case of mismatch, the charge precharged on the
[0013]
For the masked bit, as shown in the memory cell 11-n, both the bit line 23-n and the bit bar line 26-n are set to logic '1'. In this case, either the transistor 27-n or the transistor 28-5 is 'ON' depending on whether logic '1' information or memory '0' information is stored in the memory cell 11-n. This causes the transistor 36-5 to be 'on' in either case. That is, for the memory cell, the stored information and the search information are regarded as matching.
[0014]
In the search, the
[0015]
At this time, when the information stored in the memory cell and the input search information are consistent across all the memory cells constituting the memory word 11 (the masked bits are regarded as coincident as described above), All of the transistors 36-1, 36-2,..., 36-n are in the “ON” state, and the precharged charges on the
[0016]
Note that the memory structure of the associative memory shown in FIG. 12 is merely an example, and various structures have been proposed (see, for example, Japanese Patent Application No. 5-216424).
[0017]
[Problems to be solved by the invention]
When associative memory is applied to various applications that require searching, it searches with the contents of a part of the data stored in one memory word and outputs the data of another part of the matched memory word I often want to do it. At this time, if there is no memory word for storing data that matches the search data, there is a case where it is desired to newly register the search data and accompanying data corresponding to the portion to be output. However, in the conventional associative memory, the search operation and the registration, that is, the write operation are performed completely separately. For this reason, after a mismatch is detected as a result of the search, the search data and the accompanying data must be combined and then written to the associative memory. The search data once given for the search is given again as part of the registration data. Inefficiency that must be generated.
[0018]
In view of the above circumstances, an object of the present invention is to provide an associative memory capable of efficiently and rapidly realizing new registration of data that has been found to be unregistered as a result of a search as a result of a search. .
[0019]
[Means for Solving the Problems]
The first associative memory of the present invention that achieves the above-described object provides:
Corresponding to the bit pattern of the memory word for storing each data, the bit pattern of all or part of the input search data provided corresponding to the memory word, and the data stored in the memory word In an associative memory including a coincidence detection circuit that detects coincidence / non-coincidence with all or part of the bit pattern
If none of the coincidence detection circuits outputs a coincidence signal indicating that a coincidence has been detected, the valid data to be searched for in the memory word is not stored, and therefore overwriting is allowed. A search data write circuit that selects one of the empty memory words to be stored and stores the search data in the selected memory word;
An accompanying data writing area designating circuit for designating an unmasked bit position as an accompanying data writing area for writing accompanying data related to the search data by masking a part of bits of the selected memory word When,
The accompanying data writing area comprises an accompanying data writing circuit for storing the accompanying data.
[0020]
Here, the first associative memory of the present invention is
A flag is stored corresponding to the memory word and indicating whether the memory word is a memory word in a storage state in which the valid data is stored or a memory word in the free state. Flag register
A flag changing circuit for storing a flag indicating the storage state in the flag register corresponding to the selected memory word when the match signal is not output from any of the match detection circuits;
It may be provided.
[0021]
The second associative memory of the present invention that achieves the above object is
A plurality of data constituting a data group consisting of a set of a plurality of stored data is provided with a plurality of memory word groups consisting of a plurality of memory words for storing each data, and is input each time search data is input. A match comparison is made between all or a part of the bit pattern of the search data and all or a part of the bit pattern corresponding to the bit pattern of the data stored in the memory word, and from one or more times All of the search data input in all the matching searches or a match with all or a part of the data stored in the same memory word group as each predetermined part of the bit pattern corresponds to the bit pattern. An associative memory that detects the presence of a data group corresponding to the search data input a predetermined number of times when detected Oite,
The corresponding memory word group provided corresponding to each of the memory word groups is a memory word group in a storage state in which a valid data group to be searched is stored, or the valid data group is A flag register in which a flag indicating whether the memory word group is in an empty state that is not stored and thus overwritten is allowed to be stored;
During the predetermined number of matching searches, each time a search is performed, the input search data is written to any memory word in the memory word group selected from the free memory word group. A data writing circuit;
A memory word designating circuit for designating any memory word in the empty memory word group in which the search data is written;
As a result of the predetermined number of matching searches, when a data group corresponding to the search data input the predetermined number of times is not detected, the memory word specified by the memory word specifying circuit is associated with the search data. An accompanying data writing circuit for writing data;
As a result of the predetermined number of matching searches, when the data group corresponding to the search data input the predetermined number of times is not detected, the flag register corresponding to the selected memory word group indicates the storage state. A flag change circuit for storing a flag;
It is characterized by comprising.
[0022]
Here, the second associative memory of the present invention is
By masking some bits of the memory word designated by the memory word designating circuit, an unmasked bit position is designated as an accompanying data write area for writing accompanying data related to the search data. A data write area specification circuit is provided.
The accompanying data writing circuit may store the accompanying data in the accompanying data writing area.
[0023]
Alternatively, in the second associative memory of the present invention, the memory word designating circuit includes:
A memory word group designating circuit for designating the empty memory word group in which the search data is written;
And a memory word position specifying circuit in the memory word group for relatively specifying the position of the memory word in the memory word group specified by the memory word group specifying circuit.
[0024]
The third associative memory of the present invention is
All or part of the input search data group comprising a plurality of memory word groups each including a plurality of memory words for storing a plurality of data constituting one data group consisting of a set of a plurality of stored data for each data In an associative memory for detecting coincidence / non-coincidence between all or a part of bit patterns corresponding to the bit pattern in the group stored in the memory word group
A memory word group designating circuit for designating one of the memory word groups;
A memory word position specifying circuit in the memory word group for relatively specifying the position of the memory word in the memory word group specified by the memory word group specifying circuit;
And a memory word writing / reading circuit for writing / reading data to / from the memory word corresponding to the designated memory word position.
[0025]
[Action]
Since the first associative memory of the present invention stores the search data as it is in response to the fact that no match was detected by the search, a match was not detected as in the prior art. When registering data, it is only necessary to write the remaining accompanying data portion, and the processing efficiency is improved.
[0026]
Here, since a technique related to the present invention is proposed in Japanese Patent Publication No. 61-31558, a difference between the technique proposed there and the present invention will be described.
Many memory words that make up an associative memory do not always store data to be searched in all memory words, and some of these memory words are empty in which no valid data is stored. In some cases, valid data may be written to a memory word that is in a state of being empty. In this case, since it is cumbersome to manage externally whether or not this memory word is in an empty state, the above document describes data valid for the memory word corresponding to each memory word. Is stored in association with each memory word, and when writing new valid data, the associative memory itself is in an empty state. Techniques have been proposed for finding a word and writing valid data to the memory word.
[0027]
The technique proposed there is for eliminating the need to manage a memory word in an empty state externally. In the registration of unregistered data, the search data is again stored in the memory after the search operation. Need to give to the word. In this respect, the present invention is significantly different from the proposed technique described above.
The second associative memory of the present invention has a memory word group for storing a data group, and performs an operation of inputting search data and performing a search a predetermined number of times to detect the presence of the corresponding data group. It is about memory.
[0028]
In such an associative memory, for example, a group of 100 data including 90 search target data and 10 output target data (accompanying data) is stored, and the search data is input. Consider a case where the search operation is repeated 90 times to detect the presence of a desired data group and the accompanying data of the desired data group is
[0029]
In contrast, in the second associative memory of the present invention, search data is written into a memory word group in an empty state for each search, so that the desired data is obtained as a result of 90 searches. If the group does not exist, the search data has already been written, so the data group can be registered by writing only the accompanying data ten times. For this reason, the trouble of writing data is greatly reduced and the processing speed is increased.
[0030]
The third associative memory according to the present invention designates a specific memory word by dividing it into a memory word group address and a relative address in the memory word group, and therefore handles data having a group structure. In this case, the complicated process of managing the absolute address of each memory word and designating the absolute address is avoided.
[0031]
【Example】
Examples of the present invention will be described below.
FIG. 1 is a circuit diagram showing the characterizing portion of one embodiment of the first associative memory of the present invention. Constituent elements corresponding to the constituent elements in the drawings referred to in the above-described conventional example are denoted by the same reference numerals as those in the drawings.
[0032]
In FIG. 1, the configuration of the
[0033]
FIG. 2 is a diagram showing a circuit example of the multiple
The multi-selection /
[0034]
The multi-selection /
[0035]
2B includes an
[0036]
Similarly to the multiple
[0037]
If an encoder is connected to the subsequent stage of the multiple selection / separation circuit shown in FIG. 2A or 2B, the
As described above, when the
[0038]
Here, the bit line drive circuit 70 puts search data on the bit lines 23-1,..., 23-n and the bit bar lines 26-1,. As a result, if the search data matches the data stored in the
[0039]
The whole
In the write-once control circuit 72, first, the bit lines 23-1,..., 23-n, the bit bar lines 26-1,. When the search data is put in the search, the signal “1” is put on the word line activation
[0040]
FIG. 3 is a diagram showing a circuit example of one bit of the bit line drive circuit 70. The partial circuit 70_1 shown here includes two OR gates 93_1 and 94_1 arranged corresponding to a pair of bits and bit bars. The two OR gates 93_1 and 94_1 include search mask data lines. 98_1 and the write mask data line 99_1 are connected in common. Further, the bit data line 97_1 is directly connected to the OR gate 93_1, and the data applied to the bit data line 97_1 is input to the OR gate 93_1 as it is. On the other hand, the data applied to the bit data line 97_1 is inverted and input to the OR gate 94_1 through the inverter 95_1. The outputs of the two OR gates 93_1 and 94_1 are respectively input to the bit line drivers 91_1 and 92_1. When a logic “1” pulse is applied to the bit line
[0041]
When a search is performed, a signal of logic “1” is applied to the search mask data line 98_1 for a bit not to be searched, that is, a bit to be masked, and then a logic “1” is applied to the bit line
[0042]
By the operation of the bit line drive circuit 70 as described above, the search data is written into the
Thereafter, as described above, whether or not a match has occurred in any of the
[0043]
On the other hand, for a bit to be searched, that is, a bit that is not masked, a signal of logic “0” is given to the search mask data line 98_1, the search data is put on the bit data line 97_1, and then the bit line drive signal line. A pulse of logic “1” is given to 96. By doing so, search data is given to the bit line, and data obtained by inverting the search data is given to the bit bar line, and search without masking is performed, and writing to the relevant bit of the
[0044]
On the other hand, when all the
Similarly to the search, the
[0045]
At this time, the write-once control circuit 72 gives a logic “0” signal to the empty
[0046]
In the multi-selection /
In the above description, the accompanying data is written only to bits other than the bit in which the search data is written. However, the signals of the search mask data line 98_1 and the write mask data line 99_1 are appropriately controlled. It goes without saying that various data registration methods can be realized.
[0047]
Next, an embodiment of the second associative memory according to the present invention will be described. The idea of the second associative memory according to the present invention is preferably applied, and the data group is stored and searched. Since the associative memory itself is not yet publicly known (see Japanese Patent Application No. 5-248121), here, the associative memory itself as a base will be described first, and then a second example of the associative memory of the present invention will be described. .
[0048]
FIG. 4 is a diagram illustrating an example of data forming a group structure.
FIG. 4 shows a data structure in which four data with attributes I, II, III, and IV are set to form one data group. To clarify the concept of data groups and attributes, for example, each data group for each
[0049]
As described above, for example, in the case where a search is performed by storing a data group composed of a plurality of data to which attributes I, II, III, and IV are attached in an associative memory, for example, the data of
[0050]
Here, for convenience of explanation, it is assumed that group numbers n and n + 1 are in an empty state in which no valid data group is recorded.
FIG. 5 is a block diagram showing an example of an associative memory suitable for handling data having a group structure as shown in FIG.
.. Extending from each memory word 11_1, 11_2,... Are connected to one input terminal of each AND gate 20_1, 20_2,. The other input terminals of the AND gates 20_1, 20_2,... Are connected to the output terminals of the OR gates 21_2, 21_3,..., And one input terminal of each of the OR gates 21_2, 21_3,. 22 is connected.
[0051]
The output terminals of the AND gates 20_1, 20_2,... Are connected to the data input terminals of the first flag registers 23_1, 23_2,..., And the output terminals of the first flag registers 23_1, 23_2,. Are connected to the input terminals of the flag registers 24_1, 24_2,. The output terminals of the second flag registers 24_1, 24_2,... Are connected to the
[0052]
The first flag registers 23_1, 23_2,... And the second flag registers 24_1, 24_2,... Receive the match result latch signal S1 output to the match result
[0053]
Each of the memory words 11_1, 11_2,... Includes an attribute storage unit 11_1_1, 11_2_1,... That stores an attribute, and a data storage unit 11_1_2, 11_2_2,. Each stores storage data consisting of pairs of attributes and data corresponding to each other. Here, as illustrated, each of the memory words 11_1, 11_2, 11_3, and 11_4 has an attribute I, data 'A', attribute II, data 'B', and attribute belonging to the
[0054]
A match signal is output to each memory word 11_1 and 11_2 when the stored data (both attribute and data) stored therein match the input reference data (both attribute and data). In addition to the conventional match lines 14_1, 14_2,..., Attribute match lines 30_1, 30_2,. It should be noted that both the attribute only match and the attribute and data match are configured in the same way as the conventional match detection circuit, and the conventional match detection circuit is a very general technique in the field of associative memory. The illustration and explanation are omitted.
[0055]
The third flag registers 31_1, 31_2, ... are provided corresponding to the memory words 11_1, 11_2, and the attribute match lines 30_1, 30_2, ... are data of the corresponding third flag registers 31_1, 31_2, .... Extends to the input terminal. Further, in the associative memory of this embodiment, as described above, one data line 32_1, 32_2,... Is provided for each memory word group composed of memory words storing each data belonging to each data group shown in FIG. Are provided, and the first switches 33_1, 33_2,... Are provided between the data lines 32_1, 32_2,... And the output terminals of the second flag registers 31_1, 31_2,. Specifically, these first switches 33_1, 33_2,... Are configured using transistors or the like. The same applies to other switches described later. Each of the first switches 33_1, 33_2,... Is turned on when a logic “1” signal is latched in the corresponding third flag register 31_1, 31_2,. It is cut off when it is done. Each of the third flag registers 31_1, 31_2,... Latches the signal of the corresponding attribute match line 30_1, 30_2, ... at the timing of the falling b of the match result latch signal S1 output to the match result
[0056]
Further, second switches 34_1, 34_2, ... are provided between the data lines 32_1, 32_2, ... and the input terminals of the OR gates 21_1, 21_2, ..., and these second switches 34_1, 34_2, ... are provided. Are controlled by the signals of the corresponding attribute match lines 30_1, 30_2,... To be in a conductive state when the signal is logic “1” indicating coincidence, and to be cut off when the signal is logic “0” indicating mismatch. .
[0057]
In the associative memory configured as described above, the matching search is performed as follows.
When searching each search data independently, the first search timing signal S2 is output to the first
[0058]
The logic '1' signal output from the AND gate 20_2 is latched in the first flag register 23_2 at the timing of the rising edge a of the match result latch signal S1 output to the match result
[0059]
Further, at each timing when a signal of logic “1” is latched in the first flag register 23_2 and the second flag register 24_2, the other first flag registers 23_1; 23_3, 23_4,. A signal of logic “0” is latched in the registers 24_1; 24_3; 24_4,.
The signals of logic '0', '1', '0',... Latched in the second flag registers 24_1, 24_2, 24_3, ... in this way are input to the
[0060]
Next, a case where a plurality of continuous data searches are performed will be described. The first search in the case of performing a plurality of consecutive searches is the same as the above-described single data search operation. However, in this first data search, in addition to the above operation, the second search In preparation for the second data search, the following operation is performed.
At the time of the first data search, a signal of logic '1' is output to the attribute match line 30_2 corresponding to the memory word 11_2 in response to the attribute match, whereby the corresponding third flag register 31_2 is output. Also, the logic '1' signal is latched, the corresponding first switch 33_2 is turned on, and the logic '1' signal representing the match of both the attribute and the data stored in the corresponding second flag register 24_2 is The data is output to the data line 32_1. At the same time, the corresponding second switch 34_2 is also turned on, but this is an unnecessary operation in the first search.
[0061]
Next, search is performed by inputting reference data REF_DATA including attribute IV and data ‘D’. At this time, the initial
[0062]
As a result, the logic '1' signal of the second flag register 24_4 corresponding to the memory word 11_4 is input to the priority encoder 15 (see FIG. 11), and the address of the memory word 11_4 is obtained. It is known in advance that attribute IV is stored in 11_4, and for example, when it is desired to read data of attribute III in the same group, 1 is subtracted from the obtained address to obtain the address of memory word 11_3, The address may be input to the
[0063]
As described above, in the embodiment shown in FIG. 5, even in the same group, even if the data is stored in memory words that are separated from each other, or the data is searched in the reverse order. You can also search.
Here, the data lines 32_1, 32_2,... In the above embodiment are fixed in length assuming that the number of data belonging to one group is determined in advance. When the data line is provided, it is necessary to estimate the maximum number of data belonging to one group and to provide a data line having a length corresponding to the maximum number of data. In this case, when a data group is constituted by a smaller number of data than the maximum, a useless memory word is generated. Therefore, it is preferable that the data line has a variable length according to the number of data belonging to one group.
[0064]
FIG. 6 is a schematic diagram showing one method for realizing a variable-length data line.
A
[0065]
When the number of data constituting one data group is 2, every other switch 40_2, 40_4, 40_6,... Is turned on by outputting a first switch control signal to the
[0066]
According to this method, when the number of data constituting one data group is a multiple of 2, no vacancy occurs in the memory word, but when the number of data other than a multiple of 2, for example, 3, 5, 9, etc., the vacant memory A word will be generated. If a large number of switches 40_2, 40_3,... Can be arbitrarily turned on / off so that this empty memory word does not occur, the number of control lines becomes large, and switch control signals are output to these control lines. The control circuit to perform becomes complicated. Therefore, the method shown in FIG. 6 is not suitable for arbitrarily controlling the length of the data line.
[0067]
FIG. 7 is a schematic diagram showing another method for realizing a variable data line.
A
[0068]
FIG. 8 is a circuit diagram showing an example of an attribute determination circuit that determines whether the attribute is I or other.
Here, “000” is assigned to the attribute I, and when the attribute stored in the
[0069]
As described above, in the associative memory shown in FIG. 5, the length of the data lines 32_1, 32_2,... Can be adjusted according to the number of data constituting one data group. Of course, instead of using attribute data, the length of the data line may be adjusted by controlling the switch with a dedicated control line.
Next, an embodiment of the second associative memory of the present invention in which the technical idea of the present invention is applied to the associative memory shown in FIG. 5 will be described.
[0070]
FIG. 9 is a circuit diagram showing the characterizing portion of one embodiment of the second associative memory of the present invention. The components corresponding to the respective components of the first associative memory of the present invention shown in FIG. 1 are indicated by the numbers corresponding to the numbers given in FIG. 1, and the differences will be mainly described.
FIG. 9 shows the memory word group storing the data group of group number n among the data groups shown in FIG. Yes.
[0071]
In the associative memory shown in FIG. 9, each memory word..., 11 is similar to the associative memory shown in FIG. 1 n, 11 2 n, ..., 11 1 Flag registers ..., 51 corresponding to n + 1, ... 1 n, 51 2 n, ..., 51 1 n + 1,... are provided. These flag registers ..., 51 1 n, 51 2 n, ..., 51 1 As described later, n + 1,... are controlled collectively for each memory word group, but the effective flag register is the head flag register for each memory word group.
[0072]
Each memory word ..., 11 1 n, 11 2 n, ..., 11 1 n + 1,... are attribute storage units for storing attributes,. 1 1 n, 11 2 1 n, ..., 11 1 1 n + 1,..., a data storage unit for storing data, 11 1 2 n, 11 2 2 n, ..., 11 1 2 n + 1,... However, in FIG. 9, for convenience of illustration, the
[0073]
Here, each memory word group corresponding to the group number n and the group number n + 1 is in an empty state, and therefore the
First transistor ... 81 1 n, 81 2 n, ..., 81 1 n + 1,... are corresponding attribute storage units ..., 11 1 1 n, 11 2 1 n, ..., 11 1 1 .., 11 is a transistor whose ON / OFF is controlled by a control line extending from n + 1,. 1 1 n, 11 1 1
[0074]
The same applies to the memory word group corresponding to the group
1 n + 1,...
[0075]
As shown in FIG. 4, when a valid data group is stored in the memory word group corresponding to the
[0076]
Each
[0077]
Here, it is assumed that the data retrieval is performed by inputting the retrieval data of the attribute II and the data 'B', and the
[0078]
Regardless of whether or not a match is detected in any of the memory word groups during this search, the additional write control circuit 72 (see FIG. 1) sends “1” to the word line activation
[0079]
After the above search and the writing of the search data are performed a predetermined number of times, information indicating whether or not a desired data group has been finally detected is input to the additional write control circuit 72 (see FIG. 1). In the write-once control circuit 72, if a desired data group is detected in any of the memory word groups, nothing is performed thereafter. That is, although the search data is written in the memory word group corresponding to the group number n shown in FIG. 9 each time the search is performed, the
[0080]
On the other hand, when the desired data group does not exist in all the memory word groups in the entire
As described above, search data is written simultaneously with the search in the memory word corresponding to the attribute to be searched. Therefore, only the accompanying data needs to be written for registering the data group.
[0081]
Here, it is assumed that accompanying data is written in a memory word corresponding to attribute III. At this time, as in the search, the attribute III and the accompanying data are input as a pair. Each
[0082]
The above-mentioned accompanying data is written by a plurality of separation circuits... 1 n, 52 2 n, ..., 52 1 Among the memory word groups corresponding to the group number n in an empty state designated by n + 1,. 3 2 for n. Similarly, accompanying data can be written in a memory word in which other attribute data is stored.
[0083]
As described above, the search data and the accompanying data are written in the memory word group corresponding to the group number n. Thereafter, the write-once control circuit 72 (see FIG. 1) sends flag registers... 51 1 n, 51 2 n, ..., 51 1 A logic “0” signal is applied to the empty
[0084]
Multiple selection separation circuit ... 52 1 n, 52 2 n, ..., 52 1 In n + 1,..., the
[0085]
In the above description, the memory word in which the search data is stored and the memory word in which the accompanying data are stored are described as separate ones. However, the second associative memory according to the present invention also includes Similar to the first associative memory, both search data and accompanying data can be stored in the same memory word by performing mask control at the time of searching and at the time of writing.
[0086]
In the embodiment shown in FIG. 9, the memory word to which the search data is to be written is determined using the output of the multiple separation circuit and the attribute match line, but the present invention is not limited to the embodiment of FIG. For example, the priority decoder is configured by inputting the output of the
[0087]
In the second associative memory embodiment of the present invention, there is provided a method of selectively activating one memory word in a memory word group by selecting a memory word group by a multiple selection separation circuit and further detecting attribute matching. Although shown, it is very effective to apply this concept when storing data having a group structure as shown in FIG.
FIG. 10 is a diagram showing each data having the data structure shown in FIG. 4 and the absolute address of a memory word storing each data. Here, as described above, in response to the fact that no match was detected as a result of the search, the associated data corresponding to attribute III is registered in the memory word group corresponding to the group number n in the highest priority free state. In this case, in order to specify that data corresponding to the attribute III is to be written, it is only necessary to perform a match comparison by the attribute III, and there is no need for the outside to know the group number of the memory word group that is currently in the highest priority empty state. .
[0088]
On the other hand, in order to perform the same writing of the accompanying data by designating the memory word by the absolute address, it is necessary to know that the group number of the memory word group in the empty state having the highest priority at present is n. Yes, it is necessary to specify the absolute address 4n-2 which is obtained after knowing this, and the processing becomes complicated.
As described above, when a data group having a data structure as shown in FIG. 4 or FIG. 10 is handled, the address number is managed by the group number of the memory word group and the position of the memory word in the memory word group, rather than the absolute address management. It is preferable to do relative.
[0089]
The address management of data having a group structure as described above is not limited to the second associative memory embodiment of the present invention, and is widely effective for an associative memory having data having a group structure.
[0090]
【The invention's effect】
As described above, the content addressable memory of the present invention stores search data at the same time as search. Therefore, it is only necessary to write only accompanying data for additional writing of unregistered data. Done at high speed.
[Brief description of the drawings]
FIG. 1 is a circuit diagram showing a characteristic part of an embodiment of a first content addressable memory according to the present invention;
FIG. 2 is a circuit diagram of a multiple selection separation circuit.
FIG. 3 is a diagram illustrating a circuit example of one bit of a bit line drive circuit.
FIG. 4 is a diagram illustrating an example of group structure data.
FIG. 5 is a block diagram showing an example of an associative memory suitable for handling group structure data.
FIG. 6 is a schematic diagram showing one method for realizing a variable-length data line.
FIG. 7 is a schematic diagram showing another method for realizing a variable data line.
FIG. 8 is a circuit diagram of an example of an attribute determination circuit that determines whether an attribute is I or other.
FIG. 9 is a circuit diagram showing a characteristic part of an embodiment of a second associative memory according to the present invention;
FIG. 10 is a diagram illustrating a correspondence between group structure data and absolute addresses;
FIG. 11 is a circuit block diagram showing an example of a conventional associative memory.
FIG. 12 is a detailed circuit diagram showing one memory word in the associative memory.
[Explanation of symbols]
11, 11_1 n, 11_2 n, ..., 11_1 n + 1 memory word
11_1_1 n, 11_2_1 n, ..., 11_1 1 n + 1
Attribute storage
11_1_2 n, 11_2_2 n, ..., 11_1 2 n + 1
Data storage
14 Matching line
14_1 n, 14_2 n, ..., 14_1 n + 1 data match line
30_1 n, 30_2 n, ..., 30_1 n + 1 attribute match line
51, 51_1 n, 51_2 n, ..., 51_1 n + 1 flag register
52, 52_1 n, 52_2 n, ..., 52_1 n + 1
Multiple selection separation circuit
Claims (4)
前記メモリワード群それぞれに対応して備えられた、対応するメモリワード群が、検索の対象とされる有効データ群が記憶された記憶状態にあるメモリワード群であるか、あるいは前記有効データ群が記憶されておらず、したがって上書きが許容される空き状態にあるメモリワード群であるかを示すフラグが記憶されるフラグレジスタと、
前記所定回数の一致検索の間、1回の検索毎に、入力された検索データを、前記空き状態にあるメモリワード群の中から選択されたメモリワード群内のいずれかのメモリワードに書き込む検索データ書き込み回路と、
前記検索データが書き込まれた前記空き状態のメモリワード群内のいずれかのメモリワードを指定するメモリワード指定回路と、
前記所定回数の一致検索の結果、該所定回数入力された検索データに対応するデータ群が検出されなかった場合に、前記メモリワード指定回路によって指定されたメモリワードに、前記検索データに関連した付随データを書き込む付随データ書き込み回路と、
前記所定回数の一致検索の結果、該所定回数入力された検索データに対応するデータ群が検出されなかった場合に、前記選択されたメモリワード群に対応する前記フラグレジスタに、前記記憶状態を示すフラグを記憶させるフラグ変更回路とを備えたことを特徴とする連想メモリ。 A plurality of data constituting a data group consisting of a set of a plurality of stored data is provided with a plurality of memory word groups consisting of a plurality of memory words for storing each data, and is input each time search data is input. A match comparison is made between all or a part of the bit pattern of the search data and all or a part of the bit pattern corresponding to the bit pattern of the data stored in the memory word, and from one or more times All of the search data input in all the matching searches or a match with all or a part of the data stored in the same memory word group as each predetermined part of the bit pattern corresponds to the bit pattern. An associative memory that detects the presence of a data group corresponding to the search data input a predetermined number of times when detected Oite,
The corresponding memory word group provided corresponding to each of the memory word groups is a memory word group in a storage state in which a valid data group to be searched is stored, or the valid data group is A flag register in which a flag indicating whether the memory word group is in an empty state that is not stored and thus overwritten is allowed, and
During the predetermined number of matching searches, each time a search is performed, the input search data is written to any memory word in the memory word group selected from the empty memory word group. A data writing circuit;
A memory word designating circuit for designating any memory word in the empty memory word group in which the search data is written;
As a result of the predetermined number of coincidence searches, if no data group corresponding to the search data input the predetermined number of times is detected, the memory word specified by the memory word specifying circuit is associated with the search data. An accompanying data writing circuit for writing data;
As a result of the predetermined number of coincidence searches, when the data group corresponding to the search data input the predetermined number of times is not detected, the flag register corresponding to the selected memory word group indicates the storage state. An associative memory comprising a flag changing circuit for storing a flag .
前記付随データ書き込み回路が、前記付随データ書き込み領域に、前記付随データを記憶させるものであることを特徴とする請求項1記載の連想メモリ。 By masking a part of bits of the memory word designated by the memory word designating circuit, an unmasked bit position is designated as an accompanying data write area for writing accompanying data related to the search data. A data write area specification circuit is provided.
2. The associative memory according to claim 1, wherein the accompanying data writing circuit stores the accompanying data in the accompanying data writing area .
前記検索データが書き込まれた前記空き状態のメモリワード群を指定するメモリワード群指定回路と、
前記メモリワード群指定回路によって指定されたメモリワード群内でのメモリワードの位置を相対的に指定するメモリワード群内メモリワード位置指定回路とを備えたものであることを特徴とする請求項1又は2記載の連想メモリ。 The memory word designating circuit is
A memory word group designating circuit for designating the empty memory word group in which the search data is written;
Claim 1, characterized in that with a memory word groups within a memory word location specified circuit relatively specifying the position of the memory words in the memory word groups designated by the memory word groups specifying circuit Or the associative memory of 2 .
前記メモリワード群の1つを指定するメモリワード群指定回路と、
前記メモリワード群指定回路によって指定されたメモリワード群内でのメモリワードの位置を相対的に指定するメモリワード群内メモリワード位置指定回路と、
前記指定されたメモリワード位置に対応するメモリワードに対して、データの書き込み、読み出しを行うメモリワード書き込み読み出し回路とを備えたことを特徴とする連想メモリ。 All or part of the input search data group comprising a plurality of memory word groups each including a plurality of memory words for storing a plurality of data constituting one data group consisting of a set of a plurality of stored data for each data In an associative memory for detecting coincidence / non-coincidence between all or a part of bit patterns corresponding to the bit pattern in the group stored in the memory word group
A memory word group designating circuit for designating one of the memory word groups;
A memory word position specifying circuit in a memory word group for relatively specifying a position of a memory word in a memory word group specified by the memory word group specifying circuit;
The memory word corresponding to the specified memory word location, associative memory you characterized by comprising the data writing, and a memory word write read circuit for reading.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP25836894A JP3645293B2 (en) | 1994-10-24 | 1994-10-24 | Associative memory |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP25836894A JP3645293B2 (en) | 1994-10-24 | 1994-10-24 | Associative memory |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH08124388A JPH08124388A (en) | 1996-05-17 |
| JP3645293B2 true JP3645293B2 (en) | 2005-05-11 |
Family
ID=17319279
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP25836894A Expired - Fee Related JP3645293B2 (en) | 1994-10-24 | 1994-10-24 | Associative memory |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3645293B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100708095B1 (en) * | 2000-07-20 | 2007-04-16 | 삼성전자주식회사 | Head gimbal assembly |
-
1994
- 1994-10-24 JP JP25836894A patent/JP3645293B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH08124388A (en) | 1996-05-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6137707A (en) | Method and apparatus for simultaneously performing a plurality of compare operations in content addressable memory device | |
| US6243281B1 (en) | Method and apparatus for accessing a segment of CAM cells in an intra-row configurable CAM system | |
| US6707692B2 (en) | Content addressable memory device capable of being used as binary CAM device or as ternary CAM device and structure method therefor | |
| US5592407A (en) | Associative memory | |
| JPH08504992A (en) | Pattern retrieval and refresh logic in dynamic storage | |
| JPH07282581A (en) | Semiconductor memory device | |
| JP3703518B2 (en) | Associative memory system | |
| US6766317B2 (en) | Range check cell and a method for the use thereof | |
| US7251707B1 (en) | Content based content addressable memory block enabling using search key | |
| US6751701B1 (en) | Method and apparatus for detecting a multiple match in an intra-row configurable CAM system | |
| US20020080665A1 (en) | Content addressable memory having data width extension capability | |
| JP3645293B2 (en) | Associative memory | |
| US5479366A (en) | Associative memory | |
| JP2779114B2 (en) | Associative memory | |
| JPH10134584A (en) | Associative memory | |
| US5465228A (en) | Associative memory | |
| JP3636382B2 (en) | Associative memory | |
| EP1290697B1 (en) | Partitioned content addressable memory device | |
| JP3370227B2 (en) | Associative memory | |
| JP3597882B2 (en) | Associative memory | |
| JP3130736B2 (en) | Usage of associative memory and associative memory | |
| JP3114957B2 (en) | Associative memory | |
| JP3597899B2 (en) | Associative memory | |
| JP2774929B2 (en) | Layout structure of associative memory | |
| JP3597881B2 (en) | Associative memory |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040830 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040914 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041109 |
|
| 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: 20050201 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050203 |
|
| 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: 20080210 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090210 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090210 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100210 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110210 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |